/* ================================================
   NEO-120 — Design System
   Dark-first, science-anchored, acquisition-focused
   ================================================ */

/* ---- Tokens ---- */
:root {
  --bg:               #080d14;
  --bg-alt:           #0c1320;
  --surface:          #0f1a26;
  --surface-hover:    #14213a;
  --border:           #1a2d40;
  --border-bright:    #243d56;
  --text:             #e8edf5;
  --text-muted:       #7a94ab;
  --text-dim:         #465f75;
  --accent:           #4f8ef7;
  --accent-dark:      #2a6fd4;
  --accent-glow:      rgba(79, 142, 247, 0.15);
  --accent-glow-hi:   rgba(79, 142, 247, 0.3);
  --green:            #34d399;
  --red:              #f87171;
  --radius:           0.75rem;
  --radius-lg:        1.25rem;
  --nav-h:            64px;
  --max-w:            1100px;
  --font:             'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}

[id] {
  scroll-margin-top: var(--nav-h);
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---- Container ---- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ================================================
   NAV
   ================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  transition: background 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}

.nav.nav-scrolled {
  background: rgba(8, 13, 20, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom-color: var(--border);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-brand {
  font-size: 0.9375rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: 1.75rem;
  flex: 1;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

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

/* Touch-friendly nav targets (all marketing pages) */
.nav-links a,
.nav .nav-cta,
.nav .btn-sm {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
}

.nav-inner {
  flex-wrap: wrap;
  row-gap: 0.375rem;
}

.nav-cta-short {
  display: none;
}

/* Mobile + narrow tablet (≤767px): wrap links under brand + CTA; shorten CTA label */
@media (max-width: 767px) {
  body.marketing-page,
  body.blog-page,
  body.legal-page,
  body.spark-page {
    --nav-h: 7.25rem;
  }

  .nav {
    height: auto;
    min-height: 4rem;
  }

  .nav-inner {
    padding: 0.625rem 0.875rem;
    gap: 0.375rem 0.625rem;
  }

  .nav-brand {
    font-size: 0.8125rem;
  }

  .nav-links {
    order: 3;
    flex: 1 1 100%;
    flex-wrap: wrap;
    gap: 0.25rem 0.75rem;
    min-width: 0;
  }

  .nav-links a {
    font-size: 0.8125rem;
  }

  .nav-links a[href="#science"],
  .nav-links a[href="/#science"],
  .nav-links a.nav-link-hide-mobile {
    display: none;
  }

  .nav .nav-cta,
  .nav .btn-sm {
    margin-left: auto;
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    white-space: nowrap;
  }

  .nav-cta-long {
    display: none;
  }

  .nav-cta-short {
    display: inline;
  }
}

/* ================================================
   BUTTONS
   ================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  white-space: nowrap;
  line-height: 1;
}

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

.btn-primary:hover {
  background: var(--accent-dark);
  box-shadow: 0 0 28px 4px var(--accent-glow-hi);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-bright);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 0.5rem 1.125rem;
  font-size: 0.875rem;
  background: var(--accent);
  color: #fff;
}

.btn-sm:hover {
  background: var(--accent-dark);
  box-shadow: 0 0 18px 2px var(--accent-glow);
}

/* ================================================
   HERO
   ================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: var(--nav-h);
}

/* Mesh glow blobs */
.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
}

.hero-glow-1 {
  width: 650px; height: 650px;
  background: radial-gradient(ellipse, rgba(79, 142, 247, 0.22) 0%, transparent 70%);
  top: -120px; left: -80px;
}

.hero-glow-2 {
  width: 700px; height: 550px;
  background: radial-gradient(ellipse, rgba(139, 92, 246, 0.14) 0%, transparent 70%);
  top: 25%; right: -200px;
}

.hero-glow-3 {
  width: 500px; height: 400px;
  background: radial-gradient(ellipse, rgba(34, 211, 153, 0.09) 0%, transparent 70%);
  bottom: 0; left: 30%;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding-top: 5rem;
  padding-bottom: 5rem;
}

.eyebrow {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(79, 142, 247, 0.1);
  border: 1px solid rgba(79, 142, 247, 0.22);
  padding: 0.3rem 0.9rem;
  border-radius: 100px;
  margin-bottom: 1.75rem;
}

.hero h1 {
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin-bottom: 1.5rem;
  background: linear-gradient(150deg, #e8edf5 20%, #a8c4e8 80%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-lead {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 2.5rem;
  line-height: 1.75;
}

.hero-lead em {
  color: var(--text);
  font-style: normal;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.hero-actions .btn {
  min-height: 2.75rem;
}

@media (max-width: 767px) {
  .hero-content {
    padding-top: 3rem;
    padding-bottom: 3.5rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 20rem;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions .btn {
    justify-content: center;
    width: 100%;
  }

  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

.hero-note {
  font-size: 0.8125rem;
  color: var(--text-dim);
}

/* ================================================
   DIFFERENTIATOR STRIP
   ================================================ */
.differ-strip {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 2.75rem 0;
}

.differ-strip .container {
  text-align: center;
}

.differ-headline {
  font-size: clamp(1.25rem, 3vw, 1.875rem);
  font-weight: 700;
  margin-bottom: 1.375rem;
  color: var(--text);
}

.differ-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  justify-content: center;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.4rem 0.9rem;
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 500;
}

.pill-no {
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.25);
  color: var(--red);
}

.pill-no::before { content: '✕  '; }

.pill-yes {
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.28);
  color: var(--green);
}

.pill-yes::before { content: '✓  '; }

/* ================================================
   SHARED SECTION STYLES
   ================================================ */
.section {
  padding: 6rem 0;
}

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

.section-eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.625rem;
}

.section-heading {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 3rem;
  max-width: 600px;
}

/* ================================================
   HOW IT WORKS — STEPS
   ================================================ */
.steps {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.step {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  transition: border-color 0.2s, transform 0.2s;
}

.step:hover {
  border-color: var(--border-bright);
  transform: translateY(-3px);
}

.step-number {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 0.875rem;
}

.step-icon {
  font-size: 2rem;
  margin-bottom: 0.875rem;
  line-height: 1;
}

.step h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  margin-bottom: 0.625rem;
}

.step p {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.step-arrow {
  font-size: 1.5rem;
  color: var(--border-bright);
  flex-shrink: 0;
  align-self: center;
  margin-top: 0;
  padding-top: 3.5rem;
}

@media (max-width: 760px) {
  .steps {
    flex-direction: column;
    gap: 0.5rem;
  }

  .step-arrow {
    transform: rotate(90deg);
    padding-top: 0;
    margin: 0 auto;
  }
}

/* ================================================
   TRUST PILLARS
   ================================================ */
.pillars {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

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

.pillar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: border-color 0.2s, transform 0.2s;
}

.pillar-card:hover {
  border-color: var(--border-bright);
  transform: translateY(-2px);
}

.pillar-icon {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
}

.pillar-icon.science { background: rgba(79, 142, 247, 0.12); }
.pillar-icon.privacy { background: rgba(139, 92, 246, 0.12); }
.pillar-icon.insight { background: rgba(251, 191, 36, 0.12); }
.pillar-icon.pace    { background: rgba(52, 211, 153, 0.12); }

.pillar-card h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  margin-bottom: 0.625rem;
}

.pillar-card p {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ================================================
   SOCIAL PROOF
   ================================================ */
.quotes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

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

.quote-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  border-left: 3px solid var(--accent);
  padding: 1.75rem;
}

.quote-card p {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.quote-card p em {
  color: var(--text);
  font-style: normal;
}

.quote-card footer {
  font-size: 0.8125rem;
  color: var(--text-dim);
  font-weight: 500;
  border: none;
  padding: 0;
  margin: 0;
}

.value-card h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  margin-bottom: 0.625rem;
  color: var(--text);
}

.value-card p {
  margin-bottom: 0;
}

/* ================================================
   WAITLIST
   ================================================ */
.waitlist-section {
  border-top: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.waitlist-section::before {
  content: '';
  position: absolute;
  width: 500px; height: 400px;
  background: radial-gradient(ellipse, rgba(79, 142, 247, 0.1) 0%, transparent 70%);
  right: -100px; top: -50px;
  pointer-events: none;
}

.waitlist-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

@media (max-width: 760px) {
  .waitlist-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.waitlist-copy h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.875rem;
  line-height: 1.15;
}

.waitlist-copy p {
  color: var(--text-muted);
  line-height: 1.7;
}

/* Form groups (multi-field waitlist) */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.375rem;
}

.form-required { color: var(--accent); }
.form-optional { color: var(--text-dim); font-weight: 400; }

.waitlist-form input[type="text"],
.waitlist-form input[type="email"],
.waitlist-form select {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.9375rem;
  font-family: var(--font);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
  -webkit-appearance: none;
}

.waitlist-form select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%237a94ab' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

.waitlist-form input:focus,
.waitlist-form select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.waitlist-form input::placeholder { color: var(--text-dim); }

.waitlist-form select option {
  background: var(--surface);
  color: var(--text);
}

.btn-full {
  width: 100%;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-note {
  font-size: 0.8125rem;
  color: var(--text-dim);
}

.waitlist-form--success .form-group,
.waitlist-form--success .form-note,
.waitlist-form--success .form-error,
.waitlist-form--success [type="submit"] {
  display: none;
}

.form-success[hidden] {
  display: none !important;
}

.form-success-tip[hidden] {
  display: none !important;
}

.form-success {
  padding: 1.75rem;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28);
}

.form-success-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.form-success-badge {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.35);
  color: var(--green);
}

.form-success-kicker {
  margin: 0 0 0.2rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
}

.form-success-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--text);
  letter-spacing: -0.02em;
}

.form-success-lead {
  margin: 0 0 1rem;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--text-muted);
}

.form-success-lead strong {
  color: var(--text);
  font-weight: 600;
}

.form-success-tip {
  padding: 0.875rem 1rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
}

.form-success-tip-title {
  margin: 0 0 0.35rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text);
}

.form-success-tip-body {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.form-success-tip-body strong {
  color: var(--text);
  font-weight: 600;
}

.form-error {
  font-size: 0.9375rem;
  color: var(--red);
  font-weight: 500;
  padding: 0.75rem 1rem;
  background: rgba(248, 113, 113, 0.08);
  border: 1px solid rgba(248, 113, 113, 0.2);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
}

/* Honeypot — hidden from users, visible to bots */
.form-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ================================================
   FOOTER
   ================================================ */
.footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
}

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

.footer-brand {
  font-size: 0.875rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.footer-links {
  display: flex;
  gap: 1.25rem;
  flex: 1;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding-block: 0.25rem;
  font-size: 0.875rem;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s;
}

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

.footer-copy {
  font-size: 0.8125rem;
  color: var(--text-dim);
}

@media (max-width: 500px) {
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .footer-links {
    flex: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }
}

/* ================================================
   LEGAL / PRIVACY PAGES (shared prose layout)
   ================================================ */
body.legal-page {
  padding-top: var(--nav-h);
}

body.legal-page main {
  max-width: 42rem;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

@media (max-width: 480px) {
  body.legal-page main {
    padding: 1.75rem 1rem 3rem;
  }
}

body.legal-page header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

body.legal-page .brand {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.5rem;
}

body.legal-page .brand a {
  color: inherit;
  text-decoration: none;
}

body.legal-page h1 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  line-height: 1.2;
  margin: 0 0 0.75rem;
}

body.legal-page .lead {
  color: var(--text-muted);
  margin: 0;
  font-size: 1.05rem;
}

body.legal-page .meta {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

body.legal-page section {
  margin: 2rem 0;
}

body.legal-page h2 {
  font-size: 1.125rem;
  margin: 0 0 0.75rem;
}

body.legal-page p,
body.legal-page li {
  margin: 0 0 0.75rem;
}

body.legal-page ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

body.legal-page a {
  color: var(--accent);
}

body.legal-page code {
  font-size: 0.875em;
  background: var(--surface);
  padding: 0.1em 0.35em;
  border-radius: 0.25rem;
}

body.legal-page main footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ================================================
   BLOG (index + posts) — light reading palette
   Scoped to body.blog-page; homepage stays dark.
   ================================================ */
body.blog-page {
  --bg:               #f7f9fc;
  --bg-alt:           #eef2f7;
  --surface:          #ffffff;
  --surface-hover:    #f0f4f8;
  --border:           #d8e2ec;
  --border-bright:    #b8c9d9;
  --text:             #0f172a;
  --text-muted:       #475569;
  --text-dim:         #64748b;
  --accent:           #2563eb;
  --accent-dark:      #1d4ed8;
  --accent-glow:      rgba(37, 99, 235, 0.12);
  --accent-glow-hi:   rgba(37, 99, 235, 0.22);
  --green:            #059669;
  --red:              #dc2626;

  background: var(--bg);
  color: var(--text);
  padding-top: var(--nav-h);
}

body.blog-page .nav.nav-scrolled {
  background: rgba(247, 249, 252, 0.92);
  border-bottom-color: var(--border);
}

body.blog-page .nav-brand {
  color: var(--text);
}

body.blog-page .nav-links a {
  color: var(--text-muted);
}

body.blog-page .nav-links a:hover {
  color: var(--text);
}

body.blog-page .btn-outline {
  color: var(--text);
  border-color: var(--border-bright);
}

body.blog-page .btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

body.blog-page .footer {
  background: var(--bg-alt);
}

body.blog-page .footer-brand,
body.blog-page .footer-copy {
  color: var(--text-dim);
}

body.blog-page .footer-links a {
  color: var(--text-muted);
}

body.blog-page .footer-links a:hover {
  color: var(--accent);
}

body.blog-page .form-success {
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

body.blog-page .form-success-badge {
  background: rgba(5, 150, 105, 0.1);
  border-color: rgba(5, 150, 105, 0.28);
}

body.blog-page main {
  max-width: 42rem;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

body.blog-index main {
  max-width: var(--max-w);
  padding: 2rem 1.25rem 4.5rem;
}

body.blog-page .brand {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.5rem;
}

body.blog-page .brand a {
  color: inherit;
  text-decoration: none;
}

body.blog-page h1 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  line-height: 1.2;
  margin: 0 0 0.75rem;
}

body.blog-page .lead {
  color: var(--text-muted);
  margin: 0;
  font-size: 1.05rem;
}

body.blog-page .meta {
  font-size: 0.875rem;
  color: var(--text-dim);
  margin: 0.75rem 0 0;
}

/* ---- Blog index ---- */
.blog-hero {
  margin-bottom: 2.5rem;
  padding: 2rem 1.5rem;
  background: linear-gradient(135deg, var(--surface) 0%, var(--bg-alt) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.blog-hero-purpose {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.5rem;
}

.blog-hero-cta {
  margin: 1.25rem 0 0;
}

.blog-section-label {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 0 0 1rem;
}

.blog-featured {
  margin-bottom: 3rem;
}

.blog-pillar {
  margin-bottom: 3rem;
}

.blog-pillar:last-child {
  margin-bottom: 0;
}

.blog-pillar-header {
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.blog-pillar-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 0.375rem;
}

.blog-pillar-heading h2 {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  line-height: 1.25;
  margin: 0;
}

.blog-pillar-all {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
}

.blog-pillar-all:hover {
  text-decoration: underline;
}

.blog-pillar-blurb {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.blog-pillar-more {
  margin: 1.25rem 0 0;
  font-size: 0.9375rem;
  font-weight: 600;
}

.blog-pillar-more a {
  color: var(--accent);
  text-decoration: none;
}

.blog-pillar-more a:hover {
  text-decoration: underline;
}

.blog-hero--compact {
  margin-bottom: 2rem;
  padding: 1.5rem 1.375rem;
}

.blog-breadcrumb {
  margin: 0 0 0.75rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.blog-breadcrumb a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.blog-breadcrumb a:hover {
  text-decoration: underline;
}

.blog-archive-count {
  margin: 0.75rem 0 0;
  font-size: 0.875rem;
  color: var(--text-dim);
}

.blog-empty {
  color: var(--text-muted);
  margin: 0;
}

.blog-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 2.5rem 0 1rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.9375rem;
}

.blog-pagination-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.blog-pagination-link:hover {
  text-decoration: underline;
}

.blog-pagination-status {
  color: var(--text-muted);
}

.blog-pagination-spacer {
  flex: 1;
  max-width: 5rem;
}

.blog-back {
  margin: 1.5rem 0 0;
  font-size: 0.9375rem;
}

.blog-back a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
}

.blog-back a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .blog-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.blog-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.375rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.blog-card:hover {
  border-color: var(--border-bright);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
}

.blog-card--featured {
  padding: 1.75rem 1.5rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, var(--surface) 0%, var(--bg-alt) 100%);
}

@media (min-width: 768px) {
  .blog-card--featured {
    flex-direction: row;
    align-items: stretch;
    gap: 2rem;
    padding: 2rem 2.25rem;
  }

  .blog-card--featured .blog-card-body {
    flex: 1;
  }

  .blog-card--featured .blog-card-link {
    align-self: flex-end;
    flex-shrink: 0;
  }
}

.blog-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.blog-card-title {
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.35;
  margin: 0;
}

.blog-card--featured .blog-card-title {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
}

.blog-card-title a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s;
}

.blog-card-title a:hover {
  color: var(--accent);
}

.blog-card-title a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.blog-card-excerpt {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card--featured .blog-card-excerpt {
  -webkit-line-clamp: 4;
  font-size: 1rem;
}

.blog-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  color: var(--text-dim);
  margin-top: auto;
}

.blog-card-meta-sep {
  color: var(--border-bright);
}

.blog-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.blog-tag {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--accent-dark);
  background: var(--accent-glow);
  border-radius: 999px;
}

.blog-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s, gap 0.2s;
}

.blog-card-link:hover {
  color: var(--accent-dark);
  gap: 0.45rem;
}

.blog-card-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

body.blog-post article header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

body.blog-post article h2 {
  font-size: 1.25rem;
  margin: 2rem 0 0.75rem;
}

body.blog-post article p,
body.blog-post article li {
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

body.blog-post article ul {
  margin: 0 0 1rem 1.25rem;
}

body.blog-post article strong {
  color: var(--text);
}

body.blog-post article a {
  color: var(--accent);
}

.blog-post-footer {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.blog-post-footer a {
  color: var(--accent);
}

/* ---- Blog responsive (mobile / tablet / desktop) ---- */
body.blog-page main,
body.blog-page .blog-hero,
body.blog-page .blog-card {
  overflow-wrap: break-word;
  min-width: 0;
}

body.blog-post article {
  font-size: 1.0625rem;
  line-height: 1.75;
}

body.blog-post article h2 {
  line-height: 1.3;
}

body.blog-post article img,
body.blog-post article pre,
body.blog-post article table {
  max-width: 100%;
}

body.blog-post article pre {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.blog-post-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
}

.blog-card-title a {
  display: inline;
  padding-block: 0.125rem;
}

.blog-card-link {
  min-height: 2.75rem;
  padding-block: 0.5rem;
}

.blog-pillar-all,
.blog-back a,
.blog-pagination-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding-block: 0.375rem;
}

.blog-hero-cta .btn {
  min-height: 2.75rem;
}

@media (max-width: 767px) {
  .blog-card--featured .blog-card-link {
    align-self: flex-start;
  }
}

@media (max-width: 480px) {
  body.blog-index main {
    padding: 1.25rem 1rem 3.5rem;
  }

  body.blog-post main {
    padding: 1.5rem 1rem 3.5rem;
  }

  .blog-hero {
    padding: 1.25rem 1rem;
    margin-bottom: 2rem;
  }

  .blog-hero--compact {
    padding: 1.125rem 1rem;
    margin-bottom: 1.5rem;
  }

  .blog-hero-purpose {
    font-size: 1rem;
  }

  body.blog-page .lead {
    font-size: 1rem;
    line-height: 1.65;
  }

  body.blog-page h1 {
    font-size: 1.625rem;
  }

  .blog-featured {
    margin-bottom: 2.25rem;
  }

  .blog-pillar {
    margin-bottom: 2.25rem;
  }

  .blog-card {
    padding: 1.125rem 1rem;
  }

  .blog-card--featured {
    padding: 1.375rem 1.125rem;
  }

  .blog-tag {
    font-size: 0.6875rem;
    padding: 0.25rem 0.5rem;
  }

  body.blog-post article {
    font-size: 1rem;
    line-height: 1.7;
  }

  body.blog-post article h2 {
    font-size: 1.125rem;
    margin-top: 1.75rem;
  }

  .blog-post-footer {
    margin-top: 2rem;
    padding-top: 1.25rem;
  }

  .blog-pagination {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1rem;
    text-align: center;
  }

  .blog-pagination-spacer {
    display: none;
  }

  .blog-pillar-heading {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .blog-pillar-all {
    white-space: normal;
  }
}

@media (min-width: 481px) and (max-width: 767px) {
  body.blog-index main {
    padding: 1.5rem 1.25rem 4rem;
  }
}

@media (min-width: 768px) and (max-width: 959px) {
  body.blog-index main {
    padding: 2rem 1.5rem 4rem;
  }

  .blog-hero {
    padding: 1.75rem 1.5rem;
  }
}

