/* ─────────────────────────────────────────────────────────────────────────────
   TASCA DO AVÔ — main.css
   Designed by someone who loves food, not a professional.
   Warm red · aged cream · dark wood · golden afternoon light.
   Lenis lerp 0.06 — the pace of a long Portuguese lunch.
   No cursor effects. No sharp entrances. Everything rises like steam.
───────────────────────────────────────────────────────────────────────────── */

/* ── CUSTOM PROPERTIES ─────────────────────────────────────────────────────── */
:root {
  --red:          #8B1A1A;
  --red-dim:      rgba(139, 26, 26, 0.18);
  --cream:        #F5F0E0;
  --cream-dark:   #EDE5D0;
  --wood:         #4A3728;
  --gold:         #E8C97E;
  --ink:          #2D1A0E;
  --ink-mid:      rgba(45, 26, 14, 0.55);
  --ink-dim:      rgba(45, 26, 14, 0.22);

  --font-display: 'IM Fell English', Georgia, serif;
  --font-body:    'Source Serif 4', Georgia, serif;

  --nav-h:        70px;
  --max-w:        1100px;
  --section-pad:  clamp(80px, 11vw, 130px);
  --ease-out:     cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── RESET ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: auto; }
body {
  font-family:  var(--font-body);
  background:   var(--cream);
  color:        var(--ink);
  line-height:  1.75;
  font-size:    1rem;
  font-weight:  300;
  -webkit-font-smoothing: antialiased;
  overflow-x:   hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }

/* Paper grain texture — lighter than Grão Negro */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23g)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px;
  animation: grainShift 1.2s steps(2) infinite;
}
@keyframes grainShift {
  0%   { background-position: 0 0; }
  50%  { background-position: -30px 20px; }
  100% { background-position: 10px -15px; }
}

/* ── UTILITY ───────────────────────────────────────────────────────────────── */
.section__inner {
  max-width:      var(--max-w);
  margin-inline:  auto;
  padding-inline: clamp(20px, 5vw, 60px);
}
.text-center { text-align: center; }
.section__title {
  font-family:  var(--font-display);
  font-size:    clamp(1.8rem, 4vw, 2.8rem);
  font-weight:  400;
  color:        var(--red);
  line-height:  1.2;
  margin-bottom: 1rem;
}
.section__body {
  font-size:    1rem;
  line-height:  1.8;
  color:        var(--ink-mid);
  max-width:    55ch;
}
.text-center .section__body { margin-inline: auto; }

/* ── SITE HEADER ───────────────────────────────────────────────────────────── */
.site-header {
  position:      fixed;
  top:           0;
  left:          0;
  right:         0;
  z-index:       900;
  height:        var(--nav-h);
  background:    var(--cream);
  border-bottom: 2px solid var(--red);
  transition:    box-shadow 0.3s;
}
.site-header.is-scrolled {
  box-shadow: 0 2px 16px rgba(45, 26, 14, 0.12);
}
.header__inner {
  max-width:      var(--max-w);
  margin-inline:  auto;
  padding-inline: clamp(20px, 5vw, 60px);
  height:         100%;
  display:        flex;
  align-items:    center;
  justify-content: space-between;
  gap:            1.5rem;
}
.header__logo {
  display:        flex;
  flex-direction: column;
  line-height:    1.1;
}
.header__logo-name {
  font-family:  var(--font-display);
  font-size:    1.25rem;
  font-weight:  400;
  color:        var(--red);
}
.header__logo-sub {
  font-family:    var(--font-body);
  font-size:      0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color:          var(--ink-mid);
}

/* Nav */
.header__nav {
  display:     flex;
  align-items: center;
  gap:         2rem;
}
.header__links {
  display:     flex;
  gap:         1.5rem;
  align-items: center;
}
.header__link {
  font-family: var(--font-body);
  font-size:   0.88rem;
  font-weight: 400;
  color:       var(--wood);
  position:    relative;
  transition:  color 0.2s;
}
.header__link::after {
  content:    '';
  position:   absolute;
  bottom:     -1px; left: 0; right: 0;
  height:     1px;
  background: var(--red);
  transform:  scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease-out);
}
.header__link:hover { color: var(--red); }
.header__link:hover::after { transform: scaleX(1); }
.header__link--cta {
  background:     var(--red);
  color:          var(--cream) !important;
  padding:        0.45rem 1.1rem;
  font-weight:    600;
  transition:     background 0.2s;
}
.header__link--cta::after { display: none; }
.header__link--cta:hover { background: var(--wood); }

/* Burger */
.header__burger {
  display:        none;
  flex-direction: column;
  gap:            5px;
  padding:        4px;
}
.header__burger span {
  display:    block;
  width:      22px;
  height:     2px;
  background: var(--red);
  transition: transform 0.25s, opacity 0.25s;
}
.header__burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.header__burger.is-open span:nth-child(2) { opacity: 0; }
.header__burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── MOBILE MENU ───────────────────────────────────────────────────────────── */
.mobile-menu {
  position:        fixed;
  inset:           0;
  z-index:         800;
  background:      var(--cream-dark);
  display:         flex;
  flex-direction:  column;
  align-items:     center;
  justify-content: center;
  opacity:         0;
  visibility:      hidden;
  transition:      opacity 0.35s, visibility 0.35s;
}
.mobile-menu.is-open { opacity: 1; visibility: visible; }
.mobile-menu__close {
  position:  absolute;
  top:       20px;
  right:     24px;
  font-size: 2rem;
  color:     var(--red);
  line-height: 1;
}
.mobile-menu__list {
  display:        flex;
  flex-direction: column;
  align-items:    center;
  gap:            1.6rem;
}
.mobile-menu__link {
  font-family:  var(--font-display);
  font-size:    clamp(1.8rem, 6vw, 2.8rem);
  font-weight:  400;
  color:        var(--ink);
  opacity:      0;
  transform:    translateY(20px);
  display:      block;
  transition:   color 0.2s;
}
.mobile-menu__link:hover { color: var(--red); }
.mobile-menu__tagline {
  position:       absolute;
  bottom:         2rem;
  font-family:    var(--font-body);
  font-size:      0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color:          var(--ink-mid);
}

/* ── HERO ──────────────────────────────────────────────────────────────────── */
.hero {
  position:    relative;
  height:      100svh;
  min-height:  560px;
  display:     flex;
  align-items: flex-end;
  padding-bottom: clamp(3rem, 6vw, 6rem);
  background-size:     cover;
  background-position: center;
  background-repeat:   no-repeat;
  overflow:    hidden;
}
.hero__overlay {
  position:   absolute;
  inset:      0;
  background: linear-gradient(
    to top,
    rgba(45, 26, 14, 0.80) 0%,
    rgba(45, 26, 14, 0.20) 60%,
    transparent 100%
  );
}
.hero__inner {
  position:       relative;
  z-index:        2;
  max-width:      var(--max-w);
  margin-inline:  auto;
  padding-inline: clamp(20px, 5vw, 60px);
  width:          100%;
  padding-top:    var(--nav-h);
}
.hero__title {
  font-family:   var(--font-display);
  font-size:     clamp(2.2rem, 6vw, 5rem);
  font-weight:   400;
  color:         var(--cream);
  line-height:   1.2;
  margin-bottom: 1rem;
  max-width:     18ch;
}
.hero__title em {
  font-style: italic;
  color:      var(--gold);
}
.hero__subtitle {
  font-family:   var(--font-body);
  font-size:     clamp(1rem, 2vw, 1.2rem);
  font-weight:   300;
  font-style:    italic;
  color:         rgba(245, 240, 224, 0.8);
  max-width:     50ch;
  margin-bottom: 2rem;
}
.btn--primary {
  display:        inline-block;
  font-family:    var(--font-body);
  font-size:      0.85rem;
  font-weight:    600;
  letter-spacing: 0.06em;
  color:          var(--cream);
  background:     var(--red);
  padding:        0.8rem 2rem;
  transition:     background 0.25s;
}
.btn--primary:hover { background: var(--wood); }

/* ── HISTÓRIA ──────────────────────────────────────────────────────────────── */
.section--historia {
  padding-block: var(--section-pad);
  background:    var(--cream);
}
.historia__grid {
  display:    grid;
  grid-template-columns: 1fr 1fr;
  gap:        clamp(3rem, 6vw, 6rem);
  align-items: start;
}
.historia__year {
  display:        block;
  font-family:    var(--font-display);
  font-size:      clamp(4rem, 10vw, 8rem);
  font-weight:    400;
  color:          var(--red-dim);
  line-height:    1;
  margin-bottom:  -0.5rem;
  /* Decorative — not a heading */
}
.historia__content .section__title { margin-top: 0.5rem; }
.historia__content .section__body  { margin-top: 1rem; max-width: 50ch; }
.historia__quote {
  margin-top:  2rem;
  padding:     1.2rem 1.5rem;
  background:  var(--cream-dark);
  border-left: 4px solid var(--red);
}
.historia__quote p {
  font-family:  var(--font-display);
  font-size:    1.15rem;
  font-style:   italic;
  color:        var(--ink);
  line-height:  1.6;
  margin-bottom: 0.5rem;
}
.historia__quote cite {
  font-family:    var(--font-body);
  font-size:      0.78rem;
  letter-spacing: 0.08em;
  color:          var(--red);
  font-style:     normal;
}
.historia__image { overflow: hidden; }
.historia__image img {
  width:      100%;
  height:     480px;
  object-fit: cover;
  display:    block;
  filter:     sepia(0.2) contrast(1.05);
  transition: transform 0.7s var(--ease-out);
}
.historia__image:hover img { transform: scale(1.03); }
.historia__placeholder {
  background: var(--cream-dark);
  height:     480px;
  display:    flex;
  align-items: center;
  justify-content: center;
  border:     2px solid var(--red-dim);
}
.historia__placeholder span {
  font-family: var(--font-display);
  font-size:   clamp(3rem, 8vw, 6rem);
  color:       var(--red-dim);
}

/* ── EMENTA ────────────────────────────────────────────────────────────────── */
.section--ementa,
.section--alt {
  background: var(--cream-dark);
}
.section--ementa {
  padding-block: var(--section-pad);
}
.section--ementa .section__inner.text-center {
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
}
.ementa__container {
  column-count:  2;
  column-gap:    clamp(2rem, 4vw, 4rem);
}
.ementa__category {
  break-inside:  avoid;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}
.ementa__cat-title {
  font-family:    var(--font-body);
  font-size:      0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color:          var(--red);
  font-weight:    600;
  border-bottom:  1px solid var(--red-dim);
  padding-bottom: 0.4rem;
  margin-bottom:  0.8rem;
}
.ementa__item {
  margin-bottom: 0.9rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px dotted var(--ink-dim);
}
.ementa__item:last-child { border-bottom: none; }
.ementa__item-header {
  display:     flex;
  align-items: baseline;
  gap:         0.4rem;
}
.ementa__item-name {
  font-family:  var(--font-body);
  font-size:    0.95rem;
  font-weight:  600;
  color:        var(--ink);
  flex-shrink:  0;
}
.ementa__item-dots {
  flex:        1;
  border-bottom: 1px dotted var(--ink-dim);
  margin-bottom: 4px;
}
.ementa__item-price {
  font-family:  var(--font-body);
  font-size:    0.88rem;
  font-weight:  600;
  color:        var(--red);
  flex-shrink:  0;
}
.ementa__item-desc {
  font-size:   0.82rem;
  color:       var(--ink-mid);
  font-style:  italic;
  margin-top:  0.15rem;
}

/* ── GALERIA ───────────────────────────────────────────────────────────────── */
.section--galeria {
  padding-block: var(--section-pad);
  background:    var(--cream);
}
.section--galeria .section__inner.text-center { margin-bottom: clamp(1.5rem, 3vw, 2.5rem); }
.galeria__grid {
  display:               grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows:    repeat(2, 240px);
  gap:                   0.4rem;
}
.galeria__item {
  overflow:  hidden;
  position:  relative;
}
.galeria__item:first-child { grid-row: span 2; }
.galeria__item img {
  width:       100%;
  height:      100%;
  object-fit:  cover;
  display:     block;
  transition:  transform 0.7s var(--ease-out), filter 0.4s;
  filter:      sepia(0.18) contrast(1.04);
}
.galeria__item:hover img {
  transform: scale(1.05);
  filter:    sepia(0.05) contrast(1.04);
}
.galeria__placeholder {
  padding-block: 3rem;
  color:         var(--ink-mid);
  font-style:    italic;
}

/* ── RESERVAS ──────────────────────────────────────────────────────────────── */
.section--reservas {
  padding-block: var(--section-pad);
}
.reservas__grid {
  display:    grid;
  grid-template-columns: 1fr 1.2fr;
  gap:        clamp(2.5rem, 5vw, 5rem);
  align-items: start;
}
.reservas__info .section__title { margin-bottom: 0.8rem; }
.reservas__info .section__body  { margin-bottom: 1.5rem; }
.reservas__phone-label {
  display:     block;
  font-size:   0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color:       var(--ink-mid);
  margin-bottom: 0.3rem;
}
.reservas__phone-number {
  font-family:  var(--font-display);
  font-size:    1.5rem;
  color:        var(--red);
  transition:   opacity 0.2s;
}
.reservas__phone-number:hover { opacity: 0.75; }

/* FluentForms */
.reservas__form .ff-el-group { margin-bottom: 1.1rem; }
.reservas__form input,
.reservas__form textarea,
.reservas__form select {
  width:       100%;
  padding:     0.75rem 1rem;
  border:      1px solid var(--ink-dim);
  border-bottom-width: 2px;
  background:  var(--cream);
  color:       var(--ink);
  font-family: var(--font-body);
  font-size:   0.95rem;
  outline:     none;
  transition:  border-color 0.2s;
  border-radius: 0;
}
.reservas__form input:focus,
.reservas__form textarea:focus { border-color: var(--red); }
.reservas__form textarea { min-height: 120px; resize: vertical; }
.reservas__form .ff-btn-submit {
  background:     var(--red);
  color:          var(--cream);
  padding:        0.85rem 2.2rem;
  font-family:    var(--font-body);
  font-size:      0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight:    600;
  cursor:         pointer;
  border:         none;
  transition:     background 0.25s;
}
.reservas__form .ff-btn-submit:hover { background: var(--wood); }

/* ── LOCALIZAÇÃO ───────────────────────────────────────────────────────────── */
.section--localizacao {
  padding-block: var(--section-pad);
  background:    var(--cream);
}
.local__grid {
  display:    grid;
  grid-template-columns: 1fr 1.2fr;
  gap:        clamp(2.5rem, 5vw, 5rem);
  align-items: start;
}
.local__info .section__title { margin-bottom: 1.5rem; }
.local__details { display: flex; flex-direction: column; gap: 1.4rem; }
.local__detail-label {
  font-family:    var(--font-body);
  font-size:      0.68rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color:          var(--red);
  display:        block;
  margin-bottom:  0.3rem;
  font-weight:    600;
}
.local__detail p,
.local__detail a {
  font-size:   0.95rem;
  line-height: 1.7;
  color:       var(--wood);
}
.local__detail a:hover { color: var(--red); }
.local__map img {
  width:      100%;
  height:     380px;
  object-fit: cover;
  display:    block;
  filter:     sepia(0.1);
}
.local__map iframe {
  width:  100%;
  height: 380px;
  border: none;
  display: block;
}
.local__map-placeholder {
  height:          380px;
  background:      var(--cream-dark);
  display:         flex;
  align-items:     center;
  justify-content: center;
  font-style:      italic;
  color:           var(--ink-mid);
  border:          1px dashed var(--ink-dim);
}

/* ── CONTACTO ──────────────────────────────────────────────────────────────── */
.section--contacto {
  padding-block: var(--section-pad);
}
.section--contacto .section__inner.text-center { margin-bottom: clamp(1.5rem, 3vw, 2.5rem); }
.contacto__form-wrapper { max-width: 600px; }
.contacto__form .ff-el-group { margin-bottom: 1.1rem; }
.contacto__form input,
.contacto__form textarea {
  width:       100%;
  padding:     0.75rem 1rem;
  border:      1px solid var(--ink-dim);
  border-bottom-width: 2px;
  background:  var(--cream);
  color:       var(--ink);
  font-family: var(--font-body);
  font-size:   0.95rem;
  outline:     none;
  transition:  border-color 0.2s;
  border-radius: 0;
}
.contacto__form input:focus,
.contacto__form textarea:focus { border-color: var(--red); }
.contacto__form textarea { min-height: 130px; resize: vertical; }
.contacto__form .ff-btn-submit {
  background:     var(--red);
  color:          var(--cream);
  padding:        0.85rem 2.2rem;
  font-family:    var(--font-body);
  font-size:      0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight:    600;
  border:         none;
  cursor:         pointer;
  transition:     background 0.25s;
}
.contacto__form .ff-btn-submit:hover { background: var(--wood); }

/* ── FOOTER ────────────────────────────────────────────────────────────────── */
.site-footer {
  background:   var(--wood);
  color:        var(--cream);
  padding-block: clamp(3rem, 5vw, 5rem) 0;
}
.footer__inner {
  max-width:      var(--max-w);
  margin-inline:  auto;
  padding-inline: clamp(20px, 5vw, 60px);
  display:        grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap:            2rem;
  margin-bottom:  clamp(2rem, 4vw, 4rem);
}
.footer__logo {
  font-family:    var(--font-display);
  font-size:      1.3rem;
  color:          var(--gold);
  display:        block;
  margin-bottom:  0.4rem;
  transition:     opacity 0.2s;
}
.footer__logo:hover { opacity: 0.8; }
.footer__tagline {
  font-size:   0.82rem;
  font-style:  italic;
  color:       rgba(245,240,224,0.6);
  margin-bottom: 0.8rem;
}
.footer__heading {
  font-family:    var(--font-body);
  font-size:      0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color:          var(--gold);
  margin-bottom:  1rem;
  font-weight:    600;
}
.footer__list { display: flex; flex-direction: column; gap: 0.5rem; }
.footer__list a,
.footer__list li {
  font-size:   0.88rem;
  color:       rgba(245,240,224,0.7);
  transition:  color 0.2s;
}
.footer__list a:hover { color: var(--gold); }
.footer__bottom {
  max-width:       var(--max-w);
  margin-inline:   auto;
  padding-inline:  clamp(20px, 5vw, 60px);
  padding-block:   1.2rem;
  border-top:      1px solid rgba(245,240,224,0.15);
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  gap:             1rem;
  flex-wrap:       wrap;
}
.footer__bottom p {
  font-size:   0.75rem;
  color:       rgba(245,240,224,0.45);
}
.footer__bottom a { color: var(--gold); transition: opacity 0.2s; }
.footer__bottom a:hover { opacity: 0.7; }

/* ── RESPONSIVE ────────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .historia__grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .historia__image { order: -1; }
  .historia__image img,
  .historia__placeholder { height: 300px; }
  .ementa__container { column-count: 1; }
  .reservas__grid  { grid-template-columns: 1fr; }
  .local__grid     { grid-template-columns: 1fr; }
  .footer__inner   { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

@media (max-width: 768px) {
  :root { --nav-h: 62px; }
  .header__links  { display: none; }
  .header__burger { display: flex; }

  .galeria__grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, 200px);
  }
  .galeria__item:first-child { grid-row: span 1; }

  .footer__inner { grid-template-columns: 1fr; gap: 2rem; }
}

/* ── REDUCED MOTION ────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration:  0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  body::after { display: none; }
}
