/* ==========================================================================
   Localdev landing page — static stylesheet
   ========================================================================== */

/* ---------- Theme tokens ---------- */

:root {
  --bg-main: #f9f9f8;
  --bg-main-rgb: 249, 249, 248;
  --bg-alt: #f0f0ea;
  --bg-card: #ffffff;
  --text-main: #000000;
  --text-bold: #111111;
  --text-muted: #333333;
  --text-dim: #555555;
  --text-light: #666666;
  --accent: #e60000;
  --accent-hover: #cc0000;
  --accent-rgb: 230, 0, 0;
  --success: #00bb00;
  --border-color: #000000;
  --border-rgb: 0, 0, 0;

  --font-display: "Onest", sans-serif;
  --font-body: "DM Sans", sans-serif;
  --font-mono: "JetBrains Mono", monospace;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);

  color-scheme: light;
}

.dark {
  --bg-main: #0a0a0a;
  --bg-main-rgb: 10, 10, 10;
  --bg-alt: #141414;
  --bg-card: #1c1c1c;
  --text-main: #f9f9f8;
  --text-bold: #ffffff;
  --text-muted: #d4d4d8;
  --text-dim: #a1a1aa;
  --text-light: #71717a;
  --accent: #ff3333;
  --accent-hover: #ff4d4d;
  --accent-rgb: 255, 51, 51;
  --success: #00ff00;
  --border-color: #ffffff;
  --border-rgb: 255, 255, 255;

  color-scheme: dark;
}

/* ---------- Reset ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: 0 solid;
}

html {
  font-size: 16px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg-main);
  color: var(--text-bold);
  font-family: var(--font-body);
}

h1,
h2,
h3 {
  font-size: inherit;
  font-weight: inherit;
}

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

button {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
  background: transparent;
  cursor: pointer;
}

img,
svg {
  display: block;
}

pre {
  font-family: var(--font-mono);
  overflow: auto;
}

table {
  border-collapse: collapse;
  text-indent: 0;
}

[hidden] {
  display: none !important;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(var(--border-rgb), 0.2); border-radius: 0; }

/* ---------- Icons ---------- */

.icon {
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Show/hide content depending on the active theme */
.dark .when-light,
html:not(.dark) .when-dark {
  display: none;
}

/* ---------- Layout helpers ---------- */

.px {
  padding-inline: 1.5rem;
}

.wrap {
  max-width: 80rem;
  margin-inline: auto;
}

.wrap-5xl { max-width: 64rem; margin-inline: auto; }
.wrap-4xl { max-width: 56rem; margin-inline: auto; }
.wrap-3xl { max-width: 48rem; margin-inline: auto; }

.section {
  padding-block: 6rem;
}

.anchor {
  scroll-margin-top: 5rem;
}

.bg-alt {
  background: var(--bg-alt);
}

.relative { position: relative; }
.overflow-hidden { overflow: hidden; }
.text-center { text-align: center; }

.split {
  display: grid;
  gap: 4rem;
  align-items: center;
}

@media (min-width: 48rem) {
  .px { padding-inline: 2.5rem; }
  .split-md { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 64rem) {
  .split-lg { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Typography ---------- */

.h2 {
  font-family: var(--font-display);
  font-size: 1.875rem;
  line-height: 1.2;
  font-weight: 700;
  color: var(--text-main);
}

.h2.tight { line-height: 1.25; }

@media (min-width: 48rem) {
  .h2 { font-size: 2.25rem; line-height: calc(2.5 / 2.25); }
}

.accent { color: var(--accent); }

.prose {
  font-size: 1rem;
  line-height: 1.625;
  color: var(--text-dim);
}

.prose > * + * {
  margin-top: 1rem;
}

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

/* ---------- Badges ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: calc(1 / 0.75);
  font-weight: 500;
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.12);
  border: 2px solid var(--border-color);
  box-shadow: 2px 2px 0 0 var(--border-color);
}

.badge + .h2 {
  margin-top: 1.25rem;
}

/* Small bordered tag (version, statuses, "BYOC", "step 01") */
.tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: calc(1 / 0.75);
  padding: 0.25rem 0.625rem;
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.12);
  border: 2px solid var(--border-color);
}

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

.btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  font-size: 1rem;
  line-height: 1.5;
  border: 2px solid var(--border-color);
  box-shadow: 4px 4px 0 0 var(--border-color);
}

.btn-primary {
  gap: 0.625rem;
  font-weight: 600;
  color: #ffffff;
  background: var(--accent);
  transition: all 0.2s;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 0 var(--border-color);
}

.btn-ghost {
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-card);
  transition: all 0.15s var(--ease);
}

.btn-ghost:hover {
  color: var(--text-bold);
  background: rgba(var(--accent-rgb), 0.12);
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 0 var(--border-color);
}

.btn-sm {
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  line-height: calc(1.25 / 0.875);
}

.btn-primary.btn-sm { font-weight: 500; }

.btn-lg {
  padding: 1rem 1.75rem;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

/* ---------- Window chrome (terminal / config) ---------- */

.window {
  overflow: hidden;
  font-family: var(--font-mono);
  background: var(--bg-alt);
  border: 2px solid var(--border-color);
  box-shadow: 8px 8px 0 0 var(--border-color);
}

.window-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--bg-main);
  border-bottom: 2px solid var(--border-color);
}

.window-dot {
  width: 0.75rem;
  height: 0.75rem;
  border: 2px solid var(--border-color);
}

.window-dot.red { background: oklch(63.7% 0.237 25.331 / 0.7); }
.window-dot.yellow { background: oklch(79.5% 0.184 86.047 / 0.7); }
.window-dot.green { background: oklch(72.3% 0.219 149.579 / 0.7); }

.window-title {
  margin-left: 0.75rem;
  font-size: 0.75rem;
  line-height: calc(1 / 0.75);
  color: var(--text-light);
}

.window-body {
  padding: 1.25rem;
  font-size: 0.875rem;
  line-height: 1.625;
}

/* Terminal */
.term-line {
  color: var(--text-dim);
  opacity: 0;
  animation: fade-in 0.3s ease both;
}

.term-line:not(:last-child) {
  margin-bottom: 0.125rem;
}

.term-line.ok { color: var(--success); }

.term-prompt {
  color: var(--text-main);
  font-weight: 700;
}

.term-done {
  color: var(--accent);
  font-weight: 600;
}

.term-cursor-line {
  display: flex;
  align-items: center;
  margin-top: 0.25rem;
}

.term-cursor {
  display: inline-block;
  width: 0.5rem;
  height: 1rem;
  margin-left: 0.25rem;
  background: var(--text-main);
  animation: blink 1s step-end infinite;
}

/* Config file */
.cfg-key { color: var(--text-main); }
.cfg-sep { color: var(--text-dim); }
.cfg-val { color: var(--text-muted); }
.cfg-i1 { padding-left: 1rem; }
.cfg-i2 { padding-left: 2rem; }
.cfg-i3 { padding-left: 3rem; }

/* ---------- Nav ---------- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
  background: rgba(var(--bg-main-rgb), 0.92);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 2px solid var(--border-color);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-version {
  flex-shrink: 0;
  padding: 0.125rem 0.5rem;
  background: rgba(var(--accent-rgb), 0.15);
}

.nav-links,
.nav-actions {
  display: none;
  align-items: center;
}

.nav-links { gap: 2rem; }
.nav-actions { gap: 0.75rem; }

@media (min-width: 76rem) { /* the full header needs about 1,200 px */
  .nav-links,
  .nav-actions {
    display: flex;
  }
}

.nav-link {
  padding-bottom: 2px;
  font-size: 0.875rem;
  line-height: calc(1.25 / 0.875);
  font-weight: 500;
  color: var(--text-dim);
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-bottom-color 0.2s;
}

.nav-link:hover {
  color: var(--text-bold);
  border-bottom-color: var(--accent);
}

.theme-toggle {
  padding: 0.5rem;
  color: var(--text-main);
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  box-shadow: 3px 3px 0 0 var(--border-color);
  transition: all 0.15s var(--ease);
}

.theme-toggle:hover {
  transform: translate(-1px, -1px);
}

.nav-github,
.nav-github:hover {
  color: var(--text-main);
}

.nav-github-stars {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  line-height: calc(1 / 0.75);
  color: var(--text-dim);
}

.menu-toggle {
  padding: 0.5rem;
  color: var(--text-muted);
}

.menu-toggle span {
  display: block;
  width: 1.25rem;
  height: 0.125rem;
  background: currentColor;
}

.menu-toggle span + span { margin-top: 0.375rem; }
.menu-toggle span:last-child { width: 0.75rem; }

@media (min-width: 76rem) { /* the full header needs about 1,200 px */
  .menu-toggle { display: none; }
}

/* Mobile menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 4rem 1.5rem 2rem;
  background: var(--bg-main);
}

.mobile-menu > a,
.mobile-menu > button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
}

.mobile-menu > .mobile-link {
  font-size: 1.125rem;
  line-height: calc(1.75 / 1.125);
}

.mobile-menu > button { font-weight: 500; }

.mobile-menu > .btn {
  width: fit-content;
  padding: 0.75rem 1.25rem;
  font-weight: 500;
  color: #ffffff;
}

@media (min-width: 76rem) { /* the full header needs about 1,200 px */
  .mobile-menu { display: none; }
}

/* ---------- Logo ---------- */

/* Same mark and wordmark as the ldev UI (frontend/src/components/logo.tsx) */
.logo {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  /* Proportions as in the UI: mark 1.55× the text, about 1em apart */
  gap: 1.05em;
  font-size: 20px;
  /* ".build" grey, as in the UI */
  --logo-subtle: #a0a09a;
}

.dark .logo { --logo-subtle: #8e8e97; }

.logo-sm { font-size: 16px; }

.logo-mark {
  height: 1.55em;
  width: auto;
  overflow: visible;
}

.logo-main {
  fill: var(--text-bold);
  transition: fill 0.3s ease;
}

.logo-tip {
  fill: var(--accent);
  transition: fill 0.3s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.logo:hover .logo-tip { transform: translateX(10px); }

.logo-name {
  font-family: "Inter", var(--font-display);
  font-weight: 720;
  letter-spacing: -0.025em;
  line-height: 1;
  color: var(--text-bold);
  transition: color 0.3s ease;
}

.logo-name span {
  font-weight: 450;
  color: var(--logo-subtle);
  transition: color 0.3s ease;
}

/* Click cycles: 0 = default, 1 = all red, 2 = one colour */
.logo[data-style="1"] .logo-main { fill: var(--accent); }
.logo[data-style="1"] .logo-name,
.logo[data-style="1"] .logo-name span { color: var(--accent); }

.logo[data-style="2"] .logo-tip { fill: var(--text-bold); }
.logo[data-style="2"] .logo-name span { color: var(--text-bold); }

/* ---------- Decorative backgrounds ---------- */

.dot-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(circle at 1px 1px, rgba(var(--accent-rgb), 0.18) 1px, transparent 1.5px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(ellipse 55% 55% at 50% 40%, #000 0%, transparent 100%);
  mask-image: radial-gradient(ellipse 55% 55% at 50% 40%, #000 0%, transparent 100%);
}

.glow {
  position: absolute;
  pointer-events: none;
}

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

.hero {
  padding-top: 9rem;
  padding-bottom: 6rem;
}

@media (min-width: 48rem) {
  .hero {
    padding-top: 11rem;
    padding-bottom: 8rem;
  }
}

.hero-glow-1 {
  top: 4rem;
  left: 33.333%;
  width: 700px;
  height: 500px;
  background: radial-gradient(ellipse, rgba(var(--accent-rgb), 0.14) 0%, transparent 65%);
  filter: blur(60px);
}

.hero-glow-2 {
  top: 8rem;
  right: 25%;
  width: 400px;
  height: 300px;
  background: radial-gradient(ellipse, rgba(var(--accent-rgb), 0.06) 0%, transparent 70%);
  filter: blur(50px);
}

.hero h1 {
  margin-top: 1.5rem;
  font-family: var(--font-display);
  font-size: 3rem;
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text-main);
}

@media (min-width: 48rem) {
  .hero h1 { font-size: 3.75rem; }
}

@media (min-width: 80rem) {
  .hero h1 { font-size: 4.5rem; }
}

.hero-lede {
  max-width: 32rem;
  margin-top: 1.5rem;
  font-size: 1.125rem;
  line-height: 1.625;
  color: var(--text-dim);
}

.hero .btn-row {
  margin-top: 2.5rem;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-top: 2rem;
}

.hero-stats > div {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  line-height: calc(1.25 / 0.875);
  color: var(--text-light);
}

.float {
  animation: float 6s ease-in-out infinite;
}

/* ---------- Problem ---------- */

.spectrum {
  display: none;
}

@media (min-width: 48rem) {
  .spectrum { display: block; }
}

.spectrum-list > * + * {
  margin-top: 0.75rem;
}

.spectrum-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1.25rem;
  background: var(--bg-card);
  border: 2px solid var(--border-color);
}

.spectrum-label {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: calc(1.25 / 0.875);
  font-weight: 500;
  color: var(--text-muted);
}

.spectrum-row.is-localdev {
  background: rgba(var(--accent-rgb), 0.12);
  box-shadow: 4px 4px 0 0 var(--border-color);
}

.spectrum-row.is-localdev .spectrum-label { color: var(--text-bold); }

.spectrum-row .tag { padding: 0.25rem 0.625rem; }
.tag-warn { color: #f59e0b; background: rgba(245, 158, 11, 0.12); }
.tag-neutral { color: var(--text-main); background: rgba(var(--border-rgb), 0.08); }
.tag-good { color: var(--accent); background: rgba(var(--accent-rgb), 0.15); }
.tag-dim { color: var(--text-dim); background: rgba(var(--border-rgb), 0.06); }

.spectrum-glow {
  inset: -1.5rem;
  background: radial-gradient(ellipse at center, rgba(var(--accent-rgb), 0.06), transparent 70%);
}

.problem .prose {
  margin-top: 1.5rem;
}

.problem .prose .strong {
  font-weight: 500;
  color: var(--text-muted);
}

.callout {
  margin-top: 2rem;
  padding: 1rem 1.25rem;
  font-size: 0.875rem;
  line-height: calc(1.25 / 0.875);
  font-style: italic;
  color: var(--text-bold);
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-left: 6px solid var(--accent);
  box-shadow: 4px 4px 0 0 var(--border-color);
}

/* ---------- Positioning ---------- */

.positioning {
  background: linear-gradient(to bottom, var(--bg-main), var(--bg-alt), var(--bg-main));
}

.positioning .prose {
  margin-top: 1.5rem;
}

/* ---------- BYOC ---------- */

.byoc-glow {
  inset: 0;
  background: radial-gradient(ellipse at 60% 50%, rgba(var(--accent-rgb), 0.08) 0%, transparent 65%);
}

.byoc-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.byoc .h2 { margin: 0 0 1rem; }

.byoc .lede {
  margin-bottom: 1.5rem;
  font-size: 1rem;
  line-height: 1.625;
  color: var(--text-dim);
}

.byoc .lede + .lede { margin-bottom: 2.5rem; }

.checklist > * + * {
  margin-top: 1.25rem;
}

.check-item {
  display: flex;
  gap: 1rem;
}

.check-box {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.25rem;
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.15);
  border: 2px solid var(--border-color);
}

.check-title {
  margin-bottom: 0.25rem;
  font-family: var(--font-display);
  font-size: 0.875rem;
  line-height: calc(1.25 / 0.875);
  font-weight: 600;
  color: var(--text-bold);
}

.check-body {
  font-size: 0.875rem;
  line-height: 1.625;
  color: var(--text-dim);
}

/* Pipeline diagram */
.pipeline {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: calc(1 / 0.75);
}

.pipeline-card {
  padding: 1.25rem;
  background: var(--bg-card);
  border: 2px solid var(--border-color);
}

.pipeline-label {
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-light);
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.service-grid > div,
.backend-grid > div {
  text-align: center;
  color: var(--text-bold);
  background: var(--bg-card);
  border: 2px solid var(--border-color);
}

.service-grid > div { padding: 0.5rem 0.625rem; }

.pipeline-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding-block: 0.25rem;
  color: var(--text-light);
}

.pipeline-arrow .arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.pipeline-arrow .stem {
  width: 1px;
  height: 1rem;
  background: linear-gradient(to bottom, rgba(var(--accent-rgb), 0.6), rgba(var(--accent-rgb), 0.2));
}

.pipeline-arrow .stem.up {
  background: linear-gradient(to bottom, rgba(var(--accent-rgb), 0.2), rgba(var(--accent-rgb), 0.6));
}

.pipeline-arrow svg path {
  fill: rgba(var(--accent-rgb), 0.6);
}

.collector {
  background: rgba(var(--accent-rgb), 0.08);
  box-shadow: 4px 4px 0 0 var(--border-color);
}

.collector-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.collector-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  font-size: 1rem;
  line-height: 1.5;
  background: rgba(var(--accent-rgb), 0.2);
  border: 2px solid var(--border-color);
}

.collector-title {
  font-size: 0.875rem;
  line-height: calc(1.25 / 0.875);
  font-weight: 600;
  color: var(--accent);
}

.collector-sub {
  color: var(--text-light);
}

.collector pre {
  line-height: 1.625;
  color: var(--text-dim);
}

.backend-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
}

.backend-grid > div {
  padding-block: 0.75rem;
  font-weight: 500;
  color: var(--text-main);
}

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

.section-head {
  margin-bottom: 4rem;
  text-align: center;
}

.feature-grid {
  display: grid;
  grid-auto-rows: minmax(0, 1fr);
  gap: 1rem;
}

@media (min-width: 48rem) {
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature-card.is-wide { grid-column: span 2; }
}

@media (min-width: 64rem) {
  .feature-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.feature-card {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  box-shadow: 4px 4px 0 0 var(--border-color);
  transition: all 0.3s var(--ease);
}

.feature-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 0 var(--border-color);
}

.feature-card.is-highlight {
  background: rgba(var(--accent-rgb), 0.08);
}

.feature-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.12);
  border: 2px solid var(--border-color);
}

.is-highlight .feature-icon { background: rgba(var(--accent-rgb), 0.15); }

.feature-card .tag {
  padding: 0.125rem 0.5rem;
  font-weight: 500;
  background: rgba(var(--accent-rgb), 0.15);
}

.feature-card h3 {
  margin-bottom: 0.5rem;
  font-family: var(--font-display);
  font-size: 1rem;
  line-height: 1.5;
  font-weight: 600;
  color: var(--text-bold);
}

.feature-card p {
  flex: 1;
  font-size: 0.875rem;
  line-height: 1.625;
  color: var(--text-dim);
}

.feature-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: calc(1 / 0.75);
  font-weight: 500;
  color: var(--accent);
  transition: opacity 0.15s var(--ease);
}

.feature-link:hover { opacity: 0.8; }

.feature-card .code-block {
  margin-top: 1rem;
  overflow-x: auto;
}

/* ---------- Comparison ---------- */

.compare .section-head { margin-bottom: 3.5rem; }

.table-wrap {
  overflow-x: auto;
  border: 2px solid var(--border-color);
  box-shadow: 8px 8px 0 0 var(--border-color);
}

.compare table {
  width: 100%;
}

.compare th,
.compare td {
  padding: 1rem 1.25rem;
  text-align: center;
}

.compare thead tr {
  background: var(--bg-card);
  border-bottom: 2px solid var(--border-color);
}

.compare th {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: calc(1 / 0.75);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-light);
}

.compare th:first-child,
.compare td:first-child {
  text-align: left;
}

.compare .col-localdev {
  border-inline: 2px solid var(--border-color);
}

.compare th.col-localdev {
  font-family: var(--font-display);
  font-size: 0.875rem;
  line-height: calc(1.25 / 0.875);
  font-weight: 700;
  text-transform: none;
  letter-spacing: normal;
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.12);
}

.compare tbody tr {
  background: var(--bg-main);
  border-bottom: 1px solid rgba(var(--border-rgb), 0.2);
}

.compare tbody tr:nth-child(even) { background: var(--bg-alt); }
.compare tbody tr:last-child { border-bottom: none; }

.compare td {
  font-size: 0.8rem;
  line-height: calc(1.25 / 0.875);
  color: var(--text-bold);
}

.compare td:first-child {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.compare td.bad {
  font-family: var(--font-mono);
  color: var(--text-dim);
}

.compare td.col-localdev {
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.08);
}

.compare td.col-localdev span {
  margin-right: 0.375rem;
}

/* ---------- How it works ---------- */

.steps {
  position: relative;
}

.steps-line {
  position: absolute;
  left: 19px;
  top: 2.5rem;
  bottom: 2.5rem;
  width: 0.125rem;
  background: linear-gradient(to bottom, var(--accent), rgba(var(--accent-rgb), 0.3), transparent);
}

.step {
  position: relative;
  display: flex;
  gap: 1.5rem;
}

.step:not(:last-child) {
  margin-bottom: 1.5rem;
}

.step-num {
  position: relative;
  z-index: 10;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: calc(1 / 0.75);
  font-weight: 700;
  color: var(--text-main);
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  box-shadow: 4px 4px 0 0 var(--border-color);
}

.step-card {
  flex: 1;
  min-width: 0;
  margin-bottom: 0.5rem;
  overflow: hidden;
  border: 2px solid var(--border-color);
  box-shadow: 6px 6px 0 0 var(--border-color);
}

.step-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: var(--bg-card);
  border-bottom: 2px solid var(--border-color);
}

.step-head h3 {
  font-family: var(--font-display);
  font-size: 1.125rem;
  line-height: calc(1.75 / 1.125);
  font-weight: 700;
  color: var(--text-main);
}

.step-body {
  padding: 1.25rem 1.5rem;
  background: var(--bg-main);
}

.step-body > p {
  margin-bottom: 1.25rem;
  font-size: 0.875rem;
  line-height: 1.625;
  color: var(--text-dim);
}

.code-block {
  padding: 1rem;
  font-size: 0.75rem;
  line-height: 1.625;
  color: var(--accent);
  background: var(--bg-alt);
  border: 2px solid var(--border-color);
}

/* Install tabs */
.tabs {
  display: flex;
  overflow: hidden;
  background: var(--bg-alt);
  border: 2px solid var(--border-color);
}

.tab {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.625rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: calc(1 / 0.75);
  font-weight: 500;
  color: var(--text-light);
  border-bottom: 2px solid transparent;
  transition: all 0.15s var(--ease);
}

.tab[aria-selected="true"] {
  color: var(--text-bold);
  background: rgba(var(--accent-rgb), 0.12);
  border-bottom-color: var(--accent);
}

.tab-panel {
  position: relative;
  padding: 1rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.7;
  background: var(--bg-alt);
  border: 2px solid var(--border-color);
  border-top: 0;
}

.tab-panel code {
  font-family: inherit;
  color: var(--accent);
}

.copy-btn {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  padding: 0.25rem 0.625rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: calc(1 / 0.75);
  font-weight: 500;
  color: var(--text-dim);
  background: rgba(var(--border-rgb), 0.15);
  border: 1px solid rgba(var(--border-rgb), 0.15);
  border-radius: 0.25rem;
  transition: all 0.15s var(--ease);
}

.copy-btn.is-copied {
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.15);
  border-color: rgba(var(--accent-rgb), 0.3);
}

/* ---------- Social proof ---------- */

.proof {
  padding-block: 5rem;
}

.proof h2 {
  margin-bottom: 1rem;
  font-size: 1.5rem;
  line-height: calc(2 / 1.5);
}

@media (min-width: 48rem) {
  .proof h2 { font-size: 1.875rem; line-height: 1.2; }
}

.proof-lede {
  margin-bottom: 3rem;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-dim);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

@media (min-width: 48rem) {
  .stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.stat {
  padding-block: 2rem;
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  box-shadow: 4px 4px 0 0 var(--border-color);
}

.stat-value {
  margin-bottom: 0.25rem;
  font-family: var(--font-display);
  font-size: 1.875rem;
  line-height: 1.2;
  font-weight: 700;
  color: var(--accent);
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: calc(1 / 0.75);
  color: var(--text-light);
}

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

.cta {
  padding-block: 7rem;
}

.cta-glow {
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(var(--accent-rgb), 0.2) 0%, transparent 65%);
}

.cta h2 {
  margin-bottom: 1.5rem;
  font-size: 2.25rem;
  line-height: 1.25;
}

@media (min-width: 48rem) {
  .cta h2 { font-size: 3rem; line-height: 1.25; }
}

.cta-lede {
  max-width: 36rem;
  margin: 0 auto 2.5rem;
  font-size: 1.125rem;
  line-height: 1.625;
  color: var(--text-dim);
}

.cta .btn-row {
  justify-content: center;
}

.cta-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2rem;
  font-size: 0.875rem;
  line-height: calc(1.25 / 0.875);
}

.cta-links a,
.footer-links a {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--text-light);
  transition: color 0.15s var(--ease);
}

.cta-links a:hover,
.footer-links a:hover {
  color: var(--accent);
}

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

.footer {
  padding-block: 3rem;
  border-top: 2px solid var(--border-color);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

@media (min-width: 48rem) {
  .footer-inner { flex-direction: row; }
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-tagline,
.footer-links {
  font-size: 0.875rem;
  line-height: calc(1.25 / 0.875);
  color: var(--text-light);
}

.footer-tagline { font-family: var(--font-mono); }

.footer-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* ---------- Animations ---------- */

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .float,
  .term-cursor,
  .term-line {
    animation: none;
  }

  .term-line { opacity: 1; }
}
