/* NucleoOS website. Identity = the boot splash: a living atom in deep space (the same splash the
   Cardputer and the web shell show when they start). Physical details come from the device itself:
   controls are its keycaps (fn orange = the atom's nucleus), and the hardware section sits on its
   light-gray plastic. Tokens first, then components top to bottom of the page. */

@font-face { font-family: "Big Shoulders"; src: url("./fonts/big-shoulders-700.woff") format("woff"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Big Shoulders"; src: url("./fonts/big-shoulders-400.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Work Sans"; src: url("./fonts/work-sans-400.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Work Sans"; src: url("./fonts/work-sans-400i.woff") format("woff"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Work Sans"; src: url("./fonts/work-sans-700.woff") format("woff"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Silkscreen"; src: url("./fonts/silkscreen-400.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Red Hat Mono"; src: url("./fonts/red-hat-mono-400.woff") format("woff"); font-weight: 400; font-display: swap; }

:root {
  /* deep space, straight from the splash gradient */
  --space: #05070f;
  --space-2: #0a1430;
  --panel: #0b1328;
  --panel-2: #101b37;
  --ink: #eaf2ff;
  --ink-2: #b6c2da;
  --ink-3: #8b98b3;
  --line: rgb(150 185 255 / .14);
  --orbit: #5aebff;
  --orbit-2: #36e0ff;
  --nuc: #ff7846;
  --nuc-2: #ffd282;
  --violet: #a08bff;
  --link: #86dcff;
  /* keycaps and the three function colors of the Cardputer keyboard */
  --key: #1b1d20;
  --key-2: #2b2e32;
  --legend: #f1f1ed;
  --fn: #ee6a2c;
  --on-fn: #16181b;
  --aa: #2a67cf;
  --opt: #1d9a66;
  /* the device's plastic, for the hardware sheet */
  --plastic: #d6d7d2;
  --plastic-2: #c8c9c3;
  --plastic-ink: #16181b;
  --plastic-ink-2: #3a3d42;
  --plastic-line: #b0b1ab;

  --display: "Big Shoulders", "Arial Narrow", sans-serif;
  --text: "Work Sans", system-ui, sans-serif;
  --pixel: "Silkscreen", ui-monospace, monospace;
  --mono: "Red Hat Mono", ui-monospace, monospace;
  --gutter: clamp(16px, 4vw, 44px);
  --wrap: min(1240px, 100% - 2 * var(--gutter));
  --bar-h: 60px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--bar-h) + 12px); -webkit-text-size-adjust: 100%; background: var(--space); }
body {
  margin: 0; background: var(--space); color: var(--ink);
  font: 400 1.0625rem/1.6 var(--text); font-kerning: normal;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip;
}
img, video, svg, canvas { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: .22em; }
a:hover { text-decoration-thickness: 2px; }
::selection { background: var(--orbit); color: #031018; }
:focus-visible { outline: 3px solid var(--orbit); outline-offset: 3px; border-radius: 6px; }
code { font: .92em/1 var(--mono); background: rgb(150 185 255 / .12); padding: .12em .38em; border-radius: 5px; }
html { scrollbar-color: #2a3a60 var(--space); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: var(--wrap); margin-inline: auto; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--key); color: var(--legend); padding: 10px 14px; border-radius: 8px; }
.skip:focus { top: 10px; }

.display {
  font: 700 clamp(2.5rem, 5.4vw, 4.8rem)/.93 var(--display);
  text-transform: uppercase; letter-spacing: .004em; margin: 0 0 .5em; text-wrap: balance;
}
.lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.5; color: var(--ink-2); max-width: 62ch; margin: 0 0 1.4em; text-wrap: pretty; }
section { position: relative; padding-block: clamp(80px, 11vw, 150px); }
h3 { font: 700 1.2rem/1.3 var(--text); margin: 0 0 .5em; }

/* ---- keycaps --------------------------------------------------------------------------------- */
.key {
  --k: #22252a; --kl: var(--legend);
  position: relative; display: inline-flex; align-items: center; gap: .6em;
  padding: .72em 1.05em .82em; border: 0; border-radius: 11px; cursor: pointer;
  background: linear-gradient(180deg, color-mix(in srgb, var(--k) 84%, #fff) 0%, var(--k) 42%);
  color: var(--kl); font: 700 1rem/1.1 var(--text); text-decoration: none; white-space: nowrap;
  box-shadow: inset 0 -3px 0 rgb(0 0 0 / .45), inset 0 1px 0 rgb(255 255 255 / .14),
    0 0 0 1px rgb(255 255 255 / .06), 0 10px 22px -10px rgb(0 0 0 / .8);
  transition: transform .12s var(--ease), box-shadow .12s var(--ease), filter .2s;
}
.key:hover { filter: brightness(1.12); text-decoration: none; }
.key:active { transform: translateY(2px); box-shadow: inset 0 -1px 0 rgb(0 0 0 / .45), 0 0 0 1px rgb(255 255 255 / .06); }
.key .legend { font: 400 .6rem/1 var(--pixel); text-transform: lowercase; opacity: .8; padding: .3em .4em; border-radius: 4px; background: rgb(0 0 0 / .16); }
.key-fn { --k: var(--fn); --kl: var(--on-fn); box-shadow: inset 0 -3px 0 rgb(0 0 0 / .3), inset 0 1px 0 rgb(255 255 255 / .3), 0 12px 30px -10px rgb(238 106 44 / .55); }
.key-lg { font-size: 1.05rem; padding: .95em 1.35em 1.05em; }
.key-sm { padding: .5em .72em .6em; border-radius: 9px; font-size: .9rem; }
.key-xs { padding: .4em .5em .48em; border-radius: 7px; font: 400 .62rem/1 var(--pixel); letter-spacing: .02em; }
.key-xs[aria-current="page"] { --k: var(--orbit); --kl: #031018; }
.ico { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ico-fill { fill: currentColor; stroke: none; }

/* ---- top bar --------------------------------------------------------------------------------- */
.bar { position: sticky; top: 0; z-index: 30; background: rgb(5 7 15 / .92); border-bottom: 1px solid var(--line); }
.bar-in { width: var(--wrap); margin-inline: auto; height: var(--bar-h); display: flex; align-items: center; gap: 22px; }
.mark { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 700 1.14rem/1 var(--text); letter-spacing: -.01em; }
.nav { display: flex; gap: 2px; margin-inline: auto 0; }
.nav a { color: var(--ink-2); text-decoration: none; font-size: .93rem; padding: 8px 10px; border-radius: 8px; }
.nav a:hover { color: var(--ink); background: rgb(150 185 255 / .08); }
.bar-tools { display: flex; align-items: center; gap: 12px; }
.langs { display: flex; gap: 5px; }
.devsw { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; }
.devsw-opt { font: 400 .6rem/1 var(--pixel); color: var(--ink-3); padding: 7px 9px; border-radius: 999px; transition: background .25s, color .25s; }
:root[data-device="original"] .devsw-opt[data-opt="original"], :root:not([data-device="original"]) .devsw-opt[data-opt="adv"] { background: var(--plastic); color: var(--plastic-ink); }
.bar-cta { font-size: .85rem; }

/* ---- ignition: the splash, then the Cardputer it was running on ------------------------------ */
.ignite { padding: 0; }
.ignite-stage { position: relative; overflow: hidden; padding: clamp(40px, 9vw, 96px) 0 clamp(56px, 8vw, 100px); isolation: isolate; }
.cosmos { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; background: radial-gradient(circle at 50% 30%, #0a1430 0%, #05070f 55%, #02030a 100%); }
.splash { position: relative; display: grid; justify-items: center; gap: 6px; text-align: center; padding-top: clamp(190px, 34vw, 330px); margin-bottom: clamp(40px, 7vw, 80px); pointer-events: none; }
.splash-word { font: 700 clamp(2.4rem, 7vw, 5.4rem)/1 var(--text); letter-spacing: -.015em; color: #eaf6ff; text-shadow: 0 0 28px rgb(60 224 255 / .75), 0 0 2px rgb(60 224 255 / .5); }
.splash-sub { font: 400 clamp(.72rem, 1.1vw, .9rem)/1 var(--text); letter-spacing: .5em; text-transform: lowercase; color: #96b4d2; margin-right: -.5em; }
.splash-line { display: block; width: min(280px, 50vw); height: 3px; margin-top: 16px; border-radius: 3px; background: rgb(255 255 255 / .07); position: relative; overflow: hidden; }
.splash-line::after { content: ""; position: absolute; inset: -2px auto -2px 0; width: 36%; background: linear-gradient(90deg, transparent, #78f0ff, transparent); animation: sweep 1.8s linear infinite; }
@keyframes sweep { from { translate: -100% 0; } to { translate: 280% 0; } }
.splash-tag { margin-top: 18px; color: var(--ink-2); font-size: clamp(1rem, 1.4vw, 1.15rem); }
.cue { display: none; }

.hero { width: var(--wrap); margin-inline: auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(28px, 4vw, 64px); align-items: center; }
.hero h1 { font-size: clamp(2.6rem, 4.3vw, 4.7rem); line-height: .92; margin-bottom: .36em; color: #fff; hyphens: manual; overflow-wrap: anywhere; }
.ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 26px; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; margin: 0; color: var(--ink-3); font-size: .9rem; }
.release { color: var(--ink); text-decoration: none; font: 400 .68rem/1 var(--pixel); text-transform: uppercase; }
.release b { font: 400 .7rem/1 var(--pixel); background: var(--opt); color: #07140e; padding: .3em .45em; border-radius: 5px; margin-left: .3em; }

.device { margin: 0; }
.rig { position: relative; transform-origin: 0 0; filter: drop-shadow(0 30px 40px rgb(0 0 0 / .55)) drop-shadow(0 0 60px rgb(54 224 255 / .08)); }
.rig .dev { width: 100%; }
.device .dev-original { display: none; }
:root[data-device="original"] .device .dev-original { display: block; }
:root[data-device="original"] .device .dev-adv { display: none; }
/* the screen box, measured in the product photos (make-assets.py prints these) */
.rig .screen { position: absolute; left: 25.19%; top: 6.75%; width: 29.15%; height: 25.48%; overflow: hidden; box-shadow: 0 0 0 1.5px #07080a; border-radius: 1px; }
.screen .scene {
  position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated;
  opacity: 0; transform: translateX(6%); transition: opacity .3s var(--ease), transform .45s var(--ease);
}
.device:not(.is-booted) .screen .scene { opacity: 0 !important; }
.screen .scene[aria-current="true"] { opacity: 1; transform: none; }
.screen .scene.is-leaving { opacity: 0; transform: translateX(-6%); }
.screen::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background: linear-gradient(115deg, rgb(255 255 255 / .08) 0%, rgb(255 255 255 / 0) 38%), radial-gradient(120% 90% at 50% 50%, transparent 70%, rgb(0 0 0 / .3));
}
.keyrow { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 22px; }
.dots { display: flex; gap: 7px; list-style: none; padding: 0; margin: 0; }
.dots li { width: 7px; height: 7px; border-radius: 2px; background: #2a3553; transition: background .2s, width .3s var(--ease); }
.dots li.on { width: 20px; background: var(--fn); }
.device figcaption { display: grid; justify-items: center; gap: 4px; margin-top: 14px; text-align: center; }
.scene-label { font: 400 .74rem/1.3 var(--pixel); color: var(--ink); }
.hint { font-size: .86rem; color: var(--ink-3); }
.credit { font-size: .72rem; color: var(--ink-3); opacity: .8; }

/* pinned mode (desktop, motion allowed): set by site.js, which drives --p, --word and --copy */
.ignite.is-pinned { height: 250vh; }
.ignite.is-pinned .ignite-stage { position: sticky; top: 0; height: 100vh; height: 100svh; padding: 0; }
.ignite.is-pinned .splash { position: absolute; left: 0; right: 0; top: calc(var(--splash-y, 62) * 1%); padding: 0; margin: 0; opacity: var(--word, 1); transform: translateY(calc((1 - var(--word, 1)) * -30px)); }
.ignite.is-pinned .cue { display: flex; flex-direction: column; align-items: center; gap: 12px; position: absolute; left: 50%; bottom: calc(var(--bar-h) + clamp(14px, 3.5vh, 36px)); translate: -50% 0; margin: 0; padding: 6px 10px; border: 0; background: none; cursor: pointer; font: 400 .82rem/1 var(--pixel); letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; color: var(--ink); text-shadow: 0 0 14px rgb(90 235 255 / .5); opacity: var(--cue, 1); z-index: 3; pointer-events: var(--cue-pe, auto); }
.ignite.is-pinned.is-lit .cue { animation: cue-in 1s var(--ease) 1.1s backwards; }
.ignite.is-pinned:not(.is-lit) .cue { opacity: 0; }
.ignite.is-pinned .cue-key { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; color: var(--orbit); background: linear-gradient(180deg, rgb(150 185 255 / .16), rgb(150 185 255 / .05)); box-shadow: inset 0 -3px 0 rgb(0 0 0 / .35), inset 0 1px 0 rgb(255 255 255 / .12), 0 0 0 1px rgb(90 235 255 / .35); animation: cue-glow 2.4s var(--ease) infinite; }
.ignite.is-pinned .cue-key .ico { width: 26px; height: 26px; animation: nudge 1.6s var(--ease) infinite; }
.ignite.is-pinned .cue:hover .cue-key, .ignite.is-pinned .cue:focus-visible .cue-key { filter: brightness(1.3); }
@keyframes nudge { 50% { translate: 0 6px; } }
@keyframes cue-in { from { opacity: 0; translate: -50% 14px; } }
@keyframes cue-glow { 50% { box-shadow: inset 0 -3px 0 rgb(0 0 0 / .35), inset 0 1px 0 rgb(255 255 255 / .12), 0 0 0 1px rgb(90 235 255 / .6), 0 0 28px 4px rgb(90 235 255 / .3); } }
@media (prefers-reduced-motion: reduce) { .ignite.is-pinned .cue, .ignite.is-pinned .cue-key, .ignite.is-pinned .cue-key .ico { animation: none; } }
.ignite.is-pinned .hero { position: absolute; inset: var(--bar-h) 0 0; margin: auto; height: calc(100% - var(--bar-h)); }
.ignite.is-pinned .hero-copy, .ignite.is-pinned .device-ui { opacity: var(--copy, 0); transform: translateY(calc((1 - var(--copy, 0)) * 28px)); }
.ignite.is-pinned .hero-copy { pointer-events: var(--copy-pe, none); }
.rig.is-zoomed { filter: none; }

/* ---- two interfaces: the screen blooms into the desktop -------------------------------------- */
.two { padding-bottom: 0; background: linear-gradient(180deg, var(--space) 0%, #070c1c 100%); }
.two h2 { max-width: 17ch; }
.bloom-copy { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.bloom-step p { color: var(--ink-2); max-width: 46ch; margin: 0; }
.bloom-step h3 { font: 400 .78rem/1.3 var(--pixel); text-transform: uppercase; color: var(--orbit); }
.bloom-view { position: relative; display: grid; grid-template-columns: .42fr 1fr; gap: 28px; align-items: center; width: var(--wrap); margin: 36px auto 0; }
.bloom-native { background: #000; border-radius: 10px; padding: 10px; box-shadow: 0 0 0 6px var(--key), 0 0 0 7px rgb(255 255 255 / .08), 0 24px 50px -18px rgb(0 0 0 / .8); }
.bloom-native img { width: 100%; image-rendering: pixelated; }
.browser { border-radius: 12px; overflow: hidden; background: #0b1220; box-shadow: 0 0 0 1px rgb(150 185 255 / .16), 0 40px 80px -30px rgb(0 0 0 / .9), 0 0 120px -30px rgb(54 224 255 / .18); }
.browser-bar { display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; background: #151a26; }
.browser-bar span { width: 10px; height: 10px; border-radius: 50%; background: #343b4b; }
.browser-bar b { flex: 1; margin-left: 10px; height: 22px; display: flex; align-items: center; padding: 0 12px; border-radius: 6px; background: #0b0e15; color: #aeb6c4; font: 400 .74rem/1 var(--mono); max-width: 360px; }
.browser video, .browser img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: #0b1220; }

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) and (min-width: 900px) {
    .bloom { height: 260vh; view-timeline: --bloom block; }
    .bloom-stage { position: sticky; top: var(--bar-h); height: calc(100vh - var(--bar-h)); display: grid; grid-template-rows: auto 1fr; padding-top: 20px; }
    .bloom-copy { position: relative; min-height: 7.5em; }
    .bloom-step { grid-area: 1 / 1 / 2 / 3; animation: step linear both; animation-timeline: --bloom; }
    .bloom-step-native { animation-name: step-out; animation-range: contain 18% contain 32%; }
    .bloom-step-web { opacity: 0; animation-name: step-in; animation-range: contain 30% contain 44%; }
    .bloom-view { display: block; margin: 0 auto; height: 100%; }
    .bloom-native, .bloom-web { position: absolute; left: 50%; top: 50%; translate: -50% -50%; }
    .bloom-native { width: min(360px, 34vw); animation: native linear both; animation-timeline: --bloom; animation-range: contain 8% contain 40%; }
    .bloom-web { width: min(1100px, 88vw, calc((100vh - var(--bar-h) - 270px) * 1.62)); top: 54%; animation: web linear both; animation-timeline: --bloom; animation-range: contain 22% contain 62%; }
    @keyframes native { from { scale: 1; opacity: 1; } 70% { opacity: 1; } to { scale: 4.2; opacity: 0; filter: blur(2px); } }
    @keyframes web { from { scale: .3; opacity: 0; } 30% { opacity: 1; } to { scale: 1; opacity: 1; } }
    @keyframes step-out { to { opacity: 0; translate: 0 -12px; } }
    @keyframes step-in { from { opacity: 0; translate: 0 12px; } to { opacity: 1; translate: 0 0; } }
  }
}
.rule { font: 700 clamp(1.5rem, 2.8vw, 2.3rem)/1.15 var(--display); text-transform: uppercase; max-width: 30ch; margin: clamp(56px, 8vw, 100px) 0 0; padding-bottom: clamp(80px, 11vw, 150px); text-wrap: balance; color: #fff; }
.rule::first-line { color: var(--orbit); }

/* ---- ANIMA ----------------------------------------------------------------------------------- */
.anima { background: radial-gradient(90% 60% at 80% 0%, rgb(120 55 185 / .18), transparent 60%), #04050b; }
.anima-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.anima h2 { color: #fff; }
.anima h2::first-line { color: var(--violet); }
.transcript { margin: 0; border-radius: 16px; overflow: hidden; background: #0a0d18; box-shadow: 0 0 0 1px rgb(160 139 255 / .18), 0 40px 80px -40px rgb(120 55 185 / .5); }
.term-bar { display: flex; align-items: center; gap: 9px; padding: 12px 18px; background: #111526; border-bottom: 1px solid rgb(255 255 255 / .06); }
.term-bar b { font: 700 .9rem/1 var(--text); }
.term-bar span { margin-left: auto; font: 400 .6rem/1 var(--pixel); color: var(--ink-3); text-transform: uppercase; }
.log { list-style: none; margin: 0; padding: clamp(18px, 2.4vw, 26px); display: grid; gap: 18px; min-height: 9.5rem; align-content: start; }
.log li { display: grid; gap: 5px; padding-bottom: 18px; border-bottom: 1px solid rgb(255 255 255 / .06); }
.log li:last-child { border-bottom: 0; padding-bottom: 0; }
.log p { margin: 0; font: 400 1rem/1.45 var(--mono); }
.log .who { display: inline-block; min-width: 6.4em; font: 400 .6rem/1 var(--pixel); text-transform: uppercase; color: var(--ink-3); vertical-align: .18em; }
.log .q { color: var(--ink-2); }
.log .a { color: #fff; }
.log .a .who { color: var(--violet); }
.log .t { font: 400 .62rem/1.2 var(--pixel); color: #8fe07a; margin-left: 7.7em; }
.log li[data-i="4"] .t { color: #f3c969; }
.log.is-live li { display: none; }
.log.is-live li.on { display: grid; animation: rise .45s var(--ease) both; }
.log .caret::after { content: ""; display: inline-block; width: .55em; height: 1.05em; margin-left: 2px; vertical-align: -.15em; background: var(--violet); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.meter { display: inline-block; width: 72px; height: 5px; margin-left: 10px; vertical-align: .1em; border-radius: 3px; background: rgb(255 255 255 / .1); overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; background: currentColor; transition: width .8s var(--ease); }
.chips { padding: 0 clamp(18px, 2.4vw, 26px) 20px; }
.chips-h { margin: 0 0 10px; font: 400 .66rem/1 var(--pixel); text-transform: uppercase; color: var(--violet); }
.chips-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: 400 .88rem/1.2 var(--mono); color: var(--ink); background: #151a2e; border: 1px solid rgb(160 139 255 / .25); border-radius: 999px; padding: 8px 13px; cursor: pointer; transition: background .2s, border-color .2s, transform .15s var(--ease); }
.chip:hover { border-color: var(--violet); background: #1c2140; }
.chip[aria-pressed="true"] { background: var(--violet); color: #0b0717; border-color: var(--violet); }
.chip:active { transform: scale(.97); }
.chips-hint { margin: 12px 0 0; font-size: .82rem; color: var(--ink-3); }
.transcript figcaption { padding: 0 clamp(18px, 2.4vw, 26px) 20px; font-size: .82rem; color: var(--ink-3); }
.anima-more { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(28px, 5vw, 72px); margin-top: clamp(64px, 9vw, 110px); }
.anima h3 { color: #fff; }
.cascade ol { list-style: none; padding: 0; margin: 18px 0 0; }
.cascade li { display: grid; grid-template-columns: 4.2rem 1fr; gap: 16px; padding: 16px 0; border-top: 1px solid rgb(255 255 255 / .09); }
.tier { font: 700 2.4rem/1 var(--display); color: var(--violet); }
.cascade li:first-child .tier { color: #8fe07a; }
.cascade h4 { margin: 0 0 4px; font: 700 1rem/1.3 var(--text); color: #fff; }
.cascade p, .runtimes p { margin: 0; color: var(--ink-2); font-size: .98rem; }
.runtimes ul { list-style: none; padding: 0; margin: 22px 0; display: grid; gap: 10px; }
.runtimes li { display: grid; grid-template-columns: 8.4rem 1fr; gap: 14px; align-items: baseline; padding: 14px 16px; border-radius: 10px; background: #0d1122; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .05); }
.runtimes li b { font: 400 .72rem/1.2 var(--pixel); color: var(--orbit); text-transform: uppercase; }
.runtimes .online { margin-top: 22px; padding-top: 18px; border-top: 1px solid rgb(255 255 255 / .09); }

/* ---- memory map ------------------------------------------------------------------------------ */
.memory { background: linear-gradient(180deg, #04050b, var(--space)); }
.memory h2 { color: #fff; }
.membar { display: flex; height: clamp(60px, 7vw, 78px); border-radius: 12px; overflow: hidden; margin-top: 18px; box-shadow: 0 0 0 1px rgb(150 185 255 / .14), 0 24px 50px -24px rgb(0 0 0 / .9); }
.membar > div { flex: var(--kb) 1 0; min-width: 0; display: flex; align-items: center; padding: 0 14px; transition: flex-grow .8s var(--ease); position: relative; }
/* starting plan (profile A); site.js re-plans it. Here, not in style="": the CSP allows no inline styles */
.seg-fixed { --kb: 186; } .seg-profile { --kb: 150; } .seg-free { --kb: 176; }
.membar span { font: 400 .68rem/1.2 var(--pixel); white-space: nowrap; }
.seg-fixed { background: repeating-linear-gradient(135deg, #1b2236 0 10px, #222b43 10px 20px); color: var(--ink-2); }
.seg-profile { background: linear-gradient(180deg, #ff8b52, var(--fn)); color: var(--on-fn); overflow: visible !important; box-shadow: 0 0 40px rgb(238 106 44 / .45); z-index: 1; }
.seg-profile span { position: absolute; left: 10px; top: 50%; translate: 0 -50%; }
.seg-free { background: linear-gradient(180deg, #25c283, var(--opt)); color: #04140d; justify-content: flex-end; }
.seg-free span { font-size: .78rem; }
.scale { display: flex; justify-content: space-between; font: 400 .74rem/1 var(--mono); color: var(--ink-3); margin-top: 8px; }
.mem-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(24px, 4vw, 56px); margin-top: 44px; }
.parts { list-style: none; padding: 0; margin: 0; }
.parts li { display: grid; grid-template-columns: 5.2rem 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); color: var(--ink-2); }
.parts b { font: 400 .95rem/1.4 var(--mono); color: var(--ink); }
.profiles { display: grid; gap: 10px; }
.profile {
  display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; text-align: left; cursor: pointer;
  padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font: inherit;
  transition: border-color .2s, background .2s, box-shadow .3s;
}
.profile:hover { border-color: rgb(150 185 255 / .35); }
.profile[aria-checked="true"] { border-color: var(--fn); background: linear-gradient(90deg, rgb(238 106 44 / .16), var(--panel) 70%); box-shadow: 0 0 0 1px rgb(238 106 44 / .25); }
.profile[aria-checked="true"] .key { --k: var(--fn); --kl: var(--on-fn); }
.profile-txt { display: grid; gap: 2px; }
.profile-txt span { color: var(--ink-2); font-size: .95rem; }
.tricks { max-width: 70ch; margin: 40px 0 8px; font-size: 1.1rem; }
.source { font-size: .85rem; color: var(--ink-3); margin: 0; }

/* ---- apps ------------------------------------------------------------------------------------ */
.apps { padding-bottom: clamp(72px, 10vw, 130px); }
.apps h2 { color: #fff; }
.gallery { overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: max(var(--gutter), calc((100vw - 1240px) / 2)); padding: 18px 0 20px; overscroll-behavior-x: contain; scrollbar-width: none; }
.gallery::-webkit-scrollbar { display: none; }
.gallery ul { list-style: none; margin: 0; display: grid; grid-auto-flow: column; grid-auto-columns: min(80vw, 780px); gap: clamp(16px, 2vw, 28px); padding: 0 max(var(--gutter), calc((100vw - 1240px) / 2)); width: max-content; }
.gallery li { scroll-snap-align: start; }
.gallery figure { margin: 0; transition: transform .5s var(--ease), opacity .5s; }
.gallery figcaption { background: var(--space); color: var(--ink-2); padding: 14px 2px 0; font-size: .95rem; }
.gallery .browser { background: var(--space); box-shadow: none; }
.gallery .browser > img { border-radius: 0 0 12px 12px; box-shadow: 0 0 0 1px rgb(150 185 255 / .14); }
.gallery .browser-bar { border-radius: 12px 12px 0 0; }
.gallery-nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.gallery-hint { margin: 0; font: 400 .66rem/1 var(--pixel); color: var(--ink-3); text-transform: uppercase; }
.gallery-keys { display: flex; gap: 10px; }
.catalog { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 72px); margin-top: 64px; }
.catalog h3 { font: 700 clamp(1.5rem, 2.4vw, 2rem)/1 var(--display); text-transform: uppercase; padding-bottom: 14px; border-bottom: 2px solid var(--orbit); color: #fff; }
.catalog dl { margin: 0; }
.catalog dt { font-weight: 700; margin-top: 18px; }
.catalog dd { margin: 4px 0 0; color: var(--ink-2); }

/* ---- hardware: the device's own plastic ------------------------------------------------------- */
.hardware { background: var(--plastic); color: var(--plastic-ink); }
.hardware ::selection { background: var(--fn); color: var(--on-fn); }
.hardware .lede { color: var(--plastic-ink-2); }
.hardware a { color: #1a56b8; }
.hw-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 56px); align-items: end; }
.pair { margin-top: 40px; margin-bottom: 40px; display: grid; grid-template-columns: 1fr 1.05fr; gap: 24px 36px; align-items: end; }
.pair-item { display: grid; gap: 14px; justify-items: center; }
.pair .rig { filter: drop-shadow(0 26px 30px rgb(22 24 28 / .35)) drop-shadow(0 6px 8px rgb(22 24 28 / .2)); transition: transform .6s var(--ease); }
.pair .rig:hover { transform: translateY(-6px) rotate(-.6deg); }
.pair-item b { font: 400 .72rem/1 var(--pixel); text-transform: uppercase; }
.rig-still .screen .scene { opacity: 1 !important; transform: none; }
.rig-still .screen { background: #000; }
.pair figcaption { grid-column: 1 / -1; color: var(--plastic-ink-2); font-size: .86rem; text-align: center; }
.spec { width: 100%; border-collapse: collapse; }
.spec th, .spec td { text-align: left; vertical-align: baseline; padding: 13px 0; border-top: 1px solid var(--plastic-line); }
.spec th { width: 30%; padding-right: 16px; font: 400 .68rem/1.4 var(--pixel); text-transform: uppercase; color: var(--plastic-ink-2); }
.p4 { margin-top: 40px; color: var(--plastic-ink-2); }

/* ---- install --------------------------------------------------------------------------------- */
.install { background: radial-gradient(70% 50% at 50% 0%, rgb(238 106 44 / .1), transparent 70%), var(--space); }
.install h2 { color: #fff; }
.needs { list-style: none; padding: 0; margin: 0 0 44px; display: flex; flex-wrap: wrap; gap: 10px 26px; }
.needs li { display: flex; align-items: center; gap: 9px; font-weight: 700; }
.ico-check { color: #25c283; width: 1.3em; height: 1.3em; stroke-width: 2.6; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 40px); counter-reset: s; }
.steps > li { display: grid; grid-template-rows: auto 1fr; gap: 12px; padding: 24px; border-radius: 16px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); }
.step-n { font: 700 4.6rem/.8 var(--display); color: var(--fn); text-shadow: 0 0 30px rgb(238 106 44 / .45); }
.steps > li > div { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.steps p { color: var(--ink-2); margin: 0 0 18px; flex: 1; }
.steps .key { white-space: normal; text-align: left; }
.updates { margin-top: 56px; display: grid; grid-template-columns: auto 1fr auto; gap: 8px 28px; align-items: baseline; padding: 24px; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--line); }
.updates h3 { margin: 0; font: 400 .78rem/1.3 var(--pixel); text-transform: uppercase; color: var(--orbit); }
.updates p { margin: 0; color: var(--ink-2); max-width: 78ch; }

/* ---- docs ------------------------------------------------------------------------------------ */
.docs { background: #070b18; }
.docs h2 { color: #fff; }
.doclinks { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: clamp(28px, 5vw, 64px); }
.doclinks a { display: grid; grid-template-columns: 1fr auto; column-gap: 16px; padding: 20px 4px; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: background .2s, padding .3s var(--ease); }
.doclinks a:hover { background: rgb(150 185 255 / .06); padding-inline: 12px; }
.doclinks b { font-size: 1.1rem; }
.doclinks span { grid-row: 2; color: var(--ink-2); font-size: .98rem; }
.doclinks .ico { grid-row: 1 / 3; grid-column: 2; align-self: center; color: var(--orbit); width: 1.4em; height: 1.4em; transition: transform .3s var(--ease); }
.doclinks a:hover .ico { transform: translate(3px, -3px); }

/* ---- license --------------------------------------------------------------------------------- */
.lic-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(28px, 5vw, 72px); align-items: start; }
.license h2 { color: #fff; }
.lic-grid p { color: var(--ink-2); max-width: 64ch; }
.responsible { padding: 26px; border-radius: 14px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); }
.responsible h3 { font: 400 .78rem/1.3 var(--pixel); text-transform: uppercase; color: #f3c969; }

/* ---- footer ---------------------------------------------------------------------------------- */
.foot { background: #020309; color: var(--ink-2); padding: 34px 0; border-top: 1px solid var(--line); }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px 28px; align-items: center; }
.foot p { margin: 0; }
.foot-mark { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); }
.foot-mark span { font: 400 .66rem/1 var(--pixel); opacity: .8; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot a { color: var(--ink-2); }
.foot a:hover { color: var(--ink); }

/* ---- scroll reveals (site.js adds .reveal; content stays visible without it) ------------------ */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---- responsive ------------------------------------------------------------------------------ */
@media (max-width: 1180px) { .nav { display: none; } .bar-tools { margin-left: auto; } }
@media (max-width: 980px) {
  .hero, .anima-grid, .anima-more, .mem-grid, .lic-grid, .catalog, .hw-head, .pair { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .updates { grid-template-columns: 1fr; }
}
@media (max-width: 899px) {
  .bloom-copy { grid-template-columns: 1fr; gap: 18px; }
  .bloom-view { grid-template-columns: 1fr; gap: 20px; }
  .bloom-native { max-width: 360px; }
}
@media (max-width: 640px) {
  :root { --bar-h: 56px; }
  .mark span, .bar-cta { display: none; }
  .langs { gap: 3px; }
  .key-xs { padding: .38em .42em .46em; }
  .doclinks { grid-template-columns: 1fr; }
  .membar > div { padding: 0 8px; }
  .seg-fixed span { display: none; }
  .runtimes li { grid-template-columns: 1fr; gap: 4px; }
  .log .t { margin-left: 0; }
  .log .who { display: block; margin-bottom: 3px; }
  .cascade li { grid-template-columns: 3.2rem 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .reveal { opacity: 1; transform: none; }
}

/* the splash wordmark lights up the way the boot splash does: word, then subtitle, sweep and tagline */
.splash > * { transition: opacity .8s var(--ease), transform .8s var(--ease); }
.ignite:not(.is-lit) .splash > * { opacity: 0; transform: translateY(10px); }
.splash > :nth-child(2) { transition-delay: .12s; }
.splash > :nth-child(3) { transition-delay: .24s; }
.splash > :nth-child(4) { transition-delay: .36s; }

/* ---- memory as 512 cells, one kilobyte each (the cover of the book) --------------------------- */
.cells { display: none; grid-template-columns: repeat(32, 1fr); gap: clamp(2px, .3vw, 3px); margin-top: 22px; max-width: 880px; }
.memory.has-cells .cells { display: grid; }
.memory.has-cells .membar, .memory.has-cells .scale { display: none; }
.cell { aspect-ratio: 1; border-radius: 2px; background: #1a2238; transition: background .45s var(--ease), box-shadow .45s var(--ease), transform .45s var(--ease); transition-delay: calc(var(--d) * 1ms); }
.cell.x { background: #1f2842; }
.cell.p { background: var(--fn); box-shadow: 0 0 10px rgb(238 106 44 / .35); }
.cell.f { background: #d4a72c; box-shadow: 0 0 10px rgb(212 167 44 / .3); }
.cell.bump { transform: scale(.6); }
.cells-legend { display: none; list-style: none; padding: 0; margin: 14px 0 0; max-width: 880px; flex-wrap: wrap; gap: 8px 26px; font: 400 .66rem/1.3 var(--pixel); color: var(--ink-2); }
.memory.has-cells .cells-legend { display: flex; }
.cells-legend li { display: flex; align-items: center; gap: 8px; }
.cells-cap { margin-left: auto; color: var(--ink-3); }
.sw { width: 12px; height: 12px; border-radius: 2px; display: inline-block; }
.sw-fixed { background: #1f2842; box-shadow: inset 0 0 0 1px rgb(150 185 255 / .25); }
.sw-prof { background: var(--fn); }
.sw-free { background: #d4a72c; }

/* ---- the book: in the colors of its cover --------------------------------------------------- */
.book { background: radial-gradient(80% 60% at 20% 30%, rgb(212 167 44 / .10), transparent 60%), #0a120e; }
.book ::selection { background: #d4a72c; color: #0a120e; }
.book-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.cover { position: relative; display: block; perspective: 1200px; border-radius: 4px 10px 10px 4px; transform-style: preserve-3d; }
.cover img { width: 100%; border-radius: 4px 10px 10px 4px; transform: rotateY(var(--ry, -14deg)) rotateX(var(--rx, 4deg)); transition: transform .6s var(--ease), box-shadow .6s var(--ease);
  box-shadow: -1px 0 0 #2a3a2f, 30px 40px 60px -20px rgb(0 0 0 / .85), 0 0 80px -20px rgb(212 167 44 / .25); }
.cover:hover img { box-shadow: -1px 0 0 #2a3a2f, 40px 50px 70px -20px rgb(0 0 0 / .9), 0 0 100px -10px rgb(212 167 44 / .35); }
.cover-glare { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; transform: rotateY(var(--ry, -14deg)) rotateX(var(--rx, 4deg)); transition: transform .6s var(--ease);
  background: radial-gradient(60% 45% at var(--gx, 30%) var(--gy, 20%), rgb(255 255 255 / .16), transparent 70%); mix-blend-mode: screen; }
.book h2 { color: #f1ead6; }
.book h2::first-line { color: #d4a72c; }
.book-by { margin: -.4em 0 1.4em; font: 400 .8rem/1 var(--pixel); letter-spacing: .12em; text-transform: uppercase; color: #d4a72c; }
.book .lede { color: #d9d3c1; }
.book-p { color: #b9b4a3; max-width: 62ch; }
.book-quote { margin: 30px 0; padding: 0; }
.book-quote p { margin: 0; font: 700 clamp(1.6rem, 3vw, 2.4rem)/1.1 var(--display); text-transform: uppercase; color: #d4a72c; text-wrap: balance; }
.key-gold { --k: #d4a72c; --kl: #0a120e; box-shadow: inset 0 -3px 0 rgb(0 0 0 / .3), inset 0 1px 0 rgb(255 255 255 / .35), 0 12px 30px -10px rgb(212 167 44 / .5); }
.book-formats { margin: 0; font-size: .86rem; color: #948f80; }
@media (max-width: 980px) { .book-grid { grid-template-columns: 1fr; } .cover { max-width: 340px; } }

/* ---- footer note and the legal page --------------------------------------------------------- */
.foot-note { flex-basis: 100%; font-size: .8rem; color: var(--ink-3); }
.lic-legal { margin-left: 18px; }
.legal { padding-block: clamp(48px, 7vw, 96px) clamp(72px, 10vw, 130px); }
.legal-grid { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.legal-toc { position: sticky; top: calc(var(--bar-h) + 28px); }
.legal-toc-h { margin: 0 0 12px; font: 400 .66rem/1 var(--pixel); text-transform: uppercase; color: var(--orbit); }
.legal-toc ol { margin: 0; padding: 0 0 0 1.3em; display: grid; gap: 8px; color: var(--ink-3); font-size: .92rem; }
.legal-toc a { color: var(--ink-2); text-decoration: none; }
.legal-toc a:hover { color: var(--ink); text-decoration: underline; }
.legal-body { max-width: 74ch; }
.legal-body h1 { font-size: clamp(2.6rem, 5vw, 4.2rem); color: #fff; margin-bottom: .3em; }
.legal-meta { margin: 0 0 1.6em; font: 400 .7rem/1 var(--pixel); text-transform: uppercase; color: var(--ink-3); }
.legal-sec { padding: 28px 0 8px; border-top: 1px solid var(--line); scroll-margin-top: calc(var(--bar-h) + 20px); }
.legal-sec h2 { margin: 0 0 12px; font: 700 clamp(1.4rem, 2.2vw, 1.8rem)/1.1 var(--display); text-transform: uppercase; color: #fff; }
.legal-sec p { color: var(--ink-2); margin: 0 0 1em; }
.legal-sec strong { color: var(--ink); }
.legal-prevail { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); font-size: .88rem; color: var(--ink-3); }
@media (max-width: 900px) { .legal-grid { grid-template-columns: 1fr; } .legal-toc { position: static; } }

/* ---- FAQ ------------------------------------------------------------------------------------- */
.faq { background: #070b18; padding-top: 0; }
.faq h2 { color: #fff; }
.faq-list { max-width: 900px; border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px 4px; cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary h3 { margin: 0; font: 700 1.08rem/1.35 var(--text); color: var(--ink); }
.faq-item summary .ico { color: var(--orbit); width: 1.3em; height: 1.3em; transition: transform .3s var(--ease); }
.faq-item[open] summary .ico { transform: rotate(180deg); }
.faq-item summary:hover h3 { color: #fff; }
.faq-item p { margin: 0 4px 22px; color: var(--ink-2); max-width: 72ch; }

/* ---- 404 ------------------------------------------------------------------------------------- */
.notfound { padding-block: clamp(64px, 10vw, 140px); text-align: center; }
.nf-atom { margin: 0 auto 18px; width: 120px; filter: drop-shadow(0 0 30px rgb(54 224 255 / .35)); }
.notfound h1 { font-size: clamp(4rem, 12vw, 9rem); color: #fff; margin-bottom: .2em; }
.nf-list { list-style: none; padding: 0; margin: 0 auto; max-width: 620px; display: grid; gap: 14px; }
.nf-list li { color: var(--ink-2); }
.nf-list b { color: var(--ink); margin-right: .4em; }
