/* Diamond marketing site
   Palette: deep navy ground, blue -> cyan gradient accent (counter to
   Ruby's red), warm off-white text. Dark-only by design. */

:root {
  --bg: #090c14;
  --bg-raised: #0e1320;
  --bg-card: #121729;
  --bg-card-hover: #161c33;
  --border: #232a42;
  --border-soft: #1a2036;

  --text: #eef1fa;
  --text-dim: #9aa3bd;
  --text-faint: #8890ac;

  --blue: #3b82f6;
  --blue-bright: #5b9dff;
  --cyan: #22d3ee;
  --indigo: #4f46e5;

  --gradient: linear-gradient(135deg, var(--indigo) 0%, var(--blue) 55%, var(--cyan) 100%);
  --gradient-soft: linear-gradient(135deg, rgba(79, 70, 229, 0.16), rgba(34, 211, 238, 0.10));

  --tok-kw: #7aa2ff;
  --tok-str: #7ee0c3;
  --tok-num: #f0b86e;
  --tok-comment: #8b95b8;
  --tok-fn: #6bc6ff;
  --tok-const: #e0a8ff;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow-lg: 0 20px 60px -20px rgba(37, 99, 235, 0.35);
  --max-width: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

code, pre, .mono {
  font-family: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
}

a {
  color: inherit;
  text-decoration: none;
}

img, svg {
  display: block;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--blue);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  z-index: 200;
}
.skip-link:focus {
  left: 16px;
  top: 16px;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(9, 12, 20, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 19.5px;
  letter-spacing: -0.01em;
  color: #fff;
}

.logo-mark {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.55));
}

/* A soft highlight band sweeps across the gem on hover, like a glint. It sits
   off to the left at rest and is clipped to the diamond, so nothing shows
   until the animation runs. */
.logo-shimmer {
  transform: translateX(-4px);
  opacity: 0;
}

.brand:hover .logo-shimmer,
.brand:focus-visible .logo-shimmer {
  animation: logo-shimmer 0.9s ease-in-out;
}

@keyframes logo-shimmer {
  0% { transform: translateX(-4px); opacity: 0; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { transform: translateX(52px); opacity: 0; }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a:not(.btn) {
  color: var(--text-dim);
  font-size: 16px;
  font-weight: 500;
  transition: color 0.15s ease;
}

.nav-links a:not(.btn):hover {
  color: var(--text);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: 38px;
  height: 38px;
  color: var(--text);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 15.5px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: var(--gradient);
  color: var(--text);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
  box-shadow: var(--shadow-lg);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 24px 70px -18px rgba(37, 99, 235, 0.5);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.02);
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover {
  border-color: var(--blue-bright);
  background: rgba(91, 157, 255, 0.06);
}

.btn-sm {
  padding: 7px 14px;
  font-size: 14.5px;
}

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

.hero {
  position: relative;
  overflow: hidden;
  padding: 96px 0 80px;
}

.hero-glow {
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 640px;
  background:
    radial-gradient(45% 55% at 25% 20%, rgba(79, 70, 229, 0.30), transparent 60%),
    radial-gradient(35% 45% at 75% 10%, rgba(34, 211, 238, 0.22), transparent 60%),
    radial-gradient(30% 40% at 50% 60%, rgba(59, 130, 246, 0.18), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.hero-facets {
  position: absolute;
  top: -12%;
  right: -14%;
  width: min(900px, 86vw);
  height: auto;
  aspect-ratio: 1;
  z-index: 0;
  opacity: 0.4;
  pointer-events: none;
  /* Bottom point swings left, under the hero copy. */
  transform: rotate(32deg);
  transform-origin: 50% 50%;
  animation: facet-sway 40s ease-in-out infinite alternate;
}

@keyframes facet-sway {
  from { transform: rotate(26deg); }
  to { transform: rotate(38deg); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-facets { animation: none; }
  .brand:hover .logo-shimmer,
  .brand:focus-visible .logo-shimmer { animation: none; }
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: start;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.22);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 22px;
}

.eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
}

.hero h1 {
  font-size: clamp(2.2rem, 4.4vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 22px;
  font-weight: 800;
}

.hero h1 .grad {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p.lead {
  font-size: 19px;
  color: var(--text-dim);
  max-width: 52ch;
  margin: 0 0 34px;
}

.hero-ctas {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 34px;
}

.hero-meta {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  font-size: 15px;
  color: var(--text-faint);
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.hero-meta strong {
  color: var(--text-dim);
  font-weight: 600;
}

/* ---------- Code window ---------- */

.code-window {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.6);
}

.code-window .titlebar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.015);
}

.dots {
  display: flex;
  gap: 6px;
}
.dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #333c56;
}
.dots span:nth-child(1) { background: #ff5f56; opacity: 0.55; }
.dots span:nth-child(2) { background: #ffbd2e; opacity: 0.55; }
.dots span:nth-child(3) { background: #27c93f; opacity: 0.55; }

.code-window .filename {
  color: var(--text-dim);
  font-size: 13.5px;
}

.repl-window {
  /* Aligns the card's top with the H1 rather than the eyebrow pill above it
     (eyebrow: 15px * 1.6 line-height + 12px padding + 22px margin-bottom). */
  margin-top: 58px;
}

.repl-window .filename {
  flex: 1;
}

.repl-badge {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--cyan);
  border: 1px solid rgba(34, 211, 238, 0.35);
  background: rgba(34, 211, 238, 0.08);
  padding: 2px 9px;
  border-radius: 999px;
}

.repl-body {
  padding: 14px 18px 8px;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13.5px;
  line-height: 1.6;
}

.repl-scrollback {
  height: 17.5rem;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.repl-line {
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text);
}

.repl-hint {
  color: var(--text-faint);
}

.repl-echo {
  color: var(--text-dim);
}

.repl-prompt {
  color: var(--blue-bright);
  white-space: pre;
}

.repl-error {
  color: #ff8a80;
}

.repl-form {
  display: flex;
  align-items: baseline;
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px solid var(--border-soft);
}

.repl-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--text);
  font: inherit;
  padding: 0;
}

.repl-input::placeholder {
  color: var(--text-faint);
}

.repl-examples {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 10px 16px 4px;
  border-top: 1px solid var(--border-soft);
}

.repl-chip {
  font: inherit;
  font-size: 13px;
  color: var(--text-dim);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 11px;
  text-align: center;
  cursor: pointer;
}

.repl-chip:hover,
.repl-chip:focus-visible {
  color: var(--text);
  border-color: var(--blue);
  outline: none;
}

.repl-status {
  margin: 0;
  padding: 6px 16px 12px;
  font-size: 12.5px;
  color: var(--text-faint);
}


.code-window pre {
  margin: 0;
  padding: 20px 22px;
  overflow-x: auto;
  font-size: 15px;
  line-height: 1.65;
}

.code-window code {
  color: var(--text);
}

.tok-kw { color: var(--tok-kw); }
.tok-str { color: var(--tok-str); }
.tok-num { color: var(--tok-num); }
.tok-comment { color: var(--tok-comment); font-style: italic; }
.tok-fn { color: var(--tok-fn); }
.tok-const { color: var(--tok-const); }
.tok-ivar { color: #ffb4d1; }

/* ---------- Section scaffolding ---------- */

section {
  padding: 92px 0;
}

.section-head {
  max-width: 640px;
  margin: 0 auto 52px;
  text-align: center;
}

.section-head .eyebrow {
  margin-bottom: 16px;
}

.section-head h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  font-weight: 800;
}

.section-head p {
  color: var(--text-dim);
  font-size: 18px;
  margin: 0;
}

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  border: none;
  margin: 0;
}

/* ---------- Features grid ---------- */

.features {
  background: var(--bg-raised);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  display: block;
  color: inherit;
  text-decoration: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.feature-card:hover {
  border-color: rgba(91, 157, 255, 0.35);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--gradient-soft);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  color: var(--cyan);
}

.feature-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.feature-card h3 {
  font-size: 16.5px;
  margin: 0;
  flex: 1;
  min-width: 0;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.feature-card p {
  margin: 0;
  color: var(--text-dim);
  font-size: 16.5px;
  line-height: 1.6;
}

.feature-card code {
  font-size: 0.92em;
  color: var(--tok-fn);
  background: rgba(107, 198, 255, 0.08);
  padding: 1px 5px;
  border-radius: 4px;
}

/* ---------- Tabs / "see it in action" ---------- */

.tabs-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 24px;
}

.tab-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.tab-btn:hover {
  color: var(--text);
  border-color: rgba(91, 157, 255, 0.35);
}

.tab-btn.active {
  background: var(--gradient);
  color: var(--text);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
  border-color: transparent;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.tab-caption {
  text-align: center;
  color: var(--text-dim);
  font-size: 16px;
  margin: 18px 0 0;
}

.platform-note {
  text-align: center;
  color: var(--text-faint);
  font-size: 15px;
  max-width: 60ch;
  margin: 0 auto 24px;
}

.platform-note a {
  color: var(--cyan);
  font-weight: 600;
}

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

.terminal-window {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.6);
}

.terminal-window.run-ship {
  margin-top: 24px;
}

.terminal-window .titlebar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px 12px 16px;
  border-bottom: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.015);
}

.terminal-window .filename {
  color: var(--text-dim);
  font-size: 13.5px;
  flex: 1;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
}

.copy-btn:hover {
  color: var(--text);
  border-color: rgba(91, 157, 255, 0.35);
  background: rgba(91, 157, 255, 0.06);
}

.copy-btn.copied {
  color: #7ee0c3;
  border-color: rgba(126, 224, 195, 0.4);
  background: rgba(126, 224, 195, 0.08);
}

.terminal {
  padding: 20px 22px;
  font-size: 15px;
  line-height: 1.9;
  overflow-x: auto;
}

.terminal .line {
  white-space: pre;
}

.terminal .line:not(.comment)::before {
  content: "$ ";
  color: var(--cyan);
}

.terminal .line.gap {
  margin-top: 14px;
}

.terminal .comment {
  color: var(--tok-comment);
}

/* ---------- Docs links ---------- */

.docs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.doc-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.doc-link:hover {
  border-color: rgba(91, 157, 255, 0.35);
  transform: translateY(-1px);
}

.doc-link .label {
  font-size: 16px;
  font-weight: 600;
}

.doc-link .sub {
  display: block;
  font-size: 14px;
  color: var(--text-faint);
  font-weight: 400;
  margin-top: 2px;
}

.doc-link .arrow {
  color: var(--text-faint);
  flex-shrink: 0;
}

/* ---------- Release banner ---------- */

.release-banner {
  display: flex;
  align-items: flex-start;
  gap: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
}

.release-badge {
  flex-shrink: 0;
  background: var(--gradient);
  color: var(--text);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 16px;
  padding: 8px 16px;
  border-radius: 999px;
  box-shadow: 0 6px 16px -4px rgba(0, 0, 0, 0.5);
}

.release-body h2 {
  font-size: 20px;
  margin: 0 0 14px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.release-list {
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.release-list li {
  position: relative;
  padding-left: 20px;
  color: var(--text-dim);
  font-size: 16px;
  line-height: 1.6;
}

.release-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--gradient);
}

.release-list code {
  font-size: 0.92em;
  color: var(--tok-fn);
  background: rgba(107, 198, 255, 0.08);
  padding: 1px 5px;
  border-radius: 4px;
}

.release-link {
  display: inline-block;
  color: var(--cyan);
  font-weight: 600;
  font-size: 16px;
}

/* ---------- Internals ---------- */

.pipeline {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  counter-reset: stage;
}

.stage {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 18px;
}

.stage:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -12px;
  width: 10px;
  height: 2px;
  background: var(--gradient);
}

.stage-step {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  color: var(--cyan);
  margin-bottom: 8px;
}

.stage h3,
.internals-card h3,
.new-card h3 {
  font-size: 16.5px;
  margin: 0 0 8px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.stage p,
.internals-card p,
.new-card p {
  margin: 0;
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.6;
}

.stage code,
.internals-card code,
.new-card p code,
.featured-points code,
.release-notes code {
  font-size: 0.92em;
  color: var(--tok-fn);
  background: rgba(107, 198, 255, 0.08);
  padding: 1px 5px;
  border-radius: 4px;
}

.internals-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 36px;
}

.internals-card {
  background: var(--bg-raised);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 20px 18px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 0;
  padding: 24px 0 0;
  border-top: 1px solid var(--border-soft);
}

.stats div {
  margin: 0;
}

.stats dt {
  font-family: 'JetBrains Mono', monospace;
  font-size: 22px;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stats dd {
  margin: 4px 0 0;
  color: var(--text-faint);
  font-size: 14.5px;
}

/* ---------- What's new ---------- */

#release .section-head .release-badge {
  display: inline-block;
  margin-bottom: 16px;
}

.whats-new {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.new-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.new-card:hover {
  border-color: rgba(91, 157, 255, 0.35);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.new-card a {
  color: var(--cyan);
  font-weight: 600;
}

.new-card pre {
  margin: 14px 0 0;
  padding: 12px 14px;
  background: var(--bg-raised);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  line-height: 1.6;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.new-card pre code {
  color: var(--text);
}

.release-notes {
  margin: 28px auto 0;
  max-width: 820px;
  text-align: center;
}

.release-notes p {
  color: var(--text-dim);
  font-size: 15.5px;
  margin: 0 0 12px;
}

.release-notes strong {
  color: var(--text);
}

/* ---------- CTA banner ---------- */

.cta-banner {
  position: relative;
  border-radius: 20px;
  padding: 64px 40px;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  overflow: hidden;
}

.cta-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(50% 90% at 50% 0%, rgba(79, 70, 229, 0.28), transparent 70%),
    radial-gradient(40% 70% at 80% 100%, rgba(34, 211, 238, 0.16), transparent 70%);
  pointer-events: none;
}

.cta-banner > * {
  position: relative;
}

.cta-banner h2 {
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  margin: 0 0 12px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.cta-banner p {
  color: var(--text-dim);
  margin: 0 0 28px;
  font-size: 17.5px;
}

.cta-banner .hero-ctas {
  justify-content: center;
  margin-bottom: 0;
}

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

.site-footer {
  border-top: 1px solid var(--border-soft);
  padding: 56px 0 32px;
  background: var(--bg-raised);
}

.footer-top {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 32px;
  margin-bottom: 40px;
}

.footer-brand .brand {
  margin-bottom: 14px;
}

.footer-brand p {
  color: var(--text-faint);
  font-size: 15px;
  max-width: 34ch;
  margin: 0;
}

.footer-col h4 {
  font-size: 13.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  margin: 0 0 14px;
  font-weight: 600;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a {
  color: var(--text-dim);
  font-size: 15.5px;
  transition: color 0.15s ease;
}

.footer-col a:hover {
  color: var(--text);
}

.footer-bottom {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding-top: 28px;
  border-top: 1px solid var(--border-soft);
  color: var(--text-faint);
  font-size: 14.5px;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Responsive ---------- */

@media (max-width: 920px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }
  .pipeline {
    grid-template-columns: 1fr;
  }
  .stage:not(:last-child)::after {
    top: auto;
    bottom: -12px;
    right: auto;
    left: 28px;
    width: 2px;
    height: 10px;
  }
  .internals-grid,
  .stats,
  .whats-new {
    grid-template-columns: repeat(2, 1fr);
  }
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .docs-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 680px) {
  section {
    padding: 64px 0;
  }
  .hero {
    padding: 56px 0 56px;
  }
  .release-banner {
    flex-direction: column;
    padding: 28px 24px;
  }
  .nav-links {
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--bg-raised);
    border-bottom: 1px solid var(--border-soft);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 24px 28px;
    gap: 18px;
    transform: translateY(-130%);
    opacity: 0;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }
  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
  }
  .nav-links .nav-actions {
    margin-top: 4px;
  }
  .nav-toggle {
    display: flex;
  }
  .feature-grid {
    grid-template-columns: 1fr;
  }
  .docs-grid {
    grid-template-columns: 1fr;
  }
  .footer-top {
    grid-template-columns: 1fr;
  }
  .internals-grid,
  .stats,
  .whats-new {
    grid-template-columns: 1fr;
  }
  .cta-banner {
    padding: 44px 24px;
  }
}

/* ---------- Familiar ground ---------- */

.familiar-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  align-items: start;
}

.familiar-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.familiar-grid .new-card pre {
  font-size: 13px;
}

.familiar-packages {
  margin: 14px 0 0;
}

.familiar-packages a {
  color: var(--cyan);
  font-weight: 600;
  text-decoration: none;
}

@media (max-width: 760px) {
  .familiar-grid {
    grid-template-columns: 1fr;
  }
}

/* The REPL input is transparent text over a coloured copy of itself, so the lexer's colours
   show while typing and the caret, selection and scrolling stay the browser's own. */
.repl-field {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
}

.repl-field .repl-input {
  position: relative;
  width: 100%;
  color: transparent;
  caret-color: var(--text);
}

.repl-highlight {
  position: absolute;
  inset: 0;
  overflow: hidden;
  white-space: pre;
  pointer-events: none;
  color: var(--text);
}

.tok-sym { color: var(--tok-const); }

/* ---------- Featured cut ---------- */

.featured-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.featured-points {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--text-dim);
  font-size: 15px;
}

.featured-points strong {
  color: var(--text);
}

.featured-grid .new-card pre {
  font-size: 13px;
}

@media (max-width: 760px) {
  .featured-grid {
    grid-template-columns: 1fr;
  }
}

/* Completion: faint text after the caret, and a short list above the line. */
.repl-ghost {
  color: var(--text-faint);
  opacity: 0.75;
}

.repl-completions {
  position: absolute;
  bottom: calc(100% + 8px);
  z-index: 2;
  margin: 0;
  padding: 4px;
  min-width: 11ch;
  list-style: none;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.repl-completion {
  padding: 1px 8px;
  border-radius: 4px;
  color: var(--text-dim);
  white-space: pre;
  cursor: pointer;
}

.repl-completion b {
  font-weight: 600;
  color: var(--text);
}

.repl-completion.is-selected {
  background: rgba(91, 157, 255, 0.18);
  color: var(--text);
}
