/* FluidWallpapers: one stylesheet for every page. */

@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url('/fonts/archivo-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Instrument Serif';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url('/fonts/instrument-serif-latin.woff2') format('woff2');
}

:root {
  --night: #0a0610;
  --plum: #170c1b;
  --panel: #140b18;
  --line: rgba(255, 222, 204, 0.1);
  --line-strong: rgba(255, 222, 204, 0.2);
  --text: #fbf1ea;
  --muted: #c6b0b5;
  --faint: #a08b93;
  --gold: #ffc85e;
  --coral: #ff8150;
  --rose: #f64b7d;
  --sunset: linear-gradient(90deg, #ffe49e, #ffc85e 17%, #ffa64b 33%, #ff8150 50%, #ff6060 67%, #f64b7d 83%, #ff77a8);
  --serif: 'Instrument Serif', Georgia, serif;
  --bezel: clamp(5px, 0.6vw, 9px);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  color-scheme: dark;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--night); color: var(--text);
  font: 400 1.0625rem/1.6 'Archivo', system-ui, sans-serif;
  font-variation-settings: 'wdth' 100;
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
a { color: inherit; }
img { display: block; max-width: 100%; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--text); color: var(--night); padding: 10px 14px; border-radius: 10px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

/* ---------- The bar (every page) ---------- */
.bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px clamp(20px, 4vw, 48px);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; text-decoration: none; letter-spacing: -0.01em; }
.brand img { width: 30px; height: 30px; }
.bar nav { display: flex; gap: 26px; font-size: 0.95rem; }
.bar nav a { text-decoration: none; color: rgba(251, 241, 234, 0.82); }
.bar nav a:hover { color: var(--text); }

/* ---------- The show: wordmark, then the scene, then the desk ---------- */
.show { position: relative; height: 330vh; background: var(--night); }
.stage { position: sticky; top: 0; height: 100svh; min-height: 600px; overflow: hidden; isolation: isolate; }
.stage .bar { position: absolute; inset: 0 0 auto; z-index: 6; }

/* Behind everything: the dusk room the desk stands in. */
.backdrop {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(70% 55% at 50% 0%, rgba(255, 129, 80, 0.2), transparent 70%),
    radial-gradient(60% 50% at 50% 100%, rgba(246, 75, 125, 0.14), transparent 70%),
    linear-gradient(180deg, var(--plum), var(--night) 80%);
}
/* Another scene, dimmed, around the letters until they open. */
.room { position: absolute; inset: 0; z-index: 0; opacity: var(--mask, 1); filter: brightness(0.62) saturate(1.1); }
.room canvas, .room img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.room canvas { opacity: 0; transition: opacity 800ms var(--ease); }
.room canvas[data-live] { opacity: 1; }
.room::after { content: ''; position: absolute; inset: 0; background: radial-gradient(90% 80% at 50% 45%, transparent, rgba(10, 6, 16, 0.6)); }

/* The scene: inside the letters, then the whole screen, then pulled back
   into the middle monitor (home.js moves and clips it). */
.scene {
  position: absolute; inset: 0; z-index: 1; transform-origin: 0 0;
  filter: saturate(var(--sat, 1.4)) brightness(var(--bright, 1.6));
  background: #000;
}
/* While the letters are on, black around them drops out (screen), so the
   room shows; inside them the scene stays whole. */
.scene[data-letters] { mix-blend-mode: screen; }
.scene canvas, .scene .poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scene canvas { opacity: 0; transition: opacity 800ms var(--ease); }
.scene canvas[data-live] { opacity: 1; }
/* A floor under the letters, so a scene's darkest parts still read. */
.lift {
  position: absolute; inset: 0; mix-blend-mode: lighten; opacity: var(--mask, 1);
  background: linear-gradient(100deg, rgba(255, 110, 120, 0.3), rgba(236, 72, 153, 0.3) 45%, rgba(150, 90, 240, 0.32));
}
/* Each scene gets a floor in its own colours (home.js sets data-scene at the
   moment the scene changes, at the bottom of its dip to black). */
.stage[data-scene='neon-city'] .lift { background: linear-gradient(100deg, rgba(255, 60, 200, 0.12), rgba(120, 80, 255, 0.14)); }
.stage[data-scene='aurora'] .lift { background: linear-gradient(100deg, rgba(40, 220, 160, 0.26), rgba(60, 200, 220, 0.22) 50%, rgba(150, 100, 255, 0.28)); }
.stage[data-scene='chrome'] .lift { background: linear-gradient(100deg, rgba(80, 230, 255, 0.24), rgba(160, 140, 255, 0.26)); }
/* The veil: white letters keep the scene, black removes it. */
.veil {
  position: absolute; inset: 0; background: #000; mix-blend-mode: multiply;
  display: grid; place-items: center; opacity: var(--mask, 1); pointer-events: none;
}
.word {
  margin: 0; color: #fff; text-align: center;
  font-weight: 900; font-variation-settings: 'wdth' 125;
  font-size: clamp(4rem, 17.5vw, 19rem); line-height: 0.78; letter-spacing: -0.055em;
  transform: scale(var(--grow, 1)); transform-origin: 50% 46%; will-change: transform;
}
.word span { display: block; }

.sparkles { position: absolute; inset: 0; z-index: 4; width: 100%; height: 100%; pointer-events: none; }

.intro {
  position: absolute; z-index: 5; left: 0; right: 0; bottom: 0;
  display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 24px; flex-wrap: wrap;
  padding: 0 clamp(20px, 4vw, 48px) clamp(24px, 4vh, 40px);
  opacity: var(--intro, 1);
}
.intro[data-off] { visibility: hidden; }
.intro p { margin: 0; max-width: 36ch; color: rgba(251, 241, 234, 0.88); font-size: 1.05rem; text-shadow: 0 1px 16px rgba(0, 0, 0, 0.5); }
.intro__side { display: flex; align-items: center; gap: 18px; }
.scroll-cue { font-size: 0.9rem; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.scroll-cue i { width: 1px; height: 36px; background: linear-gradient(var(--text), transparent); display: block; }

.live-note {
  position: absolute; z-index: 5; left: clamp(20px, 4vw, 48px); bottom: clamp(24px, 4vh, 40px);
  margin: 0; font-size: 0.95rem; color: rgba(251, 241, 234, 0.92);
  display: flex; align-items: center; gap: 10px;
  opacity: var(--note, 0); text-shadow: 0 1px 16px rgba(0, 0, 0, 0.6);
}
.live-note i { width: 8px; height: 8px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 4px rgba(255, 129, 80, 0.25); }

/* The desk arrives around the scene. */
.desk-layer {
  position: absolute; inset: 0; z-index: 3;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  padding: 84px clamp(20px, 4vw, 48px) clamp(20px, 3vh, 36px);
  pointer-events: none;
}
.desk-layer[data-on] { pointer-events: auto; }
.fade-in { opacity: var(--desk, 0); transform: translateY(calc((1 - var(--desk, 0)) * 28px)); }
.copy { text-align: center; max-width: 1000px; }
h1 {
  margin: 0; font-family: var(--serif); font-weight: 400;
  font-size: clamp(2.5rem, 5.2vw, 5.2rem); line-height: 0.98; letter-spacing: -0.02em; text-wrap: balance;
}
.copy p { margin: 16px auto 0; max-width: 54ch; color: var(--muted); font-size: clamp(1rem, 1.3vw, 1.1rem); }
.actions { margin-top: 24px; display: flex; gap: 12px; justify-content: center; align-items: center; flex-wrap: wrap; }
.button {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 24px; border-radius: 999px;
  text-decoration: none; font-weight: 650; border: 1px solid transparent;
  transition: transform 160ms var(--ease), background 160ms;
}
.button--primary { background: var(--text); color: #1a0b10; }
.button--primary:hover { transform: translateY(-1px); }
.button--quiet { border-color: var(--line-strong); }
.button--quiet:hover { background: rgba(255, 255, 255, 0.06); }
.note { font-size: 0.88rem; color: var(--faint); margin-left: 6px; }

.desk {
  position: relative; width: 100%; max-width: 1240px; margin-top: clamp(24px, 4vh, 48px);
  display: grid; grid-template-columns: 1fr 1.55fr 1fr; align-items: end; gap: clamp(8px, 1.4vw, 20px);
}
.monitor { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.screen {
  position: relative; width: 100%; aspect-ratio: 16 / 9; padding: 0; display: block;
  border: var(--bezel) solid #1d1720; border-radius: clamp(8px, 1vw, 14px);
  background: transparent; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.07), 0 40px 80px rgba(0, 0, 0, 0.5);
}
button.screen { cursor: pointer; background: #000; transition: box-shadow 200ms; }
button.screen:hover { box-shadow: 0 0 0 1px rgba(255, 200, 94, 0.55), 0 40px 80px rgba(0, 0, 0, 0.5); }
.monitor--left .screen { transform: perspective(1400px) rotateY(24deg); transform-origin: right center; }
.monitor--right .screen { transform: perspective(1400px) rotateY(-24deg); transform-origin: left center; }
/* Sized by the bezel, never by the canvas's own drawing buffer. */
.screen canvas, .screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 3px; }
.screen canvas { opacity: 0; transition: opacity 600ms; }
.screen canvas[data-live] { opacity: 1; }
/* The side screens draw only once the desk is on its way. */
.desk-layer:not([data-shown]) .screen canvas { display: none; }
.hole { position: absolute; inset: 0; }
.hole img { display: none; }
.monitor--centre .screen { opacity: var(--desk, 0); }
.neck { width: 9%; height: clamp(14px, 2.6vh, 34px); background: linear-gradient(90deg, #120e14, #2a222d, #120e14); }
.foot { width: 34%; height: 6px; border-radius: 6px 6px 2px 2px; background: linear-gradient(90deg, #120e14, #2e2530, #120e14); }
.caption { margin-top: 10px; font-size: 0.86rem; color: var(--muted); }
.caption b { color: var(--text); font-weight: 650; }
.monitor--centre .neck, .monitor--centre .foot, .monitor--centre .caption { opacity: var(--desk, 0); }
.glow { position: absolute; left: 12%; right: 12%; bottom: 0; height: 110px; z-index: -1; filter: blur(50px); background: var(--sunset); opacity: calc(var(--desk, 0) * 0.2); border-radius: 50%; }
.tools { display: flex; justify-content: center; gap: 10px; margin-top: clamp(14px, 2.4vh, 24px); }
.tool {
  font-size: 0.86rem; font-weight: 600; color: var(--text); cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; min-height: 38px; border-radius: 999px;
  background: rgba(16, 9, 18, 0.5); border: 1px solid var(--line-strong);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.tool:hover { background: rgba(255, 255, 255, 0.09); }
.tool svg { width: 14px; height: 14px; fill: currentColor; }
.tool .play { display: none; }
.tool[data-state='paused'] .play { display: block; }
.tool[data-state='paused'] .pause { display: none; }

/* ---------- Sections ---------- */
main > section { padding: clamp(80px, 10vw, 140px) clamp(20px, 5vw, 64px); }
.wrap { max-width: 1200px; margin: 0 auto; }
h2 {
  margin: 0 0 18px; font-family: var(--serif); font-weight: 400; text-wrap: balance;
  font-size: clamp(2.4rem, 5vw, 4.3rem); line-height: 1; letter-spacing: -0.015em; max-width: 16ch;
}
.lede { margin: 0; color: var(--muted); max-width: 54ch; font-size: 1.1rem; }
.lede a { color: var(--text); text-decoration-color: rgba(255, 200, 94, 0.6); text-underline-offset: 3px; }

.rail-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.rail-nav { display: flex; gap: 8px; }
.rail-nav button {
  width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line-strong); background: transparent; color: var(--text); cursor: pointer;
  display: grid; place-items: center;
}
.rail-nav button:hover { background: rgba(255, 255, 255, 0.06); }
.rail-nav button:disabled { opacity: 0.35; cursor: default; background: transparent; }
.rail-nav svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.rail {
  margin: 48px 0 0; padding: 0 0 4px; list-style: none;
  display: grid; grid-auto-flow: column; grid-auto-columns: min(46vw, 560px); gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain;
}
.rail::-webkit-scrollbar { display: none; }
.rail:focus-visible { outline-offset: 6px; }
.rail li { scroll-snap-align: start; }
.rail figure { margin: 0; }
.rail img { aspect-ratio: 16 / 9; width: 100%; height: auto; object-fit: cover; border-radius: 14px; background: var(--panel); }
.rail figcaption { margin-top: 12px; font-family: var(--serif); font-size: 1.45rem; line-height: 1.1; }

.steps { list-style: none; padding: 0; margin: 60px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 56px); counter-reset: s; }
.steps li::before {
  counter-increment: s; content: counter(s);
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
  border: 1px solid rgba(255, 200, 94, 0.45); color: var(--gold);
  font-family: var(--serif); font-size: 1.6rem; margin-bottom: 22px;
}
.steps h3 { margin: 0 0 8px; font-size: 1.22rem; font-weight: 700; letter-spacing: -0.01em; }
.steps p { margin: 0; color: var(--muted); }

.light { background: linear-gradient(180deg, transparent, rgba(255, 129, 80, 0.05), transparent); }
.light .wrap { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(32px, 6vw, 96px); }
.rules { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 28px 32px; }
.rules li { padding-top: 18px; border-top: 1px solid var(--line-strong); }
.rules strong { display: block; font-weight: 700; margin-bottom: 4px; }
.rules span { color: var(--muted); font-size: 0.97rem; }

.coins .wrap { text-align: center; }
.coins h2, .coins .lede { margin-left: auto; margin-right: auto; }

.closing { position: relative; overflow: hidden; padding: clamp(80px, 10vw, 140px) 0 0 !important; }
.closing .wrap { padding: 0 clamp(20px, 5vw, 64px); text-align: center; position: relative; z-index: 1; }
.closing h2, .closing .lede { margin-left: auto; margin-right: auto; }
.channels {
  list-style: none; padding: 0; margin: 48px auto 0; max-width: 940px;
  display: grid; grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line-strong); border-radius: 18px; overflow: hidden;
  background: rgba(20, 11, 24, 0.7); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.channels li { padding: 24px 18px; text-align: center; border-left: 1px solid var(--line); }
.channels li:first-child { border-left: 0; }
.channels strong { display: block; font-weight: 700; font-size: 1.05rem; }
.channels span { display: block; color: var(--faint); font-size: 0.88rem; }
.channels em { display: inline-block; margin-top: 12px; font-style: normal; font-size: 0.8rem; font-weight: 650; color: var(--gold); padding: 3px 10px; border-radius: 999px; border: 1px solid rgba(255, 200, 94, 0.35); }
.hills { display: block; width: 100%; height: auto; margin-top: -40px; }

footer { padding: 32px clamp(20px, 5vw, 64px) 48px; color: var(--faint); font-size: 0.9rem; background: #050306; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--text); }
footer nav { display: flex; gap: 20px; }

/* ---------- Plain pages: privacy, 404 ---------- */
.page { min-height: 100svh; display: flex; flex-direction: column; background:
  radial-gradient(70% 45% at 50% 0%, rgba(255, 129, 80, 0.14), transparent 70%), var(--night); }
.page main { flex: 1; }
.prose { max-width: 680px; margin: 0 auto; padding: clamp(40px, 8vw, 96px) clamp(20px, 5vw, 32px) clamp(64px, 10vw, 120px); }
.prose h1 { font-size: clamp(2.6rem, 6vw, 4.2rem); margin-bottom: 12px; text-align: left; }
.prose h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 48px 0 10px; max-width: none; }
.prose p, .prose li { color: var(--muted); }
.prose a { color: var(--text); text-decoration-color: rgba(255, 200, 94, 0.6); text-underline-offset: 3px; }
.prose .updated { color: var(--faint); font-size: 0.95rem; margin: 0 0 32px; }
.lost { flex: 1; display: grid; place-items: center; text-align: center; padding: 40px 20px 0; }
.lost h1 { font-size: clamp(2.8rem, 7vw, 5.4rem); }
.lost p { color: var(--muted); margin: 14px auto 28px; max-width: 40ch; }
.page .hills { margin-top: 24px; }

@media (max-width: 900px) {
  .steps, .light .wrap { grid-template-columns: 1fr; }
  .channels { grid-template-columns: 1fr 1fr; }
  .channels li:nth-child(3) { border-left: 0; }
  .channels li:nth-child(n+3) { border-top: 1px solid var(--line); }
  .rail { grid-auto-columns: 72vw; }
}
@media (max-width: 640px) {
  .bar nav { display: none; }
  .word { font-size: 21vw; }
  .note { flex-basis: 100%; text-align: center; margin: 0; }
  .actions { gap: 10px; margin-top: 20px; }
  .button { padding: 0 16px; min-height: 46px; font-size: 0.95rem; }
  .copy p { font-size: 0.98rem; }
  .tools { margin-top: 12px; }
  .rules { grid-template-columns: 1fr; }
  .channels { grid-template-columns: 1fr; }
  .channels li { border-left: 0 !important; border-top: 1px solid var(--line); }
  .channels li:first-child { border-top: 0; }
  .rail { grid-auto-columns: 84vw; }
  .hills { margin-top: 0; }
  .intro p { font-size: 1rem; }
}
/* Phones and portrait tablets: the middle screen across the top, the other
   two side by side under it. */
@media (max-width: 640px), (max-width: 1100px) and (orientation: portrait) {
  .desk-layer { justify-content: flex-start; padding-top: 88px; }
  .desk { grid-template-columns: 1fr 1fr; row-gap: 14px; max-width: 760px; }
  .monitor--centre { grid-column: 1 / -1; order: -1; }
  .monitor--left .screen, .monitor--right .screen { transform: none; }
  .neck, .foot { display: none; }
  .caption { margin-top: 6px; }
}
@media (max-width: 1100px) and (orientation: portrait) and (min-width: 641px) {
  .desk-layer { justify-content: center; padding-top: 96px; }
}
/* Short phones: no lede on the desk, so all three screens fit. */
@media (max-width: 640px) and (max-height: 760px) {
  .desk-layer { padding-top: 76px; }
  .copy p, .monitor--centre .caption { display: none; }
  h1 { font-size: 2.1rem; }
  .actions { margin-top: 14px; }
  .desk { margin-top: 16px; row-gap: 10px; }
}
/* Landscape phones: everything sized by the height. */
@media (max-height: 520px) and (min-width: 641px) {
  .stage { min-height: 0; }
  .word { font-size: min(17.5vw, 24vh); }
  .veil { padding-bottom: 56px; }
  .intro p { font-size: 0.92rem; }
  .desk-layer { padding-top: 64px; padding-bottom: 12px; }
  .copy p { display: none; }
  h1 { font-size: 1.9rem; }
  .actions { margin-top: 10px; }
  .button { min-height: 40px; }
  .desk { margin-top: 12px; max-width: calc((100svh - 220px) * 4.07); }
  .neck { height: 10px; }
  .caption { margin-top: 4px; font-size: 0.8rem; }
  .tools { margin-top: 8px; }
}
@media (max-height: 700px) and (min-width: 641px) {
  .copy p { display: none; }
}

/* Less motion: no scroll-driven show. The page opens on the desk. */
@media (prefers-reduced-motion: reduce) {
  .show { height: auto; }
  .stage { position: relative; }
  .button, .fade-in { transition: none; }
}
