:root {
  --bg: #f6f5f1; --surface: #ffffff; --ink: #13181d; --muted: #56606a; --line: #e3dfd6;
  --night: #0a1520; --night2: #0f3340; --on-night: #e9f1f3; --on-night-muted: #a9bcc4;
  --iot: #f0a03a; --auto: #1fb3a6; --ai: #8f7df7;
  --head: "Space Grotesk", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0e1419; --surface: #151d24; --ink: #e8ecef; --muted: #9daab4; --line: #24303a; color-scheme: dark; }
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink);
  font: 17px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.wrap { max-width: 1040px; margin: 0 auto; padding-inline: 20px; }
a { color: var(--auto); }
h1, h2, h3, .stat b, .brand { font-family: var(--head); }

/* Top bar sits on the dark hero */
.top { position: absolute; inset: 0 0 auto 0; z-index: 2; }
.top .wrap { display: flex; justify-content: space-between; align-items: center; padding-block: 18px; }
.brand { color: var(--on-night); font-weight: 700; text-decoration: none; letter-spacing: 0.01em; }
.top nav a { color: var(--on-night-muted); text-decoration: none; margin-left: 22px; font-weight: 500; }
.top nav a:hover, .top nav a[aria-current] { color: #fff; }

/* Hero */
.hero { position: relative; overflow: hidden; color: var(--on-night);
  background: radial-gradient(1200px 500px at 85% 10%, #134a57 0%, transparent 60%),
              linear-gradient(160deg, var(--night) 0%, var(--night2) 100%);
  padding: 96px 0 112px; }
.hero.short { padding: 110px 0 56px; }
.hero .wrap { position: relative; z-index: 1; }
.eyebrow { display: flex; gap: 18px; flex-wrap: wrap; margin: 0 0 18px; font-weight: 600;
  font-size: 0.85rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--on-night-muted); }
.eyebrow span::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%;
  margin-right: 8px; vertical-align: 1px; background: currentColor; }
.eyebrow .iot { color: var(--iot); } .eyebrow .auto { color: var(--auto); } .eyebrow .ai { color: var(--ai); }
.hero h1 { font-size: clamp(2.6rem, 7vw, 4.6rem); line-height: 1.02; margin: 0 0 18px; letter-spacing: -0.02em; }
.hero .lede { font-size: clamp(1.25rem, 2.6vw, 1.7rem); line-height: 1.3; margin: 0 0 18px; max-width: 30ch; color: #fff; }
.hero .sub { color: var(--on-night-muted); max-width: 56ch; margin: 0; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: center; }
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.1rem); }
.molecule { margin: 0; }
.molecule canvas { display: block; width: 100%; height: 420px; cursor: grab; touch-action: none; }
.molecule canvas:active { cursor: grabbing; }
.molecule figcaption { color: var(--on-night-muted); font-size: 0.82rem; line-height: 1.45; max-width: 46ch; margin: 4px auto 0; text-align: center; }
.molecule figcaption b { color: var(--on-night); font-weight: 600; }

/* Stats overlap the bottom of the hero */
.stats { display: grid; gap: 14px; grid-template-columns: repeat(4, 1fr); margin-top: -64px; position: relative; z-index: 3; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px 18px 16px;
  box-shadow: 0 10px 30px rgba(10, 21, 32, 0.08); border-top: 4px solid var(--c, var(--auto)); }
.stat b { display: block; font-size: 1.9rem; line-height: 1.1; color: var(--ink); }
.stat span { display: block; color: var(--muted); font-size: 0.92rem; line-height: 1.4; margin-top: 6px; }

/* Story timeline */
main { padding-bottom: 24px; }
h2 { font-size: 1.9rem; margin: 72px 0 28px; letter-spacing: -0.01em; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 11px; top: 8px; bottom: 8px; width: 2px;
  background: linear-gradient(var(--iot), var(--auto), var(--ai), var(--iot)); opacity: 0.5; }
.timeline li { position: relative; padding: 0 0 34px 48px; }
.timeline li::before { content: ""; position: absolute; left: 3px; top: 6px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--bg); border: 4px solid var(--c); }
.when { font-weight: 700; font-size: 0.82rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--c); }
.timeline h3 { font-size: 1.35rem; margin: 2px 0 6px; }
.timeline p { margin: 0 0 10px; color: var(--muted); max-width: 64ch; }
.tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tag { font-size: 0.78rem; font-weight: 600; padding: 2px 10px; border-radius: 99px;
  color: var(--t); background: color-mix(in srgb, var(--t) 14%, transparent); }
.tag.iot { --t: var(--iot); } .tag.auto { --t: var(--auto); } .tag.ai { --t: var(--ai); }
.c-iot { --c: var(--iot); } .c-auto { --c: var(--auto); } .c-ai { --c: var(--ai); }

/* The rule */
.rule { margin: 56px 0 0; color: var(--on-night);
  background: linear-gradient(120deg, var(--night) 0%, var(--night2) 100%); }
.rule .wrap { padding-block: 64px; }
.rule p { font-family: var(--head); font-size: clamp(1.5rem, 3.4vw, 2.3rem); line-height: 1.25; margin: 0; max-width: 28ch; }
.rule p em { font-style: normal; background: linear-gradient(90deg, var(--iot), var(--auto), var(--ai));
  -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Article pages */
article { max-width: 70ch; padding: 48px 0 40px; }
article .lede { font-size: 1.3rem; line-height: 1.45; font-family: var(--head); }
article p { margin: 0 0 1.15em; }

footer { background: var(--night); color: var(--on-night-muted); font-size: 0.92rem; }
footer .wrap { padding-block: 26px; display: flex; gap: 18px; flex-wrap: wrap; justify-content: space-between; }
footer a { color: var(--on-night); text-decoration: none; }

@media (max-width: 760px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .hero { padding: 100px 0 100px; }
  .hero-grid { grid-template-columns: 1fr; }
  .molecule canvas { height: 320px; }
  .top nav a { margin-left: 16px; }
}

/* ---- Pages beyond the home page ---- */
.top nav { display: flex; flex-wrap: wrap; justify-content: flex-end; row-gap: 4px; }
.page-hero h1 { font-size: clamp(2.4rem, 5.5vw, 3.6rem); }
.page-hero .lede { max-width: 34ch; }
section.block { padding: 64px 0 8px; }
section.block h2 { margin-top: 0; }
.prose { max-width: 68ch; }
.prose p { margin: 0 0 1.1em; }
.big { font-family: var(--head); font-size: clamp(1.4rem, 3vw, 1.9rem); line-height: 1.3; max-width: 32ch; }
.split { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 40px; align-items: center; }
.photo { width: 100%; border-radius: 18px; display: block; box-shadow: 0 18px 40px rgba(10, 21, 32, 0.18); }
.chapters { display: grid; gap: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.chapter { display: block; text-decoration: none; color: inherit; background: var(--surface); border: 1px solid var(--line);
  border-radius: 16px; padding: 22px 22px 20px; border-top: 5px solid var(--c, var(--auto)); transition: transform .15s ease, box-shadow .15s ease; }
.chapter:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(10, 21, 32, 0.1); }
.chapter h3 { font-size: 1.3rem; margin: 6px 0 8px; }
.chapter p { margin: 0 0 12px; color: var(--muted); }
.chapter .go { font-weight: 600; color: var(--c, var(--auto)); }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.checks li { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px 14px 46px; position: relative; color: var(--muted); }
.checks li b { color: var(--ink); display: block; }
.checks li::before { content: ""; position: absolute; left: 16px; top: 18px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--c, var(--auto)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c, var(--auto)) 20%, transparent); }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.compare > div { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px; }
.compare h3 { margin: 0 0 6px; }
.compare p { margin: 0; color: var(--muted); }
.flow { display: flex; align-items: center; gap: 6px; margin: 14px 0; flex-wrap: wrap; }
.flow span { background: color-mix(in srgb, var(--muted) 14%, transparent); border-radius: 6px; padding: 4px 10px; font-size: 0.85rem; }
.flow i { color: var(--muted); font-style: normal; }
.dark { background: linear-gradient(160deg, var(--night) 0%, var(--night2) 100%); color: var(--on-night); margin-top: 64px; }
.dark .wrap { padding-block: 56px; }
.dark p { color: var(--on-night-muted); }
.dark .molecule canvas { height: 520px; }
.cta { display: inline-block; margin-top: 8px; padding: 12px 22px; border-radius: 99px; font-weight: 600; text-decoration: none;
  color: #fff; background: linear-gradient(90deg, #d4861f, #17998e 55%, #7462e6); }
.cta.ghost { background: none; color: var(--ink); border: 2px solid var(--line); }
.note { font-size: 0.88rem; color: var(--muted); }
.soon { display: inline-block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 4px 12px; border-radius: 99px; background: color-mix(in srgb, var(--ai) 22%, transparent); color: #c9c0ff; }
@media (max-width: 760px) {
  .split, .compare, .chapters, .checks { grid-template-columns: 1fr; }
  .split .photo { max-width: 260px; }
  .dark .molecule canvas { height: 360px; }
  .top .wrap { flex-wrap: wrap; gap: 6px; }
  .top nav a { margin-left: 0; margin-right: 14px; }
  .top nav { justify-content: flex-start; width: 100%; }
}
.metric-toggle { display: flex; gap: 8px; justify-content: center; align-items: center; margin: 6px 0 10px; color: var(--on-night-muted); font-size: 0.85rem; }
.metric-toggle button { font: inherit; font-weight: 600; color: var(--on-night); background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 99px; padding: 5px 14px; cursor: pointer; }
.metric-toggle button[aria-pressed="true"] { background: linear-gradient(90deg, #d4861f, #17998e 55%, #7462e6); border-color: transparent; }
.dark .molecule figcaption { max-width: 72ch; }

/* ===== The deck: one screen, chapters instead of scrolling ===== */
body.deck { height: 100vh; height: 100dvh; overflow: hidden; color: var(--on-night);
  background: radial-gradient(1100px 700px at 75% 35%, #134a57 0%, transparent 60%), linear-gradient(160deg, var(--night) 0%, var(--night2) 100%); }
body.deck a { color: #6fd8cf; }
.genome-bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; cursor: grab; touch-action: none; }
.genome-bg:active { cursor: grabbing; }
.deck-top { position: fixed; top: 0; left: 0; right: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center;
  padding: 18px 28px 0 84px; pointer-events: none; }
.deck-top a { pointer-events: auto; text-decoration: none; }
.deck-top .brand { color: #fff; font-family: var(--head); font-weight: 700; font-size: 1.05rem; }
.deck-top .deck-link { color: var(--on-night-muted); font-weight: 600; }

.me { position: fixed; z-index: 4; left: 28px; top: 10px; width: 44px; height: 44px; object-fit: cover; object-position: 50% 18%;
  border-radius: 50%; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85), 0 8px 24px rgba(0, 0, 0, 0.35);
  transition: left .8s cubic-bezier(.2, .7, .2, 1), top .8s cubic-bezier(.2, .7, .2, 1), width .8s cubic-bezier(.2, .7, .2, 1),
    height .8s cubic-bezier(.2, .7, .2, 1), border-radius .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1); }
body[data-scene="who"] .me { left: 6vw; top: 50%; transform: translateY(-50%); width: 300px; height: 400px; border-radius: 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45); }

.scenes { position: fixed; inset: 0; z-index: 2; pointer-events: none; }
.scene { position: absolute; inset: 70px 0 92px 0; display: flex; align-items: center; padding: 0 6vw; opacity: 0;
  transform: translateX(48px); transition: opacity .55s ease, transform .55s ease; pointer-events: none; }
.scene.past { transform: translateX(-48px); }
.scene.on { opacity: 1; transform: none; }
.scene .content { max-width: 560px; max-height: 100%; overflow: auto; pointer-events: auto; scrollbar-width: none; }
.scene .content.wide { max-width: 660px; }
.scene .content.center { margin: 0 auto; text-align: center; }
#who .content { margin-left: calc(300px + 48px); }
.scene h1 { font-size: clamp(2.8rem, 6.5vw, 5.2rem); line-height: 1; margin: 0 0 20px; letter-spacing: -0.02em; }
.scene h2 { font-size: clamp(2rem, 4.2vw, 3.3rem); line-height: 1.06; margin: 0 0 16px; letter-spacing: -0.02em; }
.scene p { color: var(--on-night-muted); margin: 0 0 14px; }
.scene .lede { color: #fff; font-size: clamp(1.1rem, 2vw, 1.45rem); line-height: 1.4; }
.scene .big { color: #fff; font-family: var(--head); font-size: clamp(1.3rem, 2.6vw, 1.9rem); line-height: 1.25; }
.scene .hint { font-size: 0.9rem; max-width: 50ch; }
.scene .when { margin-bottom: 10px; }
.scene button.cta { border: 0; cursor: pointer; font: inherit; font-weight: 600; }
.scene .note { font-size: 0.85rem; }
.c-iot { --c: var(--iot); } .c-auto { --c: var(--auto); } .c-ai { --c: var(--ai); }
.facts { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.facts div { background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.12); border-top: 3px solid var(--c);
  border-radius: 12px; padding: 12px 16px; min-width: 190px; backdrop-filter: blur(4px); }
.facts b { display: block; font-family: var(--head); font-size: 1.6rem; color: #fff; }
.facts span { font-size: 0.85rem; color: var(--on-night-muted); }
.chips { list-style: none; padding: 0; margin: 14px 0 4px; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { font-size: 0.84rem; padding: 6px 12px; border-radius: 99px; color: #e9f1f3;
  background: color-mix(in srgb, var(--c) 18%, transparent); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.cards .card { display: block; text-decoration: none; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.12);
  border-top: 3px solid var(--c); border-radius: 12px; padding: 14px; backdrop-filter: blur(4px); }
.cards .card b { display: block; color: #fff; font-family: var(--head); margin-bottom: 4px; }
.cards .card span { display: block; color: var(--on-night-muted); font-size: 0.84rem; line-height: 1.45; }
.scene .metric-toggle { justify-content: flex-start; margin: 16px 0 6px; }
.metric-note { color: #fff !important; font-size: 0.92rem; }

.rail { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: flex; align-items: center; gap: 16px; padding: 0 24px 14px;
  height: 92px; background: linear-gradient(transparent, rgba(5, 12, 18, 0.88) 45%); }
.rail .track { position: relative; flex: 1; align-self: stretch; display: flex; align-items: flex-end; }
.rail .track::before { content: ""; position: absolute; left: 0; right: 0; top: var(--line-top, 40px); height: 2px;
  background: linear-gradient(90deg, var(--iot), var(--auto), var(--ai)); opacity: 0.45; }
.rail .stops { position: relative; width: 100%; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; }
.rail .stops button { position: relative; background: none; border: 0; cursor: pointer; padding: 26px 2px 4px; color: var(--on-night-muted);
  font: 600 0.74rem var(--head); letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }
.rail .stops button::before { content: ""; position: absolute; left: 50%; top: 7px; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.28); }
.rail .stops button:hover, .rail .stops button[aria-selected="true"] { color: #fff; }
.rail .token { position: absolute; z-index: 1; top: 34px; left: 0; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 14px 5px #8feaff; transition: left .9s cubic-bezier(.55, 0, .2, 1); pointer-events: none; }
.rail .step-btn { flex: none; border: 1px solid rgba(255, 255, 255, 0.2); background: rgba(255, 255, 255, 0.06); color: #fff;
  border-radius: 99px; height: 40px; padding: 0 16px; font: 600 0.9rem system-ui, sans-serif; cursor: pointer; }
.rail .step-btn.next { background: linear-gradient(90deg, #d4861f, #17998e 55%, #7462e6); border-color: transparent; max-width: 280px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail .step-btn:disabled { opacity: 0.35; cursor: default; }

@media (max-width: 760px) {
  .deck-top { padding: 14px 16px 0 66px; }
  .me { left: 16px; }
  body[data-scene="who"] .me { left: 50%; top: 72px; transform: translateX(-50%); width: 150px; height: 190px; }
  .scene { inset: 62px 0 86px 0; padding: 0 18px; align-items: flex-start; }
  .scene .content { padding-top: 10px; }
  #who .content { margin-left: 0; padding-top: 220px; }
  .scene h1 { font-size: 2.6rem; }
  .scene h2 { font-size: 1.9rem; }
  .cards { grid-template-columns: 1fr; }
  .facts div { min-width: 0; flex: 1 1 140px; }
  .scene { inset: 62px 0 118px 0; }
  .scene .hint { display: none; }
  .chips li { font-size: 0.76rem; padding: 4px 10px; }
  .rail { flex-wrap: wrap; justify-content: space-between; gap: 6px 10px; padding: 0 12px 12px; height: auto; }
  .rail .track { order: -1; flex: 1 0 100%; height: 30px; }
  .rail .stops button { font-size: 0; padding: 22px 0 0; }
  .rail .step-btn.next { max-width: 230px; }
}
@media (prefers-reduced-motion: reduce) {
  .scene, .me, .rail .token { transition: none; }
}
.cta.ghost-dark { background: none; border: 2px solid rgba(255, 255, 255, 0.3); color: #fff !important; margin-left: 8px; }
