/* ============================================================
   Avedra OS · LP de early access
   Tokens do products/avedra/DESIGN.md §2.1 (contrastes já validados AAA).
   Trilha zero-dependência: nenhuma lib de animação.
   ============================================================ */

/* Famílias oficiais da masterbrand (DESIGN.md §3.1): Figtree conduz o digital.
   Distribuída sob SIL OFL 1.1 — licença em /fonts/OFL-Figtree.txt. */
@font-face { font-family: "Figtree"; src: url("/fonts/Figtree-400.woff2") format("woff2");
             font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("/fonts/Figtree-500.woff2") format("woff2");
             font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("/fonts/Figtree-600.woff2") format("woff2");
             font-weight: 600; font-style: normal; font-display: swap; }
/* fallback com métrica ajustada — evita re-quebra de linha e CLS no swap */
@font-face {
  font-family: "Figtree fallback";
  src: local("Helvetica Neue"), local("Helvetica"), local("Arial");
  size-adjust: 103%;
  ascent-override: 95%;
  descent-override: 24%;
  line-gap-override: 0%;
}

:root {
  --ink:        #0B0B0A;
  --carbon:     #151513;
  --bone:       #F4F0E8;
  --stone:      #A8A39A;
  --surface:    rgba(244, 240, 232, 0.03);
  --surface-2:  rgba(244, 240, 232, 0.05);
  --border:     rgba(244, 240, 232, 0.08);
  --border-hi:  rgba(244, 240, 232, 0.16);
  --radius:     14px;
  --radius-lg:  24px;
  --ease:       cubic-bezier(0.22, 1, 0.36, 1);
  --wrap:       1180px;
  --gutter:     clamp(20px, 5vw, 48px);
  --mono:       ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font-family: "Figtree", "Figtree fallback", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.025em; line-height: 1.06; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.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 {
  position: absolute; left: -9999px; top: 12px; z-index: 99;
  background: var(--bone); color: var(--ink); padding: 12px 18px; border-radius: 10px;
  font-weight: 560; text-decoration: none;
}
.skip:focus { left: 16px; }

:focus-visible { outline: 2px solid var(--bone); outline-offset: 3px; border-radius: 6px; }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--ink) 82%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.head-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 62px; }

/* Lockup oficial: wordmark AVEDRA (lettering, nunca recomposto com fonte) +
   descritor, no padrão .has-wordmark do site institucional. §4.5: sem glow,
   gradiente, contorno ou deformação; área de proteção = altura do A. */
.lockup, .foot-lockup {
  display: flex; align-items: baseline; gap: 9px; text-decoration: none; margin: 0;
}
.lockup img { display: block; width: auto; height: clamp(15px, 1.5vw, 18px); }
.foot-lockup img { display: block; width: auto; height: clamp(20px, 2.4vw, 30px); }
.lockup-descriptor {
  font-style: normal; font-weight: 500; letter-spacing: -0.02em; color: var(--bone);
  font-size: clamp(16px, 1.6vw, 19px);
}
.foot-lockup .lockup-descriptor { font-size: clamp(21px, 2.5vw, 31px); }
.lockup:hover img, .lockup:hover .lockup-descriptor { opacity: 0.82; transition: opacity 200ms var(--ease); }

/* ---------- botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0 24px; border-radius: 999px;
  font-size: 14.5px; font-weight: 560; letter-spacing: 0.01em;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: transform 180ms var(--ease), background-color 180ms var(--ease),
              border-color 180ms var(--ease), color 180ms var(--ease);
}
.btn-solid { background: var(--bone); color: var(--ink); }
.btn-solid:hover { transform: translateY(-1px); background: #fff; }
.btn-ghost { border-color: var(--border-hi); color: var(--bone); background: transparent; }
.btn-ghost:hover { border-color: var(--bone); background: var(--surface-2); }
.btn-block { width: 100%; min-height: 52px; }
.head-cta { min-height: 38px; padding: 0 18px; font-size: 13.5px; }

/* ---------- hero ---------- */
.hero { padding: clamp(56px, 9vw, 104px) 0 clamp(48px, 7vw, 88px); }
.hero-grid {
  display: grid; gap: clamp(40px, 6vw, 72px);
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 940px) { .hero-grid { grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr); } }

/* h1 é o elemento LCP: nunca atrás de reveal, nunca atrás de fade */
.hero-title {
  font-size: clamp(2.5rem, 4.6vw, 4rem);   /* 40px → 64px */
  line-height: 1.02;
  letter-spacing: -0.030em;
  font-weight: 600;
  max-width: 17ch;
}
.hero-sub {
  margin-top: 26px; max-width: 46ch;
  font-size: clamp(1.25rem, 1.5vw, 1.4375rem); color: var(--stone); line-height: 1.55;
}
.hero-actions { margin-top: 34px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.hero-note { font-size: 13px; color: var(--stone); }

/* ---------- herói animado: o card que anda e para no humano ---------- */
.hero-stage { min-height: 340px; }
.flow {
  --u: 58px;                    /* altura de uma etapa — base do translate do card */
  background: linear-gradient(180deg, var(--carbon), color-mix(in srgb, var(--carbon) 60%, var(--ink)));
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 20px 22px 16px;
  box-shadow: 0 30px 70px -40px rgba(0, 0, 0, 0.9);
}
.flow-head { display: flex; align-items: center; gap: 10px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.flow-live {
  width: 7px; height: 7px; border-radius: 50%; background: var(--bone); flex: none;
  animation: live 2.6s var(--ease) infinite;
}
@keyframes live { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }
.flow-name { font-size: 14px; font-weight: 560; }
.flow-meta { margin-left: auto; font-size: 12px; font-weight: 500; letter-spacing: 0.04em; color: var(--stone); }

.flow-track { position: relative; padding: 14px 0 4px; }
.flow-step { position: relative; display: flex; align-items: center; gap: 12px; height: var(--u); }
/* linha vertical ligando as etapas */
.flow-step:not(:last-of-type)::after {
  content: ""; position: absolute; left: 5px; top: calc(50% + 9px);
  width: 1px; height: calc(var(--u) - 18px); background: var(--border-hi);
}
.flow-mark {
  width: 11px; height: 11px; border-radius: 50%; flex: none;
  border: 1px solid var(--border-hi); background: transparent;
  transition: background-color 400ms var(--ease), border-color 400ms var(--ease), box-shadow 400ms var(--ease);
}
.flow-label { font-size: 14.5px; color: var(--stone); transition: color 400ms var(--ease); }
.flow-who {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--stone); border: 1px solid var(--border); border-radius: 999px; padding: 2px 8px;
}
.flow-step.is-done .flow-mark { background: var(--stone); border-color: var(--stone); }
.flow-step.is-done .flow-label { color: color-mix(in srgb, var(--bone) 62%, transparent); }
.flow-step.is-current .flow-mark { background: var(--bone); border-color: var(--bone); }
.flow-step.is-current .flow-label { color: var(--bone); }
.flow-step.is-gate-step.is-current .flow-mark { box-shadow: 0 0 0 5px color-mix(in srgb, var(--bone) 14%, transparent); }
.flow-step.is-gate-step.is-current .flow-who { color: var(--bone); border-color: var(--border-hi); }

/* o card */
.flow-card {
  position: absolute; right: 0; top: 0; width: min(56%, 232px);
  display: flex; flex-direction: column; gap: 3px;
  padding: 12px 14px; border-radius: 12px;
  background: color-mix(in srgb, var(--bone) 7%, var(--carbon));
  border: 1px solid var(--border-hi);
  transform: translateY(calc(var(--i, 0) * var(--u) + 14px));
  transition: transform 600ms var(--ease), opacity 500ms var(--ease), border-color 400ms var(--ease);
  will-change: transform;
}
.flow-card.is-hidden { opacity: 0; }
.flow-card-title { font-size: 13.5px; font-weight: 560; }
.flow-card-state { font-family: var(--mono); font-size: 11px; color: var(--stone); }
.flow-card.is-gate {
  border-color: color-mix(in srgb, var(--bone) 42%, transparent);
  animation: gate-pulse 2.2s var(--ease) infinite;
}
@keyframes gate-pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--bone) 16%, transparent); }
  50%      { box-shadow: 0 0 0 9px color-mix(in srgb, var(--bone) 0%, transparent); }
}
.flow-card.is-gate .flow-card-state { color: var(--bone); }

.flow-foot {
  display: flex; align-items: center; gap: 8px; padding-top: 14px;
  border-top: 1px solid var(--border);
  font-family: var(--mono); font-size: 11.5px; color: var(--stone);
}
.flow-foot-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--stone); }

/* ---------- seções ---------- */
.section { padding: clamp(72px, 10vw, 132px) 0; }
.section-tight { padding-top: 0; }
.section-alt { background: color-mix(in srgb, var(--carbon) 55%, var(--ink)); }

.eyebrow {
  font-size: 13px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--stone); margin-bottom: 20px;
}
.section-title { font-size: clamp(2.125rem, 3.4vw, 3.375rem); line-height: 1.06; letter-spacing: -0.025em; max-width: 20ch; }
.section-sub { margin-top: 22px; max-width: 58ch; color: var(--stone); font-size: 1.04rem; }
.section-sub + .section-sub { margin-top: 16px; }

.tension { padding: clamp(56px, 8vw, 96px) 0; border-block: 1px solid var(--border); }
.tension-line {
  font-size: clamp(1.35rem, 3.1vw, 2.15rem);
  line-height: 1.28; letter-spacing: -0.02em; max-width: 26ch; font-weight: 460;
}

/* ---------- réplicas de UI (DOM, nunca screenshot) ---------- */
.ui {
  background: var(--carbon); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  font-size: 12px;
}
.ui-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 12px; border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bone) 3%, var(--carbon));
}
.ui-bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--border-hi); }
.ui-bar span {
  margin-left: 8px; font-family: var(--mono); font-size: 10.5px; color: var(--stone);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ui-body { padding: 14px; min-height: 132px; }
.ui-foot {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 9px 12px; border-top: 1px solid var(--border);
  font-family: var(--mono); font-size: 10px; color: var(--stone);
}
.ui-lg { font-size: 13px; }
.ui-lg .ui-body { min-height: 210px; padding: 18px; }

/* organograma */
.ui-org { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.org-node {
  padding: 7px 12px; border: 1px solid var(--border-hi); border-radius: 9px;
  background: var(--surface); font-size: 11.5px; text-align: center; white-space: nowrap;
}
.org-node em { display: block; font-style: normal; font-size: 9.5px; color: var(--stone); }
.org-row .org-node { padding: 7px 9px; font-size: 10.5px; }
.org-top { border-color: color-mix(in srgb, var(--bone) 30%, transparent); }
.org-row { display: flex; gap: 7px; width: 100%; justify-content: center; flex-wrap: nowrap; }

/* board */
.ui-board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.col { display: flex; flex-direction: column; gap: 7px; }
.col-h { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--stone); }
.chip { height: 26px; border-radius: 7px; background: var(--surface-2); border: 1px solid var(--border); }
.chip-live { border-color: var(--border-hi); background: color-mix(in srgb, var(--bone) 8%, transparent); }
.chip-gate { border-color: color-mix(in srgb, var(--bone) 38%, transparent); background: color-mix(in srgb, var(--bone) 11%, transparent); }

/* base de conhecimento */
.ui-kb { display: flex; flex-direction: column; gap: 9px; }
.kb-search {
  padding: 8px 11px; border-radius: 8px;
  background: var(--surface-2); border: 1px solid var(--border-hi);
}
.kb-q { font-family: var(--mono); font-size: 11px; color: var(--bone); }
.kb-hit { display: flex; flex-direction: column; gap: 3px; padding-left: 11px; border-left: 2px solid var(--border-hi); }
.kb-t { font-size: 12.5px; line-height: 1.45; }
.kb-src { font-family: var(--mono); font-size: 10px; color: var(--stone); }
.kb-dim { opacity: 0.78; }
.ui-kb-lg { gap: 14px; }
.ui-kb-lg .kb-t { font-size: 13.5px; }

/* aprovação */
.ui-approve { display: flex; flex-direction: column; gap: 12px; justify-content: center; }
.ap-card {
  display: flex; flex-direction: column; gap: 3px; padding: 12px;
  border-radius: 10px; border: 1px solid color-mix(in srgb, var(--bone) 34%, transparent);
  background: color-mix(in srgb, var(--bone) 6%, transparent);
}
.ap-t { font-size: 12.5px; font-weight: 560; }
.ap-s { font-family: var(--mono); font-size: 10.5px; color: var(--bone); }
.ap-actions { display: flex; gap: 8px; }
.ap-yes, .ap-no {
  flex: 1; text-align: center; padding: 7px 0; border-radius: 8px; font-size: 11.5px; font-weight: 560;
}
.ap-yes { background: var(--bone); color: var(--ink); }
.ap-no { border: 1px solid var(--border-hi); color: var(--stone); }

/* ---------- grids ---------- */
.grid-4 { display: grid; gap: clamp(24px, 3vw, 34px); grid-template-columns: 1fr; }
@media (min-width: 700px)  { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1060px) { .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.piece { min-width: 0; }
.piece h3 { margin-top: 20px; font-size: 1.06rem; }
.piece p { margin-top: 9px; color: var(--stone); font-size: 0.945rem; line-height: 1.55; }

.proof-grid, .form-grid { display: grid; gap: clamp(36px, 5vw, 64px); grid-template-columns: 1fr; align-items: center; }
@media (min-width: 940px) {
  .proof-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
  .form-grid  { grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr); align-items: start; }
}
.proof-visual { min-width: 0; }

.state-grid { margin-top: 46px; display: grid; gap: clamp(28px, 4vw, 56px); grid-template-columns: 1fr; }
@media (min-width: 820px) { .state-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.state-h { font-size: 0.95rem; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.state-no { color: var(--stone); }
.state-list { margin-top: 16px; display: flex; flex-direction: column; gap: 12px; }
.state-list li { position: relative; padding-left: 22px; font-size: 0.97rem; line-height: 1.5; }
.state-list li::before {
  content: ""; position: absolute; left: 0; top: 9px;
  width: 9px; height: 9px; border-radius: 50%; background: var(--bone);
}
.state-list-dim li { color: var(--stone); }
.state-list-dim li::before { background: transparent; border: 1px solid var(--border-hi); }

/* ---------- formulário ---------- */
.form {
  background: var(--carbon); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: clamp(22px, 3vw, 32px);
}
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; color: var(--stone); margin-bottom: 7px; }
.field input, .field select {
  width: 100%; min-height: 48px; padding: 0 14px;
  background: var(--surface); border: 1px solid var(--border-hi); border-radius: 10px;
  color: var(--bone); font: inherit; font-size: 15px;
  transition: border-color 180ms var(--ease), background-color 180ms var(--ease);
}
.field select { appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--stone) 50%), linear-gradient(135deg, var(--stone) 50%, transparent 50%);
  background-position: calc(100% - 19px) 21px, calc(100% - 14px) 21px;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
.field input:hover, .field select:hover { border-color: color-mix(in srgb, var(--bone) 28%, transparent); }
.field input:focus, .field select:focus { outline: none; border-color: var(--bone); background: var(--surface-2); }
.field input[aria-invalid="true"] { border-color: #E3564A; }
.field option { background: var(--carbon); color: var(--bone); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.consent { display: flex; gap: 11px; align-items: flex-start; margin: 20px 0 22px; }
/* 20px visíveis, hit-area de 44px pelo pseudo-elemento (WCAG 2.5.8) */
.consent input {
  position: relative; margin-top: 1px; width: 24px; height: 24px;
  accent-color: var(--bone); flex: none;
}
.consent label { font-size: 13px; color: var(--stone); line-height: 1.5; }
.consent a { color: var(--bone); text-underline-offset: 3px; }

.form-msg { margin-top: 14px; font-size: 13.5px; min-height: 20px; }
.form-msg.is-ok { color: var(--bone); }
.form-msg.is-err { color: #E3564A; }

/* ---------- faq ---------- */
.faq { margin-top: 40px; border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
  list-style: none; cursor: pointer; padding: 22px 40px 22px 0; position: relative;
  font-size: 1.03rem; font-weight: 500;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 11px; height: 11px;
  border-right: 1.5px solid var(--stone); border-bottom: 1.5px solid var(--stone);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 240ms var(--ease);
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { padding: 0 0 24px; color: var(--stone); max-width: 68ch; }

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--border); padding: 52px 0 62px; }
.foot-inner { display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.foot-legal { font-size: 12.5px; color: var(--stone); line-height: 1.6; }
.foot-links { display: flex; gap: 22px; font-size: 13px; }
.foot-links a { color: var(--stone); text-decoration: none; text-underline-offset: 3px; }
.foot-links a:hover { color: var(--bone); text-decoration: underline; }

/* ---------- reveal: slide-only, sem fade ----------
   Fade de opacidade trava o LCP e gera falso-positivo de contraste no
   Lighthouse (cor lida mid-fade). Só translate.
   O safety-net vive no script.js: observer nativo + timeout final.        */
.has-js [data-reveal] { transform: translateY(16px); transition: transform 700ms var(--ease); }
.has-js [data-reveal].is-in { transform: none; }

/* ---------- movimento reduzido ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .has-js [data-reveal] { transform: none; }
  .flow-live { opacity: 1; }
}

/* ---------- bloco 3: a trilha do card (o momento-demo) ---------- */
.demo { margin-top: clamp(38px, 5vw, 60px); }
.ui-demo { max-width: 820px; }
.ui-badge {
  margin-left: auto; font-family: var(--mono); font-size: 10px; font-weight: 400;
  color: var(--stone); border: 1px solid var(--border); border-radius: 999px; padding: 3px 9px;
}
.trail { padding: 6px 0; min-height: 0; }
.trail-row {
  display: grid; align-items: baseline; gap: 4px 14px;
  grid-template-columns: 12px minmax(88px, auto) minmax(0, 1fr);
  padding: 13px 18px; border-bottom: 1px solid var(--border);
}
.trail-row:last-child { border-bottom: 0; }
.trail-mark {
  width: 9px; height: 9px; border-radius: 50%; align-self: center;
  border: 1px solid var(--border-hi);
}
.trail-row.is-ok .trail-mark { background: var(--stone); border-color: var(--stone); }
.trail-row.is-now .trail-mark {
  background: var(--bone); border-color: var(--bone);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--bone) 13%, transparent);
}
.trail-step { font-size: 13.5px; font-weight: 560; color: color-mix(in srgb, var(--bone) 70%, transparent); }
.trail-row.is-now .trail-step { color: var(--bone); }
.trail-who { font-family: var(--mono); font-size: 10.5px; color: var(--stone); grid-column: 3; }
.trail-row.is-now .trail-who { color: var(--bone); }
.trail-what { grid-column: 3; font-size: 12.5px; color: var(--stone); line-height: 1.45; }
.trail-what em { font-style: normal; font-family: var(--mono); font-size: 11.5px; color: color-mix(in srgb, var(--bone) 72%, transparent); }
.trail-actions { display: flex; gap: 8px; margin-top: 4px; }
.trail-actions b { background: var(--bone); color: var(--ink); font-size: 11.5px; font-weight: 560; padding: 5px 14px; border-radius: 7px; }
.trail-actions i { font-style: normal; border: 1px solid var(--border-hi); color: var(--stone); font-size: 11.5px; padding: 5px 14px; border-radius: 7px; }
@media (min-width: 720px) {
  /* tudo numa linha só: marca · etapa · o que aconteceu · quem e quando */
  .trail-row { grid-template-columns: 12px 124px minmax(0, 1fr) auto; align-items: center; }
  .trail-what { grid-column: 3; grid-row: 1; }
  .trail-who  { grid-column: 4; grid-row: 1; text-align: right; }
  .trail-actions { margin-top: 0; }
}

/* alturas iguais nas 4 réplicas da anatomia: sem isso os títulos desalinham entre colunas */
.grid-4 .ui-body { height: 186px; overflow: hidden; }

/* ============================================================
   CAMADA DE MOTION
   Tudo em transform/opacity, tudo com corte em reduced-motion.
   ============================================================ */

/* ---------- abertura: véu curto POR CIMA do hero já pintado ---------- */
.intro {
  position: fixed; inset: 0; z-index: 90; pointer-events: none;
  display: grid; place-items: center; background: var(--ink);
  animation: intro-out 760ms var(--ease) 1560ms forwards;
}
.intro-inner { text-align: center; animation: intro-lift 760ms var(--ease) 1560ms forwards; }
.intro-mark {
  display: flex; align-items: baseline; justify-content: center; gap: 11px; margin: 0;
  animation: mark-in 700ms var(--ease) both;
}
.intro-mark img { display: block; width: auto; height: clamp(19px, 2vw, 24px); }
.intro-mark .lockup-descriptor { font-size: clamp(20px, 2.1vw, 25px); }
.intro-rot {
  position: relative; height: 1.7em; margin-top: 20px; overflow: hidden;
  font-size: clamp(1.6rem, 4vw, 2.6rem); letter-spacing: -0.025em; line-height: 1.7;
  font-weight: 500;
}
/* Cada palavra entra exatamente quando a anterior sai: as janelas não se
   cruzam, senão duas ficam em translateY(0) ao mesmo tempo e sobrepõem. */
.intro-rot span {
  position: absolute; inset: 0; display: grid; place-items: center;
  transform: translateY(115%); animation: rot 920ms var(--ease) both;
}
.intro-rot span:nth-child(1) { animation-delay: 120ms; }
.intro-rot span:nth-child(2) { animation-delay: 580ms; }
.intro-rot span:nth-child(3) { animation-delay: 1040ms; animation-name: rot-last; color: var(--bone); }
@keyframes rot {
  0%        { transform: translateY(115%); }
  25%, 50%  { transform: translateY(0); }
  75%, 100% { transform: translateY(-115%); }
}
@keyframes rot-last {
  0%        { transform: translateY(115%); }
  25%, 100% { transform: translateY(0); }
}
@keyframes mark-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; } }
@keyframes intro-out { to { opacity: 0; visibility: hidden; } }
@keyframes intro-lift { to { transform: translateY(-14px); } }
body.intro-off .intro { animation-delay: 0ms; animation-duration: 400ms; }

/* ---------- campo visual do hero ---------- */
.hero { position: relative; overflow: hidden; }
.hero > .wrap { position: relative; z-index: 2; }
.starfield { position: absolute; inset: 0; z-index: 1; pointer-events: none; }

.field-grid {
  position: absolute; inset: -1px;
  background-image:
    linear-gradient(to right, rgba(244,240,232,0.075) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(244,240,232,0.075) 1px, transparent 1px);
  background-size: 84px 84px;
  mask-image: radial-gradient(120% 90% at 76% 32%, #000 0%, transparent 72%);
  animation: grid-in 2200ms var(--ease) 180ms both;
}
@keyframes grid-in { from { opacity: 0; transform: scale(1.06); } to { opacity: 1; transform: none; } }

.field-beam { position: absolute; filter: blur(46px); }
.field-beam-top {
  top: -32%; left: 46%; width: 62%; height: 78%;
  background: radial-gradient(closest-side, rgba(244,240,232,0.22), transparent 70%);
  animation: beam-in 1800ms var(--ease) 260ms both, beam-sway 17s ease-in-out 2s infinite;
}
.field-beam-side {
  top: 28%; right: -14%; width: 44%; height: 62%;
  background: radial-gradient(closest-side, rgba(244,240,232,0.14), transparent 70%);
  animation: beam-in 2000ms var(--ease) 460ms both, beam-sway 21s ease-in-out 3s infinite reverse;
}
@keyframes beam-in { from { opacity: 0; transform: translateY(-26px) scale(0.9); } to { opacity: 1; } }
@keyframes beam-sway {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50%      { transform: translate3d(-26px, 20px, 0) scale(1.07); }
}

.field-dust i {
  position: absolute; width: 2.5px; height: 2.5px; border-radius: 50%;
  background: var(--bone); box-shadow: 0 0 7px rgba(244,240,232,0.55); opacity: 0;
  animation: dust 15s ease-in-out infinite;
  will-change: transform, opacity;
}
.field-dust i:nth-child(1)  { top: 14%; left: 62%; animation-duration: 17s; animation-delay: 0.4s; }
.field-dust i:nth-child(2)  { top: 27%; left: 78%; animation-duration: 21s; animation-delay: 2.1s; }
.field-dust i:nth-child(3)  { top: 41%; left: 68%; animation-duration: 14s; animation-delay: 1.2s; }
.field-dust i:nth-child(4)  { top: 58%; left: 84%; animation-duration: 19s; animation-delay: 3.6s; }
.field-dust i:nth-child(5)  { top: 71%; left: 71%; animation-duration: 16s; animation-delay: 0.9s; }
.field-dust i:nth-child(6)  { top: 22%; left: 90%; animation-duration: 23s; animation-delay: 4.4s; }
.field-dust i:nth-child(7)  { top: 49%; left: 57%; animation-duration: 18s; animation-delay: 2.8s; }
.field-dust i:nth-child(8)  { top: 66%; left: 94%; animation-duration: 15s; animation-delay: 5.2s; }
.field-dust i:nth-child(9)  { top: 34%; left: 52%; animation-duration: 20s; animation-delay: 1.7s; }
.field-dust i:nth-child(10) { top: 82%; left: 63%; animation-duration: 22s; animation-delay: 3.1s; }
.field-dust i:nth-child(11) { top: 9%;  left: 73%; animation-duration: 16s; animation-delay: 6.0s; }
.field-dust i:nth-child(12) { top: 88%; left: 80%; animation-duration: 19s; animation-delay: 2.4s; }
.field-dust i:nth-child(13) { top: 53%; left: 97%; animation-duration: 24s; animation-delay: 0.2s; }
.field-dust i:nth-child(14) { top: 76%; left: 54%; animation-duration: 17s; animation-delay: 4.9s; }
@keyframes dust {
  0%        { opacity: 0;    transform: translate3d(0, 0, 0); }
  12%, 78%  { opacity: 0.85; }
  50%       { transform: translate3d(-22px, -34px, 0); }
  100%      { opacity: 0;    transform: translate3d(-40px, -62px, 0); }
}

.field-meteors i {
  position: absolute; width: 128px; height: 1px; opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(244,240,232,0.62), transparent);
  animation: meteor 9s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  will-change: transform, opacity;
}
.field-meteors i:nth-child(1) { top: 18%; left: 52%; animation-delay: 1.5s;  animation-duration: 8s;  }
.field-meteors i:nth-child(2) { top: 44%; left: 66%; animation-delay: 5.2s;  animation-duration: 11s; }
.field-meteors i:nth-child(3) { top: 63%; left: 58%; animation-delay: 9.4s;  animation-duration: 9s;  }
.field-meteors i:nth-child(4) { top: 31%; left: 80%; animation-delay: 14.1s; animation-duration: 12s; }
@keyframes meteor {
  0%          { opacity: 0; transform: translate3d(0, 0, 0) rotate(14deg) scaleX(0.2); }
  4%          { opacity: 1; }
  16%         { opacity: 0; transform: translate3d(300px, 76px, 0) rotate(14deg) scaleX(1); }
  100%        { opacity: 0; transform: translate3d(300px, 76px, 0) rotate(14deg) scaleX(1); }
}

/* ---------- kinetic type no título (sem fade: o h1 é o LCP) ---------- */
.hero-title .w {
  display: inline-block; overflow: hidden; vertical-align: bottom;
  padding: 0.12em 0.02em 0.16em; margin: -0.12em -0.02em -0.16em;  /* espaço para Ç e acentos */
}
.has-js .hero-title .w > span,
.has-js .hero-title .w { will-change: transform; }
.has-js .hero-title .w i {
  display: inline-block; font-style: normal;
  transform: translateY(100%);
  animation: word 780ms var(--ease) forwards;
}
.hero-title .w:nth-child(1) i { animation-delay: 1200ms; }
.hero-title .w:nth-child(2) i { animation-delay: 1260ms; }
.hero-title .w:nth-child(3) i { animation-delay: 1320ms; }
.hero-title .w:nth-child(4) i { animation-delay: 1400ms; }
.hero-title .w:nth-child(5) i { animation-delay: 1460ms; }
.hero-title .w:nth-child(6) i { animation-delay: 1520ms; }
.hero-title .w:nth-child(7) i { animation-delay: 1580ms; }
@keyframes word { to { transform: none; } }

.hero-sub, .hero-actions { animation: rise 760ms var(--ease) 1900ms both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; } }

/* ---------- botão com traço de luz na borda ---------- */
.btn-solid { position: relative; overflow: hidden; }
.btn-solid::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(105deg, transparent 38%, rgba(11,11,10,0.16) 50%, transparent 62%);
  transform: translateX(-130%);
  animation: trace 4.6s var(--ease) 3s infinite;
}
@keyframes trace { 0% { transform: translateX(-130%); } 26%, 100% { transform: translateX(130%); } }
.btn-ghost { position: relative; }
.btn:active { transform: translateY(1px) scale(0.99); }

/* ---------- organograma vivo: cabos SVG desenhados em runtime ---------- */
.ui-org { position: relative; }
.org-wires { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.org-wires path {
  fill: none; stroke: var(--border-hi); stroke-width: 1;
  stroke-dasharray: var(--len); stroke-dashoffset: var(--len);
  animation: wire 1400ms var(--ease) forwards;
}
.is-live .org-wires path { animation-delay: calc(var(--n) * 220ms + 300ms); }
@keyframes wire { to { stroke-dashoffset: 0; } }
.org-wires .pulse {
  fill: var(--bone); r: 1.8;
  animation: pulse-run 3.4s var(--ease) infinite;
  offset-rotate: 0deg;
}
.org-node[data-node] { transition: border-color 500ms var(--ease), background-color 500ms var(--ease); }
.org-node.is-on { border-color: color-mix(in srgb, var(--bone) 46%, transparent); background: var(--surface-2); }

/* ---------- board: o card atravessa as colunas ---------- */
.ui-board { position: relative; }
.chip-ghost { background: transparent; border-style: dashed; }
.board-runner {
  position: absolute; left: 14px; top: 34px; width: calc((100% - 44px) / 3); height: 26px;
  border-radius: 7px; background: color-mix(in srgb, var(--bone) 13%, transparent);
  border: 1px solid color-mix(in srgb, var(--bone) 40%, transparent);
  transform: translateX(calc(var(--c, 0) * (100% + 8px)));
  transition: transform 700ms var(--ease), border-color 400ms var(--ease);
  will-change: transform;
}
.board-runner.is-gate { box-shadow: 0 0 0 4px color-mix(in srgb, var(--bone) 10%, transparent); }
.chip-t {
  height: auto; padding: 6px 8px; font-size: 10px; color: var(--stone);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ---------- kb: prompt digitado + resultados em stagger ---------- */
.kb-search { display: flex; align-items: center; gap: 2px; min-height: 31px; }
.caret {
  display: inline-block; width: 6px; height: 13px; background: var(--bone);
  animation: caret 1s steps(2, end) infinite;
}
@keyframes caret { 50% { opacity: 0; } }
.kb-lazy { opacity: 0; transform: translateY(6px); transition: opacity 500ms var(--ease), transform 500ms var(--ease); }
.kb-lazy.is-on { opacity: 1; transform: none; }
.kb-lazy.kb-dim.is-on { opacity: 0.78; }

/* ---------- aprovação: o botão respira ---------- */
.ap-breathe { animation: breathe 2.6s var(--ease) infinite; }
@keyframes breathe {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--bone) 22%, transparent); }
  50%      { box-shadow: 0 0 0 7px color-mix(in srgb, var(--bone) 0%, transparent); }
}

/* ---------- carrossel 3D de telas ---------- */
.deck {
  position: relative; height: clamp(272px, 30vw, 340px);
  perspective: 1500px; perspective-origin: 50% 46%;
  transform-style: preserve-3d;
}
.pane {
  position: absolute; top: 0; left: 12%; width: 76%; height: 100%;
  transform: translate3d(0, 22px, -300px) rotateY(-26deg) scale(0.86);
  opacity: 0; transition: transform 950ms var(--ease), opacity 750ms var(--ease);
  will-change: transform, opacity;
}
.pane.is-active { transform: translateZ(0); opacity: 1; z-index: 3; }
/* os laterais ficam de fato à vista, em perspectiva, como um deck de telas */
.pane.is-prev { transform: translate3d(-52%, 10px, -240px) rotateY(26deg) scale(0.9); opacity: 0.52; z-index: 2; }
.pane.is-next { transform: translate3d(52%, 10px, -240px) rotateY(-26deg) scale(0.9); opacity: 0.52; z-index: 2; }
.ui-pane {
  height: 100%; box-shadow: 0 44px 100px -54px rgba(0, 0, 0, 0.96);
  background: linear-gradient(180deg, var(--carbon), color-mix(in srgb, var(--carbon) 62%, var(--ink)));
}
.ui-pane .ui-body { height: calc(100% - 74px); align-content: start; }
/* os painéis laterais podem passar da coluna, mas a página nunca rola na horizontal:
   a moldura corta, e o deck parece continuar além dela. */
.proof-visual { overflow: hidden; padding-bottom: 26px; }
@media (max-width: 939px) {
  .pane { left: 6%; width: 88%; }
  .pane.is-prev, .pane.is-next { opacity: 0.22; }
}
.ui-board-lg { grid-template-columns: repeat(3, 1fr); align-content: start; }
.ui-org-lg { justify-content: center; gap: 22px; }
.ui-org-lg .org-node { font-size: 12.5px; padding: 9px 14px; }

/* hit-area de 44px conforme WCAG; o traço visual é o <i> dentro do botão */
.deck-dots { display: flex; gap: 2px; justify-content: center; margin-top: 12px; }
.deck-dots button {
  display: grid; place-items: center;
  width: 46px; height: 44px; border: 0; padding: 0; background: none; cursor: pointer;
}
.deck-dots i {
  display: block; width: 26px; height: 3px; border-radius: 99px; background: var(--border-hi);
  transition: background-color 300ms var(--ease), width 300ms var(--ease);
}
.deck-dots button.is-on i { background: var(--bone); width: 38px; }
.deck-dots button:hover i { background: color-mix(in srgb, var(--bone) 60%, transparent); }

/* ---------- corte total sob movimento reduzido ---------- */
@media (prefers-reduced-motion: reduce) {
  .intro { display: none; }
  .has-js .hero-title .w i { transform: none; animation: none; }
  .hero-sub, .hero-actions { opacity: 1; transform: none; animation: none; }
  .field-dust, .field-meteors, .btn-solid::after { display: none; }
  .field-grid, .field-beam { animation: none; opacity: 1; }
  .org-wires path { stroke-dashoffset: 0; animation: none; }
  .kb-lazy { opacity: 1; transform: none; }
  .kb-lazy.kb-dim { opacity: 0.78; }
  .pane { transition: none; }
}

/* ---------- constelação do hero: nós e linhas desenhados em runtime ---------- */
.field-web { position: absolute; inset: 0; width: 100%; height: 100%; }
.field-web line {
  stroke: rgba(244, 240, 232, 0.16); stroke-width: 1;
  stroke-dasharray: var(--len); stroke-dashoffset: var(--len);
  animation: web-draw 1500ms var(--ease) forwards;
  animation-delay: calc(var(--n) * 90ms + 700ms);
}
@keyframes web-draw { to { stroke-dashoffset: 0; } }
.field-web circle {
  fill: var(--bone); opacity: 0;
  animation: web-node 620ms var(--ease) forwards, web-breathe 4.5s ease-in-out infinite;
  animation-delay: calc(var(--n) * 70ms + 900ms), calc(var(--n) * 240ms + 2s);
}
@keyframes web-node  { to { opacity: 0.82; } }
@keyframes web-breathe { 0%, 100% { opacity: 0.82; } 50% { opacity: 0.3; } }
@media (prefers-reduced-motion: reduce) {
  .field-web line { stroke-dashoffset: 0; animation: none; }
  .field-web circle { opacity: 0.6; animation: none; }
}
