/* Hórus — theme tokens + page markup. The mechanism lives in scrollcraft.css;
   nothing here touches .sc-stage, .sc-copy or any [data-sc-*] selector. */

:root {
  /* Pure black, not the usual off-black floor: the generated plates this
     page is built around (source-assets/) render on a true #000 ground. */
  --sc-canvas:      #000000;
  --sc-surface:     #0c0f0d;
  --sc-ink:         #f1f4f3;
  --sc-ink-soft:    #8fa19c;
  --sc-accent:      #2ee6a4;
  --sc-accent-ink:  #052016;

  --sc-font-display: "Space Grotesk", system-ui, sans-serif;
  --sc-font-text:    "Geist", system-ui, sans-serif;

  /* Scaled down from the engine default (3xl maxed at 5rem) -- every heading
     on the page uses --lg, and at the original size it read heavy/blocky
     next to how little text each beat carries now. ~75% of the stock ramp. */
  --sc-t-2xl: clamp(1.7rem, 1.35rem + 1.8vw, 2.6rem);
  --sc-t-3xl: clamp(2.15rem, 1.6rem + 3vw, 3.75rem);
}

/* ---------------------------------------------------------------- brand -- */
.site-bar {
  position: fixed; inset: 0 0 auto 0; z-index: var(--sc-z-chrome);
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--sc-4) var(--sc-gutter);
  pointer-events: none;
}
.site-bar > * { pointer-events: auto; }
.brand { display: inline-flex; align-items: center; gap: var(--sc-2); text-decoration: none; }
.brand__logo { height: 28px; width: auto; display: block; }
.brand__logo--sm { height: 20px; }
.cta {
  display: inline-flex; align-items: center; gap: var(--sc-2);
  font-family: var(--sc-font-text); font-weight: 500;
  font-size: var(--sc-t-sm); letter-spacing: var(--sc-track-normal);
  color: var(--sc-accent-ink); background: var(--sc-accent);
  padding: 0.7rem 1.25rem; border-radius: var(--sc-r-pill);
  text-decoration: none; white-space: nowrap;
  /* Invisible everywhere the page is black; the one place it earns its
     keep is the fixed header's CTA sitting over the green footer, where
     an accent-on-accent button would otherwise lose its own edge. */
  border: 1px solid color-mix(in oklab, var(--sc-accent-ink) 35%, transparent);
  box-shadow: var(--sc-e1);
  transition: transform var(--sc-d-fast) var(--sc-ease-out), box-shadow var(--sc-d-fast) var(--sc-ease-out);
}
.cta:hover {
  box-shadow: var(--sc-e2), 0 0 0 1px color-mix(in oklab, var(--sc-accent) 60%, transparent);
  transform: scale(1.025);
}
.cta:active { transform: scale(0.97); }
.cta:focus-visible { outline-offset: 3px; }

/* -------------------------------------------------------------- emphasis -- */
/* The one-word punch inside a headline: same face, bold + italic, accent
   colour. Plain markup, not kinetic -- data-sc-kinetic rebuilds an element
   from its own textContent, which would flatten this span back to plain
   text. Use on at most the one or two headlines that want the beat. */
.sc-emph { font-weight: 700; font-style: italic; color: var(--sc-accent); }

/* --------------------------------------------------------- copy rhythm -- */
/* .sc-lede/.sc-body ship with margin:0 and sit flush under the heading.
   Fine when a stack only has one line of body copy; cramped once the
   heading itself is doing real work. A clear step down in both size and
   air reads as hierarchy instead of a paragraph that forgot to wrap. */
.sc-copy > * + * { margin-top: var(--sc-2); }
.sc-copy > :is(h1,h2) + * { margin-top: var(--sc-5); }
.sc-lede { font-size: var(--sc-t-base); }

/* ------------------------------------------------------------- ken burns -- */
/* The slow push-in every poster gets in place of real scrub motion until a
   clip exists for that act (or permanently, for acts that never get one).
   Driven by script.js reading the closest act's own --sc-p each frame. */
.kb { transform: scale(1.0); transform-origin: 50% 50%; will-change: transform; }

/* ------------------------------------------------------------------ hero -- */
.hero-stage { background: var(--sc-canvas); }
.hero-stage .sc-copy--lead { max-width: min(40rem, 76vw); }
/* The engine's lead scrim measured 3.02:1 (thin, not a hard fail, but the
   eyebrow is small type and wants the full 4.5:1) against this specific
   plate's bright rim. A touch more density in the near stops only. */
.hero-stage .sc-scrim--lead {
  background: linear-gradient(to top right,
    color-mix(in oklab, var(--sc-canvas) 97%, transparent) 0%,
    color-mix(in oklab, var(--sc-canvas) 82%, transparent) 30%,
    color-mix(in oklab, var(--sc-canvas) 36%, transparent) 52%,
    transparent 72%);
}

/* --------------------------------------------------------------- jornada -- */
/* The single take: one scrub act carries Reconhecimento, Tensão, Virada and
   all four camadas as cued copy blocks over one continuous video. Every
   lead-position block shares this max-width; .tension keeps its own flex
   column (imported below) for the staggered argument lines. */
.jornada-stage { background: var(--sc-canvas); }
.jornada-copy { max-width: min(36rem, 74vw); }
/* The take runs far brighter at its peaks (white bursts, tesseract edges)
   than any static poster this page used before, measured contrast failures
   down to 1:1 under the engine's stock scrims. Both get the same stronger
   near-stops the mobile overrides below already proved out. */
.jornada-stage .sc-scrim--lead {
  background: linear-gradient(to top right,
    color-mix(in oklab, var(--sc-canvas) 97%, transparent) 0%,
    color-mix(in oklab, var(--sc-canvas) 88%, transparent) 30%,
    color-mix(in oklab, var(--sc-canvas) 55%, transparent) 52%,
    transparent 74%);
}
.jornada-stage .sc-scrim--core {
  background: radial-gradient(62% 62% at 50% 48%,
    color-mix(in oklab, var(--sc-canvas) 97%, transparent) 0%,
    color-mix(in oklab, var(--sc-canvas) 85%, transparent) 45%,
    transparent 82%);
}
/* These two drive opacity straight off --sc-p in plain CSS instead of
   data-sc-cue: the verify pass hides every [data-sc-cue] element before it
   photographs the bare background, so a cued scrim is invisible to its own
   contrast check -- strengthen it and the reported number never moves. */
.jornada-scrim-lead {
  opacity: clamp(0, calc(1 - max(var(--sc-p) - 0.94, 0) * 16), 1);
}

/* --------------------------------------------------------------- tension -- */
.tension-stage { background: var(--sc-canvas); }
.tension { display: flex; flex-direction: column; gap: var(--sc-5); max-width: min(42rem, 78vw); }
.tension-close { color: var(--sc-ink); font-weight: 500; }
.tension-close .sc-split__i { color: var(--sc-accent); }

/* --------------------------------------------------------- core scrim -- */
/* The engine's own vignette scrim darkens the EDGES and stays transparent
   in the centre 40% -- the wrong shape for centre-anchored copy over a
   bright still (the peak image's blown-out explosion core sits exactly
   under the text, and the harness measured 1.07:1 there before this). */
.sc-scrim--core {
  background: radial-gradient(58% 58% at 50% 48%,
    color-mix(in oklab, var(--sc-canvas) 93%, transparent) 0%,
    color-mix(in oklab, var(--sc-canvas) 68%, transparent) 45%,
    transparent 80%);
}

/* ------------------------------------------------------------------ peak -- */
.peak-stage { background: var(--sc-canvas); }
.peak-copy { text-align: center; }
.peak-copy .sc-display { max-width: 24ch; margin-inline: auto; }
.peak-copy .sc-body { max-width: 34ch; margin: var(--sc-4) auto 0; color: var(--sc-ink-soft); }

/* --------------------------------------------------------- method layers -- */
.layer-stage { background: var(--sc-canvas); }
.layer-stage .sc-copy--lead { max-width: min(36rem, 74vw); }

.layer-intro {
  display: flex; flex-direction: column; gap: var(--sc-7); align-items: center;
  text-align: center;
}
.layer-intro figure { margin: 0; width: 100%; max-width: 56rem; }
.layer-intro img { width: 100%; height: auto; border-radius: var(--sc-r-lg); display: block; }
.layer-intro--core figure { max-width: 34rem; }

.layer-split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sc-9); align-items: center; }
.layer-split--right { direction: rtl; }
.layer-split--right > * { direction: ltr; }
.layer-split figure { margin: 0; }
.layer-split img { width: 100%; height: auto; border-radius: var(--sc-r-lg); display: block; }
@media (max-width: 860px) {
  .layer-split { grid-template-columns: 1fr; }
  .layer-split--right { direction: ltr; }
}

/* ------------------------------------------------------------- transição -- */
.transition-stage { background: var(--sc-canvas); }

/* --------------------------------------------------------- media section -- */
.sc-section--media { position: relative; overflow: hidden; }
.section-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 0;
}
.sc-section--media .sc-scrim { z-index: 1; }
.sc-section--media .sc-wrap { position: relative; z-index: 2; }
.sc-section--media .sc-stack { max-width: 42rem; }

/* ------------------------------------------------------------------ close -- */
.close { display: flex; align-items: center; justify-content: center; background: var(--sc-canvas); }
.close .sc-stage__poster { opacity: 0.85; }
.close__inner {
  position: relative; z-index: 2;
  text-align: center; max-width: 38rem; padding-inline: var(--sc-gutter);
  display: flex; flex-direction: column; align-items: center; gap: var(--sc-5);
}
.close__sub { color: var(--sc-ink-soft); max-width: 36ch; }
.close .cta { font-size: var(--sc-t-base); padding: 0.9rem 1.8rem; }
.foot {
  position: absolute; inset: auto 0 0 0; z-index: 2;
  display: flex; justify-content: space-between; align-items: center;
  padding: var(--sc-5) var(--sc-gutter);
  font-size: var(--sc-t-xs); color: var(--sc-ink-soft);
}

@media (max-width: 860px) {
  .close__inner { gap: var(--sc-5); }
  .foot { flex-direction: column; gap: var(--sc-2); align-items: flex-start; }

  /* Corner scrims degrade gracefully in theory once copy goes full-width
     below 860px, but in practice the Ken Burns zoom can still walk a
     bright patch of these specific plates right under the text at some
     scroll position -- the harness measured real failures (down to
     1.2:1), not just thin readings, at phone width. Converting every
     variant to one strong bottom-up band removes the geometry mismatch
     instead of chasing it plate by plate. */
  .sc-scrim--lead, .sc-scrim--band {
    background: linear-gradient(to top,
      color-mix(in oklab, var(--sc-canvas) 97%, transparent) 0%,
      color-mix(in oklab, var(--sc-canvas) 90%, transparent) 32%,
      color-mix(in oklab, var(--sc-canvas) 60%, transparent) 58%,
      transparent 78%);
  }
  .sc-scrim--core {
    background: radial-gradient(72% 72% at 50% 48%,
      color-mix(in oklab, var(--sc-canvas) 96%, transparent) 0%,
      color-mix(in oklab, var(--sc-canvas) 80%, transparent) 48%,
      transparent 82%);
  }

  /* This title greets (full opacity from p=0, before the Ken Burns zoom has
     moved at all) and sits topmost in a five-line stack, the part of the
     band above with the least density. The gradient fix above still left
     one measured frame under 3:1 on this specific plate's bright rim, and
     a text-shadow does not change the flat foreground-vs-background ratio
     a contrast audit actually checks. A tight solid backdrop behind the
     headline itself is the only fix that is correct regardless of what
     the image under it is doing. */
  .tension h2 {
    display: inline-block;
    background: color-mix(in oklab, var(--sc-canvas) 82%, transparent);
    padding: 0.5em 0.65em;
    margin-inline: -0.65em;
    border-radius: var(--sc-r-md);
  }
}

/* ------------------------------------------------------------- founders -- */
.founders .sc-stage { background: var(--sc-canvas); }
.founder-rail {
  display: flex; align-items: center;
  height: 100%;
  gap: var(--sc-9);
  padding-inline: var(--sc-gutter);
}
.founder-intro, .founder-card, .founder-outro { flex: none; }
.founder-intro { width: min(28rem, 72vw); }
.founder-intro h2 { margin-top: var(--sc-4); }
.founder-card {
  width: min(23rem, 72vw);
  display: flex; flex-direction: column; gap: var(--sc-2);
}
.founder-outro {
  width: min(26rem, 72vw);
}
.founder-outro .sc-body {
  font-size: var(--sc-t-lg); color: var(--sc-ink); text-wrap: balance;
}
.founder-card__frame {
  display: block; width: 100%; aspect-ratio: 4 / 5;
  overflow: hidden; border-radius: var(--sc-r-lg);
  margin-bottom: var(--sc-3);
}
.founder-card__photo {
  width: 100%; height: 100%; object-fit: cover; display: block;
  filter: grayscale(1);
}
/* Foto do Fernando vinha mais aberta que as outras — zoom p/ igualar o
   tamanho do rosto nos três. O frame acima recorta o excedente. */
.founder-card[data-founder="2"] .founder-card__photo {
  transform: scale(1.14); transform-origin: center 30%;
}
.founder-card h3 { margin-top: 0; }
.founder-card .sc-body { margin-top: var(--sc-1); color: var(--sc-ink-soft); }

/* A rail reads as a slideshow unless items arrive in sequence instead of all
   at once. initPanSettle() (script.js) writes --settle per card from the
   act's own --sc-p; the intro is exempt, it has to be there on arrival. */
@media (prefers-reduced-motion: no-preference) {
  .founder-card {
    opacity: calc(0.55 + 0.45 * var(--settle, 1));
    transform: translateY(calc((1 - var(--settle, 1)) * 1.2rem));
  }
}

@media (max-width: 860px) {
  .founder-rail { gap: var(--sc-7); }
  .founder-intro, .founder-card { width: min(20rem, 78vw); }
}

/* -------------------------------------------------------- site footer -- */
/* The one deliberate break from the pure-black ground: a bright accent
   field to close the page on a different register than everything above
   it, instead of fading the dark tone out. Dark ink text/links throughout,
   same contract as the accent CTA button already uses. */
.site-footer {
  background: var(--sc-accent);
  color: var(--sc-accent-ink);
  padding-block: var(--sc-9) var(--sc-6);
}
.site-footer a { color: var(--sc-accent-ink); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer .sc-label { color: color-mix(in oklab, var(--sc-accent-ink) 68%, transparent); }
.brand__logo--footer { height: 24px; align-self: flex-start; }

.site-footer__grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: var(--sc-7);
  padding-block-end: var(--sc-7);
  border-bottom: 1px solid color-mix(in oklab, var(--sc-accent-ink) 20%, transparent);
}
.site-footer__brand { display: flex; flex-direction: column; gap: var(--sc-3); }
.site-footer__tagline { max-width: 28ch; color: color-mix(in oklab, var(--sc-accent-ink) 75%, transparent); }
.site-footer__nav, .site-footer__contact { display: flex; flex-direction: column; gap: var(--sc-2); }
.site-footer__nav a, .site-footer__contact a { font-size: var(--sc-t-base); }
.site-footer__social { display: flex; gap: var(--sc-4); margin-top: var(--sc-1); }

.site-footer__legal {
  padding-block-start: var(--sc-5);
  font-size: var(--sc-t-xs);
  color: color-mix(in oklab, var(--sc-accent-ink) 65%, transparent);
}

@media (max-width: 860px) {
  .site-footer__grid { grid-template-columns: 1fr; gap: var(--sc-6); }
}

/* ------------------------------------------------------- diagnósticos -- */
/* Quatro verticais, grid calmo de cards sobre a superfície elevada. Mesma
   família de tokens do resto da página; o reveal vem do data-sc-in. */
.diag-head { max-width: 46rem; margin-bottom: var(--sc-8, 3rem); }
.diag-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sc-5, 1.25rem);
}
.diag-card {
  padding: var(--sc-6, 1.75rem);
  border-radius: var(--sc-r-lg, 16px);
  /* leve tinta verde no canto + borda com acento — tira o preto chapado e
     alinha com o brilho da animação. */
  background: linear-gradient(155deg,
    color-mix(in oklab, var(--sc-accent) 9%, var(--sc-surface)) 0%,
    var(--sc-surface) 58%);
  border: 1px solid color-mix(in oklab, var(--sc-accent) 22%, transparent);
  box-shadow: inset 0 1px 0 color-mix(in oklab, var(--sc-accent) 10%, transparent);
  display: flex; flex-direction: column; gap: var(--sc-2, 0.5rem);
}
.diag-card h3 { margin: 0; }
.diag-card .sc-body { margin: 0; color: var(--sc-ink-soft); }
@media (max-width: 860px) {
  .diag-grid { grid-template-columns: 1fr; }
}

/* ----------------------------------------------------- cadeia de valor -- */
/* Cobre os cards embutidos no vídeo (trilhos finais) e os substitui pelos
   nossos: a cadeia de valor, com Estratégia no centro de uma grade 3x3.
   A opacidade sobe com --sc-p (progresso do scrub) na janela dos trilhos;
   o backdrop é escuro o bastante para esconder as palavras do vídeo. */
.vc-overlay {
  position: absolute; inset: 0; z-index: 4;
  display: grid; place-items: center;
  padding: var(--sc-7) var(--sc-gutter);
  pointer-events: none;
  /* 0 até o fim do beat "método" (0.78); cheio em 0.82, logo antes de os
     cards do vídeo aparecerem (~0.83) — cobre as palavras embutidas. */
  opacity: clamp(0, (var(--sc-p, 0) - 0.78) * 25, 1);
}
.vc-overlay .vc-inner > *,
.vc-overlay .vc-node { pointer-events: auto; }
.vc-backdrop {
  position: absolute; inset: 0;
  background:
    radial-gradient(95% 95% at 50% 50%,
      color-mix(in oklab, var(--sc-canvas) 97%, transparent) 0%,
      var(--sc-canvas) 55%);
}
.vc-inner {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: var(--sc-4);
  text-align: center; max-width: 52rem;
}
.vc-title { max-width: 22ch; }
.vc-lede { color: var(--sc-ink-soft); max-width: 42ch; margin: 0; }
.vc-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sc-4); width: min(54rem, 94vw); margin-top: var(--sc-4);
}
.vc-node {
  display: grid; place-items: center; text-align: center;
  padding: var(--sc-5) var(--sc-4);
  border-radius: var(--sc-r-md, 12px);
  border: 1px solid color-mix(in oklab, var(--sc-accent) 34%, transparent);
  background: linear-gradient(155deg,
    color-mix(in oklab, var(--sc-accent) 15%, var(--sc-surface)) 0%,
    color-mix(in oklab, var(--sc-surface) 90%, transparent) 62%);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  font-family: var(--sc-font-display); font-weight: 600;
  font-size: var(--sc-t-base); color: var(--sc-ink);
  letter-spacing: var(--sc-track-normal);
}
.vc-node--core {
  background: var(--sc-accent); color: var(--sc-accent-ink);
  border-color: var(--sc-accent); font-weight: 700;
  font-size: var(--sc-t-lg);
  box-shadow: 0 0 28px color-mix(in oklab, var(--sc-accent) 45%, transparent);
}
@media (max-width: 860px) {
  .vc-node { padding: var(--sc-3) var(--sc-1); font-size: var(--sc-t-xs); }
  .vc-grid { gap: var(--sc-2); }
}

/* --- montagem da cadeia de valor: cards vêm de fora e se encaixam ------- */
/* Dirigido pelo scroll (--sc-p), em sequência (stagger por --i). O backdrop
   já cobriu o vídeo; aqui os cards voam das bordas até a célula da grade.
   Estratégia (centro) chega primeiro; os demais varrem de dentro pra fora.
   Só com movimento permitido — em reduced-motion a grade aparece estática. */
@media (prefers-reduced-motion: no-preference) {
  .vc-node {
    --dx: 0rem; --dy: 0rem;
    /* sincronizado: todos os blocos chegam juntos (sem stagger), e rápido. */
    --p: clamp(0, (var(--sc-p, 1) - 0.80) * 20, 1);
    transform:
      translate(calc(var(--dx) * (1 - var(--p))), calc(var(--dy) * (1 - var(--p))))
      scale(calc(0.86 + 0.14 * var(--p)));
    opacity: var(--p);
    will-change: transform, opacity;
  }
  .vc-node:nth-child(1) { --i: 2; --dx: -9rem;  --dy: -7rem; } /* Operações  ↖ */
  .vc-node:nth-child(2) { --i: 3; --dx: 0rem;   --dy: -9rem; } /* Marketing  ↑ */
  .vc-node:nth-child(3) { --i: 4; --dx: 9rem;   --dy: -7rem; } /* Vendas     ↗ */
  .vc-node:nth-child(4) { --i: 2; --dx: -11rem; --dy: 0rem;  } /* Pessoas    ← */
  .vc-node:nth-child(5) { --i: 0; --dx: 0rem;   --dy: 0rem;  } /* Estratégia (centro, chega 1º) */
  .vc-node:nth-child(6) { --i: 3; --dx: 11rem;  --dy: 0rem;  } /* Logística  → */
  .vc-node:nth-child(7) { --i: 4; --dx: -9rem;  --dy: 7rem;  } /* Finanças   ↙ */
  .vc-node:nth-child(8) { --i: 5; --dx: 0rem;   --dy: 9rem;  } /* Atendimento ↓ */
  .vc-node:nth-child(9) { --i: 6; --dx: 9rem;   --dy: 7rem;  } /* Tecnologia ↘ */
}

/* --- entrada mais suave do Compromisso depois das verticais ------------ */
/* O bloco das verticais termina em preto e o Compromisso trazia a imagem
   de forma seca. A máscara faz a imagem (e o loop) SURGIREM do preto no
   topo e sumirem no rodapé, costurando a transição sem corte duro. */
.close .sc-stage__poster {
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 15%, #000 88%, transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0%, #000 15%, #000 88%, transparent 100%);
}

/* --- etapas: produtos do diagnóstico (pills) + etapa 3 centrada --------- */
.step-deliverables {
  list-style: none; padding: 0; margin: var(--sc-5) 0 0;
  display: flex; flex-wrap: wrap; gap: var(--sc-2);
}
.step-deliverables li {
  font-family: var(--sc-font-text); font-weight: 500;
  font-size: var(--sc-t-sm); color: var(--sc-ink);
  padding: 0.42rem 0.95rem; border-radius: var(--sc-r-pill);
  border: 1px solid color-mix(in oklab, var(--sc-accent) 34%, transparent);
  background: color-mix(in oklab, var(--sc-accent) 10%, var(--sc-surface));
}
/* Etapa 3 não tem foto própria ainda — bloco centrado, fecha o processo. */
.step-solo {
  max-width: 44rem; margin-inline: auto; text-align: center;
  align-items: center;
}
