/* ============================================================================
   OpenGov Mesh — "Sovereign Night" manifesto
   Indigo substrate · Sahel ember · gov-grade, cinematic, vanilla.
   Palette meaning is strict: indigo = structure, teal = verified,
   ember = data-in-motion, gold = attested.
   ========================================================================== */

/* ---- Tokens ------------------------------------------------------------- */
:root {
  --bg:        #0A0E1A;
  --bg-rgb:    10, 14, 26;
  --bg-2:      #0d1324;
  --fg:        #E6EAF4;
  --fg-rgb:    230, 234, 244;
  --fg-muted:  rgba(230, 234, 244, 0.62);
  --fg-faint:  rgba(230, 234, 244, 0.55);   /* AA-legible: ~6:1 on #0A0E1A — used on semantic text */
  --fg-decor:  rgba(230, 234, 244, 0.30);   /* genuinely decorative only (hairlines, scroll cue) */

  --ember:  #E8915B;   /* data in motion — the protagonist */
  --teal:   #3DD8C4;   /* trust / verified */
  --indigo: #6E8CFF;   /* structure */
  --gold:   #F2C879;   /* attested / highlight */

  --hair:        rgba(230, 234, 244, 0.10);
  --hair-strong: rgba(230, 234, 244, 0.18);

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body:    "Inter", system-ui, -apple-system, sans-serif;
  --font-mono:    "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;

  --ease-settle: cubic-bezier(0.16, 1, 0.30, 1);   /* expo-out reveal */
  --ease-vault:  cubic-bezier(0.65, 0, 0.35, 1);   /* consent gate */

  --measure: 62ch;
  --pad-x: clamp(1.25rem, 5vw, 5rem);
  --section-pad-y: clamp(5rem, 14vh, 11rem);

  --mx: 50%;
  --my: 50%;
  --progress: 0;
}

/* ---- Reset -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.92rem + 0.4vw, 1.125rem);
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  position: relative;
  font-feature-settings: "ss01", "cv05";
}

::selection { background: rgba(232, 145, 91, 0.28); color: #fff; }

a { color: inherit; text-decoration: none; }
img, canvas { display: block; }
code { font-family: var(--font-mono); }

/* Visible focus — gold clears 12:1 on the night background (WCAG 2.4.7 / 2.4.13) */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 6px;
}
.btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
  box-shadow: 0 0 0 4px rgba(232, 145, 91, 0.55);
}
:focus:not(:focus-visible) { outline: none; }
/* programmatic skip-link target — focusable but no ring needed (content is visible) */
.section[tabindex]:focus { outline: none; }

/* screen-reader-only utility (animated values expose a stable accessible name) */
.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;
}

/* ---- Fixed substrate layers -------------------------------------------- */
#mesh {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.spotlight {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(
    540px circle at var(--mx) var(--my),
    rgba(110, 140, 255, 0.07),
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.6s ease;
  mix-blend-mode: screen;
}
.has-pointer .spotlight { opacity: 1; }

/* Film grain — stops the night from looking digital */
.grain {
  position: fixed;
  inset: -50%;
  z-index: 2;
  width: 200%;
  height: 200%;
  pointer-events: none;
  opacity: 0.12;
  mix-blend-mode: soft-light;
  background-image: url("assets/grain.svg");
  background-size: 300px 300px;
  will-change: transform;
  animation: grain 7s steps(8) infinite;
}
@keyframes grain {
  0%   { transform: translate(0, 0); }
  10%  { transform: translate(-3%, -5%); }
  30%  { transform: translate(4%, -2%); }
  50%  { transform: translate(-2%, 4%); }
  70%  { transform: translate(3%, 3%); }
  90%  { transform: translate(-4%, 1%); }
  100% { transform: translate(0, 0); }
}

/* Viewfinder cursor — borrowed device, auto-contrast via difference blend */
.cursor {
  position: fixed;
  top: 0; left: 0;
  z-index: 9999;
  width: 26px;
  height: 26px;
  pointer-events: none;
  transform: translate(-50%, -50%);
  opacity: 0;
  color: var(--fg);
  transition: width 0.28s var(--ease-settle), height 0.28s var(--ease-settle),
              opacity 0.3s ease, border-radius 0.28s ease;
  border-radius: 50%;
}
.cursor::before,
.cursor::after,
.cursor i::before,
.cursor i::after { content: ""; }
.cursor::before, .cursor::after,
.cursor i { position: absolute; }
/* four corner brackets */
.cursor::before { top: 0; left: 0; width: 8px; height: 8px; border-top: 1.5px solid #fff; border-left: 1.5px solid #fff; }
.cursor::after  { top: 0; right: 0; width: 8px; height: 8px; border-top: 1.5px solid #fff; border-right: 1.5px solid #fff; }
.cursor i { inset: auto 0 0 0; display: block; height: 8px; }
.cursor i::before { left: 0; bottom: 0; width: 8px; height: 8px; border-bottom: 1.5px solid #fff; border-left: 1.5px solid #fff; }
.cursor i::after  { right: 0; bottom: 0; width: 8px; height: 8px; border-bottom: 1.5px solid #fff; border-right: 1.5px solid #fff; }
.has-pointer .cursor { opacity: 0.85; }
.cursor.is-frame { width: 54px; height: 54px; border-radius: 4px; }
.cursor.is-dot   { width: 9px; height: 9px; }
.cursor.is-dot::before, .cursor.is-dot::after,
.cursor.is-dot i::before, .cursor.is-dot i::after { border-color: transparent; }
.cursor.is-dot { background: #fff; border-radius: 50%; }

/* Scroll progress rail */
.scroll-rail {
  position: fixed;
  top: 0; left: 0;
  z-index: 60;
  width: 100%;
  height: 2px;
  background: var(--hair);
  pointer-events: none;
}
.scroll-rail__fill {
  display: block;
  height: 100%;
  width: 100%;
  transform: scaleX(var(--progress));
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--ember), var(--gold));
  box-shadow: 0 0 12px rgba(232, 145, 91, 0.6);
}

/* ---- Skip link ---------------------------------------------------------- */
.skip {
  position: fixed;
  top: -100px; left: 1rem;
  z-index: 10000;
  padding: 0.6rem 1rem;
  background: var(--ember);
  color: #14110c;
  font: 500 0.85rem/1 var(--font-mono);
  border-radius: 6px;
  transition: top 0.2s ease;
}
.skip:focus { top: 1rem; }

/* ---- Topbar ------------------------------------------------------------- */
.topbar {
  position: fixed;
  top: 0; left: 0;
  z-index: 50;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(1rem, 2.4vh, 1.6rem) var(--pad-x);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  flex-wrap: wrap;
  row-gap: 0.5rem;
  background: rgba(10, 14, 26, 0.72);   /* opaque-ish fallback where backdrop-filter is unsupported */
}
@supports ((backdrop-filter: blur(4px)) or (-webkit-backdrop-filter: blur(4px))) {
  .topbar {
    background: rgba(10, 14, 26, 0.4);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    -webkit-mask-image: linear-gradient(180deg, #000 72%, transparent);
    mask-image: linear-gradient(180deg, #000 72%, transparent);
  }
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  min-width: 0;
}
.wordmark__mark {
  width: 16px; height: 16px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, var(--ember), transparent 60%),
    conic-gradient(from 200deg, var(--indigo), var(--teal), var(--indigo));
  box-shadow: 0 0 10px rgba(110, 140, 255, 0.6);
  flex: none;
}
.topbar__right { display: flex; align-items: center; gap: 1.25rem; }
.tag {
  padding: 0.3rem 0.6rem;
  border: 1px solid var(--hair-strong);
  border-radius: 100px;
  color: var(--fg-muted);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  white-space: nowrap;
}
.tag--status { color: var(--gold); border-color: rgba(242, 200, 121, 0.3); }
.topbar__link {
  position: relative;
  color: var(--fg);
  padding: 0.4rem 0;
}
.topbar__link::after {
  content: "";
  position: absolute; left: 0; bottom: -4px;
  width: 100%; height: 1px;
  background: var(--ember);
  transform: scaleX(0); transform-origin: 0 50%;
  transition: transform 0.4s var(--ease-settle);
}
.topbar__link:hover::after { transform: scaleX(1); }
@media (max-width: 640px) { .tag--status { display: none; } }

/* ---- Layout primitives -------------------------------------------------- */
main { position: relative; z-index: 3; }

.section {
  position: relative;
  min-height: 100vh;        /* fallback for engines without dvh */
  min-height: 100dvh;       /* avoids mobile-chrome clipping of the scroll cue */
  display: flex;
  align-items: center;
  padding: var(--section-pad-y) var(--pad-x);
}
.section + .section::before {
  /* ember hairline rule that draws on entry */
  content: "";
  position: absolute;
  top: 0; left: var(--pad-x);
  width: calc(100% - var(--pad-x) * 2);
  height: 1px;
  background: linear-gradient(90deg, var(--hair-ember, rgba(232,145,91,0.5)), transparent 70%);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 1.1s var(--ease-settle);
}
.section.is-active::before { transform: scaleX(1); }

.wrap { width: 100%; max-width: 1140px; margin: 0 auto; }
.wrap--hero { max-width: 1180px; }
.wrap--center { max-width: 960px; margin-inline: auto; text-align: center; }
.wrap--center .stats,
.wrap--center .specgrid { text-align: left; }
.wrap--plane { max-width: 1100px; }

/* ---- Eyebrow ------------------------------------------------------------ */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 1.6rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 1px;
  background: currentColor;
  opacity: 0.5;
}
.eyebrow[data-accent="ember"]  { color: var(--ember); }
.eyebrow[data-accent="teal"]   { color: var(--teal); }
.eyebrow[data-accent="indigo"] { color: var(--indigo); }
.eyebrow[data-accent="gold"]   { color: var(--gold); }
.eyebrow .ref { color: var(--fg-faint); letter-spacing: 0.1em; }
.wrap--center .eyebrow { justify-content: center; }

/* ---- Display & headlines ------------------------------------------------ */
.display {
  font-family: var(--font-display);
  font-weight: 380;
  font-size: clamp(3rem, 8.2vw, 8.4rem);
  line-height: 0.96;
  letter-spacing: -0.035em;
  font-optical-sizing: auto;
  font-variation-settings: "opsz" 144;   /* force the high-optical cut for crisp serifs at hero scale */
  max-width: 16ch;
}
.display--md { font-size: clamp(2.4rem, 5.6vw, 5.2rem); line-height: 1.0; max-width: 20ch; }
.wrap--center .display { margin-inline: auto; }

.headline {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 4.4vw, 3.6rem);
  line-height: 1.04;
  letter-spacing: -0.025em;
  max-width: 18ch;
}

.lede { margin-top: 1.6rem; }

.subhead {
  font-size: clamp(1.1rem, 1rem + 0.7vw, 1.5rem);
  line-height: 1.4;
  font-weight: 400;
  color: var(--fg);
  max-width: 46ch;
  margin-top: 1.5rem;
  letter-spacing: -0.01em;
}
.wrap--center .subhead { margin-inline: auto; }
.subhead .muted { color: var(--fg-faint); }

/* ---- Body --------------------------------------------------------------- */
.body { margin-top: 2.2rem; max-width: var(--measure); }
.body--center { margin-inline: auto; }
.body p + p { margin-top: 1.15rem; }
.body p { color: var(--fg-muted); }
.body__emphatic {
  color: var(--fg) !important;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.32em;
  line-height: 1.35;
  letter-spacing: -0.02em;
  margin-top: 1.6rem !important;
}
.inline-mono {
  font-family: var(--font-mono);
  font-size: 0.86em;
  color: var(--teal);
  background: rgba(61, 216, 196, 0.08);
  padding: 0.1em 0.4em;
  border-radius: 4px;
  border: 1px solid rgba(61, 216, 196, 0.18);
  white-space: nowrap;
}
@media (max-width: 480px) {
  /* let crypto tokens (HMAC-SHA-256(K_citizen, consent_id)) wrap instead of clipping */
  .inline-mono { white-space: normal; overflow-wrap: anywhere; word-break: break-word; }
}

/* ---- Pull quote --------------------------------------------------------- */
.pullquote {
  font-family: var(--font-display);
  font-weight: 380;
  font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.6rem);
  line-height: 1.18;
  letter-spacing: -0.025em;
  color: var(--fg);
  max-width: 24ch;
  margin-top: 3rem;
  padding-left: 1.4rem;
  border-left: 2px solid var(--ember);
}
.pullquote--lg { font-size: clamp(1.8rem, 1.2rem + 2.6vw, 3.4rem); max-width: 20ch; }
.pullquote--center {
  border-left: 0; padding-left: 0; margin-inline: auto; text-align: center;
  max-width: 26ch;
}
.pullquote--center::before { content: "“"; color: var(--ember); }
.pullquote--center::after { content: "”"; color: var(--ember); }

/* ---- Hero specifics ----------------------------------------------------- */
.section--hero { min-height: 100vh; min-height: 100dvh; }
.hero__cta { margin-top: 2.6rem; display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
.wrap--center .hero__cta { justify-content: center; }

.hero__scrollcue {
  position: absolute;
  bottom: 2rem; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--fg-decor);
}
.hero__scrollcue-line {
  width: 1px; height: 42px;
  background: linear-gradient(180deg, var(--ember), transparent);
  animation: cue 2.4s var(--ease-settle) infinite;
}
@keyframes cue {
  0%, 100% { transform: scaleY(0.4); opacity: 0.4; transform-origin: top; }
  50%      { transform: scaleY(1);   opacity: 1;   transform-origin: top; }
}

/* ---- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  padding: 0.95rem 1.5rem;
  border-radius: 100px;
  transition: transform 0.18s var(--ease-settle), background 0.3s ease,
              color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.btn--lg { padding: 1.15rem 2rem; font-size: 0.95rem; }
.btn--primary {
  background: var(--ember);
  color: #16110b;
  font-weight: 500;
  box-shadow: 0 0 0 rgba(232, 145, 91, 0);
}
.btn--primary:hover {
  box-shadow: 0 8px 40px rgba(232, 145, 91, 0.4);
  background: #f0a570;
}
.btn--ghost {
  border: 1px solid var(--hair-strong);
  color: var(--fg);
  background: transparent;
}
.btn--ghost:hover { border-color: var(--ember); color: var(--ember); }
.btn::after { content: "→"; transition: transform 0.3s var(--ease-settle); }
.btn:hover::after { transform: translateX(4px); }

/* ---- Stats (count-up tiles) -------------------------------------------- */
.stats {
  list-style: none; padding: 0;
  margin-top: 3.4rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: var(--hair);
  border: 1px solid var(--hair);
  border-radius: 12px;
  overflow: hidden;
}
.stat {
  background: var(--bg);
  padding: 1.7rem 1.4rem;
  display: flex; flex-direction: column; gap: 0.5rem;
}
.stat__value {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.8rem, 1.2rem + 1.6vw, 2.8rem);
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--fg);
}
.stat__label {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  line-height: 1.4;
  letter-spacing: 0.01em;
  color: var(--fg-muted);
}
.stat--accent { background: rgba(232, 145, 91, 0.07); }
.stat--accent .stat__value { color: var(--ember); }
.stats--cta { margin-top: 3rem; }

/* ---- Ledger (cost-of-inaction) ----------------------------------------- */
.ledger { list-style: none; padding: 0; margin-top: 3rem; }
.ledger__row {
  display: grid;
  grid-template-columns: minmax(120px, 0.4fr) 1fr;
  gap: 1.5rem;
  align-items: baseline;
  padding: 1.5rem 0;
  border-top: 1px solid var(--hair);
}
.ledger__row:last-child { border-bottom: 1px solid var(--hair); }
.ledger__value {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.7rem, 1.1rem + 2vw, 3rem);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--ember);
  font-variant-numeric: tabular-nums;
  display: flex; flex-direction: column; gap: 0.3rem;
}
.ledger__unit {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--fg-muted);
}
.ledger__label {
  font-size: 1.05rem;
  color: var(--fg);
  line-height: 1.4;
  max-width: 46ch;
}

/* ---- Spec grid (plane detail rows) ------------------------------------- */
.specgrid {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1px;
  background: var(--hair);
  border: 1px solid var(--hair);
  border-radius: 12px;
  overflow: hidden;
}
.specgrid__item {
  background: var(--bg);
  padding: 1.4rem 1.4rem 1.5rem;
  display: flex; flex-direction: column; gap: 0.7rem;
}
.specgrid__item dt {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.specgrid__item dd {
  font-size: 1.05rem;
  color: var(--fg);
  letter-spacing: -0.01em;
}
.specgrid__item dd.mono { font-family: var(--font-mono); font-size: 0.95rem; color: var(--teal); }

.footnote {
  margin-top: 1.6rem;
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--fg-faint);
  max-width: 60ch;
}
.footnote .inline-mono { font-size: 0.92em; }

/* ---- Planes cue (the turn) --------------------------------------------- */
.planescue {
  list-style: none; padding: 0;
  margin: 3.2rem auto 0;
  display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center;
}
.planescue li {
  display: inline-flex; align-items: baseline; gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 0.6rem 1rem;
  border: 1px solid var(--hair);
  border-radius: 100px;
  color: var(--fg-muted);
}
.planescue__num { color: var(--ember); font-size: 0.72rem; }

/* ---- Tenets ------------------------------------------------------------- */
.tenets { list-style: none; padding: 0; margin-top: 3.4rem; }
.tenet {
  display: grid;
  grid-template-columns: 4rem 1fr;
  gap: 1.2rem 2rem;
  padding: 2.6rem 0;
  border-top: 1.5px solid var(--hair-strong);
  align-items: start;
}
.tenet:last-child { border-bottom: 1.5px solid var(--hair-strong); }
.tenet__num {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--ember);
  padding-top: 0.5rem;
}
.tenet__head {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.6rem, 1.1rem + 2.2vw, 3rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  grid-column: 2;
}
.tenet__head .tenet__a { color: var(--fg); }
.tenet__head .tenet__b { color: var(--fg-muted); }
.tenet__body {
  grid-column: 2;
  margin-top: 1rem;
  color: var(--fg-muted);
  max-width: 60ch;
}
@media (max-width: 620px) {
  .tenet { grid-template-columns: 1fr; gap: 0.8rem; }
  .tenet__head, .tenet__body { grid-column: 1; }
}

/* ---- Sign-off ----------------------------------------------------------- */
.signoff {
  margin-top: 3.4rem;
  font-size: clamp(1rem, 0.9rem + 0.8vw, 1.5rem);
  letter-spacing: 0.08em;
  color: var(--teal);
}
.wrap--center .signoff { text-align: center; }

/* ---- Footer ------------------------------------------------------------- */
.footer {
  position: relative;
  z-index: 3;
  padding: clamp(3rem, 8vh, 6rem) var(--pad-x) 3rem;
  border-top: 1px solid var(--hair);
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.4));
}
.footer__inner { max-width: 1140px; margin: 0 auto; display: grid; gap: 1.4rem; }
.footer__brand { display: inline-flex; align-items: center; gap: 0.6rem; font-weight: 500; font-size: 1.05rem; }
.footer__note { color: var(--fg-muted); max-width: 70ch; font-size: 0.92rem; }
.footer__links { display: flex; flex-wrap: wrap; gap: 1.6rem; font-family: var(--font-mono); font-size: 0.82rem; }
.footer__links a { color: var(--fg-muted); position: relative; }
.footer__links a:hover { color: var(--ember); }
.footer__legal { color: var(--fg-muted); font-size: 0.76rem; letter-spacing: 0.04em; }

/* ---- Responsive collapses (the 360px feature-phone-adjacent target) ----- */
@media (max-width: 440px) {
  .stats { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .ledger__row { grid-template-columns: 1fr; gap: 0.5rem; }
  .ledger__label { max-width: none; }
}
@media (pointer: coarse) {
  /* 44px-minimum tap targets on inline nav links (WCAG 2.5.5) */
  .topbar__link, .footer__links a { min-height: 44px; display: inline-flex; align-items: center; }
}

/* ============================================================================
   REVEAL SYSTEM — enabled only when JS is present (html.js).
   Without JS, all content renders fully visible (progressive enhancement).
   ========================================================================== */
.js .reveal-up,
.js .reveal-tenet,
.js [data-stagger-stats] > * {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.8s var(--ease-settle), transform 0.8s var(--ease-settle);
}
.js .reveal-up.is-in,
.js .reveal-tenet.is-in,
.js [data-stagger-stats].is-in > * {
  opacity: 1;
  transform: none;
}

/* word / line masked reveal */
.js .reveal-words .word { display: inline-block; overflow: hidden; vertical-align: top; }
.js .reveal-words .line { display: block; overflow: hidden; }
.js .reveal-words .word__in,
.js .reveal-words .line__in {
  display: inline-block;
  transform: translateY(105%);
  opacity: 0;
  transition: transform 0.9s var(--ease-settle), opacity 0.9s var(--ease-settle);
  transition-delay: var(--d, 0ms);
}
.js .reveal-words.is-in .word__in,
.js .reveal-words.is-in .line__in { transform: translateY(0); opacity: 1; }

/* staggered children */
.js [data-stagger-stats] > * { transition-delay: var(--d, 0ms); }

/* scramble targets just need to be visible; JS swaps glyphs */
.js [data-scramble], .js [data-scramble-line] { font-variant-numeric: tabular-nums; }

/* ---- Reduced motion: dignified static version -------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .js .reveal-up, .js .reveal-tenet, .js [data-stagger-stats] > *,
  .js .reveal-words .word__in, .js .reveal-words .line__in {
    opacity: 1 !important;
    transform: none !important;
  }
  .hero__scrollcue-line, .grain { animation: none !important; }
  .cursor { display: none !important; }
}
