/* ── Tokens ─────────────────────────── */
:root {
  --bg: #0a0a0a;
  --surface: #161616;
  --surface2: #1f1f1f;
  --border: #262626;
  --border-strong: #333333;
  --text: #ededed;
  --text-secondary: #a1a1a1;
  --muted: #858b91;
  --accent: #ea580c;
  --accent-bright: #f97316;
  --accent-light: rgba(234, 88, 12, 0.12);
  --ok: #3fb950;
  --ok-dim: rgba(63, 185, 80, 0.15);

  --font-display: 'Bricolage Grotesque', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  --font-serif: 'Instrument Serif', 'Noto Serif SC', serif;
  --font-body: 'Outfit', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Noto Sans SC', monospace;

  --tracking-display: -0.035em;
  --tracking-heading: -0.025em;
  --tracking-eyebrow: 0.12em;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Reset ─────────────────────────── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

::selection {
  background: var(--accent);
  color: #fff;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Neutral spotlight at the very top — light, not color (3% white, fades fast) */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 420px;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(ellipse 60% 100% at 50% 0%,
    rgba(255, 255, 255, 0.05),
    transparent 65%);
}

main {
  position: relative;
  z-index: 2;
}

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

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

/* ── Entrance animations ────────────── */
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.anim {
  animation: fade-up 700ms var(--ease-out) both;
}

.anim-1 { animation-delay: 80ms; }
.anim-2 { animation-delay: 180ms; }
.anim-3 { animation-delay: 280ms; }
.anim-4 { animation-delay: 380ms; }

/* Reveal on scroll (initially hidden, animates when .in-view class added) */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 800ms var(--ease-out), transform 800ms var(--ease-out);
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

.reveal:focus-within {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .anim {
    animation: fade-in 200ms var(--ease-out) both;
  }
  .anim-1, .anim-2, .anim-3 {
    animation-delay: 0ms;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html {
    scroll-behavior: auto;
  }
  /* Typewriter choreography collapses: everything visible instantly */
  .t-hidden {
    opacity: 1;
    transform: none;
  }
  .transform-connector::before,
  .transform-connector::after {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ── Nav ─────────────────────────── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.7);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid transparent;
  transition: border-color 300ms;
}

/* Border materializes only once the page has scrolled (scrolled class added by script.js) */
nav.scrolled {
  border-bottom-color: var(--border);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.nav-logo-mark {
  width: 28px;
  height: 28px;
  background: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0a0a0a;
  font-size: 0.8rem;
  font-family: var(--font-display);
  font-weight: 800;
}

.nav-logo-text {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
}

.nav-link-text {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: 8px;
  transition: color 150ms;
  display: inline-block;
}

.nav-link-text:hover {
  color: var(--text);
}

/* ── Language Switch ────────────────── */
.lang-switch {
  display: flex;
  align-items: center;
  margin: 0 8px;
}

.lang-btn {
  padding: 4px 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 150ms, border-color 150ms, color 150ms;
  font-family: var(--font-body);
}

.lang-btn:first-child {
  border-radius: 4px 0 0 4px;
}

.lang-btn:last-child {
  border-radius: 0 4px 4px 0;
  border-left: none;
}

.lang-btn:hover {
  background: var(--surface);
}

.lang-btn.active {
  background: var(--accent-light);
  color: var(--accent);
  border-color: var(--accent);
}

/* ── Copy buttons ───────────────────── */
.nav-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: background 150ms, border-color 150ms, color 150ms;
  font-family: var(--font-body);
}

.nav-copy-btn:hover {
  background: var(--surface2);
  border-color: var(--accent);
  color: var(--accent);
}

.nav-copy-btn.copied,
.claude-copy-btn.copied {
  background: var(--ok-dim);
  border-color: var(--ok);
  color: var(--ok);
}

.nav-copy-btn svg,
.claude-copy-btn svg {
  width: 14px;
  height: 14px;
}

/* ── Buttons ────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font-body);
  text-decoration: none;
  transition: background 200ms, color 200ms, border-color 200ms, transform 200ms var(--ease-out);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: #0a0a0a;
}

.btn-primary:hover {
  background: var(--accent-bright);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--surface2);
  border-color: var(--border-strong);
}

/* ── Sections ───────────────────────── */
.section {
  padding: 88px 32px;
  max-width: 1100px;
  margin: 0 auto;
}

section[id],
#claude-config {
  scroll-margin-top: 84px;
}

.section-header {
  margin-bottom: 56px;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-label::before {
  content: '';
  width: 20px;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 600;
  letter-spacing: var(--tracking-heading);
  color: var(--text);
  line-height: 1.1;
  margin-bottom: 20px;
  text-wrap: balance;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 640px;
  line-height: 1.8;
}

.section-desc code {
  font-size: 0.9em;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
}

/* ── Hero ───────────────────────────── */
.hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 148px 32px 72px;
  max-width: 1100px;
  margin: 0 auto;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

.hero-card-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.04em;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6.5vw, 4.75rem);
  font-weight: 600;
  letter-spacing: var(--tracking-display);
  color: var(--text);
  line-height: 1.04;
  margin-bottom: 30px;
  text-wrap: balance;
}

/* The signature moment: serif for the emphasized line. Instrument Serif italic
   for Latin; CJK has no true italic, so Noto Serif SC renders upright —
   synthesis disabled to prevent fake-slanted system glyphs. */
.hero-title em {
  font-family: var(--font-serif);
  font-style: italic;
  font-synthesis: none;
  font-weight: 400;
  font-size: 1.02em;
  color: var(--accent);
  letter-spacing: 0.01em;
}

/* Per-character stagger hook (script.js doesn't drive it; inline-block keeps br spacing stable) */
.kinetic-line {
  display: inline-block;
}

.hero-desc {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 620px;
  line-height: 1.8;
  margin-bottom: 40px;
}

.hero-actions,
.hero-facts {
  justify-content: center;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* Quiet engineering anchor: three facts pin the hero's lower half so the
   whitespace reads as composition, not emptiness */
.hero-facts {
  margin-top: 64px;
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

/* Centered hero: the vertical separators read better as full-height rules */
.hero-fact {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
}

.hero-fact-k {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-fact-v {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Live npm stats: the cell renders from first paint (placeholder until the
   fetch lands) so the row has a stable width and never gates LCP. A failed
   fetch leaves the dash plus an explicit unavailable label, not a dead cell. */
.hero-fact-v--live {
  font-variant-numeric: tabular-nums;
}

#dl-month {
  display: inline-block;
  min-width: 5ch;
  text-align: right;
}

.hero-fact--live.is-unavailable .hero-fact-v--live {
  color: var(--muted);
}

/* Window suffix ("/ mo") — smaller, quieter, unit-label voice */
.dl-suffix {
  font-size: 0.78rem;
  color: var(--muted);
}

.hero-fact-sep {
  width: 1px;
  height: 32px;
  background: var(--border);
}

/* ── How it works: spec → test ───────── */
.how-section {
  padding-top: 32px;
  padding-bottom: 48px;
}

.how-header {
  max-width: 760px;
  margin-bottom: 40px;
}

.how-header .section-desc {
  max-width: 720px;
}

.transformation {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) 1px minmax(0, 1.08fr);
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.transform-pane {
  min-width: 0;
  background: transparent;
}

.pane-bar {
  padding: 10px 16px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
}

.pane-file {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pane-code {
  margin: 0;
  padding: 18px 20px 22px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.95;
  color: #cfcfcf;
}

.code-heading {
  color: var(--text);
  font-weight: 600;
}

.code-key {
  color: var(--accent);
  font-weight: 600;
}

.code-punct,
.code-comment {
  color: var(--muted);
}

.code-str {
  color: #f0a875;
}

.code-kw {
  color: var(--text);
  font-weight: 500;
}

.transform-connector {
  position: relative;
  background: var(--border);
}

.transform-connector::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--border-strong), var(--accent));
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 700ms var(--ease-out);
}

.transformation.in-view .transform-connector::before {
  transform: scaleY(1);
}

.transform-connector::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 9px;
  height: 9px;
  margin: -4.5px;
  box-sizing: content-box;
  border: 3px solid var(--surface);
  border-radius: 50%;
  background: var(--accent);
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 300ms 420ms, transform 300ms 420ms var(--ease-out);
}

.transformation.in-view .transform-connector::after {
  opacity: 1;
  transform: scale(1);
}

.transform-report {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  background: var(--surface2);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.5;
  color: var(--muted);
}

.report-dot {
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ok);
}

.report-label {
  color: var(--muted);
}

.report-path {
  min-width: 0;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Quickstart: terminal ───────────── */
.qs-terminal {
  max-width: 760px;
  margin: 0 auto 28px;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
  /* Hairline catch-light on the top edge — the only "shadow" a dark surface needs */
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.works-with {
  max-width: 760px;
  margin: 0 auto 56px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 4px 18px;
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.works-with a {
  color: var(--text);
  text-decoration: none;
  padding-bottom: 1px;
  border-bottom: 1px solid var(--border-strong);
  transition: color 150ms, border-color 150ms;
}

.works-with a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
}

.terminal-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--border-strong);
}

.terminal-dot:first-child {
  background: var(--muted);
}

.terminal-title {
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.06em;
}

.terminal-body {
  padding: 20px 24px 24px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 2;
  overflow-x: auto;
}

.terminal-body > div {
  white-space: nowrap;
}

.terminal-prompt {
  color: var(--muted);
  user-select: none;
}

.terminal-cmd {
  color: var(--text);
}

.terminal-comment {
  color: var(--muted);
  margin-top: 4px;
}

/* Typewriter choreography (script.js drives it): first line types in on scroll-in,
   remaining lines are .t-hidden until revealed with staggered rise */
.t-hidden {
  opacity: 0;
  transform: translateY(6px);
}

.t-shown {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 500ms var(--ease-out), transform 500ms var(--ease-out);
}

/* The one accent command — the product's money line */
.terminal-cmd-accent {
  color: var(--accent);
}

.terminal-cursor {
  display: inline-block;
  width: 8px;
  height: 1.1em;
  background: var(--accent);
  vertical-align: text-bottom;
  margin-left: 4px;
  animation: cursor-blink 1.1s steps(1) infinite;
}

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

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

/* ── claude-config card ─────────────── */
.claude-config-wrapper {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.claude-config-wrapper::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 48px;
  background: linear-gradient(transparent, var(--surface));
  pointer-events: none;
}

.claude-config-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
}

.claude-config-filename {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.claude-config-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.claude-config-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.claude-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: background 150ms, border-color 150ms, color 150ms;
  font-family: var(--font-body);
  white-space: nowrap;
}

.claude-copy-btn:hover {
  background: var(--surface2);
  border-color: var(--accent);
  color: var(--accent);
}

/* Priority dots: quiet monochrome-only versions (the copy payload keeps the
   real emoji — only this preview renders the tamed glyphs) */.prio {
  display: inline-block;
  width: 0.62em;
  height: 0.62em;
  border-radius: 50%;
  vertical-align: -0.05em;
  margin-right: 0.3em;
}

.prio-critical {
  background: var(--accent);
}

.prio-important {
  background: none;
  border: 1.5px solid var(--text-secondary);
}

.prio-standard {
  background: none;
  border: 1.5px solid var(--border-strong);
}

/* renderMarkdown output (h1-h6 / ul / li / p + inline strong/em/code) */
.claude-config-rendered {
  padding: 24px 28px 28px;
  max-height: 260px;
  overflow-y: auto;
}

/* renderMarkdown demotes the embed's # to h2 — the card's top-level style */
.claude-config-rendered h2 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: var(--tracking-heading);
  margin-bottom: 12px;
}

.claude-config-rendered h3,
.claude-config-rendered h4,
.claude-config-rendered h5,
.claude-config-rendered h6 {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 14px 0 6px;
}

.claude-config-rendered p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 8px;
}

.claude-config-rendered ul {
  padding-left: 20px;
  margin-bottom: 10px;
}

/* Nested standards rules (2-space indent in the embed) — a quieter marker
   so the parent rule stays the visual anchor. */
.claude-config-rendered ul ul {
  padding-left: 16px;
  margin: 4px 0 6px;
}

.claude-config-rendered ul ul > li::marker {
  content: "– ";
  color: var(--text-secondary);
}

.claude-config-rendered li {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.claude-config-rendered strong {
  color: var(--text);
  font-weight: 600;
}

.claude-config-rendered em {
  font-style: normal;
  color: var(--accent);
}

.claude-config-rendered code {
  font-size: 0.8rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  color: var(--text);
}

.section-label-center {
  justify-content: center;
}

.section-label-center::after {
  content: '';
  width: 20px;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

.section-header-center {
  text-align: center;
}

.section-desc-center {
  margin-left: auto;
  margin-right: auto;
}

/* ── Closing action ─────────────────── */
.closing {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 32px 88px;
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* ── Footer ─────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 64px 32px;
  background: var(--bg);
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 28px;
}

.footer-desc {
  margin-left: auto;
  margin-right: auto;
}

.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 12px;
}

.footer-brand-mark {
  width: 28px;
  height: 28px;
  background: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0a0a0a;
  font-size: 0.85rem;
  font-family: var(--font-display);
  font-weight: 800;
  cursor: pointer;
}

.footer-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  max-width: 380px;
  line-height: 1.6;
}

.footer-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 8px;
  transition: color 150ms, background 150ms;
  font-weight: 500;
}

.footer-links a:hover {
  color: var(--text);
  background: var(--surface);
}

.footer-copy {
  max-width: 1100px;
  margin: 32px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
}

/* ── Whimsy: easter egg ─────────────── */
.easter-egg-message {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 10px 18px;
  border-radius: 8px;
  z-index: 200;
  animation: fade-in 200ms var(--ease-out) both;
}

/* ── Responsive ─────────────────────── */
@media (max-width: 768px) {
  .section {
    padding: 72px 20px;
  }

  .hero {
    padding: 112px 20px 56px;
  }

  .nav-inner {
    padding: 0 20px;
  }

  .nav-links {
    gap: 2px;
  }

  .how-section {
    padding-top: 16px;
    padding-bottom: 40px;
  }

  .transformation {
    grid-template-columns: 1fr;
  }

  .transform-connector {
    height: 40px;
    background: transparent;
  }

  .transform-connector::before {
    left: 50%;
    right: auto;
    width: 1px;
    height: 100%;
  }

  .hero-facts {
    justify-content: center;
    gap: 18px 32px;
    margin-top: 52px;
  }

  .hero-fact-sep {
    display: none;
  }
}

@media (max-width: 640px) {
  .nav-logo-text {
    display: none;
  }

  .pane-code {
    white-space: pre;
    overflow-wrap: normal;
    overflow-x: auto;
    overscroll-behavior-x: contain;
  }

  .pane-code,
  .terminal-body {
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 20px), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 20px), transparent);
  }
}

@media (max-width: 480px) {
  .nav-link-text {
    font-size: 0.74rem;
    padding: 0 6px;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
  }

  .lang-btn {
    min-height: 40px;
    padding: 8px 12px;
  }

  .nav-copy-btn {
    min-height: 40px;
    padding: 8px 10px;
  }

  .claude-copy-btn {
    min-height: 40px;
  }

  .nav-copy-btn span {
    display: none !important;
  }

  .hero-title {
    font-size: 1.95rem;
  }

  .section-title {
    font-size: 1.7rem;
  }

  .hero-facts {
    gap: 18px 28px;
  }

  .terminal-body {
    font-size: 0.78rem;
    padding: 16px;
  }

  .pane-code {
    font-size: 0.78rem;
    padding: 16px;
  }

  .claude-config-rendered {
    padding: 18px 16px 20px;
  }

  .closing {
    padding: 0 20px 72px;
  }
}

@media (max-width: 360px) {
  .claude-config-badge {
    display: none;
  }

  .claude-copy-btn {
    padding: 8px 10px;
  }

  .claude-copy-btn span {
    display: none !important;
  }

  .hero-title {
    font-size: 1.65rem;
  }

  .section-title {
    font-size: 1.55rem;
  }
}

@media (max-width: 350px) {
  .nav-links li:last-child {
    display: none;
  }
}
