/* NEAR, Filtered — layout, components and motion. Colours come from
   tokens.css. Every animation is opt-in via html.motion (set only when the
   reader has not asked for reduced motion), so without it each element is
   simply in its final state. */
* { box-sizing: border-box; margin: 0; }
html { color-scheme: dark; scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  background: var(--bg); color: var(--text);
  font-family: var(--font-body); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
::selection { background: var(--lime); color: var(--bg); }
a { color: var(--cobalt-soft); text-underline-offset: 3px; }
a:focus-visible, summary:focus-visible, button:focus-visible {
  outline: 2px solid var(--cobalt); outline-offset: 2px; border-radius: 6px;
}
code { font-family: var(--font-mono); font-size: 0.86em; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--surface); color: var(--text); padding: var(--s1) var(--s2); z-index: 100; }
.skip:focus { left: var(--s2); }

/* ---------- top bar ---------- */
.progress { position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 60; }
.progress span { display: block; height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(90deg, var(--cobalt), var(--lime)); }
.topnav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50; height: 60px;
  display: flex; align-items: center; gap: var(--s3); padding: 0 var(--s3);
  background: rgba(5, 6, 10, 0.62); backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent; transition: border-color 240ms, background 240ms;
}
.topnav.scrolled { border-bottom-color: var(--border); background: rgba(5, 6, 10, 0.82); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none;
  font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; }
.brand .mark { width: 18px; height: 18px; background: var(--lime);
  clip-path: polygon(0 0, 100% 0, 62% 48%, 62% 86%, 38% 100%, 38% 48%); }
.links { display: flex; gap: 2px; margin: 0 auto; overflow-x: auto; scrollbar-width: none; }
.links::-webkit-scrollbar { display: none; }
.links a {
  position: relative; color: var(--text-muted); text-decoration: none; white-space: nowrap;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; padding: 6px 12px; border-radius: 999px;
  transition: color 180ms, background 180ms;
}
.links a:hover { color: var(--text); background: var(--surface-2); }
.links a.active { color: var(--bg); background: var(--lime); }
.gh { font-family: var(--font-mono); font-size: 12px; color: var(--text); text-decoration: none; white-space: nowrap;
  border: 1px solid var(--border); padding: 6px 14px; border-radius: 999px; transition: border-color 180ms, background 180ms; }
.gh:hover { border-color: var(--text-faint); background: var(--surface-2); }
@media (max-width: 820px) {
  .topnav { gap: var(--s2); padding: 0 var(--s2); }
  .brand { font-size: 0; gap: 0; } .brand .mark { width: 20px; height: 20px; }
  .gh { display: none; } .links { margin: 0; }
}

/* ---------- hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; overflow: hidden;
  padding: 108px var(--s3) var(--s8); isolation: isolate; }
.hero::before { /* faint measurement grid */
  content: ""; position: absolute; inset: 0; z-index: -2; opacity: 0.5;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
}
.hero::after { /* fade into the page */
  content: ""; position: absolute; inset: auto 0 0 0; height: 180px; z-index: -1;
  background: linear-gradient(transparent, var(--bg));
}
#field { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero-inner { max-width: 1120px; margin: 0 auto; width: 100%; position: relative; }
.eyebrow { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.22em; color: var(--cobalt-soft); text-transform: uppercase; }
.headline {
  font-family: var(--font-display); font-weight: 700; font-size: clamp(40px, 7.4vw, 96px);
  line-height: 0.98; letter-spacing: -0.035em; margin: var(--s3) 0; max-width: 15ch;
}
.headline .against { color: var(--coral); text-shadow: 0 0 42px rgba(255, 92, 122, 0.35); }
.headline .w { display: inline-block; }
.sub { color: var(--text-muted); max-width: 60ch; font-size: clamp(16px, 1.6vw, 19px); }
.sub code { color: var(--text); }
.verdict-strip { display: flex; flex-wrap: wrap; gap: 8px; margin-top: var(--s4); }
.verdict-strip a { text-decoration: none; }
.hero-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s2); margin-top: var(--s4); max-width: 900px; }
.hstat { border-left: 1px solid var(--border); padding-left: var(--s2); }
.hstat .n { font-family: var(--font-display); font-weight: 700; font-size: clamp(26px, 3.4vw, 40px); line-height: 1.1;
  font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.hstat .l { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-muted); margin-top: 4px; line-height: 1.4; }
.hstat.coral .n { color: var(--coral); } .hstat.lime .n { color: var(--lime); } .hstat.amber .n { color: var(--amber); }
@media (max-width: 720px) { .hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--s3); } }
.windowline { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-faint); margin-top: var(--s4); }
.scrollcue { position: absolute; left: 50%; bottom: 28px; width: 24px; height: 38px; margin-left: -12px;
  border: 1.5px solid var(--text-faint); border-radius: 14px; }
.scrollcue span { position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: var(--text-muted); }
@media (max-height: 700px) { .scrollcue { display: none; } }

/* ---------- sections ---------- */
main { max-width: 1120px; margin: 0 auto; padding: 0 var(--s3); counter-reset: sec; }
section { margin-top: 120px; }
section > h2 {
  counter-increment: sec;
  font-family: var(--font-display); font-weight: 700; font-size: clamp(26px, 3.4vw, 40px);
  letter-spacing: -0.025em; line-height: 1.1; margin-bottom: var(--s3); text-wrap: balance;
  display: flex; align-items: baseline; gap: var(--s2);
}
section > h2::before {
  content: counter(sec, decimal-leading-zero); font-family: var(--font-mono); font-weight: 400;
  font-size: 13px; letter-spacing: 0.1em; color: var(--lime); flex: none; transform: translateY(-6px);
}
.lede { color: var(--text-muted); max-width: 70ch; margin: calc(-1 * var(--s1)) 0 var(--s4); font-size: 16px; }
#mind .lede { margin: var(--s3) 0 0; }

/* ---------- scoreboard ---------- */
.board { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s2); perspective: 1000px; }
@media (max-width: 1080px) { .board { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 680px) { .board { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .board { grid-template-columns: 1fr; } }
.card {
  --mx: 50%; --my: 0%; --accent: var(--text-faint);
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: var(--s3) var(--s2) var(--s2); display: flex; flex-direction: column; gap: var(--s1);
  color: inherit; text-decoration: none; transform-style: preserve-3d;
  transition: border-color 220ms, transform 220ms cubic-bezier(.2,.7,.2,1), box-shadow 220ms;
}
.card::before { /* cursor spotlight */
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity 220ms;
  background: radial-gradient(360px circle at var(--mx) var(--my), color-mix(in srgb, var(--accent) 22%, transparent), transparent 60%);
}
.card:hover::before, .card:focus-visible::before { opacity: 1; }
.card:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); box-shadow: 0 18px 50px -20px color-mix(in srgb, var(--accent) 45%, transparent); }
.card.rejected { --accent: var(--coral); } .card.supported { --accent: var(--lime); } .card.inconclusive { --accent: var(--amber); }
.card .top { display: flex; justify-content: space-between; align-items: center; }
.card .hid { font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); }
.card .hname { font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: -0.01em; }
.card .spark { width: 100%; height: 44px; margin: 4px 0; overflow: visible; }
.card .spark path.l { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.card .spark path.a { fill: var(--accent); opacity: 0.12; }
.card .spark path.dot { stroke: var(--accent); stroke-width: 7; stroke-linecap: round; }
.card .one { font-size: 13px; color: var(--text-muted); line-height: 1.45; }
.card .one strong { color: var(--text); font-variant-numeric: tabular-nums; }
.card .go { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); margin-top: auto; padding-top: var(--s1); transition: color 200ms, transform 200ms; }
.card:hover .go { color: var(--accent); transform: translateX(4px); }

.chip {
  display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.08em; padding: 3px 10px; border-radius: 999px; border: 1px solid; white-space: nowrap;
  background: rgba(5, 6, 10, 0.5);
}
.chip.rejected     { color: var(--coral); border-color: var(--coral); } .chip.rejected::before { content: "✕"; }
.chip.supported    { color: var(--lime);  border-color: var(--lime);  } .chip.supported::before { content: "✓"; }
.chip.inconclusive { color: var(--amber); border-color: var(--amber); } .chip.inconclusive::before { content: "~"; }
.chip b { color: var(--text-muted); font-weight: 400; }
.verdict-strip .chip { font-size: 12px; padding: 6px 14px; transition: background 180ms, transform 180ms; }
.verdict-strip .chip:hover { transform: translateY(-2px); }
.verdict-strip .chip.rejected:hover { background: rgba(255,92,122,0.12); }
.verdict-strip .chip.supported:hover { background: rgba(198,255,26,0.10); }
.verdict-strip .chip.inconclusive:hover { background: rgba(255,176,32,0.10); }

/* ---------- panels ---------- */
.panel {
  position: relative; background: linear-gradient(180deg, var(--surface-2), var(--surface) 140px);
  border: 1px solid var(--border); border-radius: calc(var(--radius) + 4px); padding: var(--s4);
}
.panel + .panel { margin-top: var(--s3); }
.panel.sig { border-color: rgba(198,255,26,0.35); box-shadow: var(--glow-lime), inset 0 1px 0 rgba(198,255,26,0.15); }
.panel.against-glow { border-color: rgba(255,92,122,0.35); box-shadow: var(--glow-coral), inset 0 1px 0 rgba(255,92,122,0.15); }
.panel h3 { font-family: var(--font-display); font-weight: 500; font-size: clamp(20px, 2.2vw, 25px);
  letter-spacing: -0.015em; line-height: 1.25; max-width: 46ch; text-wrap: balance; }
.panel h3 .vw { display: inline-block; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; vertical-align: 4px; margin-left: 10px;
  padding: 2px 10px; border-radius: 999px; border: 1px solid currentColor; }
.vw.rejected { color: var(--coral); } .vw.supported { color: var(--lime); } .vw.inconclusive { color: var(--amber); }
.panel .plain { color: var(--text-muted); font-size: 15px; margin-top: var(--s1); max-width: 74ch; }
.figure { margin-top: var(--s3); min-height: 60px; }
.figure svg { overflow: visible; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
@media (max-width: 760px) { .cols { grid-template-columns: 1fr; } }
.source { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-faint); margin-top: var(--s2);
  display: flex; justify-content: space-between; gap: var(--s2); flex-wrap: wrap; }
.source a { color: var(--text-muted); }
.source a:hover { color: var(--lime); }
details.sql { margin-top: var(--s2); }
details.sql summary { font-family: var(--font-mono); font-size: 12px; color: var(--cobalt-soft); cursor: pointer; list-style: none; display: inline-flex; gap: 8px; align-items: center; }
details.sql summary::-webkit-details-marker { display: none; }
details.sql summary::before { content: "›"; display: inline-block; transition: transform 200ms; font-size: 15px; }
details.sql[open] summary::before { transform: rotate(90deg); }
details.sql pre { margin-top: var(--s2); background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
  padding: var(--s2); overflow: auto; font-family: var(--font-mono); font-size: 12px; line-height: 1.55; color: var(--text-muted); max-height: 420px; }
.note { border-left: 2px solid var(--amber); padding: var(--s1) var(--s2); color: var(--text-muted); font-size: 14px;
  margin-top: var(--s2); background: rgba(255,176,32,0.05); border-radius: 0 10px 10px 0; }
@media (max-width: 560px) { .panel { padding: var(--s3) var(--s2); } }

/* Plot tooltips, restyled for the dark terminal */
.figure [aria-label="tip"] path { fill: var(--surface-2); stroke: var(--border); }
.figure [aria-label="tip"] text { fill: var(--text); }

/* ---------- heatmap ---------- */
.heat { display: grid; grid-template-columns: auto repeat(3, minmax(0, 1fr)); gap: 6px; max-width: 640px; }
.heat .corner, .heat .coltag, .heat .rowtag { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-faint); display: flex; align-items: center; justify-content: center; }
.heat .rowtag { justify-content: flex-end; padding-right: var(--s1); white-space: nowrap; }
.cell { border-radius: 10px; padding: 12px 6px; text-align: center; font-family: var(--font-mono); font-size: 11.5px; line-height: 1.3;
  border: 1px solid transparent; transition: transform 160ms, filter 160ms; cursor: default; }
.cell:hover { transform: scale(1.06); filter: brightness(1.25); position: relative; z-index: 1; }
.cell b { display: block; font-size: 14px; font-variant-numeric: tabular-nums; }
.cell.against { background: rgba(255,92,122,0.14); color: var(--coral); border-color: rgba(255,92,122,0.35); }
.cell.flat    { background: rgba(255,176,32,0.10); color: var(--amber); border-color: rgba(255,176,32,0.30); }
.cell.with    { background: rgba(198,255,26,0.10); color: var(--lime);  border-color: rgba(198,255,26,0.30); }
.cell.default-cell { outline: 2px solid var(--text); outline-offset: 2px; }
.legend { display: flex; gap: var(--s3); margin-top: var(--s3); font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); flex-wrap: wrap; }
.legend span::before { content: "■ "; }
.legend .l1::before { color: var(--coral); } .legend .l2::before { color: var(--amber); } .legend .l3::before { color: var(--lime); }

/* ---------- exploratory ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: var(--s2); margin-top: var(--s3); }
.stat { background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: var(--s2); }
.stat .k { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-faint); }
.stat .v { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-top: 6px; font-family: var(--font-display); font-variant-numeric: tabular-nums; }
.stat .from { color: var(--text-muted); font-size: 17px; }
.stat .to { font-size: 24px; font-weight: 700; color: var(--text); }
.stat .arrow { color: var(--amber); font-family: var(--font-mono); font-size: 13px; }
.stat .mo { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 10.5px; color: var(--text-faint); margin-top: 2px; }

/* ---------- what would change our mind ---------- */
.mindgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--s2); }
.mind { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s3);
  display: grid; gap: var(--s1); transition: border-color 200ms, transform 200ms; }
.mind:hover { border-color: var(--cobalt); transform: translateY(-3px); }
.mind .if { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; color: var(--cobalt-soft); text-transform: uppercase; }
.mind .f { color: var(--text); font-size: 15.5px; line-height: 1.45; }
.mind .m { color: var(--text-muted); font-size: 14px; border-top: 1px dashed var(--border); padding-top: var(--s1); }
.mind .m::before { content: "→ "; color: var(--lime); }

/* ---------- cases ---------- */
.tabs { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); margin-bottom: var(--s3); position: relative; }
.tabs button { all: unset; position: relative; z-index: 1; cursor: pointer; font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.08em;
  text-transform: uppercase; padding: 8px 20px; border-radius: 999px; color: var(--text-muted); transition: color 200ms; }
.tabs button[aria-selected="true"] { color: var(--bg); }
.tabs .pill { position: absolute; top: 4px; bottom: 4px; left: 0; width: 0; border-radius: 999px; background: var(--text);
  transition: transform 320ms cubic-bezier(.2,.8,.2,1), width 320ms cubic-bezier(.2,.8,.2,1), background 320ms; }
.casegrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); }
@media (max-width: 900px) { .casegrid { grid-template-columns: 1fr; } }
.case { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s3);
  transition: opacity 300ms, transform 300ms, border-color 300ms, filter 300ms; }
.casegrid.focus .case { opacity: 0.35; filter: saturate(0.4); }
.casegrid.focus .case.on { opacity: 1; filter: none; transform: translateY(-4px); }
.case h4 { font-family: var(--font-display); font-size: 22px; font-weight: 700; text-transform: capitalize; }
.case .stance { color: var(--text-muted); font-size: 14px; margin: var(--s1) 0 var(--s2); }
.case ul { margin: 0; padding: 0; list-style: none; font-size: 13.5px; color: var(--text-muted); display: grid; gap: var(--s2); }
.case li { border-top: 1px solid var(--border); padding-top: var(--s2); }
.case li b { display: block; color: var(--text); font-weight: 600; margin-bottom: 4px; }
.case li .ok::before { content: "✓ "; color: var(--lime); } .case li .ko::before { content: "✕ "; color: var(--coral); }
.case.bull h4 { color: var(--lime); } .case.bear h4 { color: var(--coral); } .case.base h4 { color: var(--cobalt-soft); }
.case.bull.on { border-color: rgba(198,255,26,0.45); } .case.bear.on { border-color: rgba(255,92,122,0.45); } .case.base.on { border-color: rgba(110,139,255,0.5); }

/* ---------- amendments timeline ---------- */
.timeline { list-style: none; padding: 0; position: relative; display: grid; gap: var(--s3); }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 1px;
  background: linear-gradient(var(--lime), var(--cobalt), transparent); }
.timeline li { position: relative; padding-left: 40px; }
.timeline li::before { content: ""; position: absolute; left: 0; top: 6px; width: 15px; height: 15px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--lime); box-shadow: 0 0 0 4px var(--bg); }
.timeline .tag { font-family: var(--font-mono); font-size: 12px; color: var(--lime); }
.timeline .tag span { color: var(--text-faint); }
.timeline p { color: var(--text-muted); font-size: 15px; margin-top: 4px; max-width: 80ch; }

/* ---------- verify ---------- */
.verify { display: grid; grid-template-columns: 1fr 1.1fr; gap: var(--s4); align-items: center;
  padding: var(--s6) var(--s4); border-radius: 24px; border: 1px solid var(--border);
  background: radial-gradient(600px 300px at 0% 0%, rgba(47,91,255,0.18), transparent 70%),
              radial-gradient(600px 300px at 100% 100%, rgba(198,255,26,0.10), transparent 70%), var(--surface); }
.verify h2 { font-family: var(--font-display); font-weight: 700; font-size: clamp(28px, 3.6vw, 44px); letter-spacing: -0.03em; line-height: 1.05; }
.verify p { color: var(--text-muted); margin-top: var(--s2); max-width: 46ch; }
.term { position: relative; background: var(--bg); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; box-shadow: 0 30px 80px -30px rgba(0,0,0,0.8); }
.term .bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.term .bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--border); }
.term .bar span { margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); }
.term pre { padding: var(--s2); font-family: var(--font-mono); font-size: 13px; line-height: 1.8; overflow-x: auto; color: var(--text); }
.term .pr { color: var(--lime); }
.copy { position: absolute; right: 10px; bottom: 10px; font-family: var(--font-mono); font-size: 11px; cursor: pointer;
  color: var(--text-muted); background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 5px 10px; transition: color 180ms, border-color 180ms; }
.copy:hover { color: var(--text); border-color: var(--text-faint); }
.copy.done { color: var(--lime); border-color: var(--lime); }
@media (max-width: 860px) { .verify { grid-template-columns: 1fr; padding: var(--s4) var(--s3); } }

/* ---------- footer ---------- */
footer { max-width: 1120px; margin: 120px auto 0; padding: var(--s3) var(--s3) var(--s6); border-top: 1px solid var(--border);
  font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); display: grid; gap: var(--s1); }
footer a { color: var(--text-muted); }
footer a:hover { color: var(--lime); }
.totop { position: fixed; right: 20px; bottom: 20px; z-index: 40; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; text-decoration: none; color: var(--text); background: var(--surface-2);
  border: 1px solid var(--border); opacity: 0; pointer-events: none; transform: translateY(10px);
  transition: opacity 240ms, transform 240ms, border-color 180ms; }
.totop.show { opacity: 1; pointer-events: auto; transform: none; }
.totop:hover { border-color: var(--lime); color: var(--lime); }

@media (max-width: 560px) {
  main { padding: 0 var(--s2); } .hero { padding: 96px var(--s2) var(--s6); }
  section { margin-top: 88px; } footer { padding: var(--s3) var(--s2) var(--s6); }
}

/* =================== motion (opt-in) =================== */
@keyframes rise { from { opacity: 0; transform: translateY(0.5em) rotate(3deg); } to { opacity: 1; transform: none; } }
@keyframes fadeup { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes cue { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(12px); opacity: 0; } 100% { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(0.6); } to { opacity: 1; transform: none; } }

.motion .headline .w { animation: rise 760ms cubic-bezier(.2,.75,.2,1) both; animation-delay: calc(var(--d) * 55ms + 120ms); }
.motion .fade-up { animation: fadeup 800ms cubic-bezier(.2,.75,.2,1) both; animation-delay: calc(var(--d) * 55ms + 120ms); }
.motion .scrollcue span { animation: cue 1.8s ease-in-out infinite; }

.motion .reveal { opacity: 0; transform: translateY(28px); transition: opacity 800ms cubic-bezier(.2,.75,.2,1), transform 800ms cubic-bezier(.2,.75,.2,1); }
.motion .reveal.in { opacity: 1; transform: none; }
.motion .card, .motion .mind, .motion .case, .motion .timeline li {
  opacity: 0; transform: translateY(24px);
  transition: opacity 700ms cubic-bezier(.2,.75,.2,1), transform 700ms cubic-bezier(.2,.75,.2,1), border-color 220ms, box-shadow 220ms, filter 300ms;
  transition-delay: calc(var(--i, 0) * 80ms);
}
.motion .in .card, .motion .in .mind, .motion .in .case, .motion .in.timeline li, .motion .timeline.in li { opacity: 1; transform: none; }
.motion .in .card:hover { transition-delay: 0ms; }
.motion .casegrid.in.focus .case { opacity: 0.35; }
.motion .casegrid.in.focus .case.on { opacity: 1; transform: translateY(-4px); }
.motion .heat .cell { opacity: 0; }
.motion .heat.in .cell { animation: pop 520ms cubic-bezier(.3,1.4,.5,1) both; animation-delay: calc(var(--i) * 34ms); }
.motion .heat.in .cell:hover { animation: none; opacity: 1; }
/* Once the intro has played, drop the animations so no composited layer is
   left holding the hero text. */
.motion.settled .headline .w, .motion.settled .fade-up { animation: none; }
