/* ==========================================================================
   Nori Desktop · 深海微光 Deep Ocean Glow
   The page reads as one current: the lit sea (hero) → residue, sediment and
   emergence (about) → everyday companionship → the desktop (download).
   Colours follow Nori Desktop's native tokens (nori-teal, bg-abyss, on-teal).
   ========================================================================== */

@font-face {
  font-family: Nunito;
  src: url("./assets/nunito-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: Nunito;
  src: url("./assets/nunito-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark;

  /* Surfaces: from the lit sea down to the abyss. */
  --abyss: #0b0f14;
  --bg: #10151c;
  --bg-raised: #141b23;
  --surface: #19212b;

  /* Ink — every text colour keeps ≥ 4.5:1 on the surfaces above. */
  --text: #e8efef;
  --text-body: #c9d6d8;
  --text-muted: #a3b5bc;
  --text-faint: #8a9ea8;

  /* Light */
  --teal: #9ed2d2;
  --teal-deep: #77c6d4;
  --teal-soft: #b6d5d9;
  --mint: #a5ddd8;
  --on-teal: #14232a;

  /* Lines */
  --line: rgba(158, 210, 210, .12);
  --line-strong: rgba(158, 210, 210, .24);
  --line-glow: rgba(158, 210, 210, .5);

  /* Type */
  --font-sans: Nunito, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC", sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", "Segoe UI Mono", Menlo, Consolas, monospace;
  --fs-label: .75rem;
  --fs-small: .8125rem;
  --fs-ui: .9375rem;
  --fs-body: 1rem;
  --fs-lead: clamp(1rem, .95rem + .25vw, 1.125rem);
  --fs-h3: clamp(1.125rem, 1.05rem + .3vw, 1.3125rem);
  --fs-h2: clamp(1.875rem, 1.35rem + 2.1vw, 3rem);
  --fs-h1: clamp(2.25rem, 1.2rem + 4.3vw, 4.625rem);

  /* Space & shape */
  --gutter: clamp(18px, 4.5vw, 40px);
  --max: 1200px;
  --section: clamp(84px, 10vw, 136px);
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  /* Materials shared by every glass panel. */
  --edge: linear-gradient(150deg, rgba(196, 230, 232, .34), rgba(158, 210, 210, .08) 36%, rgba(158, 210, 210, .03) 64%, rgba(158, 210, 210, .16));
  --panel: linear-gradient(180deg, rgba(27, 35, 45, .94), rgba(19, 25, 33, .94));
  --shadow: 0 30px 60px -34px rgba(0, 0, 0, .8);

  /* Motion */
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: 110px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--abyss);
}
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: linear-gradient(180deg, #121b24 0, var(--bg) 1100px, var(--bg) 60%, #0c1117 100%);
  font: 400 var(--fs-body)/1.75 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
button { margin: 0; padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
/* CJK headings break at punctuation (keep-all) and only split a phrase when it cannot fit. */
h1, h2, h3 { font-weight: 700; text-wrap: balance; word-break: keep-all; overflow-wrap: anywhere; }
h2 { font-size: var(--fs-h2); line-height: 1.32; letter-spacing: -.025em; }
h3 { font-size: var(--fs-h3); line-height: 1.5; letter-spacing: -.01em; }
p { text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 4px; border-radius: 6px; }
main:focus, section[tabindex="-1"]:focus { outline: none; }
::selection { color: var(--on-teal); background: var(--mint); }

.container { width: min(var(--max), 100% - 2 * var(--gutter)); margin-inline: auto; }
.section { position: relative; padding-block: var(--section); }
.skip-link { position: fixed; top: 12px; left: 20px; z-index: 200; padding: 10px 20px; border-radius: 10px; background: var(--mint); color: var(--on-teal); font-weight: 700; }
.skip-link:not(:focus) { width: 1px; height: 1px; padding: 0; overflow: hidden; white-space: nowrap; clip-path: inset(50%); }

/* ---------- Primitives ---------- */
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { display: inline-block; width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.mono { font-family: var(--font-mono); font-size: var(--fs-label); font-weight: 400; letter-spacing: .14em; text-transform: uppercase; }
.kicker { display: inline-flex; align-items: center; gap: 12px; margin-bottom: 18px; color: var(--teal-deep); font: 400 var(--fs-label)/1.4 var(--font-mono); letter-spacing: .2em; text-transform: uppercase; }
.kicker::before { content: ""; width: 24px; height: 1px; background: currentColor; opacity: .7; }
.accent, .h1-accent {
  color: var(--mint);
  background: linear-gradient(100deg, #e4f6f3 0%, #a5ddd8 46%, #7cc4cf 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.status-dot { display: inline-block; width: 6px; height: 6px; flex-shrink: 0; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 3px rgba(165, 221, 216, .12), 0 0 10px rgba(165, 221, 216, .6); }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 13px; border: 1px solid var(--line-strong); border-radius: 999px; background: rgba(165, 221, 216, .05); color: var(--teal-soft); font-size: var(--fs-small); line-height: 1.4; white-space: nowrap; }

.button {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 12px 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: var(--fs-ui);
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  transition: transform .25s var(--ease-out), box-shadow .3s, background-color .25s, border-color .25s, color .25s;
}
.button .icon { width: 18px; height: 18px; transition: translate .25s var(--ease-out); }
.button:hover { transform: translateY(-2px); }
.button:active { transform: translateY(0) scale(.98); }
.button:hover .icon:last-child, .button:focus-visible .icon:last-child { translate: 2px 0; }
.button-primary {
  color: var(--on-teal);
  background: linear-gradient(135deg, #d3f4f0 0%, #a5ddd8 48%, #82c9d3 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 12px 30px -12px rgba(119, 198, 212, .65), 0 0 44px -10px rgba(158, 210, 210, .4);
}
.button-primary::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .55) 48%, transparent 66%);
  translate: -120% 0;
  transition: translate .8s var(--ease-out);
}
.button-primary:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 16px 36px -12px rgba(119, 198, 212, .8), 0 0 56px -8px rgba(158, 210, 210, .55); }
.button-primary:hover::after { translate: 120% 0; }
.button-secondary { color: var(--text-body); background: rgba(158, 210, 210, .06); border-color: var(--line-strong); }
.button-secondary:hover { color: var(--text); background: rgba(158, 210, 210, .12); border-color: var(--line-glow); }
.button-small { min-height: 42px; padding: 8px 18px; font-size: var(--fs-small); }

.text-link { display: inline-flex; align-items: center; gap: 10px; color: var(--teal-soft); font-size: var(--fs-ui); font-weight: 700; transition: color .2s; }
.text-link:hover { color: var(--mint); }
.text-link .icon { width: 17px; height: 17px; transition: translate .25s var(--ease-out); }
.text-link:hover .icon { translate: 3px 0; }

/* ---------- Floating navigation ---------- */
.site-header {
  position: fixed;
  z-index: 50;
  top: 14px;
  left: 0;
  right: 0;
  width: min(var(--max), 100% - 2 * var(--gutter));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 9px 9px 9px 18px;
  border: 1px solid rgba(158, 210, 210, .14);
  border-radius: 18px;
  background: rgba(16, 22, 29, .6);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  backdrop-filter: blur(20px) saturate(150%);
  box-shadow: 0 18px 40px -22px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .04);
  view-transition-name: site-header;
  transition: background-color .3s, border-color .3s, box-shadow .3s;
}
.site-header.is-scrolled { background: rgba(16, 22, 29, .86); border-color: rgba(158, 210, 210, .22); box-shadow: 0 20px 44px -18px rgba(0, 0, 0, .75), inset 0 1px 0 rgba(255, 255, 255, .05); }
.site-header::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, rgba(165, 221, 216, .15), var(--mint));
  box-shadow: 0 0 10px rgba(165, 221, 216, .55);
  transform: scaleX(var(--scroll-progress, 0));
  transform-origin: left;
  pointer-events: none;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 1.25rem; font-weight: 700; line-height: 1; letter-spacing: -.02em; white-space: nowrap; }
.brand img { width: 28px; height: 28px; object-fit: contain; filter: drop-shadow(0 0 10px rgba(196, 238, 234, .4)); }
.brand-suffix { color: var(--text-faint); font-weight: 400; font-size: .86em; }
.main-nav { display: flex; align-items: center; gap: 2px; }
.main-nav > a:not(.button) { position: relative; padding: 8px 14px; border-radius: 10px; color: var(--text-muted); font-size: var(--fs-ui); transition: color .2s, background-color .2s; }
.main-nav > a:not(.button):hover { color: var(--text); background: rgba(158, 210, 210, .06); }
.main-nav > a[href^="#"]:not(.button)::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 2px; border-radius: 2px; background: var(--mint); box-shadow: 0 0 8px rgba(165, 221, 216, .6); opacity: 0; transform: scaleX(.3); transition: opacity .25s, transform .3s var(--ease-out); }
.main-nav > a[aria-current="location"]:not(.button) { color: var(--mint); }
.main-nav > a[aria-current="location"]:not(.button)::after { opacity: 1; transform: scaleX(1); }
.main-nav > a.nav-github { display: inline-flex; align-items: center; gap: 8px; margin-left: 8px; padding-left: 20px; }
.main-nav > a.nav-github::before { content: ""; position: absolute; left: 0; top: 50%; width: 1px; height: 18px; background: var(--line-strong); translate: 0 -50%; }
.nav-download { margin-left: 8px; color: #d6f1ee; background: rgba(165, 221, 216, .1); border-color: rgba(165, 221, 216, .3); }
.nav-download:hover { background: rgba(165, 221, 216, .18); }
.nav-download[aria-current="location"] { background: rgba(165, 221, 216, .2); border-color: rgba(165, 221, 216, .65); }
.menu-toggle { display: none; }

/* ---------- Hero: the lit sea ---------- */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: 720px;
  min-height: max(720px, min(100svh, 980px));
  padding-top: clamp(112px, 15vh, 156px);
  overflow: hidden;
  overflow: clip;
}
.hero-backdrop { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.sea-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(50% 58% at 70% 44%, rgba(119, 198, 212, .17), transparent 70%),
    radial-gradient(32% 40% at 92% 84%, rgba(180, 169, 238, .1), transparent 70%),
    radial-gradient(46% 56% at 12% 28%, rgba(38, 80, 92, .32), transparent 72%),
    linear-gradient(180deg, #14222c 0%, rgba(16, 21, 28, 0) 100%);
}
.sea-rays {
  position: absolute;
  top: -14%;
  left: 18%;
  width: 92%;
  height: 108%;
  background:
    linear-gradient(104deg, transparent 30%, rgba(178, 230, 228, .075) 33%, transparent 37%),
    linear-gradient(98deg, transparent 44%, rgba(178, 230, 228, .055) 46.5%, transparent 50%),
    linear-gradient(110deg, transparent 52%, rgba(178, 230, 228, .07) 56%, transparent 61%),
    linear-gradient(95deg, transparent 63%, rgba(178, 230, 228, .045) 65%, transparent 68%),
    linear-gradient(102deg, transparent 71%, rgba(178, 230, 228, .055) 74%, transparent 78%);
  -webkit-mask-image: linear-gradient(180deg, #000, rgba(0, 0, 0, .45) 45%, transparent 86%);
  mask-image: linear-gradient(180deg, #000, rgba(0, 0, 0, .45) 45%, transparent 86%);
  transform-origin: 50% 0;
  animation: rays-sway 16s ease-in-out infinite alternate;
}
.sea-grid {
  position: absolute;
  inset: 0;
  opacity: .32;
  background-image: radial-gradient(rgba(130, 160, 190, .55) .7px, transparent 1px);
  background-size: 38px 38px;
  -webkit-mask-image: radial-gradient(ellipse 72% 64% at 50% 42%, #000 15%, transparent 75%);
  mask-image: radial-gradient(ellipse 72% 64% at 50% 42%, #000 15%, transparent 75%);
}
.sea-motes {
  position: absolute;
  inset: 0;
  overflow: hidden;
  overflow: clip;
  -webkit-mask-image: linear-gradient(transparent, #000 18%, #000 72%, transparent);
  mask-image: linear-gradient(transparent, #000 18%, #000 72%, transparent);
}
.sea-motes::before, .sea-motes::after { content: ""; position: absolute; top: 0; left: 0; right: 0; will-change: transform; }
/* Residue drifting upward: tiles share one height, so a single-tile shift loops seamlessly. */
.sea-motes::before {
  height: calc(100% + 520px);
  background-image:
    radial-gradient(circle at 18% 22%, rgba(178, 232, 228, .75) 0 1px, transparent 1.7px),
    radial-gradient(circle at 64% 71%, rgba(178, 232, 228, .55) 0 1px, transparent 1.7px),
    radial-gradient(circle at 37% 48%, rgba(178, 232, 228, .5) 0 1.1px, transparent 1.8px),
    radial-gradient(circle at 82% 12%, rgba(178, 232, 228, .4) 0 .9px, transparent 1.5px),
    radial-gradient(circle at 9% 86%, rgba(178, 232, 228, .6) 0 1px, transparent 1.7px),
    radial-gradient(circle at 52% 33%, rgba(178, 232, 228, .45) 0 1.2px, transparent 1.9px),
    radial-gradient(circle at 73% 92%, rgba(178, 232, 228, .55) 0 1px, transparent 1.7px);
  background-size: 230px 520px, 310px 520px, 370px 520px, 190px 520px, 450px 520px, 270px 520px, 340px 520px;
  animation: motes-near 44s linear infinite;
}
.sea-motes::after {
  height: calc(100% + 760px);
  background-image:
    radial-gradient(circle at 30% 20%, rgba(196, 238, 234, .34) 0 2px, transparent 4px),
    radial-gradient(circle at 76% 58%, rgba(185, 174, 240, .32) 0 2px, transparent 4.2px),
    radial-gradient(circle at 12% 74%, rgba(196, 238, 234, .28) 0 1.8px, transparent 4px),
    radial-gradient(circle at 58% 40%, rgba(196, 238, 234, .24) 0 2.4px, transparent 4.6px),
    radial-gradient(circle at 88% 88%, rgba(185, 174, 240, .24) 0 2px, transparent 4px);
  background-size: 520px 760px, 410px 760px, 610px 760px, 330px 760px, 470px 760px;
  animation: motes-far 80s linear infinite;
}

.hero-inner { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); align-items: center; gap: clamp(16px, 3vw, 48px); }
.hero-copy { position: relative; z-index: 2; max-width: 600px; padding-bottom: clamp(24px, 6vh, 72px); }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 26px; padding: 7px 16px 7px 13px; border: 1px solid var(--line-strong); border-radius: 999px; background: rgba(158, 210, 210, .05); color: #c3e3e0; font-size: var(--fs-small); letter-spacing: .12em; }
.hero h1 { font-size: var(--fs-h1); line-height: 1.24; letter-spacing: -.035em; }
.hero-description { margin-top: 28px; color: var(--text-muted); font-size: var(--fs-lead); line-height: 2; letter-spacing: .02em; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 38px; }
.hero-actions .button { min-height: 54px; padding-inline: 26px; }
.preview-link { gap: 12px; color: var(--text-body); }
.play-icon { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line-strong); border-radius: 50%; background: rgba(158, 210, 210, .05); transition: background-color .25s, border-color .25s, transform .3s var(--ease-out); }
.play-icon svg { width: 12px; height: 12px; fill: currentColor; translate: 1px 0; }
.preview-link:hover .play-icon { border-color: var(--line-glow); background: rgba(158, 210, 210, .12); transform: scale(1.06); }
.hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 34px; color: var(--text-faint); font-size: var(--fs-small); }
.hero-meta li { display: inline-flex; align-items: center; gap: 8px; }
/* A hairline rather than a dot, so separators never read as part of the drifting motes. */
.hero-meta li + li::before { content: ""; width: 1px; height: 11px; margin-right: 6px; background: rgba(132, 166, 176, .42); }
.hero-meta .icon { width: 15px; height: 15px; }

.hero-visual { position: relative; align-self: stretch; min-height: clamp(460px, 62vh, 650px); }
.sea-orbits { position: absolute; left: 50%; top: 48%; width: 112%; height: auto; max-width: none; translate: -50% -50%; color: rgba(130, 198, 208, .17); stroke-width: 1; overflow: visible; }
.hero-halo { position: absolute; left: 52%; top: 42%; width: 72%; aspect-ratio: 1; translate: -50% -50%; border-radius: 50%; background: radial-gradient(circle, rgba(158, 210, 210, .2), rgba(119, 198, 212, .06) 45%, transparent 70%); }
.hero-character {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(122%, 820px);
  max-width: none;
  translate: -47% -50%;
  filter: drop-shadow(0 0 40px rgba(170, 206, 218, .12));
  -webkit-mask-image: linear-gradient(180deg, #000 76%, transparent 98%);
  mask-image: linear-gradient(180deg, #000 76%, transparent 98%);
  animation: drift 8s ease-in-out infinite;
}
.signal-tag { position: absolute; z-index: 3; top: 3%; right: 0; display: flex; align-items: flex-start; gap: 12px; color: #93b2bb; font: 400 var(--fs-label)/1.7 var(--font-mono); letter-spacing: .16em; }
.signal-tag small { display: block; color: #7896a0; font-size: inherit; letter-spacing: .12em; }
.signal-cross { color: var(--teal); font-size: 20px; line-height: 1; }
.hero-message {
  position: absolute;
  z-index: 4;
  left: 3%;
  bottom: 18%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 22px 14px 14px;
  border: 1px solid transparent;
  border-radius: 20px 20px 20px 6px;
  background: linear-gradient(180deg, rgba(30, 43, 53, .82), rgba(21, 31, 40, .82)) padding-box, var(--edge) border-box;
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .7);
  rotate: -2deg;
}
.hero-message > img { width: 38px; height: 38px; padding: 8px; border: 1px solid var(--line-strong); border-radius: 50%; background: radial-gradient(circle at 30% 30%, #2f5562, #182a33); }
.message-name { display: flex; align-items: baseline; gap: 8px; color: var(--mint); font-size: var(--fs-small); font-weight: 700; line-height: 1.4; }
.message-name small { color: var(--text-faint); font-size: var(--fs-label); font-weight: 400; }
.hero-message p { position: relative; margin-top: 3px; color: #dce8ea; font-size: var(--fs-ui); line-height: 1.6; white-space: nowrap; }
.message-typing { display: none; }
.visual-caption { position: absolute; z-index: 3; left: calc(3% + 66px); bottom: 8%; color: var(--text-muted); font-size: var(--fs-small); letter-spacing: .1em; text-shadow: 0 1px 2px rgba(8, 12, 16, .9), 0 0 18px rgba(8, 12, 16, .95); }
.hero-foot { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-block: 22px 26px; border-top: 1px solid rgba(158, 210, 210, .1); color: var(--text-faint); }
.scroll-link { display: inline-flex; align-items: center; gap: 14px; color: var(--text-muted); font-size: var(--fs-small); transition: color .2s; }
.scroll-link:hover { color: var(--mint); }
.scroll-line { position: relative; width: 1px; height: 30px; overflow: hidden; background: rgba(158, 210, 210, .2); }
.scroll-line::after { content: ""; position: absolute; left: 0; top: 0; width: 1px; height: 40%; background: var(--mint); translate: 0 -100%; animation: scroll-cue 2.4s var(--ease-in-out) infinite; }

/* ---------- Ribbon ---------- */
.ribbon {
  position: relative;
  overflow: hidden;
  overflow: clip;
  border-block: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(158, 210, 210, .025), rgba(158, 210, 210, .06), rgba(158, 210, 210, .025));
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.ribbon-track { display: flex; width: max-content; animation: marquee 52s linear infinite; }
.ribbon:hover .ribbon-track { animation-play-state: paused; }
.ribbon-list { display: flex; flex-shrink: 0; align-items: center; }
.ribbon-list li { display: inline-flex; align-items: center; gap: 30px; padding: 18px 0 18px 30px; color: var(--text-muted); font-size: var(--fs-ui); letter-spacing: .06em; white-space: nowrap; }
.ribbon-list li::after { content: ""; width: 5px; height: 5px; rotate: 45deg; background: rgba(158, 210, 210, .55); box-shadow: 0 0 8px rgba(158, 210, 210, .6); }

/* ---------- About: residue → sediment → emergence ---------- */
.about { isolation: isolate; overflow: hidden; overflow: clip; }
.about::before { content: ""; position: absolute; z-index: -1; left: -10%; top: 10%; width: 60%; height: 80%; background: radial-gradient(closest-side, rgba(56, 104, 116, .2), transparent); pointer-events: none; }
.about-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); align-items: center; gap: clamp(36px, 7vw, 100px); }
.emergence { position: relative; aspect-ratio: 560 / 440; }
.emergence > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.emergence-orbits { opacity: .32; stroke-width: 1; }
.emergence-orbits ellipse + ellipse { opacity: .6; stroke-dasharray: 2 7; }
.currents path { stroke-width: 1; opacity: .55; }
.flows path { stroke-width: 3; stroke-linecap: round; stroke-dasharray: .1 22; animation: flow 2.6s linear infinite; }
.flows path:nth-child(2) { animation-duration: 2.1s; animation-delay: -.7s; }
.flows path:nth-child(3) { animation-duration: 2.9s; animation-delay: -1.3s; }
.flows path:nth-child(4) { animation-duration: 3.4s; animation-delay: -.4s; }
.flows path:nth-child(5) { animation-duration: 2.4s; animation-delay: -1.8s; }
.residue circle { opacity: .45; animation: twinkle 4.8s ease-in-out infinite; }
.residue circle:nth-child(2n) { animation-delay: -1.6s; }
.residue circle:nth-child(3n) { animation-delay: -3.1s; animation-duration: 6s; }
.sediment circle { opacity: .8; }
.orbit-dot { filter: drop-shadow(0 0 6px #c4eeea); animation: twinkle 3.2s ease-in-out infinite; }
.emergence-core {
  position: absolute;
  left: 72.857%;
  top: 50%;
  width: 23.6%;
  aspect-ratio: 1;
  translate: -50% -50%;
  display: grid;
  place-items: center;
  border: 1px solid rgba(185, 233, 229, .42);
  border-radius: 50%;
  background: radial-gradient(circle at 30% 26%, rgba(196, 238, 234, .32), transparent 56%), radial-gradient(circle, #2b4a57 0%, #132630 72%);
  box-shadow: 0 0 0 10px rgba(158, 210, 210, .03), 0 0 70px rgba(134, 201, 207, .3), inset 0 0 30px rgba(145, 222, 226, .2), inset 0 -8px 22px rgba(10, 20, 28, .5);
}
.emergence-core img { position: relative; width: 54%; filter: drop-shadow(0 0 14px rgba(228, 255, 254, .6)); }
.core-pulse { position: absolute; inset: -1px; border: 1px solid rgba(165, 221, 216, .55); border-radius: 50%; animation: core-pulse 4.8s var(--ease-out) infinite; }
.core-pulse + .core-pulse { animation-delay: 2.4s; }
.emergence-coordinate { position: absolute; top: 0; left: 0; color: #7f9ca7; }
.emergence-label { position: absolute; bottom: 0; color: #7f9ca7; }
.label-residue { left: 1%; }
.label-sediment { left: 37%; }
.label-emergence { left: 72.857%; translate: -50% 0; }
.emergence-chip { position: absolute; top: 6%; left: 72.857%; translate: -50% 0; display: flex; align-items: center; gap: 10px; padding: 9px 16px; border: 1px solid rgba(165, 221, 216, .2); border-radius: 999px; background: rgba(24, 36, 45, .78); color: #b5d3d8; font-size: var(--fs-small); white-space: nowrap; box-shadow: 0 12px 30px -16px rgba(0, 0, 0, .6); }
.about-copy > p:not(.kicker) { margin-top: 22px; color: var(--text-muted); line-height: 2; }
.about-copy > p + p { margin-top: 12px; }
.about-note { position: relative; margin: 30px 0; padding: 20px 24px 20px 58px; border-left: 2px solid rgba(158, 210, 210, .55); border-radius: 0 var(--radius) var(--radius) 0; background: linear-gradient(90deg, rgba(158, 210, 210, .08), rgba(158, 210, 210, .01)); }
.about-note::before { content: "\201C"; content: "\201C" / ""; position: absolute; left: 18px; top: 10px; color: rgba(165, 221, 216, .55); font: 52px/1 Georgia, "Times New Roman", serif; }
.about-note p { color: var(--text-body); font-size: var(--fs-lead); line-height: 1.85; }

.phases { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 44px); margin-top: clamp(56px, 7vw, 96px); padding-top: 34px; }
.phases::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, rgba(158, 210, 210, .08), rgba(158, 210, 210, .35) 60%, rgba(196, 238, 234, .85)); }
.phase { position: relative; }
.phase::before { content: ""; position: absolute; top: -39px; left: 0; width: 10px; height: 10px; border: 1px solid rgba(158, 210, 210, .55); border-radius: 50%; background: var(--bg); }
.phase:nth-child(2)::before { background: rgba(158, 210, 210, .4); }
.phase:nth-child(3)::before { background: var(--mint); box-shadow: 0 0 14px var(--mint); }
.phase-index { display: block; color: var(--teal-deep); }
.phase h3 { margin-top: 10px; font-size: clamp(1.375rem, 1.15rem + .9vw, 1.75rem); letter-spacing: .1em; }
.phase p { margin-top: 8px; max-width: 30ch; color: var(--text-muted); font-size: var(--fs-ui); line-height: 1.9; }

/* ---------- Features: real capabilities, illustrated ---------- */
.features { background: linear-gradient(180deg, transparent, rgba(20, 27, 35, .75) 14%, rgba(20, 27, 35, .75) 86%, transparent); }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px 40px; margin-bottom: clamp(36px, 4vw, 56px); }
.section-heading .kicker { margin-bottom: 14px; }
.section-lead { color: var(--text-muted); font-size: var(--fs-ui); line-height: 1.9; text-align: right; }
.bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
/* overflow: clip (not hidden) so scrollIntoView/find-in-page can never scroll a card's contents. */
.card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  overflow: clip;
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  background: var(--panel) padding-box, var(--edge) border-box;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04), var(--shadow);
}
/* Pointer light follows the cursor (set by app.js on fine pointers). */
.card::before { content: ""; position: absolute; z-index: -1; inset: 0; background: radial-gradient(380px circle at var(--mx, 50%) var(--my, -20%), rgba(158, 210, 210, .11), transparent 62%); opacity: 0; transition: opacity .4s; pointer-events: none; }
.card:hover::before { opacity: 1; }
.feature { display: flex; flex-direction: column; min-height: 300px; padding: clamp(22px, 2.4vw, 30px); transition: transform .35s var(--ease-out), box-shadow .35s; }
.feature:hover { transform: translateY(-4px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 40px 70px -36px rgba(0, 0, 0, .9), 0 0 0 1px rgba(158, 210, 210, .12); }
.feature-live { grid-column: span 3; grid-row: span 2; background: radial-gradient(70% 50% at 50% 100%, rgba(67, 129, 135, .3), transparent 70%) padding-box, var(--panel) padding-box, var(--edge) border-box; }
.feature-chat, .feature-voice { grid-column: span 3; }
.feature-compact { grid-column: span 2; min-height: 270px; }
.feature-icon { display: inline-grid; place-items: center; width: 46px; height: 46px; margin-bottom: 20px; border: 1px solid rgba(158, 210, 210, .24); border-radius: 14px; color: #c2e7e4; background: linear-gradient(145deg, rgba(158, 210, 210, .16), rgba(158, 210, 210, .04)); box-shadow: 0 10px 24px -12px rgba(119, 198, 212, .5); transition: transform .4s var(--ease-out); }
.feature:hover .feature-icon { transform: rotate(-6deg) scale(1.05); }
.feature h3 { margin-bottom: 10px; }
.feature-body > p { color: var(--text-muted); font-size: var(--fs-ui); line-height: 1.9; }
.feature-live .feature-body > p { max-width: 34ch; }
.feature-footer { display: block; margin-top: auto; padding-top: 24px; color: var(--text-faint); }

.live-stage { position: relative; flex: 1; min-height: 320px; margin: 12px -10px 0; }
.live-stage img { position: absolute; left: 50%; bottom: 0; height: 96%; max-height: 390px; width: auto; translate: -50% 0; filter: drop-shadow(0 20px 24px rgba(4, 12, 18, .55)); transform-origin: 50% 100%; animation: breathe 6s ease-in-out infinite; }
.stage-ring { position: absolute; left: 50%; bottom: 1%; width: 60%; aspect-ratio: 3.2; translate: -50% 0; border: 1px solid rgba(140, 200, 205, .32); border-radius: 50%; background: radial-gradient(closest-side, rgba(158, 210, 210, .16), transparent); }
.stage-ring.ring-outer { width: 88%; bottom: -4%; border-style: dashed; border-color: rgba(140, 200, 205, .18); background: none; }
.stage-tag { position: absolute; z-index: 2; display: inline-flex; align-items: center; gap: 8px; padding: 6px 13px 6px 11px; border: 1px solid var(--line-strong); border-radius: 999px; background: rgba(20, 29, 37, .85); color: var(--text-body); font-size: var(--fs-label); white-space: nowrap; box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .6); animation: bob 5s ease-in-out infinite; }
.stage-tag .status-dot { width: 5px; height: 5px; }
.tag-blink { top: 6%; left: 4%; }
.tag-gaze { top: 24%; right: 3%; animation-delay: -1.2s; }
.tag-physics { bottom: 34%; left: 1%; animation-delay: -2.5s; }
.tag-lip { bottom: 13%; right: 6%; animation-delay: -3.7s; }

.provider-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.provider-tags li { padding: 5px 13px; border: 1px solid var(--line-strong); border-radius: 999px; background: rgba(158, 210, 210, .04); color: var(--text-body); font-size: var(--fs-small); transition: border-color .25s, background-color .25s; }
.feature-chat:hover .provider-tags li { border-color: rgba(158, 210, 210, .36); background: rgba(158, 210, 210, .07); }
.waveform { display: flex; align-items: center; justify-content: space-between; gap: 3px; height: 58px; margin-top: 22px; color: var(--teal); }
.waveform i { flex: 1; max-width: 4px; height: 30%; border-radius: 4px; background: currentColor; opacity: .5; animation: wave 1.8s ease-in-out infinite; }
.waveform i:nth-child(2n) { animation-delay: -.5s; }
.waveform i:nth-child(3n) { height: 62%; opacity: .85; animation-delay: -.9s; }
.waveform i:nth-child(4n) { height: 88%; opacity: .8; animation-delay: -1.3s; }
.waveform i:nth-child(5n) { height: 46%; opacity: .4; }
.waveform i:nth-child(7n) { height: 100%; opacity: .95; }
.card-glyph { position: absolute; z-index: -1; right: -20px; bottom: -24px; width: 150px; height: 150px; color: rgba(158, 210, 210, .06); stroke-width: 1; transition: transform .7s var(--ease-out), color .4s; }
.feature-compact:hover .card-glyph { transform: rotate(-8deg) scale(1.06); color: rgba(158, 210, 210, .1); }
.feature-footnote { margin-top: 28px; color: var(--text-faint); font-size: var(--fs-small); text-align: center; }

/* ---------- Preview: preset moments, clearly not real AI chat ---------- */
.preview { isolation: isolate; overflow: hidden; overflow: clip; }
.preview::before { content: ""; position: absolute; z-index: -1; right: -10%; top: 20%; width: 55%; height: 70%; background: radial-gradient(closest-side, rgba(70, 120, 150, .16), transparent); pointer-events: none; }
.preview-layout { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); align-items: center; gap: clamp(28px, 4vw, 56px); }
.desktop-window { overflow: hidden; overflow: clip; border: 1px solid transparent; border-radius: var(--radius-lg); background: linear-gradient(#141d27, #141d27) padding-box, var(--edge) border-box; box-shadow: 0 50px 100px -44px rgba(0, 0, 0, .9), 0 0 90px -34px rgba(119, 198, 212, .3); }
.window-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid rgba(158, 210, 210, .1); background: linear-gradient(180deg, #212c37, #1b252f); color: var(--text-muted); font-size: var(--fs-small); }
.window-bar .icon { width: 16px; height: 16px; color: var(--text-faint); }
.window-dots { display: flex; gap: 7px; }
.window-dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(158, 174, 183, .28); }
.window-dots i:first-child { background: rgba(165, 221, 216, .6); }
/* Note, clock, chat and dock share a grid, so longer lines grow the scene instead of overlapping. */
.desktop-scene { position: relative; display: grid; grid-template-columns: minmax(0, 38fr) minmax(0, 62fr); grid-template-rows: auto minmax(0, 1fr) auto; min-height: clamp(420px, 32vw, 440px); padding: 24px 24px 12px; overflow: hidden; overflow: clip; background: radial-gradient(ellipse at 30% 72%, rgba(98, 151, 148, .2), transparent 55%), radial-gradient(ellipse at 92% 12%, rgba(49, 73, 99, .6), transparent 60%), linear-gradient(125deg, #11252f, #192336 70%, #1a2033); }
.scene-ambience, .scene-ambience::before, .scene-ambience::after { position: absolute; inset: 0; pointer-events: none; }
.scene-ambience::before, .scene-ambience::after { content: ""; opacity: 0; transition: opacity .8s var(--ease-out); }
.scene-ambience::before { background: radial-gradient(ellipse at 18% 22%, rgba(214, 205, 150, .16), transparent 62%), linear-gradient(140deg, rgba(40, 85, 68, .3), transparent); }
.scene-ambience::after { background: radial-gradient(ellipse at 80% 14%, rgba(121, 157, 198, .16), transparent 55%), linear-gradient(140deg, rgba(17, 26, 56, .45), rgba(12, 18, 44, .7)); }
.desktop-scene[data-moment="break"] .scene-ambience::before, .desktop-scene[data-moment="night"] .scene-ambience::after { opacity: 1; }
.scene-stars { position: absolute; inset: 0; opacity: .14; pointer-events: none; background-image: radial-gradient(rgba(186, 223, 211, .9) 1px, transparent 1.4px), radial-gradient(rgba(186, 223, 211, .6) .8px, transparent 1.2px); background-size: 46px 46px, 73px 73px; background-position: 0 0, 23px 31px; transition: opacity .8s; }
.desktop-scene[data-moment="night"] .scene-stars { opacity: .5; }
.wallpaper-orbit { position: absolute; top: 150px; left: -60px; width: 660px; height: 400px; border: 1px solid rgba(127, 187, 203, .14); border-radius: 50%; transform: rotate(-30deg); }
.wallpaper-orbit::before { content: ""; position: absolute; inset: 26px; border: 1px solid rgba(127, 187, 203, .1); border-radius: 50%; }
.desktop-note { position: relative; z-index: 1; grid-area: 1 / 1 / 3 / 2; align-self: start; padding: 2px 12px 0 4px; color: var(--text-body); }
.desktop-note .mono { color: #89a9b4; letter-spacing: .24em; }
.desktop-note p { margin-top: 6px; font-size: var(--fs-lead); letter-spacing: .08em; }
.note-line { display: block; width: 28px; height: 1px; margin-top: 14px; background: rgba(165, 221, 216, .45); }
.scene-clock.mono { position: relative; grid-area: 1 / 2; justify-self: end; color: rgba(220, 238, 238, .78); font-size: clamp(1.5rem, 1.1rem + 1vw, 2.125rem); letter-spacing: .04em; line-height: 1; }
.preview-pet { position: absolute; left: 6%; bottom: 16px; height: 68%; width: auto; filter: drop-shadow(0 12px 16px rgba(10, 26, 38, .6)); }
.preview-chat { position: relative; z-index: 2; grid-area: 2 / 2; align-self: start; margin-top: 14px; padding: 16px; border: 1px solid rgba(158, 210, 210, .16); border-radius: 18px; background: rgba(22, 26, 34, .86); -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%); box-shadow: 0 24px 50px -20px rgba(4, 10, 16, .75); }
.chat-top { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; color: #d2e6e5; font-size: var(--fs-small); font-weight: 700; }
.chat-top img { width: 20px; height: 20px; opacity: .85; }
.chat-label { margin-left: auto; padding: 2px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--text-faint); font-size: var(--fs-label); font-weight: 400; }
/* Bubble colours mirror the app's chat tokens (chat-user-bg / chat-ai-bg). */
/* Wrap Chinese lines at punctuation first, so narrow bubbles never strand a single character. */
.user-bubble, .nori-bubble { word-break: keep-all; overflow-wrap: anywhere; }
.user-bubble { width: fit-content; max-width: 88%; margin-left: auto; padding: 8px 14px; border-radius: 14px 14px 4px 14px; background: linear-gradient(135deg, #3d3d47, #4a4a55); color: #e8e8ec; font-size: var(--fs-small); line-height: 1.6; }
.nori-bubble { width: fit-content; max-width: 100%; margin-top: 10px; padding: 11px 15px; border: 1px solid rgba(254, 254, 254, .44); border-radius: 14px 14px 14px 4px; background: linear-gradient(135deg, #d2e8e9, #caf5f1); color: #3d3e47; font-size: var(--fs-ui); line-height: 1.75; white-space: pre-line; }
.chat-caption { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding-top: 11px; border-top: 1px solid rgba(158, 210, 210, .1); color: var(--text-faint); font-size: var(--fs-label); }
.chat-caption .status-dot { width: 5px; height: 5px; }
.desktop-dock { position: relative; z-index: 3; grid-area: 3 / 1 / 4 / 3; justify-self: center; margin-top: 16px; display: flex; align-items: center; gap: 14px; padding: 9px 16px; border: 1px solid rgba(177, 215, 227, .2); border-radius: 16px; background: rgba(23, 35, 44, .74); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: 0 10px 24px -8px rgba(0, 0, 0, .45); }
.desktop-dock img { width: 22px; height: 22px; }
.desktop-dock > span { width: 1px; height: 20px; background: rgba(165, 221, 216, .2); }
.desktop-dock .icon { width: 18px; height: 18px; color: #a8c9d1; }
.window-footer { display: flex; justify-content: space-between; gap: 12px; padding: 11px 16px; border-top: 1px solid rgba(158, 210, 210, .08); background: #18222c; color: var(--text-faint); font-size: var(--fs-label); }
#scene-counter { color: var(--teal-soft); letter-spacing: .06em; }
.preview-lead { margin-bottom: 22px; font-size: clamp(1.125rem, 1rem + .5vw, 1.375rem); line-height: 1.7; }
.scenario-list { display: grid; gap: 10px; }
.scenario { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; width: 100%; padding: 13px 18px 13px 13px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255, 255, 255, .015); text-align: left; transition: background-color .25s, border-color .25s, box-shadow .3s, transform .25s var(--ease-out); }
.scenario:hover { border-color: rgba(158, 210, 210, .3); background: rgba(158, 210, 210, .045); }
.scenario:active { transform: scale(.985); }
.scenario.active { border-color: rgba(158, 210, 210, .5); background: linear-gradient(100deg, rgba(158, 210, 210, .13), rgba(158, 210, 210, .03)); box-shadow: 0 16px 34px -22px rgba(119, 198, 212, .6); }
.scenario-icon { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 13px; background: rgba(158, 210, 210, .04); color: var(--text-faint); transition: background-color .3s, color .3s, border-color .3s, box-shadow .3s; }
.scenario-icon .icon { width: 20px; height: 20px; }
.scenario.active .scenario-icon { border-color: transparent; background: linear-gradient(135deg, #d3f4f0, #9ed2d2); color: var(--on-teal); box-shadow: 0 0 22px -4px rgba(165, 221, 216, .65); }
.scenario strong { display: block; color: var(--text-body); font-size: var(--fs-body); }
.scenario.active strong { color: var(--text); }
.scenario small { display: block; margin-top: 1px; color: var(--text-faint); font-size: var(--fs-small); }
.scenario-number { color: var(--text-faint); }
.scenario.active .scenario-number { color: var(--mint); }
.preview-disclaimer { margin-block: 20px; color: var(--text-faint); font-size: var(--fs-small); line-height: 1.9; }

/* ---------- Download ---------- */
.download { isolation: isolate; overflow: hidden; overflow: clip; background: linear-gradient(180deg, transparent, rgba(20, 27, 35, .8) 18%, rgba(20, 27, 35, .8) 82%, transparent); }
.download-glow { position: absolute; z-index: -1; left: 50%; top: 12%; width: min(1100px, 130%); height: 560px; translate: -50% 0; background: radial-gradient(closest-side, rgba(45, 107, 112, .32), transparent); pointer-events: none; }
.download-intro { max-width: 680px; margin: 0 auto clamp(40px, 5vw, 60px); text-align: center; }
.download-intro .kicker::after { content: ""; width: 24px; height: 1px; background: currentColor; opacity: .7; }
.download-intro > p:not(.kicker) { margin-top: 14px; color: var(--text-muted); font-size: var(--fs-lead); }
.download-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.download-card { position: relative; display: flex; flex-direction: column; padding: clamp(22px, 2.4vw, 30px); border: 1px solid transparent; border-radius: var(--radius-lg); background: var(--panel) padding-box, var(--edge) border-box; box-shadow: var(--shadow); transition: transform .35s var(--ease-out), box-shadow .35s; }
.download-card:hover, .download-card:focus-within { transform: translateY(-4px); box-shadow: 0 40px 70px -36px rgba(0, 0, 0, .95), 0 0 0 1px rgba(158, 210, 210, .14); }
.download-card.is-recommended { background: radial-gradient(90% 60% at 50% 0%, rgba(119, 198, 212, .2), transparent 70%) padding-box, linear-gradient(180deg, #1c2a33, #16212a) padding-box, linear-gradient(150deg, rgba(196, 238, 234, .72), rgba(158, 210, 210, .2) 40%, rgba(158, 210, 210, .1) 70%, rgba(158, 210, 210, .42)) border-box; box-shadow: 0 30px 70px -34px rgba(0, 0, 0, .9), 0 0 60px -26px rgba(119, 198, 212, .55); }
.download-card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.platform-icon { width: 32px; height: 32px; color: #d0e7e7; stroke-width: 1.3; }
.platform-status { color: var(--text-faint); font-size: var(--fs-small); }
.pill-strong { color: #d7f1ee; border-color: rgba(165, 221, 216, .42); background: rgba(165, 221, 216, .1); }
.download-card h3 { font-size: clamp(1.5rem, 1.25rem + .7vw, 1.75rem); line-height: 1.3; letter-spacing: -.02em; }
.system-label { margin-top: 4px; color: var(--text-faint); font-size: var(--fs-small); }
.checklist { display: grid; gap: 10px; margin: 22px 0 28px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--text-muted); font-size: var(--fs-ui); line-height: 1.6; }
.checklist li { display: flex; align-items: center; gap: 12px; }
.checklist li::before { content: ""; flex: none; width: 10px; height: 5px; border-left: 1.6px solid var(--teal); border-bottom: 1.6px solid var(--teal); rotate: -45deg; translate: 0 -2px; }
.download-card .button { width: 100%; margin-top: auto; }
.download-notes { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px 40px; margin-top: 26px; padding: 20px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255, 255, 255, .015); color: var(--text-faint); font-size: var(--fs-small); }
.download-notes > p { display: flex; gap: 12px; max-width: 700px; line-height: 1.9; }
.download-notes > p .icon { width: 18px; height: 18px; margin-top: 3px; color: var(--teal); }
.download-links { display: flex; flex-wrap: wrap; gap: 10px 24px; flex-shrink: 0; }
.download-links a { display: inline-flex; align-items: center; gap: 6px; color: var(--teal-soft); font-weight: 700; white-space: nowrap; transition: color .2s; }
.download-links a:hover { color: var(--mint); }
.download-links .icon { width: 15px; height: 15px; }
.steps { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: clamp(44px, 5vw, 64px); }
.steps::before { content: ""; position: absolute; top: 22px; left: 22px; right: calc((100% - 48px) / 3 - 22px); height: 1px; background: linear-gradient(90deg, rgba(158, 210, 210, .5), rgba(158, 210, 210, .12)); }
.steps li { position: relative; display: grid; gap: 14px; }
.step-index { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid rgba(165, 221, 216, .4); border-radius: 50%; background: #131a22; color: var(--mint); font-size: var(--fs-small); font-weight: 700; box-shadow: 0 0 0 6px #131a22; }
.steps strong { display: block; color: var(--text); font-size: var(--fs-body); }
.steps small { display: block; margin-top: 4px; color: var(--text-faint); font-size: var(--fs-small); }

/* ---------- FAQ ---------- */
.faq-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.6fr); align-items: start; gap: clamp(36px, 7vw, 100px); }
.faq-heading { position: sticky; top: 124px; }
.faq-heading > p:not(.kicker) { margin-top: 14px; color: var(--text-muted); }
.faq-heading .text-link { margin-top: 28px; }
.faq-list { border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px 4px; color: var(--text-body); font-size: var(--fs-lead); font-weight: 700; list-style: none; cursor: pointer; transition: color .2s; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary .icon { width: 34px; height: 34px; padding: 8px; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--text-faint); transition: transform .35s var(--ease-out), color .25s, background-color .25s, border-color .25s; }
.faq-list summary:hover, .faq-list details[open] summary { color: var(--mint); }
.faq-list summary:hover .icon { border-color: var(--line-glow); }
.faq-list details[open] summary .icon { transform: rotate(45deg); border-color: transparent; background: var(--mint); color: var(--on-teal); }
.faq-list details > p { padding: 0 64px 26px 4px; color: var(--text-muted); font-size: var(--fs-ui); line-height: 1.95; }
.faq-list details a { color: var(--mint); text-decoration: underline; text-underline-offset: 3px; }
.faq-list details[open] > p { animation: reveal-in .3s var(--ease-out); }
@supports (interpolate-size: allow-keywords) {
  .faq-list details { interpolate-size: allow-keywords; }
  .faq-list details::details-content { block-size: 0; opacity: 0; overflow: clip; transition: block-size .34s var(--ease-out), opacity .26s, content-visibility .34s allow-discrete; }
  .faq-list details[open]::details-content { block-size: auto; opacity: 1; }
  .faq-list details[open] > p { animation: none; }
}

/* ---------- Finale: surfacing ---------- */
.finale { position: relative; isolation: isolate; overflow: hidden; overflow: clip; padding-top: clamp(24px, 4vw, 48px); }
.finale-glow { position: absolute; z-index: -1; left: 50%; bottom: 0; width: min(1200px, 150%); height: 560px; translate: -50% 42%; background: radial-gradient(closest-side, rgba(119, 198, 212, .24), rgba(119, 198, 212, .06) 50%, transparent); pointer-events: none; }
.community-card { position: relative; isolation: isolate; overflow: hidden; overflow: clip; display: flex; align-items: center; justify-content: space-between; gap: 32px; padding: clamp(28px, 4vw, 52px); border: 1px solid transparent; border-radius: var(--radius-xl); background: radial-gradient(70% 120% at 85% 50%, rgba(59, 105, 115, .32), transparent 60%) padding-box, var(--panel) padding-box, var(--edge) border-box; box-shadow: var(--shadow); }
.community-copy h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.125rem); }
.community-copy > p:not(.kicker) { margin-top: 12px; color: var(--text-muted); font-size: var(--fs-ui); line-height: 1.9; }
.community-card > .button { flex: none; }
.community-symbol { position: absolute; z-index: -1; top: -34%; right: 24%; width: 230px; rotate: -16deg; opacity: .05; pointer-events: none; }
.closing-line { padding-block: clamp(64px, 9vw, 120px) clamp(56px, 7vw, 96px); color: var(--text-body); font-size: clamp(1.125rem, .9rem + 1.1vw, 1.75rem); letter-spacing: .3em; text-align: center; text-indent: .3em; }
.closing-line::before { content: ""; display: block; width: 1px; height: clamp(48px, 7vw, 90px); margin: 0 auto 34px; background: linear-gradient(transparent, var(--mint)); box-shadow: 0 0 12px rgba(165, 221, 216, .55); }
.closing-line span { color: var(--mint); }

/* ---------- Footer ---------- */
.site-footer { padding-block: 34px 44px; border-top: 1px solid var(--line); }
.footer-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px; }
.footer-top .brand { font-size: 1.125rem; }
.footer-top .brand img { width: 24px; height: 24px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 28px; color: var(--text-muted); font-size: var(--fs-small); }
.footer-links a { transition: color .2s; }
.footer-links a:hover { color: var(--mint); }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px 40px; margin-top: 24px; color: var(--text-faint); font-size: var(--fs-label); line-height: 1.9; }
.footer-bottom a { color: var(--text-muted); text-decoration: underline; text-decoration-color: rgba(158, 210, 210, .35); text-underline-offset: 3px; }
.footer-bottom > .mono { text-align: right; line-height: 2; }
.footer-heart { color: var(--mint); }

.back-to-top { position: fixed; z-index: 45; right: 24px; bottom: 24px; display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid rgba(165, 221, 216, .3); border-radius: 16px; background: rgba(22, 32, 40, .84); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .65); color: #c3e3e0; opacity: 0; visibility: hidden; translate: 0 12px; transition: opacity .25s, translate .35s var(--ease-out), visibility .25s, border-color .2s; view-transition-name: back-to-top; }
.back-to-top.is-visible { opacity: 1; visibility: visible; translate: 0 0; }
.back-to-top .icon { width: 18px; height: 18px; rotate: -90deg; transition: translate .2s; }
.back-to-top:hover, .back-to-top:focus-visible { border-color: rgba(165, 221, 216, .65); }
.back-to-top:hover .icon { translate: 0 -2px; }
.back-to-top > span { position: absolute; right: calc(100% + 10px); padding: 5px 11px; border: 1px solid var(--line); border-radius: 8px; background: #1b2933; font-size: var(--fs-label); white-space: nowrap; opacity: 0; translate: 4px 0; pointer-events: none; transition: opacity .2s, translate .2s; }
.back-to-top:hover > span, .back-to-top:focus-visible > span { opacity: 1; translate: 0 0; }

/* ---------- Native section transitions keep the floating chrome in place ---------- */
::view-transition-old(root) { animation: page-out .18s ease-out both; }
::view-transition-new(root) { animation: page-in .38s var(--ease-out) both; }
::view-transition-old(root), ::view-transition-new(root) { mix-blend-mode: normal; }
::view-transition-group(site-header), ::view-transition-group(back-to-top) { animation: none; }
::view-transition-old(site-header), ::view-transition-old(back-to-top) { display: none; }
::view-transition-new(site-header), ::view-transition-new(back-to-top) { animation: none; }

/* app.js marks sections that are scrolled away; their ambient loops wait instead of burning frames. */
[data-offscreen] *, [data-offscreen] *::before, [data-offscreen] *::after { animation-play-state: paused; }

@keyframes page-out { to { opacity: 0; } }
@keyframes page-in { from { opacity: 0; transform: translateY(var(--page-shift, 14px)); } to { opacity: 1; transform: translateY(0); } }
@keyframes reveal-in { from { opacity: 0; translate: 0 18px; } to { opacity: 1; translate: 0 0; } }
@keyframes drift { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes rays-sway { from { transform: skewX(-4deg); opacity: .7; } to { transform: skewX(5deg); opacity: 1; } }
@keyframes motes-near { to { transform: translate3d(0, -520px, 0); } }
@keyframes motes-far { to { transform: translate3d(0, -760px, 0); } }
@keyframes scroll-cue { from { translate: 0 -100%; } to { translate: 0 260%; } }
@keyframes marquee { to { transform: translate3d(-50%, 0, 0); } }
@keyframes flow { to { stroke-dashoffset: -22.1; } }
@keyframes twinkle { 0%, 100% { opacity: .25; } 50% { opacity: .9; } }
@keyframes core-pulse { from { transform: scale(1); opacity: .8; } to { transform: scale(2); opacity: 0; } }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.01, 1.016); } }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -5px; } }
@keyframes wave { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(.42); } }
@keyframes typing { 0%, 60%, 100% { opacity: .3; translate: 0 0; } 30% { opacity: 1; translate: 0 -3px; } }
@keyframes typing-done { to { opacity: 0; visibility: hidden; } }
@keyframes message-in { from { opacity: 0; filter: blur(4px); } }

@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { animation: reveal-in .9s var(--ease-out) backwards; }
  .hero-copy > :nth-child(2) { animation-delay: .08s; }
  .hero-copy > :nth-child(3) { animation-delay: .16s; }
  .hero-copy > :nth-child(4) { animation-delay: .24s; }
  .hero-copy > :nth-child(5) { animation-delay: .32s; }
  .hero-visual { animation: reveal-in 1.1s var(--ease-out) .14s backwards; }
  /* Nori "types" once, then the line settles; reduced motion shows the line at once. */
  .message-typing { position: absolute; top: 50%; left: 0; display: inline-flex; gap: 5px; translate: 0 -50%; animation: typing-done .25s 2.1s forwards; }
  .message-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--teal); animation: typing 1s ease-in-out 3; }
  .message-typing i:nth-child(2) { animation-delay: .15s; }
  .message-typing i:nth-child(3) { animation-delay: .3s; }
  .message-text { animation: message-in .6s var(--ease-out) 2.2s backwards; }
}

/* ---------- Responsive ---------- */
@media (min-width: 1600px) {
  .hero-character { width: min(124%, 880px); }
}
@media (max-width: 1100px) {
  .main-nav > a:not(.button) { padding-inline: 10px; }
  .main-nav > a[href^="#"]:not(.button)::after { left: 10px; right: 10px; }
  .main-nav > a.nav-github { margin-left: 4px; padding-left: 14px; }
  .nav-github span { display: none; }
  .hero-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .hero-copy { max-width: 500px; }
  .signal-tag { right: 4%; }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature-live { grid-column: 1 / -1; grid-row: auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: 1fr auto; column-gap: 24px; }
  .feature-live .feature-body { grid-column: 1; grid-row: 1; }
  .feature-live .live-stage { grid-column: 2; grid-row: 1 / 3; min-height: 320px; margin: 0 -10px -30px 0; }
  .feature-live .live-stage img { height: 90%; }
  .feature-live .feature-footer { grid-column: 1; grid-row: 2; }
  .feature-chat, .feature-voice, .feature-compact { grid-column: span 1; }
  .feature-compact:last-child { grid-column: 1 / -1; min-height: 0; }
  .desktop-note p { font-size: var(--fs-ui); }
  .download-notes { flex-direction: column; }
}
@media (max-width: 960px) {
  .preview-layout { grid-template-columns: 1fr; }
  .preview-controls { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); align-items: start; gap: 6px 32px; }
  .preview-lead { margin: 0; }
  .scenario-list { grid-column: 2; grid-row: 1 / 4; }
  .preview-disclaimer { margin: 8px 0 0; }
}
/* Tablets: one platform per row, details beside the title instead of a cramped third column. */
@media (min-width: 601px) and (max-width: 960px) {
  .download-grid { grid-template-columns: 1fr; gap: 14px; }
  .download-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); grid-template-rows: auto auto 1fr; column-gap: 36px; }
  .download-card-top, .download-card h3, .system-label { grid-column: 1; }
  .checklist { grid-column: 2; grid-row: 1 / 4; align-self: center; margin: 0; padding: 0 0 0 32px; border-top: 0; border-left: 1px solid var(--line); }
  .download-card .button { grid-column: 1 / -1; margin-top: 24px; }
}
@media (max-width: 860px) {
  html { scroll-padding-top: 96px; }
  .site-header { top: 10px; padding: 8px 8px 8px 16px; border-radius: 16px; }
  .menu-toggle { position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line-strong); border-radius: 12px; background: rgba(158, 210, 210, .04); }
  .menu-toggle .icon { grid-area: 1 / 1; transition: opacity .2s, transform .25s var(--ease-out); }
  .menu-close { opacity: 0; transform: rotate(-90deg) scale(.7); }
  .menu-toggle[aria-expanded="true"] .menu-open { opacity: 0; transform: rotate(90deg) scale(.7); }
  .menu-toggle[aria-expanded="true"] .menu-close { opacity: 1; transform: none; }
  .main-nav {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px;
    border: 1px solid rgba(158, 210, 210, .2);
    border-radius: 16px;
    background: rgba(18, 24, 32, .97);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    box-shadow: 0 24px 50px -16px rgba(0, 0, 0, .75);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    translate: 0 -8px;
    scale: .985;
    transform-origin: top right;
    transition: opacity .2s, translate .28s var(--ease-out), scale .28s var(--ease-out), visibility 0s .22s;
  }
  .main-nav.is-open { opacity: 1; visibility: visible; pointer-events: auto; translate: 0 0; scale: 1; transition-delay: 0s; }
  .main-nav > a:not(.button) { padding: 12px 16px; font-size: var(--fs-body); }
  .main-nav > a[aria-current="location"]:not(.button) { background: rgba(165, 221, 216, .07); }
  .main-nav > a[href^="#"]:not(.button)::after { top: 14px; bottom: 14px; left: 0; right: auto; width: 2px; height: auto; transform: scaleY(.3); }
  .main-nav > a[aria-current="location"]:not(.button)::after { transform: scaleY(1); }
  .main-nav > a.nav-github { margin: 6px 0 0; padding-left: 16px; border-top: 1px solid var(--line); border-radius: 0; }
  .main-nav > a.nav-github::before { display: none; }
  .nav-github span { display: inline; }
  .nav-download { margin: 8px 0 0; min-height: 48px; }

  .hero { min-height: 0; padding-top: 124px; }
  .hero-inner { grid-template-columns: 1fr; gap: 0; }
  .hero-copy { max-width: 620px; margin-inline: auto; padding-bottom: 0; text-align: center; }
  .hero-actions, .hero-meta { justify-content: center; }
  .hero-visual { min-height: 0; aspect-ratio: 1 / .86; margin: 4px calc(var(--gutter) * -1) 0; }
  .sea-orbits { width: 100%; }
  .hero-character { width: min(104%, 660px); translate: -50% -50%; }
  .signal-tag { display: none; }
  .hero-message { left: auto; right: max(4%, 16px); bottom: 15%; }
  .visual-caption { left: auto; right: max(4%, 16px); bottom: 6%; }

  .about-grid { grid-template-columns: 1fr; }
  .emergence { width: min(560px, 100%); margin-inline: auto; }
  .faq-grid { grid-template-columns: 1fr; gap: 28px; }
  .faq-heading { position: static; }
  .steps { gap: 16px; }
}
@media (max-width: 760px) {
  .community-card { flex-direction: column; align-items: flex-start; }
  .community-symbol { top: auto; bottom: -30%; right: -10%; }
}
@media (max-width: 600px) {
  html { scroll-padding-top: 88px; }
  .brand { font-size: 1.125rem; }
  .brand img { width: 26px; height: 26px; }
  .hero { padding-top: 112px; }
  .hero-eyebrow { margin-bottom: 20px; letter-spacing: .08em; }
  .hero h1 { line-height: 1.3; }
  .hero-description { margin-top: 20px; font-size: var(--fs-ui); line-height: 1.95; }
  .hero-actions { margin-top: 28px; gap: 14px 22px; }
  .hero-actions .button .icon:last-child { display: none; }
  .hero-meta { margin-top: 24px; }
  .hero-visual { aspect-ratio: 1 / 1.02; }
  .hero-character { width: 124%; translate: -50% -48%; }
  .hero-message { right: 14px; bottom: 13%; padding: 11px 16px 11px 11px; gap: 11px; }
  .hero-message > img { width: 32px; height: 32px; padding: 7px; }
  .visual-caption { display: none; }
  .hero-foot .mono { display: none; }
  .hero-foot { justify-content: center; }

  .about-note { padding: 18px 18px 18px 50px; }
  .about-note::before { left: 14px; }
  .emergence-coordinate { display: none; }
  .emergence-chip { top: 2%; padding: 7px 13px; }
  .phases { grid-template-columns: 1fr; gap: 26px; padding: 0 0 0 30px; }
  .phases::before { top: 6px; bottom: 6px; left: 4px; right: auto; width: 1px; height: auto; background: linear-gradient(180deg, rgba(158, 210, 210, .1), rgba(158, 210, 210, .4) 60%, rgba(196, 238, 234, .85)); }
  .phase::before { top: 3px; left: -30px; }

  .section-heading { flex-direction: column; align-items: flex-start; }
  .section-lead { text-align: left; }
  .bento { grid-template-columns: 1fr; }
  .feature-live { display: flex; }
  .feature-live .live-stage { min-height: 300px; margin: 8px -10px 0; }
  .feature-compact, .feature-compact:last-child { grid-column: auto; min-height: 0; }
  .feature-footnote { text-align: left; }

  .download-grid { grid-template-columns: 1fr; }
  .desktop-scene { grid-template-columns: minmax(0, 30fr) minmax(0, 70fr); grid-template-rows: auto auto minmax(0, 1fr) auto; min-height: 470px; padding: 18px 12px 10px 16px; }
  .desktop-note { grid-area: 1 / 1 / 2 / 3; padding: 0; }
  .desktop-note p { font-size: var(--fs-ui); }
  .scene-clock.mono { grid-area: 1 / 2; align-self: start; font-size: 1.375rem; }
  .preview-pet { left: -3%; bottom: 62px; height: 44%; }
  .preview-chat { grid-area: 2 / 2 / 4 / 3; margin-top: 14px; padding: 12px; border-radius: 16px; }
  .desktop-dock { grid-area: 4 / 1 / 5 / 3; margin-top: 14px; }
  .chat-top { margin-bottom: 10px; }
  .nori-bubble { padding: 10px 12px; font-size: var(--fs-small); }
  .user-bubble { max-width: 100%; padding: 7px 11px; font-size: var(--fs-label); }
  .window-footer { flex-direction: column; gap: 2px; }
  .preview-controls { display: block; }
  .preview-lead { margin-bottom: 18px; }

  .download-notes { padding: 18px; }
  .steps { grid-template-columns: 1fr; gap: 20px; }
  .steps::before { top: 22px; bottom: 22px; left: 22px; right: auto; width: 1px; height: auto; background: linear-gradient(180deg, rgba(158, 210, 210, .5), rgba(158, 210, 210, .12)); }
  .steps li { grid-template-columns: auto 1fr; align-items: center; gap: 16px; }

  .faq-list summary { padding-block: 19px; font-size: var(--fs-body); }
  .faq-list details > p { padding-right: 8px; }
  .closing-line { letter-spacing: .14em; text-indent: .14em; }
  .back-to-top { right: 14px; bottom: max(14px, env(safe-area-inset-bottom)); width: 44px; height: 44px; border-radius: 14px; }
  .back-to-top > span { display: none; }
  .footer-bottom { flex-direction: column; }
  .footer-bottom > .mono { text-align: left; }
}
@media (max-width: 380px) {
  .hero-eyebrow { font-size: var(--fs-label); padding-inline: 12px; }
  .hero-description { font-size: .875rem; letter-spacing: 0; }
  .hero-meta { gap: 6px 10px; }
  .hero-meta li { gap: 6px; }
  .hero-meta .icon { display: none; }
  .hero-actions .button { width: 100%; }
  .scene-clock.mono { display: none; }
  .desktop-note p { letter-spacing: .04em; }
  /* Give the reply bubble room for a full clause per line. */
  .desktop-scene { grid-template-columns: minmax(0, 27fr) minmax(0, 73fr); padding-inline: 12px 10px; }
  .preview-chat { padding: 10px; }
  .nori-bubble { padding: 9px 11px; }
  .emergence-label { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after, .faq-list details::details-content,
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; transition: none !important; }
  .ribbon-track { width: auto; }
  .ribbon-list { flex-shrink: 1; flex-wrap: wrap; justify-content: center; margin-inline: auto; }
  .ribbon-list[aria-hidden="true"] { display: none; }
}
