/* Huephony: a flight through white stardust. The page sits on a WebGL layer
   (space.js) that draws the nebula, the stars and the dust; everything here is
   the glass, type and scenes on top of it. */

@font-face {
  font-family: "Archivo"; font-style: normal; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
  src: url("assets/fonts/archivo-latin-wdth-normal.woff2") format("woff2");
}
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("assets/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("assets/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); }

/* A bulb's color and brightness (0-1), registered so they can ease. */
@property --c { syntax: "<color>"; inherits: true; initial-value: #2a2d3a; }
@property --a { syntax: "<number>"; inherits: true; initial-value: 1; }
@property --glow { syntax: "<color>"; inherits: true; initial-value: #ffa45c; }

:root {
  --void: #04050a;
  --text: #eef1fb;
  --text-2: rgba(226, 231, 250, 0.7);
  --text-3: rgba(226, 231, 250, 0.46);
  --line: rgba(255, 255, 255, 0.11);
  --line-2: rgba(255, 255, 255, 0.2);
  --glass: rgba(255, 255, 255, 0.045);
  --glass-2: rgba(255, 255, 255, 0.085);
  --glass-dark: rgba(8, 10, 18, 0.5);
  --ink: #0a0c14;
  --ink-2: rgba(10, 12, 20, 0.66);
  --ink-3: rgba(10, 12, 20, 0.44);
  --hue: linear-gradient(90deg, #ff3d8b, #ff8a3d 30%, #ffd23f 52%, #2ee6c5 75%, #3d7bff);
  --sans: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  --gutter: clamp(16px, 4vw, 44px);
  --wrap: 1180px;
  --radius: 22px;
  --vh: 100vh;
}
@supports (height: 100svh) { :root { --vh: 100svh; } }

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { background: var(--void); color-scheme: dark; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  min-height: 100vh;
  overflow-x: clip;
  background: var(--void);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; }
b, strong { font-weight: 600; color: var(--text); }
code {
  font-family: var(--mono); font-size: 0.86em;
  padding: 0.12em 0.4em; border-radius: 6px;
  background: rgba(255, 255, 255, 0.07); border: 1px solid var(--line);
}
::selection { background: rgba(240, 244, 255, 0.9); color: #05060b; }
:focus-visible { outline: 2px solid #fff; outline-offset: 3px; border-radius: 6px; }

.sprite { position: absolute; }
.icon { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon .fill { fill: currentColor; stroke: none; }
.mono { font-family: var(--mono); }
.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }

.skip {
  position: fixed; left: 16px; top: -60px; z-index: 50;
  padding: 10px 16px; border-radius: 999px; background: #fff; color: #000; text-decoration: none;
}
.skip:focus { top: 16px; }

#space {
  position: fixed; inset: 0 0 auto 0; z-index: 0;
  display: block; width: 100%; height: 100vh; height: 100lvh;
}
main, .footer { position: relative; z-index: 1; }
main { overflow-x: clip; } /* cards tilt in from off to the side; that mustn't widen the page */

/* ---- type ---- */

.label {
  display: flex; align-items: center; gap: 0.9em;
  font-size: 11.5px; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--text-3);
}
.label span { color: var(--text); }
h2 {
  font-size: clamp(2.1rem, 4.4vw, 3.9rem);
  font-weight: 300; font-stretch: 112%;
  line-height: 1.04; letter-spacing: -0.015em;
  text-wrap: balance;
}
h3 { font-size: 1.2rem; font-weight: 500; font-stretch: 108%; letter-spacing: -0.005em; line-height: 1.25; }
p { color: var(--text-2); text-wrap: pretty; }

/* ---- buttons ---- */

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6em;
  height: 50px; padding: 0 24px; border-radius: 999px;
  font-size: 15px; font-weight: 500; letter-spacing: 0.01em; text-decoration: none; white-space: nowrap;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), background-color 0.3s, border-color 0.3s;
}
.btn:hover { transform: translateY(-1px); }
.btn-sm { height: 38px; padding: 0 16px; font-size: 13.5px; }
.btn-light {
  background: #f4f6ff; color: #070810;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.6), 0 10px 40px -10px rgba(190, 205, 255, 0.55);
}
.btn-light:hover { box-shadow: 0 0 0 1px #fff, 0 12px 60px -6px rgba(200, 215, 255, 0.75); }
.btn-glass {
  background: rgba(255, 255, 255, 0.06); color: var(--text);
  border: 1px solid var(--line-2);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.btn-glass:hover { background: rgba(255, 255, 255, 0.11); border-color: rgba(255, 255, 255, 0.34); }
.btn-dark { background: var(--ink); color: #f4f6ff; box-shadow: 0 14px 40px -14px rgba(10, 12, 30, 0.6); }
.btn-dark:hover { box-shadow: 0 18px 50px -12px rgba(10, 12, 30, 0.7); }
.btn-outline { color: var(--ink); border: 1px solid rgba(10, 12, 20, 0.22); }
.btn-outline:hover { border-color: rgba(10, 12, 20, 0.5); }

/* ---- nav + hud ---- */

.nav {
  position: fixed; z-index: 20; top: 12px; left: 50%; translate: -50% 0;
  width: min(1120px, 100% - 24px);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: 58px; padding: 0 9px 0 18px; border-radius: 999px;
  border: 1px solid transparent;
  transition: background-color 0.5s, border-color 0.5s, -webkit-backdrop-filter 0.5s, backdrop-filter 0.5s;
}
.nav.is-scrolled .nav-inner {
  background: rgba(8, 10, 18, 0.42); border-color: var(--line);
  -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; font-stretch: 112%; letter-spacing: 0.01em; }
.brand img { border-radius: 8px; }
.nav-links { display: flex; gap: 4px; }
.nav-links a {
  padding: 8px 14px; border-radius: 999px;
  font-size: 14px; color: var(--text-2); text-decoration: none;
  transition: color 0.3s, background-color 0.3s;
}
.nav-links a:hover { color: var(--text); background: rgba(255, 255, 255, 0.07); }

.hud {
  position: fixed; z-index: 20; left: 26px; bottom: 22px;
  display: flex; align-items: center; gap: 12px;
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-3);
  transition: color 0.5s;
}
.hud-no { color: var(--text); }
.hud-bar { position: relative; width: 72px; height: 1px; background: var(--line-2); overflow: hidden; }
.hud-bar i { position: absolute; inset: 0; background: currentColor; color: var(--text); transform-origin: left; transform: scaleX(var(--g, 0)); }

/* The arrival: white cloud. */
html.is-white .nav.is-scrolled .nav-inner { background: rgba(255, 255, 255, 0.55); border-color: rgba(10, 12, 20, 0.1); }
html.is-white .nav .brand, html.is-white .nav-links a { color: var(--ink); }
html.is-white .nav-links a:hover { background: rgba(10, 12, 20, 0.06); }
html.is-white .nav .btn-light { background: var(--ink); color: #f4f6ff; box-shadow: none; }
html.hud-white .hud, html.hud-white .hud-no { color: var(--ink-3); }
html.hud-white .hud-bar { background: rgba(10, 12, 20, 0.15); }
html.hud-white .hud-bar i { color: var(--ink); }
html.is-white body { background: #f4f5f8; }
html.is-white .hud { opacity: 0; }

/* ---- pinned scenes ---- */

.pin { position: sticky; top: 0; height: var(--vh); overflow: hidden; }

/* 00 · Liftoff */
.hero { height: 165vh; }
.hero-pin {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 90px var(--gutter) 60px; text-align: center;
}
.hero-title {
  margin: 0.18em 0 0.12em;
  font-size: clamp(2.9rem, 11.2vw, 11.5rem);
  font-weight: 200; font-stretch: 125%;
  line-height: 0.92; letter-spacing: 0.05em; margin-right: -0.05em;
  text-transform: uppercase;
  color: #f6f8ff;
  text-shadow: 0 0 60px rgba(200, 215, 255, 0.35);
  transform: scale(calc(1 + var(--p, 0) * var(--p, 0) * 2.6));
  opacity: calc(1 - clamp(0, (var(--p, 0) - 0.28) / 0.42, 1));
  will-change: transform, opacity;
  animation: title-in 2.2s var(--ease) 0.15s backwards;
}
@keyframes title-in {
  from { opacity: 0; letter-spacing: 0.32em; filter: blur(18px); }
}
.hero-rest {
  display: grid; justify-items: center; gap: 26px;
  opacity: calc(1 - clamp(0, var(--p, 0) / 0.25, 1));
  transform: translateY(calc(var(--p, 0) * -90px));
  animation: rise 1.6s var(--ease) 0.7s backwards;
}
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
.hero-sub { font-size: clamp(1.15rem, 2.2vw, 1.6rem); font-weight: 300; font-stretch: 110%; color: var(--text); letter-spacing: 0.005em; }
.os-note { font-size: 14px; max-width: 30em; }
.hero .btn-row { justify-content: center; }

/* 01 · What it is */
.statement { height: 230vh; }
.statement-pin { display: grid; place-content: center; justify-items: center; gap: 30px; padding: 0 var(--gutter); text-align: center; }
.statement-text {
  max-width: 21em;
  font-size: clamp(1.75rem, 4.3vw, 3.75rem);
  font-weight: 300; font-stretch: 108%;
  line-height: 1.16; letter-spacing: -0.012em;
  color: var(--text);
  text-wrap: balance;
}
.statement-text span {
  opacity: clamp(0.14, calc(var(--p, 0) * var(--n, 30) * 1.3 - var(--i)), 1);
  transition: opacity 0.25s linear;
}

/* 02 · How it works: stardust */
.dust { height: 470vh; }
.caps {
  position: absolute; z-index: 2;
  left: max(var(--gutter), calc((100vw - var(--wrap)) / 2)); top: 50%;
  width: min(30rem, 38vw);
  display: grid; transform: translateY(-50%);
}
.cap {
  grid-area: 1 / 1; display: grid; gap: 20px; align-content: center;
  opacity: 0; transform: translateY(26px); filter: blur(8px);
  transition: opacity 0.7s var(--ease), transform 0.9s var(--ease), filter 0.7s var(--ease);
  pointer-events: none;
}
.cap h2 { font-size: clamp(2rem, 3.6vw, 3.3rem); }
.cap-note {
  padding: 14px 16px; border-radius: 14px;
  background: var(--glass); border: 1px solid var(--line);
  font-size: 15px; color: var(--text);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.dust-pin[data-step="1"] [data-cap="1"],
.dust-pin[data-step="2"] [data-cap="2"],
.dust-pin[data-step="3"] [data-cap="3"] { opacity: 1; transform: none; filter: none; pointer-events: auto; transition-delay: 0.15s; }

.dust-labels { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.dust-labels span {
  position: absolute; left: 0; top: 0;
  display: grid; justify-items: center; gap: 2px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; white-space: nowrap;
  color: var(--text-2);
  translate: -50% 0;
  will-change: transform, opacity;
}
.dust-labels span b { font-weight: 500; color: var(--text); }

.dust-picker {
  position: absolute; z-index: 2; bottom: max(26px, 4vh); left: 71%; translate: -50% 0;
  display: grid; justify-items: center; gap: 12px;
  font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3);
}
.dust-picker p { color: var(--text-3); white-space: nowrap; }
.dust-picker #dust-title { color: var(--text); }
.picker {
  display: flex; gap: 8px; padding: 7px; border-radius: 16px;
  background: rgba(10, 12, 20, 0.35); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.picker button {
  position: relative; padding: 0; border-radius: 9px; overflow: hidden;
  opacity: 0.55; transition: opacity 0.3s, transform 0.4s var(--ease);
}
.picker button img { width: 40px; height: 40px; }
.picker button:hover { opacity: 0.9; transform: translateY(-2px); }
.picker button[aria-pressed="true"] { opacity: 1; box-shadow: 0 0 0 2px #fff, 0 0 24px rgba(255, 255, 255, 0.35); }
.picker-lg { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); background: none; border: 0; padding: 0; -webkit-backdrop-filter: none; backdrop-filter: none; gap: 8px; }
.picker-lg button { border-radius: 10px; }
.picker-lg button img { width: 100%; height: auto; aspect-ratio: 1; }

.dust-fallback { display: none; }
html.no-gl .dust-fallback {
  position: absolute; left: 71%; top: 46%; translate: -50% -50%;
  display: grid; place-items: center;
  width: min(44vw, 58vh);
}
.dust-fallback > * { grid-area: 1 / 1; transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); opacity: 0; transform: scale(0.94); }
.fb-cover { width: 100%; border-radius: 6px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.8); }
.fb-swatches { display: flex; width: 100%; height: 72px; border-radius: 12px; overflow: hidden; }
.fb-swatches span { height: 100%; }
.fb-room { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px 40px; }
.fb-room i { width: 46px; height: 46px; border-radius: 50%; background: var(--c); box-shadow: 0 0 40px 6px var(--c); }
.dust-pin[data-step="1"] .fb-cover, .dust-pin[data-step="2"] .fb-swatches, .dust-pin[data-step="3"] .fb-room { opacity: 1; transform: none; }

/* 03 · The screen */
.screen { height: 330vh; }
.screen-pin {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(18px, 3.4vh, 40px);
  padding: 88px var(--gutter) 28px; text-align: center;
}
.screen-head { display: grid; justify-items: center; gap: 12px; max-width: 46rem; }
.screen-head h2 { font-size: clamp(1.8rem, 3.2vw, 2.9rem); }
.screen-head p:not(.label) { max-width: 36em; font-size: 15.5px; }
.slab-stage { perspective: 1500px; perspective-origin: 50% 20%; display: flex; justify-content: center; width: 100%; }
.slab {
  position: relative;
  width: min(86vw, calc((var(--vh) - 25rem) * 16 / 9), 1140px);
  aspect-ratio: 16 / 9;
  transform-style: preserve-3d;
  transform:
    translate3d(0, calc((1 - var(--t, 0)) * 26vh), calc((1 - var(--t, 0)) * -380px))
    rotateX(calc((1 - var(--t, 0)) * 68deg))
    rotateZ(calc((1 - var(--t, 0)) * -11deg));
  will-change: transform;
}
.slab-glow {
  position: absolute; inset: 6% 2%; border-radius: 40%;
  background: var(--glow);
  filter: blur(70px);
  opacity: calc(0.15 + var(--t, 0) * 0.45);
  transform: translateZ(-80px) scale(1.12);
  transition: --glow 1.2s;
}
.slab-glass {
  position: absolute; inset: 0; overflow: hidden;
  border-radius: clamp(8px, 1.2vw, 16px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: #0b0b10;
  box-shadow: 0 50px 120px -30px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.slab-glass img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1s var(--ease); }
.slab-glass img.is-active { opacity: 1; }
.slab-glass::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0) 32%, rgba(255, 255, 255, 0) 70%, rgba(255, 255, 255, 0.05));
}
.now-playing {
  max-width: 100%;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 12px;
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3);
  opacity: clamp(0, calc((var(--t, 0) - 0.7) * 4), 1);
}
.now-playing b { font-weight: 500; color: var(--text); }
.np-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--glow, #fff); box-shadow: 0 0 12px var(--glow, #fff); animation: beat 1.07s ease-in-out infinite; }
@keyframes beat { 50% { transform: scale(0.6); opacity: 0.6; } }

/* 04 · The glass ring */
.glass { height: 480vh; }
.glass-pin {
  --pane-w: min(62vw, 840px, calc((var(--vh) - 20rem) * 16 / 9));
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(18px, 3.5vh, 40px);
  padding: 92px 0 30px; text-align: center;
}
.glass-head { display: grid; justify-items: center; gap: 14px; padding: 0 var(--gutter); }
.ring-stage {
  position: relative; width: 100%;
  height: calc(var(--pane-w) * 9 / 16);
  perspective: calc(var(--pane-w) * 2.6);
}
.ring {
  position: absolute; left: 50%; top: 0;
  width: var(--pane-w); aspect-ratio: 16 / 9; margin-left: calc(var(--pane-w) / -2);
  transform-style: preserve-3d;
  transform: translateZ(calc(var(--pane-w) * -1.27)) rotateY(var(--turn, 0deg));
  will-change: transform;
}
.pane {
  position: absolute; inset: 0; overflow: hidden;
  border-radius: clamp(8px, 1vw, 14px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: #0b0b10;
  transform: rotateY(calc(var(--i) * 45deg)) translateZ(calc(var(--pane-w) * 1.27));
  -webkit-backface-visibility: hidden; backface-visibility: hidden;
  opacity: var(--o, 1);
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.85);
}
.pane img { width: 100%; height: 100%; object-fit: cover; filter: brightness(calc(0.45 + var(--o, 1) * 0.55)); }
.pane::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.14), transparent 30%, transparent 72%, rgba(255, 255, 255, 0.05));
}
.glass-foot { display: grid; justify-items: center; gap: 18px; padding: 0 var(--gutter); }
.glass-caption { display: grid; justify-items: center; gap: 4px; min-height: 3.6em; }
.glass-caption .mono { font-size: 11.5px; letter-spacing: 0.2em; color: var(--text-3); }
.glass-caption strong { font-size: clamp(1.5rem, 2.6vw, 2.2rem); font-weight: 300; font-stretch: 115%; letter-spacing: 0.01em; }
.glass-index { display: flex; gap: 6px; }
.glass-index button { width: 30px; height: 22px; display: grid; place-items: center; }
.glass-index button::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: var(--line-2); transition: background-color 0.3s, width 0.4s var(--ease); }
.glass-index button[aria-pressed="true"]::before { width: 26px; background: #fff; }

/* ---- regular blocks ---- */

.block { padding: clamp(90px, 16vh, 180px) 0; }
.block-head { display: grid; gap: 18px; max-width: 44rem; }
.block-head p:not(.label) { max-width: 34em; }

.reveal { opacity: 0; transform: translateY(30px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

.console, .card, .needs, .faq-list details {
  background: var(--glass);
  border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(18px) saturate(140%); backdrop-filter: blur(18px) saturate(140%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

/* the rest of the screen */
.extras { padding-top: 40px; }
.extras .block-head { margin-bottom: clamp(40px, 7vh, 70px); }
.extras-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(32px, 6vw, 90px); align-items: center; }
.extras-shot { display: grid; gap: 14px; }
.extras-frame { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 14px; border: 1px solid var(--line-2); box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.9); }
.extras-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.7s var(--ease); }
.extras-frame img.is-active { opacity: 1; }
.extras-list { display: grid; }
.extras-list div { padding: 22px 0; border-top: 1px solid var(--line); display: grid; gap: 6px; }
.extras-list div:last-child { border-bottom: 1px solid var(--line); }
.extras-list dt { font-size: 1.15rem; font-weight: 500; font-stretch: 108%; }
.extras-list dd { color: var(--text-2); font-size: 16px; }
.extras-list div:nth-child(2) { transition-delay: 0.08s; }
.extras-list div:nth-child(3) { transition-delay: 0.16s; }

/* try it */
.console {
  margin-top: 48px; border-radius: 28px;
  display: grid; grid-template-columns: minmax(260px, 0.8fr) 1.4fr;
  overflow: hidden;
}
.console-side { display: grid; gap: 26px; align-content: start; padding: 30px; border-right: 1px solid var(--line); }
.demo-track { display: flex; align-items: center; gap: 18px; }
.demo-track img { width: 96px; height: 96px; border-radius: 10px; box-shadow: 0 20px 50px -14px rgba(0, 0, 0, 0.8); }
.demo-track strong { display: block; font-size: 1.3rem; font-weight: 500; font-stretch: 110%; line-height: 1.2; }
.demo-track span { color: var(--text-2); }
.mini-label { display: block; margin-bottom: 10px; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-3); }
.swatch-bar { display: flex; height: 40px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.swatch-bar span { height: 100%; min-width: 4px; transition: flex-grow 0.6s var(--ease), background-color 0.6s; }
.demo-note { font-size: 15px; }
.console-main { display: grid; gap: 22px; padding: 30px; align-content: start; }
.room {
  position: relative; height: 330px; border-radius: 18px; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 100%, rgba(255, 255, 255, 0.05), transparent 60%), rgba(0, 0, 0, 0.35);
  border: 1px solid var(--line);
}
.stand { position: absolute; left: var(--x); top: 0; bottom: 0; width: 0; }
.stand .bulb {
  position: absolute; left: 0; width: 42px; height: 42px; margin-left: -21px; border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.9) 0 10%, var(--c) 42%, color-mix(in srgb, var(--c) 40%, transparent) 72%);
  box-shadow: 0 0 calc(14px + 46px * var(--a)) calc(2px + 12px * var(--a)) color-mix(in srgb, var(--c) 65%, transparent);
  opacity: calc(0.4 + 0.6 * var(--a));
  transition: --c 0.5s, --a 0.5s;
}
.room:not(.is-still) .stand .bulb { transition: none; }
.stand .bulb[data-slot="0"], .stand .bulb[data-slot="2"], .stand .bulb[data-slot="4"] { top: 56px; }
.stand .bulb[data-slot="1"], .stand .bulb[data-slot="3"], .stand .bulb[data-slot="5"] { top: 122px; }
.stand .pole { position: absolute; left: -1px; top: 172px; width: 2px; height: 100px; background: linear-gradient(rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.08)); }
.stand-label { position: absolute; top: 284px; left: 0; translate: -50% 0; font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-3); white-space: nowrap; }
.song-bar { position: absolute; left: 20px; right: 20px; bottom: 14px; display: flex; align-items: center; gap: 12px; font-size: 11px; color: var(--text-3); }
.song-bar[hidden] { display: none; }
.song-track { flex: 1; height: 2px; background: var(--line-2); border-radius: 2px; overflow: hidden; }
.song-track span { display: block; height: 100%; width: 0; background: #fff; }
.segmented { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line); justify-self: start; }
.segmented button { padding: 9px 18px; border-radius: 999px; font-size: 14.5px; color: var(--text-2); transition: color 0.3s, background-color 0.3s; }
.segmented button:hover { color: var(--text); }
.segmented button[aria-pressed="true"] { background: #f4f6ff; color: #070810; }
.segmented-sm button { padding: 6px 13px; font-size: 13px; }
.effect-detail { display: grid; gap: 14px; }
.effect-options { display: flex; flex-wrap: wrap; gap: 10px; }
.effect-options[hidden] { display: none; }
.fine { font-size: 13.5px; color: var(--text-3); }

/* setup */
.route { position: relative; list-style: none; padding: 0; margin-top: clamp(60px, 10vh, 110px); display: grid; gap: clamp(70px, 14vh, 150px); }
.route::before { content: ""; position: absolute; left: 21px; top: 22px; bottom: 22px; width: 1px; background: var(--line); }
.route-line {
  position: absolute; left: 20px; top: 22px; width: 3px; height: calc(100% - 44px); border-radius: 3px;
  background: linear-gradient(#fff, #fff 92%, rgba(255, 255, 255, 0));
  box-shadow: 0 0 12px rgba(220, 230, 255, 0.8);
  transform-origin: top; transform: scaleY(var(--p, 0));
}
.waypoint { position: relative; display: grid; grid-template-columns: 44px minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(20px, 3.5vw, 56px); align-items: center; }
.node {
  position: relative; z-index: 1;
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  font-size: 12px; color: var(--text-3);
  background: var(--void); border: 1px solid var(--line-2);
  transition: color 0.5s, border-color 0.5s, box-shadow 0.5s;
}
.waypoint.is-lit .node { color: #070810; background: #f4f6ff; border-color: #fff; box-shadow: 0 0 30px rgba(220, 230, 255, 0.7); }
.waypoint-text { display: grid; gap: 14px; }
.waypoint-text h3 { font-size: clamp(1.6rem, 2.6vw, 2.3rem); font-weight: 300; font-stretch: 112%; letter-spacing: -0.01em; }
.waypoint-text p:not(.label) { font-size: 16px; }
.waypoint-text a { color: var(--text); text-underline-offset: 3px; text-decoration-color: rgba(255, 255, 255, 0.35); }
.waypoint-fig { perspective: 1400px; }
.tilt > * {
  opacity: 0;
  transform: rotateY(-24deg) rotateX(10deg) translate3d(30px, 50px, -60px);
  transition: opacity 1.2s var(--ease), transform 1.4s var(--ease);
}
.tilt.is-in > * { opacity: 1; transform: rotateY(-7deg) rotateX(3deg); }
.shot { border-radius: 16px; border: 1px solid var(--line-2); box-shadow: 0 50px 100px -30px rgba(0, 0, 0, 0.9); }
.card { border-radius: 22px; padding: 26px; }
.installer { display: grid; grid-template-columns: auto 1fr; gap: 18px 20px; align-items: center; }
.installer img { border-radius: 14px; }
.installer-file { display: grid; gap: 4px; min-width: 0; }
.installer-file strong { font-size: 1.05rem; font-weight: 500; overflow-wrap: anywhere; }
.installer-file span { font-size: 12px; letter-spacing: 0.08em; color: var(--text-3); }
.installer-warn {
  grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px 16px; border-radius: 14px; background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line);
}
.installer-warn .mono { font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); }
.installer-warn span:last-child { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.uri { display: grid; gap: 14px; }
.uri-row { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 16px; border-radius: 14px; background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line); }
.uri-row code { flex: 1; min-width: 0; padding: 0; background: none; border: 0; font-size: 15px; color: var(--text); overflow-wrap: anywhere; }
.copy { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 10px; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; background: rgba(255, 255, 255, 0.08); border: 1px solid var(--line); transition: background-color 0.3s; }
.copy:hover { background: rgba(255, 255, 255, 0.14); }
.copy.is-done { background: #f4f6ff; color: #070810; }
.uri-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.uri-fields span { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(0, 0, 0, 0.2); font-size: 14px; color: var(--text-3); }
.uri-fields i { font-style: normal; }
.uri-fields .uri-go { grid-column: 1 / -1; text-align: center; background: #f4f6ff; color: #070810; font-weight: 500; border-color: #fff; }

.needs { margin-top: clamp(80px, 14vh, 140px); border-radius: 28px; padding: clamp(24px, 3.5vw, 44px); display: grid; grid-template-columns: 0.8fr 2fr; gap: 32px; }
.needs-head { display: grid; gap: 10px; align-content: start; }
.needs-head h3 { font-size: 1.6rem; font-weight: 300; font-stretch: 112%; }
.needs-head p { font-size: 15px; }
.needs-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px 32px; }
.needs-list div { display: grid; gap: 6px; padding-top: 16px; border-top: 1px solid var(--line); }
.needs-list dt { font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-3); }
.needs-list dd { font-size: 15.5px; color: var(--text-2); }

/* privacy */
.privacy-grid { display: grid; gap: clamp(40px, 7vh, 70px); }
.promises { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px clamp(24px, 3vw, 44px); }
.promises li { display: grid; gap: 10px; align-content: start; padding-top: 20px; border-top: 1px solid var(--line); }
.promises p { font-size: 15px; }
.promises li:nth-child(2) { transition-delay: 0.08s; }
.promises li:nth-child(3) { transition-delay: 0.16s; }
.promises li:nth-child(4) { transition-delay: 0.24s; }

/* faq */
.faq-grid { display: grid; grid-template-columns: 0.75fr 1.25fr; gap: 40px clamp(32px, 5vw, 80px); align-items: start; }
.faq-grid .block-head { position: sticky; top: 120px; }
.faq-list { display: grid; gap: 10px; }
.faq-list details { border-radius: 18px; transition: background-color 0.3s; }
.faq-list details[open] { background: var(--glass-2); }
.faq-list summary {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 20px 22px; cursor: pointer; list-style: none;
  font-size: 16.5px; font-weight: 500; font-stretch: 104%;
}
.faq-list summary::-webkit-details-marker { display: none; }
.mark { position: relative; flex: none; width: 14px; height: 14px; }
.mark::before, .mark::after { content: ""; position: absolute; left: 0; top: 6px; width: 14px; height: 1.5px; background: currentColor; transition: transform 0.4s var(--ease); }
.mark::after { transform: rotate(90deg); }
details[open] .mark::after { transform: rotate(0); }
.faq-body { display: grid; gap: 12px; padding: 0 22px 22px; }
.faq-body p { font-size: 15.5px; }
.faq-body a { color: var(--text); }
.hash { display: inline-block; font-size: 12px; overflow-wrap: anywhere; }

/* 08 · Arrival: one screen. The title sits dead center, the footer along the bottom. */
.final {
  position: relative; isolation: isolate; min-height: var(--vh);
  display: grid; place-items: center;
  padding: 90px 0 150px; color: var(--ink); text-align: center;
}
.powder-trail {
  position: absolute; inset: 0; z-index: 0;
  display: block; width: 100%; height: 100%; pointer-events: none;
  mix-blend-mode: multiply;
  opacity: clamp(0, calc((var(--w, 0) - 0.68) * 3.2), 1);
}
.final-inner {
  position: relative; z-index: 1;
  display: grid; justify-items: center; gap: 30px;
  opacity: clamp(0, calc((var(--w, 0) - 0.45) * 2.5), 1);
  transform: translateY(calc((1 - clamp(0, var(--w, 0), 1)) * 60px));
}
.final-title {
  font-size: clamp(2.8rem, 10vw, 9.5rem);
  font-weight: 200; font-stretch: 125%;
  line-height: 0.95; letter-spacing: 0.04em; margin-right: -0.04em;
  text-transform: uppercase;
  color: var(--ink);
}
.final .btn-row { justify-content: center; }
.final-spec { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 44px; margin-top: 12px; padding-top: 28px; border-top: 1px solid rgba(10, 12, 20, 0.12); }
.final-spec div { display: grid; gap: 4px; }
.final-spec dt { font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-3); }
.final-spec dd { font-size: 15.5px; font-weight: 500; }
.final .os-note { color: var(--ink-2); }

.footer {
  position: absolute; left: 0; right: 0; bottom: 0; text-align: left;
  padding: 22px 0 26px; border-top: 1px solid rgba(10, 12, 20, 0.1);
  opacity: clamp(0, calc((var(--w, 0) - 0.6) * 3), 1);
}
.footer-inner { display: grid; grid-template-columns: 1fr auto; gap: 12px 40px; align-items: center; }
.footer-copy { font-size: 13px; color: var(--ink-2); }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: flex-end; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; }
.footer-links a { color: var(--ink-2); text-decoration: none; }
.footer-links a:hover { color: var(--ink); }
.footer-fine { grid-column: 1 / -1; max-width: 70em; font-size: 12px; line-height: 1.55; color: var(--ink-3); }

/* download notice */
.toast {
  position: fixed; z-index: 30; right: 18px; bottom: 18px;
  display: flex; gap: 14px; align-items: flex-start;
  width: min(400px, calc(100% - 36px)); padding: 18px; border-radius: 20px;
  background: rgba(10, 12, 22, 0.78); border: 1px solid var(--line-2); color: var(--text);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.8);
  animation: rise 0.6s var(--ease);
}
.toast[hidden] { display: none; }
.toast-icon { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; background: #f4f6ff; color: #070810; }
.toast-body { display: grid; gap: 8px; }
.toast-body p { font-size: 14px; }
.toast-link { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none; color: var(--text); }
.toast-close { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: var(--text-2); }
.toast-close:hover { background: rgba(255, 255, 255, 0.1); color: var(--text); }

/* ---- without WebGL ---- */

html.no-gl body {
  background:
    radial-gradient(60% 50% at 20% 15%, rgba(150, 170, 255, 0.12), transparent 70%),
    radial-gradient(50% 40% at 85% 55%, rgba(255, 255, 255, 0.07), transparent 70%),
    radial-gradient(1px 1px at 20% 30%, #fff, transparent), radial-gradient(1px 1px at 70% 80%, #fff, transparent),
    radial-gradient(1px 1px at 40% 65%, rgba(255, 255, 255, 0.7), transparent), radial-gradient(1px 1px at 85% 20%, rgba(255, 255, 255, 0.8), transparent),
    var(--void);
  background-size: 100% 100%, 100% 100%, 230px 230px, 310px 310px, 170px 170px, 270px 270px, auto;
  background-attachment: fixed;
}
html.no-gl #space { display: none; }
html.no-gl .final { background: #f4f5f8; }
html.no-gl .powder-trail { opacity: 1; }
html.no-gl .final-inner, html.no-gl .footer { opacity: 1; transform: none; }

/* ---- smaller screens ---- */

@media (max-width: 1000px) {
  .nav-links { display: none; }
  .hud { display: none; }
  .extras-grid, .faq-grid { grid-template-columns: 1fr; }
  .faq-grid .block-head { position: static; }
  .console { grid-template-columns: 1fr; }
  .console-side { border-right: 0; border-bottom: 1px solid var(--line); }
  .promises { grid-template-columns: repeat(2, 1fr); }
  .needs { grid-template-columns: 1fr; }
}

/* Portrait: the stardust sits in the top half, captions below it. */
@media (max-aspect-ratio: 19/20) {
  .dust { height: 420vh; }
  .caps { left: var(--gutter); right: var(--gutter); top: auto; bottom: calc(max(26px, 4vh) + 108px); width: auto; transform: none; }
  .cap { gap: 12px; align-content: end; }
  .cap h2 { font-size: clamp(1.6rem, 6.4vw, 2.4rem); }
  .cap p { font-size: 14.5px; }
  .cap-note { font-size: 13.5px; padding: 10px 12px; }
  .dust-picker { font-size: 10.5px; letter-spacing: 0.1em; }
  .dust-labels span { font-size: 9.5px; letter-spacing: 0.04em; }
  .dust-picker { left: 50%; }
  html.no-gl .dust-fallback { left: 50%; top: 33%; width: min(70vw, 34vh); }
  .glass { height: 420vh; }
  .glass-pin { --pane-w: min(78vw, 840px); }
}

@media (max-aspect-ratio: 19/20) and (max-height: 760px) {
  .cap-note { display: none; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav { top: 8px; width: calc(100% - 16px); }
  .nav-inner { height: 52px; padding-left: 14px; }
  .btn { height: 48px; padding: 0 20px; }
  .hero-title { letter-spacing: 0.02em; margin-right: -0.02em; }
  .hero .btn-row { flex-direction: column; align-items: stretch; width: min(100%, 300px); }
  .picker { gap: 5px; padding: 5px; }
  .picker button img { width: 36px; height: 36px; }
  .route::before { left: 17px; }
  .route-line { left: 15px; }
  .waypoint { grid-template-columns: 36px minmax(0, 1fr); gap: 18px; align-items: start; }
  .node { width: 36px; height: 36px; font-size: 11px; }
  .waypoint-fig { grid-column: 2; }
  .tilt.is-in > * { transform: none; }
  .uri-fields { grid-template-columns: 1fr; }
  .card { padding: 18px; }
  .uri-row { flex-direction: column; align-items: stretch; padding: 12px; }
  .uri-row code { font-size: 13px; }
  .needs-list, .promises { grid-template-columns: 1fr; }
  .console-side, .console-main { padding: 20px; }
  .room { height: 300px; }
  .stand .bulb { width: 36px; height: 36px; margin-left: -18px; }
  .segmented button { padding: 8px 14px; }
  .final { padding-bottom: 0; grid-template-rows: 1fr auto; }
  .footer { position: static; width: 100%; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-links { justify-content: flex-start; }
  .toast { right: 10px; bottom: 10px; width: calc(100% - 20px); }
}

/* Touch screens: bigger targets for the small controls. */
@media (pointer: coarse) {
  .glass-index button { height: 36px; }
  .footer-links a { padding: 6px 0; }
}

/* A phone on its side: little height, so every pinned scene is sized by height,
   the extra copy steps aside, and the stardust's cover picker moves under its
   caption (space.js shifts the dust to match). */
@media (orientation: landscape) and (max-height: 540px) {
  .nav { top: 6px; }
  .nav-inner { height: 46px; }
  .btn { height: 42px; padding: 0 18px; font-size: 14px; }
  .btn-sm { height: 34px; padding: 0 14px; font-size: 13px; }

  .hero-pin { padding: 60px var(--gutter) 20px; }
  .hero-title { font-size: min(11.2vw, 24vh); }
  .hero-rest { gap: 14px; }
  .os-note { font-size: 12.5px; }

  .statement-pin { gap: 16px; padding-top: 40px; }
  .statement-text { font-size: min(4.3vw, 8.4vh); }

  .caps {
    top: 62px; bottom: 96px; transform: none;
    left: max(var(--gutter), env(safe-area-inset-left)); width: min(26rem, 40vw);
  }
  .cap { gap: 10px; }
  .cap h2 { font-size: clamp(1.25rem, 6.4vh, 1.7rem); }
  .cap p { font-size: 13.5px; line-height: 1.5; }
  .cap-note { display: none; }
  .dust-picker {
    left: max(var(--gutter), env(safe-area-inset-left)); translate: 0; bottom: 14px;
    justify-items: start; gap: 8px; font-size: 10.5px; letter-spacing: 0.1em;
  }
  .picker { gap: 5px; padding: 5px; }
  .picker button img { width: 34px; height: 34px; }
  .dust-labels span { font-size: 9.5px; letter-spacing: 0.06em; }
  html.no-gl .dust-fallback { left: 70%; top: 52%; width: min(40vw, 70vh); }

  .screen-pin { padding: 60px var(--gutter) 12px; gap: 10px; }
  .screen-head h2 { font-size: clamp(1.2rem, 6vh, 1.6rem); }
  .screen-head p:not(.label) { display: none; }
  .slab { width: min(86vw, calc((var(--vh) - 8.5rem) * 16 / 9)); }

  .glass-pin { --pane-w: min(62vw, calc((var(--vh) - 12.5rem) * 16 / 9)); padding: 58px 0 10px; gap: 10px; }
  .glass-head h2 { font-size: clamp(1.2rem, 6vh, 1.6rem); }
  .glass-foot { gap: 4px; }
  .glass-caption { min-height: 0; gap: 0; }
  .glass-caption strong { font-size: 1.2rem; }

  .final { padding: 70px 0 0; grid-template-rows: 1fr auto; gap: 30px; }
  .final-inner { gap: 18px; }
  .final-title { font-size: min(10vw, 22vh); }
  .footer { position: static; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .powder-trail { display: none; }
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; }
  .hero-title, .hero-rest { transform: none; }
  .tilt > *, .tilt.is-in > * { transform: none; }
}
