/* ============================================================
 * Axion site — page + component styles
 * ============================================================ */

/* ====================================================
 * Top nav
 * ==================================================== */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: oklch(from var(--bg-0) l c h / 0.75);
  border-bottom: 1px solid var(--line-soft);
  height: 56px;
}
.nav-inner {
  height: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  color: var(--fg-0);
}
.nav-logo .wordmark {
  font-weight: 600;
  letter-spacing: 0.16em;
  font-size: 0.875rem;
}
.nav-logo .sublabel {
  font-family: var(--mono-font);
  font-size: 0.6875rem;
  color: var(--fg-3);
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  margin-left: 8px;
  white-space: nowrap;
  flex: none;
}
@media (max-width: 1100px) {
  .nav-logo .sublabel { display: none; }
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}
.nav-links a {
  font-size: 0.875rem;
  color: var(--fg-2);
  padding: 6px 12px;
  border-radius: var(--r-sm);
  transition: color 120ms, background 120ms;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--fg-0);
  background: var(--bg-2);
}
.nav-right {
  display: flex; align-items: center; gap: 12px;
}

/* ====================================================
 * Buttons
 * ==================================================== */

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  border-radius: var(--r);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;
  border: 1px solid transparent;
  transition: filter 120ms, background 120ms, border-color 120ms, transform 120ms;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow:
    0 0 0 1px oklch(from var(--accent) l c h / 0.4),
    0 6px 18px var(--accent-glow);
}
.btn-primary:hover { filter: brightness(1.08); }

.btn-secondary {
  background: transparent;
  color: var(--accent);
  border-color: oklch(from var(--accent) l c h / 0.35);
}
.btn-secondary:hover {
  border-color: var(--accent);
  background: var(--accent-wash);
}

.btn-ghost {
  color: var(--fg-1);
  background: var(--bg-2);
  border-color: var(--line);
}
.btn-ghost:hover { background: var(--bg-3); }

.btn-sm { padding: 6px 12px; font-size: 0.8125rem; border-radius: var(--r-sm); }
.btn-lg { padding: 14px 22px; font-size: 0.9375rem; }

.btn .arrow { font-size: 0.75em; transform: translateY(-1px); }

/* ====================================================
 * Theme switcher chip
 * ==================================================== */

.theme-switch {
  display: flex;
  align-items: center;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-1);
  box-shadow: var(--bevel-top);
}
.theme-switch button {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: grid; place-items: center;
  position: relative;
  transition: background 120ms;
}
.theme-switch button:hover { background: var(--bg-3); }
.theme-switch button[aria-pressed="true"] {
  background: var(--accent-wash);
  box-shadow: 0 0 0 1px var(--accent);
}
.theme-switch .swatch {
  width: 12px; height: 12px; border-radius: 50%;
  border: 1px solid oklch(0% 0 0 / 0.3);
}

/* ====================================================
 * Status chip (LIVE, badges)
 * ==================================================== */

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-1);
  font-family: var(--mono-font);
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  color: var(--fg-2);
}
.chip-live {
  color: var(--err);
  border-color: oklch(from var(--err) l c h / 0.4);
}
.chip-live::before {
  content: "";
  width: 6px; height: 6px;
  background: var(--err);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--err);
  animation: pulse 1.6s infinite ease-in-out;
}
.chip-accent {
  color: var(--accent);
  border-color: oklch(from var(--accent) l c h / 0.35);
  background: var(--accent-wash);
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}

/* ====================================================
 * Card primitive — mirrors app pedal/cab cards
 * ==================================================== */

.card {
  position: relative;
  background:
    linear-gradient(180deg, oklch(from var(--bg-2) calc(l + 0.01) c h), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
  overflow: hidden;
}
.card-accent-top::before {
  content: "";
  position: absolute; top: 0; left: 16px; right: 16px;
  height: 1px;
  background: linear-gradient(90deg,
    transparent,
    var(--accent) 30%, var(--accent) 70%,
    transparent);
  opacity: 0.7;
}
.card-glow {
  background:
    radial-gradient(80% 60% at 50% 0%, var(--accent-wash), transparent 70%),
    linear-gradient(180deg, oklch(from var(--bg-2) calc(l + 0.01) c h), var(--bg-2));
}

/* ====================================================
 * Signal-flow chevron divider (lifted from app)
 * ==================================================== */

.signal-flow {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--mono-font);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-3);
  user-select: none;
}
.signal-flow .node {
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--bg-1);
}
.signal-flow .node.active {
  color: var(--accent);
  border-color: oklch(from var(--accent) l c h / 0.4);
  background: var(--accent-wash);
}
.signal-flow .chev {
  color: var(--fg-3);
  font-size: 0.75rem;
  opacity: 0.6;
}

/* ====================================================
 * HERO
 * ==================================================== */

.hero {
  position: relative;
  padding-top: clamp(64px, 9vw, 120px);
  padding-bottom: clamp(48px, 7vw, 96px);
  overflow: hidden;
}
.hero::before {
  /* ambient accent glow — CSS only, no JS */
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 50% at 70% 25%, var(--accent-wash), transparent 65%),
    radial-gradient(40% 40% at 15% 80%, oklch(from var(--accent) l c h / 0.04), transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.hero > * { position: relative; z-index: 1; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
}

.hero h1 {
  font-size: clamp(2.5rem, 5.5vw, 4.5rem);
  font-weight: 500;
  line-height: 1.02;
}
.hero h1 .ink {
  color: var(--accent);
  font-style: normal;
}
.hero-sub {
  margin-top: 20px;
  max-width: 48ch;
  font-size: clamp(1.0625rem, 1.4vw, 1.1875rem);
  color: var(--fg-2);
  line-height: 1.55;
}
.hero-ctas {
  margin-top: 32px;
  display: flex; flex-wrap: wrap; gap: 12px;
  align-items: center;
}
.hero-meta {
  margin-top: 28px;
  display: flex; flex-wrap: wrap; gap: 24px;
  font-family: var(--mono-font);
  font-size: 0.75rem;
  color: var(--fg-3);
}
.hero-meta span strong {
  display: block;
  color: var(--fg-1);
  font-weight: 500;
  font-size: 0.8125rem;
  margin-bottom: 2px;
}

/* hero image / product visual */
.hero-visual {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--r-xl);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-1);
  box-shadow: var(--shadow-2);
}
.hero-visual::after {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 60% at 40% 30%, transparent, oklch(0% 0 0 / 0.4)),
    linear-gradient(160deg, var(--accent-wash), transparent 50%);
  pointer-events: none;
}
.hero-visual img { width: 100%; height: 100%; object-fit: cover; }
.hero-visual .overlay-label {
  position: absolute;
  bottom: 16px; left: 16px;
  z-index: 2;
  display: flex; flex-direction: column; gap: 4px;
  font-family: var(--mono-font);
  font-size: 0.6875rem;
  color: var(--fg-1);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.hero-visual .overlay-label .accent { color: var(--accent); }

/* Mock spectrum analyser drawn over the bottom half of the hero
 * image. Static per-bar heights set inline via --h; subtle scaleY
 * pulse staggered across nth-child groups makes it read as "live"
 * audio without any JS. Sits at z-index 1 (above the ::after
 * accent-wash, below .overlay-label at z-index 2) so the LIVE chip
 * stays the focal point. */
.hero-visual .hero-spectrum {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  height: 50%;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  padding: 0;
  pointer-events: none;
  /* Faint spectrum with a soft top fade so it bleeds into the photo instead
   * of cutting hard at the midline. The 0.04 dim is baked into the mask's
   * solid stop rather than applied via `opacity`: Firefox drops `opacity`
   * when it's combined with `mask-image` on the same element. A mask's alpha
   * multiplies the element's pixels, so a 0.04 solid stop reproduces the exact
   * same result — 4% visibility + top fade — in one property, no conflict. */
  mask-image: linear-gradient(to top, oklch(0% 0 0 / 0.04) 35%, transparent 100%);
  -webkit-mask-image: linear-gradient(to top, oklch(0% 0 0 / 0.04) 35%, transparent 100%);
}
.hero-visual .hero-spectrum span {
  flex: 1;
  height: var(--h, 50%);
  background: linear-gradient(to top, var(--accent), oklch(95% 0.04 220 / 0.85));
  border-radius: 2px 2px 0 0;
  transform-origin: bottom;
  animation: hero-spectrum-pulse 2.4s ease-in-out infinite alternate;
}
/* Stagger the pulse across overlapping nth-child groups so neighbouring
 * bars don't move in lockstep — gives the spectrum an organic, drifting
 * shimmer rather than a single bar-graph heave. */
.hero-visual .hero-spectrum span:nth-child(2n) { animation-delay: -0.4s; }
.hero-visual .hero-spectrum span:nth-child(3n) { animation-delay: -0.9s; }
.hero-visual .hero-spectrum span:nth-child(5n) { animation-delay: -1.5s; }
.hero-visual .hero-spectrum span:nth-child(7n) { animation-delay: -2.0s; animation-duration: 3.1s; }
@keyframes hero-spectrum-pulse {
  0%   { transform: scaleY(0.82); }
  50%  { transform: scaleY(1.08); }
  100% { transform: scaleY(0.88); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-visual .hero-spectrum span {
    animation: none;
  }
}

/* ====================================================
 * Section structure
 * ==================================================== */

.section {
  padding-block: clamp(56px, 9vw, 120px);
  position: relative;
}
.section-soft { background: var(--bg-1); }
.section-deep {
  background: var(--bg-0);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.section-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 24px;
  margin-bottom: clamp(32px, 5vw, 64px);
}
@media (max-width: 720px) {
  .section-head { grid-template-columns: 1fr; }
}
.section-head .title {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  letter-spacing: -0.025em;
  font-weight: 500;
  color: var(--fg-0);
  max-width: 22ch;
}
.section-head .deck {
  color: var(--fg-2);
  font-size: 1rem;
  max-width: 38ch;
}

/* ====================================================
 * Feature grid
 * ==================================================== */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  overflow: hidden;
}
@media (max-width: 1024px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  { .feature-grid { grid-template-columns: 1fr; } }

.feature {
  background: var(--bg-1);
  padding: 28px 24px 32px;
  display: flex; flex-direction: column;
  gap: 14px;
  min-height: 180px;
}
.feature .num {
  font-family: var(--mono-font);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  color: var(--accent);
  text-transform: uppercase;
}
.feature h3 {
  font-size: 1.0625rem;
  color: var(--fg-0);
  font-weight: 500;
  letter-spacing: -0.01em;
}
.feature p {
  font-size: 0.875rem;
  color: var(--fg-2);
  line-height: 1.5;
}
.feature .icon {
  width: 28px; height: 28px;
  color: var(--accent);
  margin-bottom: 6px;
}

/* ====================================================
 * Preset card
 * ==================================================== */

.preset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.preset {
  display: block;
  position: relative;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, oklch(from var(--bg-2) calc(l + 0.01) c h), var(--bg-2));
  padding: 0;
  overflow: hidden;
  transition: transform 160ms, border-color 160ms, box-shadow 160ms;
  box-shadow: var(--shadow-1);
}
.preset::before {
  content: "";
  position: absolute; top: 0; left: 14px; right: 14px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.5;
  transition: opacity 160ms;
}
.preset:hover {
  transform: translateY(-2px);
  border-color: oklch(from var(--accent) l c h / 0.4);
  box-shadow: var(--shadow-2);
}
.preset:hover::before { opacity: 1; }

.preset-schematic {
  display: flex; align-items: center;
  gap: 4px;
  height: 84px;
  padding: 22px 18px 18px;
  border-bottom: 1px solid var(--line-soft);
  background:
    radial-gradient(80% 80% at 50% 0%, var(--accent-wash), transparent 70%);
}
.preset-schematic .seg {
  flex: 1;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg-1);
  display: grid; place-items: center;
  font-family: var(--mono-font);
  font-size: 0.625rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-3);
  position: relative;
}
.preset-schematic .seg.on {
  color: var(--accent);
  border-color: oklch(from var(--accent) l c h / 0.5);
  background: var(--accent-wash);
}
.preset-schematic .seg.amp {
  flex: 1.4;
  background:
    linear-gradient(180deg, var(--bg-2), var(--bg-1));
}
.preset-schematic .chev {
  color: var(--fg-3);
  font-size: 0.5rem;
  opacity: 0.5;
}

.preset-body {
  padding: 16px 18px 18px;
}
.preset-body h4 {
  color: var(--fg-0);
  margin-bottom: 4px;
  font-size: 1.0625rem;
}
.preset-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono-font);
  font-size: 0.75rem;
  color: var(--fg-3);
  margin-bottom: 14px;
}
.preset-meta .dot { width: 3px; height: 3px; background: var(--fg-3); border-radius: 50%; }
.tag-row {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.tag {
  font-family: var(--mono-font);
  font-size: 0.625rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-2);
  border: 1px solid var(--line);
  padding: 3px 8px;
  border-radius: var(--r-sm);
  background: var(--bg-1);
}
.tag.t-metal   { color: var(--err); border-color: oklch(from var(--err) l c h / 0.35); }
.tag.t-clean   { color: var(--accent); border-color: oklch(from var(--accent) l c h / 0.35); }
.tag.t-ambient { color: oklch(75% 0.12 290); border-color: oklch(75% 0.12 290 / 0.35); }
.tag.t-lead    { color: var(--warn); border-color: oklch(from var(--warn) l c h / 0.35); }
.tag.t-bass    { color: oklch(70% 0.14 320); border-color: oklch(70% 0.14 320 / 0.35); }
.tag.t-crunch  { color: oklch(75% 0.13 50); border-color: oklch(75% 0.13 50 / 0.35); }
.tag.t-rhythm  { color: var(--ok); border-color: oklch(from var(--ok) l c h / 0.35); }

.preset .play-cta {
  position: absolute;
  bottom: 16px; right: 16px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  display: grid; place-items: center;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 160ms, transform 160ms;
}
.preset:hover .play-cta { opacity: 1; transform: translateY(0); }

/* ====================================================
 * Pricing
 * ==================================================== */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 900px) { .pricing-grid { grid-template-columns: 1fr; } }

.price-card {
  position: relative;
  padding: 32px 28px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background:
    linear-gradient(180deg, oklch(from var(--bg-2) calc(l + 0.01) c h), var(--bg-2));
  display: flex;
  flex-direction: column;
  gap: 24px;
  box-shadow: var(--shadow-1);
}
.price-card.featured {
  border-color: oklch(from var(--accent) l c h / 0.4);
  background:
    radial-gradient(80% 50% at 50% 0%, var(--accent-wash), transparent 60%),
    linear-gradient(180deg, oklch(from var(--bg-2) calc(l + 0.01) c h), var(--bg-2));
}
.price-card.featured::before {
  content: "";
  position: absolute; top: 0; left: 24px; right: 24px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}
.price-card .tier {
  display: flex; align-items: center; justify-content: space-between;
}
.price-card .tier .name {
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--fg-0);
  letter-spacing: -0.01em;
}
.price-card .price {
  display: flex; align-items: baseline; gap: 6px;
}
.price-card .price .amt {
  font-family: var(--mono-font);
  font-size: 2.25rem;
  font-weight: 500;
  color: var(--fg-0);
  letter-spacing: -0.03em;
}
.price-card .price .per {
  font-family: var(--mono-font);
  font-size: 0.8125rem;
  color: var(--fg-3);
}
.price-card .price .strike {
  font-family: var(--mono-font);
  font-size: 0.875rem;
  color: var(--fg-3);
  text-decoration: line-through;
  margin-left: 4px;
}
.price-card .positioning {
  font-size: 0.9375rem;
  color: var(--fg-2);
  min-height: 3em;
}
.price-card ul {
  list-style: none;
  margin: 0; padding: 0;
  display: flex; flex-direction: column;
  gap: 12px;
  font-size: 0.875rem;
  color: var(--fg-1);
}
.price-card li {
  display: flex; align-items: flex-start; gap: 10px;
  line-height: 1.4;
}
.price-card li::before {
  content: "✓";
  color: var(--accent);
  font-size: 0.8125rem;
  margin-top: 1px;
  flex: none;
  width: 14px;
}
.price-card li.dim { color: var(--fg-3); }
.price-card li.dim::before { content: "—"; color: var(--fg-3); }
.price-card li .wip {
  font-family: var(--mono-font);
  font-size: 0.625rem;
  color: var(--warn);
  border: 1px solid oklch(from var(--warn) l c h / 0.3);
  padding: 1px 5px;
  border-radius: 3px;
  margin-left: 6px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* feature matrix */
.matrix {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.matrix th, .matrix td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line-soft);
}
.matrix th {
  font-family: var(--mono-font);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-3);
  font-weight: 500;
  background: var(--bg-1);
  position: sticky; top: 56px;
}
.matrix td.colhead {
  color: var(--fg-1);
  font-weight: 500;
}
.matrix td.check {
  text-align: center;
  color: var(--accent);
  font-family: var(--mono-font);
}
.matrix td.no {
  text-align: center;
  color: var(--fg-3);
  font-family: var(--mono-font);
}
.matrix tr.group td {
  background: var(--bg-1);
  font-family: var(--mono-font);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 18px 16px 10px;
  border-bottom: 0;
}

/* faq */
.faq details {
  border-top: 1px solid var(--line-soft);
  padding: 22px 0;
}
.faq details:last-of-type { border-bottom: 1px solid var(--line-soft); }
.faq summary {
  cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  font-size: 1.0625rem;
  color: var(--fg-0);
  font-weight: 500;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-family: var(--mono-font);
  color: var(--fg-3);
  font-size: 1.25rem;
  transition: transform 200ms;
}
.faq details[open] summary::after { content: "−"; }
.faq .a {
  margin-top: 14px;
  color: var(--fg-2);
  font-size: 0.9375rem;
  line-height: 1.6;
  max-width: 70ch;
}

/* ====================================================
 * Demo video frame
 * ==================================================== */

.demo-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background:
    radial-gradient(70% 70% at 50% 50%, var(--bg-2), var(--bg-0));
  overflow: hidden;
  box-shadow: var(--shadow-2);
  display: grid; place-items: center;
}
.demo-frame::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: -1px -1px;
  opacity: 0.4;
  mask: radial-gradient(70% 70% at 50% 50%, black 30%, transparent 80%);
}
.demo-frame .play-btn {
  position: relative;
  width: 88px; height: 88px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  display: grid; place-items: center;
  box-shadow: 0 0 0 1px oklch(from var(--accent) l c h / 0.6),
              0 0 48px var(--accent-glow),
              0 12px 32px oklch(0% 0 0 / 0.5);
  transition: transform 200ms;
}
.demo-frame .play-btn:hover { transform: scale(1.04); }
.demo-frame .play-btn svg { transform: translateX(2px); width: 28px; height: 28px; }
.demo-frame .label {
  position: absolute;
  bottom: 16px; left: 16px;
  font-family: var(--mono-font);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.demo-frame .label .dot {
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--err); border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
  animation: pulse 1.6s infinite ease-in-out;
}

/* Landing-page interactive demo states. The mount script writes a
 * data-state attribute on .demo-frame and the LandingRigView React
 * mount lives at .axion-rig-mount inside the frame. The play button
 * + static placeholder silhouette are visible at idle; loading swaps
 * the placeholder for a "loading the rig" overlay; playing/complete
 * reveal the live rig.
 *
 * Visual polish (animated end card, real spinner, IntersectionObserver
 * pause-on-scroll-away) lands in a follow-up commit per the
 * landing-demo.md plan's step-6 cadence. */

.demo-frame .axion-rig-mount {
  position: absolute;
  inset: 0;
  display: none;
  /* Keep the rig view above the frame's grid ::before pattern. */
  z-index: 1;
}
.demo-frame[data-state="loading"] .play-btn,
.demo-frame[data-state="playing"] .play-btn,
.demo-frame[data-state="complete"] .play-btn {
  display: none;
}
.demo-frame[data-state="playing"] .axion-rig-mount,
.demo-frame[data-state="complete"] .axion-rig-mount {
  display: block;
}
.demo-frame[data-state="complete"] .axion-rig-mount {
  opacity: 0.45;
  transition: opacity 220ms ease;
}
.demo-frame[data-state="loading"] .label,
.demo-frame[data-state="error"] .label {
  /* Pull the status copy to the centre while there's no rig to label
   * the corner of. */
  inset: 0;
  display: grid; place-items: center;
  text-align: center;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
}
.demo-frame[data-state="loading"] .label .dot {
  /* Loading isn't an error condition; suppress the red live-recording
   * dot. The label text itself already pulses via the existing
   * animation if needed. */
  display: none;
}
/* Keep the status label legible over the live rig. The rig mount sits
 * at z-index 1 and stretches edge-to-edge; on narrow viewports the
 * leftmost pedal lands at the bottom-left where the label lives,
 * which would otherwise hide the "▶ playing · {preset}" text. A
 * small backdrop pill makes it readable no matter what's behind it. */
.demo-frame .label {
  z-index: 2;
}
.demo-frame[data-state="playing"] .label {
  background: color-mix(in oklab, var(--bg-0), transparent 25%);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* Wet/dry A/B toggle. Visible only while playing — clicking either
 * pill flips engine.dryMixParam via the ampCab store's setDryMix
 * (which does the click-free 10 ms ramp on the AudioParam). The
 * launch script subscribes to the store so preset switches that
 * reset dryMix update aria-pressed automatically. */
.demo-frame .demo-wetdry {
  position: absolute;
  top: 16px;
  right: 16px;
  display: none;
  align-items: center;
  gap: 0;
  padding: 3px;
  background: color-mix(in oklab, var(--bg-0), transparent 25%);
  border: 1px solid var(--line);
  border-radius: 999px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 2;
}
.demo-frame[data-state="playing"] .demo-wetdry {
  display: inline-flex;
}
.demo-frame .demo-wetdry-btn {
  font-family: var(--mono-font);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  padding: 5px 12px;
  background: transparent;
  color: var(--fg-3);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease;
}
.demo-frame .demo-wetdry-btn:hover {
  color: var(--fg-1);
}
.demo-frame .demo-wetdry-btn[aria-pressed="true"] {
  background: var(--accent);
  color: var(--on-accent);
}

/* Static placeholder rig silhouette. Renders behind the play button
 * at idle (and error) so the frame looks like a guitar rig before the
 * visitor commits. Hidden once the live runtime mounts. All sizes /
 * gradients mirror the LandingRigView's compact form so the visual
 * transition from silhouette → live rig feels continuous.
 *
 * Opacity sits low (~0.32) so the play button stays the focal point;
 * raising it pulls focus away from the CTA. The frame's radial-gradient
 * background still shows through.
 *
 * `inert` would be ideal but its browser support story is mixed at the
 * time of writing; aria-hidden="true" on the wrapper + pointer-events:
 * none here keeps assistive tech and pointer interaction off the
 * decorative chrome. */
.demo-placeholder {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 20px 24px;
  overflow: hidden;
  opacity: 0.32;
  pointer-events: none;
  filter: saturate(0.8);
  transition: opacity 220ms ease;
}
.demo-frame[data-state="loading"] .demo-placeholder,
.demo-frame[data-state="playing"] .demo-placeholder,
.demo-frame[data-state="complete"] .demo-placeholder {
  opacity: 0;
}

.demo-placeholder .dp-tag {
  flex-shrink: 0;
  font-family: var(--mono-font);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.20em;
  color: var(--fg-2);
  padding: 6px 4px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg-1);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}
.demo-placeholder .dp-chevron {
  flex-shrink: 0;
  color: var(--fg-3);
  opacity: 0.55;
  display: flex;
  align-items: center;
}
.demo-placeholder .dp-mono {
  font-family: var(--mono-font);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--fg-2);
}

.demo-placeholder .dp-pedal {
  position: relative;
  flex-shrink: 0;
  width: 130px;
  height: 200px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--bg-3), var(--bg-1));
  box-shadow: var(--shadow-1);
  overflow: hidden;
}
.demo-placeholder .dp-pedal-stripe {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  opacity: 0.85;
  background: linear-gradient(
    90deg,
    transparent,
    oklch(74% 0.10 var(--dp-hue, 200)),
    transparent
  );
}
.demo-placeholder .dp-pedal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 10px 4px;
}
.demo-placeholder .dp-key {
  font-family: var(--mono-font);
  font-size: 9.5px;
  font-weight: 600;
  padding: 1px 4px;
  background: var(--bg-0);
  border: 1px solid oklch(74% 0.10 var(--dp-hue, 200) / 0.5);
  color: oklch(74% 0.10 var(--dp-hue, 200));
  border-radius: 3px;
  letter-spacing: 0.02em;
  line-height: 1.2;
}
.demo-placeholder .dp-abbr {
  font-family: var(--mono-font);
  font-size: 9px;
  font-weight: 600;
  padding: 2px 5px;
  border: 1px solid oklch(74% 0.10 var(--dp-hue, 200));
  color: oklch(74% 0.10 var(--dp-hue, 200));
  border-radius: 2px;
  letter-spacing: 0.04em;
}
.demo-placeholder .dp-pedal-name {
  text-align: center;
  padding: 0 6px;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--fg-0);
  letter-spacing: -0.005em;
  line-height: 1.15;
}
.demo-placeholder .dp-pedal-knobs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}
.demo-placeholder .dp-pedal-knobs span {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 25%, var(--bg-3), var(--bg-0));
  border: 1px solid var(--line);
  position: relative;
}
.demo-placeholder .dp-pedal-knobs span::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 2px; height: 8px;
  background: var(--fg-2);
  transform: translate(-50%, -100%) rotate(-30deg);
  transform-origin: 50% 100%;
  border-radius: 1px;
  opacity: 0.7;
}

.demo-placeholder .dp-divider {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 4px;
}
.demo-placeholder .dp-divider-line {
  width: 1px;
  height: 100px;
  background: var(--line);
}
.demo-placeholder .dp-divider-label {
  font-family: var(--mono-font);
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--fg-3);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.demo-placeholder .dp-amp {
  flex-shrink: 0;
  width: 152px;
  height: 200px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--bg-3), var(--bg-1));
  box-shadow: var(--shadow-1);
  padding: 12px 12px 14px;
  display: flex;
  flex-direction: column;
}
.demo-placeholder .dp-amp-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.demo-placeholder .dp-amp-chip {
  font-family: var(--mono-font);
  font-size: 9px;
  font-weight: 600;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 2px;
  letter-spacing: 0.04em;
  color: var(--fg-1);
}
.demo-placeholder .dp-amp-name {
  margin-top: 12px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-0);
  letter-spacing: -0.01em;
}
.demo-placeholder .dp-amp-knobs {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 10px;
  justify-content: center;
  margin-top: 16px;
}
.demo-placeholder .dp-amp-knobs span {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 25%, var(--bg-3), var(--bg-0));
  border: 1px solid var(--line);
  position: relative;
}
.demo-placeholder .dp-amp-knobs span::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 2px; height: 8px;
  background: var(--fg-2);
  transform: translate(-50%, -100%) rotate(0deg);
  transform-origin: 50% 100%;
  border-radius: 1px;
  opacity: 0.7;
}

.demo-placeholder .dp-cab {
  flex-shrink: 0;
  width: 116px;
  height: 200px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--bg-3), var(--bg-1));
  box-shadow: var(--shadow-1);
  padding: 12px 12px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.demo-placeholder .dp-cab .dp-mono {
  align-self: flex-start;
}
.demo-placeholder .dp-cab-cone {
  margin-top: 16px;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, var(--bg-2), var(--bg-0) 70%);
  border: 1px solid var(--line);
  position: relative;
}
.demo-placeholder .dp-cab-cone div {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--line);
}
.demo-placeholder .dp-cab-cone div:nth-child(1) {
  inset: 10px;
  opacity: 0.6;
}
.demo-placeholder .dp-cab-cone div:nth-child(2) {
  inset: 26px;
  background: var(--bg-3);
}

/* End card — visible only at data-state="complete". Sits above the
 * dimmed live rig (`.axion-rig-mount` is at 0.45 opacity in this
 * state) and gives the visitor two clear next actions: open the app
 * or replay the demo. */
.demo-frame .demo-endcard {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  text-align: center;
  background: radial-gradient(
    60% 60% at 50% 50%,
    color-mix(in oklab, var(--bg-0), transparent 25%),
    color-mix(in oklab, var(--bg-0), transparent 55%)
  );
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.demo-frame[data-state="complete"] .demo-endcard {
  display: flex;
  animation: demo-endcard-in 280ms ease-out both;
}
@keyframes demo-endcard-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.demo-frame .demo-endcard-title {
  font-size: clamp(1.5rem, 3.2vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--fg-0);
  margin: 0;
}
.demo-frame .demo-endcard-deck {
  font-size: 0.9375rem;
  color: var(--fg-2);
  margin: 0;
  max-width: 28ch;
}
.demo-frame .demo-endcard-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.demo-frame .demo-endcard-actions .btn-ghost {
  display: inline-flex;
  align-items: center;
}

/* ====================================================
 * Quote / testimonial
 * ==================================================== */

.quote-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 900px) { .quote-row { grid-template-columns: 1fr; } }
.quote {
  background: var(--bg-1);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  padding: 28px 24px;
  display: flex; flex-direction: column;
  gap: 18px;
}
.quote blockquote {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.5;
  color: var(--fg-1);
  letter-spacing: -0.005em;
}
.quote .cite {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--mono-font);
  font-size: 0.75rem;
  color: var(--fg-3);
}
.quote .cite .name { color: var(--fg-1); font-weight: 500; }

/* ====================================================
 * Footer
 * ==================================================== */

.footer {
  border-top: 1px solid var(--line-soft);
  padding-block: 56px 32px;
  background: var(--bg-0);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 32px;
}
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer h5 {
  font-family: var(--mono-font);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-3);
  font-weight: 500;
  margin-bottom: 16px;
}
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer a {
  font-size: 0.875rem;
  color: var(--fg-2);
  transition: color 120ms;
}
.footer a:hover { color: var(--fg-0); }
.footer-bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
  display: flex; flex-wrap: wrap; justify-content: space-between;
  gap: 16px;
  font-family: var(--mono-font);
  font-size: 0.75rem;
  color: var(--fg-3);
}
.footer-brand-tag {
  margin-top: 16px;
  font-size: 0.875rem;
  color: var(--fg-2);
  max-width: 28ch;
  line-height: 1.5;
}

/* ====================================================
 * Pricing-CTA strip
 * ==================================================== */
.cta-strip {
  padding: 48px;
  border-radius: var(--r-xl);
  border: 1px solid var(--line);
  background:
    radial-gradient(80% 70% at 20% 30%, var(--accent-wash), transparent 60%),
    linear-gradient(180deg, var(--bg-2), var(--bg-1));
  text-align: center;
}
.cta-strip h2 { margin-bottom: 12px; }
.cta-strip p { color: var(--fg-2); margin-bottom: 24px; }

/* ====================================================
 * Pricing mini cards (landing)
 * ==================================================== */
.tier-mini-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 800px) { .tier-mini-row { grid-template-columns: 1fr; } }
.tier-mini {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg-1);
  display: flex; flex-direction: column; gap: 12px;
}
.tier-mini .head { display: flex; align-items: baseline; justify-content: space-between; }
.tier-mini .name { font-weight: 500; color: var(--fg-0); }
.tier-mini .amt {
  font-family: var(--mono-font);
  font-size: 1.25rem; color: var(--fg-0); letter-spacing: -0.02em;
}
.tier-mini .blurb { font-size: 0.9375rem; color: var(--fg-2); }
.tier-mini.featured {
  border-color: oklch(from var(--accent) l c h / 0.4);
  background: var(--accent-wash);
}

/* ====================================================
 * Preset gallery — filter bar
 * ==================================================== */

.filter-bar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg-1);
  align-items: center;
  margin-bottom: 24px;
}
@media (max-width: 720px) { .filter-bar { grid-template-columns: 1fr; } }
.search {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 8px 14px;
}
.search input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: 0;
  font: inherit;
  color: var(--fg-1);
  font-size: 0.9375rem;
}
.search input::placeholder { color: var(--fg-3); }
.search .kbd {
  font-family: var(--mono-font);
  font-size: 0.6875rem;
  color: var(--fg-3);
  border: 1px solid var(--line);
  padding: 2px 6px;
  border-radius: 4px;
}

.sort-pills {
  display: flex; gap: 4px;
  padding: 3px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r);
}
.sort-pills button {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.8125rem;
  color: var(--fg-2);
  font-family: var(--mono-font);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.sort-pills button.active {
  background: var(--bg-3);
  color: var(--fg-0);
}

.tag-filter {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 16px 0 24px;
}
.tag-filter .tag {
  cursor: pointer;
  transition: color 120ms, border-color 120ms;
}
.tag-filter .tag.active {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
}

.results-meta {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 16px;
  font-family: var(--mono-font);
  font-size: 0.75rem;
  color: var(--fg-3);
}

/* ====================================================
 * Preset detail — overlay-on-app mockup
 * ==================================================== */

.preset-stage {
  position: relative;
  height: calc(100vh - 56px);
  min-height: 640px;
  overflow: hidden;
  background: var(--bg-0);
}
.app-mock {
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 50% at 50% 40%, var(--accent-wash), transparent 70%),
    var(--bg-0);
}
.app-mock-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  height: 100%;
  padding: 80px 48px 120px;
}
.mock-pedal {
  width: 96px;
  height: 180px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--bg-2);
  position: relative;
  box-shadow: var(--shadow-1);
}
.mock-pedal::before {
  content: "";
  position: absolute; top: 0; left: 12px; right: 12px;
  height: 1px;
  background: var(--accent);
  opacity: 0.6;
}
.mock-pedal .mock-label {
  position: absolute; top: 14px; left: 12px; right: 12px;
  font-family: var(--mono-font);
  font-size: 0.6875rem;
  color: var(--fg-2);
  text-align: center;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.mock-pedal .mock-knob {
  position: absolute; left: 50%; bottom: 56px;
  transform: translateX(-50%);
  width: 38px; height: 38px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, oklch(from var(--bg-3) calc(l + 0.04) c h), var(--bg-1));
  border: 1px solid var(--line);
  box-shadow: 0 0 0 4px oklch(from var(--accent) l c h / 0.15);
}
.mock-pedal .mock-power {
  position: absolute; bottom: 14px; left: 50%;
  transform: translateX(-50%);
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--bg-1);
  border: 1px solid var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}
.mock-amp {
  width: 280px; height: 180px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--bg-2);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  padding: 28px 16px;
  align-content: center;
}
.mock-amp .mock-knob { position: relative; left: 0; bottom: 0; transform: none; margin-inline: auto; }

/* overlay */
.preset-overlay {
  position: absolute;
  top: 32px; left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex; flex-direction: column; align-items: center;
  gap: 12px;
  padding: 24px 32px;
  background:
    radial-gradient(60% 50% at 50% 0%, var(--accent-wash), transparent 70%),
    oklch(from var(--bg-2) l c h / 0.85);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-2);
  min-width: 360px;
  text-align: center;
}
.preset-overlay::before {
  content: "";
  position: absolute; top: 0; left: 24px; right: 24px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}
.preset-overlay .eyebrow { margin-bottom: 4px; }
.preset-overlay h3 {
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--fg-0);
  letter-spacing: -0.02em;
}
.preset-overlay .author {
  font-family: var(--mono-font);
  font-size: 0.8125rem;
  color: var(--fg-2);
}
.preset-overlay .actions { display: flex; gap: 8px; margin-top: 4px; }

/* bottom utility strip */
.preset-strip {
  position: absolute;
  bottom: 16px; left: 16px; right: 16px;
  z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  background:
    linear-gradient(180deg, oklch(from var(--bg-2) calc(l + 0.01) c h / 0.9), oklch(from var(--bg-2) l c h / 0.9));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
}
.preset-strip .strip-meta {
  display: flex; align-items: center; gap: 16px;
  font-family: var(--mono-font);
  font-size: 0.75rem;
  color: var(--fg-3);
}
.preset-strip .strip-actions { display: flex; gap: 8px; align-items: center; }
.preset-strip .x-btn {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--bg-3);
  color: var(--fg-2);
  display: grid; place-items: center;
  border: 1px solid var(--line);
}
.preset-strip .x-btn:hover { color: var(--fg-0); }

/* ====================================================
 * Docs
 * ==================================================== */

.docs-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 48px;
  padding-block: 56px;
}
@media (max-width: 900px) { .docs-layout { grid-template-columns: 1fr; } }

.docs-nav {
  position: sticky;
  top: 80px;
  align-self: flex-start;
}
.docs-nav h5 {
  font-family: var(--mono-font);
  font-size: 0.6875rem;
  color: var(--fg-3);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0 0 12px;
  padding-left: 12px;
}
.docs-nav ul { list-style: none; padding: 0; margin: 0 0 24px; }
.docs-nav li a {
  display: block;
  padding: 6px 12px;
  color: var(--fg-2);
  font-size: 0.875rem;
  border-radius: var(--r-sm);
  border-left: 1px solid var(--line);
  transition: color 120ms, border-color 120ms, background 120ms;
}
.docs-nav li a:hover { color: var(--fg-0); background: var(--bg-2); }
.docs-nav li a.active {
  color: var(--accent);
  border-left-color: var(--accent);
  background: var(--accent-wash);
}

/* Below 900px the .docs-layout grid collapses to a single column,
 * stacking docs-nav above the main content. Sticky would keep the
 * nav pinned to the top of the viewport as the user scrolls into
 * the cards below — visually it "floats" over the page. Override
 * to static so it scrolls away naturally. Declared AFTER the base
 * .docs-nav block so it actually wins the cascade. */
@media (max-width: 900px) {
  .docs-nav { position: static; }
}

.docs-index {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (max-width: 720px) { .docs-index { grid-template-columns: 1fr; } }
.docs-card {
  display: block;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg-1);
  transition: border-color 120ms, transform 120ms;
}
.docs-card:hover {
  border-color: oklch(from var(--accent) l c h / 0.4);
  transform: translateY(-2px);
}
.docs-card .label {
  font-family: var(--mono-font);
  font-size: 0.6875rem;
  color: var(--accent);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.docs-card h4 { color: var(--fg-0); margin-bottom: 4px; }
.docs-card p { color: var(--fg-2); font-size: 0.875rem; }

/* article */
.article {
  max-width: 720px;
  /* Grid items default to min-width: auto, which lets them expand to
   * fit the widest child — letting a wide <pre> diagram push the
   * column past the viewport on narrow screens. min-width: 0 lets
   * the article shrink to its grid track, and the <pre>'s own
   * overflow-x:auto then handles horizontal scroll inside. */
  min-width: 0;
}
.article header { margin-bottom: 40px; }
.article .meta {
  font-family: var(--mono-font);
  font-size: 0.75rem;
  color: var(--fg-3);
  display: flex; gap: 12px;
  margin-bottom: 16px;
}
.article h1 {
  font-size: clamp(2rem, 3.5vw, 2.625rem);
  font-weight: 500;
  letter-spacing: -0.025em;
  color: var(--fg-0);
}
.article .lede { margin-top: 12px; }
.article h2 {
  margin-top: 56px;
  margin-bottom: 16px;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}
.article h3 {
  margin-top: 32px;
  margin-bottom: 12px;
  font-size: 1.1875rem;
}
.article p {
  margin: 18px 0;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--fg-1);
}
.article ul, .article ol {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--fg-1);
  padding-left: 1.4em;
}
.article li + li { margin-top: 6px; }
.article a {
  color: var(--accent);
  border-bottom: 1px solid oklch(from var(--accent) l c h / 0.4);
}
.article a:hover { border-bottom-color: var(--accent); }
.article code:not(pre code) {
  font-family: var(--mono-font);
  font-size: 0.9em;
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--accent-2);
}
.article pre {
  background: var(--bg-0);
  border: 1px solid var(--line);
  border-radius: var(--r);
  /* Padding and font scale down on narrow viewports so the diagrams
   * in signal-flow / getting-started shrink toward fitting in
   * mobile widths. clamp() with floors keeps everything readable. */
  padding: clamp(12px, 2vw, 18px) clamp(14px, 2.5vw, 20px);
  overflow-x: auto;
  font-family: var(--mono-font);
  font-size: clamp(0.6875rem, 1.7vw, 0.875rem);
  line-height: 1.55;
  margin: 24px 0;
}
.article pre .comment { color: var(--fg-3); }
.article pre .key { color: var(--accent); }
.article pre .str { color: var(--ok); }

.article blockquote {
  margin: 28px 0;
  padding: 16px 20px;
  border-left: 2px solid var(--accent);
  background: var(--accent-wash);
  border-radius: 0 var(--r) var(--r) 0;
  color: var(--fg-1);
  font-size: 0.9375rem;
}
.article blockquote .label {
  font-family: var(--mono-font);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
  display: block;
}

.toc {
  position: sticky; top: 80px;
  align-self: flex-start;
  border-left: 1px solid var(--line);
  padding-left: 16px;
}
.toc h5 {
  font-family: var(--mono-font);
  font-size: 0.6875rem;
  color: var(--fg-3);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0 0 12px;
}
.toc ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.toc a { font-size: 0.8125rem; color: var(--fg-2); }
.toc a:hover { color: var(--fg-0); }

/* ====================================================
 * Changelog
 * ==================================================== */

.changelog {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--line-soft);
}
.release {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 32px;
  padding: 32px 0;
  border-bottom: 1px solid var(--line-soft);
}
@media (max-width: 720px) { .release { grid-template-columns: 1fr; } }
.release .left {
  font-family: var(--mono-font);
  display: flex; flex-direction: column;
  gap: 4px;
}
.release .version {
  font-size: 1.125rem;
  color: var(--fg-0);
  letter-spacing: -0.01em;
}
.release .date { font-size: 0.8125rem; color: var(--fg-3); }
.release .badge {
  margin-top: 8px;
  font-size: 0.625rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid oklch(from var(--accent) l c h / 0.4);
  background: var(--accent-wash);
  padding: 3px 8px;
  border-radius: 999px;
  align-self: flex-start;
}
.release h3 {
  font-size: 1.125rem;
  font-weight: 500;
  margin-bottom: 16px;
  color: var(--fg-0);
}
.release-group { margin-bottom: 18px; }
.release-group:last-child { margin-bottom: 0; }
.release-group .label {
  font-family: var(--mono-font);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.release-group.added .label   { color: var(--ok); }
.release-group.changed .label { color: var(--accent); }
.release-group.fixed .label   { color: var(--warn); }
.release-group ul {
  list-style: none;
  padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 6px;
}
.release-group li {
  font-size: 0.9375rem;
  color: var(--fg-1);
  line-height: 1.5;
  padding-left: 16px;
  position: relative;
}
.release-group li::before {
  content: "";
  position: absolute; left: 0; top: 0.65em;
  width: 6px; height: 1px;
  background: var(--fg-3);
}

/* ====================================================
 * About — narrative
 * ==================================================== */

.about-hero {
  padding-block: 96px 48px;
}
.about-hero h1 {
  font-size: clamp(2.25rem, 4.5vw, 3.5rem);
  max-width: 18ch;
}
.narrative {
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--fg-1);
}
.narrative p { margin: 20px 0; }

.attrib-table {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--bg-1);
}
.attrib-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr auto;
  gap: 16px;
  padding: 14px 20px;
  align-items: center;
  border-top: 1px solid var(--line-soft);
  font-size: 0.875rem;
}
.attrib-row:first-child { border-top: 0; }
.attrib-row .name { color: var(--fg-0); font-weight: 500; }
.attrib-row .by   { color: var(--fg-2); font-family: var(--mono-font); font-size: 0.8125rem; }
.attrib-row .lic  { color: var(--accent); font-family: var(--mono-font); font-size: 0.75rem; }

/* ====================================================
 * 404
 * ==================================================== */

.error-page {
  min-height: calc(100vh - 56px);
  display: grid;
  place-items: center;
  padding: 48px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.error-page::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(40% 30% at 50% 40%, var(--accent-wash), transparent 60%);
  pointer-events: none;
}
.error-card {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  max-width: 520px;
}
.error-code {
  font-family: var(--mono-font);
  font-size: clamp(4rem, 12vw, 8rem);
  font-weight: 500;
  letter-spacing: -0.05em;
  color: var(--fg-0);
  line-height: 1;
}
.error-code .ink { color: var(--accent); }
.error-page h1 {
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--fg-0);
}
.error-page p { color: var(--fg-2); max-width: 38ch; }

/* ====================================================
 * Legal
 * ==================================================== */

.legal { padding-block: 56px 96px; }
.legal h1 { font-size: 2.25rem; margin-bottom: 8px; }
.legal .meta {
  font-family: var(--mono-font);
  font-size: 0.75rem;
  color: var(--fg-3);
  margin-bottom: 32px;
}
.legal h2 {
  margin-top: 40px;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}
.legal p, .legal li {
  font-size: 0.9375rem;
  color: var(--fg-1);
  line-height: 1.65;
}
.legal p { margin: 14px 0; }
.legal ul { padding-left: 1.4em; }
.legal nav.legal-tabs {
  display: flex; gap: 8px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--line);
}
.legal nav.legal-tabs a {
  padding: 10px 16px;
  font-family: var(--mono-font);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-3);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.legal nav.legal-tabs a:hover { color: var(--fg-1); }
.legal nav.legal-tabs a[aria-current="page"] {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ====================================================
 * Token reference page
 * ==================================================== */

.token-section { padding: 32px 0; border-top: 1px solid var(--line-soft); }
.token-section h2 { font-size: 1.125rem; margin-bottom: 20px; letter-spacing: -0.01em; }
.swatch-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.swatch-card {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--bg-1);
  overflow: hidden;
}
.swatch-card .sw {
  height: 80px;
  border-bottom: 1px solid var(--line-soft);
}
.swatch-card .meta {
  padding: 10px 12px;
  font-family: var(--mono-font);
  font-size: 0.75rem;
}
.swatch-card .var { color: var(--accent); }
.swatch-card .value { color: var(--fg-3); margin-top: 2px; font-size: 0.6875rem; }

.token-typescale > div {
  padding: 12px 0;
  border-top: 1px solid var(--line-soft);
}
.token-typescale > div:first-child { border-top: 0; }
.token-typescale .label { font-family: var(--mono-font); font-size: 0.75rem; color: var(--fg-3); }

/* ====================================================
 * Article tables (markdown-rendered)
 *
 * Markdown emits bare <table>, no wrapper. display:block + overflow-x
 * lets wide tables (the hotkey reference, the WAV-format reference)
 * scroll horizontally on narrow viewports instead of pushing the page
 * wider than the viewport.
 * ==================================================== */

.article table {
  display: block;
  overflow-x: auto;
  max-width: 100%;
  margin: 24px 0;
  border-collapse: collapse;
  font-size: 0.9375rem;
}
.article table th,
.article table td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}
.article table th {
  font-family: var(--mono-font);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-3);
  font-weight: 500;
  border-bottom: 1px solid var(--line);
}
.article table tr:last-child td {
  border-bottom: 0;
}

/* ====================================================
 * Narrow-viewport overflow fixes
 *
 * Specific elements that previously overflowed their column at
 * tablet widths or below, pushing the layout wider than the
 * viewport. Fixed inline rather than in a media query because the
 * change is universally safe (these were just too-rigid sizings).
 * ==================================================== */

/* IN ▸ PEDALS ▸ AMP ▸ CAB ▸ OUT — five chips + four chevrons need
 * ~370px and the hero's left column gets narrower than that at
 * tablet widths, dragging the whole grid wider. Wrap to a second
 * line when needed. */
.signal-flow { flex-wrap: wrap; }

/* The "Now playing" preset overlay had a hard min-width of 360px
 * which broke any viewport narrower than ~400px. min() lets it
 * shrink with the viewport. */
.preset-overlay { min-width: min(360px, 100%); }

/* mock-amp had width: 280px (no max). Cap on small viewports. */
.mock-amp { width: 100%; max-width: 280px; }

/* ====================================================
 * Mobile / narrow-viewport top-nav + hamburger drawer
 *
 * Below 720px the centre nav links collapse into a drawer revealed
 * by a hamburger toggle. Pure CSS: a hidden checkbox toggles the
 * drawer state, and :has() lets us style nav-links from elsewhere
 * in the .nav-inner tree without DOM-order constraints. The
 * theme-switch stays hidden on mobile — kept off-canvas to keep
 * the drawer focused on navigation.
 * ==================================================== */

.nav-toggle-input { display: none; }
.nav-toggle { display: none; }

@media (max-width: 720px) {
  .nav-inner {
    display: flex;
    align-items: center;
    gap: 12px;
  }
  .nav-links { display: none; }
  .theme-switch { display: none; }

  /* Push nav-right (the Open Axion CTA) to the right; the hamburger
   * follows it via flex order. Result: [logo] ... [CTA] [hamburger]. */
  .nav-right { margin-left: auto; }
  .nav-toggle { order: 1; }

  .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: var(--bg-1);
    cursor: pointer;
    color: var(--fg-1);
    transition: background 120ms, border-color 120ms;
    flex: none;
  }
  .nav-toggle:hover {
    background: var(--bg-2);
    border-color: var(--fg-3);
  }
  .nav-toggle-icon,
  .nav-toggle-icon::before,
  .nav-toggle-icon::after {
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
    transition: transform 160ms, top 160ms, background 160ms;
  }
  .nav-toggle-icon {
    position: relative;
  }
  .nav-toggle-icon::before,
  .nav-toggle-icon::after {
    content: "";
    position: absolute;
    left: 0;
  }
  .nav-toggle-icon::before { top: -6px; }
  .nav-toggle-icon::after { top: 6px; }

  /* Open state — the bars cross into an X. */
  .nav-toggle-input:checked + .nav-toggle .nav-toggle-icon {
    background: transparent;
  }
  .nav-toggle-input:checked + .nav-toggle .nav-toggle-icon::before {
    top: 0;
    transform: rotate(45deg);
  }
  .nav-toggle-input:checked + .nav-toggle .nav-toggle-icon::after {
    top: 0;
    transform: rotate(-45deg);
  }

  /* Drawer reveal. :has() finds the checked input anywhere inside
   * .nav-inner; nav-links lives in a different sibling slot and
   * doesn't need to be DOM-adjacent. */
  .nav-inner:has(.nav-toggle-input:checked) .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: var(--bg-1);
    border-bottom: 1px solid var(--line);
    padding: 12px 24px;
    box-shadow: var(--shadow-2);
    z-index: 49;
    gap: 2px;
  }
  .nav-inner:has(.nav-toggle-input:checked) .nav-links a {
    padding: 12px 8px;
    border-radius: var(--r-sm);
    width: 100%;
    font-size: 0.9375rem;
  }
}
