/* FILE MAP
   file: css/main.css
   site: ACCRETION — Ezon Brand Evolution (variação B da HORIZON SERIES)
   contract: DIRECTIONS-BRAND.md — VARIANCE 8 · MOTION 9 · DENSITY 2
   invariantes: Sora + Montserrat (+ monospace de sistema p/ anotações);
                tokens ezon-partners somente; logos oficiais SVG.
   assinatura: void integral (sem alternância de tema), disco de acreção
               accretion-disk→solar-flare, Pulsar Teal instrumental,
               numerais Sora gigantes, layout assimétrico esparso.
   NENHUM hex fora de css/tokens/ — somente var().
*/
@import "tokens/palette.css";
@import "tokens/semantic.css";

/* ---------- site tokens (deriva, não inventa) ---------- */
:root {
  --font-heading: 'Sora', sans-serif;
  --font-body: 'Montserrat', sans-serif;
  --font-mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --fs-hero: clamp(2.75rem, 1.2rem + 7vw, 6.5rem);
  --fs-giga: clamp(7rem, 3rem + 22vw, 19rem);   /* numerais — herda escala SINGULARITY */
  --fs-h1: clamp(2rem, 1.4rem + 2.6vw, 3.5rem);
  --fs-h2: clamp(1.5rem, 1.2rem + 1.6vw, 2.5rem);
  --fs-lede: clamp(1.0625rem, 1rem + 0.4vw, 1.125rem);
  --fs-body: 1rem;
  --fs-caption: 0.75rem;

  --track-hero: -0.026em;
  --track-h1: -0.027em;
  --track-h2: -0.025em;
  --track-caps: 0.025em;

  --edge: clamp(1.5rem, 6vw, 6.5rem);
  --measure: 34rem;
  --teal: var(--color-pulsar-teal);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--color-event-horizon); /* void puro — assinatura B */
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  line-height: 1.08;
  text-wrap: balance;
}
p { max-width: var(--measure); }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
::selection { background: var(--accent-soft); color: var(--text-primary); }

/* ---------- utilities ---------- */
.mono { /* anotações instrumentais — monospace de sistema (exceção do contrato) */
  font-family: var(--font-mono);
  font-size: var(--fs-caption);
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--teal);
}
.mono b { font-weight: 600; color: var(--color-quasar-cyan); }
.gradient-heat { /* calor do disco: solar-flare → accretion-disk */
  background: linear-gradient(90deg, var(--color-solar-flare) 0%, var(--color-accretion-disk) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem var(--edge);
  transition: background .4s ease, box-shadow .4s ease;
}
.nav.is-scrolled {
  background: color-mix(in srgb, var(--color-event-horizon) 84%, transparent);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--border-subtle);
}
.nav__logo img { height: 26px; width: auto; }
.nav__links { display: flex; gap: 2rem; align-items: center; }
.nav__links a {
  font-size: .875rem; font-weight: 500; color: var(--text-tertiary);
  transition: color .25s ease;
}
.nav__links a:hover { color: var(--text-primary); }
.nav__cta {
  font-weight: 600; font-size: .875rem;
  color: var(--accent-contrast) !important;
  background: var(--accent);
  padding: .6rem 1.25rem; border-radius: 999px;
  transition: background .25s ease, transform .25s ease;
}
.nav__cta:hover { background: var(--accent-strong); transform: translateY(-1px); }
@media (max-width: 720px) { .nav__links a:not(.nav__cta) { display: none; } }

/* ---------- hero (assimétrico: disco alto-direita, texto baixo-esquerda) ---------- */
.hero {
  position: relative; min-height: 100svh;
  display: grid; align-content: end;
  padding: 6rem var(--edge) 5.5rem;
  isolation: isolate; overflow: hidden;
}
.hero__canvas { position: absolute; inset: 0; z-index: -1; }
.hero__hud {
  position: absolute; top: 5.5rem; right: var(--edge);
  display: grid; gap: .5rem; justify-items: end; text-align: right;
}
.hero__content { display: grid; gap: 1.5rem; justify-items: start; max-width: 44rem; }
@media (max-width: 720px) { /* menos ruído sobre o disco no estreito */
  .hero__hud span:nth-child(2), .hero__hud span:nth-child(3) { display: none; }
}
.hero h1 {
  font-size: var(--fs-hero); font-weight: 800;
  letter-spacing: var(--track-hero);
}
.hero__lede { font-size: var(--fs-lede); color: var(--text-secondary); max-width: 44ch; }

/* ---------- estágios — numerais gigantes ---------- */
.stages {
  display: grid; gap: clamp(6rem, 14vw, 11rem);
  padding: clamp(7rem, 16vw, 12rem) var(--edge);
}
.stage {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  align-items: center; gap: 2rem 4rem;
}
.stage:nth-child(even) { direction: rtl; }
.stage:nth-child(even) > * { direction: ltr; }
.stage__n {
  font-family: var(--font-heading); font-weight: 800;
  font-size: var(--fs-giga); line-height: .82;
  letter-spacing: var(--track-hero);
  justify-self: center;
}
.stage__body { display: grid; gap: 1rem; max-width: var(--measure); }
.stage h2 { font-size: var(--fs-h2); font-weight: 700; letter-spacing: var(--track-h2); }
.stage__data { border-top: 1px solid var(--border-subtle); padding-top: .9rem; margin-top: .5rem; }
@media (max-width: 900px) {
  .stage, .stage:nth-child(even) { grid-template-columns: 1fr; direction: ltr; }
  .stage__n { justify-self: start; }
}

/* ---------- manifesto ---------- */
.manifesto {
  padding: clamp(5rem, 12vw, 9rem) var(--edge);
  border-block: 1px solid var(--border-subtle);
  background: radial-gradient(70% 140% at 88% 50%,
    color-mix(in srgb, var(--color-accretion-disk) 7%, transparent), transparent 70%);
}
.manifesto figure { display: grid; gap: 2rem; justify-items: start; max-width: 56rem; }
.manifesto blockquote {
  font-family: var(--font-heading);
  font-size: var(--fs-h1); font-weight: 700; letter-spacing: var(--track-h1);
  color: var(--text-primary); line-height: 1.15;
  max-width: 24ch; text-wrap: balance;
}
.manifesto em { font-style: normal; }

/* ---------- finale ---------- */
.finale {
  position: relative; min-height: 82svh;
  display: grid; place-items: center; text-align: center;
  padding: 7rem var(--edge);
  isolation: isolate; overflow: hidden;
}
.finale__canvas { position: absolute; inset: 0; z-index: -1; }
.finale__content { display: grid; gap: 1.75rem; justify-items: center; }
.finale h2 {
  font-size: var(--fs-hero); font-weight: 800;
  letter-spacing: var(--track-hero); max-width: 12ch;
}
.finale p { color: var(--text-secondary); max-width: 38ch; }

.btn {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--font-body); font-weight: 600; font-size: 1rem;
  color: var(--accent-contrast); background: var(--accent);
  padding: 1rem 2rem; border-radius: 999px; border: 0; cursor: pointer;
  transition: background .25s ease, transform .25s ease, box-shadow .25s ease;
}
.btn:hover {
  background: var(--accent-strong); transform: translateY(-2px);
  box-shadow: 0 16px 40px -16px rgba(78,205,196,0.45);
}

/* ---------- footer ---------- */
.footer {
  background: var(--surface-footer);
  border-top: 1px solid var(--border-subtle);
  padding: 3.5rem var(--edge) 2.5rem;
  display: grid; gap: 2.5rem;
}
.footer__row { display: flex; justify-content: space-between; align-items: center; gap: 2rem; flex-wrap: wrap; }
.footer__logo img { height: 44px; width: auto; }
.footer__meta { color: var(--text-tertiary); font-size: .8125rem; }
.footer nav { display: flex; gap: 1.5rem; }
.footer nav a { font-size: .875rem; color: var(--text-tertiary); }
.footer nav a:hover { color: var(--text-primary); }

/* ---------- reveal choreography (fail-open: só esconde com html.js) ---------- */
html.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s ease, transform .8s ease; }
html.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html.js .reveal { opacity: 1; transform: none; transition: none; }
}
