/* =========================================================
   TERRAI — Design tokens
   Paleta extraída da logo (espresso + ouro) e do feed
   (papel areia, linhas bege, fotografia em hora dourada).
   ========================================================= */
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 100 300; font-display: swap; src: url("../fonts/montserrat-300.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: italic; font-weight: 100 400; font-display: swap; src: url("../fonts/montserrat-300-italic.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/montserrat-400.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 500 700; font-display: swap; src: url("../fonts/montserrat-500.woff2") format("woff2"); }

:root {
  /* Base — Design System Terrai v3 (24/11/2026) */
  --paper:      #EDECDD;   /* Areia */
  --paper-2:    #F6F5EE;   /* Areia clara (painel alternado) */
  --sand:       #D9D4BE;   /* linhas finas sobre areia */
  --espresso:   #391E1D;   /* Terra */
  --espresso-2: #2A1615;   /* Terra profunda */
  --ink:        #391E1D;   /* texto principal: Terra (12,8:1 na Areia) */
  --ink-soft:   #6B5552;   /* texto secundário (5,8:1) */
  --terracota:  #7A3636;
  --coral:      #FF5E42;
  --mar:        #98CACB;

  /* Ouro oficial: chapado, nunca metálico */
  --gold-light: #C99B58;   /* ouro sobre Terra */
  --gold:       #B87A30;   /* ouro sobre Areia */
  --bronze:     #7A3636;   /* texto pequeno de destaque sobre Areia: Terracota (7,3:1) */
  --gold-text:  var(--gold);
  --gold-grad:  linear-gradient(var(--gold-text), var(--gold-text));

  /* Tipografia: uma família só, Montserrat */
  --font-display: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --font-body:    "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --font-accent:  "Montserrat", "Helvetica Neue", Arial, sans-serif;

  /* Espaço */
  --gutter: clamp(20px, 4vw, 64px);
  --rail:   clamp(30px, 2vw + 22px, 52px); /* faixa reservada às linhas laterais */
  --edge:   calc(var(--gutter) + var(--rail) * .6);
  --nav-h:  clamp(72px, 9vh, 96px);

  /* Movimento */
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-io:  cubic-bezier(.65, 0, .35, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 300 1rem/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--bronze); outline-offset: 4px; border-radius: 2px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; top: 12px; left: 12px; z-index: 100;
  padding: 10px 16px; background: var(--espresso); color: var(--paper);
  transform: translateY(-200%); transition: transform .2s;
}
.skip-link:focus { transform: none; }

/* =========================================================
   Botões
   ========================================================= */
.btn {
  display: inline-flex; align-items: center; gap: 14px;
  min-height: 48px; padding: 0 28px;
  font: 400 .78rem/1 var(--font-body);
  letter-spacing: .22em; text-transform: uppercase;
  cursor: pointer;
  transition: background-color .3s var(--ease-out), color .3s var(--ease-out),
              border-color .3s var(--ease-out), gap .3s var(--ease-out);
}
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.btn--solid { background: var(--espresso); color: var(--paper); }
.btn--solid:hover { background: var(--espresso-2); gap: 20px; }
.btn--ghost { border: 1px solid rgba(57, 30, 29, .28); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.btn--link {
  padding: 0 4px; color: var(--ink);
  background: linear-gradient(currentColor, currentColor) left calc(50% + 12px) / 100% 1px no-repeat;
}
.btn--link:hover { background-size: 30% 1px; color: var(--bronze); }

/* =========================================================
   Navegação
   ========================================================= */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--nav-h);
  display: flex; align-items: center; gap: 40px;
  padding: 0 var(--gutter) 0 var(--edge);
  transition: background-color .4s var(--ease-out), box-shadow .4s var(--ease-out), height .4s var(--ease-out);
}
.nav.is-scrolled {
  height: 68px;
  background: rgba(237, 236, 221, .88);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(57, 30, 29, .08);
}

.brand { display: flex; align-items: center; gap: 14px; margin-right: auto; }
.brand__mark { width: 60px; height: 37px; flex: none; color: var(--gold); transition: color .4s var(--ease-out); }
.brand__rule { width: 1px; height: 30px; flex: none; background: currentColor; opacity: .35; }
.brand__text { display: flex; flex-direction: column; gap: 5px; }
.brand__name {
  font: 300 1.12rem/1 var(--font-display);
  letter-spacing: .55em; margin-right: -.55em;
}
.brand__i, .footer__i { color: var(--gold); }
.brand__tag {
  font: 400 .52rem/1 var(--font-body);
  letter-spacing: .28em; text-transform: uppercase; color: var(--ink-soft);
}

.nav__links { display: flex; gap: 36px; }
.nav__links a {
  position: relative; padding: 10px 0;
  font: 400 .74rem/1 var(--font-body); letter-spacing: .2em; text-transform: uppercase;
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 1px;
  background: var(--gold); transform: scaleX(0); transform-origin: right;
  transition: transform .4s var(--ease-out);
}
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav__cta { min-height: 44px; padding: 0 22px; font-size: .7rem; }

.nav__toggle {
  display: none; width: 48px; height: 48px; margin-right: -12px;
  border: 0; background: none; cursor: pointer;
  flex-direction: column; justify-content: center; align-items: center; gap: 7px;
}
.nav__toggle-bar { width: 26px; height: 1px; background: var(--ink); transition: transform .35s var(--ease-out); }
.nav__toggle[aria-expanded="true"] .sr-only + .nav__toggle-bar { transform: translateY(4px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] .nav__toggle-bar:last-of-type  { transform: translateY(-4px) rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: 40;
  background: var(--paper);
  padding: calc(var(--nav-h) + 24px) var(--gutter) 40px;
}
.menu nav { display: flex; flex-direction: column; }
.menu a {
  padding: 18px 0; border-bottom: 1px solid rgba(57, 30, 29, .1);
  font: 300 1.5rem/1.2 var(--font-display); letter-spacing: .14em; text-transform: uppercase;
}
.menu .menu__cta { margin-top: 28px; border: 0; font: 400 .8rem/1 var(--font-body); letter-spacing: .22em; color: var(--bronze); }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end; align-items: center;
  padding: calc(var(--nav-h) + 24px) var(--gutter) clamp(28px, 5vh, 52px);
  color: var(--paper);
  background: var(--espresso);
  isolation: isolate;
  overflow: hidden;
}

/* ----- Sobretítulo (usado em todo o site) ----- */
.eyebrow {
  display: flex; align-items: center; gap: 16px; margin: 0 0 clamp(20px, 4vh, 36px);
  font: 400 .74rem/1 var(--font-body); letter-spacing: .3em; text-transform: uppercase;
  color: var(--bronze);
}
.eyebrow__line { width: 44px; height: 1px; background: var(--gold); }

/* ----- Vídeo em segundo plano ----- */
.hero__video { position: absolute; inset: 0; z-index: -2; }
.hero__video video {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transform: scale(1.06);
  transition: transform 2.4s var(--ease-out);
}
.hero.is-live .hero__video video { transform: none; }
/* sombra só onde há texto: o vídeo continua visível e em destaque */
.hero__shade {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(57, 30, 29, .42) 0%, rgba(57, 30, 29, 0) 18%),
    linear-gradient(to top, rgba(30, 18, 12, .86) 0%, rgba(30, 18, 12, .62) 28%, rgba(30, 18, 12, .22) 52%, rgba(30, 18, 12, 0) 70%);
}

/* ----- Linhas grossas (lateral esquerda) ----- */
.hero__lines {
  position: absolute; left: 0; top: 10%; z-index: 0;
  width: clamp(120px, 24vw, 380px); height: 82%;
  overflow: visible; pointer-events: none;
}
.hero__lines path {
  fill: none; stroke: #C99B58; stroke-width: var(--hl-w, 1.6px); stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 1; stroke-dashoffset: 1;
  filter: drop-shadow(0 2px 10px rgba(30, 18, 12, .18));
}
/* desenhadas junto com o início do vídeo (e de novo a cada volta do vídeo) */
.hero__lines.is-drawing path {
  animation: hl-draw 1.6s var(--ease-io) forwards;
  animation-delay: calc(var(--i) * .09s);
}
.hero__lines.is-static path { stroke-dashoffset: 0; }
@keyframes hl-draw { to { stroke-dashoffset: 0; } }

/* ----- Texto: centralizado na parte inferior ----- */
.hero__copy {
  position: relative; z-index: 1;
  max-width: 880px;
  text-align: center;
  display: flex; flex-direction: column; align-items: center;
}
.hero .eyebrow { color: var(--gold-light); margin-bottom: clamp(16px, 3vh, 28px); }
.hero .eyebrow__line { background: var(--gold-light); opacity: .8; }
.hero__title {
  margin: 0;
  font: 200 clamp(2.4rem, 5vw, 5.2rem)/1.06 var(--font-display);
  letter-spacing: .02em;
  color: var(--paper);
  text-shadow: 0 2px 24px rgba(30, 18, 12, .25);
}
.hero__title .line { display: block; overflow: hidden; padding-bottom: .08em; }
.hero__title .line > span { display: inline-block; }
.hero__title em {
  font: italic 400 1.08em/1 var(--font-accent);
  letter-spacing: 0;
  background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-right: .06em;
}
.hero__lead {
  margin: clamp(16px, 3vh, 26px) 0 0;
  max-width: 56ch;
  font-size: clamp(1rem, 1.1vw, 1.1rem); line-height: 1.7;
  color: rgba(237, 236, 221, .9);
  text-shadow: 0 1px 12px rgba(30, 18, 12, .35);
}
.hero__actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 16px 32px; margin-top: clamp(24px, 4vh, 38px); }
.btn--light { background: var(--paper); color: var(--espresso); }
.btn--light:hover { background: var(--gold-light); gap: 20px; }
.btn--link-light { color: var(--paper); }
.btn--link-light:hover { color: var(--gold-light); }

/* rodapé do hero: local do vídeo + pausar */
.hero__foot {
  position: absolute; right: var(--gutter); bottom: clamp(20px, 4vh, 40px); z-index: 1;
  display: flex; align-items: center; gap: 14px;
}
.hero__place { font: italic 400 1.02rem/1 var(--font-accent); color: rgba(237, 236, 221, .85); }
.hero__play {
  width: 44px; height: 44px; display: grid; place-items: center;
  border: 1px solid rgba(237, 236, 221, .45); border-radius: 50%;
  background: rgba(30, 18, 12, .2); color: var(--paper); cursor: pointer;
  transition: background-color .3s, border-color .3s;
}
.hero__play:hover { background: rgba(237, 236, 221, .15); border-color: var(--paper); }
.hero__play svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.hero__play .i-play { fill: currentColor; stroke: none; display: none; }
.hero__play[aria-pressed="true"] .i-pause { display: none; }
.hero__play[aria-pressed="true"] .i-play { display: block; }

/* nav clara enquanto está sobre o vídeo */
.has-hero .nav:not(.is-scrolled):not(.menu-open) { color: var(--paper); }
.has-hero .nav:not(.is-scrolled):not(.menu-open) .brand__tag { color: rgba(237, 236, 221, .72); }
.has-hero .nav:not(.is-scrolled):not(.menu-open) .brand__mark,
.has-hero .nav:not(.is-scrolled):not(.menu-open) .brand__i { color: var(--gold-light); }
.has-hero .nav:not(.is-scrolled):not(.menu-open) .btn--ghost { border-color: rgba(237, 236, 221, .45); color: var(--paper); }
.has-hero .nav:not(.is-scrolled):not(.menu-open) .btn--ghost:hover { background: var(--paper); color: var(--espresso); }
.has-hero .nav:not(.is-scrolled):not(.menu-open) .nav__toggle-bar { background: var(--paper); }

/* ----- Revelação do texto ----- */
.reveal {
  opacity: 0; transform: translateY(24px);
  animation: rise 1.1s var(--ease-out) forwards;
  animation-delay: calc(.6s + var(--d, 0s));
}
.hero__title .reveal { transform: translateY(105%); opacity: 1; animation-duration: 1.3s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ----- Chamada final e rodapé ----- */
.closing {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: clamp(80px, 14vh, 140px) var(--gutter);
  background: var(--espresso); color: var(--paper);
}
.closing .eyebrow { color: var(--gold-light); }
.closing .eyebrow__line { background: var(--gold-light); }
.closing__title {
  margin: 0 0 clamp(28px, 5vh, 44px); max-width: 18ch; text-wrap: balance;
  font: 200 clamp(2rem, 4vw, 3.6rem)/1.12 var(--font-display); letter-spacing: .02em;
}
.closing__title em {
  font: italic 400 1.08em/1 var(--font-accent); letter-spacing: 0;
  background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.footer {
  display: grid; grid-template-columns: 1fr auto; gap: 24px 40px; align-items: end;
  padding: 40px var(--gutter) 32px var(--edge);
  background: var(--espresso); color: rgba(237, 236, 221, .8);
  border-top: 1px solid rgba(237, 236, 221, .1);
}
.footer__brand { display: flex; flex-direction: column; gap: 8px; }
.footer__name { font: 300 1.1rem/1 var(--font-display); letter-spacing: .55em; color: var(--paper); display: flex; align-items: center; gap: 16px; }
.footer__mark { width: 44px; height: 27px; color: var(--gold-light); flex: none; }
.footer__i { color: var(--gold-light); }
.footer__tag { font: 400 .6rem/1 var(--font-body); letter-spacing: .28em; text-transform: uppercase; }
.footer__links { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.footer__links a { padding: 10px 0; font: 400 .72rem/1 var(--font-body); letter-spacing: .2em; text-transform: uppercase; transition: color .3s; }
.footer__links a:hover { color: var(--gold-light); }
.footer__copy { grid-column: 1 / -1; margin: 0; font-size: .74rem; color: rgba(237, 236, 221, .55); }
@media (max-width: 700px) { .footer { grid-template-columns: 1fr; } }


/* =========================================================
   Responsivo
   ========================================================= */
@media (max-width: 1180px) {
  .nav__links { gap: 24px; }
  .nav__cta { display: none; }
}

@media (max-width: 960px) {
  .nav__links { display: none; }
  .nav__toggle { display: flex; }
  .brand__tag { display: none; }

  .hero__foot { left: var(--gutter); right: var(--gutter); justify-content: space-between; }
  .hero { padding-bottom: 96px; }
  .hero__lines { top: 8%; height: min(28%, 21svh); width: 24vw; --hl-w: 1.2px; }
  .hero__shade { background:
    linear-gradient(to bottom, rgba(57, 30, 29, .4) 0%, rgba(57, 30, 29, 0) 16%),
    linear-gradient(to top, rgba(30, 18, 12, .9) 0%, rgba(30, 18, 12, .72) 38%, rgba(30, 18, 12, .3) 60%, rgba(30, 18, 12, 0) 78%); }
  .hero__title .line { white-space: normal; }
}

@media (max-width: 560px) {
  .hero__actions { width: 100%; }
  .hero__actions .btn--light { width: 100%; justify-content: space-between; }
}
}

/* =========================================================
   Movimento reduzido: estado final imediato
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}

/* Ouro sobre Terra (fundos escuros e foto) */
.hero, .closing, .footer, .intro { --gold-text: var(--gold-light); }

/* Montserrat é mais larga que a fonte anterior: título final em duas linhas limpas */
.closing__title { font-size: clamp(1.8rem, 3.3vw, 3rem); max-width: none; }
.closing__title em { display: block; }
