/* ============================================
   MESA ENCANTAR · CSS · Mobile First
   ============================================ */
:root {
  --salvia:    #5F6F52;
  --salvia-cl: #A9B7A0;
  --cru:       #F3EFE7;
  --cru-deep:  #ECE6D8;
  --marrom:    #7A5C46;
  --marrom-dk: #5C4434;
  --dourado:   #C6A75E;
  --ink:       #2A2F25;
  --w:         min(92vw, 1200px);
  --serif:     "Cormorant Garamond", "Cormorant SC", serif;
  --caps:      "Cormorant SC", serif;
  --script:    "Alex Brush", cursive;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: var(--serif); background: var(--cru); color: var(--ink); overflow-x: hidden; }
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; }
.container { width: var(--w); margin-inline: auto; }

/* ============================================
   NAV
   ============================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  padding: 6px 0;
  transition: background .4s, box-shadow .4s;
}
.nav.scrolled {
  background: rgba(243,239,231,.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(95,111,82,.1);
}
.nav__inner {
  width: var(--w); margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between;
}
.nav__logo { display: flex; align-items: center; }
.nav__logo-img { height: 95px; width: 95px; object-fit: contain; display: block; }
.nav__logo-img--escuro { display: none; }
.nav__links { display: none; gap: 32px; font-family: var(--caps); font-size: 11px; letter-spacing: .28em; color: var(--salvia); }
.nav__links a { position: relative; padding-bottom: 2px; }
.nav__links a::after { content: ""; position: absolute; left: 0; bottom: 0; width: 0; height: 1px; background: var(--dourado); transition: width .3s; }
.nav__links a:hover::after { width: 100%; }
.nav__burger { display: flex; flex-direction: column; gap: 5px; padding: 8px; margin-right: -8px; }
.nav__burger span { width: 22px; height: 1px; background: var(--salvia); transition: transform .3s, opacity .3s; }
.nav__burger[aria-expanded=true] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav__burger[aria-expanded=true] span:nth-child(2) { opacity: 0; }
.nav__burger[aria-expanded=true] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.nav__drawer {
  position: fixed; inset: 0; background: var(--salvia); z-index: 190;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 32px;
  font-family: var(--caps); font-size: 22px; letter-spacing: .25em; color: var(--cru);
  opacity: 0; visibility: hidden; transition: opacity .4s, visibility 0s linear .4s;
}
.nav__drawer.open { opacity: 1; visibility: visible; transition: opacity .4s; }
.nav__drawer a:hover { color: var(--dourado); }

/* ============================================
   HERO — MOBILE FIRST
   ============================================ */
.hero { position: relative; }

/* Track: mesma altura do stage — sem scroll extra, sem travamento.
   O scrubbing usa o quanto o hero saiu do viewport (getBoundingClientRect). */
.hero__track { height: 100vh; position: relative; }

/* Stage: posição normal — a página desce E o vídeo acompanha o scroll */
.hero__stage {
  position: relative;
  height: 100vh; width: 100%;
  overflow: hidden;
  background: var(--cru);
  display: flex;
  flex-direction: column;
}

/* ── MOBILE: top 52% = brand / bottom 48% = vídeo ── */

/* Zona superior: mais espaço para a escrita crescer */
.hero__top {
  flex: 0 0 56%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 108px 12px 8px; /* 108px = nav (95px logo + padding) */
  background: var(--cru);
  position: relative;
  z-index: 2;
}

/* Brand mobile */
.hero__brand {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  text-align: center;
  animation: fadeUpSimple .9s ease .3s both;
}
/* Escrita: 1080x1080 com padding transparente — limitada pela altura
   disponível para não vazar sobre o hint nem o vídeo */
.hero__escrita {
  width: 92vw;
  max-height: calc(56vh - 118px);
  height: auto;
  object-fit: contain;
}
.hero__rule { width: 48px; height: 1px; background: var(--dourado); margin: 12px 0 6px; }
.hero__tagline {
  font-family: var(--caps); font-weight: 300;
  font-size: 9px; letter-spacing: .28em; color: var(--marrom);
}

/* Zona inferior: vídeo como banner */
.hero__video-wrap {
  flex: 1 1 0;
  position: relative;
  overflow: hidden;
}

.hero__video {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top; /* mostra a parte de cima da mesa */
  background: var(--cru);
  pointer-events: none;
  display: block;
}

/* Véu interno: funde o topo do banner com o fundo cru acima */
.hero__video-veil {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(243,239,231,1.0)  0%,
    rgba(243,239,231,0.0) 20%,
    rgba(243,239,231,0.0) 80%,
    rgba(243,239,231,0.75) 100%
  );
}

/* Brand desktop — escondido no mobile */
.hero__brand-desktop { display: none; }

/* Hint — na linha divisória entre brand e vídeo */
.hero__hint {
  position: absolute;
  top: calc(56% - 18px);
  bottom: auto;
  left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-family: var(--caps); font-size: 9px; letter-spacing: .3em; color: var(--salvia);
  z-index: 3;
  animation: fadeUp .9s ease 1s both, bob 2.2s ease-in-out 2s infinite;
  transition: opacity .4s;
  white-space: nowrap;
}
.hero__hint.hidden { opacity: 0; }
.hero__arrow { font-size: 12px; color: var(--dourado); }

/* fadeUp inclui translateX(-50%) para não quebrar o hint centralizado */
@keyframes fadeUp {
  from { opacity: 0; transform: translateX(-50%) translateY(16px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
@keyframes fadeUpSimple {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes bob {
  0%,100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(7px); }
}

/* ============================================
   EYEBROW
   ============================================ */
.eyebrow { display: inline-block; font-family: var(--caps); font-size: 11px; letter-spacing: .28em; color: var(--salvia); margin-bottom: 24px; }
.eyebrow--lt { color: var(--salvia-cl); }

/* ============================================
   MANIFESTO
   ============================================ */
.s-manifesto { padding: 100px 0 80px; background: var(--cru); position: relative; }
.s-manifesto::before { content: ""; display: block; width: 1px; height: 60px; background: var(--dourado); margin: -60px auto 40px; }
.display { font-family: var(--serif); font-size: clamp(34px,9vw,72px); font-weight: 300; line-height: 1.05; color: var(--salvia); margin-bottom: 28px; }
.display em { font-family: var(--script); font-style: normal; color: var(--dourado); font-size: 1.1em; }
.manifesto-sub { font-size: clamp(15px,3.5vw,19px); font-weight: 300; font-style: italic; color: var(--marrom); max-width: 38ch; line-height: 1.65; }

/* ============================================
   VALORES
   ============================================ */
.s-valores { padding: 90px 0; background: var(--cru-deep); }
.section-title { font-family: var(--serif); font-size: clamp(28px,6.5vw,52px); font-weight: 300; color: var(--salvia); line-height: 1.1; margin-bottom: 48px; max-width: 20ch; }
.section-title em { font-family: var(--script); font-style: normal; color: var(--dourado); font-size: 1.1em; }
.pillar-list { list-style: none; }
.pillar { display: grid; grid-template-columns: 52px 1fr; gap: 16px; padding: 28px 0; border-top: 1px solid rgba(95,111,82,.15); }
.pillar:last-child { border-bottom: 1px solid rgba(95,111,82,.15); }
.pillar-n { font-family: var(--serif); font-size: 30px; font-weight: 300; color: var(--dourado); line-height: 1; }
.pillar h3 { font-family: var(--caps); font-size: clamp(17px,4vw,22px); color: var(--salvia); letter-spacing: .06em; margin-bottom: 8px; }
.pillar p { font-size: 15px; color: var(--marrom-dk); line-height: 1.7; }

/* ============================================
   SERVIÇOS
   ============================================ */
.s-servicos { padding: 90px 0; background: var(--cru); }
.service-grid { display: grid; grid-template-columns: 1fr; gap: 1px; border: 1px solid rgba(95,111,82,.18); background: rgba(95,111,82,.18); }
.service-card { background: var(--cru); padding: 32px 24px; }
.service-tag { display: inline-block; font-family: var(--caps); font-size: 10px; letter-spacing: .28em; color: var(--marrom); margin-bottom: 14px; }
.service-card h3 { font-family: var(--serif); font-size: clamp(20px,4.5vw,27px); font-style: italic; color: var(--salvia); margin-bottom: 10px; }
.service-card p { font-size: 15px; color: var(--marrom-dk); line-height: 1.7; }

/* ============================================
   CTA
   ============================================ */
.s-cta { padding: 100px 0; background: var(--salvia); color: var(--cru); overflow: hidden; position: relative; }
.s-cta::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(45deg,transparent,transparent 40px,rgba(243,239,231,.03) 40px,rgba(243,239,231,.03) 41px); }
.cta-display { font-family: var(--serif); font-size: clamp(34px,9vw,68px); font-weight: 300; line-height: 1.05; margin-bottom: 20px; }
.cta-display em { font-family: var(--script); font-style: normal; color: var(--dourado); font-size: 1.1em; }
.cta-sub { font-style: italic; font-size: clamp(15px,3vw,18px); color: var(--salvia-cl); max-width: 42ch; line-height: 1.6; margin-bottom: 32px; }
.cta-btns { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.btn { display: inline-flex; align-items: center; justify-content: center; font-family: var(--caps); font-size: 12px; letter-spacing: .28em; padding: 13px 28px; border-radius: 2px; min-width: 210px; transition: transform .25s, background .25s, color .25s; }
.btn--gold { background: var(--dourado); color: var(--marrom-dk); }
.btn--gold:hover { background: var(--cru); transform: translateY(-1px); }
.btn--ghost { border: 1px solid var(--salvia-cl); color: var(--cru); }
.btn--ghost:hover { background: var(--cru); color: var(--salvia); border-color: var(--cru); }

/* ============================================
   FOOTER
   ============================================ */
.footer { background: var(--marrom-dk); color: var(--cru); padding: 48px 0 36px; }
.footer-inner { display: flex; flex-direction: column; gap: 20px; }
.footer__logo { height: 64px; width: auto; margin-bottom: 10px; }
.footer-handle { font-family: var(--caps); font-size: 11px; letter-spacing: .2em; opacity: .6; margin-top: 4px; }
.footer-sub { font-family: var(--caps); font-size: 11px; letter-spacing: .2em; opacity: .4; margin-top: 2px; }
.footer-copy { font-family: var(--caps); font-size: 10px; letter-spacing: .18em; opacity: .5; }

/* ============================================
   REVEAL
   ============================================ */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ============================================
   TABLET+ 768px — vídeo fullscreen como antes
   ============================================ */
@media (min-width: 768px) {
  .nav__links { display: flex; }
  .nav__burger { display: none; }
  .nav__logo-img { height: 80px; width: 80px; }

  /* Desktop: hero normal 100vh, autoplay */
  .hero__track { height: 100vh; }
  .hero__stage {
    display: block;
    background: #fff;
  }

  /* Esconde zona superior mobile */
  .hero__top { display: none; }

  /* Vídeo ocupa 100% da tela */
  .hero__video-wrap {
    position: absolute; inset: 0;
  }
  .hero__video {
    object-position: center center;
  }

  /* Véu desktop: topo forte + borda inferior */
  .hero__video-veil {
    background: linear-gradient(
      180deg,
      rgba(243,239,231,.92)  0%,
      rgba(243,239,231,.5)  18%,
      rgba(243,239,231,.0)  36%,
      rgba(243,239,231,.0)  72%,
      rgba(243,239,231,.85) 100%
    );
  }

  /* Brand desktop: sobreposto ao vídeo, centralizado no topo */
  .hero__brand-desktop {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    position: absolute; top: 0; left: 0; right: 0;
    padding-top: 80px;
    text-align: center; z-index: 2;
    animation: fadeUpSimple .9s ease .3s both;
  }
  .hero__escrita--desktop {
    width: clamp(420px, 44vw, 700px);
    height: auto;
  }
  .hero__brand-desktop .hero__rule { width: 56px; height: 1px; background: var(--dourado); margin: 16px 0 6px; }
  .hero__brand-desktop .hero__tagline {
    font-family: var(--caps); font-weight: 300;
    font-size: clamp(10px,1.8vw,12px); letter-spacing: .28em; color: var(--marrom);
  }

  /* Hint desktop: rodapé do hero */
  .hero__hint {
    top: auto;
    bottom: max(28px, env(safe-area-inset-bottom));
    animation: bob 2.2s ease-in-out 2s infinite;
  }

  /* Seções */
  .s-manifesto { padding: 140px 0 110px; }
  .s-valores { padding: 120px 0; }
  .pillar { grid-template-columns: 80px 1fr 1.3fr; }
  .pillar h3 { grid-column: 2; }
  .pillar p  { grid-column: 3; }
  .s-servicos { padding: 120px 0; }
  .service-grid { grid-template-columns: 1fr 1fr; }
  .service-card { padding: 44px 36px; }
  .s-cta { padding: 130px 0; }
  .cta-btns { flex-direction: row; gap: 16px; }
}


/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}
