/* =====================================================================
   PiePiper — Marketing Site
   Design language: Linear / Vercel / Hindsight aesthetic.
   White, near-black, one restrained accent (deep teal). No gradients in hero.
   No purple. No AI-generated cliche.
   ===================================================================== */

:root {
  /* Colors */
  --bg: #ffffff;
  --bg-soft: #fafbfc;
  --bg-light-tint: #f4f6f8;
  --text: #0f172a;
  --text-mute: #4b5563;
  --text-light: #94a3b8;
  --accent: #0d6e6e;
  --accent-hover: #0a5a5a;
  --accent-soft: #e6f2f0;
  --accent-text: #064e4e;
  /* PiePiper brand green — Silicon Valley Pied Piper homage.
     Tweak this single value if you find the show's exact hex later. */
  --brand: #54B947;
  --brand-hover: #46a539;
  --border: #e5e7eb;
  --border-strong: #cbd5e1;
  --success: #16a34a;
  --warning: #d97706;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;

  /* Spacing scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;
  --space-10: 8rem;

  /* Radii */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 8px 24px rgba(15, 23, 42, 0.08);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  font-feature-settings: 'cv11', 'ss01', 'ss03';
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }

button { font-family: inherit; cursor: pointer; }

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

/* ---------- Container ---------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}
.container-narrow {
  max-width: 760px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.625rem 1.125rem;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1;
  border: 1px solid transparent;
  transition: all 120ms ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
.btn-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover {
  border-color: var(--text);
  color: var(--text);
}
.btn-lg {
  padding: 0.875rem 1.5rem;
  font-size: 1rem;
}
.btn-block {
  width: 100%;
}

/* ---------- Navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(8px);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--text);
  letter-spacing: -0.01em;
}
.logo:hover { color: var(--text); }
.logo:hover .logo-text { color: var(--brand-hover); }
/* Real PNG/SVG logo — replaces the prior CSS-drawn block. The size is
   set in HTML via width/height attributes for layout stability; we
   keep small CSS overrides for crisp rendering and flexbox alignment. */
.logo-mark {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  object-fit: contain;
  /* Slight sharpening for retina displays */
  image-rendering: -webkit-optimize-contrast;
}
/* PiePiper wordmark — Silicon Valley Pied Piper green */
.logo-text {
  color: var(--brand);
  font-weight: 700;
  letter-spacing: -0.015em;
  transition: color 120ms ease;
}
.nav-links {
  display: flex;
  gap: var(--space-6);
  align-items: center;
}
.nav-links a {
  font-size: 0.9375rem;
  color: var(--text-mute);
  transition: color 120ms;
}
.nav-links a:hover { color: var(--text); }
.nav-actions {
  display: flex;
  gap: var(--space-3);
  align-items: center;
}

/* ---- Mobile hamburger + menu (hidden on desktop) ---- */
.nav-mobile-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.nav-burger,
.nav-burger::before,
.nav-burger::after {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 200ms ease, opacity 200ms ease, top 200ms ease;
}
.nav-burger { position: relative; }
.nav-burger::before,
.nav-burger::after {
  content: '';
  position: absolute;
  left: 0;
}
.nav-burger::before { top: -6px; }
.nav-burger::after  { top:  6px; }
.nav-mobile-toggle[aria-expanded="true"] .nav-burger {
  background: transparent;
}
.nav-mobile-toggle[aria-expanded="true"] .nav-burger::before {
  top: 0;
  transform: rotate(45deg);
}
.nav-mobile-toggle[aria-expanded="true"] .nav-burger::after {
  top: 0;
  transform: rotate(-45deg);
}

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-5) var(--space-5);
  background: var(--bg);
  border-top: 1px solid var(--border);
}
.mobile-menu.is-open {
  display: flex;
  animation: mm-in 180ms ease-out;
}
@keyframes mm-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: none; }
}
.mobile-menu a {
  display: block;
  padding: 0.875rem var(--space-3);
  font-size: 1rem;
  color: var(--text);
  border-radius: var(--radius-sm);
  min-height: 44px;
  display: flex;
  align-items: center;
}
.mobile-menu a:hover { background: var(--bg-soft); }
.mobile-menu-cta {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding-top: var(--space-3);
  margin-top: var(--space-2);
  border-top: 1px solid var(--border);
}
.mobile-menu-cta .btn {
  min-height: 48px;
}

@media (max-width: 800px) {
  .nav-links { display: none; }
  .nav-actions { display: none; }
  .nav-mobile-toggle { display: inline-flex; }
}

/* ---------- Hero ---------- */
.hero {
  padding: var(--space-9) 0 var(--space-9);
  background: var(--bg);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

/* Subtle static backdrop tint — keeps the white from being clinical */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 12%, rgba(13, 148, 136, 0.05), transparent 55%),
    radial-gradient(circle at 88% 78%, rgba(13, 110, 110, 0.04), transparent 55%);
  pointer-events: none;
  z-index: 0;
}

/* Constellation canvas — drifting nodes with auto-connecting edges */
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  z-index: 0;
}

.hero > .container { position: relative; z-index: 1; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.375rem 0.875rem;
  background: var(--accent-soft);
  color: var(--accent-text);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 500;
  margin-bottom: var(--space-6);
}
.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--text);
  margin: 0 0 var(--space-5);
  max-width: 22ch;
}
.hero-sub {
  font-size: clamp(1.0625rem, 1.7vw, 1.25rem);
  line-height: 1.55;
  color: var(--text-mute);
  margin: 0 0 var(--space-7);
  max-width: 60ch;
}
.hero-cta {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: var(--space-4);
}
.hero-fineprint {
  font-size: 0.875rem;
  color: var(--text-light);
  margin: 0 0 var(--space-9);
}

/* Hero stats */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.stat {
  padding: var(--space-6) var(--space-5);
  border-right: 1px solid var(--border);
  text-align: left;
}
.stat:last-child { border-right: none; }
.stat-num {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1;
  margin-bottom: var(--space-2);
}
.stat-label {
  font-size: 0.875rem;
  color: var(--text-mute);
  margin-bottom: var(--space-1);
}
.stat-rank {
  font-size: 0.8125rem;
  color: var(--accent);
  font-weight: 500;
}
@media (max-width: 700px) {
  .hero-stats { grid-template-columns: 1fr; }
  .stat { border-right: none; border-bottom: 1px solid var(--border); }
  .stat:last-child { border-bottom: none; }
}

/* ---------- Section ---------- */
.section {
  padding: var(--space-9) 0;
}
.section-light {
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.section-head {
  max-width: 720px;
  margin-bottom: var(--space-8);
}
.section-head.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.eyebrow {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-3);
}
.section-title {
  font-size: clamp(1.875rem, 3.5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text);
  margin: 0 0 var(--space-4);
}
.section-title.accent {
  color: var(--accent);
}
.section-lede {
  font-size: 1.0625rem;
  color: var(--text-mute);
  margin: 0;
  line-height: 1.6;
  max-width: 60ch;
}

/* ---------- Two-col problem/solution ---------- */
.problem {
  padding: var(--space-9) 0;
  border-bottom: 1px solid var(--border);
}
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
}
@media (max-width: 800px) {
  .two-col { grid-template-columns: 1fr; gap: var(--space-6); }
}

/* ---------- Architecture (3 steps) ---------- */
.architecture {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: var(--space-4);
  align-items: stretch;
  margin: var(--space-8) 0;
}
.arch-step {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.arch-num {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--accent);
  font-weight: 500;
  letter-spacing: 0.04em;
}
.arch-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--accent-text);
  display: flex;
  align-items: center;
  justify-content: center;
}
.arch-step h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.01em;
}
.arch-step p {
  font-size: 0.9375rem;
  color: var(--text-mute);
  margin: 0;
  line-height: 1.55;
}
.arch-arrow {
  display: flex;
  align-items: center;
  font-size: 1.5rem;
  color: var(--text-light);
  font-weight: 300;
}
@media (max-width: 900px) {
  .architecture { grid-template-columns: 1fr; }
  .arch-arrow { justify-content: center; transform: rotate(90deg); }
}

/* Architecture flow SVG */
.arch-flow {
  margin-top: var(--space-7);
  background:
    radial-gradient(circle at 20% 0%, rgba(13, 148, 136, 0.05), transparent 55%),
    radial-gradient(circle at 90% 100%, rgba(13, 110, 110, 0.04), transparent 55%),
    var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6);
  overflow-x: auto;
}
.arch-svg {
  width: 100%;
  height: auto;
  min-width: 760px;
  display: block;
}
/* On phones, scale the diagram down to fit instead of forcing horizontal
   scroll. The SVG viewBox keeps everything readable; tap text gets small
   but stays legible. */
@media (max-width: 760px) {
  .arch-flow {
    padding: var(--space-4);
    overflow-x: hidden;
  }
  .arch-svg {
    min-width: 0;
    width: 100%;
  }
}
@media (max-width: 480px) {
  /* On really small phones the SVG text becomes too small. Allow horizontal
     scroll back as the lesser of two evils, and prompt the user. */
  .arch-flow {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .arch-svg {
    min-width: 540px;
  }
  .arch-flow::after {
    content: "← scroll →";
    display: block;
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-light);
    padding-top: var(--space-2);
    font-family: var(--font-mono);
  }
}

/* ---- Privacy boundary ("Your machine") ---- */
.arch-svg .boundary-box {
  fill: rgba(13, 148, 136, 0.025);
  stroke: rgba(13, 148, 136, 0.35);
  stroke-width: 1.5;
  stroke-dasharray: 6 4;
}
.arch-svg .boundary-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  fill: rgba(13, 110, 110, 0.85);
  letter-spacing: 0.12em;
}
.arch-svg .boundary-tag {
  font-family: var(--font-sans);
  font-size: 11px;
  font-style: italic;
  fill: rgba(13, 110, 110, 0.65);
}

/* ---- AI client cards (top row) ---- */
.arch-svg .ai-client rect {
  fill: #ffffff;
  stroke: var(--border-strong);
  stroke-width: 1.5;
  filter: drop-shadow(0 1px 2px rgba(15, 23, 42, 0.04));
  transition: stroke 200ms ease, transform 200ms ease;
}
.arch-svg .ai-client:hover rect {
  stroke: rgba(13, 148, 136, 0.6);
}
.arch-svg .ai-client .ai-more {
  fill: #f8fafc;
  stroke: var(--border);
  stroke-dasharray: 4 4;
}

/* ---- PiePiper core (the centerpiece) ---- */
.arch-svg .arch-core rect {
  fill: rgba(13, 148, 136, 0.06);
  stroke: rgba(13, 148, 136, 0.7);
  stroke-width: 1.8;
  filter: drop-shadow(0 4px 12px rgba(13, 148, 136, 0.12));
}
.arch-svg .arch-core .pill {
  fill: #ffffff;
  stroke: rgba(13, 148, 136, 0.35);
  stroke-width: 1;
}
.arch-svg .arch-core .pill-text {
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 600;
  fill: rgba(13, 110, 110, 0.95);
}

/* ---- Storage band (bottom) ---- */
.arch-svg .storage-bg {
  fill: #ffffff;
  stroke: var(--border-strong);
  stroke-width: 1.5;
}
.arch-svg .storage-title {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  fill: var(--text);
}
.arch-svg .storage-sub {
  font-family: var(--font-sans);
  font-size: 11px;
  fill: var(--text-mute);
}
.arch-svg .tier-label {
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 600;
  fill: var(--text);
}
.arch-svg .tier-sub {
  font-family: var(--font-sans);
  font-size: 10.5px;
  fill: var(--text-mute);
}
.arch-svg .tier.hot .tier-dot   { fill: #ef4444; filter: drop-shadow(0 0 4px rgba(239,68,68,0.5)); }
.arch-svg .tier.warm .tier-dot  { fill: #f59e0b; filter: drop-shadow(0 0 4px rgba(245,158,11,0.5)); }
.arch-svg .tier.cold .tier-dot  { fill: #38bdf8; filter: drop-shadow(0 0 4px rgba(56,189,248,0.5)); }
.arch-svg .tier .tier-dot {
  animation: tier-pulse 3s ease-in-out infinite;
}
.arch-svg .tier.warm .tier-dot { animation-delay: 0.4s; }
.arch-svg .tier.cold .tier-dot { animation-delay: 0.8s; }

@keyframes tier-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.55; }
}

/* ---- Generic node text ---- */
.arch-svg .node-title {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  fill: var(--text);
}
.arch-svg .node-title-lg {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 700;
  fill: rgba(13, 110, 110, 0.95);
  letter-spacing: -0.01em;
}
.arch-svg .node-sub {
  font-family: var(--font-sans);
  font-size: 11px;
  fill: var(--text-mute);
}
.arch-svg .node-sub-em {
  font-family: var(--font-sans);
  font-size: 11px;
  fill: rgba(13, 110, 110, 0.75);
  font-weight: 500;
  font-style: italic;
}

/* ---- Connecting paths + flow dots ---- */
.arch-svg .arch-path {
  stroke: rgba(13, 148, 136, 0.35);
  stroke-width: 1.5;
  fill: none;
  stroke-dasharray: 5 4;
}
.arch-svg .flow-dot {
  fill: rgba(13, 148, 136, 0.95);
  filter: drop-shadow(0 0 3px rgba(13, 148, 136, 0.6));
}
.arch-svg .flow-up { fill: rgba(245, 158, 11, 0.85); }

/* ---- Protocol badges (MCP, SQLite) ---- */
.arch-svg .protocol-badge {
  fill: #ffffff;
  stroke: rgba(13, 148, 136, 0.6);
  stroke-width: 1.2;
}
.arch-svg .protocol-badge-soft {
  stroke: var(--border-strong);
  stroke-width: 1;
}
.arch-svg .protocol-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  fill: rgba(13, 110, 110, 0.95);
  letter-spacing: 0.05em;
}
.arch-svg .protocol-label-soft {
  font-family: var(--font-mono);
  font-size: 10.5px;
  fill: var(--text-mute);
  letter-spacing: 0.04em;
}

/* Reduced-motion: kill the flow animations */
@media (prefers-reduced-motion: reduce) {
  .arch-svg .flow-dot,
  .arch-svg .tier .tier-dot {
    animation: none !important;
  }
}

/* ---------- Benchmark headline ---------- */
.bench-headline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  margin-bottom: var(--space-8);
}
@media (max-width: 700px) {
  .bench-headline { grid-template-columns: 1fr; }
}
.bench-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  text-align: left;
}
.bench-label {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-mute);
  margin-bottom: var(--space-3);
}
.bench-num {
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: var(--space-3);
}
.bench-detail {
  font-size: 0.9375rem;
  color: var(--text-mute);
  margin-bottom: var(--space-2);
}
.bench-rank {
  font-size: 0.875rem;
  color: var(--accent);
  font-weight: 500;
}

/* ---------- Benchmark table ---------- */
.bench-table-wrap {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  overflow-x: auto;
}
.table-title {
  margin: 0 0 var(--space-2);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.table-note {
  font-size: 0.875rem;
  color: var(--text-mute);
  margin: 0 0 var(--space-5);
  line-height: 1.55;
}
.bench-table {
  display: grid;
  border-radius: var(--radius);
  overflow: hidden;
  min-width: 640px;
}
.bench-row {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr 1.1fr;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-3);
  align-items: center;
  border-top: 1px solid var(--border);
  font-size: 0.9375rem;
}
.bench-row:first-child { border-top: none; }
.bench-row-head {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-mute);
  background: var(--bg-soft);
}
.bench-row-us {
  background: var(--accent-soft);
}
.bench-col-num { font-variant-numeric: tabular-nums; }

.tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  background: var(--bg-light-tint);
  color: var(--text-mute);
  border: 1px solid var(--border);
}
.tag-best {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
.tag-verified {
  background: rgba(22, 163, 74, 0.08);
  color: var(--success);
  border-color: rgba(22, 163, 74, 0.2);
}
.tag-paper {
  background: var(--bg-light-tint);
  color: var(--text-mute);
}
.tag-pr {
  background: rgba(217, 119, 6, 0.08);
  color: var(--warning);
  border-color: rgba(217, 119, 6, 0.2);
}

.table-source {
  font-size: 0.8125rem;
  color: var(--text-light);
  margin: var(--space-4) 0 0;
}
.table-source a { color: var(--accent); }
.table-source a:hover { text-decoration: underline; }

/* ---------- Features grid ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}
@media (max-width: 900px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .feature-grid { grid-template-columns: 1fr; } }
.feature {
  padding: var(--space-6);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  transition: border-color 120ms, box-shadow 120ms;
}
.feature:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}
.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--accent-text);
  display: flex;
  align-items: center;
  justify-content: center;
}
.feature h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.01em;
}
.feature p {
  font-size: 0.9375rem;
  color: var(--text-mute);
  line-height: 1.55;
  margin: 0;
}

/* ---------- Pricing ---------- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}
@media (max-width: 900px) { .pricing-grid { grid-template-columns: 1fr; } }

.price-card {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-7) var(--space-6);
  display: flex;
  flex-direction: column;
}
.price-card-feature {
  border-color: var(--text);
  border-width: 1.5px;
  box-shadow: var(--shadow-lg);
}
.price-card-soon {
  background: var(--bg-soft);
  opacity: 0.95;
}
.price-tag {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: var(--bg);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.price-tier {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-mute);
  margin-bottom: var(--space-3);
}
.price-amount {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: var(--space-3);
}
.price-period {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-mute);
  margin-left: var(--space-1);
}
.price-blurb {
  font-size: 0.9375rem;
  color: var(--text-mute);
  margin: 0 0 var(--space-5);
  line-height: 1.55;
}
.price-features {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.price-features li {
  font-size: 0.9375rem;
  color: var(--text);
  padding-left: var(--space-5);
  position: relative;
}
.price-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 14px;
  height: 8px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}
.price-card .btn { margin-top: auto; }
.price-note {
  font-size: 0.8125rem;
  color: var(--text-light);
  margin: var(--space-3) 0 0;
  text-align: center;
}

/* ---------- FAQ ---------- */
.faq {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.faq-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 120ms;
}
.faq-item[open] {
  border-color: var(--border-strong);
}
.faq-item summary {
  cursor: pointer;
  padding: var(--space-5) var(--space-5);
  font-weight: 500;
  font-size: 1rem;
  list-style: none;
  position: relative;
  padding-right: var(--space-7);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  position: absolute;
  right: var(--space-5);
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  color: var(--text-light);
  font-weight: 300;
  transition: transform 120ms;
}
.faq-item[open] summary::after {
  content: '−';
}
.faq-item p {
  margin: 0;
  padding: 0 var(--space-5) var(--space-5);
  color: var(--text-mute);
  font-size: 0.9375rem;
  line-height: 1.6;
}
.faq-item p em { color: var(--text); font-style: normal; font-weight: 500; }

/* ---------- CTA strip ---------- */
.cta-strip {
  background: var(--text);
  color: var(--bg);
  padding: var(--space-9) 0;
  text-align: center;
}
.cta-strip .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}
.cta-title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--bg);
  line-height: 1.15;
}
.cta-sub {
  font-size: 1.0625rem;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}
.cta-strip .btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}
.cta-strip .btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

/* ---------- Footer ---------- */
.footer {
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  padding-top: var(--space-8);
}
.footer-row {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--space-7);
  padding-bottom: var(--space-7);
}
@media (max-width: 800px) {
  .footer-row { grid-template-columns: 1fr; }
}
.footer-brand .logo { margin-bottom: var(--space-3); }
.footer-tag {
  font-size: 0.9375rem;
  color: var(--text-mute);
  max-width: 30ch;
  margin: 0;
}
.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}
@media (max-width: 600px) {
  .footer-cols { grid-template-columns: repeat(2, 1fr); }
}
.footer-col h4 {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-mute);
  margin: 0 0 var(--space-4);
}
.footer-col a {
  display: block;
  font-size: 0.9375rem;
  color: var(--text-mute);
  margin-bottom: var(--space-2);
  transition: color 120ms;
}
.footer-col a:hover { color: var(--text); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) var(--space-6);
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--text-light);
}
.footer-bottom p { margin: 0; }
@media (max-width: 600px) {
  .footer-bottom { flex-direction: column; gap: var(--space-2); text-align: center; }
}

/* ---------- Misc ---------- */
::selection {
  background: var(--accent-soft);
  color: var(--accent-text);
}

/* Skip link / a11y */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}


/* ==========================================================
   WAITLIST MODAL
   Activated by adding `.is-open` to .waitlist-modal.
   Plain CSS, no framework — same Inter/teal aesthetic as the
   rest of the page.
   ========================================================== */

.waitlist-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.waitlist-modal.is-open {
  display: flex;
}

.waitlist-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  cursor: pointer;
}

.waitlist-card {
  position: relative;
  background: #ffffff;
  border-radius: 16px;
  box-shadow:
    0 20px 50px rgba(15, 23, 42, 0.25),
    0 4px 12px rgba(15, 23, 42, 0.08);
  width: 100%;
  max-width: 440px;
  padding: 2.25rem 2rem 1.75rem;
  animation: waitlist-in 200ms ease-out;
}

@keyframes waitlist-in {
  from { transform: translateY(8px) scale(0.98); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

.waitlist-close {
  position: absolute;
  top: 0.75rem;
  right: 0.85rem;
  background: transparent;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  color: #64748b;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  transition: background 120ms ease, color 120ms ease;
}
.waitlist-close:hover { background: #f1f5f9; color: #0f172a; }

.waitlist-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.5rem;
  letter-spacing: -0.01em;
}

.waitlist-sub {
  font-size: 0.95rem;
  line-height: 1.5;
  color: #475569;
  margin: 0 0 1.25rem;
}

.waitlist-form { display: flex; flex-direction: column; gap: 0.75rem; }

.waitlist-input {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  padding: 0.75rem 0.9rem;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  color: #0f172a;
  background: #ffffff;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.waitlist-input:focus {
  outline: none;
  border-color: #0d9488;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.18);
}
.waitlist-input.is-invalid {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.waitlist-submit {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  font-size: 0.98rem;
}

.waitlist-submit[disabled] { opacity: 0.7; cursor: progress; }

.waitlist-spinner {
  display: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #ffffff;
  animation: waitlist-spin 700ms linear infinite;
}
.waitlist-submit.is-loading .waitlist-spinner { display: inline-block; }
.waitlist-submit.is-loading .waitlist-submit-label { opacity: 0.85; }

@keyframes waitlist-spin { to { transform: rotate(360deg); } }

.waitlist-error {
  display: none;
  margin: 0;
  font-size: 0.875rem;
  color: #dc2626;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
}
.waitlist-error.is-visible { display: block; }

.waitlist-fineprint {
  margin: 0.25rem 0 0;
  font-size: 0.8rem;
  color: #94a3b8;
  text-align: center;
}

/* Success state */
.waitlist-state[data-state="success"] {
  text-align: center;
  padding-top: 0.5rem;
}

.waitlist-success-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
  background: #0d9488;
  border-radius: 50%;
}

@media (max-width: 480px) {
  .waitlist-card {
    padding: 1.75rem 1.25rem 1.25rem;
    border-radius: 12px;
  }
  .waitlist-title { font-size: 1.2rem; }
}


/* ==========================================================
   LEGAL PAGES (privacy.html, terms.html)
   Long-form text. Same Inter / teal aesthetic, generous reading
   measure, anchor-friendly headings.
   ========================================================== */

.legal-page {
  padding: 4.5rem 0 5rem;
  background: #fafbfc;
}

.legal-container {
  max-width: 760px;
  margin: 0 auto;
}

.legal-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid #e2e8f0;
}

.legal-eyebrow {
  display: inline-block;
  margin: 0 0 0.5rem;
  padding: 0.2rem 0.7rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #0d9488;
  background: #ccfbf1;
  border-radius: 4px;
}

.legal-page h1 {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
  margin: 0.4rem 0 0.5rem;
}

.legal-meta {
  margin: 0;
  color: #64748b;
  font-size: 0.92rem;
}

.legal-meta strong { color: #334155; }

.legal-body {
  color: #334155;
  font-size: 1rem;
  line-height: 1.7;
}

.legal-body h2 {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #0f172a;
  margin: 2.2rem 0 0.7rem;
  scroll-margin-top: 5rem; /* anchor links land below sticky header */
}

.legal-body h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: #0f172a;
  margin: 1.4rem 0 0.5rem;
}

.legal-body p { margin: 0 0 1rem; }

.legal-body ul {
  margin: 0 0 1.2rem;
  padding-left: 1.4rem;
}

.legal-body li {
  margin: 0 0 0.5rem;
}

.legal-body a {
  color: #0d9488;
  text-decoration: underline;
  text-decoration-color: rgba(13, 148, 136, 0.35);
  text-underline-offset: 2px;
  transition: text-decoration-color 120ms ease;
}
.legal-body a:hover {
  text-decoration-color: #0d9488;
}

.legal-body code {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.9em;
  padding: 0.1rem 0.35rem;
  background: #f1f5f9;
  border-radius: 4px;
  color: #0f172a;
}

.legal-lede {
  font-size: 1.08rem;
  color: #475569;
  margin-bottom: 1.75rem;
}

.legal-fineprint {
  margin-top: 2.5rem;
  padding: 1rem 1.25rem;
  background: #fffbeb;
  border-left: 3px solid #fbbf24;
  border-radius: 6px;
  font-size: 0.92rem;
  color: #78350f;
}

@media (max-width: 600px) {
  .legal-page { padding: 3rem 0 4rem; }
  .legal-page h1 { font-size: 1.7rem; }
  .legal-body h2 { font-size: 1.15rem; }
}


/* ==========================================================
   MOBILE POLISH — global tightening below 600px
   ========================================================== */

@media (max-width: 600px) {
  /* Tighter container padding so content doesn't crowd edges */
  .container { padding: 0 var(--space-4); }

  /* Body line-height + selection: keep readable */
  body { font-size: 16px; line-height: 1.55; }

  /* Buttons: ensure every interactive element ≥44px tall (Apple HIG / WCAG 2.5.5) */
  .btn { min-height: 44px; padding: 0.625rem 1rem; }
  .btn-lg { min-height: 52px; padding: 0.875rem 1.25rem; }

  /* Hero headline tightening so it doesn't overflow on iPhone SE */
  .hero { padding: var(--space-7) 0 var(--space-7); }
  .hero-title { font-size: 2rem; line-height: 1.1; }
  .hero-sub { font-size: 1rem; }
  .hero-cta { flex-direction: column; gap: var(--space-3); }
  .hero-cta .btn { width: 100%; }

  /* Hero stats: stack as single column */
  .hero-stats { grid-template-columns: 1fr; }

  /* Section padding */
  .section { padding: var(--space-7) 0; }
  .section-title { font-size: 1.6rem; line-height: 1.2; }
  .section-sub { font-size: 1rem; }

  /* Benchmark table — allow horizontal scroll, but the wrapping
     prevents the page from getting wider than the viewport. */
  .bench-table-wrap {
    padding: var(--space-4);
    -webkit-overflow-scrolling: touch;
  }

  /* Pricing cards — already collapse to 1 col, just tighten padding */
  .pricing-card { padding: var(--space-5); }

  /* Feature cards already collapse via earlier rule. Keep here as no-op. */

  /* FAQ accordion: bigger tap targets */
  .faq-item summary { padding: 1rem 0; min-height: 44px; }

  /* Footer — 2 cols feels cramped at 360px, drop to 1 col */
  .footer-cols { grid-template-columns: 1fr 1fr; gap: var(--space-4); }
}

@media (max-width: 380px) {
  /* iPhone SE, very narrow Androids: collapse footer to 1 column */
  .footer-cols { grid-template-columns: 1fr; }
}

/* Prevent iOS auto-zoom on input focus by ensuring input font-size is
   ≥16px. Applies to the waitlist modal email field and any future forms. */
@media (max-width: 600px) {
  input[type="email"],
  input[type="text"],
  input[type="search"],
  textarea,
  select {
    font-size: 16px !important;
  }
}

/* Prevent the constellation hero canvas from causing horizontal overflow
   on phones if width calc rounds up. */
.hero { overflow-x: hidden; }
html, body { overflow-x: hidden; }
