:root {
  --bg: #000; --bg-soft: #0B0A08;
  --gold: #C9A96E; --gold-light: #E6D3A3; --gold-dark: #8C7346;
  --text: #F5F1E8; --muted: #A8A196;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Jost", system-ui, sans-serif;
  --metal: linear-gradient(90deg, #6E5A3A 0%, #C9A96E 35%, #F1E2B8 50%, #C9A96E 65%, #6E5A3A 100%);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { background: var(--bg); overflow-x: clip; }
html.lenis, html.lenis body { height: auto; }
body { background: var(--bg); color: var(--text); font: 300 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: clip; }
h1, h2, p { text-wrap: balance; }
a { color: inherit; }

/* ---------- carregando ---------- */
.loader { position: fixed; inset: 0; z-index: 100; background: #000; display: grid; place-content: center; justify-items: center; gap: 18px; transition: opacity .9s ease, visibility .9s; }
.loader.out { opacity: 0; visibility: hidden; }
.loader-o { width: 58px; height: 58px; transform: rotate(-90deg); }
.loader-o circle { fill: none; stroke: rgba(201,169,110,.18); stroke-width: 1.2; }
.loader-o .fill { stroke: var(--gold); stroke-dasharray: 1; stroke-dashoffset: var(--off, 1); transition: stroke-dashoffset .3s ease; filter: drop-shadow(0 0 4px rgba(230,211,163,.6)); }
.loader-txt { font: 300 11px var(--sans); letter-spacing: .6em; text-transform: uppercase; color: var(--muted); padding-left: .6em; }

/* ---------- abertura ---------- */
.abertura { position: relative; }
.stage { position: relative; height: 100vh; height: 100lvh; overflow: hidden; background: #000; }
#seq { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.veil { position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 75% 70% at 50% 50%, transparent 40%, rgba(0,0,0,.55) 100%),
    linear-gradient(to bottom, rgba(0,0,0,.35), transparent 25%, transparent 62%, rgba(0,0,0,.7)); }
.dim { position: absolute; inset: 0; background: #000; opacity: 0; pointer-events: none; }
.grain { position: absolute; inset: -50%; pointer-events: none; opacity: .05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite; }
@keyframes grain { 0%{transform:translate(0,0)} 20%{transform:translate(-3%,2%)} 40%{transform:translate(2%,-3%)} 60%{transform:translate(-2%,-1%)} 80%{transform:translate(3%,3%)} 100%{transform:translate(0,0)} }

.beat { position: absolute; left: 50%; transform: translateX(-50%); text-align: center; pointer-events: none; opacity: 0; width: min(92vw, 1100px); will-change: opacity, transform; }
.kicker { display: block; font: 400 12px var(--sans); letter-spacing: .55em; text-transform: uppercase; color: var(--gold-light); padding-left: .55em; }
.sub { display: block; font: 300 13px var(--sans); letter-spacing: .32em; text-transform: uppercase; color: rgba(245,241,232,.78); padding-left: .32em; }

/* frases do roteiro */
.frase { top: 50%; translate: 0 -50%; display: grid; justify-items: center; gap: .55em; font: 300 clamp(18px, min(2.5vw, 4.4vh), 36px)/1.3 var(--sans); letter-spacing: .16em; padding-left: .16em; text-transform: uppercase; color: var(--text); text-shadow: 0 2px 22px rgba(0,0,0,.85); isolation: isolate; }
.frase span, .frase strong { display: block; text-wrap: balance; }
.frase strong { font-weight: 500; color: var(--gold-light); }
.frase.alto { top: clamp(70px, 15vh, 150px); }
.frase::before { content: ""; position: absolute; inset: -60% -8%; z-index: -1; background: radial-gradient(closest-side, rgba(0,0,0,.6), rgba(0,0,0,.3) 55%, transparent); pointer-events: none; }

/* 00:17 — fundo do KV + logo com as informações gerais (arte oficial em img/) */
.kv { position: absolute; inset: 0; opacity: 0; pointer-events: none; background: url("img/kv.webp") center / cover no-repeat; will-change: opacity, transform; }
.kv::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse 70% 60% at 50% 50%, rgba(0,0,0,.42), rgba(0,0,0,.12) 75%), linear-gradient(to bottom, rgba(0,0,0,.25), transparent 30%, transparent 70%, rgba(0,0,0,.35)); }

/* lockup do header: mesmas proporções da arte (1687×307), peças posicionadas em % */
.beat-final { top: 50%; translate: 0 -50%; width: min(86vw, 1240px); }
.lockup { position: relative; aspect-ratio: 1687 / 307; filter: drop-shadow(0 2px 18px rgba(0,0,0,.45)); }
.pc { position: absolute; display: block; height: auto; opacity: 0; }
.lockup .logo { left: 27.2%; top: 0; width: 46.83%; }
.lockup .setor { left: 0; top: 28.7%; width: 20.75%; }
.lockup .assina { left: 83.7%; top: 32.6%; width: 16.3%; }
.lockup .datas { left: 42.56%; top: 76.5%; width: 16.12%; }
/* a montagem roda cada vez que a tela final aparece */
.show .pc { animation: peca 1.3s cubic-bezier(.2,.7,.2,1) forwards; }
.show .logo { animation-name: logo; animation-duration: 1.6s; }
.show .setor { --dx: -40px; animation-delay: .55s; }
.show .assina { --dx: 40px; animation-delay: .7s; }
.show .datas { --dy: 18px; animation-delay: .95s; }
@keyframes peca { from { opacity: 0; transform: translate(var(--dx, 0), var(--dy, 0)); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes logo { from { opacity: 0; transform: scale(1.08); filter: blur(14px); } to { opacity: 1; transform: none; filter: none; } }
/* brilho que atravessa o logo uma vez */
.lockup::after { content: ""; position: absolute; left: 27.2%; top: 0; width: 46.83%; aspect-ratio: 790 / 179; pointer-events: none; opacity: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(241,226,184,.95) 50%, transparent 65%) -150% 0 / 250% 100% no-repeat;
  -webkit-mask: url("img/logo.png") center / 100% 100% no-repeat; mask: url("img/logo.png") center / 100% 100% no-repeat; }
.show .lockup::after { animation: brilho-logo 1.8s 1.5s ease-in-out forwards; }
@keyframes brilho-logo { 0% { opacity: 1; background-position: -150% 0; } 100% { opacity: 1; background-position: 250% 0; } }

/* dica de rolagem */
.frase .hint { display: grid; justify-items: center; gap: 10px; margin-top: clamp(14px, 3vh, 30px); font: 400 10px var(--sans); letter-spacing: .45em; padding-left: .45em; color: rgba(245,241,232,.72); text-shadow: none; opacity: 0; transition: opacity .8s ease; }
.ready .hint { opacity: 1; transition-delay: 1.4s; }
.ready .hint.off { opacity: 0; transition-delay: 0s; }
.dedo { width: 30px; height: 40px; overflow: visible; }
.dedo path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.dedo .mao { stroke: var(--text); stroke-width: 1.6; animation: desliza 2.2s cubic-bezier(.5,0,.3,1) infinite; }
.dedo .rastro { stroke: var(--gold-light); stroke-width: 1.6; stroke-dasharray: 1; stroke-dashoffset: 1; animation: rastro 2.2s cubic-bezier(.5,0,.3,1) infinite; }
@keyframes desliza { 0%, 15% { transform: translateY(8px); opacity: 0; } 25% { opacity: 1; } 65% { transform: translateY(-6px); opacity: 1; } 85%, 100% { transform: translateY(-6px); opacity: 0; } }
@keyframes rastro { 0%, 30% { stroke-dashoffset: -1; opacity: 0; } 32% { stroke-dashoffset: 1; opacity: .9; } 65% { stroke-dashoffset: 0; opacity: .9; } 85%, 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes desce { 0% { transform: scaleY(0); opacity: 1; } 60% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }

/* trilho de progresso (fino) */
.trilho { position: fixed; right: clamp(16px, 2.4vw, 34px); top: 50%; height: 34vh; translate: 0 -50%; z-index: 20; width: 2px; opacity: 0; transition: opacity .6s; }
.trilho.on { opacity: 1; }
.trilho .linha { position: absolute; inset: 0 0 0 0; width: 1px; background: rgba(201,169,110,.22); }
.trilho .linha b { position: absolute; left: 0; top: 0; width: 1px; height: calc(var(--p, 0) * 100%); background: var(--gold); }
.trilho .bola { position: absolute; left: .5px; top: calc(var(--p, 0) * 100%); width: 12px; height: 12px; translate: -50% -50%; overflow: visible; }
.trilho .bola circle { fill: #000; stroke: var(--gold-light); stroke-width: 1.6; filter: drop-shadow(0 0 4px rgba(241,226,184,.8)); }
.trilho .ponto { position: absolute; right: 14px; translate: 0 -50%; font: 400 9px var(--sans); letter-spacing: .32em; text-transform: uppercase; color: var(--muted); white-space: nowrap; opacity: 0; transition: opacity .4s; cursor: pointer; pointer-events: auto; }
.trilho .ponto::after { content: ""; position: absolute; right: -16px; top: 50%; width: 5px; height: 5px; translate: 0 -50%; border-radius: 50%; background: var(--gold-dark); }
.trilho.rolando .ponto, .trilho:hover .ponto { opacity: 1; }

/* PROVISÓRIO: fim da apresentação até chegarem os próximos capítulos */
.proximo { min-height: 70vh; display: grid; place-content: center; justify-items: center; gap: 16px; text-align: center; padding: 64px 24px; background: var(--bg); border-top: 1px solid transparent; border-image: linear-gradient(90deg, transparent, var(--gold-dark), transparent) 1; }
.proximo-txt { font: 300 clamp(26px, 3.4vw, 44px)/1.2 var(--serif); color: var(--text); max-width: 20ch; }

.rodape { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 22px clamp(16px, 4vw, 48px) calc(22px + env(safe-area-inset-bottom)); font: 400 10px var(--sans); letter-spacing: .25em; text-transform: uppercase; color: rgba(168,161,150,.7); }
.rodape a { text-decoration: none; transition: color .3s; }
.rodape a:hover { color: var(--gold-light); }

/* ---------- celular ---------- */
@media (max-width: 759.98px) {
  .kicker { font-size: 10px; letter-spacing: .42em; padding-left: .42em; }
  .sub { font-size: 10.5px; letter-spacing: .22em; padding-left: .22em; line-height: 1.8; max-width: 30ch; margin: 0 auto; }
  .frase { font-size: clamp(16px, 4.6vw, 20px); letter-spacing: .1em; padding-left: .1em; width: calc(100vw - 40px); }
  .frase.alto { top: calc(12vh + env(safe-area-inset-top)); }
  /* celular: logo, datas, Different air e Setor 8 empilhados */
  .beat-final { width: calc(100vw - 48px); }
  .lockup { aspect-ratio: auto; display: grid; justify-items: center; gap: 26px; }
  .lockup .pc { position: static; }
  .lockup .logo { width: 100%; }
  .lockup .datas { width: 46%; }
  .lockup .assina { width: 44%; }
  .lockup .setor { width: 40%; order: 4; }
  .lockup::after { left: 0; width: 100%; }
  .trilho { right: 10px; height: 26vh; }
  .trilho .ponto { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .grain, .dedo .mao, .dedo .rastro { animation: none; }
  .dedo .rastro { stroke-dashoffset: 0; }
}
