/* Slipstream presentation - deep-ink control-room. One accent (electric indigo), two faces
   (Space Grotesk display + Inter body), charts as first-class objects, restrained motion. */
:root {
  --bg: #08090d;
  --bg2: #0c0e14;
  --ink: #eef1f7;
  --muted: #8b93a7;
  --faint: #5a6275;
  --line: rgba(255, 255, 255, 0.07);
  --accent: #7c8cff;
  --accent2: #9d7bff;
  --good: #58e1a5;
  /* data-encoding colours (charts) */
  --c-classical: #5aa9ff; --c-ml: #4ade80; --c-foundation: #fb923c;
  --c-naive: #8b93a7; --c-control: #c084fc; --c-agent: #f472b6;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px; line-height: 1.65; -webkit-font-smoothing: antialiased;
  overflow: hidden;             /* the scroller is .deck */
}
h1, h2, h3, .display { font-family: "Space Grotesk", Inter, sans-serif; letter-spacing: -0.02em; }

/* ---------- deck / slides (scroll-snap) ---------- */
.deck {
  height: 100vh; overflow-y: auto; scroll-snap-type: y mandatory;
  scroll-padding-top: 0;
}
.deck::-webkit-scrollbar { width: 0; }
.slide {
  min-height: 100vh; scroll-snap-align: start; position: relative;
  display: flex; flex-direction: column; justify-content: center;
  padding: 96px 9vw 104px; max-width: 1220px; margin: 0 auto;
}
.slide-inner { width: 100%; max-width: 940px; }
.eyebrow {
  display: inline-block; color: var(--accent); font-size: 12px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase; margin-bottom: 18px;
}
.slide h2 { font-size: clamp(30px, 4.4vw, 52px); line-height: 1.05; margin: 0 0 22px; font-weight: 600; }
.slide h3 { font-size: 19px; margin: 30px 0 10px; color: var(--ink); }
.lead { font-size: clamp(17px, 1.5vw, 20px); color: #c7cdda; max-width: 720px; }
p { color: #b9c0cf; max-width: 720px; }
b, strong { color: var(--ink); font-weight: 600; }
.muted { color: var(--muted); font-size: 14px; }
.accent { color: var(--accent); }

/* ---------- background glow ---------- */
.glow {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(60vw 60vw at 78% 12%, rgba(124, 140, 255, 0.10), transparent 60%),
    radial-gradient(50vw 50vw at 10% 92%, rgba(157, 123, 255, 0.08), transparent 60%);
}
.slide, .nav, .progress { position: relative; z-index: 1; }

/* ---------- fixed UI: wordmark, stage selector, slide controls ---------- */
.progress { position: fixed; top: 0; left: 0; height: 2px; background: linear-gradient(90deg, var(--accent), var(--accent2)); z-index: 9; transition: width .2s linear; }
.mark { position: fixed; top: 20px; left: 30px; z-index: 8; font-family: "Space Grotesk"; font-weight: 700;
  font-size: 16px; letter-spacing: -0.02em; color: var(--ink); cursor: pointer; opacity: .85; transition: opacity .2s; }
.mark:hover { opacity: 1; }

.stagesel { position: fixed; top: 16px; right: 26px; z-index: 8; display: flex; align-items: center; gap: 4px;
  background: rgba(14, 17, 24, .72); border: 1px solid var(--line); border-radius: 999px; padding: 5px 6px 5px 15px;
  backdrop-filter: blur(12px); transition: opacity .35s; }
.stagesel .ssl { color: var(--faint); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; margin-right: 4px; }
.sseg { background: transparent; border: 0; color: var(--muted); font: 600 13px Inter, sans-serif; padding: 6px 11px;
  border-radius: 999px; cursor: pointer; transition: background .18s, color .18s; }
.sseg:hover { color: var(--ink); }
.sseg.on { background: var(--accent); color: #0a0c12; }

.controls { position: fixed; bottom: 26px; right: 28px; z-index: 8; display: flex; align-items: center; gap: 4px;
  background: rgba(14, 17, 24, .74); border: 1px solid var(--line); border-radius: 999px; padding: 6px; backdrop-filter: blur(12px); }
.ctl-pos { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; padding: 0 14px; min-width: 176px; text-align: center; font-weight: 500; }
.cbtn { width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .06); color: var(--ink);
  font-size: 19px; line-height: 0; cursor: pointer; transition: background .16s, transform .16s, color .16s;
  display: flex; align-items: center; justify-content: center; font-family: "Space Grotesk"; }
.cbtn:hover { background: var(--accent); color: #0a0c12; transform: scale(1.07); }

/* ---------- hero ---------- */
.hero { padding: 96px 9vw; max-width: 1320px; }
.hero-grid { display: grid; grid-template-columns: 0.92fr 1.08fr; gap: 48px; align-items: center; width: 100%; }
.hero h1 {
  font-size: clamp(46px, 7vw, 92px); line-height: 0.98; font-weight: 700; margin: 0 0 8px;
  background: linear-gradient(180deg, #fff, #aeb6cc); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .tag { color: var(--accent); font-weight: 600; letter-spacing: 0.02em; margin: 0 0 22px; font-size: 15px; }
.hero .promise { font-size: clamp(20px, 2.2vw, 28px); color: #d6dbe6; font-family: "Space Grotesk"; font-weight: 500; line-height: 1.25; max-width: 520px; }
.hero .sub { margin-top: 18px; color: var(--muted); font-size: 16px; max-width: 480px; }
.scrollcue { position: absolute; bottom: 30px; left: 9vw; color: var(--faint); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(0); opacity: .6; } 50% { transform: translateY(5px); opacity: 1; } }

/* ---------- stats (cardless) ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 30px 0 8px; border-top: 1px solid var(--line); }
.stat { padding: 24px 26px 22px 0; border-right: 1px solid var(--line); }
.stat:last-child { border-right: none; }
.stat .num { font-family: "Space Grotesk"; font-size: clamp(40px, 5vw, 62px); font-weight: 700; line-height: 1;
  background: linear-gradient(180deg, var(--accent), var(--accent2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat .lab { font-weight: 600; margin-top: 12px; font-size: 15px; }
.stat .sub2 { color: var(--muted); font-size: 12.5px; margin-top: 4px; line-height: 1.45; }

/* ---------- chart ---------- */
.chart { width: 100%; }
.chart-wrap { margin: 8px 0; }
.chart-cap { color: var(--muted); font-size: 13px; margin-top: 6px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
.two-col .chart { min-width: 0; }

/* ---------- distill cards row (kept minimal) ---------- */
.pills { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0; }
.pill { border: 1px solid var(--line); border-radius: 999px; padding: 9px 16px; font-size: 13.5px; color: var(--muted); }
.pill b { color: var(--good); }

/* ---------- limits / lists ---------- */
.limits { list-style: none; padding: 0; margin: 14px 0; max-width: 760px; }
.limits li { padding: 9px 0 9px 22px; position: relative; color: #b9c0cf; font-size: 15px; border-bottom: 1px solid var(--line); }
.limits li::before { content: "→"; position: absolute; left: 0; color: var(--accent); }

/* ---------- pipeline steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 28px 0; }
.step { padding: 0 22px 0 0; border-left: 1px solid var(--line); padding-left: 20px; }
.step .sn { color: var(--accent); font-family: "Space Grotesk"; font-weight: 700; font-size: 22px; }
.step b { display: block; margin: 8px 0 6px; }
.step .sd { color: var(--muted); font-size: 13.5px; line-height: 1.5; }

/* ---------- releases ---------- */
.rel { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 30px; margin: 24px 0; max-width: 820px; }
.rel-item { display: block; padding: 16px 0; border-top: 1px solid var(--line); text-decoration: none;
  color: inherit; transition: border-color .2s; }
.rel-item:hover { border-color: var(--accent); }
.rel-item:hover b { color: var(--accent); }
.rel-item b { display: block; font-size: 16px; margin-bottom: 4px; transition: color .2s; }
.rel-item .rd { color: var(--muted); font-size: 13.5px; }
.slug { margin-top: 8px; font-family: ui-monospace, Menlo, monospace; font-size: 12px; color: var(--accent); }
.herolinks { margin-top: 22px; display: flex; gap: 22px; flex-wrap: wrap; }
.herolinks a { color: var(--accent); text-decoration: none; font-weight: 600; font-size: 15px; transition: filter .15s; }
.herolinks a:hover { filter: brightness(1.2); text-decoration: underline; }
.btn { display: inline-block; margin-top: 24px; background: var(--accent); color: #0a0c12; font-weight: 600;
  padding: 12px 22px; border-radius: 10px; text-decoration: none; font-size: 15px; transition: transform .15s, filter .15s; }
.btn:hover { transform: translateY(-2px); filter: brightness(1.08); }
.err { background: #2a1414; border: 1px solid #5b2a2a; color: #ffb4b4; padding: 10px 14px; border-radius: 8px; font-size: 13px; }

/* ---------- live demo ---------- */
.demo-ctl { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px; margin: 20px 0 6px; }
.demo-ctl label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted);
  font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.demo-ctl select { background: var(--bg2); color: var(--ink); border: 1px solid var(--line);
  border-radius: 9px; padding: 10px 12px; font: 500 14px Inter, sans-serif; min-width: 220px; cursor: pointer; }
.demo-ctl select:hover { border-color: rgba(124,140,255,.5); }
.demo-stg { display: flex; gap: 4px; background: rgba(14,17,24,.6); border: 1px solid var(--line);
  border-radius: 999px; padding: 4px; align-self: flex-end; }
.demo-run { background: var(--accent); color: #0a0c12; font-weight: 700; border: 0; border-radius: 10px;
  padding: 11px 22px; font-size: 14.5px; cursor: pointer; transition: transform .15s, filter .15s; align-self: flex-end; }
.demo-run:hover:not(:disabled) { transform: translateY(-2px); filter: brightness(1.08); }
.demo-run:disabled { opacity: .55; cursor: progress; }
.demo-msg { margin: 12px 0; color: var(--muted); font-size: 14px; display: flex; align-items: center; gap: 10px; }
.demo-msg::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--accent);
  animation: pulse 1.2s ease-in-out infinite; }
.demo-msg.err { color: #ffb4b4; } .demo-msg.err::before { background: #ff7676; animation: none; }
@keyframes pulse { 0%,100% { opacity: .35; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.15); } }
.demo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; margin: 14px 0 4px; }
.demo-grid > div { min-width: 0; }
.demo-read { font-size: 16.5px; color: #d6dbe6; line-height: 1.55; margin: 10px 0 2px;
  padding: 16px 18px; background: rgba(124,140,255,.07); border: 1px solid rgba(124,140,255,.22); border-radius: 12px; }
.demo-trace { margin-top: 16px; border-top: 1px solid var(--line); }
.demo-trace summary { cursor: pointer; color: var(--muted); font-size: 13.5px; padding: 12px 0; font-weight: 600; }
.demo-trace summary:hover { color: var(--ink); }
.tturn { border-left: 2px solid rgba(124,140,255,.3); padding: 4px 0 4px 14px; margin: 10px 0; }
.tturn .tr { color: #b9c0cf; font-size: 13.5px; line-height: 1.5; margin-bottom: 6px; white-space: pre-wrap; }
.tturn pre { margin: 4px 0; padding: 9px 12px; border-radius: 7px; font-family: ui-monospace, Menlo, monospace;
  font-size: 12px; line-height: 1.45; overflow-x: auto; white-space: pre-wrap; word-break: break-word; }
.tturn .tc { background: rgba(124,140,255,.08); color: #c7cdda; border: 1px solid rgba(124,140,255,.16); }
.tturn .to { background: rgba(255,255,255,.03); color: #8b93a7; }

/* ---------- entrance reveal ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.slide.in .reveal { opacity: 1; transform: none; }
.slide.in .reveal:nth-child(2) { transition-delay: .07s; }
.slide.in .reveal:nth-child(3) { transition-delay: .14s; }
.slide.in .reveal:nth-child(4) { transition-delay: .21s; }
.slide.in .reveal:nth-child(5) { transition-delay: .28s; }
@media (prefers-reduced-motion: reduce) { .reveal { transition: none; opacity: 1; transform: none; } .scrollcue { animation: none; } }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  body { font-size: 16px; }
  .slide { padding: 78px 22px 96px; }
  .hero { padding: 78px 22px 96px; }
  .hero-grid { grid-template-columns: 1fr; gap: 26px; }
  .scrollcue { display: none; }
  .stats, .steps { grid-template-columns: repeat(2, 1fr); }
  .two-col, .rel { grid-template-columns: 1fr; }
  .stat { border-right: none; border-bottom: 1px solid var(--line); }
  .mark { font-size: 14px; top: 16px; left: 18px; }
  .stagesel { top: 10px; right: 12px; padding: 4px 5px 4px 10px; }
  .stagesel .ssl { display: none; }
  .sseg { padding: 5px 9px; font-size: 12px; }
  .controls { bottom: 16px; right: 14px; }
  .ctl-pos { min-width: 0; font-size: 11.5px; padding: 0 8px; }
}
