/* Polylute site. Fonts are self-hosted; no external requests. */

@font-face {
  font-family: "Manrope";
  src: url("/assets/fonts/manrope_variable.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/fonts/jetbrains_mono_variable.woff2") format("woff2");
  font-weight: 400 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --accent: #FFB23F;
  --on-accent: #1A1206;
  --bg: #0B0A0F;
  --surface: #14111C;
  --surface-2: #1C1827;
  --ink: #F4F2F9;
  --ink-2: #DAD7E3;
  --ink-3: #BBB6C9;
  --muted: #A39DB3;
  --line: #2A2439;
  --line-2: #353048;
  --line-3: #3E3852;
  --line-strong: #6F6788;
  --rim-hot: rgba(255, 245, 232, .85);
  --rim-glow: rgba(255, 178, 63, .55);
  --sans: Manrope, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --pad-x: clamp(16px, 4vw, 48px);
  --pad-y: clamp(72px, 9vw, 140px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --vh: 100vh;
}
@supports (height: 100svh) {
  :root { --vh: 100svh; }
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); }
h1, h2, h3, p, dl, dd, ul { margin: 0; }
ul { padding: 0; list-style: none; }

/* Anchors: specificity 0 so every component class wins, as the design's inline styles did. */
:where(a) { color: var(--ink); }
:where(a:hover) { color: #FFFFFF; }

.page {
  --accent: #FFB23F;
  background-color: var(--bg);
  background-image: linear-gradient(180deg, #0B0A0F 0%, #110C1E 35%, #160E27 68%, #0B0A0F 100%);
  color: var(--ink);
  font-family: var(--sans);
  min-height: 100vh;
  overflow-x: hidden;
  /* clip (not hidden) so position: sticky keeps working inside the page */
  overflow-x: clip;
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 10;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  padding: 12px 18px;
  border-radius: 999px;
  text-decoration: none;
}
.skip-link:hover { color: var(--on-accent); }
.skip-link:focus { top: 16px; outline-color: var(--ink); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Decoration and motion */
.pl-flow {
  background-image: radial-gradient(circle, var(--accent) 2.2px, transparent 2.7px);
  background-size: 14px 14px;
  background-position: 0 50%;
  background-repeat: repeat-x;
  animation: pl-flow 900ms linear infinite;
  flex: 1 1 80px;
  min-height: 24px;
  align-self: center;
  height: 24px;
}
@keyframes pl-flow { to { background-position: 14px 50%; } }
.pl-blink { animation: pl-blink 1.6s steps(2, jump-none) infinite; }
@keyframes pl-blink { 50% { opacity: .25; } }
.pl-strike { text-decoration: line-through; text-decoration-thickness: 2px; }
@media (prefers-reduced-motion: reduce) {
  .pl-flow, .pl-blink { animation: none; }
}

/* Layout */
.section { border-bottom: 1px solid var(--line); }
.container {
  max-width: 1360px;
  margin: 0 auto;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
}
.block {
  padding-top: var(--pad-y);
  padding-bottom: var(--pad-y);
  display: flex;
  flex-direction: column;
}
.block-signal { gap: clamp(40px, 5vw, 72px); }
.block-why { gap: clamp(56px, 7vw, 112px); }
.block-more { gap: clamp(40px, 5vw, 64px); }
.block-split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr));
  gap: clamp(32px, 6vw, 96px);
}
.block-download {
  padding-top: clamp(80px, 10vw, 160px);
  padding-bottom: clamp(80px, 10vw, 160px);
  gap: 48px;
}
.head-block { display: flex; flex-direction: column; gap: 20px; }

/* Type */
.eyebrow {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .02em;
  color: var(--accent);
}
.display {
  font-family: var(--sans);
  font-weight: 800;
  letter-spacing: -0.045em;
}
.display-hero { font-size: clamp(60px, 10.6vw, 164px); line-height: .94; }
.display-xl { font-size: clamp(48px, 7.2vw, 112px); line-height: .92; }
.display-lg { font-size: clamp(44px, 6vw, 92px); line-height: .92; }
.display-cta { font-size: clamp(56px, 10vw, 156px); line-height: .9; }
.accent { color: var(--accent); }

/* Buttons */
.btn, .btn:hover, .btn-ghost, .btn-ghost:hover { text-decoration: none; }
.btn {
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  background: var(--accent);
  color: var(--on-accent);
  display: inline-flex;
  align-items: center;
}
.btn:hover { color: var(--on-accent); filter: brightness(1.08); }
.btn-light {
  background: var(--ink);
  color: var(--bg);
  transition: background-color .18s, color .18s;
}
.btn-light:hover,
.btn-light:focus-visible { background: #FFFFFF; color: var(--bg); filter: none; }
.btn-sm { padding: 0 18px; min-height: 44px; gap: 10px; }
.btn-lg { padding: 0 24px; min-height: 56px; gap: 14px; }
.btn-ghost {
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  padding: 0 22px;
  min-height: 56px;
  display: inline-flex;
  align-items: center;
}
.btn-ghost:hover { color: var(--ink); background: #1C1827; }
.link-quiet {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-underline-offset: 6px;
}
.link-quiet:hover { color: var(--ink); }
.actions { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); position: relative; z-index: 2; }
.header-row {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.logo-link { display: inline-flex; align-items: center; min-height: 44px; }
.logo { display: block; width: 138px; height: auto; }
.logo-footer { width: 120px; }
.nav-main {
  display: flex;
  gap: clamp(16px, 3vw, 40px);
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .02em;
}
.nav-main a {
  text-decoration: none;
  color: var(--muted);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.nav-main a:hover { color: var(--ink); }
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Hero */
.hero {
  padding-top: clamp(48px, 7vw, 104px);
  padding-bottom: clamp(56px, 7vw, 96px);
  display: flex;
  flex-direction: column;
  gap: clamp(40px, 5vw, 72px);
}
.hero-head { display: flex; flex-direction: column; gap: 28px; }
.status-line {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .02em;
  color: var(--muted);
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}
.hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr));
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}
.hero-copy { display: flex; flex-direction: column; gap: 36px; max-width: 560px; }
.lede {
  font-size: clamp(19px, 1.7vw, 23px);
  line-height: 1.55;
  color: var(--ink-2);
  text-wrap: pretty;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  padding-top: 22px;
  gap: 16px;
}
.stat { display: flex; flex-direction: column; gap: 6px; }
.stat dt { font-family: var(--mono); font-size: 11px; letter-spacing: .02em; color: var(--muted); }
.stat dd { font-family: var(--sans); font-weight: 700; letter-spacing: -0.03em; font-size: 28px; }

/* Demo */
.demo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  position: relative;
  isolation: isolate;
  transform-origin: 50% 0;
}
.phone {
  /* Never taller than ~80% of the viewport on a phone-sized screen */
  width: min(372px, 100%, max(240px, calc((var(--vh) * .8 - 22px) * 600 / 1342 + 22px)));
  border: 1px solid transparent;
  border-radius: 46px;
  padding: 10px;
  background:
    radial-gradient(240px circle at var(--lx, 22%) var(--ly, 8%), rgba(255, 255, 255, .055), transparent 62%) padding-box,
    linear-gradient(#14111C, #14111C) padding-box,
    radial-gradient(240px circle at var(--lx, 22%) var(--ly, 8%), var(--rim-hot), var(--rim-glow) 34%, var(--line-3) 74%) border-box;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .14),
    0 28px 64px -18px rgba(0, 0, 0, .78),
    0 6px 18px -6px rgba(0, 0, 0, .55);
}
.phone-screen {
  position: relative;
  aspect-ratio: 600 / 1342;
  border-radius: 36px;
  overflow: hidden;
  touch-action: pan-y;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  background: #000;
}
.phone-screen:focus-visible { outline-offset: 6px; }
.track {
  display: flex;
  width: 100%;
  height: 100%;
  transform: translateX(-100%);
  transition: transform 420ms cubic-bezier(.2, .8, .2, 1);
}
.slide { flex: 0 0 100%; height: 100%; }
.shot {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}
.demo-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.round-btn {
  border-radius: 50%;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.round-btn:hover:not(:disabled) { border-color: var(--ink-3); background: var(--surface); }
.round-btn:disabled { opacity: .35; cursor: default; }
.tab {
  border-radius: 999px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.tab:hover { color: var(--ink); }
.tab[aria-pressed="true"], .tab[aria-pressed="true"]:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--on-accent);
}
.caption { font-family: var(--mono); font-size: 12px; letter-spacing: .02em; color: var(--muted); }

/* Signal path */
.flow-row { display: flex; align-items: stretch; flex-wrap: wrap; gap: 0; }
.node {
  flex: 1 1 220px;
  border: 1px solid var(--ink);
  padding: 28px;
  display: grid;
  grid-template-rows: auto auto 1fr;
  row-gap: 20px;
  min-height: 180px;
}
.node-note { align-self: end; }
.node-accent {
  border-color: var(--accent);
  background: #14111C;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}
.node-label { font-family: var(--mono); font-size: 12px; letter-spacing: .02em; color: var(--muted); }
.node-accent .node-label { color: var(--accent); }
.node-title {
  font-family: var(--sans);
  font-weight: 800;
  letter-spacing: -0.045em;
  font-size: clamp(32px, 3.4vw, 48px);
  line-height: 1;
}
.node-note { font-family: var(--mono); font-size: 14px; color: var(--ink-2); }
.skipped { display: flex; flex-direction: column; gap: 18px; }
.skipped-label { font-family: var(--mono); font-size: 12px; letter-spacing: .02em; color: var(--muted); }
.skipped-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 12px;
}
.skipped-list li {
  border: 1px dashed var(--line-3);
  padding: 20px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.skipped-list .pl-strike { font-family: var(--mono); font-size: 15px; color: var(--muted); letter-spacing: .02em; }
.skip-x { color: #766E91; font-family: var(--mono); }
.skipped-note {
  margin-top: 8px;
  max-width: 720px;
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink-2);
  text-wrap: pretty;
}

/* Why */
.feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(32px, 6vw, 64px);
  border-top: 1px solid var(--line);
  padding-top: clamp(40px, 5vw, 64px);
}
.feature-copy { display: flex; flex-direction: column; gap: 24px; }
.feature-num {
  font-family: var(--sans);
  font-weight: 800;
  letter-spacing: -0.045em;
  font-size: clamp(96px, 12vw, 180px);
  line-height: .8;
  color: var(--accent);
}
.feature-title {
  font-family: var(--sans);
  font-weight: 800;
  letter-spacing: -0.045em;
  font-size: clamp(34px, 3.8vw, 56px);
  line-height: .95;
}
.feature-text { max-width: 520px; font-size: 19px; line-height: 1.6; color: var(--ink-2); text-wrap: pretty; }
.feature-media { display: flex; justify-content: center; }
.phone-sm {
  width: min(320px, 100%);
  border: 1px solid transparent;
  border-radius: 40px;
  padding: 9px;
  background:
    radial-gradient(240px circle at var(--lx, 22%) var(--ly, 8%), rgba(255, 255, 255, .055), transparent 62%) padding-box,
    linear-gradient(#14111C, #14111C) padding-box,
    radial-gradient(240px circle at var(--lx, 22%) var(--ly, 8%), var(--rim-hot), var(--rim-glow) 34%, var(--line-3) 74%) border-box;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .14),
    0 24px 54px -16px rgba(0, 0, 0, .75),
    0 6px 16px -6px rgba(0, 0, 0, .5);
}
.phone-sm img,
.phone-sm video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 600 / 1342;
  object-fit: cover;
  border-radius: 31px;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--line-2);
  padding: 8px 12px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .02em;
  color: var(--ink-2);
}
.chip-accent { border-color: var(--accent); color: var(--accent); }
.story-stage { display: none; }

/* Everything else */
.cards {
  display: grid;
  /* 6 cards: 1 column, then 2 x 3, then 3 x 2, so no cell is ever left empty */
  grid-template-columns: minmax(0, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.card {
  background: rgba(11, 10, 15, .78);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 200px;
}
.card-idx { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.card h3 { font-size: 22px; font-weight: 600; }
.card p { font-size: 16px; line-height: 1.6; color: var(--ink-3); }

/* Spec */
.spec-list { display: flex; flex-direction: column; font-family: var(--mono); font-size: 15px; }
.spec-row {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.spec-row:last-child { border-bottom: 1px solid var(--line); }
.spec-row dt { color: var(--muted); letter-spacing: .02em; }
.spec-row dd { text-align: right; }
.spec-row dd.accent { color: var(--accent); }

/* FAQ */
.faq { display: flex; flex-direction: column; }
.faq details { border-top: 1px solid var(--line); padding: 22px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  font-size: 20px;
  font-weight: 600;
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 400;
  color: var(--muted);
  flex: none;
}
.faq details[open] > summary::after {
  content: "−";
  color: var(--accent);
}
.faq summary:hover::after { color: var(--ink); }
.faq details[open] > summary:hover::after { color: var(--accent); }
.faq details p { margin-top: 12px; font-size: 17px; line-height: 1.6; color: var(--ink-3); }

/* Download */
.version-note { font-family: var(--mono); font-size: 13px; letter-spacing: .02em; color: var(--muted); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); }
.footer-row {
  padding-top: 40px;
  padding-bottom: 40px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}
.nav-footer { display: flex; flex-wrap: wrap; gap: 8px 28px; font-family: var(--mono); font-size: 13px; }
.nav-footer a { color: var(--ink-2); min-height: 44px; display: inline-flex; align-items: center; }
.nav-footer a:hover { color: var(--ink); }
.footer-note { font-family: var(--mono); font-size: 12px; color: var(--muted); }

/* Phone widths */

/* Below ~900px the signal-path row wraps: one column, vertical connectors. */
@media (max-width: 899px) {
  .flow-row { flex-direction: column; flex-wrap: nowrap; align-items: stretch; }
  .node { flex: 0 0 auto; width: 100%; }
  .pl-flow {
    flex: 0 0 40px;
    height: 40px;
    min-height: 0;
    width: 14px;
    align-self: center;
    background-position: 50% 0;
    background-repeat: repeat-y;
    animation-name: pl-flow-v;
  }
  @keyframes pl-flow-v { to { background-position: 50% 14px; } }
}

/* Header: logo + Docs + Download on one row on narrow screens; nav links are in-page anchors. */
@media (max-width: 719px) {
  .nav-main { display: none; }
  .header-row { gap: 12px; }
}

/* Tablet / medium desktop: keep nav links and action buttons comfortably on one row. */
@media (min-width: 720px) and (max-width: 959px) {
  .header-row { gap: 16px; }
  .nav-main { gap: 16px; }
}

/* Small phones (360-420): slightly smaller logo and tighter buttons so everything stays on one row. */
@media (max-width: 420px) {
  .header-row { gap: 8px; }
  .site-header .logo { width: 104px; }
  .header-actions { gap: 6px; }
  .header-actions .btn-sm { padding: 0 13px; font-size: 14px; }
}

/* Demo controls on one row down to 360px. */
@media (max-width: 420px) {
  .demo-controls { gap: 3px; }
  .tab { padding: 0 6px; font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .pl-flow { animation: none; }
}

/* ------------------------------------------------------------------ */
/* Motion pass. Everything below only moves transform and opacity.      */
/* ------------------------------------------------------------------ */

.ln { display: block; }

/* Wide screens: the phone is the star of the first screen. */
@media (min-width: 900px) {
  .hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: 1fr auto auto 1fr;
    column-gap: clamp(40px, 6vw, 96px);
    row-gap: 0;
    padding-top: clamp(16px, 2.2vw, 32px);
    padding-bottom: clamp(64px, 5vw, 96px);
    --phone-h: clamp(460px, calc(var(--vh) - 240px), 1100px);
  }
  .hero-grid { display: contents; }
  .hero-head { grid-column: 1; grid-row: 2; align-self: end; }
  .hero-copy { grid-column: 1; grid-row: 3; align-self: start; margin-top: 40px; }
  .demo { grid-column: 2; grid-row: 1 / -1; align-self: center; transform-origin: 50% 100%; }
  .display-hero { font-size: clamp(60px, min(8.4vw, 15.5vh), 150px); }
  .phone { width: calc((var(--phone-h) - 22px) * 600 / 1342 + 22px); }
}

/* Reveals (only once site.js has run and motion is allowed) */
html.js-motion .rv {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 800ms var(--ease) var(--rv-d, 0ms),
    transform 900ms var(--ease) var(--rv-d, 0ms);
}
html.js-motion .rv.in { opacity: 1; transform: none; }
html.js-motion .rv.now { transition: none; }

html.js-motion .rvl .ln {
  opacity: 0;
  transform: translateY(34px);
  transition:
    opacity 800ms var(--ease) calc(var(--rv-d, 0ms) + var(--li, 0) * 110ms),
    transform 900ms var(--ease) calc(var(--rv-d, 0ms) + var(--li, 0) * 110ms);
}
.rvl .ln:nth-child(2) { --li: 1; }
.rvl .ln:nth-child(3) { --li: 2; }
html.js-motion .rvl.in .ln { opacity: 1; transform: none; }
html.js-motion .rvl.now .ln { transition: none; }

/* Cards: the content rises; the cell and its hairlines stay put. */
html.js-motion .rvi > * {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 800ms var(--ease) calc(var(--rv-d, 0ms) + var(--ci, 0) * 70ms),
    transform 900ms var(--ease) calc(var(--rv-d, 0ms) + var(--ci, 0) * 70ms);
}
.rvi > :nth-child(2) { --ci: 1; }
.rvi > :nth-child(3) { --ci: 2; }
html.js-motion .rvi.in > * { opacity: 1; transform: none; }
html.js-motion .rvi.now > * { transition: none; }

/* Signal path: the boxes light up one after another. */
html.js-motion .flow-row > .node,
html.js-motion .flow-row > .pl-flow {
  opacity: .14;
  transform: translateY(26px);
  transition:
    opacity 700ms var(--ease) calc(var(--s, 0) * 300ms),
    transform 900ms var(--ease) calc(var(--s, 0) * 300ms);
}
.flow-row > :nth-child(2) { --s: 1; }
.flow-row > :nth-child(3) { --s: 2; }
.flow-row > :nth-child(4) { --s: 3; }
.flow-row > :nth-child(5) { --s: 4; }
html.js-motion .flow-row.lit > .node,
html.js-motion .flow-row.lit > .pl-flow { opacity: 1; transform: none; }
html.js-motion .flow-row.now > .node,
html.js-motion .flow-row.now > .pl-flow { transition: none; }

/* Scroll-linked pieces are moved by site.js; keep them on their own layers. */
html.js-motion [data-grow] { transform-origin: 0 50%; }

/* Numbers that count up */
.num { display: inline-block; }

/* Story: below 900px, or without JavaScript, each block carries its own image, stacked. */
@media (min-width: 900px) {
  html:not(.js-story) .feature {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(32px, 6vw, 96px);
    align-items: center;
  }
  html:not(.js-story) .feature:nth-child(2) .feature-media { order: -1; }
  html:not(.js-story) .feature:nth-child(2) .feature-copy { order: 0; }
}

/* Story: wide screens with JavaScript. The phone stays; the text scrolls past. */
@media (min-width: 900px) {
  html.js-story .story {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: clamp(32px, 6vw, 96px);
    /* One constant phone size for the whole section: it leaves room below for the DAC, which hangs off its port. */
    --story-h: clamp(420px, calc(var(--vh) * .64), 900px);
  }
  /* The padding puts the middle of the first block level with the phone when it pins, and the last one when it lets go. */
  html.js-story .story-copy { grid-column: 1; grid-row: 1; padding-block: calc(var(--vh) * .14); }
  html.js-story .story-stage {
    display: flex;
    grid-column: 2;
    grid-row: 1;
    position: sticky;
    top: 0;
    height: var(--vh);
    align-self: start;
    align-items: center;
    justify-content: center;
    contain: layout;
  }
  html.js-story .story-phone {
    position: relative;
    width: calc((var(--story-h) - 22px) * 600 / 1342 + 22px);
    border: 1px solid transparent;
    border-radius: 46px;
    padding: 10px;
    background:
      radial-gradient(240px circle at var(--lx, 22%) var(--ly, 8%), rgba(255, 255, 255, .055), transparent 62%) padding-box,
      linear-gradient(#14111C, #14111C) padding-box,
      radial-gradient(240px circle at var(--lx, 22%) var(--ly, 8%), var(--rim-hot), var(--rim-glow) 34%, var(--line-3) 74%) border-box;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, .14),
      0 28px 64px -18px rgba(0, 0, 0, .78),
      0 6px 18px -6px rgba(0, 0, 0, .55);
  }
  .story-screen {
    position: relative;
    aspect-ratio: 600 / 1342;
    border-radius: 36px;
    overflow: hidden;
    background: #000;
  }
  .story-screen > * {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
  }
  .story-screen > .on { opacity: 1; }
  /* Opacity of the screens, the text blocks and the DAC follows the scroll position (site.js): no CSS transitions here. */

  html.js-story .feature {
    position: relative;
    min-height: calc(var(--vh) * .72);
    justify-content: center;
    border-top: 0;
    padding-top: 0;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    align-content: center;
  }
  /* The per-block image stays in the document for screen readers, off screen for everyone else. */
  html.js-story .feature-media {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html .rv, html .rvl .ln, html .rvi > *,
  html .flow-row > .node, html .flow-row > .pl-flow {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  html .feature { opacity: 1 !important; transition: none !important; }
  html .story-screen > * { transition: none !important; }
  html .hero-head, html .demo, html [data-grow] { will-change: auto !important; transform: none !important; opacity: 1 !important; }
}

/* ------------------------------------------------------------------ */
/* Block 02: a DAC hangs off the phone and drifts; the phone answers.   */
/* Pure SVG; only opacity and transform animate. The base styles are    */
/* the final frame, which is what reduced motion shows. The loop is     */
/* under no-preference.                                                 */
/* ------------------------------------------------------------------ */
.scene-narrow { width: min(340px, 100%); }
.scene-narrow svg, .scene-slot svg { display: block; width: 100%; height: auto; }
.scene-slot svg { height: 100%; }

.sc-bg { fill: #0D0B12; }
.sc-frame { fill: #14111C; stroke: var(--line-2); stroke-width: 1; }
.sc-port { fill: #040307; stroke: var(--line-2); stroke-width: 1; }
.sc-line { fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-linejoin: round; }
.sc-fill { fill: #14111C; }
.sc-plug { fill: #0D0B12; }
.sc-pin { fill: var(--ink-3); }
.sc-cheek { fill: var(--accent); opacity: .5; }
.sc-eye { fill: var(--ink); }
.sc-mouth { fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.sc-mouth.sc-open { fill: #0D0B12; }
.sc-sweat { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linejoin: round; }
.sc-neutral, .sc-happy { opacity: 0; }

.sc-cable { fill: none; stroke: #6F6788; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.sc-usb { fill: #1C1827; stroke: var(--ink); stroke-width: 1.5; }
.sc-cdot { fill: var(--accent); opacity: 0; }
.sc-reset-pulse { fill: var(--ink); stroke: var(--accent); stroke-width: 1.4; opacity: 0; }

.sc-sans { font-family: var(--sans); font-weight: 600; font-size: 15px; fill: var(--ink); }
.sc-mono { font-family: var(--mono); fill: var(--ink-2); }
.sc-hot { fill: var(--accent); }
.sc-r { font-size: 15px; text-anchor: middle; fill: var(--ink); }
.sc-rstep, .sc-r105 { opacity: 0; fill: var(--accent); }
.sc-label { font-size: 11px; letter-spacing: .02em; fill: var(--accent); }
.sc-hdr { font-size: 11.5px; fill: var(--ink-3); }
.sc-stat { font-size: 10.5px; letter-spacing: .04em; text-anchor: end; }
.sc-stat-ok { fill: var(--ink-3); }
.sc-stat-drift { fill: var(--accent); opacity: 0; }
.sc-tc { font-size: 11px; fill: var(--ink-3); }
.sc-tc-r { text-anchor: end; }
.sc-recline { font-size: 13.5px; fill: var(--ink-2); }
.sc-reddot { fill: var(--accent); }
.sc-ping { fill: none; stroke: var(--accent); stroke-width: 1.5; opacity: 0; }

.sc-bubble-box { fill: #14111C; stroke: #6F6788; }
.sc-bubble-tail { fill: #14111C; stroke: #6F6788; }
.sc-tail-cover { fill: #14111C; stroke: none; }
.sc-bubble-accent { stroke: var(--accent); }
.sc-avatar { fill: #14111C; stroke: var(--accent); stroke-width: 1.5; }
.sc-p { fill: var(--accent); fill-rule: evenodd; }

.sc-track { fill: #2A2439; }
.sc-level { fill: var(--ink-3); }
.sc-over { fill: var(--accent); transform-box: fill-box; transform-origin: 0 50%; transform: scaleX(0); }
.sc-tick { fill: none; stroke: var(--ink); stroke-width: 1; opacity: .55; }

/* The phone's screen: a player that keeps playing the whole time */
.sc-cover { fill: #14111C; stroke: #2A2439; stroke-width: 1; }
.sc-ring { fill: none; stroke: var(--accent); stroke-width: 1.5; opacity: .85; }
.sc-ring2 { stroke: var(--ink-3); opacity: .6; }
.sc-core { fill: var(--accent); }
.sc-arc { fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; opacity: .7; }
.sc-arc2 { stroke: var(--accent); opacity: .9; }
.sc-disc-dot { fill: var(--ink); opacity: .85; }
.sc-t1 { fill: var(--ink-2); }
.sc-t2 { fill: #3E3852; }
.sc-wave path { fill: none; stroke-width: 4; stroke-linecap: round; }
.sc-wave-dim path { stroke: #3E3852; }
.sc-wave-hot path { stroke: var(--accent); }
.sc-playhead { fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-linecap: round; }
.sc-btn { fill: var(--ink); }
.sc-btn-ico { fill: #0D0B12; }
.sc-ico { fill: var(--ink-3); }
.sc-bubble { transform-box: fill-box; transform-origin: 50% 100%; }

/* The sound gets dirty while the buffer climbs: all of this is hidden in the final (clean) frame. */
.sc-dirty, .sc-noise { opacity: 0; }
.sc-speck { fill: none; stroke: var(--ink-2); stroke-width: 1.4; opacity: 0; }

/* Wide screens: the pinned phone keeps one size; the DAC hangs off its port and is scrubbed in and out by the scroll (site.js). */
.story-dac { display: none; }
@media (min-width: 900px) {
  html.js-story .story-phone::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 3px;
    width: 34px;
    height: 4px;
    margin-left: -17px;
    border-radius: 2px;
    background: #040307;
    border: 1px solid var(--line-2);
  }
  html.js-story .story-dac {
    display: block;
    position: absolute;
    top: 100%;
    left: 50%;
    translate: -50% 0;
    /* 160% of the phone, but never wider than the pinned column */
    width: min(160%, 570px);
    height: auto;
    opacity: 0;
    transform: translateY(-14px);
    pointer-events: none;
  }
}

/* Static spread / final frame is the base. Loops are under no-preference. */
@media (prefers-reduced-motion: reduce) {
  html .story-phone, html .story-dac { transition: none !important; }
}
@media (prefers-reduced-motion: no-preference) {
  .sc-face, .sc-r, .sc-over, .sc-bubble, .sc-rec, .sc-cdot, .sc-wave,
  .sc-stat, .sc-ping, .sc-reset-pulse, .sc-dac-motion, .sc-sweat {
    animation-duration: 9s;
    animation-iteration-count: infinite;
    animation-fill-mode: both;
    animation-timing-function: var(--ease);
    animation-play-state: var(--sc-play, running);
  }
  .sc-wave { animation-name: sc-wave; animation-duration: 2.4s; animation-timing-function: linear; }
  .sc-disc { animation: sc-spin 6s linear infinite; animation-play-state: var(--sc-play, running); }
  .sc-cdot { animation-name: sc-cdot; animation-duration: 1.5s; animation-timing-function: linear; }
  .sc-c1 { animation-delay: 0s; }
  .sc-c2 { animation-delay: -.5s; }
  .sc-c3 { animation-delay: -1s; }

  .sc-neutral { animation-name: sc-neutral; }
  .sc-happy { animation-name: sc-happy; }
  .sc-sheepish { animation-name: sc-sheepish; }
  .sc-r100 { animation-name: sc-r100; }
  .sc-rstep { animation-name: sc-rstep; }
  .sc-r101 { animation-delay: 1.3s; }
  .sc-r102 { animation-delay: 1.6s; }
  .sc-r103 { animation-delay: 1.9s; }
  .sc-r104 { animation-delay: 2.2s; }
  .sc-r105 { animation-name: sc-r105; }
  .sc-over { animation-name: sc-over; }
  .sc-b1 { animation-name: sc-b1; }
  .sc-b2 { animation-name: sc-b2; }
  .sc-rec { animation-name: sc-rec; }
  .sc-stat-ok { animation-name: sc-r100; }
  .sc-stat-drift { animation-name: sc-stat-drift; }
  .sc-ping { animation-name: sc-ping; }
  .sc-reset-pulse { animation-name: sc-reset-pulse; animation-timing-function: linear; }
  .sc-dac-motion { animation-name: sc-dac-motion; }
  .sc-sweat { animation-name: sc-sweat-drop; }

  /* Distortion: crisp digital jitter frames and brief micro-tears between 1.3 s and 6.5 s. */
  .sc-clean { animation: sc-env-clean 9s linear infinite both; animation-play-state: var(--sc-play, running); }
  .sc-dirty, .sc-noise { animation: sc-env 9s linear infinite both; animation-play-state: var(--sc-play, running); }
  .sc-dv1 { animation: sc-dv-a .34s steps(1, end) infinite both; animation-play-state: var(--sc-play, running); }
  .sc-dv2 { animation: sc-dv-b .34s steps(1, end) infinite both; animation-play-state: var(--sc-play, running); }
  .sc-slice { animation: sc-slice 1.5s steps(1, end) infinite both; animation-play-state: var(--sc-play, running); }
  .sc-sl2 { animation-duration: 1.9s; animation-delay: -.6s; }
  .sc-sl3 { animation-duration: 1.3s; animation-delay: -.9s; }
  .sc-sl4 { animation: sc-slice-soft 2.2s steps(1, end) -.4s infinite both; animation-play-state: var(--sc-play, running); }
  .sc-speck { animation: sc-speck .7s steps(1, end) infinite both; animation-play-state: var(--sc-play, running); }
  .sc-sp2 { animation-duration: .95s; animation-delay: -.25s; }
  .sc-sp3 { animation-duration: .82s; animation-delay: -.5s; }
  .sc-sp4 { animation-duration: 1.15s; animation-delay: -.12s; }

  @keyframes sc-env { 0%, 14.4% { opacity: 0; } 20%, 71.1% { opacity: 1; } 72.2%, 100% { opacity: 0; } }
  @keyframes sc-env-clean { 0%, 14.4% { opacity: 1; } 20%, 71.1% { opacity: 0; } 72.2%, 100% { opacity: 1; } }
  @keyframes sc-dv-a { 0%, 54% { opacity: 1; } 55%, 100% { opacity: 0; } }
  @keyframes sc-dv-b { 0%, 54% { opacity: 0; } 55%, 100% { opacity: 1; } }
  @keyframes sc-slice {
    0%, 100% { opacity: 0; transform: translateX(0); }
    14% { opacity: 1; transform: translateX(7px); }
    21% { opacity: 0; transform: translateX(0); }
    58% { opacity: 1; transform: translateX(-6px); }
    64% { opacity: 1; transform: translateX(4px); }
    70% { opacity: 0; transform: translateX(0); }
  }
  @keyframes sc-slice-soft {
    0%, 100% { opacity: 0; transform: translateX(0); }
    32% { opacity: 1; transform: translateX(4px); }
    37% { opacity: 0; transform: translateX(0); }
    76% { opacity: 1; transform: translateX(-3px); }
    81% { opacity: 0; transform: translateX(0); }
  }
  @keyframes sc-speck {
    0%, 100% { opacity: 0; }
    18% { opacity: .65; }
    28% { opacity: 0; }
    72% { opacity: .45; }
    80% { opacity: 0; }
  }

  @keyframes sc-wave { to { transform: translateX(-140px); } }
  @keyframes sc-spin { to { transform: rotate(360deg); } }
  @keyframes sc-cdot {
    0% { transform: translate(0, 0); opacity: 0; }
    10% { opacity: 1; }
    56% { transform: translate(0, 66px); }
    64% { transform: translate(3px, 75px); }
    72% { transform: translate(12px, 78px); opacity: 1; }
    94% { opacity: 1; }
    100% { transform: translate(44px, 78px); opacity: 0; }
  }
  @keyframes sc-neutral { 0%, 24.4% { opacity: 1; } 25.6%, 95.6% { opacity: 0; } 100% { opacity: 1; } }
  @keyframes sc-happy { 0%, 24.4% { opacity: 0; } 25.6%, 71.1% { opacity: 1; } 72.2%, 100% { opacity: 0; } }
  @keyframes sc-sheepish { 0%, 71.1% { opacity: 0; } 72.2%, 95.6% { opacity: 1; } 100% { opacity: 0; } }
  @keyframes sc-r100 { 0%, 14.4% { opacity: 1; } 14.5%, 72.1% { opacity: 0; } 72.2%, 100% { opacity: 1; } }
  @keyframes sc-rstep { 0% { opacity: 0; } .1%, 3.3% { opacity: 1; } 3.4%, 100% { opacity: 0; } }
  @keyframes sc-r105 { 0%, 27.7% { opacity: 0; } 27.8%, 72.1% { opacity: 1; } 72.2%, 100% { opacity: 0; } }
  @keyframes sc-over { 0%, 14.4% { transform: scaleX(0); } 27.8%, 72.1% { transform: scaleX(1); } 72.4%, 100% { transform: scaleX(0); } }
  @keyframes sc-b1 {
    0%, 28.9% { opacity: 0; transform: translateY(8px) scale(.94); }
    33.3%, 64.4% { opacity: 1; transform: none; }
    70%, 95.6% { opacity: .42; transform: none; }
    100% { opacity: 0; transform: none; }
  }
  @keyframes sc-b2 {
    0%, 64.4% { opacity: 0; transform: translateY(8px) scale(.94); }
    68.9%, 95.6% { opacity: 1; transform: none; }
    100% { opacity: 0; transform: none; }
  }
  @keyframes sc-rec { 0%, 75.6% { opacity: 0; } 80%, 95.6% { opacity: 1; } 100% { opacity: 0; } }
  @keyframes sc-stat-drift { 0%, 14.4% { opacity: 0; } 14.5%, 72.1% { opacity: 1; } 72.2%, 100% { opacity: 0; } }
  @keyframes sc-ping {
    0%, 75.6% { opacity: 0; transform: scale(1); }
    77.5% { opacity: .85; transform: scale(1.2); }
    88% { opacity: 0; transform: scale(4); }
    100% { opacity: 0; transform: scale(4); }
  }
  @keyframes sc-reset-pulse {
    0%, 67.5% { transform: translate(0, 0) scale(.6); opacity: 0; }
    68.2% { transform: translate(0, 0) scale(1); opacity: 1; }
    70.4% { transform: translate(0, 66px) scale(1); opacity: 1; }
    70.8% { transform: translate(3px, 75px) scale(1); opacity: 1; }
    71.2% { transform: translate(12px, 78px) scale(1); opacity: 1; }
    72.2% { transform: translate(44px, 78px) scale(1.2); opacity: 1; }
    73.5%, 100% { transform: translate(44px, 78px) scale(1.6); opacity: 0; }
  }
  @keyframes sc-dac-motion {
    0%, 24% { transform: none; }
    29% { transform: translateY(-4px) rotate(-3.5deg); }
    42% { transform: translateY(-1px) rotate(2.5deg); }
    56% { transform: translateY(-3.5px) rotate(-2.5deg); }
    68% { transform: translateY(-1px) rotate(1deg); }
    72.2% { transform: translateY(3.5px) scale(.95, .92) rotate(2deg); }
    77% { transform: translateY(1px) scale(1) rotate(1.5deg); }
    95.6%, 100% { transform: none; }
  }
  @keyframes sc-sweat-drop {
    0%, 72% { transform: translateY(-4px); opacity: 0; }
    75% { transform: translateY(-1px); opacity: 1; }
    92% { transform: translateY(5px); opacity: .85; }
    96%, 100% { transform: translateY(6px); opacity: 0; }
  }
}

@media (min-width: 600px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 960px) {
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ------------------------------------------------------------------ */
/* Polylute Void FX                                                   */
/* ------------------------------------------------------------------ */
.footer-easter {
  background: none;
  border: 0;
  padding: 8px 0;
  cursor: pointer;
  transition: color 180ms ease;
}
.footer-easter:hover { color: var(--ink-2); }
html.void-mode .footer-easter { color: var(--accent); }

html.void-mode,
html.void-mode .page {
  --accent: #D66BFF;
  --on-accent: #170821;
  --rim-hot: rgba(255, 232, 252, .88);
  --rim-glow: rgba(214, 107, 255, .62);
}
html.void-mode .page {
  background-image: linear-gradient(180deg, #0B0A0F 0%, #150C26 35%, #1C0F33 68%, #0B0A0F 100%);
}

.pl-fx-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 4;
}

@media (prefers-reduced-motion: reduce) {
  .pl-fx-canvas { display: none; }
}
