/* Hallmark · v2.0.0 · custom direction "Flowflow's water" · genre atmospheric · job: download · hero: centred two line head, the Mac and its lit notch below it, Flowflow swimming to the notch · nav: wordmark, two links, one action; turns into a floating pill after the hero · footer: one quiet row on the darkest water · signature: a dive through four saturated habitats with a depth gauge, each holding a black notch card · posture: full-palette · surface: per region full bleed fields; the notch cards stay black */
/* Hallmark · rhythm: light (sunlit hero) → warm sand (problem) → night (story) → cyan, emerald, amber, violet (the dive) → deep (meet, how) → pale shore → deep (download) */
/* Hallmark · waive 47b · the brief asks for the notch moment built in HTML and CSS, not a screenshot */
/* Hallmark · waive 23 · the founder asked for a colourful home world · colour is the section field; text on it is checked for AA */
/* Hallmark · waive 7b · --notch is the only pure black, used on notch surfaces, like the hardware */
/* Hallmark · waive 24b · spacing steps in 2px inside dense product cards · the notch cards copy the app's own tight spacing */

:root {
  /* Water, from the sunlit surface down to the abyss. */
  --surface: #2fd3e6;
  --surface-2: #1aa8d8;
  --shallow: #0d6aa6;
  --mid: #0a4377;
  --deep: #06264c;
  --abyss: #03132b;
  --abyss-2: #020c1d;

  /* Text on dark water. */
  --ink: #eaf7ff;
  --muted: #a6c6dd;
  --ink-dark: #03132b;

  /* The notch is true black, like the hardware. */
  --notch: #000000;
  --notch-line: #2a3a55;
  --notch-ink: #eef6ff;
  --notch-muted: #a9bbd0;

  /* The primary button. */
  --btn: #eaf7ff;
  --btn-ink: #03132b;
  --btn-edge: #59e6ff;

  /* Flowflow. */
  --flow: #3f8cff;
  --glow: #59e6ff;

  /* Accent colours used on black notch cards. */
  --explain: #59e6ff;
  --prove: #6cffb8;
  --catch: #ffb44a;
  --coral: #ff7b6b;
  --undo: #c2a6ff;

  /* The warm, dry surface of the problem. */
  --sand-1: #fff6e8;
  --sand-2: #ffe6c4;
  --sand-ink: #2b1a0c;
  --sand-muted: #6b4a2c;
  --sand-card: #ffffff;
  --done-bg: #dcf6e8;
  --done-ink: #0b6a40;

  /* The night sky over their world (the story). */
  --night-1: #1a0f55;
  --night-2: #0b1240;
  --star: #fff7d6;

  /* The four habitats of the dive. */
  --shallows-1: #8af1ff;
  --shallows-2: #34d2e4;
  --shallows-3: #13a7bf;
  --shallows-ink: #03232b;
  --shallows-muted: #0a3a45;
  --shallows-dark: #0b7d93;
  --shallows-light: #effeff;
  --fields-1: #0f8a63;
  --fields-2: #08603f;
  --fields-3: #054330;
  --fields-ink: #f1fff7;
  --fields-muted: #cdf3dd;
  --fields-lime: #c9ff6e;
  --reef-1: #ffd46e;
  --reef-2: #ffaa5c;
  --reef-3: #ff7f66;
  --reef-ink: #2a0f05;
  --reef-muted: #4a1f0c;
  --reef-dark: #9a3414;
  --reef-light: #fff4cf;
  --still-1: #6847dc;
  --still-2: #3b23a6;
  --still-3: #1d1160;
  --still-ink: #ffffff;
  --still-muted: #e2d9ff;
  --still-jelly: #eadfff;

  /* Doors to habitats still being discovered. */
  --door: #0c2140;
  --door-top: #14315c;
  --door-rim-1: #ff7eb6;
  --door-rim-2: #ffd36b;
  --door-rim-3: #b5ff6c;

  /* How it works. */
  --lens-top: #052a33;
  --lens-bottom: #0b3a44;
  --lens: #22d3ee;
  --lens-glass: #01161b;
  --lens-panel: #04131a;

  /* The shore (the practical part). */
  --shore: #eef4fb;
  --shore-card: #fbfdff;
  --shore-line: #d3deeb;
  --shore-ink: #10213a;
  --shore-muted: #435572;
  --shore-dark: #10213a;
  --alert: #b3261e;

  /* The pretend app. */
  --paper: #f7fbff;
  --paper-line: #c9d6e6;
  --paper-ink: #13233c;
  --paper-muted: #4f6380;

  --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Hanken Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-code: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;

  --max: 1200px;
  --gutter: clamp(16px, 4vw, 48px);
  --gap: clamp(28px, 4vw, 56px);
  --section: clamp(72px, 9vw, 120px);
  --r-card: 22px;
  --r-inner: 12px;
  --r-pill: 999px;
  --focus: var(--glow);
  --ease-out: cubic-bezier(.2, .8, .2, 1);

  /* Small surfaces and details. */
  --mask: #000000;
  --sparkle: #c9fbff;
  --field-white: #fbfdff;
  --plankton: #a0f0ff;
  --ray: #b8f6ff;
  --lid-top: #1a1f27;
  --lid-bottom: #0d1015;
  --lid-edge: #313a48;
  --wall-1: #0d2342;
  --wall-2: #091629;
  --wall-3: #0b1d36;
  --nbtn-hover: #121a28;
  --nbtn-hover-line: #3c4f70;
  --face-light: #cfeeff;
  --face-dark: #1d4fae;
  --chat: #13233a;
  --chat-line: #27405f;
  --base-1: #8792a3;
  --base-2: #4c5563;
  --base-3: #262c35;
  --base-notch: #3a414c;
  --bezel: #11151c;
  --code-bg: #07101d;
  --del: #ff9a8a;
  --tag-bg: #0b1726;
  --habitat-1: #0f5fa8;
  --habitat-2: #07306a;
  --habitat-3: #041a3a;
  --file-bg: #071c24;
  --term-bg: #020a0d;
  --probe-bar: #082029;
  --probe-dot: #23434e;
  --switch-off: #12323b;
  --code-chip: #e2eaf4;
  --shadow: #01070f;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html, body { overflow-x: clip; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body {
  background: var(--abyss);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  caret-color: var(--glow);
  scrollbar-color: var(--shallow) var(--abyss);
}
::selection { background: var(--glow); color: var(--ink-dark); }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
strong, b { font-weight: 600; }
code { font-family: var(--font-code); font-size: .88em; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; overflow-wrap: break-word; min-width: 0; }
h2 { font-size: clamp(32px, 4.2vw, 56px); line-height: 1.05; letter-spacing: -.015em; text-wrap: balance; max-width: 20ch; }
h3 { font-size: clamp(24px, 2.6vw, 34px); line-height: 1.1; letter-spacing: -.012em; text-wrap: balance; }
p, li, dd { text-wrap: pretty; }
.sub { margin-top: 14px; color: var(--muted); font-size: 19px; max-width: 48ch; }
.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 6px; transition: none; }
[hidden] { display: none !important; }
.flora { position: absolute; pointer-events: none; height: auto; }
.edge { position: absolute; left: 0; top: -1px; width: 100%; height: clamp(36px, 5vw, 70px); pointer-events: none; z-index: 1; }

.skip {
  position: fixed; left: 16px; top: 12px; z-index: 100;
  background: var(--btn); color: var(--btn-ink); padding: 10px 16px; border-radius: var(--r-pill);
  font-weight: 600; text-decoration: none;
}
.skip:not(:focus) { width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus-visible { outline-color: var(--ink-dark); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--btn); color: var(--btn-ink);
  font-weight: 600; font-size: 17px; line-height: 1; text-decoration: none;
  padding: 16px 24px 15px; border-radius: var(--r-pill); border: 0; cursor: pointer;
  box-shadow: 0 4px 0 0 var(--btn-edge);
  transition: transform .18s var(--ease-out), box-shadow .18s var(--ease-out);
}
.btn svg { width: 17px; height: 17px; flex: none; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 5px 0 0 var(--btn-edge), 0 10px 34px -6px var(--btn-edge); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 0 var(--btn-edge); transition-duration: .06s; }
.btn-small { font-size: 15px; padding: 11px 16px 10px; gap: 8px; box-shadow: 0 3px 0 0 var(--btn-edge); }
.btn-small svg { width: 15px; height: 15px; }
.btn-small:hover { box-shadow: 0 4px 0 0 var(--btn-edge), 0 8px 24px -6px var(--btn-edge); }
.btn-small:active { box-shadow: 0 1px 0 0 var(--btn-edge); transform: translateY(2px); }
.btn-outline {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 2px solid currentColor; border-radius: var(--r-pill);
  padding: 14px 22px 13px; font-weight: 600; line-height: 1; text-decoration: none; cursor: pointer;
  transition: transform .18s var(--ease-out), background-color .18s var(--ease-out);
}
.btn-outline:hover { transform: translateY(-1px); background-color: color-mix(in srgb, currentColor 10%, transparent); }
.btn-outline:active { transform: translateY(1px); }
.btn-ghost {
  background: transparent; border: 1px solid color-mix(in srgb, var(--lens) 40%, transparent); color: var(--ink);
  border-radius: var(--r-pill); padding: 9px 16px; font-size: 15px; font-weight: 600; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
}
.btn-ghost:hover { background-color: color-mix(in srgb, var(--lens) 14%, transparent); border-color: var(--lens); }
.btn-ghost:disabled { cursor: not-allowed; color: var(--muted); background: transparent; border-color: color-mix(in srgb, var(--muted) 25%, transparent); }
.text-link { color: var(--ink); font-weight: 500; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 5px; text-decoration-color: color-mix(in srgb, currentColor 45%, transparent); transition: text-decoration-color .15s ease; }
.text-link:hover { text-decoration-color: currentColor; }
.text-btn { background: none; border: 0; padding: 4px 0; color: var(--muted); font-size: 15px; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.text-btn:hover { color: var(--ink); }

/* ---------- nav ---------- */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 50; padding: 14px var(--gutter); pointer-events: none; }
.nav-in {
  pointer-events: auto;
  max-width: calc(var(--max) - 2 * var(--gutter) + 24px); margin-inline: auto;
  display: flex; align-items: center; gap: 28px;
  padding: 8px 8px 8px 12px; border-radius: var(--r-pill);
  color: var(--ink-dark); background-color: transparent;
  transition: background-color .3s ease, color .3s ease, box-shadow .3s ease, max-width .3s var(--ease-out);
}
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font-family: var(--font-display); font-weight: 700; font-size: 21px; letter-spacing: -.01em; margin-right: auto; }
.brand img { width: 28px; height: auto; }
.nav-links { display: flex; gap: 26px; font-size: 15px; font-weight: 600; }
.nav-links a { text-decoration: none; padding: 6px 0; }
.nav-links a:hover { text-decoration: underline; text-underline-offset: 5px; }
.nav .btn-small { background: var(--ink-dark); color: var(--ink); }
.nav.is-pill .nav-in {
  max-width: 720px; color: var(--ink);
  background-color: color-mix(in srgb, var(--abyss) 88%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--glow) 22%, transparent), 0 16px 40px -18px var(--shadow);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.nav.is-pill .btn-small { background: var(--btn); color: var(--btn-ink); }
.nav.is-pill :focus-visible { outline-color: var(--glow); }
.nav :focus-visible { outline-color: var(--ink-dark); }

/* ---------- 1. hero: the sunlit surface ---------- */
.hero {
  position: relative; overflow: clip;
  padding: 112px 0 clamp(64px, 7vw, 96px);
  background: linear-gradient(180deg, var(--surface) 0, var(--surface-2) 56px, var(--shallow) 112px, var(--mid) 300px, var(--deep) 700px, var(--abyss) 100%);
}
.hero-sky { position: absolute; inset: 0; pointer-events: none; }
.surface {
  position: absolute; inset: 0 0 auto; height: 120px; opacity: .55;
  background:
    radial-gradient(40px 9px at 10% 64px, var(--sparkle) 0, transparent 100%),
    radial-gradient(60px 10px at 34% 70px, var(--sparkle) 0, transparent 100%),
    radial-gradient(48px 8px at 63% 62px, var(--sparkle) 0, transparent 100%),
    radial-gradient(70px 11px at 86% 72px, var(--sparkle) 0, transparent 100%);
}
.rays {
  position: absolute; inset: 0;
  background: repeating-conic-gradient(from 196deg at 60% -12%, color-mix(in srgb, var(--ray) 13%, transparent) 0 3.5deg, transparent 3.5deg 10deg);
  -webkit-mask-image: linear-gradient(180deg, var(--mask) 0, transparent 70%); mask-image: linear-gradient(180deg, var(--mask) 0, transparent 70%);
  animation: rays 9s ease-in-out infinite alternate;
}
@keyframes rays { to { opacity: .55; } }
.caustics {
  position: absolute; inset: -40px -10% auto; height: 560px;
  background:
    radial-gradient(closest-side, color-mix(in srgb, var(--sparkle) 22%, transparent), transparent) 0 0 / 180px 120px,
    radial-gradient(closest-side, color-mix(in srgb, var(--sparkle) 14%, transparent), transparent) 60px 40px / 240px 150px;
  -webkit-mask-image: linear-gradient(180deg, var(--mask) 0, transparent 100%); mask-image: linear-gradient(180deg, var(--mask) 0, transparent 100%);
  animation: caustics 18s ease-in-out infinite alternate;
}
@keyframes caustics { to { transform: translate3d(-60px, 18px, 0) scale(1.06); } }
.plankton {
  position: absolute; inset: 0 0 auto; height: 200%; opacity: .7;
  background-image:
    radial-gradient(circle, color-mix(in srgb, var(--plankton) 85%, transparent) 0 1px, transparent 1.7px),
    radial-gradient(circle, color-mix(in srgb, var(--plankton) 45%, transparent) 0 1px, transparent 1.7px),
    radial-gradient(circle, color-mix(in srgb, var(--prove) 55%, transparent) 0 1.2px, transparent 2px);
  background-size: 150px 170px, 90px 110px, 270px 230px;
  background-position: 0 0, 40px 70px, 120px 30px;
  animation: plankton 70s linear infinite;
}
@keyframes plankton { to { transform: translate3d(0, -50%, 0); } }
.hero-grass-l { width: clamp(120px, 14vw, 220px); left: -30px; bottom: 0; color: var(--shallow); opacity: .7; }
.hero-fan-r { width: clamp(180px, 22vw, 340px); right: -50px; bottom: -20px; color: var(--surface-2); opacity: .45; }
.hero-jelly { width: 70px; left: 8%; top: 46%; color: var(--undo); opacity: .55; animation: bob 9s ease-in-out infinite; }
@keyframes bob { 50% { transform: translate3d(0, -18px, 0); } }

.hero-in { position: relative; z-index: 2; display: grid; justify-items: center; text-align: center; }
.hero-text { display: grid; justify-items: center; }
h1 {
  font-size: clamp(38px, 6.1vw, 84px); line-height: 1; letter-spacing: -.02em;
  text-shadow: 0 2px 30px color-mix(in srgb, var(--abyss) 45%, transparent);
}
.h1-line { display: block; text-wrap: balance; }
.lede { margin-top: 20px; font-size: 20px; line-height: 1.5; color: var(--ink); max-width: 54ch; }
.actions { margin-top: 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px 26px; }
.under { margin-top: 14px; font-size: 15px; color: var(--muted); }
.works-line { margin-top: 14px; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 12px; font-size: 15px; color: var(--muted); }
.works-label { font-weight: 600; color: var(--ink); }
.works-tools { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 2px 0; }
.works-tools > span + span::before { content: "·"; padding: 0 8px; color: color-mix(in srgb, var(--muted) 60%, transparent); }

/* The Mac, with Flowflow swimming to its notch. */
.stage { position: relative; width: min(900px, 100%); margin-top: 100px; text-align: left; }
.mac { position: relative; }
.mac::before {
  content: ""; position: absolute; inset: -16% -12% -20%; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--flow) 45%, transparent), color-mix(in srgb, var(--glow) 12%, transparent) 60%, transparent);
}
.mac-lid { position: relative; border-radius: 20px 20px 6px 6px; padding: 10px; background: linear-gradient(180deg, var(--lid-top), var(--lid-bottom)); box-shadow: 0 0 0 1px var(--lid-edge), 0 30px 60px -30px var(--shadow); }
.mac-screen {
  position: relative; overflow: clip; aspect-ratio: 16 / 9.4; border-radius: 11px 11px 3px 3px;
  background:
    radial-gradient(70% 60% at 80% 100%, color-mix(in srgb, var(--flow) 45%, transparent), transparent 70%),
    radial-gradient(60% 60% at 0% 0%, color-mix(in srgb, var(--glow) 16%, transparent), transparent 70%),
    linear-gradient(160deg, var(--wall-1), var(--wall-2) 60%, var(--wall-3));
}
.menubar { position: absolute; inset: 0 0 auto; height: 24px; display: flex; gap: 14px; align-items: center; padding: 0 14px; background: color-mix(in srgb, var(--mask) 30%, transparent); }
.menubar span { width: 30px; height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--field-white) 26%, transparent); }
.menubar span:first-child { width: 12px; }
.menubar .mb-right { margin-left: auto; width: 54px; }
.notch-hw { position: absolute; z-index: 2; top: 0; left: 50%; width: 18%; height: 24px; transform: translateX(-50%); background: var(--notch); border-radius: 0 0 10px 10px; }

/* The notch card: a black panel that drops out of the notch. */
.ncard {
  position: relative; background: var(--notch); color: var(--notch-ink);
  border-radius: 0 0 var(--r-card) var(--r-card);
  padding: 18px 20px;
  --focus: var(--c, var(--glow));
}
.stage .ncard {
  position: absolute; z-index: 3; top: 0; left: 50%; width: min(360px, 44%);
  transform: translateX(-50%);
  padding: 32px 18px 16px;
  --c: var(--glow);
  box-shadow: 0 18px 60px -12px color-mix(in srgb, var(--glow) 55%, transparent), inset 0 -1px 0 color-mix(in srgb, var(--glow) 45%, transparent);
}
.ncard-head { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--notch-muted); font-weight: 500; }
.ncard-say { margin-top: 10px; font-size: 18px; line-height: 1.4; font-weight: 500; color: var(--notch-ink); }
.stage .ncard-say, .stage .ncard-done, .stage .ncard-kept { font-size: 16px; }
.say-flag { color: var(--catch); }
.ncard-done, .ncard-kept { margin-top: 10px; font-size: 18px; line-height: 1.4; font-weight: 500; color: var(--prove); }
.ncard-kept { color: var(--notch-ink); }
.ncard-row { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.nbtn {
  font-size: 14px; font-weight: 600; line-height: 1; border-radius: var(--r-pill);
  padding: 9px 15px; border: 1px solid var(--notch-line); background: transparent; color: var(--notch-ink); cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, transform .12s ease;
}
.nbtn:hover { background-color: var(--nbtn-hover); border-color: var(--nbtn-hover-line); }
.nbtn:active { transform: scale(.97); }
.nbtn-primary { background: var(--notch-ink); color: var(--notch); border-color: var(--notch-ink); }
.nbtn-primary:hover { background: var(--field-white); border-color: var(--field-white); }
.where { margin-top: 6px; font-size: 14px; color: var(--notch-muted); }

/* The face: Flowflow's two eyes on a small water orb. */
.face {
  position: relative; flex: none; width: 26px; height: 26px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--face-light), var(--flow) 58%, var(--face-dark));
  box-shadow: 0 0 14px -2px color-mix(in srgb, var(--flow) 80%, transparent);
}
.face::before, .face::after { content: ""; position: absolute; top: 11px; width: 4px; height: 5px; border-radius: 50%; background: var(--abyss); }
.face::before { left: 7px; } .face::after { right: 7px; }
.face-proud::before, .face-proud::after { height: 3px; top: 11px; width: 6px; border-radius: 6px 6px 0 0; background: transparent; border: 2px solid var(--abyss); border-bottom: 0; }
.face-proud::before { left: 5px; } .face-proud::after { right: 5px; }
.face-worry::before, .face-worry::after { top: 12px; width: 6px; height: 2px; border-radius: 2px; }
.face-worry::before { left: 5px; transform: rotate(-14deg); } .face-worry::after { right: 5px; transform: rotate(14deg); }
.face-look::before, .face-look::after { transform: translateX(3px); }

/* The little sign up page on the Mac's screen: the same one the problem shows. */
.mini-app {
  position: absolute; z-index: 1; left: 4%; top: 20%; width: 22%;
  background: var(--paper); color: var(--paper-ink); border-radius: 12px; padding: 14px;
  display: grid; gap: 7px; font-size: 12px; box-shadow: 0 20px 40px -20px var(--shadow);
}
.mini-title { font-family: var(--font-display); font-weight: 700; font-size: 15px; letter-spacing: -.01em; }
.mini-field { display: flex; align-items: center; height: 28px; padding: 0 9px; border: 1.5px solid var(--paper-line); border-radius: 7px; background: var(--field-white); }
.mini-pw { border-color: var(--alert); border-style: dashed; }
.mini-pw i { width: 7px; height: 7px; border-radius: 50%; background: var(--paper-ink); }
.mini-btn { margin-top: 2px; text-align: center; background: var(--paper-ink); color: var(--paper); font-weight: 600; border-radius: 7px; padding: 7px; }

.chat {
  position: absolute; z-index: 2; right: 5%; bottom: 8%; width: min(270px, 40%);
  background: var(--chat); border: 1px solid var(--chat-line); border-radius: 16px 16px 4px 16px; padding: 12px 15px;
}
.chat-say { font-size: 15px; font-weight: 600; color: var(--ink); line-height: 1.35; }
.chat-who { margin-top: 3px; font-size: 13px; color: var(--muted); }

.mac-base { position: relative; height: 16px; margin: 0 -5%; border-radius: 0 0 14px 14px; background: linear-gradient(180deg, var(--base-1), var(--base-2) 45%, var(--base-3)); box-shadow: 0 30px 40px -24px var(--shadow); }
.mac-base::before { content: ""; position: absolute; left: 50%; top: 0; width: 16%; height: 5px; transform: translateX(-50%); border-radius: 0 0 8px 8px; background: var(--base-notch); }

/* Flowflow rests just above the lid, beside the notch it came to. */
.hero-flow {
  position: absolute; z-index: 4; width: clamp(88px, 11vw, 124px); height: auto;
  left: calc(50% + 34px); top: calc(-1 * clamp(66px, 8vw, 92px));
  filter: drop-shadow(0 0 24px color-mix(in srgb, var(--glow) 60%, transparent));
  animation: hover 6s ease-in-out infinite;
}
@keyframes hover { 50% { transform: translate3d(-6px, -10px, 0) rotate(-3deg); } }
.cycle {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 18px;
  background: transparent; border: 0; padding: 6px 2px; font-size: 14px; color: var(--muted); cursor: pointer;
}
.cycle svg { width: 13px; height: 13px; }
.cycle:hover { color: var(--ink); }
.tool-said, .tool-who { transition: opacity .25s ease, transform .25s ease; display: inline-block; }
.tool-said.is-swapping, .tool-who.is-swapping { opacity: 0; transform: translateY(-4px); }
.hero.is-paused *, .hero.is-paused *::before { animation-play-state: paused !important; }

/* The arrival, only when motion is welcome (main.js adds .intro). The notch is open by 0.9 s. */
.hero.intro .hero-flow { animation: swimIn 1.3s 0s cubic-bezier(.3, .7, .3, 1) both, hover 6s 1.3s ease-in-out infinite; }
.hero.intro .chat { animation: rise .45s .05s var(--ease-out) both; }
.hero.intro .stage .ncard { animation: notchOpen .45s .45s var(--ease-out) both; }
.hero.intro .stage .ncard > * { animation: fadeIn .3s .75s ease both; }
.hero.intro .stage .ncard-row { animation: rise .3s .85s var(--ease-out) both; }
@keyframes rise { from { opacity: 0; transform: translate3d(0, 12px, 0); } }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes swimIn {
  0% { opacity: 0; transform: translate3d(280px, 360px, 0) rotate(14deg) scale(.7); }
  20% { opacity: 1; }
  60% { transform: translate3d(140px, 60px, 0) rotate(-6deg) scale(.9); }
}
@keyframes notchOpen {
  from { clip-path: inset(0 30% calc(100% - 24px) 30% round 0 0 10px 10px); }
  to { clip-path: inset(0 0 0 0 round 0 0 22px 22px); }
}

/* ---------- 2. the problem: warm sand ---------- */
.problem {
  position: relative; color: var(--sand-ink); --focus: var(--sand-ink);
  padding: calc(var(--section) + 20px) 0 calc(var(--section) - 10px);
  background: linear-gradient(180deg, var(--sand-1), var(--sand-2));
}
.problem .edge { color: var(--abyss); }
.problem h2 { max-width: 22ch; }
.two { margin-top: 44px; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--gap); align-items: center; }
.two h3 { font-family: var(--font-body); font-size: 16px; font-weight: 600; letter-spacing: 0; color: var(--sand-muted); }
.bubbles { list-style: none; padding: 0; margin-top: 16px; display: grid; gap: 12px; }
.bubbles li {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: var(--sand-card); color: var(--sand-ink); font-weight: 600; font-size: 18px;
  padding: 14px 14px 14px 20px; border-radius: 20px 20px 20px 6px; max-width: 460px;
  box-shadow: 0 12px 30px -18px color-mix(in srgb, var(--sand-muted) 70%, transparent), 0 0 0 1px color-mix(in srgb, var(--sand-muted) 12%, transparent);
}
.tick { flex: none; display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; color: var(--done-ink); background: var(--done-bg); padding: 5px 9px; border-radius: var(--r-pill); }
.tick svg { width: 13px; height: 13px; }
.app {
  margin-top: 16px; background: var(--paper); color: var(--paper-ink);
  border-radius: var(--r-card); padding: 26px; max-width: 460px;
  box-shadow: 0 30px 70px -30px color-mix(in srgb, var(--sand-muted) 80%, transparent), 0 0 0 1px color-mix(in srgb, var(--sand-muted) 12%, transparent);
  --focus: var(--paper-ink);
}
.app-title { font-family: var(--font-display); font-weight: 700; font-size: 24px; letter-spacing: -.01em; }
.field { margin-top: 16px; display: grid; gap: 6px; }
.field-label { font-size: 14px; font-weight: 600; color: var(--paper-muted); }
.field-box { display: flex; align-items: center; min-height: 46px; padding: 0 14px; border: 1.5px solid var(--paper-line); border-radius: var(--r-inner); background: var(--field-white); font-size: 16px; }
.pw-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--paper-ink); }
.rule { justify-self: start; font-size: 14px; font-weight: 600; color: var(--paper-muted); text-decoration: line-through; text-decoration-color: var(--alert); text-decoration-thickness: 2px; }
.field-pw .field-box { border-color: var(--alert); border-style: dashed; }
.app-btn { display: block; margin-top: 18px; text-align: center; background: var(--paper-ink); color: var(--paper); font-weight: 600; border-radius: var(--r-inner); padding: 13px; }
.app-result { margin-top: 14px; display: flex; gap: 8px; align-items: flex-start; font-size: 15px; font-weight: 600; color: var(--alert); }
.app-result svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.problem-line { margin: 52px auto 0; text-align: center; font-family: var(--font-display); font-weight: 600; font-size: clamp(22px, 2.4vw, 30px); line-height: 1.3; letter-spacing: -.01em; max-width: 36ch; text-wrap: balance; }
.problem .text-btn { display: block; margin: 14px auto 0; color: var(--sand-muted); }
.problem .text-btn:hover { color: var(--sand-ink); }
.problem.play .bubbles li { animation: fall .6s var(--ease-out) both; }
.problem.play .bubbles li:nth-child(2) { animation-delay: .3s; }
.problem.play .bubbles li:nth-child(3) { animation-delay: .6s; }
.problem.play .tick { animation: pop .35s both; }
.problem.play li:nth-child(1) .tick { animation-delay: .45s; }
.problem.play li:nth-child(2) .tick { animation-delay: .75s; }
.problem.play li:nth-child(3) .tick { animation-delay: 1.05s; }
.problem.play .rule { animation: ruleGone 1s 1.3s ease both; }
.problem.play .field-pw .field-box { animation: boxGone .6s 1.7s ease both; }
.problem.play .app-result { animation: rise .5s 2.2s var(--ease-out) both; }
.problem.play .problem-line { animation: rise .6s 2.6s var(--ease-out) both; }
@keyframes fall { from { opacity: 0; transform: translate3d(0, -20px, 0); } }
@keyframes pop { from { opacity: 0; transform: scale(.6); } }
@keyframes ruleGone { 0% { text-decoration-color: transparent; } 45%, 100% { text-decoration-color: var(--alert); } }
@keyframes boxGone { from { border-color: var(--paper-line); border-style: solid; } }

/* ---------- 3. the story: night over their world ---------- */
.story {
  position: relative; overflow: clip;
  padding: calc(var(--section) + 30px) 0 var(--section);
  background: radial-gradient(60% 50% at 25% 85%, color-mix(in srgb, var(--flow) 30%, transparent), transparent 70%), linear-gradient(180deg, var(--night-1), var(--night-2));
}
.story .edge { color: var(--sand-2); }
.stars {
  position: absolute; inset: 0; pointer-events: none; opacity: .8;
  background-image:
    radial-gradient(circle, var(--star) 0 1px, transparent 1.6px),
    radial-gradient(circle, color-mix(in srgb, var(--star) 60%, transparent) 0 1px, transparent 1.6px),
    radial-gradient(circle, color-mix(in srgb, var(--glow) 70%, transparent) 0 1.4px, transparent 2px);
  background-size: 130px 150px, 70px 90px, 230px 210px;
  background-position: 10px 20px, 50px 60px, 120px 10px;
}
.story-grid { position: relative; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--gap); align-items: center; }
.kicker { font-family: var(--font-body); font-size: 16px; font-weight: 600; letter-spacing: 0; color: var(--glow); max-width: none; }
.story-lines { list-style: none; padding: 0; margin-top: 18px; display: grid; gap: 16px; }
.story-lines li { font-family: var(--font-display); font-weight: 600; font-size: clamp(23px, 2.5vw, 33px); line-height: 1.25; letter-spacing: -.01em; color: var(--ink); max-width: 30ch; }
.story-lines .key { color: var(--glow); }
.ready .story.telling .story-lines li { transition: opacity .8s ease, transform .8s var(--ease-out); }
.ready .story.telling .story-lines li:not(.seen) { opacity: 0; transform: translate3d(0, 16px, 0); }
.trip { position: relative; width: min(420px, 100%); aspect-ratio: 4 / 5; justify-self: center; --x: 80%; --y: 10%; --t: 1; }
.trip-path { position: absolute; inset: 0; width: 100%; height: 100%; color: color-mix(in srgb, var(--glow) 70%, transparent); }
.world {
  position: absolute; left: 22%; top: 84%; width: 44%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, var(--shallows-1), var(--surface-2) 35%, var(--shallow) 60%, var(--deep) 100%);
  box-shadow: 0 0 60px -6px color-mix(in srgb, var(--glow) 70%, transparent), inset -14px -18px 30px color-mix(in srgb, var(--abyss) 60%, transparent);
}
.world::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background:
    radial-gradient(14% 10% at 62% 38%, color-mix(in srgb, var(--prove) 80%, transparent), transparent),
    radial-gradient(12% 9% at 40% 64%, color-mix(in srgb, var(--catch) 80%, transparent), transparent),
    radial-gradient(10% 8% at 70% 70%, color-mix(in srgb, var(--undo) 80%, transparent), transparent);
}
.world-label, .trip-label { position: absolute; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 14px; font-weight: 600; color: var(--muted); }
.world-label { top: calc(100% + 10px); }
.trip-mac { position: absolute; left: 56%; top: 4%; width: 48%; height: 46px; border-radius: 12px 12px 0 0; background: linear-gradient(180deg, var(--lid-top), var(--lid-bottom)); box-shadow: 0 0 0 1px var(--lid-edge), 0 0 40px -10px color-mix(in srgb, var(--glow) 60%, transparent); }
.trip-mac::after { content: ""; position: absolute; inset: 6px 6px 0; border-radius: 7px 7px 0 0; background: linear-gradient(160deg, var(--wall-1), var(--wall-2)); }
.trip-notch { position: absolute; z-index: 1; left: 50%; top: 6px; width: 28%; height: 10px; transform: translateX(-50%); border-radius: 0 0 6px 6px; background: var(--notch); box-shadow: 0 0 calc(var(--t) * 18px) calc(var(--t) * 2px) color-mix(in srgb, var(--glow) 70%, transparent); }
.trip-label { top: -26px; }
.trip-flow {
  position: absolute; z-index: 2; left: var(--x); top: var(--y); width: 30%; height: auto;
  transform: translate(-50%, -60%) scale(calc(1 - var(--t) * .45));
  filter: drop-shadow(0 0 18px color-mix(in srgb, var(--glow) 70%, transparent));
}

/* ---------- 4. what they do: the dive ---------- */
.what { position: relative; background: var(--shallows-1); color: var(--shallows-ink); }
.what > .edge { color: var(--night-2); }
.what-head { position: relative; z-index: 2; padding-top: calc(var(--section) + 20px); padding-bottom: 8px; }
.what-head .sub { color: var(--shallows-muted); }
.region {
  --c: var(--explain);
  position: relative; overflow: clip;
  padding: clamp(64px, 8vw, 110px) 0;
}
.region-grid { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--gap); align-items: center; }
.region-flip { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
.region-flip .region-text { order: 2; }
.region-flip .ncard-still { order: 1; justify-self: start; }
.region-center { position: relative; z-index: 2; display: grid; justify-items: center; text-align: center; gap: 36px; }
.region-center .region-text { display: grid; justify-items: center; }
.region-center .ncard-still { justify-self: center; text-align: left; }
.place { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; font-size: 16px; font-weight: 600; color: var(--place); }
.depth { font-family: var(--font-code); font-size: 14px; padding: 2px 8px; border-radius: var(--r-pill); border: 1px solid currentColor; }
.region h3 { margin-top: 8px; font-size: clamp(32px, 3.6vw, 48px); }
.region-body { margin-top: 12px; color: var(--rmuted); font-size: 18px; max-width: 42ch; }
.ncard-still {
  max-width: 470px; justify-self: end; width: 100%;
  border-top: 4px solid var(--bezel);
  box-shadow: 0 30px 70px -26px var(--cardglow, var(--shadow)), inset 0 -1px 0 color-mix(in srgb, var(--c) 55%, transparent);
  --focus: var(--c);
}
.region .ncard-say { color: var(--notch-ink); }
.r-explain .ncard-say, .r-prove .ncard-say, .r-undo .ncard-say { color: var(--c); }
.region .say-flag { color: var(--catch); }
.diff { margin-top: 12px; display: grid; gap: 2px; padding: 10px 12px; border-radius: var(--r-inner); background: var(--code-bg); border: 1px solid var(--notch-line); }
.diff code { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; line-height: 1.6; }
.diff .del { color: var(--del); }
.diff .add { color: var(--prove); }
.tags { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 8px; }
.tag { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 600; border-radius: 8px; padding: 6px 10px; background: var(--tag-bg); border: 1px solid var(--notch-line); color: var(--notch-ink); margin-top: 6px; }
.tag svg { width: 14px; height: 14px; color: var(--prove); }
.flora { transition: opacity .9s ease; }

/* The shallows: bright cyan, seagrass and fans. */
.r-explain {
  --c: var(--explain); --place: var(--shallows-muted); --rmuted: var(--shallows-muted); --cardglow: var(--shallows-dark);
  color: var(--shallows-ink);
  background:
    radial-gradient(50% 60% at 78% 40%, color-mix(in srgb, var(--shallows-light) 45%, transparent), transparent 70%),
    linear-gradient(180deg, var(--shallows-1), var(--shallows-2) 55%, var(--shallows-3));
}
.r-explain::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background:
    radial-gradient(closest-side, color-mix(in srgb, var(--shallows-light) 40%, transparent), transparent) 0 0 / 200px 130px,
    radial-gradient(closest-side, color-mix(in srgb, var(--shallows-light) 26%, transparent), transparent) 80px 50px / 260px 160px;
  -webkit-mask-image: linear-gradient(180deg, var(--mask), transparent 80%); mask-image: linear-gradient(180deg, var(--mask), transparent 80%);
}
.r-explain .f1 { width: 230px; left: -40px; bottom: 0; color: var(--shallows-dark); opacity: .75; }
.r-explain .f2 { width: clamp(220px, 28vw, 400px); right: -60px; bottom: -40px; color: var(--shallows-light); opacity: .55; }
.r-explain .f3 { width: 170px; left: 40%; bottom: -10px; color: var(--shallows-dark); opacity: .5; }

/* The glow fields: emerald water, lime light. */
.r-prove {
  --c: var(--prove); --place: var(--fields-lime); --rmuted: var(--fields-muted); --cardglow: var(--fields-lime);
  color: var(--fields-ink);
  background: radial-gradient(60% 50% at 50% 100%, color-mix(in srgb, var(--fields-lime) 26%, transparent), transparent 70%), linear-gradient(180deg, var(--fields-1), var(--fields-2) 50%, var(--fields-3));
}
.r-prove .f1 { width: clamp(220px, 30vw, 440px); left: 1%; bottom: 0; color: var(--fields-lime); opacity: .85; filter: drop-shadow(0 0 14px var(--fields-lime)); }
.r-prove .f2 { width: clamp(170px, 22vw, 320px); right: 2%; bottom: 0; color: var(--prove); opacity: .75; transform: scaleX(-1); filter: drop-shadow(0 0 12px var(--prove)); }
.spores {
  position: absolute; inset: 0; pointer-events: none; opacity: .9;
  background-image:
    radial-gradient(circle, var(--fields-lime) 0 1.6px, transparent 2.4px),
    radial-gradient(circle, color-mix(in srgb, var(--prove) 80%, transparent) 0 1.2px, transparent 2px);
  background-size: 160px 140px, 90px 120px;
  background-position: 20px 30px, 60px 10px;
  -webkit-mask-image: linear-gradient(180deg, transparent, var(--mask) 40%); mask-image: linear-gradient(180deg, transparent, var(--mask) 40%);
  animation: drift 40s linear infinite;
}
@keyframes drift { to { background-position: 20px -280px, 60px -350px; } }

/* The lantern reef: warm amber and coral. */
.r-catch {
  --c: var(--catch); --place: var(--reef-ink); --rmuted: var(--reef-muted); --cardglow: var(--reef-dark);
  color: var(--reef-ink);
  background: radial-gradient(40% 60% at 20% 50%, color-mix(in srgb, var(--reef-light) 50%, transparent), transparent 70%), linear-gradient(180deg, var(--reef-1), var(--reef-2) 55%, var(--reef-3));
}
.r-catch .f1 { width: 170px; right: 0; bottom: 0; color: var(--reef-dark); opacity: .8; }
.r-catch .f2 { width: 120px; right: 150px; bottom: -40px; color: var(--reef-light); opacity: .95; filter: drop-shadow(0 0 16px var(--reef-light)); }
.r-catch .f3 { width: 100px; left: 46%; bottom: -60px; color: var(--reef-dark); opacity: .55; }
.r-catch .floor { left: 0; right: 0; bottom: 0; width: 100%; height: 90px; color: var(--reef-dark); opacity: .35; }

/* The still deep: violet, slow jellies. */
.r-undo {
  --c: var(--undo); --place: var(--still-muted); --rmuted: var(--still-muted); --cardglow: var(--still-jelly);
  color: var(--still-ink);
  padding-bottom: clamp(90px, 10vw, 140px);
  background: radial-gradient(50% 50% at 50% 60%, color-mix(in srgb, var(--undo) 30%, transparent), transparent 70%), linear-gradient(180deg, var(--still-1), var(--still-2) 50%, var(--still-3));
}
.r-undo .flora { color: var(--still-jelly); }
.r-undo .f1 { width: 150px; left: 7%; top: 14%; opacity: .55; animation: bob 10s ease-in-out infinite; }
.r-undo .f2 { width: 110px; right: 9%; top: 34%; opacity: .45; animation: bob 13s ease-in-out infinite reverse; }
.r-undo .f3 { width: 54px; left: 20%; bottom: 10%; opacity: .35; animation: bob 11s ease-in-out infinite; }

/* One region lit at a time (main.js). Only the creatures dim, never the words or the field. */
.ready .region:not(.is-lit) .flora { opacity: .4; }

/* The depth gauge: Flowflow dives with you. Wide screens only. */
.gauge {
  position: fixed; z-index: 30; left: 18px; top: 50%; transform: translate3d(-8px, -50%, 0);
  display: none; flex-direction: column; align-items: center; gap: 10px;
  padding: 12px 8px; border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--abyss) 82%, transparent); color: var(--ink);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--glow) 30%, transparent);
  opacity: 0; transition: opacity .4s ease, transform .4s var(--ease-out);
  --g: 0;
}
.gauge img { width: 34px; height: auto; }
.gauge-line { position: relative; width: 2px; height: 160px; background: color-mix(in srgb, var(--glow) 30%, transparent); border-radius: 2px; }
.gauge-dot { position: absolute; left: 50%; top: calc(var(--g) * 100%); width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--glow); box-shadow: 0 0 12px var(--glow); transition: top .6s var(--ease-out); }
.gauge-n { font-family: var(--font-code); font-size: 12px; font-weight: 600; min-width: 5.5ch; text-align: center; }
@media (min-width: 1320px) { .ready .gauge { display: flex; } }
.gauge.is-on { opacity: 1; transform: translate3d(0, -50%, 0); }

/* ---------- 5. meet the characters ---------- */
.meet {
  position: relative; padding: var(--section) 0;
  background: linear-gradient(180deg, var(--still-3), var(--habitat-3) 30%);
}
.habitats { margin-top: 40px; display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: var(--gap); align-items: stretch; }
.habitat {
  display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: 28px; align-items: center;
  padding: clamp(16px, 2vw, 22px); border-radius: var(--r-card);
  background: color-mix(in srgb, var(--habitat-2) 60%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--glow) 26%, transparent), 0 40px 100px -40px var(--flow);
}
.habitat-art { position: relative; overflow: clip; display: grid; place-items: center; min-height: 300px; border-radius: 16px; background: linear-gradient(180deg, var(--habitat-1), var(--habitat-2) 60%, var(--habitat-3)); }
.shafts { position: absolute; inset: 0; background: repeating-linear-gradient(104deg, color-mix(in srgb, var(--ray) 16%, transparent) 0 16px, transparent 16px 58px); -webkit-mask-image: linear-gradient(180deg, var(--mask), transparent 80%); mask-image: linear-gradient(180deg, var(--mask), transparent 80%); }
.halo { position: absolute; width: 240px; height: 240px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--glow) 45%, transparent), transparent 68%); }
.bubbles-rise { position: absolute; inset: 0; background-image: radial-gradient(circle, color-mix(in srgb, var(--sparkle) 70%, transparent) 0 2px, transparent 3px), radial-gradient(circle, color-mix(in srgb, var(--sparkle) 50%, transparent) 0 1.4px, transparent 2.2px); background-size: 90px 110px, 60px 80px; animation: drift 30s linear infinite; }
.habitat-art img { position: relative; width: min(210px, 70%); height: auto; animation: hover 7s ease-in-out infinite; }
.hab-grass { width: 120px; left: -10px; bottom: 0; color: var(--shallow); opacity: .9; }
.habitat-text { padding: 8px 12px 8px 0; }
.habitat h3 { font-size: clamp(34px, 3.6vw, 48px); }
.found { margin-top: 6px; color: var(--glow); font-weight: 600; }
.habitat h4 { margin-top: 20px; font-family: var(--font-body); font-size: 16px; font-weight: 600; color: var(--muted); }
.brings { margin-top: 8px; padding-left: 20px; display: grid; gap: 6px; }
.brings li::marker { color: var(--glow); }
.doors { display: flex; flex-direction: column; justify-content: center; }
.door-row { display: flex; gap: 16px; align-items: flex-end; }
.door {
  --rim: var(--door-rim-1);
  position: relative; flex: 1; aspect-ratio: 3 / 4.6; max-width: 110px; border-radius: 999px 999px 10px 10px;
  background:
    repeating-linear-gradient(90deg, color-mix(in srgb, var(--ink) 5%, transparent) 0 2px, transparent 2px 16px),
    radial-gradient(80% 40% at 50% 100%, color-mix(in srgb, var(--rim) 30%, transparent), transparent 70%),
    linear-gradient(180deg, var(--door-top), var(--door));
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--rim) 40%, transparent), 0 18px 34px -18px var(--rim);
}
.door::before { content: ""; position: absolute; left: 50%; top: 16%; bottom: 0; width: 3px; transform: translateX(-50%); border-radius: 2px; background: linear-gradient(180deg, transparent, var(--rim) 30%, var(--rim)); box-shadow: 0 0 14px 2px var(--rim); opacity: .85; }
.door::after { content: ""; position: absolute; left: calc(50% + 10px); top: 56%; width: 8px; height: 8px; border-radius: 50%; background: var(--rim); box-shadow: 0 0 12px 3px var(--rim); }
.d2 { --rim: var(--door-rim-2); aspect-ratio: 3 / 5.2; }
.d3 { --rim: var(--door-rim-3); }
.doors-title { margin-top: 22px; font-family: var(--font-display); font-weight: 700; font-size: 26px; letter-spacing: -.01em; }
.doors-note { margin-top: 6px; color: var(--muted); max-width: 30ch; }

/* ---------- 6. how it works ---------- */
.how {
  position: relative; padding: var(--section) 0 calc(var(--section) + 40px);
  background: linear-gradient(180deg, var(--habitat-3), var(--lens-top) 18%, var(--lens-bottom) 100%);
  --focus: var(--lens);
}
.walk { margin-top: 44px; display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--gap); align-items: start; }
.steps { list-style: none; padding: 0; position: relative; display: grid; gap: 4px; --p: 0; }
.steps::before { content: ""; position: absolute; left: 21px; top: 24px; bottom: 24px; width: 2px; background: color-mix(in srgb, var(--lens) 22%, transparent); }
.steps::after { content: ""; position: absolute; left: 21px; top: 24px; bottom: 24px; width: 2px; background: var(--lens); box-shadow: 0 0 12px var(--lens); transform-origin: top; transform: scaleY(var(--p)); transition: transform .5s var(--ease-out); }
html:not(.ready) .steps::after { display: none; }
.steps button {
  position: relative; z-index: 1; width: 100%; display: flex; align-items: center; gap: 14px;
  background: transparent; border: 0; text-align: left; padding: 10px 12px 10px 6px; border-radius: 14px;
  font-size: 17px; font-weight: 600; color: var(--muted); cursor: pointer;
  transition: color .2s ease, background-color .2s ease;
}
.steps button:hover { color: var(--ink); background-color: color-mix(in srgb, var(--lens) 8%, transparent); }
.num { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; font-size: 15px; font-variant-numeric: tabular-nums; background: var(--lens-glass); border: 2px solid color-mix(in srgb, var(--lens) 45%, transparent); color: var(--ink); transition: background-color .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease; }
.steps button[aria-current="step"] { color: var(--ink); }
.ready .steps button[aria-current="step"] .num { background: var(--lens); border-color: var(--lens); color: var(--ink-dark); box-shadow: 0 0 0 6px color-mix(in srgb, var(--lens) 22%, transparent), 0 0 24px var(--lens); }

.lens { position: relative; }
.pic + .pic { margin-top: 40px; padding-top: 40px; border-top: 1px solid color-mix(in srgb, var(--lens) 20%, transparent); }
.ready .lens { display: grid; }
.ready .pic { grid-area: 1 / 1; margin: 0; padding: 0; border: 0; transition: opacity .25s ease, transform .25s var(--ease-out), visibility .25s; }
.ready .pic:not(.is-on) { opacity: 0; visibility: hidden; transform: translate3d(0, 8px, 0); }
figcaption { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.pic-n { font-size: 15px; font-weight: 600; color: var(--lens); }
.ready .pic-n { display: none; }
.pic-title { font-family: var(--font-display); font-weight: 700; font-size: clamp(24px, 2.6vw, 32px); letter-spacing: -.01em; line-height: 1.1; }
.pic-say { margin-top: 18px; font-size: 18px; max-width: 54ch; }
.pic-tech { margin-top: 12px; font-size: 15px; color: var(--muted); max-width: 62ch; padding-left: 14px; border-left: 2px solid var(--lens); }
.ready #how:not(.tech-on) .pic-tech { display: none; }

/* The small Mac screen in each step: the notch is always at the top centre. */
.mini-screen {
  position: relative; margin-top: 18px; min-height: 320px;
  border-radius: 18px; border: 9px solid var(--lid-top); box-shadow: 0 0 0 1px var(--lid-edge), 0 30px 80px -40px var(--lens);
  background:
    radial-gradient(60% 60% at 85% 100%, color-mix(in srgb, var(--flow) 35%, transparent), transparent 70%),
    linear-gradient(160deg, var(--wall-1), var(--wall-2) 60%, var(--wall-3));
  padding: 64px clamp(14px, 3vw, 28px) 22px;
  display: grid; align-content: center;
}
.mini-notch {
  position: absolute; z-index: 2; top: 0; left: 50%; transform: translateX(-50%);
  width: 110px; height: 22px; border-radius: 0 0 12px 12px; background: var(--notch);
}
.mini-notch.is-open {
  width: auto; height: auto; min-width: 200px; white-space: nowrap;
  display: flex; align-items: center; gap: 9px; padding: 8px 18px 9px 10px; border-radius: 0 0 18px 18px;
  font-size: 14px; font-weight: 500; color: var(--notch-ink);
  box-shadow: 0 10px 30px -10px var(--glow);
}
.mini-notch .face { width: 20px; height: 20px; }
.mini-notch .face::before, .mini-notch .face::after { top: 8px; width: 3px; height: 4px; }
.mini-notch .face::before { left: 5px; } .mini-notch .face::after { right: 5px; }
.mini-body { display: grid; justify-items: center; }
.chat-static { position: static; width: auto; max-width: 320px; }
.ncard-drop { position: absolute; z-index: 2; top: 0; left: 50%; transform: translateX(-50%); width: min(400px, 92%); padding-top: 26px; border-top: 0; box-shadow: 0 24px 60px -20px var(--c); }
.ncard-amber { --c: var(--catch); }
.ncard-violet { --c: var(--undo); }
.ncard-violet .u-after { color: var(--undo); }
.files { width: 100%; max-width: 440px; background: var(--lens-panel); border: 1px solid color-mix(in srgb, var(--lens) 25%, transparent); border-radius: 16px; padding: 16px; display: grid; gap: 7px; }
.files-head { font-weight: 600; color: var(--muted); font-size: 15px; }
.file { display: flex; justify-content: space-between; gap: 4px 12px; flex-wrap: wrap; font-size: 15px; padding: 7px 10px; border-radius: 8px; background: var(--file-bg); }
.file code { color: var(--ink); }
.file span { color: var(--muted); }
.file-secret code { color: var(--muted); }
.files-say { margin-top: 4px; color: var(--glow); font-weight: 600; }
.term { width: 100%; max-width: 440px; background: var(--term-bg); border: 1px solid color-mix(in srgb, var(--lens) 25%, transparent); border-radius: 16px; padding: 16px; display: grid; gap: 7px; font-size: 15px; }
.term-cmd { font-family: var(--font-code); color: var(--ink); }
.term-cmd span { color: var(--lens); }
.term-ok { display: flex; gap: 9px; align-items: flex-start; color: var(--ink); }
.term-ok svg { width: 16px; height: 16px; flex: none; margin-top: 3px; color: var(--prove); }
.term-exit { margin-top: 4px; font-family: var(--font-code); font-size: 14px; color: var(--prove); }
.probe { width: 100%; max-width: 440px; background: var(--lens-panel); border: 1px solid color-mix(in srgb, var(--lens) 25%, transparent); border-radius: 16px; overflow: clip; display: grid; gap: 7px; padding-bottom: 14px; font-size: 15px; }
.probe .term-ok { padding: 0 16px; }
.probe-bar { display: flex; align-items: center; gap: 12px; padding: 9px 14px; background: var(--probe-bar); font-size: 13px; color: var(--muted); }
.probe-dots { display: flex; gap: 5px; } .probe-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--probe-dot); }
.probe-page { margin: 4px 16px 6px; padding: 12px; border-radius: 10px; background: var(--paper); display: grid; gap: 7px; }
.probe-page b { height: 9px; width: 46%; border-radius: 4px; background: var(--paper-ink); }
.probe-page i { height: 18px; border-radius: 6px; border: 1.5px solid var(--paper-line); background: var(--field-white); }
.probe-page u { height: 18px; width: 40%; border-radius: 6px; background: var(--paper-ink); }

.lens-controls { margin-top: 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; }
.lens-count { font-size: 15px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 92px; text-align: center; }
html:not(.ready) .lens-controls, html:not(.ready) .tech-bar, html:not(.ready) .hook-tabs { display: none; }

.tech-bar { margin-top: 40px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding: 16px 20px; border-radius: 18px; background: color-mix(in srgb, var(--lens-glass) 70%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--lens) 30%, transparent); }
.tech-hint { color: var(--muted); font-size: 15px; }
.switch { display: inline-flex; align-items: center; gap: 12px; font-size: 17px; font-weight: 600; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track { position: relative; width: 44px; height: 26px; border-radius: var(--r-pill); background: var(--switch-off); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--lens) 50%, transparent); transition: background-color .2s ease; flex: none; }
.switch-track::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--muted); transition: transform .2s var(--ease-out), background-color .2s ease; }
.switch input:checked + .switch-track { background: color-mix(in srgb, var(--lens) 60%, var(--lens-bottom)); }
.switch input:checked + .switch-track::after { transform: translateX(18px); background: var(--ink); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--lens); outline-offset: 3px; }

.eng { margin-top: 22px; padding: clamp(20px, 3vw, 36px); border-radius: var(--r-card); background: color-mix(in srgb, var(--lens-glass) 88%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--lens) 24%, transparent); }
.ready #how:not(.tech-on) .eng { display: none; }
.ready #how.tech-on .eng { animation: rise .35s var(--ease-out) both; }
.eng-title { font-size: clamp(26px, 2.8vw, 34px); }
.eng-status { margin-top: 8px; color: var(--muted); font-size: 15px; max-width: 70ch; }
.map { margin-top: 24px; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 0; align-items: stretch; }
.map-mac { padding: 22px; border-radius: 20px; border: 2px solid var(--lens); background: var(--lens-panel); box-shadow: 0 0 40px -16px var(--lens); }
.map-mac-title { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 22px; }
.map-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--lens); box-shadow: 0 0 12px var(--lens); }
.map-mac ul { margin-top: 12px; padding-left: 20px; display: grid; gap: 6px; font-size: 15px; }
.map-mac li::marker { color: var(--lens); }
.map-stay { margin-top: 14px; padding-top: 12px; border-top: 1px dashed color-mix(in srgb, var(--lens) 40%, transparent); font-size: 15px; color: var(--muted); }
.map-stay strong { color: var(--prove); }
.map-out { list-style: none; padding: 0; display: grid; gap: 12px; align-content: center; }
.map-out li { display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: center; }
.map-arrow { position: relative; display: block; height: 2px; background: linear-gradient(90deg, var(--lens), color-mix(in srgb, var(--lens) 50%, transparent)); }
.map-arrow svg { position: absolute; right: -4px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--lens); }
.map-out li > div { padding: 14px 16px; border-radius: 14px; background: var(--lens-panel); border: 1px solid color-mix(in srgb, var(--lens) 25%, transparent); }
.map-to { font-weight: 600; }
.map-what { margin-top: 4px; font-size: 15px; color: var(--muted); }
.hooks-title { margin-top: 36px; font-size: 24px; }
.hooks { margin-top: 14px; }
.hook-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.hook-tabs [role="tab"] { background: transparent; border: 1px solid color-mix(in srgb, var(--lens) 30%, transparent); color: var(--muted); border-radius: var(--r-pill); padding: 8px 14px; font-size: 15px; font-weight: 600; cursor: pointer; transition: background-color .15s ease, color .15s ease, border-color .15s ease; }
.hook-tabs [role="tab"]:hover { color: var(--ink); border-color: var(--lens); }
.hook-tabs [role="tab"][aria-selected="true"] { background: var(--lens); color: var(--ink-dark); border-color: var(--lens); }
.hook-panel { margin-top: 14px; padding: 18px; border-radius: 16px; color: var(--ink); background: var(--lens-panel); border: 1px solid color-mix(in srgb, var(--lens) 20%, transparent); }
.hook-name { font-weight: 600; margin-bottom: 10px; }
.ready .hook-name { display: none; }
.hook-panel dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 22px; font-size: 15px; }
.hook-panel dt { color: var(--muted); }
.hook-panel dd { color: var(--ink); overflow-wrap: anywhere; }
.hook-panel dd:empty, .hook-panel dt:has(+ dd:empty) { display: none; }
.hook-panel code { color: var(--lens); font-size: 14px; }
.eng-note { margin-top: 14px; color: var(--muted); font-size: 15px; max-width: 72ch; }

/* ---------- 7. the shore ---------- */
.shore {
  position: relative; color: var(--shore-ink);
  background: var(--shore);
  padding: clamp(130px, 13vw, 180px) 0 var(--section);
  --focus: var(--shore-ink); caret-color: var(--shore-ink);
}
.shoreline { position: absolute; inset: 0 0 auto; height: clamp(70px, 8vw, 120px); pointer-events: none; }
.shoreline svg { width: 100%; height: 100%; }
.wl-back { fill: color-mix(in srgb, var(--surface-2) 70%, var(--lens-bottom)); }
.wl-front { fill: var(--lens-bottom); }
.shimmer { position: absolute; left: 0; right: 0; top: 100%; height: 28px; background: radial-gradient(closest-side, color-mix(in srgb, var(--surface) 45%, transparent), transparent) 0 0 / 120px 22px; opacity: .6; }
.shore h2 { font-size: clamp(30px, 3.6vw, 46px); }
.shore .muted { color: var(--shore-muted); }
.shore .text-link { color: var(--shore-ink); }
.shore > .wrap > div + div { margin-top: clamp(64px, 8vw, 110px); }
.tool-list { list-style: none; padding: 0; margin-top: 24px; display: flex; flex-wrap: wrap; gap: 10px; }
.tool-list li { font-family: var(--font-display); font-weight: 600; font-size: clamp(18px, 1.8vw, 22px); padding: 10px 18px; border-radius: var(--r-pill); background: var(--shore-card); box-shadow: inset 0 0 0 1px var(--shore-line); }
.works .muted { margin-top: 16px; }
.trust-grid { list-style: none; padding: 0; margin-top: 28px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.trust-grid li { background: var(--shore-card); border-radius: 18px; padding: 22px; box-shadow: inset 0 0 0 1px var(--shore-line); }
.trust-grid h3 { font-size: 21px; }
.trust-grid p { margin-top: 8px; color: var(--shore-muted); font-size: 16px; }
.trust .text-link { display: inline-block; margin-top: 22px; }
.price { text-align: center; }
.price h2 { margin-inline: auto; }
.plans { margin: 28px auto 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; max-width: 920px; text-align: left; }
.plan { background: var(--shore-card); border-radius: var(--r-card); padding: clamp(24px, 3vw, 36px); box-shadow: inset 0 0 0 1px var(--shore-line); display: flex; flex-direction: column; align-items: flex-start; }
.plan h3 { font-size: 24px; }
.amount { margin-top: 10px; display: flex; align-items: baseline; gap: 8px; }
.amount-n { font-family: var(--font-display); font-weight: 700; font-size: 56px; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.amount-per { color: var(--shore-muted); font-size: 17px; }
.plan > .muted { margin-top: 6px; }
.ticks { list-style: none; padding: 0; margin: 22px 0 28px; display: grid; gap: 10px; flex: 1; }
.ticks li { position: relative; padding-left: 28px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 4px; width: 17px; height: 17px; border-radius: 50%; background: color-mix(in srgb, var(--shallow) 14%, transparent); }
.ticks li::after { content: ""; position: absolute; left: 6px; top: 8px; width: 4px; height: 7px; border: solid var(--shallow); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.shore .btn { background: var(--shore-dark); color: var(--ink); }
.shore :focus-visible { outline-color: var(--shore-ink); }
.plan-pro { background: var(--shore-dark); color: var(--ink); box-shadow: 0 0 0 1px var(--shore-dark), 0 30px 70px -30px var(--shallow); }
.plan-pro .muted, .plan-pro .amount-per { color: var(--muted); }
.plan-pro .ticks li::before { background: color-mix(in srgb, var(--glow) 20%, transparent); }
.plan-pro .ticks li::after { border-color: var(--glow); }
.plan-pro .btn-outline { color: var(--ink); }
.plan-pro :focus-visible { outline-color: var(--glow); }
.center-note { margin: 12px auto 0; max-width: 64ch; }
.plans + .center-note { margin-top: 22px; }
.faq { max-width: 860px; margin-inline: auto; }
.faq details { border-top: 1px solid var(--shore-line); }
.faq details:last-child { border-bottom: 1px solid var(--shore-line); }
.faq h2 { margin-bottom: 20px; }
.faq summary { list-style: none; cursor: pointer; padding: 20px 44px 20px 0; position: relative; font-weight: 600; font-size: 19px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 8px; top: 50%; width: 12px; height: 12px; border: solid var(--shore-ink); border-width: 0 2px 2px 0; transform: translateY(-70%) rotate(45deg); transition: transform .2s var(--ease-out); }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq summary:hover { color: var(--shallow); }
.faq details p { padding: 0 0 22px; color: var(--shore-muted); max-width: 68ch; }

/* The last glow: back down into the water. */
.final {
  position: relative; overflow: clip; text-align: center;
  padding: calc(var(--section) + 40px) 0 var(--section);
  background: linear-gradient(180deg, var(--surface-2) 0, var(--shallow) 22%, var(--deep) 62%, var(--abyss) 100%);
}
.final .edge { color: var(--shore); }
.final-glow { position: absolute; left: 50%; top: 52%; width: 720px; height: 720px; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--glow) 28%, transparent), transparent 62%); }
.final-in { position: relative; display: flex; flex-direction: column; align-items: center; }
.final-flow { width: 170px; height: auto; filter: drop-shadow(0 0 30px color-mix(in srgb, var(--glow) 60%, transparent)); animation: hover 7s ease-in-out infinite; }
.final h2 { margin: 24px auto 28px; max-width: 16ch; }
.final .under { color: var(--ink); }
.final .soon-line { margin-top: 6px; color: var(--muted); }

/* ---------- footer ---------- */
.foot { background: var(--abyss-2); padding: 36px 0 44px; font-size: 15px; }
.foot-in { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }
.foot-brand { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 700; font-size: 19px; }
.foot-brand img { width: 24px; height: auto; }
.foot-about { color: var(--muted); flex: 1 1 280px; }
.foot-links { display: flex; gap: 22px; }
.foot-links a { text-decoration: none; font-weight: 600; }
.foot-links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.foot-powered { color: var(--muted); }

/* ---------- the "soon" note and the phone sheet ---------- */
.soon {
  position: fixed; z-index: 60; left: 50%; bottom: 22px; transform: translateX(-50%);
  width: min(600px, calc(100% - 32px));
  display: flex; align-items: center; gap: 12px 16px; justify-content: space-between;
  background: var(--notch); color: var(--notch-ink); border-radius: 22px; padding: 14px 14px 14px 22px;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--glow) 35%, transparent), 0 20px 60px -10px color-mix(in srgb, var(--glow) 45%, transparent);
  animation: rise .35s var(--ease-out) both;
  --focus: var(--glow);
}
.soon-text { font-weight: 500; }
.soon-actions { display: flex; flex-wrap: wrap; gap: 8px; flex: none; }

/* ---------- documents (privacy, terms, changelog, 404) ---------- */
.doc-page { background: var(--shore); color: var(--shore-ink); --focus: var(--shore-ink); caret-color: var(--shore-ink); }
.doc-top { background: linear-gradient(180deg, var(--surface) 0, var(--shallow) 60px, var(--deep) 100%); color: var(--ink); padding: 0 0 72px; }
.doc-top .nav { position: static; padding-top: 14px; }
.doc-top .nav-in { color: var(--ink-dark); }
.doc-top .wrap { max-width: 760px; }
.doc-top h1 { margin-top: 64px; font-size: clamp(42px, 6vw, 72px); }
.doc-top p { margin-top: 14px; color: var(--muted); max-width: 60ch; }
.doc { max-width: 760px; margin-inline: auto; padding: 56px var(--gutter) 100px; }
.doc h2 { margin-top: 48px; font-size: clamp(26px, 3vw, 34px); max-width: none; }
.doc h3 { margin-top: 28px; font-size: 21px; }
.doc p, .doc ul, .doc ol, .doc table { margin-top: 14px; }
.doc ul, .doc ol { padding-left: 22px; display: grid; gap: 6px; }
.doc a { color: var(--shallow); text-underline-offset: 3px; }
.doc a:hover { color: var(--shore-ink); }
.doc .muted { color: var(--shore-muted); }
.doc code { background: var(--code-chip); padding: 1px 5px; border-radius: 5px; font-size: .86em; overflow-wrap: anywhere; }
.doc table { width: 100%; border-collapse: collapse; font-size: 16px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 12px 10px 12px 0; border-top: 1px solid var(--shore-line); }
.doc th { font-weight: 600; }
.table-scroll { overflow-x: auto; }
.log-entry { padding-top: 8px; }
.log-entry + .log-entry { margin-top: 40px; border-top: 1px solid var(--shore-line); }
.log-entry h2 { margin-top: 32px; }
.log-date { margin-top: 6px; color: var(--shore-muted); font-size: 15px; }
.nf { min-height: 100svh; display: grid; place-items: center; text-align: center; padding: 120px var(--gutter); background: radial-gradient(50% 40% at 50% 45%, color-mix(in srgb, var(--flow) 30%, transparent), transparent 70%), linear-gradient(180deg, var(--deep), var(--abyss)); }
.nf img { width: 170px; height: auto; margin: 0 auto 28px; animation: hover 7s ease-in-out infinite; }
.nf h1 { font-size: clamp(40px, 6vw, 72px); max-width: 14ch; margin-inline: auto; text-wrap: balance; }
.nf p { margin: 16px auto 32px; color: var(--muted); }

/* ---------- without the script: no dead controls ---------- */
html:not(.ready) [data-cycle], html:not(.ready) [data-replay], html:not(.ready) .ncard-row { display: none; }

/* ---------- smaller screens ---------- */
@media (max-width: 1080px) {
  .habitats { grid-template-columns: minmax(0, 1fr); }
  .doors { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
  .door-row { flex: 0 1 300px; }
  .doors-title { margin-top: 0; }
  .walk { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
  .steps::before, .steps::after { display: none; }
  .steps button { flex-direction: column; gap: 8px; text-align: center; padding: 8px 4px; font-size: 14px; line-height: 1.25; }
}
@media (max-width: 860px) {
  :root { --section: 68px; }
  .nav-links { display: none; }
  .hero { padding: 100px 0 56px; }
  .lede { font-size: 18px; }
  .stage { margin-top: 96px; }
  .stage .ncard { width: 90%; padding: 28px 14px 12px; }
  .stage .ncard-say, .stage .ncard-done, .stage .ncard-kept { font-size: 15px; }
  .ncard-say, .ncard-done, .ncard-kept { font-size: 16px; }
  .stage .ncard .ncard-say { margin-top: 6px; }
  .stage .ncard-row { margin-top: 10px; }
  .stage .nbtn { padding: 8px 12px; font-size: 13px; }
  .mac-screen { aspect-ratio: auto; min-height: 300px; }
  .mac-lid { padding: 7px; border-radius: 16px 16px 5px 5px; }
  .mac-base { margin: 0 -3%; height: 12px; }
  .mini-app { display: none; }
  .chat { right: 4%; bottom: 5%; width: 64%; }
  .notch-hw { width: 26%; }
  @keyframes notchOpen { from { clip-path: inset(0 37% calc(100% - 24px) 37% round 0 0 10px 10px); } to { clip-path: inset(0 0 0 0 round 0 0 22px 22px); } }
  .hero-grass-l, .hero-fan-r { display: none; }
  .hero-jelly { top: 30%; left: 2%; width: 44px; }
  .two { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .problem-line { margin-top: 36px; text-align: left; }
  .problem .text-btn { margin-left: 0; }
  .story-grid { grid-template-columns: minmax(0, 1fr); }
  .trip { order: -1; width: min(300px, 80%); aspect-ratio: 1 / 1; }
  .region-grid, .region-flip { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .region-flip .region-text { order: 1; }
  .region-flip .ncard-still { order: 2; }
  .ncard-still { justify-self: stretch; width: auto; }
  .region-center { justify-items: start; text-align: left; }
  .region-center .region-text { justify-items: start; }
  .region-center .ncard-still { justify-self: stretch; }
  .region { padding: 64px 0 140px; }
  .r-undo { padding-bottom: 120px; }
  .r-explain .f1, .r-explain .f3, .r-catch .f3, .r-undo .f2, .r-undo .f3 { display: none; }
  .r-explain .f2 { width: 180px; right: -30px; bottom: -30px; }
  .r-prove .f1 { width: 150px; left: -10px; }
  .r-prove .f2 { width: 110px; right: -6px; }
  .r-catch .f1 { width: 80px; right: 4px; }
  .r-catch .f2 { width: 60px; right: 90px; bottom: -30px; }
  .r-undo .f1 { width: 64px; left: auto; right: 6%; top: auto; bottom: 24px; }
  .habitat { grid-template-columns: minmax(0, 1fr); }
  .habitat-art { min-height: 230px; }
  .habitat-text { padding: 4px 6px 8px; }
  .map { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .map-out { padding-top: 0; }
  .map-out li { grid-template-columns: minmax(0, 1fr); justify-items: start; }
  .map-arrow { width: 2px; height: 30px; margin-left: 28px; background: linear-gradient(180deg, var(--lens), color-mix(in srgb, var(--lens) 50%, transparent)); }
  .map-arrow svg { right: auto; left: 50%; top: auto; bottom: -6px; transform: translateX(-50%) rotate(90deg); }
  .map-out li > div { width: 100%; }
  .trust-grid { grid-template-columns: minmax(0, 1fr); }
  .plans { grid-template-columns: minmax(0, 1fr); }
  .doors { flex-direction: column; align-items: flex-start; }
  .door-row { width: 100%; flex: none; }
  .shore { padding-top: 110px; }
  .shore > .wrap > div + div { margin-top: 64px; }
}
@media (max-width: 860px) {
  :root { --section: 56px; }
  .works-tools { gap: 2px 14px; }
  .works-tools > span + span::before { content: none; }
  .region { padding: 56px 0 100px; }
  .r-undo { padding-bottom: 90px; }
  .region-center { gap: 26px; }
  .problem-line { font-size: 21px; }
  .story-lines { gap: 12px; }
  .story-lines li { font-size: 22px; }
  .trip { width: min(260px, 72%); }
  .habitat-art { min-height: 200px; }
  .habitat-art img { width: min(160px, 60%); }
  .door { max-width: 76px; }
  .doors-title { font-size: 22px; margin-top: 14px; }
  .shore { padding-top: 96px; }
  .shore > .wrap > div + div { margin-top: 52px; }
  .trust-grid { gap: 10px; }
  .trust-grid li { padding: 16px 18px; }
  .trust-grid h3 { font-size: 18px; }
  .trust-grid p { font-size: 15px; margin-top: 4px; }
  .faq summary { padding: 16px 40px 16px 0; font-size: 17px; }
  .plan { padding: 22px; }
  .amount-n { font-size: 46px; }
  .ticks { margin: 16px 0 22px; gap: 8px; }
  .how { padding-bottom: 80px; }
  .walk { margin-top: 28px; }
  .tech-bar { margin-top: 28px; }
  .meet .habitats { margin-top: 28px; }
}
@media (min-width: 861px) and (max-width: 1080px) { .trust-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mini-screen { min-height: 300px; border-width: 7px; }
  .mini-notch.is-open { min-width: 0; max-width: 92%; }
  .hook-panel dl { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .hook-panel dd + dt { margin-top: 10px; }
  .soon { flex-direction: column; align-items: flex-start; }
  .bubbles li { font-size: 16px; }
  .foot-links { width: 100%; }
  .h1-line { text-wrap: balance; }
}

/* ---------- reduce motion: every movement stops, the end state shows ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
  .plankton, .caustics, .rays, .flora, .hero-flow, .final-flow, .habitat-art img, .nf img, .spores, .bubbles-rise { animation: none !important; }
  .ready .story.telling .story-lines li:not(.seen) { opacity: 1; transform: none; }
}

/* Where one habitat meets the next: a soft current line, not a seam. */
.r-prove > .edge { color: var(--shallows-3); }
.r-catch > .edge { color: var(--fields-3); }
.r-undo > .edge { color: var(--reef-3); }
