/* FeedAssist company site. One stylesheet for every page.
   Night, plum and chalk are FeedAssist's own colours, violet and sun its
   mark; Op-Ed blue and Echolu coral appear only where those apps are on
   stage. Every page opens on night with the generated glass-and-light
   footage or stills (assets/media/, made by infra/site-media/) and reads on
   chalk below.
   One type family, Instrument Sans, for headings and text. The two app
   names are set in the apps' own wordmark faces (.wm-oped, .wm-echolu).
   No inline styles anywhere: the CSP in _headers allows style-src 'self'
   only. */

@font-face {
  font-family: "Instrument Sans";
  src: url("fonts/instrument-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
/* Op-Ed's wordmark face, the same file op-ed.ai serves. */
@font-face {
  font-family: "Source Serif 4";
  src: url("fonts/source-serif-4.woff2") format("woff2");
  font-weight: 200 900;
  font-display: swap;
}

:root {
  --night: #120a20;
  --night-2: #1c1030;
  --lilac: #c9b3ff;
  --plum: #24123a;
  --plum-soft: #5a4b6e;
  --violet: #6f2fc4;
  --chalk: #faf9fc;
  --mist: #ece6f3;
  --sun: #ffc940;
  --oped: #0a66c2;
  --oped-ink: #0b2545;
  --oped-tint: #e6f0fb;
  --echolu: #ff6b3d;
  --echolu-night: #171210;
  --line: rgba(36, 18, 58, 0.18);
  --focus: var(--plum);
  --text: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(1.25rem, 5vw, 3.5rem);
  --band: clamp(2.75rem, 5.5vw, 4.5rem);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--chalk);
  color: var(--plum);
  font: 400 1.0625rem/1.55 var(--text);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

h1, h2, h3 {
  font-family: var(--text);
  font-weight: 680;
  line-height: 1.08;
  letter-spacing: -0.026em;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(2.2rem, 4.6vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 3.1vw, 2.45rem); line-height: 1.12; letter-spacing: -0.022em; }
h3 { font-size: 1.3rem; font-weight: 660; line-height: 1.2; letter-spacing: -0.012em; }

p { margin: 0; max-width: 62ch; }
p + p { margin-top: 0.9em; }

a { color: inherit; text-decoration-thickness: 0.09em; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 0.16em; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(100% - 2 * var(--gutter), 73rem); margin-inline: auto; }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 10;
  background: var(--plum); color: var(--chalk); padding: 0.6rem 1rem; border-radius: 0 0 10px 10px;
}
.skip:focus { top: 0; }

.lede { font-size: clamp(1.1rem, 1.5vw, 1.22rem); line-height: 1.5; max-width: 52ch; }
.soft { color: var(--plum-soft); }

/* Read by screen readers, not drawn. */
.vh { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Elements that only work with JavaScript keep their space but stay hidden
   until site.js has run, so nothing jumps when it does. */
.needs-js { visibility: hidden; }
.js .needs-js { visibility: visible; }

/* The apps' own wordmarks: Op-Ed's serif, Echolu's rounded heavy sans. */
.wm-oped { font-family: "Source Serif 4", Georgia, serif; font-weight: 700; letter-spacing: -0.02em; }
.wm-echolu { font-family: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", var(--text); font-weight: 800; letter-spacing: -0.02em; }

/* ---------- Header ---------- */

.site-header { padding-block: 1.1rem; position: relative; z-index: 5; }
.night { background: var(--night); color: var(--chalk); --focus: var(--sun); --btn-bg: var(--sun); --btn-fg: var(--night); }
/* The header floats over the night band every page opens on, so the
   footage or still runs up to the top edge. */
.site-header.night { position: absolute; inset: 0 0 auto; background: transparent; }
:root { --head-h: 5.4rem; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem 2rem; flex-wrap: wrap; }

.brand {
  display: inline-flex; align-items: center; gap: 0.7rem;
  font-weight: 700; font-size: 1.7rem; line-height: 1; letter-spacing: -0.03em;
  text-decoration: none;
}
.brand-mark { width: 2.7rem; height: 2.7rem; flex: none; }
.brand-mark rect { fill: var(--violet); }
.brand-mark path { fill: var(--sun); }

.site-nav { display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.25rem); font-weight: 600; }
.site-nav a { text-decoration: none; padding-block: 0.35rem; border-bottom: 0.14em solid transparent; }
.site-nav a:hover { border-bottom-color: currentColor; }
.site-nav a[aria-current="page"] { border-bottom-color: currentColor; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font: 650 1.05rem/1 var(--text);
  padding: 1rem 1.6rem; border-radius: 999px; border: 2px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: transform 0.18s var(--ease), background-color 0.3s, color 0.3s, border-color 0.3s;
}
.btn:active { transform: scale(0.97); }
.btn-solid { background: var(--btn-bg, var(--plum)); color: var(--btn-fg, var(--chalk)); }
.btn-solid:hover { transform: translateY(-2px); }
.btn-line { border-color: currentColor; background: transparent; color: inherit; }
.btn-line:hover { background: var(--btn-bg, var(--plum)); color: var(--btn-fg, var(--chalk)); border-color: transparent; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.8rem; }

/* ---------- Home hero: night, footage, the two apps on stage ----------
   The footage (glass tiles turning in a beam of sun) fills the band; the
   copy sits on its dark left side and the phones stand in front of the
   ring of tiles. Picking an app in the headline changes the glow behind
   the phones and which phone stands forward. */

.flooded, .hero-band {
  --f-chip: #fff; --f-chip-fg: var(--oped-ink); --glow: #3d8bff; --frame: #0d0718;
}
[data-scene="echolu"] .hero-band { --f-chip: #33261f; --f-chip-fg: #fff3ea; --glow: var(--echolu); --frame: #43352e; }
[data-scene="more"] .hero-band { --f-chip: var(--sun); --f-chip-fg: var(--night); --glow: var(--sun); }

.hero-band { position: relative; overflow: hidden; isolation: isolate; padding-top: var(--head-h); }
.hero-media, .closing-media { position: absolute; inset: 0; z-index: -1; }
.hero-media::after, .closing-media::after { content: ""; position: absolute; inset: 0; }
.hero-media::after {
  background:
    linear-gradient(90deg, var(--night) 0%, rgba(18, 10, 32, 0.92) 30%, rgba(18, 10, 32, 0.35) 62%, rgba(18, 10, 32, 0.15) 100%),
    linear-gradient(0deg, var(--night) 0%, transparent 28%);
}
/* As the hero scrolls away the footage pushes in and the copy lifts
   (site.js sets --sp from 0 to 1). */
.hero-media { transform: scale(calc(1 + var(--sp, 0) * 0.12)); transform-origin: 62% 40%; }
.hero-copy { translate: 0 calc(var(--sp, 0) * -3rem); opacity: calc(1 - var(--sp, 0) * 0.5); }
.bg-video { width: 100%; height: 100%; object-fit: cover; object-position: 62% 50%; opacity: 0.001; transition: opacity 1.6s ease; }
.bg-video.is-on, .no-video .bg-video { opacity: 1; }
/* The poster frame sits behind the footage: it is what shows before the
   footage plays, with reduced motion or Save-Data, and without
   JavaScript (when the video element is not drawn at all, so the browser
   puts no playback controls on it). */
.hero-media { background: var(--night) url("media/hero-poster.webp") 62% 50% / cover no-repeat; }
.closing-media { background: var(--night) url("media/dawn-poster.webp") 50% 40% / cover no-repeat; }
html:not(.js) .bg-video { display: none; }

.hero {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(1.5rem, 4vw, 4rem); align-items: center;
  padding-block: clamp(1.5rem, 3vw, 2.5rem) clamp(3.5rem, 5vw, 4.25rem);
}

.hero h1 { font-size: clamp(2.4rem, 4.4vw, 3.75rem); line-height: 1.12; letter-spacing: -0.035em; font-weight: 650; text-wrap: wrap; }
.hero h1 .line { display: block; }

/* An app's name in the headline is its logo, and a button: the one that is
   on stage sits on its own chip. */
.pick {
  display: inline-flex; align-items: baseline; gap: 0.2em;
  font-family: inherit; font-size: inherit; font-weight: inherit; line-height: 1; letter-spacing: inherit;
  color: inherit; background: none; border: 0; cursor: pointer;
  padding: 0.09em 0.15em 0.11em 0.14em; margin: 0 -0.1em 0 -0.14em; border-radius: 0.22em;
  text-decoration: underline; text-decoration-thickness: 0.05em; text-underline-offset: 0.14em;
  text-decoration-color: rgba(201, 179, 255, 0.45);
  transition: background-color 0.4s, color 0.4s, text-decoration-color 0.4s, box-shadow 0.4s;
}
.pick.wm-oped { font-family: "Source Serif 4", Georgia, serif; font-weight: 700; letter-spacing: -0.02em; }
.pick.wm-echolu { font-family: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", var(--text); font-weight: 800; letter-spacing: -0.02em; }
.pick-more { color: var(--lilac); }
.pick img { align-self: center; width: 0.84em; height: 0.84em; border-radius: 0.19em; flex: none; }
.pick:hover { text-decoration-color: currentColor; }
.pick[aria-pressed="true"] {
  background: var(--f-chip); color: var(--f-chip-fg); text-decoration-color: transparent;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 0.3em 1.4em -0.3em var(--glow);
}

.captions { display: grid; margin-top: clamp(1.2rem, 2vw, 1.7rem); }
.caption {
  grid-area: 1 / 1; font-size: clamp(1.08rem, 1.45vw, 1.22rem); line-height: 1.5; max-width: 42ch; color: rgba(250, 249, 252, 0.86);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity 0.35s, transform 0.5s var(--ease), visibility 0s 0.35s;
}
.caption strong { color: var(--chalk); }
.caption.is-active { opacity: 1; visibility: visible; transform: none; transition-delay: 0.12s, 0.12s, 0s; }
.caption a { font-weight: 650; white-space: nowrap; color: var(--chalk); }

.hero .btn-row { margin-top: clamp(1.5rem, 2.5vw, 2.2rem); }

/* Platforms, drifting along the foot of the hero. */
.hero-reach {
  display: flex; flex-wrap: wrap; gap: 0.5rem; padding-bottom: clamp(2rem, 4vw, 3rem); margin-top: 0;
  max-width: none;
}
.hero-reach span {
  font-size: 0.88rem; font-weight: 600; padding: 0.45rem 0.85rem; border-radius: 999px;
  border: 1px solid rgba(201, 179, 255, 0.28); color: rgba(250, 249, 252, 0.78); background: rgba(18, 10, 32, 0.4);
  backdrop-filter: blur(6px);
}

/* The stage: Op-Ed and Echolu side by side. The app that is selected
   stands forward, the other steps back; "and more" sends both back and
   raises a third phone that has no app in it yet. Driven by data-scene on
   <body>, so it is right without JavaScript too. The whole stage leans a
   few degrees toward the pointer. */
.stage {
  position: relative; aspect-ratio: 1 / 1.12; width: min(100%, 31rem); justify-self: end;
  transform: perspective(1400px) rotateY(calc(var(--px, 0) * -9deg)) rotateX(calc(var(--py, 0) * 7deg));
  transition: transform 0.5s ease-out; transform-style: preserve-3d;
}
.stage::before {
  content: ""; position: absolute; inset: 14% 8% 10%; border-radius: 50%; z-index: 0;
  background: var(--glow); filter: blur(70px); opacity: 0.42; transition: background-color 0.9s ease;
}

.phone {
  margin: 0; padding: clamp(5px, 0.7vw, 9px);
  background: var(--frame, #0d0718); border-radius: 16% / 7.4%;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 2rem 3.5rem -1.2rem rgba(0, 0, 0, 0.7);
}
.phone img, .phone .screen { width: 100%; aspect-ratio: 588 / 1278; border-radius: 14.2% / 6.5%; object-fit: cover; }

.stage .phone {
  position: absolute; width: 47.5%;
  transform: translateY(var(--y, 0%)) scale(var(--s, 1));
  translate: calc(var(--px, 0) * var(--drift, 10) * 1px) calc(var(--py, 0) * var(--drift, 10) * 1px);
  transition: transform 0.8s var(--ease), opacity 0.45s ease, visibility 0s, translate 0.35s ease-out, background-color 0.7s, filter 0.6s;
}
.js .stage .phone { cursor: pointer; }
.p-oped { left: 0; top: 0; transform-origin: 85% 50%; --drift: 14; z-index: 1; }
.p-echolu { right: 0; top: 6.5%; transform-origin: 15% 50%; --drift: -11; z-index: 1; }
.p-more { left: 26.25%; top: 3%; z-index: 3; --drift: 18; --y: 9%; --s: 0.94; opacity: 0; visibility: hidden; transition-delay: 0s, 0s, 0.45s, 0s, 0s; }

[data-scene="oped"] .p-oped, [data-scene="echolu"] .p-echolu { z-index: 2; }
[data-scene="oped"] .p-echolu, [data-scene="echolu"] .p-oped { --s: 0.9; --y: 1.5%; filter: brightness(0.7); }
[data-scene="more"] .p-oped, [data-scene="more"] .p-echolu { --s: 0.86; --y: 2%; filter: brightness(0.55); }
[data-scene="more"] .p-more { --y: 0%; --s: 1; opacity: 1; visibility: visible; transition-delay: 0.08s, 0.08s, 0s, 0s, 0s; }

/* The third phone: a few blocks that assemble, and a question. */
.screen { display: flex; flex-direction: column; }
.screen-next { background: var(--violet); color: var(--sun); padding: 17% 10% 12%; gap: 4%; }
.screen-next p { margin-top: auto; font-weight: 700; font-size: clamp(1.3rem, 2.7vw, 2.05rem); line-height: 1.02; letter-spacing: -0.03em; }
.wire { display: block; background: rgba(250, 249, 252, 0.2); border-radius: 0.5rem; transform-origin: left center; transform: scaleX(0); }
[data-scene="more"] .wire { animation: wire-in 0.55s var(--ease) forwards; animation-delay: calc(0.35s + var(--i, 0) * 0.13s); }
.wire-bar { height: 4.5%; width: 46%; --i: 0; }
.wire-hero { height: 27%; --i: 1; background: rgba(250, 249, 252, 0.3); border-radius: 0.9rem; }
.wire-line { height: 3%; --i: 2; }
.wire-short { width: 68%; --i: 3; }
@keyframes wire-in { to { transform: scaleX(1); } }

.stage-ctl {
  position: absolute; right: 0; bottom: -2.5rem; display: flex; align-items: center; gap: 0.9rem;
  font-size: 0.95rem; font-weight: 600; transform: translateZ(0);
}
.dots { display: flex; gap: 0.4rem; }
.dots i { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: currentColor; opacity: 0.28; transition: opacity 0.3s, width 0.4s var(--ease); }
.dots i.is-on { opacity: 1; width: 1.5rem; border-radius: 999px; background: var(--glow); }
.autoplay { font: inherit; color: inherit; background: none; border: 0; padding: 0.25rem 0; cursor: pointer; text-decoration: underline; text-underline-offset: 0.2em; }

/* The opening: one sequence when the page loads. The headline comes into
   focus line by line, the phones rise into the light. JavaScript adds
   .js before first paint, so without it everything is simply there. */
.js .hero h1 .line, .js .hero .captions, .js .hero .btn-row, .js .hero-reach { animation: focus-in 1s var(--ease) both; }
.js .hero h1 .line:nth-child(1) { animation-delay: 0.1s; }
.js .hero h1 .line:nth-child(2) { animation-delay: 0.24s; }
.js .hero h1 .line:nth-child(3) { animation-delay: 0.38s; }
.js .hero .captions { animation-delay: 0.6s; }
.js .hero .btn-row { animation-delay: 0.72s; }
.js .hero-reach { animation-delay: 0.95s; }
.js .stage { animation: rise-in 1.3s var(--ease) 0.35s both; }
@keyframes focus-in { from { opacity: 0; transform: translateY(0.45em); filter: blur(14px); } }
@keyframes rise-in { from { opacity: 0; translate: 0 12%; } }

/* ---------- Bands ---------- */

.band { padding-block: var(--band); }
.band-mist { background: var(--mist); }
.band-plum { background: var(--plum); color: var(--chalk); --focus: var(--sun); --btn-bg: var(--sun); --btn-fg: var(--plum); }
.band-plum.night { background: var(--night); }
.band-head { display: grid; gap: 0.9rem; margin-bottom: clamp(1.5rem, 3vw, 2.25rem); }

/* Two audiences, one light panel and one dark */
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1rem, 2vw, 1.5rem); }
.panel { border-radius: 1.75rem; padding: clamp(1.5rem, 3vw, 2.25rem); display: grid; gap: 0.9rem; align-content: start; overflow: hidden; }
.panel-media {
  margin: calc(-1 * clamp(1.5rem, 3vw, 2.25rem)) calc(-1 * clamp(1.5rem, 3vw, 2.25rem)) 0.6rem;
  aspect-ratio: 16 / 9; overflow: hidden; background: var(--night);
}
.panel-media img { width: 100%; height: 100%; object-fit: cover; transform: scale(var(--zoom, 1)); transition: transform 1.6s var(--ease); }
.panel:hover .panel-media img { --zoom: 1.05; }

/* Images open like a shutter the first time they scroll into view. */
.js .reveal .panel-media { clip-path: inset(18% 10% 18% 10% round 1.5rem); transition: clip-path 1.2s var(--ease); }
.js .reveal .panel-media img { --zoom: 1.25; }
.js .reveal.in .panel-media { clip-path: inset(0 0 0 0 round 0); }
.js .reveal.in .panel-media img { --zoom: 1; }
.js .reveal.in:hover .panel-media img { --zoom: 1.05; }
.panel-light { background: var(--mist); }
.panel-dark { background: var(--night); color: var(--chalk); --focus: var(--sun); }
.panel h3 { font-size: clamp(1.4rem, 2.1vw, 1.7rem); letter-spacing: -0.02em; }
.plain-list { list-style: none; margin: 0.25rem 0 0; padding: 0; display: grid; gap: 0.45rem; }
.plain-list li { padding-left: 1.4rem; position: relative; }
.plain-list li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 0.7rem; height: 0.16rem; background: currentColor; }

/* ---------- The board: who runs what at each level ----------
   The level picker on the left, one row per job on the right. Each row ends
   in a switch whose knob slides to whoever runs that job at the chosen level. */

.band-head-split { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.3fr); gap: 0.9rem clamp(2rem, 5vw, 4.5rem); align-items: end; }
.band-head-split .lede { max-width: 46rem; }

.board { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr); gap: 1rem clamp(1.5rem, 3vw, 2.5rem); align-items: start; }
.board-side { display: grid; gap: 1.1rem; align-content: start; position: sticky; top: 1.5rem; }

.levels { display: grid; gap: 0.4rem; }
.level-btn {
  font: 600 1rem/1.25 var(--text); text-align: left; color: var(--plum); cursor: pointer;
  background: var(--chalk); border: 2px solid transparent; border-radius: 1.1rem; padding: 0.5rem 0.9rem 0.5rem 0.5rem;
  display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 0.8rem;
  transition: background-color 0.3s, color 0.3s, border-color 0.2s, transform 0.18s var(--ease);
}
.level-btn:hover { border-color: var(--plum); }
.level-btn:active { transform: scale(0.98); }
.level-btn b {
  display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 50%;
  font-weight: 700; font-size: 1.05rem; line-height: 1; background: rgba(36, 18, 58, 0.09);
  transition: background-color 0.35s, color 0.35s, transform 0.35s var(--ease);
}
.level-btn[data-reached="true"] b { background: var(--sun); color: var(--plum); }
.level-btn[aria-checked="true"] { background: var(--plum); color: var(--chalk); }
.level-btn[aria-checked="true"] b { transform: scale(1.08); }

.level-say { display: grid; gap: 0.6rem; justify-items: start; }
.level-say p { font-size: 1.05rem; line-height: 1.45; }
.level-say a { font-weight: 650; }

/* How the eight jobs split, as one bar that stretches as rows move */
.meter-say { font-size: 0.92rem; color: var(--plum-soft); margin-top: -0.65rem; }
.meter { display: flex; height: 2.1rem; border-radius: 999px; overflow: hidden; background: rgba(36, 18, 58, 0.07); }
.meter span {
  flex: var(--n, 0) 1 0; min-width: 0; overflow: hidden; display: grid; place-items: center;
  font-size: 0.9rem; font-weight: 700; white-space: nowrap; transition: flex-grow 0.6s var(--ease);
}
.meter .m-you { background: var(--chalk); color: var(--plum); box-shadow: inset 0 0 0 2px var(--plum); border-radius: 999px; }
.meter .m-shared { background: var(--sun); color: var(--plum); }
.meter .m-we { background: var(--plum); color: var(--chalk); }

.lanes { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; align-content: start; }
.lane, .lane-hit {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0.3rem 1rem;
  padding: 0.55rem 0.65rem 0.55rem 1.1rem;
}
.lane { position: relative; min-height: 3.6rem; border-radius: 1.2rem; background: var(--chalk); color: var(--plum); transition: opacity 0.6s var(--ease), translate 0.6s var(--ease), box-shadow 0.3s; transition-delay: calc(var(--i, 0) * 55ms), calc(var(--i, 0) * 55ms), 0s; }
.lane:has(.lane-hit) { display: block; padding: 0; }
.token { position: relative; display: grid; gap: 0.1rem; }
.token b { font-weight: 700; line-height: 1.2; }
.token-note, .token-hint { font-size: 0.92rem; line-height: 1.3; }
.token-note { color: var(--plum-soft); transition: opacity 0.2s; }
.token-hint { position: absolute; left: 0; bottom: 0; font-weight: 650; opacity: 0; transition: opacity 0.2s; pointer-events: none; }

/* The switch at the end of each row. The knob names who runs the job and
   slides across when it moves; the label it uncovers is where it would go. */
.track {
  position: relative; width: 10.5rem; height: 2.4rem; border-radius: 999px; background: rgba(36, 18, 58, 0.08);
  display: flex; justify-content: space-between; align-items: center; padding-inline: 1rem;
  font-size: 0.8rem; font-weight: 650; color: var(--plum-soft);
}
.knob {
  position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px); border-radius: 999px;
  display: grid; place-items: center; font-style: normal; font-size: 0.85rem; font-weight: 700; white-space: nowrap;
  background: var(--chalk); color: var(--plum); box-shadow: inset 0 0 0 2px var(--plum);
  transition: left 0.6s var(--ease), width 0.6s var(--ease), background-color 0.4s, color 0.4s, box-shadow 0.4s;
}
.lane[data-side="we"] .knob { left: 50%; background: var(--plum); color: var(--chalk); box-shadow: none; }
.lane[data-side="shared"] .knob { left: 20%; width: 60%; background: var(--sun); color: var(--plum); box-shadow: none; }

.track > span { transition: opacity 0.3s; }
.lane[data-side="shared"] .track > span { opacity: 0; }

.board-more { margin-top: 1.25rem; }

/* site.js wraps each row that can change sides in a button. Its hint
   replaces the note while the pointer or the keyboard is on the row. */
.lane-hit {
  width: 100%; margin: 0; border: 0; border-radius: 1.2rem; background: none; font: inherit; color: inherit;
  text-align: left; cursor: pointer;
}
.lane-hit:focus-visible { outline: none; }
.lane:has(.lane-hit:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.lane:has(.lane-hit):hover { box-shadow: 0 0.4rem 1.1rem rgba(36, 18, 58, 0.16); }
.lane-hit:hover .token-hint, .lane-hit:focus-visible .token-hint { opacity: 1; }
.lane-hit:hover .token-note, .lane-hit:focus-visible .token-note { opacity: 0; }
.lane-hit:hover .knob { box-shadow: inset 0 0 0 2px var(--plum), 0 0 0 3px rgba(255, 201, 64, 0.7); }
.lane[data-side="we"] .lane-hit:hover .knob, .lane[data-side="shared"] .lane-hit:hover .knob { box-shadow: 0 0 0 3px rgba(255, 201, 64, 0.7); }
.lane-hit:active .knob { transform: scale(0.96); }

/* First time the board scrolls into view, the rows settle in one after another */
.board-prep .lane { opacity: 0; translate: 0 0.9rem; }

/* ---------- Closing call ---------- */

.closing-band { position: relative; overflow: hidden; isolation: isolate; padding-block: clamp(5rem, 11vw, 9rem); }
.closing-media::after { background: linear-gradient(90deg, rgba(18, 10, 32, 0.92) 0%, rgba(18, 10, 32, 0.6) 45%, rgba(18, 10, 32, 0.25) 100%); }
.closing-band .bg-video { object-position: 50% 40%; }
.closing { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 1.5rem clamp(2rem, 5vw, 5rem); align-items: center; }
.closing h2 { font-size: clamp(2.3rem, 5vw, 4rem); line-height: 1.06; letter-spacing: -0.03em; }
.closing-side { display: grid; gap: 1.1rem; justify-items: start; }

/* ---------- Page heads (inner pages) ---------- */

/* Inner pages open on night too, with one of the generated stills fading
   in from the right edge. */
.head-band { padding-top: var(--head-h); background: var(--night); color: var(--chalk); --focus: var(--sun); --btn-bg: var(--sun); --btn-fg: var(--night); position: relative; overflow: hidden; isolation: isolate; }
.head-band::before {
  content: ""; position: absolute; z-index: -1; inset: 0 0 0 auto; width: min(62%, 58rem);
  background: var(--ph, none) center / cover no-repeat;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 55%); mask-image: linear-gradient(90deg, transparent 0%, #000 55%);
  opacity: 0.85;
}
.head-band + :not(.plate) { margin-top: clamp(2rem, 4.5vw, 3.25rem); }
.ph-studio { --ph: url("media/studio.webp"); }
.ph-grid { --ph: url("media/business.webp"); }
.ph-dawn { --ph: url("media/dawn-still.webp"); }
.js .head-band::before { animation: head-light 2.2s var(--ease) both; }
@keyframes head-light { from { opacity: 0; transform: scale(1.08); } }
.page-head { padding-block: clamp(2.5rem, 5vw, 4.25rem) clamp(3rem, 6vw, 4.75rem); display: grid; gap: 1.1rem; }
.page-head .lede { color: rgba(250, 249, 252, 0.86); }
.js .page-head > * { animation: focus-in 0.9s var(--ease) both; }
.js .page-head > :nth-child(2) { animation-delay: 0.15s; }
.page-head h1 { max-width: 20ch; }

/* ---------- Our apps: one band per app, in that app's colours ---------- */

.plate { padding-block: var(--band); --frame: #170b27; }
.plate-oped { background: var(--oped-tint); --accent: var(--oped); --btn-bg: var(--oped); --btn-fg: #fff; }
.plate-echolu { background: var(--echolu-night); color: #fff3ea; --accent: var(--echolu); --frame: #43352e; --focus: var(--sun); --btn-bg: var(--echolu); --btn-fg: #1d0d05; --line: rgba(255, 243, 234, 0.22); }
.plate-more { background: var(--sun); }
.plate-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); gap: 2.5rem clamp(2rem, 5vw, 5rem); align-items: center; }
.plate-copy { display: grid; gap: 1.1rem; justify-items: start; }
.app-name { display: flex; align-items: center; gap: 0.7rem; font-size: 1.75rem; line-height: 1; }
.app-name img { width: 2.75rem; height: 2.75rem; border-radius: 0.65rem; }
.plate-oped .app-name { color: var(--oped-ink); }
.status { font: 600 0.9rem/1 var(--text); letter-spacing: 0; padding: 0.4rem 0.7rem; border-radius: 999px; border: 2px solid currentColor; margin-left: 0.3rem; }
.plate h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); max-width: 17ch; }

.facts { margin: 0.3rem 0 0; display: grid; gap: 0; width: 100%; max-width: 34rem; }
.facts div { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1rem; padding: 0.65rem 0; border-top: 1px solid var(--line); }
.facts dt { font-weight: 650; }
.facts dd { margin: 0; }

.gallery { display: grid; gap: 1.1rem; justify-items: center; }
.gallery-stage { position: relative; width: min(100%, 27rem); display: grid; place-items: center; }
.gallery-stage .phone { grid-area: 1 / 1; width: 52%; opacity: 0; visibility: hidden; transform: translateX(6%) scale(0.97); transition: opacity 0.4s, transform 0.6s var(--ease), visibility 0s 0.4s; }
.gallery-stage .phone.is-active { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.gallery-stage.has-tablet { justify-items: start; width: min(100%, 31rem); }
.gallery-stage.has-tablet .phone { z-index: 1; width: 44%; margin-top: 14%; }
.tablet { grid-area: 1 / 1; justify-self: end; width: 70%; margin: 0; padding: clamp(6px, 0.8vw, 10px); background: var(--frame); border-radius: 5.5% / 3.8%; box-shadow: 0 1.5rem 3rem -1.2rem rgba(23, 11, 39, 0.4); }
.tablet img { border-radius: 3.6% / 2.5%; }

.seg { display: flex; flex-wrap: wrap; gap: 0.4rem; justify-content: center; }
.seg button {
  font: 600 0.98rem/1 var(--text); color: inherit; background: transparent; cursor: pointer;
  border: 2px solid currentColor; border-radius: 999px; padding: 0.6rem 1rem;
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}
.seg button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--btn-fg); }
.gallery-say { text-align: center; max-width: 36ch; min-height: 3.1em; }

.more-wrap { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 1.5rem clamp(2rem, 5vw, 5rem); align-items: center; }
.more-wrap h2 { font-size: clamp(2rem, 4.2vw, 3.2rem); line-height: 1.06; letter-spacing: -0.03em; max-width: none; }

/* ---------- Services ---------- */

.tiers { list-style: none; margin: 0; padding: 0; }
.tier { display: grid; grid-template-columns: clamp(3rem, 7vw, 5.5rem) minmax(0, 1.15fr) minmax(0, 1fr); gap: 1.1rem clamp(1.5rem, 4vw, 3.5rem); padding-block: clamp(1.6rem, 3vw, 2.25rem); border-top: 2px solid var(--plum); }
.tier:last-child { border-bottom: 2px solid var(--plum); }
.tier-n { font-weight: 680; font-size: clamp(2.8rem, 6vw, 4.5rem); line-height: 0.85; letter-spacing: -0.04em; }
.tier-main { display: grid; gap: 0.8rem; align-content: start; justify-items: start; }
.tier-main a { font-weight: 650; }
.tier-side { display: grid; gap: 1.25rem; align-content: start; }
.tier-side h3 { font: 700 1rem/1.3 var(--text); letter-spacing: 0; margin-bottom: 0.5rem; }

.table-scroll { overflow-x: auto; }
.who { width: 100%; min-width: 40rem; border-collapse: collapse; text-align: left; }
.who caption { text-align: left; margin-bottom: 1rem; color: var(--plum-soft); }
.who th, .who td { padding: 0.75rem 0.9rem 0.75rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.who thead th { font-weight: 680; font-size: 1.05rem; line-height: 1.2; letter-spacing: -0.01em; border-bottom: 2px solid var(--plum); }
.who tbody th { font-weight: 650; }
.who .we { font-weight: 700; }
.who .we::before, .who .shared::before { content: ""; display: inline-block; width: 0.65rem; height: 0.65rem; border-radius: 50%; background: var(--plum); margin-right: 0.45rem; }
.who .shared::before { background: var(--sun); box-shadow: 0 0 0 1.5px var(--plum); }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.5rem; counter-reset: step; }
.steps li { counter-increment: step; border-top: 2px solid currentColor; padding-top: 0.9rem; display: grid; gap: 0.45rem; align-content: start; }
.steps li::before { content: counter(step); font-weight: 700; font-size: 1.9rem; line-height: 1; letter-spacing: -0.03em; color: var(--sun); }
.steps p { font-size: 1rem; }
.steps h3 { font-size: 1.2rem; }
.steps-cta { margin-top: clamp(1.75rem, 3vw, 2.5rem); }

.split { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 1.5rem clamp(2rem, 6vw, 6rem); align-items: start; }
.defs { margin: 0; display: grid; }
.defs div { padding: 1rem 0; border-top: 1px solid var(--line); display: grid; gap: 0.3rem; }
.defs div:last-child { border-bottom: 1px solid var(--line); }
.defs dt { font-weight: 700; font-size: 1.1rem; }
.defs dd { margin: 0; color: var(--plum-soft); max-width: 58ch; }

/* Common questions on /services: two columns of question and answer, ruled
   like the lists above them. */
.qa-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(2rem, 6vw, 6rem); }
.qa { padding: 1.1rem 0 1.3rem; border-top: 1px solid var(--line); display: grid; gap: 0.35rem; align-content: start; }
.qa:nth-last-child(-n+2) { border-bottom: 1px solid var(--line); }
.qa h3 { font-size: 1.1rem; font-weight: 700; letter-spacing: 0; }
.qa p { color: var(--plum-soft); max-width: 58ch; }

/* ---------- Contact ---------- */

.contact-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: 2.5rem clamp(2rem, 6vw, 6rem); align-items: start; padding-bottom: var(--band); }
.form { display: grid; gap: 1.25rem; }
.field { display: grid; gap: 0.4rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.field label { font-weight: 650; }
.field .hint { font-weight: 400; color: var(--plum-soft); }
.field input, .field select, .field textarea {
  font: inherit; color: var(--plum); background: #fff; width: 100%;
  border: 2px solid var(--plum); border-radius: 0.8rem; padding: 0.85rem 1rem;
}
.field textarea { min-height: 11rem; resize: vertical; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--plum) 50%), linear-gradient(135deg, var(--plum) 50%, transparent 50%); background-position: calc(100% - 1.35rem) 50%, calc(100% - 1rem) 50%; background-size: 0.35rem 0.35rem; background-repeat: no-repeat; padding-right: 2.5rem; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline-offset: 2px; border-radius: 0.8rem; }
.field-error { color: #a1123a; font-weight: 600; font-size: 0.95rem; }
.field-trap { position: absolute; left: -200vw; width: 1px; height: 1px; overflow: hidden; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.form-foot p { font-size: 0.95rem; color: var(--plum-soft); max-width: 38ch; }
.form[aria-busy="true"] .btn { opacity: 0.6; pointer-events: none; }

.notice { display: none; border-radius: 1.4rem; padding: 1.4rem 1.5rem; margin-bottom: 1.5rem; gap: 0.7rem; justify-items: start; }
.notice:target, .notice.is-shown { display: grid; }
.notice h2 { font-size: 1.5rem; }
.notice-ok { background: var(--plum); color: var(--chalk); --focus: var(--sun); }
.notice-fail { background: var(--sun); }
.notice .btn { margin-top: 0.3rem; }

.reach { display: grid; gap: 0; }
.reach section { padding: 1.25rem 0; border-top: 2px solid var(--plum); display: grid; gap: 0.4rem; }
.reach h2 { font: 700 1rem/1.3 var(--text); letter-spacing: 0; }
.reach .big { font-weight: 680; font-size: clamp(1.25rem, 2vw, 1.5rem); line-height: 1.15; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.reach p, .reach address { color: var(--plum-soft); font-style: normal; }

/* ---------- Privacy and security notice ---------- */

.prose { max-width: 44rem; padding-bottom: var(--band); }
.prose h2 { font-size: 1.5rem; margin: 2.25rem 0 0.7rem; }
.prose p, .prose li { max-width: 68ch; }
.prose ul { padding-left: 1.2rem; margin: 0.8rem 0; display: grid; gap: 0.45rem; }
.prose .updated { color: var(--plum-soft); }

/* ---------- 404 ---------- */

.lost .lede { color: rgba(250, 249, 252, 0.86); }
.lost { padding-block: clamp(2.5rem, 7vw, 5.5rem); display: grid; gap: 1.25rem; justify-items: start; }
.lost h1 { font-size: clamp(2.6rem, 7vw, 4.75rem); letter-spacing: -0.035em; }

/* ---------- Footer ---------- */

.site-footer { padding-block: clamp(2.25rem, 4vw, 3.25rem) 2.25rem; border-top: 2px solid var(--plum); }
.foot-top { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.7fr) minmax(0, 1fr); gap: 2rem clamp(1.5rem, 4vw, 4rem); }
.foot-id { display: grid; gap: 0.9rem; align-content: start; justify-items: start; }
.foot-id p, .foot-id address { font-size: 0.98rem; max-width: 44ch; font-style: normal; }
.foot-nav { display: grid; gap: 0.5rem; align-content: start; justify-items: start; font-weight: 600; }
.foot-nav a { text-decoration: none; }
.foot-nav a:hover { text-decoration: underline; }
.foot-reach { display: grid; gap: 1rem; align-content: start; font-size: 0.98rem; }
.foot-reach a { font-weight: 650; }
.foot-legal { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--line); display: grid; gap: 0.75rem; }
.foot-legal p { font-size: 0.88rem; line-height: 1.5; color: var(--plum-soft); max-width: 110ch; }
.foot-legal strong { color: var(--plum); }

/* ---------- Smaller screens ---------- */

@media (max-width: 62rem) {
  .steps { grid-template-columns: repeat(2, 1fr); }
  .tier { grid-template-columns: clamp(3rem, 9vw, 5rem) minmax(0, 1fr); }
  .tier-side { grid-column: 2; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .foot-top { grid-template-columns: 1fr 1fr; }
  .foot-id { grid-column: 1 / -1; }
}

@media (max-width: 52rem) {
  .hero-media::after { background: linear-gradient(180deg, rgba(18, 10, 32, 0.75) 0%, rgba(18, 10, 32, 0.92) 55%, var(--night) 100%); }
  .head-band::before { width: 100%; opacity: 0.4; }
  .hero, .closing, .plate-grid, .more-wrap, .split, .contact-grid, .pair, .qa-grid { grid-template-columns: 1fr; }
  .qa:nth-last-child(2) { border-bottom: 0; }
  .stage { justify-self: center; width: min(100%, 23rem); margin-bottom: 1.5rem; }
  .gallery { order: 2; }
}

@media (max-width: 62rem) {
  .band-head-split { grid-template-columns: 1fr; }
  .board { grid-template-columns: 1fr; }
  .board-side { position: static; grid-template-columns: 1fr 1fr; align-items: start; }
  .levels { grid-template-columns: repeat(4, 1fr); grid-column: 1 / -1; }
  .level-say { grid-row: 2 / span 2; }
  .meter, .meter-say { grid-column: 2; }
  .meter { align-self: end; }
  .meter-say { margin-top: 0; }
}

@media (max-width: 44rem) {
  .board-side { grid-template-columns: 1fr; }
  .levels { grid-template-columns: 1fr 1fr; }
  .level-say { grid-row: auto; }
  .meter, .meter-say { grid-column: auto; }
  .meter-say { margin-top: -0.65rem; }
}

@media (max-width: 36rem) {
  :root { --head-h: 6.6rem; }
}

@media (max-width: 34rem) {
  .brand { font-size: 1.5rem; gap: 0.6rem; }
  .brand-mark { width: 2.4rem; height: 2.4rem; }
  .site-nav { gap: 1.1rem; font-size: 0.98rem; }
  .field-row { grid-template-columns: 1fr; }
  .tier-side { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .foot-top { grid-template-columns: 1fr; }
  .level-btn { padding-right: 0.6rem; gap: 0.55rem; font-size: 0.95rem; }
  .token-note, .token-hint { font-size: 0.86rem; }
  .lane, .lane-hit { gap: 0.3rem 0.6rem; padding-left: 0.85rem; }
  .track { width: 7.2rem; padding-inline: 0.7rem; font-size: 0.74rem; }
  .knob { font-size: 0.78rem; }
  .facts div { grid-template-columns: 6rem 1fr; }
}

/* ---------- Reduced motion: keep every state, drop the travel ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; transition-delay: 0s !important; animation-duration: 0.01ms !important; animation-delay: 0s !important; }
  .stage .phone { translate: none; }
  .stage { transform: none; }
  .bg-video { opacity: 1; }
  .js .reveal .panel-media { clip-path: none; }
}
