/* KickStartMVP — shared styles */

:root {
  /* Light (default) — editorial cream */
  --bg: #f6f2ea;
  --bg-alt: #efe8db;
  --surface: #ffffff;
  --ink: #14130f;
  --ink-2: #3a382f;
  --ink-3: #6b685c;
  --rule: #d9d1bf;
  --rule-soft: #e7dfce;
  --accent: oklch(0.46 0.09 155);           /* deep trust green */
  --accent-ink: oklch(0.28 0.06 155);
  --accent-soft: oklch(0.92 0.04 155);
  --accent-contrast: #f6f2ea;
  --warn: oklch(0.62 0.12 55);
  --danger: oklch(0.55 0.14 28);
  --shadow: 0 1px 0 rgba(20, 19, 15, 0.04), 0 10px 30px -18px rgba(20, 19, 15, 0.25);
}

html[data-theme="dark"] {
  --bg: #0f100d;
  --bg-alt: #17181410;
  --surface: #18191512;
  --ink: #f2efe6;
  --ink-2: #cfccc0;
  --ink-3: #8c8a7f;
  --rule: #2a2b25;
  --rule-soft: #1f201b;
  --accent: oklch(0.78 0.14 150);
  --accent-ink: oklch(0.9 0.08 150);
  --accent-soft: oklch(0.28 0.05 150);
  --accent-contrast: #0f100d;
  --shadow: 0 1px 0 rgba(0,0,0,.3), 0 20px 40px -22px rgba(0,0,0,.7);
}

html[data-theme="dark"] {
  --bg-alt: #141510;
  --surface: #15160f;
}

html[data-theme="accent"] {
  --bg: oklch(0.96 0.03 150);
  --bg-alt: oklch(0.93 0.05 150);
  --surface: #ffffff;
  --ink: oklch(0.22 0.05 155);
  --ink-2: oklch(0.35 0.05 155);
  --ink-3: oklch(0.5 0.03 155);
  --rule: oklch(0.85 0.04 150);
  --rule-soft: oklch(0.9 0.04 150);
  --accent: oklch(0.42 0.11 155);
  --accent-ink: oklch(0.25 0.07 155);
  --accent-soft: oklch(0.88 0.06 150);
  --accent-contrast: oklch(0.96 0.03 150);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Geist', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body { min-height: 100vh; }

.serif {
  font-family: 'Newsreader', 'Times New Roman', serif;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.mono {
  font-family: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  font-feature-settings: 'ss01', 'zero';
}

/* Layout */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px;
}

.container-narrow {
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  padding: 0 32px;
}

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in oklab, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule-soft);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.015em;
}
.logo-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--bg);
  display: grid;
  place-items: center;
  font-family: 'Newsreader', serif;
  font-size: 20px;
  font-style: italic;
  line-height: 1;
  padding-top: 2px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 450;
  transition: color .15s;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); }
.nav-cta {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .18s ease;
  font-family: inherit;
  white-space: nowrap;
}
.btn-primary {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 24px -10px color-mix(in oklab, var(--ink) 70%, transparent); }
.btn-accent {
  background: var(--accent);
  color: var(--accent-contrast);
  border-color: var(--accent);
}
.btn-accent:hover { transform: translateY(-1px); box-shadow: 0 8px 24px -10px var(--accent); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule);
}
.btn-ghost:hover { border-color: var(--ink); }
.btn-sm { padding: 8px 14px; font-size: 13.5px; }
.btn-lg { padding: 16px 28px; font-size: 15.5px; }

/* Sections */
section {
  padding: 96px 0;
  border-top: 1px solid var(--rule-soft);
}
section:first-of-type { border-top: 0; }

.eyebrow {
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 25%, transparent);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

h1, h2, h3, h4 { margin: 0; }

.display {
  font-family: 'Newsreader', serif;
  font-weight: 400;
  font-size: clamp(48px, 7vw, 96px);
  line-height: 0.98;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.display .italic { font-style: italic; color: var(--accent); }

.section-title {
  font-family: 'Newsreader', serif;
  font-size: clamp(36px, 4.5vw, 58px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-weight: 400;
}

.lede {
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 620px;
}

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 18px;
  padding: 28px;
}

/* Footer */
footer {
  border-top: 1px solid var(--rule);
  padding: 72px 0 48px;
  background: var(--bg-alt);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
}
.footer-col h5 {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 16px;
}
.footer-col a {
  display: block;
  color: var(--ink-2);
  text-decoration: none;
  font-size: 14.5px;
  margin-bottom: 10px;
  transition: color .15s;
}
.footer-col a:hover { color: var(--ink); }
.footer-bottom {
  border-top: 1px solid var(--rule-soft);
  margin-top: 64px;
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--ink-3);
  font-family: 'Geist Mono', monospace;
}

/* ==========================================
   Responsive — mobile & tablet overrides
   ========================================== */
@media (max-width: 900px) {
  .container, .container-narrow { padding: 0 20px; }

  section { padding: 64px 0; }

  .nav-inner { height: 60px; }
  .nav-links { display: none; }
  .nav-cta .btn-ghost { display: none; }

  .display { font-size: clamp(40px, 10vw, 60px) !important; }
  .section-title { font-size: clamp(30px, 7vw, 44px) !important; }
  .lede { font-size: 16.5px; }

  /* Collapse every 2/3/4-column grid to a single column */
  [style*="grid-template-columns: 1.15fr 1fr"],
  [style*="grid-template-columns: 1fr 1.15fr"],
  [style*="grid-template-columns: 1.2fr 1fr"],
  [style*="grid-template-columns: 1fr 1.2fr"],
  [style*="grid-template-columns: 1.4fr 1fr"],
  [style*="grid-template-columns: 1fr 1.4fr"],
  [style*="grid-template-columns: 1fr 1.6fr"],
  [style*="grid-template-columns: 1.3fr 1fr"],
  [style*="grid-template-columns: 1fr 1.3fr"],
  [style*="grid-template-columns: 1fr 1fr"],
  [style*="grid-template-columns: repeat(2, 1fr)"],
  [style*="grid-template-columns: repeat(3, 1fr)"],
  [style*="grid-template-columns: repeat(4, 1fr)"] {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }

  /* Reduce oversized gaps on stacked sections */
  [style*="gap: 80px"], [style*="gap: 64px"], [style*="gap: 48px"] {
    gap: 32px !important;
  }

  /* Stats row — no more vertical dividers on mobile */
  [style*="borderRight: '1px solid var(--rule)'"] {
    border-right: none !important;
    border-bottom: 1px solid var(--rule) !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-top: 24px !important;
    padding-bottom: 24px !important;
  }

  /* Hero status card + other cards */
  .card { padding: 20px !important; }

  /* Footer stacks */
  .footer-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 32px !important;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  /* Comparison & other wide tables — scroll horizontally */
  section > .container > div[style*="border-radius: 16px"][style*="overflow: hidden"] {
    overflow-x: auto !important;
  }
  section > .container > div[style*="border-radius: 16px"] > div[style*="grid-template-columns"] {
    min-width: 640px;
  }
}

@media (max-width: 600px) {
  .container, .container-narrow { padding: 0 16px; }
  .footer-grid { grid-template-columns: 1fr !important; }
  .btn-lg { padding: 14px 20px; font-size: 14.5px; }
  .display { font-size: clamp(36px, 11vw, 52px) !important; }

  /* Hero stack: ensure the card doesn't overflow */
  .card { padding: 16px !important; }
}

/* Utility */
.grid { display: grid; }
.flex { display: flex; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.gap-8 { gap: 32px; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-family: 'Geist Mono', monospace;
  font-size: 11.5px;
  font-weight: 500;
  background: var(--accent-soft);
  color: var(--accent-ink);
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.hairline { border-top: 1px solid var(--rule-soft); }

/* Status dot */
.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 20%, transparent);
}

/* Placeholder (image slots) */
.ph {
  background:
    repeating-linear-gradient(
      135deg,
      transparent 0 10px,
      color-mix(in oklab, var(--ink) 5%, transparent) 10px 11px
    ),
    var(--bg-alt);
  border: 1px solid var(--rule);
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--ink-3);
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
