/* ==========================================================================
   Zeroth — a purple night, built from blocks.

   The mascot is a pixel hatchling under a cyberpunk zero ring, so the page is
   a pixel UI: hard 2px borders, bevelled slots, an 8px grid, a pixel display
   face for Latin labels, and the product's own screenshots in game-window
   frames. No paper, no serif, no soft cards.

   Cyan is the action colour; purple is the world; gold and red carry status.
   ========================================================================== */

@font-face {
  font-family: "Silkscreen";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/silkscreen-400.woff2") format("woff2");
}

@font-face {
  font-family: "Silkscreen";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/silkscreen-700.woff2") format("woff2");
}

:root {
  color-scheme: dark;

  --bg: #0b0b23;
  --bg-deep: #07071a;
  --panel: #151638;
  --panel-2: #1c1d46;

  --ink: #ede9ff;
  --ink-2: #beb8e0;
  --ink-3: #9a93c4;

  --line: #2b2c5e;
  --line-soft: #23244f;
  --line-strong: #3d3e78;

  --purple: #8b6bf0;
  --purple-2: #b5a0f5;
  --cyan: #5fe0f0;
  --cyan-2: #9af2ff;
  --cyan-dark: #0aa7ba;
  --gold: #f2c56b;
  --red: #f07a7a;
  --green: #7ed9a0;

  --bevel-light: rgba(214, 205, 255, 0.16);
  --bevel-dark: rgba(0, 0, 0, 0.52);
  --shadow: rgba(3, 3, 12, 0.52);

  --sans: "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC",
    "Noto Sans CJK SC", "Microsoft YaHei", system-ui, sans-serif;
  --mono: "SFMono-Regular", "SF Mono", Menlo, Consolas, "Liberation Mono",
    monospace;
  --pixel: "Silkscreen", var(--mono);

  --wrap: 1200px;
  --pad: clamp(18px, 4vw, 48px);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    radial-gradient(
      980px 520px at 16% -10%,
      rgba(139, 107, 240, 0.2),
      transparent 66%
    ),
    radial-gradient(
      760px 400px at 92% -8%,
      rgba(95, 224, 240, 0.09),
      transparent 62%
    ),
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: auto, auto, 32px 32px, 32px 32px;
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

figure,
p,
h1,
h2,
h3 {
  margin: 0;
}

a {
  color: inherit;
}

code,
pre {
  font-family: var(--mono);
}

::selection {
  background: var(--cyan);
  color: var(--bg-deep);
}

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

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-right: var(--pad);
  padding-left: var(--pad);
}

.skip {
  position: absolute;
  top: -70px;
  left: 16px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--cyan);
  color: var(--bg-deep);
  font: 700 12px/1 var(--sans);
  text-decoration: none;
}

.skip:focus {
  top: 14px;
}

/* --------------------------------------------------------------------------
   Shared pixel blocks
   -------------------------------------------------------------------------- */

.slot {
  background: var(--panel);
  border: 2px solid var(--bg-deep);
  box-shadow: inset 2px 2px 0 var(--bevel-light),
    inset -2px -2px 0 var(--bevel-dark), 5px 5px 0 var(--shadow);
}

/* --------------------------------------------------------------------------
   Top bar
   -------------------------------------------------------------------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(11, 11, 35, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.topbar-inner {
  display: flex;
  gap: 30px;
  align-items: center;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  flex: none;
  gap: 10px;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
}

.brand img {
  width: 32px;
  height: auto;
  image-rendering: pixelated;
}

.wordmark {
  font: 700 1.12rem/1 var(--pixel);
  letter-spacing: 0.01em;
}

.version {
  align-self: flex-end;
  margin-bottom: 2px;
  color: var(--ink-3);
  font: 400 9px/1 var(--pixel);
}

.nav {
  display: flex;
  gap: clamp(16px, 2.4vw, 28px);
  align-items: center;
  margin-left: auto;
}

.nav a {
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  color: var(--ink-2);
  font: 600 13px/1 var(--sans);
  text-decoration: none;
}

.nav a:hover {
  color: var(--ink);
}

.nav a[aria-current="true"] {
  border-bottom-color: var(--cyan);
  color: var(--cyan);
}

.topbar-actions {
  display: flex;
  flex: none;
  gap: 16px;
  align-items: center;
}

.gh {
  color: var(--ink-3);
  font: 400 11px/1 var(--pixel);
  text-decoration: none;
}

.gh:hover {
  color: var(--cyan);
}

.nav-cta,
.copy {
  appearance: none;
  border: 2px solid var(--bg-deep);
  background: var(--cyan);
  color: var(--bg-deep);
  font: 700 12.5px/1 var(--sans);
  cursor: pointer;
  box-shadow: inset 2px 2px 0 rgba(255, 255, 255, 0.5),
    inset -2px -2px 0 rgba(0, 0, 0, 0.18), 4px 4px 0 rgba(4, 7, 18, 0.85);
  transition: background-color 120ms var(--ease),
    transform 120ms var(--ease), box-shadow 120ms var(--ease);
}

.nav-cta {
  padding: 10px 14px;
  text-decoration: none;
}

.copy {
  padding: 12px 18px;
  min-height: 46px;
}

.nav-cta:hover,
.copy:hover {
  background: var(--cyan-2);
}

.nav-cta:active,
.copy:active {
  transform: translate(2px, 2px);
  box-shadow: inset 2px 2px 0 rgba(255, 255, 255, 0.4),
    inset -2px -2px 0 rgba(0, 0, 0, 0.2), 2px 2px 0 rgba(4, 7, 18, 0.85);
}

.progress {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: transparent;
  pointer-events: none;
}

.progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--cyan);
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  padding: clamp(44px, 6vw, 82px) 0 0;
  scroll-margin-top: 90px;
}

.hero-copy {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 24px clamp(34px, 5vw, 62px);
  align-items: end;
}

.hero-text {
  min-width: 0;
}

.hero h1 {
  color: var(--ink);
  font: 700 clamp(2.7rem, 4.8vw, 4.5rem) / 1.16 var(--sans);
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.lede {
  max-width: 27em;
  color: var(--ink-2);
  font-size: clamp(1rem, 1.2vw, 1.08rem);
  line-height: 1.9;
}

.lede strong {
  color: var(--ink);
  font-weight: 600;
}

.hero-note {
  margin-top: 18px;
  color: var(--ink-3);
  font: 11.5px/1.7 var(--mono);
}

.demo {
  margin-top: 38px;
}

.demo video {
  display: block;
  width: 100%;
  height: auto;
  padding: 7px;
  background: var(--bg-deep);
  border: 2px solid var(--line-strong);
  box-shadow: 8px 8px 0 var(--shadow);
}

.demo figcaption {
  margin-top: 12px;
  color: var(--ink-3);
  font: 11px/1.6 var(--mono);
}

.demo figcaption b {
  color: var(--cyan);
  font-weight: 400;
}

/* --------------------------------------------------------------------------
   Install hotbar
   -------------------------------------------------------------------------- */

.install-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 16px;
  align-items: start;
  margin-top: 34px;
  padding: 12px;
  background: var(--panel);
  border: 2px solid var(--bg-deep);
  box-shadow: inset 2px 2px 0 var(--bevel-light),
    inset -2px -2px 0 var(--bevel-dark), 6px 6px 0 var(--shadow);
}

.install-bar-section {
  margin-top: 28px;
}

.command {
  display: flex;
  grid-column: 1;
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 12px 14px;
  background: var(--bg-deep);
  border: 2px solid var(--line);
  box-shadow: inset 2px 2px 0 rgba(0, 0, 0, 0.45);
}

.sig {
  flex: none;
  color: var(--cyan);
  font: 400 12.5px/1.5 var(--mono);
  user-select: none;
}

.command code {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 2px;
  color: var(--purple-2);
  font: 12.5px/1.5 var(--mono);
  white-space: nowrap;
  scrollbar-color: var(--line-strong) transparent;
  scrollbar-width: thin;
}

.command code::-webkit-scrollbar {
  height: 6px;
}

.command code::-webkit-scrollbar-thumb {
  background: var(--line-strong);
}

.copy {
  grid-column: 2;
  grid-row: 1;
  align-self: stretch;
}

.install-bar .note {
  grid-column: 1;
  color: var(--ink-3);
  font: 11.5px/1.7 var(--mono);
}

.source-link {
  grid-column: 2;
  justify-self: end;
  color: var(--ink-3);
  font: 11.5px/1.7 var(--mono);
  text-underline-offset: 3px;
}

.source-link:hover {
  color: var(--cyan);
}

/* --------------------------------------------------------------------------
   Stats: four inventory slots
   -------------------------------------------------------------------------- */

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 34px;
}

.stat {
  min-width: 0;
  padding: 18px;
  background: var(--panel);
  border: 2px solid var(--bg-deep);
  box-shadow: inset 2px 2px 0 var(--bevel-light),
    inset -2px -2px 0 var(--bevel-dark), 5px 5px 0 var(--shadow);
}

.stat b {
  display: block;
  color: var(--cyan);
  font: 700 2.2rem/1 var(--pixel);
  font-variant-numeric: tabular-nums;
}

.stat span {
  display: block;
  margin-top: 7px;
  color: var(--ink-3);
  font-size: 12px;
}

.stats-note {
  grid-column: 1 / -1;
  margin-top: 2px;
  color: var(--ink-3);
  font: 11.5px/1.8 var(--mono);
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

.section {
  padding: clamp(68px, 8vw, 108px) 0 clamp(58px, 6.5vw, 86px);
  scroll-margin-top: 90px;
}

.section + .section {
  border-top: 2px solid var(--line-soft);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: 16px 52px;
  align-items: end;
  padding-bottom: clamp(26px, 3.4vw, 38px);
}

.kicker {
  display: flex;
  grid-column: 1 / -1;
  gap: 10px;
  align-items: center;
  color: var(--ink-3);
  font: 600 11px/1.4 var(--sans);
}

.kicker b {
  color: var(--cyan);
  font: 400 11px/1.4 var(--pixel);
}

.section h2 {
  color: var(--ink);
  font: 700 clamp(1.9rem, 3.4vw, 2.9rem) / 1.3 var(--sans);
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.section-lead {
  margin-bottom: 4px;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.85;
}

.section-lead a {
  color: var(--cyan);
  text-underline-offset: 3px;
}

/* A screenshot in a game-window frame. */

.plate {
  min-width: 0;
}

.plate video,
.plate img {
  display: block;
  width: 100%;
  height: auto;
  padding: 7px;
  background: var(--bg-deep);
  border: 2px solid var(--line-strong);
  box-shadow: 8px 8px 0 var(--shadow);
}

.plate figcaption {
  margin-top: 12px;
  color: var(--ink-3);
  font: 11px/1.6 var(--mono);
}

.plate figcaption b {
  color: var(--cyan);
  font-weight: 400;
}

.control-plate {
  margin-top: 26px;
}

.video-wrap {
  position: relative;
  min-width: 0;
}

.video-toggle {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  appearance: none;
  padding: 7px 10px;
  border: 2px solid var(--bg-deep);
  background: var(--cyan);
  color: var(--bg-deep);
  font: 700 10.5px/1 var(--sans);
  cursor: pointer;
  box-shadow: inset 2px 2px 0 rgba(255, 255, 255, 0.5),
    inset -2px -2px 0 rgba(0, 0, 0, 0.18), 3px 3px 0 rgba(4, 7, 18, 0.8);
}

.video-toggle:hover {
  background: var(--cyan-2);
}

.video-toggle:active {
  transform: translate(2px, 2px);
  box-shadow: inset 2px 2px 0 rgba(255, 255, 255, 0.4),
    1px 1px 0 rgba(4, 7, 18, 0.8);
}

/* --------------------------------------------------------------------------
   Record notes
   -------------------------------------------------------------------------- */

.notes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.note {
  min-width: 0;
  padding: 18px;
  background: var(--panel);
  border: 2px solid var(--bg-deep);
  box-shadow: inset 2px 2px 0 var(--bevel-light),
    inset -2px -2px 0 var(--bevel-dark), 5px 5px 0 var(--shadow);
}

.note h3 {
  margin-bottom: 7px;
  color: var(--ink);
  font: 600 15px/1.6 var(--sans);
}

.note p {
  color: var(--ink-2);
  font-size: 13.5px;
  line-height: 1.85;
}

/* --------------------------------------------------------------------------
   Permission modes
   -------------------------------------------------------------------------- */

.modes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.mode {
  min-width: 0;
  padding: 18px;
  background: var(--panel);
  border: 2px solid var(--bg-deep);
  box-shadow: inset 2px 2px 0 var(--bevel-light),
    inset -2px -2px 0 var(--bevel-dark), 5px 5px 0 var(--shadow);
}

.mode h3 {
  margin-bottom: 10px;
  font: 700 14px/1.3 var(--pixel);
}

.mode h3::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 9px;
  background: currentColor;
  vertical-align: 1px;
}

.mode p {
  color: var(--ink-2);
  font-size: 13.5px;
  line-height: 1.8;
}

.mode span {
  display: block;
  margin-top: 14px;
  color: var(--ink-3);
  font: 10.5px/1.5 var(--mono);
}

.m-manual {
  color: var(--ink-3);
}

.m-edit {
  color: var(--cyan);
}

.m-auto {
  color: var(--gold);
}

.m-master {
  color: var(--red);
}

.mode-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 20px;
  align-items: center;
  margin-top: 22px;
}

.footer-sample {
  display: flex;
  gap: 18px;
  align-items: baseline;
  justify-content: space-between;
  width: min(100%, 520px);
  padding: 10px 12px;
  background: var(--bg-deep);
  border: 2px solid var(--line);
  box-shadow: inset 2px 2px 0 rgba(0, 0, 0, 0.45);
  color: var(--ink-3);
  font: 11px/1.5 var(--mono);
}

.footer-sample .auto {
  color: var(--gold);
}

.fine {
  margin-top: 12px;
  color: var(--ink-3);
  font-size: 11.5px;
  line-height: 1.8;
}

.fine a {
  color: var(--cyan);
  text-underline-offset: 3px;
}

.mode-foot .fine {
  flex: 1 1 240px;
  margin-top: 0;
}

/* --------------------------------------------------------------------------
   Providers
   -------------------------------------------------------------------------- */

.providers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.pgroup {
  min-width: 0;
  padding: 18px;
  background: var(--panel);
  border: 2px solid var(--bg-deep);
  box-shadow: inset 2px 2px 0 var(--bevel-light),
    inset -2px -2px 0 var(--bevel-dark), 5px 5px 0 var(--shadow);
}

.pgroup h3 {
  margin-bottom: 8px;
  color: var(--ink);
  font: 600 15px/1.6 var(--sans);
}

.pgroup ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.pgroup li {
  padding: 7px 0;
  border-top: 1px solid var(--line-soft);
  color: var(--ink-2);
  font-size: 13.5px;
}

.provider-note {
  margin-top: 20px;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.8;
}

.provider-note a {
  color: var(--cyan);
  text-underline-offset: 3px;
}

/* --------------------------------------------------------------------------
   Install
   -------------------------------------------------------------------------- */

.install-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr);
  gap: clamp(30px, 4vw, 52px);
  align-items: start;
  margin-top: 28px;
}

.install-copy {
  min-width: 0;
}

.spec-list {
  display: grid;
  grid-template-columns: 6rem minmax(0, 1fr);
  margin: 0;
  border-top: 1px solid var(--line);
}

.spec-list dt,
.spec-list dd {
  margin: 0;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13px;
  line-height: 1.75;
}

.spec-list dt {
  color: var(--ink-3);
  font: 10.5px/1.9 var(--mono);
}

.spec-list dd {
  color: var(--ink-2);
}

.install-copy h3 {
  margin: 26px 0 0;
  color: var(--ink);
  font: 600 15px/1.6 var(--sans);
}

.first-run {
  margin: 8px 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
  counter-reset: run;
  list-style: none;
}

.first-run li {
  display: grid;
  grid-template-columns: 2.2rem minmax(0, 1fr);
  gap: 0.7rem;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink-2);
  font-size: 13.5px;
  line-height: 1.8;
  counter-increment: run;
}

.first-run li::before {
  content: counter(run, decimal-leading-zero);
  color: var(--cyan);
  font: 400 10px/2.2 var(--pixel);
}

.install-shot {
  margin-top: 2px;
}

.source {
  margin-top: 30px;
  border-top: 1px solid var(--line);
}

.source summary {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  color: var(--ink);
  font: 600 13.5px/1.6 var(--sans);
  list-style: none;
  cursor: pointer;
}

.source summary::-webkit-details-marker {
  display: none;
}

.source summary::after {
  content: "+";
  color: var(--cyan);
  font: 400 18px/1 var(--mono);
}

.source[open] summary::after {
  content: "\2212";
}

.source summary:hover {
  color: var(--cyan);
}

.source p {
  margin: 10px 0 0;
  color: var(--ink-3);
  font-size: 12.5px;
  line-height: 1.8;
}

pre.code {
  max-width: 100%;
  margin: 0;
  padding: 14px 15px;
  overflow-x: auto;
  background: var(--bg-deep);
  border: 2px solid var(--line);
  box-shadow: inset 2px 2px 0 rgba(0, 0, 0, 0.45);
  color: var(--purple-2);
  font: 12px/1.75 var(--mono);
  tab-size: 2;
}

/* --------------------------------------------------------------------------
   FAQ
   -------------------------------------------------------------------------- */

.faq {
  padding: 0 18px;
  background: var(--panel);
  border: 2px solid var(--bg-deep);
  box-shadow: inset 2px 2px 0 var(--bevel-light),
    inset -2px -2px 0 var(--bevel-dark), 5px 5px 0 var(--shadow);
}

.faq details {
  border-bottom: 1px solid var(--line-soft);
}

.faq details:last-child {
  border-bottom: 0;
}

.faq summary {
  display: flex;
  gap: 24px;
  align-items: baseline;
  justify-content: space-between;
  padding: 15px 0;
  color: var(--ink);
  font: 600 15px/1.6 var(--sans);
  list-style: none;
  cursor: pointer;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  flex: none;
  color: var(--cyan);
  font: 400 18px/1 var(--mono);
}

.faq details[open] summary::after {
  content: "\2212";
}

.faq summary:hover {
  color: var(--cyan);
}

.faq p {
  max-width: 62em;
  margin: 0 0 18px;
  color: var(--ink-2);
  font-size: 13.5px;
  line-height: 1.9;
}

/* Inline code in prose: a small slot, not a code block. */
.lede code,
.hero-note code,
.section-lead code,
.note p code,
.stats-note code,
.provider-note code,
.first-run code,
.faq p code,
.plate figcaption code {
  padding: 1px 5px;
  background: var(--bg-deep);
  border: 1px solid var(--line);
  color: var(--purple-2);
  font: 11.5px/1.6 var(--mono);
}

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

.footer {
  margin-top: 16px;
  padding: clamp(34px, 4.5vw, 52px) 0 clamp(34px, 4vw, 44px);
  border-top: 2px solid var(--line);
  background: var(--bg-deep);
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  align-items: flex-end;
  justify-content: space-between;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.footer-top .wordmark {
  font-size: clamp(1.5rem, 2.6vw, 1.9rem);
}

.footer-top p {
  color: var(--ink-3);
  font: 11px/1.7 var(--mono);
  text-align: right;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.footer-grid h3 {
  margin-bottom: 6px;
  color: var(--ink-3);
  font: 400 10px/1.5 var(--pixel);
}

.footer-grid ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-grid li {
  padding: 3px 0;
}

.footer-grid a {
  color: var(--ink-2);
  font-size: 13.5px;
  text-decoration: none;
  text-underline-offset: 3px;
}

.footer-grid a:hover {
  color: var(--cyan);
  text-decoration: underline;
}

.colophon {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-top: 20px;
  color: var(--ink-3);
  font: 11px/1.8 var(--mono);
}

.colophon img {
  width: 44px;
  height: auto;
  image-rendering: pixelated;
}

.colophon p {
  max-width: 54em;
}

.colophon span {
  display: block;
  color: var(--ink-2);
}

.sign-off {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 22px;
  color: var(--ink-3);
  font: 10.5px/1.7 var(--mono);
}

/* --------------------------------------------------------------------------
   Motion — one arrival, then the page settles; sections rise as they enter.
   The timing is slow on purpose (pi.dev's lesson): a 760ms ease and a 16px
   rise read as a page settling, not as a carousel.
   -------------------------------------------------------------------------- */

.js .topbar {
  opacity: 0;
  transition: opacity 600ms var(--ease) 60ms;
}

.js.is-ready .topbar {
  opacity: 1;
}

.js .intro {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 900ms var(--ease), transform 900ms var(--ease);
}

.js .intro-1 {
  transition-delay: 0ms;
}

.js .intro-2 {
  transition-delay: 80ms;
}

.js .intro-3 {
  transition-delay: 160ms;
}

.js .intro-4 {
  transition-delay: 240ms;
}

.js .intro-5 {
  transition-delay: 320ms;
}

.js.is-ready .intro {
  opacity: 1;
  transform: none;
}

.js [data-reveal] {
  /* Not fully hidden: a full-page capture, a fast scroll or a reader who
     lands mid-page still sees the page, just a little quiet. The reveal is a
     brightening, not an appearance. */
  opacity: 0.62;
  transform: translateY(16px);
  transition: opacity 760ms var(--ease), transform 760ms var(--ease);
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* Stagger a grid's members by a frame or two, never more. */
.js .stats .stat:nth-child(2),
.js .notes .note:nth-child(2),
.js .modes .mode:nth-child(2),
.js .providers .pgroup:nth-child(2) {
  transition-delay: 70ms;
}

.js .stats .stat:nth-child(3),
.js .notes .note:nth-child(3),
.js .modes .mode:nth-child(3),
.js .providers .pgroup:nth-child(3) {
  transition-delay: 140ms;
}

.js .stats .stat:nth-child(4),
.js .modes .mode:nth-child(4) {
  transition-delay: 210ms;
}

.js .plate[data-reveal] {
  transition-delay: 90ms;
}

/* The pi.dev scroll cue: one prompt line, one blinking block. It fades out
   once the page has moved, so it never nags. */
.scroll-cue {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  margin-top: 22px;
  color: var(--ink-3);
  font: 11px/1 var(--pixel);
  letter-spacing: 0.07em;
  transition: opacity 300ms var(--ease);
}

.scroll-cue .cue-sign {
  color: var(--cyan);
}

.scroll-cue .cue-cursor {
  width: 6px;
  height: 11px;
  background: var(--cyan);
  animation: cue-blink 1.1s steps(1, end) infinite;
}

.scroll-cue.is-hidden {
  opacity: 0;
}

@keyframes cue-blink {
  50% {
    opacity: 0;
  }
}

.demo {
  margin-top: 18px;
}

.pgroup li {
  display: flex;
  gap: 10px;
  align-items: center;
}

.pgroup li img {
  flex: none;
  width: 26px;
  height: 26px;
  transition: transform 180ms var(--ease);
}

.pgroup li:hover img {
  transform: translateY(-1px) scale(1.06);
}

.pgroup li span {
  min-width: 0;
}

.first-run li span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.copy.is-copied {
  background: var(--green);
  border-color: var(--green);
}

.nav a {
  transition: color 160ms var(--ease),
    border-color 160ms var(--ease);
}

@media (prefers-reduced-motion: reduce) {
  .js .topbar,
  .js .intro,
  .js [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .scroll-cue .cue-cursor {
    animation: none;
  }

  .pgroup li img,
  .nav a,
  .copy,
  .video-toggle {
    transition: none;
  }
}

/* --------------------------------------------------------------------------
   Breakpoints
   -------------------------------------------------------------------------- */

@media (max-width: 1080px) {
  .hero-copy {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .topbar-inner {
    gap: 20px;
  }

  .nav {
    gap: 18px;
  }
}

@media (max-width: 900px) {
  .section-head {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .section-lead {
    margin-bottom: 0;
  }

  .modes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .providers,
  .notes {
    grid-template-columns: minmax(0, 1fr);
  }

  .install-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .topbar-inner {
    flex-wrap: wrap;
    gap: 6px 14px;
    padding: 10px 0 8px;
  }

  .brand {
    order: 1;
  }

  .topbar-actions {
    order: 2;
    margin-left: auto;
  }

  .nav {
    order: 3;
    width: 100%;
    margin-left: 0;
    gap: 20px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .gh {
    display: none;
  }

  .nav-cta {
    padding: 9px 12px;
  }

  .hero h1 {
    font-size: clamp(2.4rem, 9vw, 3.4rem);
  }

  .demo video,
  .plate video,
  .plate img {
    box-shadow: 5px 5px 0 var(--shadow);
  }

  .install-bar {
    grid-template-columns: minmax(0, 1fr);
  }

  .install-bar .command,
  .install-bar .copy,
  .install-bar .note,
  .install-bar .source-link {
    grid-column: 1;
  }

  .install-bar .copy {
    grid-row: auto;
    justify-self: start;
  }

  .source-link {
    justify-self: start;
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .modes {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0;
  }

  .footer-grid > section {
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 620px) {
  :root {
    --pad: 18px;
  }

  .topbar-inner {
    padding: 9px 0 7px;
  }

  .brand {
    gap: 8px;
  }

  .brand img {
    width: 28px;
  }

  .wordmark {
    font-size: 1rem;
  }

  .version {
    display: none;
  }

  .hero {
    padding-top: 34px;
  }

  .stat b {
    font-size: 1.9rem;
  }

  .section {
    padding-top: 50px;
  }

  .section h2 {
    font-size: clamp(1.65rem, 6.4vw, 2.05rem);
  }

  .faq {
    padding: 0 14px;
  }

  .spec-list {
    grid-template-columns: 5.4rem minmax(0, 1fr);
  }

  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-grid > section:last-child {
    border-bottom: 0;
  }

  .footer-top p {
    text-align: left;
  }
}
