/* pdfxray landing page. Tokens mirror crates/pdfxray-app/src/theme and design/pdfxray-revamp.pen. */

@font-face { font-family: "Inter"; src: url(fonts/Inter-Regular.ttf) format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url(fonts/Inter-Medium.ttf) format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url(fonts/Inter-SemiBold.ttf) format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url(fonts/SourceSerif4-Bold-subset.woff) format("woff"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Inter"; src: url(fonts/Inter-Bold.ttf) format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url(fonts/JetBrainsMono-Regular.ttf) format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url(fonts/JetBrainsMono-SemiBold.ttf) format("truetype"); font-weight: 600; font-display: swap; }

:root {
  --canvas: #0A0C0F;
  --bg: #0B0D10;
  --panel: #101317;
  --surface-2: #181C21;
  --surface-3: #20252C;
  --hair: #FFFFFF12;
  --hair-2: #FFFFFF1F;
  --text: #E7EAEE;
  --text-2: #A2AAB6;
  --text-3: #6B7380;
  --accent: #3DD6F5;
  --accent-dim: #3DD6F51F;
  --tag: #B48CFF;
  --content: #5AA9FF;
  --warn: #FBBF24;
  --err: #F87171;
  --ok: #4ADE80;
  --ui: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --max: 1200px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--canvas); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; color: var(--text); background: var(--canvas);
  font: 400 16px/1.6 var(--ui); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  font-variant-numeric: tabular-nums;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
code, kbd, pre { font-family: var(--mono); }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.03em; line-height: 1.05; }
h2 { font-size: clamp(34px, 5vw, 60px); }
h3 { font-size: 22px; letter-spacing: -0.02em; line-height: 1.2; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font: 500 12px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--text-2);
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 10px;
  font: 600 15px/1 var(--ui); letter-spacing: -0.01em; transition: transform .2s var(--ease), background .2s, border-color .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-sm { height: 34px; padding: 0 14px; font-size: 13px; border-radius: 8px; }
.btn-primary {
  color: #05212A; background: linear-gradient(180deg, #6FE3F9, #2CC6E8);
  box-shadow: inset 0 1px 0 #FFFFFF59, 0 6px 24px #3DD6F538;
}
.btn-ghost { color: var(--text); background: #FFFFFF0A; border: 1px solid var(--hair-2); }
.btn-ghost:hover { background: #FFFFFF14; }

/* Progress + nav */
.progress { position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 60; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: 64px; padding: 0 max(24px, calc((100vw - var(--max)) / 2));
  display: flex; align-items: center; gap: 32px;
  background: #0A0C0FD9; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hair);
}
.nav nav { display: flex; gap: 28px; margin-left: auto; }
.nav nav a { font-size: 14px; color: var(--text-2); transition: color .2s; }
.nav nav a:hover { color: var(--text); }
.brand { display: inline-flex; align-items: center; gap: 0; font: 600 19px/1 var(--ui); letter-spacing: -0.04em; }
.brand-mark { width: 28px; height: 28px; margin-right: 10px; border-radius: 7px; box-shadow: 0 0 0 1px #FFFFFF14; }
.brand.small .brand-mark { width: 22px; height: 22px; margin-right: 8px; border-radius: 5px; }
.brand-mark + .brand-pdf { margin-left: 0; }
.app-icon { width: 144px; height: 144px; border-radius: 32px; box-shadow: 0 24px 60px #000000B3, 0 0 60px #3DD6F526; }
.brand-pdf { color: var(--text-2); font-weight: 500; }
.brand-x { color: var(--accent); font-weight: 700; }
.brand.small { font-size: 16px; }


/* Manifesto */
.manifesto { max-width: 1000px; margin: 0 auto; padding: 160px 24px; }
.words { font-size: clamp(26px, 3.6vw, 46px); line-height: 1.22; letter-spacing: -0.025em; font-weight: 500; }
.words span { color: var(--text); }

/* Hero sequence (design 6.3). Base styles are the couch state, which is also the static hero
   (mobile, reduced motion): the copy beside a crop of the scene. The motion block pins and animates it. */
.seq { position: relative; padding: 110px 24px 40px; overflow: clip; }
.seq-pin { max-width: var(--max); margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 24px 48px; }
.copies { flex: 1 1 420px; display: grid; order: -1; }
.hcopy { display: grid; gap: 22px; align-content: start; justify-items: start; }
.hcopy:not(.c-d) { display: none; }
.hcopy h1 { font-size: clamp(42px, 6.4vw, 76px); letter-spacing: -0.045em; line-height: 1; }
.hcopy h2 { letter-spacing: -0.045em; line-height: 1; }
.hcopy .lede { max-width: 560px; }
.kicker { margin: 0; font: 500 12px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.scene-box { flex: 1 1 420px; position: relative; aspect-ratio: 760 / 740; overflow: hidden; }
.scene { position: absolute; left: 0; top: 0; width: 1440px; height: 900px; transform-origin: 0 0; transform: scale(var(--fs, .5)) translate(-660px, -90px); }
.scene > * { position: absolute; margin: 0; }
.couch { left: 0; top: 0; }
.couch .cl { fill: none; stroke: var(--accent); stroke-width: 2; }
.couch .fillc { fill: #3DD6F50D; }
.couch .floor { stroke: #3DD6F540; }
.couch .dim { fill: none; stroke: #3DD6F566; stroke-width: 1; }
.couch .dimt { font: 11px var(--mono); fill: #3DD6F599; text-anchor: middle; }
.couch .dimt.start { text-anchor: start; }
.couch .dimt.end { text-anchor: end; }
.couch .dimt.sm { font-size: 9px; }
.couch .dimt.amber { fill: var(--warn); }
.couch .dimt.bubt { fill: var(--accent); font-size: 10px; }
.couch .ang { fill: none; stroke: var(--warn); stroke-width: 1.5; }
.couch .bub { fill: none; stroke: var(--accent); stroke-width: 1.2; }
.notes {
  left: 1006px; top: 96px; width: 356px; padding: 16px 18px 18px; display: grid; gap: 12px; rotate: 2deg;
  border-radius: 14px; background: #12161BF2; border: 1px solid #FFFFFF17; box-shadow: 0 24px 60px #000000D0;
}
.notes-head { display: flex; justify-content: space-between; align-items: baseline; margin: 0; padding-bottom: 12px; border-bottom: 1px solid #FFFFFF12; }
.notes-head b { font-size: 15px; color: #F2F4F7; }
.notes-head span { font: 10px var(--mono); color: var(--text-3); }
.note { margin: 0; display: grid; gap: 5px; justify-items: start; font-size: 14px; color: #E7EAEE; }
.note em { font: normal 9.5px/17px var(--mono); padding: 0 6px; border-radius: 4px; }
.note .w { color: var(--warn); background: #FBBF241F; }
.note .e { color: var(--err); background: #F871711F; }
.notes-dx { margin: 0; padding-top: 12px; border-top: 1px solid #FFFFFF12; font-size: 12.5px; color: var(--ok); }
/* The page: 480×620 at its X-ray position; the couch pose comes from translate/scale/rotate. */
.page {
  left: 800px; top: 150px; width: 480px; height: 620px; overflow: hidden; border-radius: 4px; background: #FFFFFF;
  box-shadow: 0 40px 100px #000000D0; translate: -9px 96px; scale: .5; rotate: -86deg;
}
.pg { position: absolute; inset: 0; }
.pg > * { position: absolute; margin: 0; }
.pg-logo { left: 40px; top: 36px; width: 36px; height: 36px; border-radius: 6px; background: #1E3A5F; }
.pg-title { left: 40px; top: 92px; font: 700 34px/1 "Source Serif 4", Georgia, serif; color: #14171C; white-space: nowrap; }
.pg-line { left: 40px; width: 400px; height: 7px; border-radius: 2px; background: #D9DDE3; }
.pg-fig { left: 40px; top: 240px; width: 400px; height: 170px; background: linear-gradient(160deg, #2B6CB0, #90CDF4); }
.pg-cap { left: 40px; top: 418px; font: 11px/1 var(--ui); color: #6B7280; }
.pg-draft { left: 112px; top: 284px; font: 800 64px/1 var(--ui); letter-spacing: .04em; color: #F8717138; rotate: -24deg; }
.pg-x { background: #0B1622 linear-gradient(#3DD6F512 1px, transparent 1px) 0 0 / 24px 24px; }
.pg-x::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #3DD6F512 1px, transparent 1px) 0 0 / 24px 24px; }
.pg-x .pg-logo { background: none; border: 1px solid #8A93A3; }
.pg-x .pg-title { color: #7FE6FA; }
.pg-x .pg-line { background: #5AA9FF40; }
.pg-x .pg-fig { background: #FF8A4C14; }
.pg-x .pg-cap { color: #F9A8D4; }
.xb { border: 1.5px solid var(--c); border-radius: 2px; }
.xc { height: 16px; padding: 0 5px; border-radius: 3px; background: var(--c); color: #0B0D10; font: 700 9px/16px var(--mono); }
.warnchip { background: var(--warn); }
.xo { left: 452px; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: #0B0D10; font: 700 10px/20px var(--mono); text-align: center; }
.xo.warn { background: var(--warn); }
.xo-path { left: 461px; top: 124px; width: 2px; height: 292px; background: #3DD6F5AA; }
.xray { position: absolute; inset: 0; overflow: hidden; translate: 480px 0; }
.xray-in { position: absolute; inset: 0; translate: -480px 0; }
.scan { position: absolute; left: -1px; top: 0; width: 2px; height: 100%; background: var(--accent); box-shadow: 0 0 18px var(--accent); translate: 480px 0; opacity: 0; }
.scan span { position: absolute; top: 12px; left: 50%; translate: -50% 0; height: 22px; padding: 0 10px; border-radius: 11px; background: var(--accent); color: #061218; font: 700 10px/22px var(--mono); white-space: nowrap; }
.pg-hit { position: absolute; left: 32px; top: 84px; width: 364px; height: 50px; border: 1.5px solid var(--accent); border-radius: 4px; background: #3DD6F51A; opacity: 0; }
.hint {
  left: 1112px; top: 676px; width: 230px; padding: 12px 14px; display: grid; gap: 5px; opacity: 0;
  border-radius: 12px; background: #12161BF2; border: 1px solid #FFFFFF17; box-shadow: 0 18px 44px #000000CC;
}
.hint b { font-size: 14px; color: #F2F4F7; }
.hint span { font: 11px var(--mono); color: var(--warn); }
.layer, .layer-label.l1 { top: 525px; width: 300px; }
.layer { opacity: 0; translate: 0 220px; }
.layer-label { margin: 0 0 12px; font: 700 9px/16px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.layer-label.l1 { opacity: 0; }
.layer-card { height: 420px; padding: 29px 10px 18px; border-radius: 14px; background: #101317; border: 1px solid #FFFFFF1F; box-shadow: 0 30px 70px #000000C0; }
.lr { margin: 0; height: 26px; padding: 0 10px; font: 12.5px/26px var(--mono); color: var(--text-2); white-space: pre; overflow: hidden; }
.lr.hit { color: #F2F4F7; background: #3DD6F51A; box-shadow: inset 0 0 0 1px #3DD6F566; border-radius: 5px; }
.thread { left: 378px; top: 622px; width: 990px; height: 2px; background: #3DD6F5AA; transform-origin: 0 50%; scale: 0 1; }
.tdot { z-index: 2; top: 618px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); opacity: 0; }
.spec-grid {
  left: 80px; top: 100px; width: 700px; height: 760px; opacity: 0;
  background: linear-gradient(#FFFFFF06 1px, transparent 1px) 0 0 / 28px 28px, linear-gradient(90deg, #FFFFFF06 1px, transparent 1px) 0 0 / 28px 28px;
}
.glyph { left: 180px; top: 330px; width: 460px; height: 470px; transform-origin: 231px 248px; opacity: 0; scale: .22; }
.glyph svg { display: block; fill: #F2F4F7; }
.metric { left: 80px; width: 700px; height: 1px; background: #FFFFFF33; transform-origin: 0 50%; scale: 0 1; }
.metric.base { background: var(--accent); }
.mlabel { left: 88px; font: 11px/1 var(--mono); color: var(--text-3); white-space: nowrap; opacity: 0; }
.mlabel.base { color: var(--accent); }
.mlabel.bb { color: #B48CFF; }
.mlabel.adv-l { top: 810px; color: var(--warn); }
.bbox { border: 1.5px solid #B48CFF; opacity: 0; }
.adv { top: 816px; height: 1.5px; background: var(--warn); transform-origin: 0 50%; scale: 0 1; }
.adv::before, .adv::after { content: ""; position: absolute; top: -6px; width: 1.5px; height: 13px; background: var(--warn); }
.adv::before { left: 0; }
.adv::after { right: 0; }
.origin { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); opacity: 0; }
.gchip { height: 20px; padding: 0 8px; border-radius: 3px; background: var(--accent); color: #061218; font: 700 9px/20px var(--mono); white-space: nowrap; opacity: 0; }
.crumbs { left: 80px; top: 846px; display: flex; gap: 8px; align-items: center; opacity: 0; }
.crumb { position: relative; height: 22px; padding: 0 8px; border-radius: 5px; background: #FFFFFF0A; border: 1px solid #FFFFFF14; font: 11px/20px var(--mono); color: var(--text-2); }
.crumb::after { content: ""; position: absolute; inset: -1px; border-radius: 5px; border: 1px solid var(--accent); background: #3DD6F51F; opacity: 0; }
.crumb-arrow { color: var(--text-3); font-size: 12px; }

/* Sparks: light that rewards attention (design 6.2) */
.btn-primary { position: relative; overflow: hidden; isolation: isolate; }
.btn-primary::after {
  content: ""; position: absolute; top: -40%; bottom: -40%; left: 0; width: 36%; pointer-events: none;
  background: linear-gradient(100deg, transparent, #FFFFFFA6, transparent); rotate: 20deg; translate: -160% 0;
}
.nav .btn:hover { border-color: #3DD6F566; }
.card { background: radial-gradient(420px circle at var(--mx, 50%) var(--my, -40%), #3DD6F512, transparent 60%), linear-gradient(180deg, #FFFFFF08, #FFFFFF03); }
.card::after {
  content: ""; position: absolute; inset: -1px; padding: 1px; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, -40%), #3DD6F58C, transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
.card:hover::after { opacity: 1; }
.facts b { font-variant-numeric: tabular-nums; }
.caret { display: inline-block; width: .6em; height: 1.15em; margin-left: 2px; vertical-align: -.2em; background: var(--accent); }
.progress-head, .ptr, .trace, .ghint { display: none; }

/* Showcase. Base layout is a static list (mobile, reduced motion, no JS); the motion block below pins it. */
.show { padding: 80px 24px 40px; }
.show-head { max-width: var(--max); margin: 0 auto 40px; display: grid; gap: 20px; }
.chapter { position: relative; max-width: var(--max); margin: 0 auto; padding: 48px 0; }
.ch-inner { display: grid; gap: 18px; }
.ch-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.ch-num { font: 500 12px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.ch-head h3 { font-size: clamp(26px, 3vw, 44px); letter-spacing: -0.035em; line-height: 1.05; }
.ticks { display: none; }
.window {
  position: relative; overflow: hidden; border-radius: 16px; background: var(--panel); border: 1px solid var(--hair-2);
  box-shadow: 0 1px 0 #FFFFFF14 inset, 0 40px 100px #000000C0, 0 0 60px #3DD6F50F;
}
.stage { position: relative; }
.track { position: relative; transform-origin: 0 0; }
.track img { display: block; width: 100%; height: auto; }
.spot {
  position: absolute; left: var(--l); top: var(--t); width: var(--w); height: var(--h); border-radius: 6px; pointer-events: none;
  border: 1.5px solid var(--accent); box-shadow: 0 0 0 4px #3DD6F51F, 0 0 24px #3DD6F540;
}
.caps { display: grid; gap: 10px; }
.cap { max-width: 760px; color: var(--text-2); font-size: 17px; }
.cap b { color: var(--text); font-weight: 600; }
.cap-step { display: none; }
.cap code { font-size: 14px; color: var(--warn); }
.cap em { font-style: normal; color: var(--text); }

/* Details */
.details, .cli { max-width: var(--max); margin: 0 auto; padding: 140px 24px 40px; }
.section-head { display: grid; gap: 18px; margin-bottom: 48px; }
.section-head .sub { color: var(--text-2); font-size: 18px; max-width: 620px; }
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card {
  position: relative; display: grid; grid-template-rows: auto 1fr; gap: 20px; padding: 18px; border-radius: 18px;
  background: linear-gradient(180deg, #FFFFFF08, #FFFFFF03); border: 1px solid var(--hair);
  box-shadow: 0 1px 0 #FFFFFF0D inset;
  transition: border-color .3s, transform .3s var(--ease);
}
.card:hover { border-color: var(--hair-2); transform: translateY(-2px); }
.card-wide { grid-column: span 2; grid-template-columns: 1.1fr 1fr; grid-template-rows: none; align-items: center; }
.card-copy { display: grid; gap: 8px; align-content: start; padding: 0 4px 4px; }
.card-copy h3 { font-size: 18px; }
.card-copy p { color: var(--text-2); font-size: 14.5px; line-height: 1.55; }
.crop {
  width: 100%; aspect-ratio: var(--w) / var(--h); max-height: 300px; border-radius: 12px; border: 1px solid var(--hair);
  background-image: var(--src); background-repeat: no-repeat;
  background-size: calc(1440 / var(--w) * 100%) auto;
  background-position: calc(var(--x) / (1440 - var(--w)) * 100%) calc(var(--y) / (900 - var(--h)) * 100%);
  justify-self: center;
}
.card-wide .crop { max-height: 340px; width: auto; height: 100%; min-height: 240px; }
.mini {
  display: grid; align-content: center; min-height: 150px; padding: 18px; border-radius: 12px;
  background: var(--panel); border: 1px solid var(--hair); font-size: 13px;
}
.mcid { gap: 2px; }
.mcid .row { display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 10px; border-radius: 6px; }
.mcid .row:first-child { background: var(--accent-dim); outline: 1px solid #3DD6F55A; }
.mcid .row i { width: 7px; height: 7px; border-radius: 2px; }
.mcid .row b { font-weight: 500; }
.mcid .row em { font: 400 11px var(--mono); color: var(--text-3); font-style: normal; }
.mcid .chev, .mcid .arr { width: 12px; color: var(--text-3); font-size: 12px; }
.mcid .ref { padding-left: 28px; cursor: default; }
.mcid .ref code { color: var(--text-3); font-size: 12px; }
.copyrow { grid-auto-flow: column; justify-content: start; align-items: center; gap: 14px; }
.copyrow .k { color: var(--text-3); }
.copyrow code { color: var(--text); font-size: 12.5px; }
.copyrow .copy { opacity: 0; color: var(--text-2); transition: opacity .2s; }
.card:hover .copyrow { background: #151A1F; }
.card:hover .copyrow .copy { opacity: 1; }
.units { grid-auto-flow: column; justify-content: center; gap: 4px; }
.units span { padding: 7px 14px; border-radius: 7px; font: 500 13px var(--mono); color: var(--text-3); background: var(--bg); border: 1px solid var(--hair); }
.units .on { color: var(--text); background: var(--surface-3); }
.keys { justify-items: center; gap: 16px; }
.keys .tip { display: inline-flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px; background: #1A1E24; border: 1px solid var(--hair-2); box-shadow: 0 14px 36px #000000B3; }
.keys .tip b { font-weight: 600; font-size: 13px; }
.keys .snap { color: var(--text-2); font-size: 13px; display: inline-flex; gap: 8px; align-items: center; }
kbd {
  display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 5px;
  font: 600 11px/1 var(--ui); color: #C9D0D9; background: linear-gradient(180deg, #2A3038, #1E232A);
  border: 1px solid #FFFFFF1A; box-shadow: 0 1px 0 #00000099;
}

.hints-demo { gap: 4px; min-height: 200px; }
.prow { position: relative; display: grid; grid-template-columns: 90px 1fr; align-items: center; height: 32px; padding: 0 12px; border-radius: 7px; }
.prow .k { color: var(--text-3); text-decoration: underline dotted #6B738080; text-underline-offset: 4px; }
.prow code { font-size: 12.5px; color: var(--text); }
.prow.hov { background: #151A1F; }
.prow.hov .k { color: var(--text); }
.tipbox {
  position: absolute; left: 12px; top: calc(100% + 6px); z-index: 2; width: max-content; max-width: min(300px, calc(100% - 24px));
  padding: 9px 12px; border-radius: 8px; font-size: 12.5px; line-height: 1.45; color: var(--text-2);
  background: #1A1E24; border: 1px solid var(--hair-2); box-shadow: 0 14px 36px #000000B3;
}
.tipbox b { color: var(--text); font-weight: 600; }

/* Truth */
.truth { max-width: var(--max); margin: 0 auto; padding: 160px 24px 40px; display: grid; grid-template-columns: 1fr 1.25fr; gap: 56px; align-items: center; }
.truth-copy { display: grid; gap: 22px; }
.truth-copy > p:not(.eyebrow) { color: var(--text-2); font-size: 17px; }
.facts { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 14px; }
.facts li { display: grid; grid-template-columns: 110px 1fr; align-items: baseline; gap: 14px; padding-top: 14px; border-top: 1px solid var(--hair); }
.facts b { font: 600 34px/1 var(--mono); letter-spacing: -0.03em; color: var(--text); }
.facts span { color: var(--text-2); font-size: 14.5px; }
.truth-shot img { border-radius: 14px; border: 1px solid var(--hair-2); box-shadow: 0 40px 100px #000000C0; }

/* CLI */
.term {
  border-radius: 14px; overflow: hidden; background: #07090B; border: 1px solid var(--hair-2);
  box-shadow: 0 1px 0 #FFFFFF0D inset, 0 40px 100px #000000C0;
}
.term-bar { display: flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; background: #0E1115; border-bottom: 1px solid var(--hair); }
.term-bar i { width: 11px; height: 11px; border-radius: 50%; background: #2A3038; }
.term-bar span { margin-left: auto; font: 500 11px var(--mono); color: var(--text-3); }
.term-body { margin: 0; padding: 22px 24px 26px; font-size: 13px; line-height: 1.75; overflow-x: auto; color: var(--text-2); }
.term-body .l { display: inline-block; width: 100%; }
.term-body .p { color: var(--accent); }
.term-body .key { color: #9FB4CC; }
.term-body .str { color: #C3E88D; }
.term-body .num { color: #F78C6C; }
.term-body .warn { color: var(--warn); font-weight: 600; }
.term-body .hot { background: #FBBF2414; box-shadow: inset 2px 0 0 var(--warn); margin: 0 -24px; padding: 0 24px; width: calc(100% + 48px); }
.cmds { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 22px 0 0; }
.cmds li { font: 500 12.5px var(--mono); padding: 7px 12px; border-radius: 999px; color: var(--text-2); background: #FFFFFF08; border: 1px solid var(--hair); }

/* Source */
.source { padding: 160px 24px 140px; }
.source-card {
  position: relative; max-width: 860px; margin: 0 auto; padding: 56px; border-radius: 24px; text-align: center;
  display: grid; gap: 22px; justify-items: center; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 0%, #3DD6F51A, transparent 60%), #0E1115;
  border: 1px solid var(--hair-2); box-shadow: 0 1px 0 #FFFFFF14 inset;
}
.source-card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(#FFFFFF07 1px, transparent 1px), linear-gradient(90deg, #FFFFFF07 1px, transparent 1px);
  background-size: 32px 32px; mask-image: linear-gradient(#000, transparent 80%);
}
.source-card > * { position: relative; }
.source-card > p:not(.eyebrow):not(.fine):not(.dl-meta) { color: var(--text-2); font-size: 17px; max-width: 520px; }
.snippet { margin: 4px 0; padding: 16px 20px; border-radius: 12px; background: #07090B; border: 1px solid var(--hair); text-align: left; font-size: 13.5px; line-height: 1.8; color: var(--text); }
.snippet .p { color: var(--accent); user-select: none; }
.fine { font-size: 13px; color: var(--text-3); max-width: 560px; }
.foot { max-width: var(--max); margin: 0 auto; padding: 32px 24px 48px; display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid var(--hair); color: var(--text-3); font-size: 13px; }

/* Download: header actions, facts line, install steps */
.nav-actions { display: flex; align-items: center; gap: 10px; }
.gh {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; color: var(--text-2);
  background: #FFFFFF0A; border: 1px solid var(--hair-2); transition: color .2s, border-color .2s;
}
.gh:hover { color: var(--text); border-color: #3DD6F566; }
.ico { flex: none; fill: currentColor; }
.btn-lg { height: 50px; padding: 0 24px; font-size: 16px; border-radius: 12px; }
.dl-meta { margin: 0; font: 11.5px/1.5 var(--mono); letter-spacing: .02em; color: var(--text-3); }
.install { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 26px; font-size: 14.5px; color: var(--text-2); }
.install li { display: flex; align-items: center; gap: 10px; }
.install b { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1px solid #3DD6F566; font: 600 11px var(--mono); color: var(--accent); }
.fine a, .path-note a { color: var(--accent); }
.fine code { font-size: 12px; color: var(--text-2); }
.path-note { display: grid; gap: 10px; max-width: 860px; margin-top: 28px; }
.path-note > p:first-child { margin: 0; font-size: 15px; color: var(--text-2); }
.foot-links { display: flex; gap: 18px; }
.foot-links a { color: var(--text-2); transition: color .2s; }
.foot-links a:hover { color: var(--text); }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .c-d > * { animation: rise .9s var(--ease) both; }
  .c-d > :nth-child(2) { animation-delay: .06s; }
  .c-d > :nth-child(3) { animation-delay: .14s; }
  .c-d > :nth-child(4) { animation-delay: .22s; }
  .scene-box { animation: rise 1.1s .3s var(--ease) both; }
  @keyframes rise { from { opacity: 0; translate: 0 18px; } }

  /* Native scroll-driven animations */
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    .progress { animation: grow linear both; animation-timeline: scroll(root); }
    @keyframes grow { to { transform: scaleX(1); } }

    /* Manifesto: words light up as you read */
    .words { view-timeline: --manifesto block; }
    .words span {
      opacity: .16; animation: word linear both; animation-timeline: --manifesto;
      animation-range: cover calc(18% + var(--i) / var(--n) * 40%) cover calc(22% + var(--i) / var(--n) * 40%);
    }
    @keyframes word { to { opacity: 1; } }

    /* Generic reveal */
    .reveal { animation: reveal linear both; animation-timeline: view(); animation-range: entry 5% cover 30%; }
    @keyframes reveal { from { opacity: 0; translate: 0 40px; scale: .98; } }

    /* Terminal lines type in as the terminal scrolls up */
    .term { view-timeline: --term block; }
    .term-body .l { animation: line linear both; animation-timeline: --term; animation-range: entry calc(40% + var(--i) * 4%) entry calc(46% + var(--i) * 4%); }
    @keyframes line { from { opacity: 0; translate: -8px 0; } }
  }
}

/* Fallback for browsers without scroll-driven animations (Firefox) and for reduced motion */
.no-sda .reveal { opacity: 0; translate: 0 30px; transition: opacity .8s var(--ease), translate .8s var(--ease); }
.no-sda .reveal.in { opacity: 1; translate: 0 0; }
@media (prefers-reduced-motion: reduce) {
  .no-sda .reveal { opacity: 1; translate: none; transition: none; }
}


/* ---------- Hero sequence motion (design 6.3) ----------
   600vh section, pinned 100vh artboard. Over the pinned span: 0-12% couch · 12-30% couch → X-ray ·
   30-45% X-ray · 45-62% X-ray → layers · 62-75% layers · 75-90% layers → glyph · 90-100% glyph.
   The big vector ‘A’ starts exactly where the page’s ‘A’ is at 80% and meets it at 86%, then grows.
   Scroll-driven where supported; main.js drives --p (0..1) otherwise. */
@media (prefers-reduced-motion: no-preference) {
  .seq { height: 600vh; padding: 0; view-timeline: --seq block; }
  .seq-pin { position: sticky; top: 0; height: 100vh; max-width: none; display: block; overflow: hidden; }
  .scene-box, .copies { position: absolute; inset: 0; aspect-ratio: auto; overflow: visible; display: block; }
  .art { position: absolute; left: 50%; top: 50%; width: 1440px; height: 900px; margin: -450px 0 0 -720px; transform: none; transform-origin: 50% 50%; scale: var(--fit, 1); }
  .hcopy { position: absolute; display: grid; gap: 24px; }
  .hcopy:not(.c-d) { display: grid; opacity: 0; pointer-events: none; }
  .hcopy .lede { font-size: 18px; max-width: 540px; }
  .c-d { left: 120px; top: 200px; width: 560px; }
  .c-d h1 { font-size: 72px; }
  .c-a { left: 120px; top: 250px; width: 600px; }
  .c-a h2 { font-size: 72px; }
  .c-b { left: 270px; top: 132px; width: 900px; justify-items: center; text-align: center; }
  .c-b h2 { font-size: 68px; }
  .c-b .lede { max-width: 620px; }
  .c-c { left: 840px; top: 260px; width: 500px; }
  .c-c h2 { font-size: 64px; }

  .seq .m, .seq .crumb::after {
    animation-duration: 1s; animation-timing-function: linear; animation-fill-mode: both;
    animation-play-state: paused; animation-delay: calc(var(--p, 0) * -1s);
  }
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    .seq .m, .seq .crumb::after {
      animation-duration: auto; animation-play-state: running; animation-delay: 0s;
      animation-timeline: --seq; animation-range: contain 0% contain 100%;
    }
  }
  .c-d { animation-name: s-cd; }
  .c-a { animation-name: s-ca; }
  .c-b { animation-name: s-cb; }
  .c-c { animation-name: s-cc; }
  .couch { animation-name: s-couch; }
  .notes { animation-name: s-notes; }
  .page { animation-name: s-page; }
  .xray { animation-name: s-xray; }
  .xray-in { animation-name: s-xrayin; }
  .scan { animation-name: s-scan; }
  .hint { animation-name: s-hint; }
  .pg-hit { animation-name: s-hit; }
  .layer-label.l1 { animation-name: s-l1; }
  .layer.c2 { animation-name: s-c2; }
  .layer.c3 { animation-name: s-c3; }
  .layer.c4 { animation-name: s-c4; }
  .thread { animation-name: s-thread; }
  .tdot.d1 { animation-name: s-d1; }
  .tdot.d2 { animation-name: s-d2; }
  .tdot.d3 { animation-name: s-d3; }
  .tdot.d4 { animation-name: s-d4; }
  .spec-grid { animation-name: s-spec; }
  .glyph { animation-name: s-glyph; }
  .metric.k1 { animation-name: s-line1; }
  .metric.k2 { animation-name: s-line2; }
  .adv.k4 { animation-name: s-line4; }
  .scene :is(.mlabel, .bbox, .origin, .gchip).k1 { animation-name: s-k1; }
  .scene :is(.mlabel, .bbox, .origin, .gchip).k2 { animation-name: s-k2; }
  .scene :is(.mlabel, .bbox, .origin, .gchip).k3 { animation-name: s-k3; }
  .scene :is(.mlabel, .bbox, .origin, .gchip).k4 { animation-name: s-k4; }
  .crumbs { animation-name: s-crumbs; }
  .crumb.r1::after { animation-name: s-r1; }
  .crumb.r2::after { animation-name: s-r2; }
  .crumb.r3::after { animation-name: s-r3; }
  .crumb.r4::after { animation-name: s-r4; }
  .crumb.r5::after { animation-name: s-r5; }

  @keyframes s-cd { 0%, 10% { opacity: 1; translate: 0 0; } 18%, 100% { opacity: 0; translate: 0 -40px; } }
  @keyframes s-ca { 0%, 18% { opacity: 0; translate: 0 40px; } 26%, 44% { opacity: 1; translate: 0 0; } 51%, 100% { opacity: 0; translate: 0 -40px; } }
  @keyframes s-cb { 0%, 51% { opacity: 0; translate: 0 40px; } 59%, 74% { opacity: 1; translate: 0 0; } 80%, 100% { opacity: 0; translate: 0 -40px; } }
  @keyframes s-cc { 0%, 84% { opacity: 0; translate: 0 40px; } 90%, 100% { opacity: 1; translate: 0 0; } }
  @keyframes s-couch { 0%, 12% { opacity: 1; translate: 0 0; } 24%, 100% { opacity: 0; translate: 0 140px; } }
  @keyframes s-notes { 0%, 10% { opacity: 1; translate: 0 0; } 20%, 100% { opacity: 0; translate: 120px 0; } }
  /* The page: couch pose → upright (X-ray) → card 1 (layers) → zooms into the ‘A’ of its title */
  @keyframes s-page {
    0%, 10% { translate: -9px 96px; scale: .5; rotate: -86deg; opacity: 1; }
    20% { translate: -4px -14px; scale: .74; rotate: -28deg; }
    28%, 45% { translate: 0 0; scale: 1; rotate: 0deg; }
    58%, 75% { translate: -812px 287px; scale: .625; rotate: 0deg; opacity: 1; }
    82% { opacity: 1; }
    86%, 100% { translate: 126px 919px; scale: 4; rotate: 0deg; opacity: 0; }
  }
  @keyframes s-xray { 0%, 28% { translate: 480px 0; } 34% { translate: 144px 0; } 45% { translate: 336px 0; } 54%, 100% { translate: 480px 0; } }
  @keyframes s-xrayin { 0%, 28% { translate: -480px 0; } 34% { translate: -144px 0; } 45% { translate: -336px 0; } 54%, 100% { translate: -480px 0; } }
  @keyframes s-scan { 0%, 27% { translate: 480px 0; opacity: 0; } 29% { opacity: 1; } 34% { translate: 144px 0; } 45% { translate: 336px 0; } 52% { opacity: 1; } 54%, 100% { translate: 480px 0; opacity: 0; } }
  @keyframes s-hint { 0%, 35% { opacity: 0; translate: 0 10px; scale: .96; } 38%, 45% { opacity: 1; translate: 0 0; scale: 1; } 49%, 100% { opacity: 0; } }
  @keyframes s-hit { 0%, 59% { opacity: 0; } 63%, 76% { opacity: 1; } 80%, 100% { opacity: 0; } }
  @keyframes s-l1 { 0%, 52% { opacity: 0; } 58%, 75% { opacity: 1; } 80%, 100% { opacity: 0; } }
  @keyframes s-c2 { 0%, 47% { opacity: 0; translate: 0 220px; } 57%, 75% { opacity: 1; translate: 0 0; } 83%, 100% { opacity: 0; translate: 0 260px; } }
  @keyframes s-c3 { 0%, 49% { opacity: 0; translate: 0 220px; } 59%, 76% { opacity: 1; translate: 0 0; } 84%, 100% { opacity: 0; translate: 0 260px; } }
  @keyframes s-c4 { 0%, 51% { opacity: 0; translate: 0 220px; } 61%, 77% { opacity: 1; translate: 0 0; } 85%, 100% { opacity: 0; translate: 0 260px; } }
  @keyframes s-thread { 0%, 62% { scale: 0 1; opacity: 1; } 72%, 76% { scale: 1 1; opacity: 1; } 80%, 100% { scale: 1 1; opacity: 0; } }
  @keyframes s-d1 { 0%, 62% { opacity: 0; scale: .4; } 63.5% { opacity: 1; scale: 1.5; } 65%, 76% { opacity: 1; scale: 1; } 80%, 100% { opacity: 0; scale: 1; } }
  @keyframes s-d2 { 0%, 65.3% { opacity: 0; scale: .4; } 66.8% { opacity: 1; scale: 1.5; } 68.3%, 76% { opacity: 1; scale: 1; } 80%, 100% { opacity: 0; scale: 1; } }
  @keyframes s-d3 { 0%, 68.6% { opacity: 0; scale: .4; } 70.1% { opacity: 1; scale: 1.5; } 71.6%, 76% { opacity: 1; scale: 1; } 80%, 100% { opacity: 0; scale: 1; } }
  @keyframes s-d4 { 0%, 71.9% { opacity: 0; scale: .4; } 73.4% { opacity: 1; scale: 1.5; } 74.9%, 76% { opacity: 1; scale: 1; } 80%, 100% { opacity: 0; scale: 1; } }
  @keyframes s-spec { 0%, 84% { opacity: 0; } 90%, 100% { opacity: 1; } }
  @keyframes s-glyph { 0%, 80% { opacity: 0; scale: .1186; translate: -164px 24px; } 86% { opacity: 1; scale: .2197; translate: 0 0; } 90%, 100% { opacity: 1; scale: 1; translate: 0 0; } }
  @keyframes s-line1 { 0%, 90% { scale: 0 1; opacity: 0; } 91% { opacity: 1; } 93%, 100% { scale: 1 1; opacity: 1; } }
  @keyframes s-line2 { 0%, 91% { scale: 0 1; opacity: 0; } 92% { opacity: 1; } 94%, 100% { scale: 1 1; opacity: 1; } }
  @keyframes s-line4 { 0%, 93% { scale: 0 1; opacity: 0; } 94% { opacity: 1; } 96%, 100% { scale: 1 1; opacity: 1; } }
  @keyframes s-k1 { 0%, 90.5% { opacity: 0; } 93%, 100% { opacity: 1; } }
  @keyframes s-k2 { 0%, 91.5% { opacity: 0; } 94%, 100% { opacity: 1; } }
  @keyframes s-k3 { 0%, 92.5% { opacity: 0; } 95%, 100% { opacity: 1; } }
  @keyframes s-k4 { 0%, 93.5% { opacity: 0; } 96%, 100% { opacity: 1; } }
  @keyframes s-crumbs { 0%, 93% { opacity: 0; translate: 0 10px; } 96%, 100% { opacity: 1; translate: 0 0; } }
  @keyframes s-r1 { 0%, 95.5% { opacity: 0; } 96.5%, 100% { opacity: 1; } }
  @keyframes s-r2 { 0%, 96.5% { opacity: 0; } 97.5%, 100% { opacity: 1; } }
  @keyframes s-r3 { 0%, 97.5% { opacity: 0; } 98.5%, 100% { opacity: 1; } }
  @keyframes s-r4 { 0%, 98.5% { opacity: 0; } 99.3%, 100% { opacity: 1; } }
  @keyframes s-r5 { 0%, 99.3% { opacity: 0; } 100% { opacity: 1; } }
}

/* ---------- Showcase motion ----------
   Each chapter is 400vh with a pinned 100vh stage. Over its pinned span (view timeline "contain"):
   0-6% overview · 14-24% slide 1 · 30-40% slide 2 · 46-56% slide 3 · 64% back to the overview.
   The last third overlaps the next chapter, which rises from the bottom while this one recedes.
   Scroll-driven where supported; main.js drives --p (0..1) otherwise. */
@media (prefers-reduced-motion: no-preference) {
  .show { padding-bottom: 0; }
  .chapter { max-width: none; padding: 0; height: 400vh; view-timeline: --ch block; background: var(--canvas); }
  .chapter + .chapter { margin-top: -100vh; border-radius: 28px 28px 0 0; box-shadow: 0 -1px 0 var(--hair-2), 0 -40px 80px #00000099; }
  .pin { position: sticky; top: 0; height: 100vh; padding: 84px 24px 28px; display: grid; justify-items: center; }
  .ch-inner { width: min(100%, var(--max)); height: 100%; grid-template-rows: auto minmax(0, 1fr); transform-origin: 50% 30%; }
  .stage { width: min(100%, calc((100vh - 240px) * 1.6)); aspect-ratio: 16 / 10; justify-self: center; align-self: center; }
  .window { position: absolute; inset: 0; }
  .track { position: absolute; inset: 0; }
  .track img { height: 100%; }
  /* The spot's wide shadow is the scrim: everything outside it dims while it is lit. */
  .spot { opacity: 0; box-shadow: 0 0 0 4px #3DD6F51F, 0 0 24px #3DD6F540, 0 0 0 1400px #05070A8C; }

  /* Caption cards float on the screenshot beside their spot. main.js picks the side and sets --cx/--cy. */
  .caps { position: absolute; inset: 0; pointer-events: none; }
  .cap {
    position: absolute; left: var(--cx, 24px); top: var(--cy, 24px); width: min(320px, 42%); opacity: 0;
    padding: 16px 18px 18px; border-radius: 14px; background: #12161BF2; border: 1px solid #FFFFFF17;
    box-shadow: 0 18px 44px #000000CC; font-size: 14.5px; line-height: 1.45; color: #A9B1BC;
  }
  .cap b { display: block; margin-bottom: 6px; font-size: 19px; line-height: 1.25; letter-spacing: -0.015em; color: #F2F4F7; }
  .cap-step { display: block; margin-bottom: 8px; font: 500 11px/1 var(--mono); letter-spacing: .1em; color: var(--accent); }
  .cap.k0 { top: auto; bottom: 24px; left: 24px; color: var(--text); font-size: 16px; }
  .cap::before, .cap::after { content: ""; position: absolute; background: #3DD6F599; }
  .cap::after { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
  .cap.k0::before, .cap.k0::after { display: none; }
  .cap[data-side="r"]::before { left: -29px; top: 40px; width: 28px; height: 1px; }
  .cap[data-side="r"]::after { left: -33px; top: 36px; }
  .cap[data-side="l"]::before { right: -29px; top: 40px; width: 28px; height: 1px; }
  .cap[data-side="l"]::after { right: -33px; top: 36px; }
  .cap[data-side="b"]::before { left: 28px; top: -29px; width: 1px; height: 28px; }
  .cap[data-side="b"]::after { left: 24px; top: -33px; }
  .cap[data-side="a"]::before { left: 28px; bottom: -29px; width: 1px; height: 28px; }
  .cap[data-side="a"]::after { left: 24px; bottom: -33px; }
  .ticks { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0 0 6px; }
  .ticks li { width: 34px; height: 3px; border-radius: 2px; background: var(--surface-3); overflow: hidden; }
  .ticks i { display: block; height: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }

  .chapter .m {
    animation-duration: 1s; animation-timing-function: linear; animation-fill-mode: both;
    animation-play-state: paused; animation-delay: calc(var(--p, 0) * -1s);
  }
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    .chapter .m {
      animation-duration: auto; animation-play-state: running; animation-delay: 0s;
      animation-timeline: --ch; animation-range: contain 0% contain 100%;
    }
  }
  .ch-inner { animation-name: recede; }
  .track { animation-name: pan; }
  .cap.k0 { animation-name: cap0; }
  .cap.k1 { animation-name: cap1; }
  .cap.k2 { animation-name: cap2; }
  .cap.k3 { animation-name: cap3; }
  .spot.k1 { animation-name: spot1; }
  .spot.k2 { animation-name: spot2; }
  .spot.k3 { animation-name: spot3; }
  .ticks .k1 { animation-name: tick1; }
  .ticks .k2 { animation-name: tick2; }
  .ticks .k3 { animation-name: tick3; }
  .chapter:last-child .ch-inner { animation-name: none; }

  /* Camera: overview, then left to right across the three focus points, then back out. --xN/--yN come from main.js. */
  @keyframes pan {
    0%, 6% { translate: 0 0; scale: 1; }
    14%, 24% { translate: var(--x1) var(--y1); scale: 1.6; }
    30%, 40% { translate: var(--x2) var(--y2); scale: 1.6; }
    46%, 56% { translate: var(--x3) var(--y3); scale: 1.6; }
    64%, 100% { translate: 0 0; scale: 1; }
  }
  @keyframes recede { 0%, 70% { scale: 1; opacity: 1; } 100% { scale: .92; opacity: .2; } }
  @keyframes cap0 { 0%, 7% { opacity: 1; translate: 0 0; } 11%, 59% { opacity: 0; translate: 0 -10px; } 64%, 100% { opacity: 1; translate: 0 0; } }
  @keyframes cap1 { 0%, 14% { opacity: 0; translate: 0 12px; } 17%, 24% { opacity: 1; translate: 0 0; } 26%, 100% { opacity: 0; translate: 0 -8px; } }
  @keyframes cap2 { 0%, 30% { opacity: 0; translate: 0 12px; } 33%, 40% { opacity: 1; translate: 0 0; } 42%, 100% { opacity: 0; translate: 0 -8px; } }
  @keyframes cap3 { 0%, 46% { opacity: 0; translate: 0 12px; } 49%, 56% { opacity: 1; translate: 0 0; } 58%, 100% { opacity: 0; translate: 0 -8px; } }
  @keyframes spot1 { 0%, 12% { opacity: 0; } 15%, 25% { opacity: 1; } 27%, 100% { opacity: 0; } }
  @keyframes spot2 { 0%, 28% { opacity: 0; } 31%, 41% { opacity: 1; } 43%, 100% { opacity: 0; } }
  @keyframes spot3 { 0%, 44% { opacity: 0; } 47%, 57% { opacity: 1; } 59%, 100% { opacity: 0; } }
  @keyframes tick1 { 0%, 12% { transform: scaleX(0); } 24%, 100% { transform: none; } }
  @keyframes tick2 { 0%, 28% { transform: scaleX(0); } 40%, 100% { transform: none; } }
  @keyframes tick3 { 0%, 44% { transform: scaleX(0); } 56%, 100% { transform: none; } }

  /* Live demo: a pointer glides to each spot and clicks before the caption appears.
     --px0..3 / --py0..3 (stage px) come from main.js. */
  .ptr { display: block; position: absolute; left: 0; top: 0; width: 22px; height: 22px; z-index: 3; opacity: 0; translate: var(--px0, 0) var(--py0, 0); animation-name: c-ptr; }
  .ptr svg { display: block; fill: #F2F4F7; stroke: #0A0C0F; stroke-width: 1.4; filter: drop-shadow(0 3px 6px #000000AA); }
  .ring { position: absolute; left: -12px; top: -12px; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--accent); opacity: 0; animation-name: c-ring; }
  @keyframes c-ptr {
    0%, 6% { translate: var(--px0) var(--py0); opacity: 0; }
    9% { opacity: 1; }
    13.5%, 25% { translate: var(--px1) var(--py1); }
    29.5%, 41% { translate: var(--px2) var(--py2); }
    45.5%, 56% { translate: var(--px3) var(--py3); opacity: 1; }
    62%, 100% { translate: var(--px0) var(--py0); opacity: 0; }
  }
  @keyframes c-ring {
    0%, 13.5% { scale: .3; opacity: 0; } 14.2% { opacity: .9; } 17% { scale: 2.4; opacity: 0; }
    29.5% { scale: .3; opacity: 0; } 30.2% { opacity: .9; } 33% { scale: 2.4; opacity: 0; }
    45.5% { scale: .3; opacity: 0; } 46.2% { opacity: .9; } 49%, 100% { scale: 2.4; opacity: 0; }
  }
  /* Live demo: the reading path draws itself 1 → 5 and each badge pops as the line reaches it */
  .trace { display: block; position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
  .trace path { fill: none; stroke: var(--accent); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1 1; stroke-dashoffset: 1; filter: drop-shadow(0 0 4px #3DD6F5); }
  .trace circle { fill: none; stroke: var(--accent); stroke-width: 2.5; transform-box: fill-box; transform-origin: center; opacity: 0; }
  .trace .back { stroke: var(--warn); }
  .trace .t1 { animation-name: c-t1; }
  .trace .t2 { animation-name: c-t2; }
  .trace .t3 { animation-name: c-t3; }
  .trace .p1 { animation-name: c-p1; }
  .trace .p2 { animation-name: c-p2; }
  .trace .p3 { animation-name: c-p3; }
  .trace .p4 { animation-name: c-p4; }
  .trace .p5 { animation-name: c-p5; }
  @keyframes c-t1 { 0%, 24% { stroke-dashoffset: 1; opacity: 1; } 29%, 57% { stroke-dashoffset: 0; opacity: 1; } 62%, 100% { stroke-dashoffset: 0; opacity: 0; } }
  @keyframes c-t2 { 0%, 29% { stroke-dashoffset: 1; opacity: 1; } 32%, 57% { stroke-dashoffset: 0; opacity: 1; } 62%, 100% { stroke-dashoffset: 0; opacity: 0; } }
  @keyframes c-t3 { 0%, 32% { stroke-dashoffset: 1; opacity: 1; } 35%, 57% { stroke-dashoffset: 0; opacity: 1; } 62%, 100% { stroke-dashoffset: 0; opacity: 0; } }
  @keyframes c-p1 { 0%, 24% { opacity: 0; scale: .5; } 25% { opacity: 1; scale: 1.35; } 26.5%, 57% { opacity: .9; scale: 1; } 62%, 100% { opacity: 0; } }
  @keyframes c-p2 { 0%, 26.5% { opacity: 0; scale: .5; } 27.5% { opacity: 1; scale: 1.35; } 29%, 57% { opacity: .9; scale: 1; } 62%, 100% { opacity: 0; } }
  @keyframes c-p3 { 0%, 29% { opacity: 0; scale: .5; } 30% { opacity: 1; scale: 1.35; } 31.5%, 57% { opacity: .9; scale: 1; } 62%, 100% { opacity: 0; } }
  @keyframes c-p4 { 0%, 32% { opacity: 0; scale: .5; } 33% { opacity: 1; scale: 1.35; } 34.5%, 57% { opacity: .9; scale: 1; } 62%, 100% { opacity: 0; } }
  @keyframes c-p5 { 0%, 35% { opacity: 0; scale: .5; } 36% { opacity: 1; scale: 1.35; } 37.5%, 57% { opacity: .9; scale: 1; } 62%, 100% { opacity: 0; } }
  /* Live demo: the label hint pops as if hovered (sized in the screenshot's own units) */
  .track { container-type: inline-size; }
  .ghint {
    display: grid; position: absolute; left: 77%; top: 23.5%; width: 20cqw; gap: .3cqw; padding: .7cqw .85cqw; opacity: 0;
    border-radius: .7cqw; background: #1A1E24EB; border: 1px solid #FFFFFF17; box-shadow: 0 1.2cqw 3cqw #000000CC;
    font-size: .8cqw; line-height: 1.4; color: var(--text-2); transform-origin: 1cqw 0; animation-name: c-ghint;
  }
  .ghint b { font-size: .85cqw; color: #F2F4F7; }
  @keyframes c-ghint { 0%, 48% { opacity: 0; scale: .96; } 50.5%, 56% { opacity: 1; scale: 1; } 58%, 100% { opacity: 0; } }
  /* Polish: a light runs around the lit spot (only while its chapter is on screen) */
  .spot::after {
    content: ""; position: absolute; inset: -1.5px; padding: 1.5px; border-radius: inherit; pointer-events: none;
    background: conic-gradient(from var(--sa), transparent 0 78%, #E6FBFF 90%, transparent 98%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
    animation: spot-run 2.4s linear infinite paused;
  }
  .chapter.live .spot::after { animation-play-state: running; }
  @keyframes spot-run { to { --sa: 360deg; } }
}

/* ---------- Sparks motion (design 6.2) ---------- */
@property --sa { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@media (prefers-reduced-motion: no-preference) {
  @media (hover: hover) {
    .btn-primary:hover::after { translate: 360% 0; transition: translate .6s var(--ease); }
  }
  .caret { animation: blink 1s steps(1) infinite; }
  @keyframes blink { 50% { opacity: 0; } }
  .facts b.pulse { animation: pulse-ok 1.4s var(--ease) 1; }
  @keyframes pulse-ok { 30% { color: var(--ok); text-shadow: 0 0 18px #4ADE8099; } }
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    .progress-head {
      display: block; position: fixed; top: -1px; left: 0; z-index: 61; width: 18px; height: 4px; border-radius: 2px;
      background: #E6FBFF; box-shadow: 0 0 14px var(--accent); animation: head linear both; animation-timeline: scroll(root);
    }
    @keyframes head { from { translate: -18px 0; } to { translate: calc(100vw - 18px) 0; } }
  }
}

/* ---------- Mobile motion (design 6.5) ----------
   Same scene, keyframes and chapters as desktop. The hero scene gets a camera (translate + scale,
   --cNx/--cNy/--cNs from main.js) that frames each state above a bottom copy panel; chapter
   captions sit under the screenshot instead of beside the spot. */
@media (prefers-reduced-motion: no-preference) and (max-width: 960px) {
  .art.scene { left: 0; top: 0; margin: 0; transform-origin: 0 0; scale: var(--c1s, .5); translate: var(--c1x, 0) var(--c1y, 0); animation-name: s-mcam; }
  @keyframes s-mcam {
    0%, 10% { translate: var(--c1x) var(--c1y); scale: var(--c1s); }
    28%, 45% { translate: var(--c2x) var(--c2y); scale: var(--c2s); }
    58%, 75% { translate: var(--c3x) var(--c3y); scale: var(--c3s); }
    86%, 100% { translate: var(--c4x) var(--c4y); scale: var(--c4s); }
  }
  .art.copies { left: 16px; right: 16px; top: auto; bottom: 28px; width: auto; height: auto; margin: 0; scale: none; display: grid; }
  .art.copies .hcopy { position: static; grid-area: 1 / 1; align-self: end; width: auto; gap: 12px; justify-items: start; text-align: left; }
  .art.copies .hcopy :is(h1, h2) { font-size: clamp(30px, 9vw, 40px); }
  .art.copies .hcopy .lede { font-size: 15px; max-width: none; }
  .art.copies .hcopy .eyebrow { font-size: 10.5px; }
  .art.copies .c-d .btn-ghost { display: none; }

  .show { padding-inline: 0; }
  .show-head { padding-inline: 16px; }
  .pin { padding: 76px 16px 20px; }
  .ch-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .ch-inner { grid-template-rows: auto auto; align-content: start; gap: 16px; }
  .ch-head h3 { font-size: clamp(24px, 7vw, 32px); }
  .stage { width: 100%; }
  .cap { left: 0; top: calc(100% + 18px); width: 100%; font-size: 14px; }
  .cap b { font-size: 17px; }
  .cap.k0 { top: calc(100% + 18px); bottom: auto; left: 0; font-size: 15px; }
  .cap::before, .cap::after { display: none; }
}

/* Phone landscape: too short to stack, so things sit side by side. Hero copy on the left with the
   camera framing the right half (main.js); chapters put the screenshot left, headline + caption right. */
@media (prefers-reduced-motion: no-preference) and (max-width: 960px) and (max-height: 520px) and (orientation: landscape) {
  .art.copies { left: 16px; right: auto; top: 64px; bottom: 12px; width: 46vw; align-content: center; }
  .art.copies .hcopy { align-self: center; gap: 10px; }
  .art.copies .hcopy :is(h1, h2) { font-size: 30px; }
  .art.copies .hcopy .lede { font-size: 14px; }
  .pin { padding: 64px 16px 12px; }
  .ch-inner { grid-template-columns: auto 1fr; grid-template-rows: auto 1fr; column-gap: 20px; row-gap: 8px; }
  .ch-head { grid-column: 2; grid-row: 1; gap: 8px; }
  .ch-head h3 { font-size: 20px; }
  .ch-num { margin-bottom: 6px; }
  .stage { grid-column: 1; grid-row: 1 / span 2; width: auto; height: calc(100vh - 76px); }
  .cap, .cap.k0 { left: calc(100% + 20px); top: auto; bottom: 0; width: calc(100vw - (100vh - 76px) * 1.6 - 52px); font-size: 13px; padding: 12px 14px; }
  .cap b { font-size: 15px; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .nav nav { display: none; }
  .nav .brand { padding: 6px 0; }
  .nav-actions { margin-left: auto; }
  .snippet { font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
  .bento { grid-template-columns: 1fr; }
  .card-wide { grid-column: auto; grid-template-columns: 1fr; }
  .card-wide .crop { width: 100%; height: auto; min-height: 0; }
  .truth { grid-template-columns: 1fr; }
  .source-card { padding: 36px 22px; }
  .foot { flex-direction: column; }
}
