/* Voltface: one self-hosted display font, no framework, one file. */

/* Big Shoulders Display (SIL OFL 1.1, see fonts/OFL.txt): a condensed grotesque
   from industrial signage, the lettering of high-voltage warning signs.
   Display text only; body text stays on the system font. */
@font-face {
  font-family: "Big Shoulders Display";
  src: url("/assets/fonts/big-shoulders-display.v1.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #0b0d12;
  --bg-alt: #11141c;
  --surface: #171b26;
  --border: #262c3b;
  --text: #e8ebf2;
  --muted: #9aa3b8;
  --volt: #f5e663;
  --volt-dim: #b8ac3c;
  --spark: #5ee7ff;
  --danger: #ff5d73;
  --radius: 14px;
  --max: 1120px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --display: "Big Shoulders Display", "Arial Narrow", var(--font);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--spark); }
a:hover { color: var(--volt); }

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .5em; }
h1, h2 { font-family: var(--display); font-weight: 800; letter-spacing: 0; line-height: .95; }
h1 { font-size: clamp(3.2rem, 8vw, 5.75rem); font-weight: 900; }
h2 { font-size: clamp(2.4rem, 5vw, 3.6rem); }
h3 { font-size: 1.2rem; }

sup a { text-decoration: none; font-size: .75em; }

.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--volt); color: #000; padding: .5rem 1rem; z-index: 100;
}
.skip:focus { left: 1rem; }

:focus-visible { outline: 3px solid var(--spark); outline-offset: 3px; border-radius: 4px; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: .85rem 1.4rem;
  border: 2px solid var(--volt);
  border-radius: 999px;
  background: var(--volt);
  color: #111;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { color: #111; transform: translateY(-1px); box-shadow: 0 0 0 6px rgba(245, 230, 99, .15), 0 0 30px rgba(245, 230, 99, .35); }
.btn-ghost { background: transparent; color: var(--volt); }
.btn-ghost:hover { background: rgba(245, 230, 99, .1); color: var(--volt); }
.btn-small { padding: .45rem 1rem; font-size: .95rem; }

/* ---------- Nav ---------- */

.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  max-width: var(--max); margin: 0 auto; padding: 1rem 1.25rem;
  background: rgba(11, 13, 18, .85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.brand { display: flex; align-items: center; gap: .5rem; color: var(--text); text-decoration: none; font-weight: 800; font-size: 1.25rem; }
.brand-mark { width: 28px; height: 28px; fill: var(--volt); filter: drop-shadow(0 0 6px rgba(245, 230, 99, .6)); }
.nav nav { display: flex; align-items: center; gap: 1.25rem; }
.nav nav a:not(.btn) { color: var(--muted); text-decoration: none; font-size: .95rem; }
.nav nav a:not(.btn):hover { color: var(--text); }

.nav-toggle { display: none; }

@media (max-width: 720px) {
  /* Without JS: keep only the Pre-order button, as before. */
  .nav nav a:not(.btn) { display: none; }

  /* With JS: a menu button opens a panel with every link. */
  .js .nav-toggle {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 44px; padding: 0 10px; margin-right: -10px;
    background: none; border: 0; cursor: pointer;
  }
  .js .nav-toggle span { display: block; height: 2px; border-radius: 1px; background: var(--text); transition: transform .25s ease, opacity .25s ease; }
  .js .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .js .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .js .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .js .nav nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: .25rem 1.25rem 1.25rem;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
  }
  .js .nav.is-open nav { display: flex; animation: fade-down .2s ease; }
  .js .nav nav a:not(.btn) { display: block; padding: .9rem 0; border-bottom: 1px solid var(--border); font-size: 1.1rem; color: var(--text); }
  .js .nav nav .btn { margin-top: 1.25rem; text-align: center; }
}

/* ---------- Layout ---------- */

.section { max-width: var(--max); margin: 0 auto; padding: 5rem 1.25rem; }
.section-alt { max-width: none; background: var(--bg-alt); border-block: 1px solid var(--border); }
.section-alt > * { max-width: var(--max); margin-inline: auto; }
.section-lead { color: var(--muted); font-size: 1.2rem; margin: 0 auto 3rem; }
.section > h2, .section > .section-lead { text-align: center; }

/* ---------- Hero ---------- */

.hero {
  max-width: var(--max); margin: 0 auto; padding: 4rem 1.25rem 3rem;
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 3rem; align-items: center;
}
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; } }

.eyebrow { font-family: var(--mono); font-size: .85rem; color: var(--spark); text-transform: uppercase; letter-spacing: .08em; }
/* "Live status" dot: a solid dot with a ring that expands and fades. */
.live-dot { position: relative; display: inline-block; width: 8px; height: 8px; margin-right: .6em; vertical-align: .1em; border-radius: 50%; background: var(--spark); }
.live-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--spark); animation: ping 1.8s ease-out infinite; }
.zap { color: var(--volt); text-shadow: 0 0 24px rgba(245, 230, 99, .35); }
.lead { font-size: 1.25rem; color: var(--muted); max-width: 36em; }
.lead em { color: var(--text); font-style: normal; border-bottom: 2px dashed var(--volt-dim); }
.cta-row { display: flex; flex-wrap: wrap; gap: 1rem; margin: 2rem 0 1rem; }
.fineprint { font-size: .9rem; color: var(--muted); }

.hero-visual { margin: 0; padding: 4.5rem 0 1rem; text-align: center; }
.hero-visual figcaption { color: var(--muted); font-size: .85rem; margin-top: calc(min(320px, 80vw) * .275 + 1rem); }

.band {
  position: relative;
  width: min(320px, 80vw); aspect-ratio: 1 / 1.25; margin: 0 auto;
  border-radius: 48% / 40%;
  background:
    radial-gradient(circle at 30% 20%, #3a4254 0%, transparent 45%),
    linear-gradient(160deg, #2a3040, #12151d);
  box-shadow: inset 0 0 0 10px #1c212d, 0 30px 80px rgba(0, 0, 0, .6), 0 0 80px rgba(94, 231, 255, .08);
  display: grid; place-items: center;
}
.band::before, .band::after {
  content: ""; position: absolute; left: 50%; width: 46%; height: 30%;
  transform: translateX(-50%);
  background: linear-gradient(90deg, #1a1e28, #262b38, #1a1e28);
  z-index: -1; border-radius: 10px;
}
.band::before { top: -22%; }
.band::after { bottom: -22%; }

.band-screen {
  width: 64%; aspect-ratio: 1; border-radius: 26%;
  background: #05070b;
  box-shadow: inset 0 0 30px rgba(94, 231, 255, .15);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem;
  font-family: var(--mono);
}
.band-label { font-size: .7rem; color: var(--muted); letter-spacing: .15em; }
.band-value { font-size: 2.6rem; font-weight: 700; color: var(--spark); text-shadow: 0 0 14px rgba(94, 231, 255, .6); }
.band-bar { width: 60%; height: 6px; border-radius: 3px; background: #1d2230; overflow: hidden; }
.band-bar span { display: block; height: 100%; width: var(--integrity, 97%); background: linear-gradient(90deg, var(--spark), var(--volt)); transition: width .4s ease; }
.band.is-zapping { animation: shake .35s linear 2; }
.band.is-zapping .band-value { color: var(--danger); text-shadow: 0 0 14px rgba(255, 93, 115, .8); }

/* ---------- Logos ---------- */

.logos { max-width: var(--max); margin: 0 auto; padding: 1rem 1.25rem 3rem; text-align: center; }
.logos p { color: var(--muted); font-size: .9rem; }
.logos ul { list-style: none; padding: 0; margin: 1rem 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem 3rem; }
.logos li { font-weight: 800; font-size: 1.3rem; color: #4d5568; letter-spacing: .02em; }

/* ---------- Steps ---------- */

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }
.steps li { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem; }
.step-num { font-family: var(--mono); color: var(--volt); font-size: .9rem; display: block; margin-bottom: 1rem; }
.steps p { color: var(--muted); margin: 0; }
.steps strong { color: var(--text); }

/* ---------- Science ---------- */

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.stats { list-style: none; padding: 0; margin: 0 auto 1.5rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.25rem; }
.stat { display: flex; flex-direction: column; gap: .25rem; padding: 1.5rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); border-top: 3px solid var(--volt); }
.stat-label { color: var(--muted); font-size: .9rem; }
.stat-value { font-family: var(--display); font-size: 3.4rem; font-weight: 800; line-height: 1; color: var(--text); }
.stat-note { color: var(--muted); font-size: .85rem; }

.science-card { padding: 2rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.science-card p { color: var(--muted); }
.science-card strong { color: var(--text); }
.science-card > :last-child { margin-bottom: 0; }
.science-wide { margin-bottom: 1.5rem; }
.science-aside { font-size: .95rem; font-style: italic; }
.science-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 1.5rem; }
.science-chart-card { grid-column: 1 / -1; }

@media (min-width: 900px) {
  .science-chart-card { display: grid; grid-template-columns: 1fr 1.4fr; grid-template-rows: auto 1fr; column-gap: 3rem; }
  .science-chart-card > h3, .science-chart-card > p { grid-column: 1; }
  .science-chart-card > .chart { grid-column: 2; grid-row: 1 / span 2; margin: 0; }
}

.science-patents { margin: 2.5rem auto 0; text-align: center; color: var(--muted); font-size: .95rem; font-style: italic; }

@media (max-width: 480px) {
  .science-grid { grid-template-columns: 1fr; }
  .science-card { padding: 1.5rem; }
}

/* Libet timeline */
.timeline { list-style: none; position: relative; margin: 2.5rem 0 2rem; padding: 0; height: 7rem; }
.timeline::before { content: ""; position: absolute; left: 0; right: 0; top: .45rem; height: 2px; background: var(--border); }
.timeline li { position: absolute; left: var(--at); top: 0; width: 9.5rem; transform: translateX(-50%); text-align: center; }
.timeline li:first-child { transform: none; text-align: left; }
.timeline li:last-child { transform: translateX(-100%); text-align: right; }
.timeline li::before { content: ""; display: block; width: 12px; height: 12px; margin: 0 auto .6rem; border-radius: 50%; background: var(--muted); box-shadow: 0 0 0 3px var(--surface); }
.timeline li:first-child::before { margin-left: 0; }
.timeline li:last-child::before { margin-right: 0; }
.tl-time { display: block; font-family: var(--mono); font-size: .85rem; color: var(--text); }
.tl-text { display: block; font-size: .85rem; color: var(--muted); line-height: 1.35; }
.tl-zap::before { background: var(--volt) !important; box-shadow: 0 0 0 3px var(--surface), 0 0 14px rgba(245, 230, 99, .8) !important; }
.tl-zap .tl-text { color: var(--text); font-weight: 600; }
.tl-cancelled .tl-text { text-decoration: line-through; text-decoration-color: var(--danger); }
.tl-cancelled::before { background: transparent !important; border: 2px solid var(--muted); }

@media (max-width: 720px) {
  .timeline { height: auto; margin-left: .4rem; }
  .timeline::before { left: 5px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; }
  .timeline li, .timeline li:first-child, .timeline li:last-child {
    position: relative; left: 0; width: auto; transform: none; text-align: left;
    padding: 0 0 1.25rem 1.75rem;
  }
  .timeline li::before, .timeline li:first-child::before, .timeline li:last-child::before {
    position: absolute; left: 0; top: .3rem; margin: 0;
  }
}

/* Chart */
.chart { margin: 1.5rem 0 0; }
.chart figcaption { margin-bottom: .75rem; }
.chart-title { display: block; font-weight: 600; color: var(--text); }
.chart-sub { display: block; font-size: .85rem; color: var(--muted); }
.chart-plot { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-grid line { stroke: var(--border); stroke-width: 1; }
.chart-axis text { fill: var(--muted); font-size: 12px; font-family: var(--font); }
.chart-axis-y text { text-anchor: end; }
.chart-axis-x text { text-anchor: middle; }
.chart-line { fill: none; stroke: var(--volt); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.chart-dot { fill: var(--volt); stroke: var(--surface); stroke-width: 2; }
.chart-end-label { fill: var(--text); font-size: 13px; font-weight: 600; }
.chart-end-note { fill: var(--muted); font-size: 11px; }
@media (max-width: 600px) {
  .chart-axis text { font-size: 18px; }
  .chart-end-label { font-size: 19px; }
  .chart-end-note { font-size: 16px; }
  .chart-end-note + .chart-end-note { transform: translateY(4px); }
}
.chart-crosshair { stroke: var(--muted); stroke-width: 1; }
.chart-hit { fill: transparent; cursor: crosshair; }
.chart svg [hidden] { display: none; } /* SVG elements ignore the hidden attribute in some browsers */
.chart svg:focus-visible { outline: 3px solid var(--spark); outline-offset: 4px; }
.chart-tooltip {
  position: absolute; top: 0; pointer-events: none; transform: translateX(-50%);
  padding: .4rem .65rem; border-radius: 8px; white-space: nowrap;
  background: var(--bg); border: 1px solid var(--border); box-shadow: 0 6px 20px rgba(0, 0, 0, .4);
  font-size: .8rem; color: var(--muted);
}
.chart-tooltip strong { display: block; font-size: .95rem; color: var(--text); }
.chart-table { margin-top: .75rem; font-size: .85rem; }
.chart-table summary { cursor: pointer; color: var(--muted); }
.chart-table table, .mk-scale { width: 100%; border-collapse: collapse; margin-top: .5rem; }
.chart-table th, .chart-table td, .mk-scale th, .mk-scale td { padding: .4rem .25rem; border-bottom: 1px solid var(--border); text-align: left; }
.chart-table th, .mk-scale th { color: var(--muted); font-weight: 600; font-size: .8rem; }
.chart-table td, .mk-scale td { color: var(--text); }
.chart-table td:not(:first-child), .chart-table th:not(:first-child),
.mk-scale td:last-child, .mk-scale th:last-child { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mk-scale { font-size: .95rem; }

/* ---------- Glitches ---------- */

.glitches { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.25rem; }
.glitches li { display: grid; grid-template-columns: auto 1fr; column-gap: 1rem; padding: 1.25rem; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); }
.g-icon { grid-row: span 2; font-size: 1.8rem; line-height: 1; }
.glitches h3 { margin: 0 0 .25rem; }
.glitches p { margin: 0; color: var(--muted); }
.glitches li:hover h3 { animation: glitch-text .3s steps(2) 1; }

/* ---------- Demo ---------- */

.demo { display: grid; gap: 2rem; }

.demo-call {
  position: relative;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem;
  padding: .6rem; border-radius: var(--radius);
  background: #000; border: 1px solid var(--border);
  max-width: 760px; width: 100%; margin: 0 auto;
}
.call-tile { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; background: #1b2030; display: grid; place-items: center; overflow: hidden; }
.call-tile-you { box-shadow: inset 0 0 0 2px var(--spark); }
.call-avatar { font-size: clamp(2rem, 6vw, 3.5rem); }
.call-name { position: absolute; left: .6rem; bottom: .5rem; font-size: .8rem; background: rgba(0, 0, 0, .55); padding: .1rem .5rem; border-radius: 4px; }

.call-overlay {
  position: absolute; inset: 0; border-radius: var(--radius);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: rgba(5, 7, 11, .82); text-align: center; padding: 1rem;
}
.call-overlay[hidden] { display: none; }
.overlay-title { font-weight: 700; font-size: 1.3rem; margin: 0; }
.overlay-sub { color: var(--muted); margin: .25rem 0 0; font-family: var(--mono); }

.demo-call.is-freeze .call-tile-you { filter: grayscale(1) contrast(1.4) blur(1px); }
.demo-call.is-glitch .call-tile-you { animation: rgb-split .12s steps(2) infinite; }
.demo-call.is-update .call-tile { filter: brightness(.25); }

.demo-form { max-width: 760px; width: 100%; margin: 0 auto; }
.demo-form label { display: block; font-weight: 600; margin-bottom: .5rem; }
.demo-input { display: flex; gap: .75rem; }
.demo-input input {
  flex: 1; min-width: 0;
  padding: .85rem 1rem; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font: inherit;
}
.demo-input input::placeholder { color: #5f677b; }
.demo-suggestions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.chip {
  border: 1px solid var(--border); background: transparent; color: var(--muted);
  padding: .35rem .8rem; border-radius: 999px; font: inherit; font-size: .9rem; cursor: pointer;
}
.chip:hover { border-color: var(--volt-dim); color: var(--text); }
.demo-result { min-height: 3.2em; margin-top: 1.25rem; font-family: var(--mono); font-size: .95rem; }
.demo-result.is-bad { color: var(--danger); }
.demo-result.is-ok { color: var(--spark); }

@media (max-width: 560px) {
  .demo-input { flex-direction: column; }
}

/* Full-page zap flash */
body.is-zapped::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 200;
  background: radial-gradient(circle, rgba(245, 230, 99, .35), rgba(94, 231, 255, .1) 60%, transparent);
  animation: flash .45s ease-out 1 forwards;
}
body.is-zapped main { animation: shake .3s linear 1; }

/* ---------- Testimonials ---------- */

.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.quotes blockquote { margin: 0; padding: 2rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.quotes p { margin: 0 0 1rem; font-size: 1.1rem; }
.quotes footer { color: var(--muted); font-size: .9rem; }

/* ---------- Pricing ---------- */

.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; padding: 2rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.plan-featured { border-color: var(--volt); box-shadow: 0 0 60px rgba(245, 230, 99, .12); }
.plan-badge {
  position: absolute; top: -.85rem; left: 50%; transform: translateX(-50%); margin: 0;
  background: var(--volt); color: #111; font-size: .8rem; font-weight: 700; padding: .2rem .8rem; border-radius: 999px; white-space: nowrap;
}
.price { font-family: var(--display); font-size: 3rem; font-weight: 800; line-height: 1; margin: 0 0 1rem; }
.price span { font-family: var(--font); font-size: 1rem; font-weight: 400; color: var(--muted); }
.plan ul { padding-left: 1.2rem; margin: 0 0 2rem; color: var(--muted); flex: 1; }
.plan li { margin-bottom: .4rem; }
.plan .btn { text-align: center; }

/* ---------- FAQ ---------- */

.faq { max-width: 760px; margin-inline: auto; }
.faq details { border-bottom: 1px solid var(--border); padding: 1.1rem 0; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 1.1rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--volt); font-weight: 400; font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq p { color: var(--muted); margin: .75rem 0 0; }
.zap-inline { display: inline-block; color: var(--volt); margin: 0 .2em; animation: blink 1.2s steps(2) infinite; }

/* ---------- Footnotes & footer ---------- */

.footnotes { padding-top: 2rem; padding-bottom: 2rem; font-size: .85rem; color: var(--muted); }
.footnotes ol { margin: 0; padding-left: 1.2rem; }

.site-footer { border-top: 1px solid var(--border); padding: 2rem 1.25rem 3rem; text-align: center; color: var(--muted); font-size: .9rem; }
.site-footer p { margin: .3rem 0; }

/* ---------- Modal ---------- */

.modal {
  max-width: 440px; padding: 2rem; border-radius: var(--radius);
  border: 1px solid var(--volt); background: var(--surface); color: var(--text);
}
.modal::backdrop { background: rgba(0, 0, 0, .7); }
.modal[open] { animation: modal-in .25s ease; }
.modal[open]::backdrop { animation: fade-in .25s ease; }
.modal p { color: var(--muted); }

/* ---------- Simple pages (legal, 404) ---------- */

.page { max-width: 760px; margin: 0 auto; padding: 4rem 1.25rem; }
.page p, .page li { color: var(--muted); }
.page h2 { font-size: 2rem; margin-top: 2.5rem; }
.page-404 { min-height: 70vh; display: grid; place-content: center; text-align: center; }
.page-404 h1 { font-size: clamp(4rem, 15vw, 9rem); color: var(--volt); animation: glitch-text 2s steps(2) infinite; }

/* ---------- Fade-up: hero on load, .reveal on scroll ----------
   Only applies when JS runs (html.js is set in <head>), so content stays
   visible without JS. assets/app.js adds .is-visible as elements scroll in. */

.js .hero-text > *, .js .hero-visual { opacity: 0; animation: fade-up .8s ease forwards; }
.js .hero-text > :nth-child(1) { animation-delay: .1s; }
.js .hero-text > :nth-child(2) { animation-delay: .25s; }
.js .hero-text > :nth-child(3) { animation-delay: .45s; }
.js .hero-text > :nth-child(4) { animation-delay: .6s; }
.js .hero-text > :nth-child(5) { animation-delay: .75s; }
.js .hero-visual { animation-duration: 1s; animation-delay: .4s; }

.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
  transition-delay: calc(var(--reveal-i, 0) * 80ms); /* siblings follow each other */
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Animations ---------- */

@keyframes shake {
  0%, 100% { transform: translate(0); }
  20% { transform: translate(-4px, 2px); }
  40% { transform: translate(4px, -2px); }
  60% { transform: translate(-3px, -1px); }
  80% { transform: translate(3px, 1px); }
}
@keyframes flash { from { opacity: 1; } to { opacity: 0; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes ping { from { transform: scale(1); opacity: .7; } to { transform: scale(3); opacity: 0; } }
@keyframes fade-down { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes blink { 50% { opacity: .2; } }
@keyframes rgb-split {
  0% { filter: drop-shadow(-4px 0 0 rgba(255, 0, 80, .8)) drop-shadow(4px 0 0 rgba(0, 220, 255, .8)); transform: translateX(-2px); }
  100% { filter: drop-shadow(4px 0 0 rgba(255, 0, 80, .8)) drop-shadow(-4px 0 0 rgba(0, 220, 255, .8)); transform: translateX(2px); }
}
@keyframes glitch-text {
  0%, 100% { text-shadow: none; transform: none; }
  50% { text-shadow: -2px 0 var(--danger), 2px 0 var(--spark); transform: translateX(1px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal, .js .hero-text > *, .js .hero-visual { opacity: 1; transform: none; }
}
