/* SanctuaryIQ — sleek modern dark UI, church-friendly palette
   Less is more. */

:root {
  --bg: #fbf9f4;          /* eggshell */
  --bg-1: #ffffff;
  --bg-2: #f6f3ec;
  --surface: #ffffff;
  --surface-2: #f7f5ee;
  --border: #e8e5db;
  --border-strong: #d2cfc1;

  --text: #1a1b2e;        /* deep ink */
  --text-dim: #555870;
  --text-muted: #8a8da4;

  --brand-1: #6e62b8;     /* deeper amethyst for AA contrast on light */
  --brand-2: #8b7fd6;
  --brand-3: #564a99;
  --accent: #6e62b8;

  --success: #16a34a;
  --warn: #d97706;
  --danger: #dc2626;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;

  --shadow-sm: 0 1px 2px rgba(20,18,40,.06);
  --shadow: 0 10px 30px -12px rgba(20,18,40,.10);
  --shadow-lg: 0 30px 80px -30px rgba(110,98,184,.28), 0 20px 50px -25px rgba(110,98,184,.18);

  --container: 1180px;
  --header-h: 68px;

  --grad: linear-gradient(135deg, var(--brand-1) 0%, var(--brand-2) 100%);
  --grad-soft: linear-gradient(135deg, rgba(110,98,184,.10), rgba(139,127,214,.06));
}

* { box-sizing: border-box; }
html, body { padding: 0; margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  background-image:
    radial-gradient(1200px 600px at 80% -10%, rgba(139,127,214,.10), transparent 60%),
    radial-gradient(900px 500px at 5% 5%, rgba(110,98,184,.06), transparent 60%);
  background-attachment: fixed;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 .6em;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text);
}
h1 { font-size: clamp(2.4rem, 5.8vw, 4.4rem); font-weight: 800; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); letter-spacing: -0.03em; }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
h4 { font-size: 1.05rem; }
h6 { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--text-muted); margin-bottom: 1rem; }

p { margin: 0 0 1rem; color: var(--text-dim); }
.lead { font-size: clamp(1.05rem, 1.5vw, 1.25rem); color: var(--text-dim); max-width: 56ch; }

a { color: var(--text); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--brand-1); }

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

.muted { color: var(--text-muted); }
.small { font-size: .85rem; }
.center { text-align: center; }

/* Layout */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
section { padding: clamp(64px, 9vw, 120px) 0; position: relative; }
section.tight { padding: clamp(40px, 6vw, 80px) 0; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  display: flex; align-items: center;
  background: rgba(251, 249, 244, 0.72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, background .2s ease;
}
.site-header.scrolled {
  border-bottom-color: var(--border);
  background: rgba(251, 249, 244, 0.92);
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -0.02em; font-size: 1.05rem; }
.brand-logo { display: block; height: 32px; width: auto; }
.brand-mark { display: inline-flex; }
.brand-text span { color: var(--brand-1); }

.nav-main { display: flex; align-items: center; gap: 6px; }
.nav-main > a {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: .92rem;
  color: var(--text-dim);
  font-weight: 500;
  transition: color .15s ease, background .15s ease;
}
.nav-main > a:hover { color: var(--text); background: var(--surface); }
.nav-main > a.active { color: var(--text); background: var(--surface-2); }
.nav-cta { margin-left: 6px; }

.nav-toggle {
  display: none;
  width: 42px; height: 42px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  position: relative;
}
.nav-toggle span {
  display: block; position: absolute; left: 11px; right: 11px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: transform .25s ease, opacity .25s ease, top .25s ease;
}
.nav-toggle span:nth-child(1) { top: 14px; }
.nav-toggle span:nth-child(2) { top: 20px; }
.nav-toggle span:nth-child(3) { top: 26px; }
.nav-toggle.open span:nth-child(1) { top: 20px; transform: rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { top: 20px; transform: rotate(-45deg); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 22px; border-radius: 999px;
  font-weight: 600; font-size: .95rem;
  border: 1px solid transparent;
  cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease, color .2s ease;
  white-space: nowrap;
  text-decoration: none;
}
.btn .material-symbols-rounded { font-size: 18px; }
.btn-sm { padding: 9px 16px; font-size: .88rem; }
.btn-primary {
  color: #ffffff;
  background: var(--brand-1);
  box-shadow: 0 10px 30px -12px rgba(139,127,214,.55);
}
.btn-primary:hover {
  background: var(--brand-2);
  transform: translateY(-1px);
  box-shadow: 0 16px 40px -14px rgba(139,127,214,.65);
  color: #ffffff;
}
.btn-ghost {
  color: var(--text);
  background: var(--surface);
  border-color: var(--border);
}
.btn-ghost:hover { background: var(--surface-2); border-color: var(--border-strong); color: var(--text); }
.btn-link { background: transparent; padding: 0; color: var(--brand-1); }
.btn-link:hover { color: var(--text); }

/* Eyebrow / chip */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: .78rem; font-weight: 500; letter-spacing: .04em;
  color: var(--text-dim);
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand-1); box-shadow: 0 0 12px var(--brand-1); }
.eyebrow.grad { background: var(--grad-soft); border-color: rgba(139,127,214,.30); color: var(--text); }

/* Hero */
.hero {
  padding-top: clamp(70px, 9vw, 130px);
  padding-bottom: clamp(60px, 8vw, 120px);
  position: relative; overflow: hidden;
}
.hero h1 .grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { margin-top: 22px; }
.hero-actions { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 14px; }
.hero-meta { margin-top: 48px; display: flex; flex-wrap: wrap; gap: 28px 40px; color: var(--text-muted); font-size: .88rem; }
.hero-meta strong { color: var(--text); display: block; font-size: 1.4rem; font-weight: 700; letter-spacing: -.02em; }

/* Hero visual mockup */
.hero-visual {
  margin-top: 70px;
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 14px;
  box-shadow: var(--shadow-lg);
  color: var(--text);
}
.hero-visual::before {
  content: '';
  position: absolute; inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(110,98,184,.45), transparent 40%, rgba(139,127,214,.4));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none;
}
.mock {
  border-radius: calc(var(--radius-lg) - 8px);
  background: var(--bg-2);
  overflow: hidden;
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 460px;
}
.mock-side {
  background: linear-gradient(180deg, rgba(110,98,184,.04), transparent);
  border-right: 1px solid var(--border);
  padding: 18px 14px;
}
.mock-side h6 { margin: 4px 8px 14px; font-size: .68rem; }
.mock-nav { display: flex; flex-direction: column; gap: 2px; }
.mock-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 10px;
  color: var(--text-dim); font-size: .88rem; font-weight: 500;
}
.mock-nav a.active { background: var(--surface-2); color: var(--text); }
.mock-nav a:hover { background: var(--surface); color: var(--text); }
.mock-nav .material-symbols-rounded { font-size: 18px; }

.mock-main { padding: 22px 24px; }
.mock-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.mock-toolbar h4 { margin: 0; font-size: 1.05rem; }
.mock-toolbar .pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  background: var(--grad-soft); color: var(--text);
  font-size: .72rem; font-weight: 500;
  border: 1px solid rgba(139,127,214,.25);
}
.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.kpi {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px;
}
.kpi .label { font-size: .72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .08em; }
.kpi .value { font-size: 1.3rem; font-weight: 700; margin-top: 4px; letter-spacing: -.02em; }
.kpi.up .value { color: var(--success); }
.kpi.warn .value { color: var(--warn); }

.mock-rows { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.mock-row { display: grid; grid-template-columns: 110px 1fr 110px 100px; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); align-items: center; font-size: .88rem; }
.mock-row:last-child { border-bottom: none; }
.mock-row .id { color: var(--text-muted); font-family: 'JetBrains Mono', monospace; font-size: .78rem; }
.mock-row .title { color: var(--text); font-weight: 500; }
.mock-row .div { color: var(--text-dim); }
.mock-row .stat {
  text-align: right; font-size: .72rem; padding: 3px 8px; border-radius: 999px; justify-self: end;
}
.stat.open { background: rgba(139,127,214,.14); color: var(--brand-1); }
.stat.prog { background: rgba(163,149,232,.16); color: #6e62b8; }
.stat.done { background: rgba(52,211,153,.12); color: var(--success); }
.stat.emer { background: rgba(239,68,68,.12); color: var(--danger); }

/* AI assistant floating chip */
.mock-ai {
  margin-top: 14px;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: var(--grad-soft);
  border: 1px solid rgba(139,127,214,.25);
  border-radius: var(--radius);
}
.mock-ai .material-symbols-rounded { color: var(--brand-1); }
.mock-ai .q { color: var(--text); font-weight: 500; font-size: .9rem; }
.mock-ai .a { color: var(--text-dim); font-size: .84rem; }

/* Section heading */
.section-head { max-width: 720px; margin: 0 auto 56px; text-align: center; }
.section-head .eyebrow { margin-bottom: 18px; }

/* Cards / grids */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.card:hover { transform: translateY(-2px); border-color: var(--border-strong); background: var(--surface-2); }
.card .icon {
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: var(--grad-soft);
  color: var(--brand-1);
  margin-bottom: 18px;
  border: 1px solid rgba(139,127,214,.20);
}
.card .icon .material-symbols-rounded { font-size: 22px; }
.card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.card p { font-size: .94rem; margin-bottom: 0; }

.card.feature h3 { font-size: 1.18rem; }
.card.outline { background: transparent; }

/* Big AI cards (numbered) */
.ai-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.ai-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  overflow: hidden;
  transition: transform .2s ease, border-color .2s ease;
}
.ai-card:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.ai-card::before {
  content: '';
  position: absolute; top: -40%; right: -20%;
  width: 280px; height: 280px;
  background: radial-gradient(closest-side, rgba(139,127,214,.20), transparent 70%);
  pointer-events: none;
}
.ai-card .num {
  font-family: 'JetBrains Mono', monospace;
  font-size: .8rem; color: var(--brand-1);
  margin-bottom: 14px;
}
.ai-card h3 { font-size: 1.35rem; }
.ai-card ul { padding: 0; margin: 14px 0 0; list-style: none; }
.ai-card ul li {
  position: relative; padding-left: 22px; margin-bottom: 8px;
  color: var(--text-dim); font-size: .92rem;
}
.ai-card ul li::before {
  content: '';
  position: absolute; left: 0; top: 9px;
  width: 10px; height: 10px; border-radius: 3px;
  background: var(--grad);
  opacity: .9;
}

/* Differentiator table */
.diff-table {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-1);
}
.diff-row {
  display: grid; grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--border);
}
.diff-row:last-child { border-bottom: none; }
.diff-row > div { padding: 18px 24px; font-size: .95rem; }
.diff-row .legacy { color: var(--text-muted); border-right: 1px solid var(--border); }
.diff-row .ours { color: var(--text); background: rgba(110,98,184,.06); font-weight: 500; }
.diff-row.head > div { font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; padding: 14px 24px; }
.diff-row.head .legacy { color: var(--text-muted); }
.diff-row.head .ours { color: var(--brand-1); }

/* Pitch quote */
.pitch {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(32px, 5vw, 64px);
  background:
    linear-gradient(180deg, rgba(110,98,184,.08), transparent 50%),
    var(--bg-1);
  position: relative;
}
.pitch::before {
  content: '';
  position: absolute; inset: -1px;
  border-radius: inherit; padding: 1px;
  background: linear-gradient(135deg, rgba(139,127,214,.4), transparent 50%, rgba(163,149,232,.4));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none;
}
.pitch p {
  font-size: clamp(1.05rem, 1.7vw, 1.35rem);
  color: var(--text);
  line-height: 1.55;
  font-weight: 400;
}
.pitch .punch {
  margin-top: 20px;
  font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* Module list */
.mod-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.mod-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
  transition: border-color .2s ease, transform .2s ease;
}
.mod-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.mod-card h4 { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 1rem; }
.mod-card .material-symbols-rounded { color: var(--brand-1); font-size: 20px; }
.mod-card p { margin: 0; font-size: .9rem; }

/* Feature list w/ checkmarks */
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.checks li {
  position: relative; padding-left: 28px;
  color: var(--text-dim); font-size: .95rem;
}
.checks li::before {
  content: 'check';
  font-family: 'Material Symbols Rounded';
  position: absolute; left: 0; top: 1px;
  font-size: 18px;
  color: var(--brand-1);
  background: rgba(139,127,214,.14);
  width: 20px; height: 20px; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
}
.checks li strong { color: var(--text); font-weight: 600; }

/* Logos / built-for strip */
.built-strip {
  display: flex; flex-wrap: wrap; gap: 10px 12px; justify-content: center;
}
.built-strip span {
  padding: 8px 16px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-dim); font-size: .88rem;
}

/* Integrations grid */
.int-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.int {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 18px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-weight: 500; font-size: .95rem;
}
.int .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--grad); flex: none; }

/* CTA band */
.cta-band {
  border-radius: var(--radius-lg);
  padding: clamp(40px, 6vw, 72px);
  text-align: center;
  background:
    radial-gradient(800px 300px at 50% 0%, rgba(139,127,214,.20), transparent 60%),
    var(--bg-1);
  border: 1px solid var(--border);
}
.cta-band h2 { margin-bottom: 12px; }
.cta-band p { max-width: 56ch; margin: 0 auto 28px; color: var(--text-dim); }

/* Form */
.form { display: grid; gap: 16px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: .82rem; color: var(--text-dim); font-weight: 500; }
.field input, .field textarea, .field select {
  width: 100%;
  padding: 13px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 12px;
  font-family: inherit; font-size: .95rem;
  outline: none;
  transition: border-color .15s ease, background .15s ease;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--brand-1); background: var(--surface-2); }
.field textarea { resize: vertical; min-height: 130px; }

/* Footer */
.site-footer {
  margin-top: 60px;
  border-top: 1px solid var(--border);
  padding: 56px 0 28px;
  background: var(--bg-2);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 36px;
}
.site-footer h6 { margin-bottom: 14px; }
.site-footer a, .site-footer .small { display: block; margin-bottom: 8px; font-size: .9rem; color: var(--text-dim); }
.site-footer a:hover { color: var(--text); }
.foot-bottom {
  margin-top: 44px; padding-top: 22px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* Page header (subpages) */
.page-hero { padding: clamp(80px, 10vw, 130px) 0 clamp(40px, 6vw, 70px); text-align: center; }
.page-hero h1 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); }
.page-hero p { max-width: 640px; margin: 18px auto 0; }

/* Flow (How It Works) */
.flow { display: grid; gap: 18px; }
.flow-step {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  position: relative;
  transition: border-color .2s ease, transform .2s ease;
}
.flow-step:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.flow-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 2.4rem; font-weight: 600;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  letter-spacing: -.04em;
  line-height: 1;
}
.flow-body h3 { margin-bottom: 10px; }
.flow-body p { margin-bottom: 16px; }

/* Sample workflow stepper */
.workflow {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.wf-step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: border-color .2s ease, transform .2s ease;
}
.wf-step:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.wf-time {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: .72rem;
  color: var(--brand-1);
  background: rgba(139,127,214,.12);
  border: 1px solid rgba(139,127,214,.25);
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.wf-step h4 {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 8px;
  font-size: 1rem;
}
.wf-step h4 .material-symbols-rounded { color: var(--brand-1); font-size: 20px; }
.wf-step p { margin: 0; font-size: .92rem; }

/* FAQ */
.faq-list {
  display: grid; gap: 12px;
  max-width: 880px; margin: 0 auto;
}
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .2s ease;
}
.faq-item[open] { border-color: var(--border-strong); }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 22px 26px;
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--text);
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: 'expand_more';
  font-family: 'Material Symbols Rounded';
  font-size: 22px;
  color: var(--brand-1);
  transition: transform .2s ease;
  flex: none;
}
.faq-item[open] summary::after { transform: rotate(180deg); }
.faq-item .faq-body {
  padding: 0 26px 24px;
  color: var(--text-dim);
  font-size: .95rem;
}
.faq-item .faq-body p { margin: 0 0 10px; }
.faq-item .faq-body p:last-child { margin-bottom: 0; }

/* Compliance badges (security page) */
.badge-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.badge {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: .92rem;
  font-weight: 500;
  color: var(--text);
}
.badge .material-symbols-rounded { color: var(--brand-1); font-size: 22px; }

@media (max-width: 960px) {
  .workflow { grid-template-columns: repeat(2, 1fr); }
  .badge-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .workflow { grid-template-columns: 1fr; }
  .badge-grid { grid-template-columns: 1fr; }
  .flow-step { grid-template-columns: 1fr; gap: 12px; padding: 24px; }
  .flow-num { font-size: 1.6rem; }
}

/* Responsive */
@media (max-width: 960px) {
  .grid-3, .grid-4, .ai-grid, .mod-grid, .int-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .mock { grid-template-columns: 1fr; min-height: auto; }
  .mock-side { display: none; }
}

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav-main {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch;
    padding: 18px 24px 28px;
    background: rgba(251,249,244,.98);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: transform .25s ease, opacity .25s ease;
    gap: 4px;
  }
  .nav-main.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav-main > a { padding: 14px 14px; border-radius: 12px; font-size: 1rem; }
  .nav-cta { margin: 8px 0 0; text-align: center; }
}

@media (max-width: 560px) {
  .grid-2, .grid-3, .grid-4, .ai-grid, .mod-grid, .int-grid { grid-template-columns: 1fr; }
  .form .row { grid-template-columns: 1fr; }
  .diff-row { grid-template-columns: 1fr; }
  .diff-row .legacy { border-right: none; border-bottom: 1px solid var(--border); }
  .diff-row.head { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .mock-row { grid-template-columns: 1fr 90px; }
  .mock-row .id, .mock-row .div { display: none; }
  .hero-meta { gap: 22px; }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ------------------------------------------------------------------ */
/* Articles — index, cards, and long-form prose                        */
/* ------------------------------------------------------------------ */

.container.narrow { max-width: 760px; }

/* Article index grid + cards */
.article-grid { gap: 22px; }
.article-card {
  display: flex; flex-direction: column;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  text-decoration: none;
  color: var(--text);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.article-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
  color: var(--text);
}
.article-card .article-cat {
  display: inline-flex; align-self: flex-start;
  font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--brand-1);
  background: rgba(110,98,184,.10);
  border: 1px solid rgba(110,98,184,.22);
  padding: 4px 10px; border-radius: 999px;
}
.article-card h3 {
  font-size: 1.15rem; line-height: 1.3; margin: 4px 0 0;
  letter-spacing: -.02em;
}
.article-card p {
  font-size: .92rem; color: var(--text-dim); margin: 0; flex: 1;
}
.article-card-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 8px; padding-top: 14px;
  border-top: 1px solid var(--border);
  gap: 12px;
}
.article-more {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--brand-1); font-weight: 600; font-size: .88rem;
  white-space: nowrap;
}
.article-more .material-symbols-rounded { font-size: 16px; transition: transform .2s ease; }
.article-card:hover .article-more .material-symbols-rounded { transform: translateX(3px); }

/* Article header */
.article-hero { padding-bottom: clamp(28px, 4vw, 48px); text-align: left; }
.article-hero h1 {
  font-size: clamp(1.9rem, 3.6vw, 2.8rem);
  letter-spacing: -.025em;
  margin-top: 14px;
}
.article-hero .article-meta {
  margin-top: 18px;
  color: var(--text-muted);
  font-size: .9rem;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
}
.article-hero .article-meta .sep { opacity: .55; }
.article-back {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--text-muted); font-size: .85rem; font-weight: 500;
}
.article-back:hover { color: var(--brand-1); }
.article-back .material-symbols-rounded { font-size: 18px; }

/* Long-form prose */
.prose-wrap { padding: 0 0 clamp(56px, 8vw, 100px); }
.prose {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text);
}
.prose .lede {
  font-size: 1.18rem;
  line-height: 1.6;
  color: var(--text);
  border-left: 3px solid var(--brand-1);
  padding: 4px 0 4px 18px;
  margin: 0 0 32px;
  font-weight: 500;
}
.prose h2 {
  font-size: clamp(1.4rem, 2.4vw, 1.8rem);
  margin: 48px 0 16px;
  letter-spacing: -.02em;
}
.prose h3 {
  font-size: 1.2rem;
  margin: 32px 0 10px;
  color: var(--text);
}
.prose p {
  color: var(--text);
  margin: 0 0 18px;
}
.prose ul, .prose ol {
  margin: 0 0 22px;
  padding-left: 1.4em;
  color: var(--text);
}
.prose ul li, .prose ol li {
  margin-bottom: 8px;
  line-height: 1.65;
}
.prose ul li::marker { color: var(--brand-1); }
.prose ol li::marker { color: var(--brand-1); font-weight: 600; }
.prose strong { color: var(--text); font-weight: 700; }
.prose em { color: var(--text); }
.prose a {
  color: var(--brand-1);
  text-decoration: underline;
  text-decoration-color: rgba(110,98,184,.35);
  text-underline-offset: 3px;
  font-weight: 500;
}
.prose a:hover {
  color: var(--brand-3);
  text-decoration-color: var(--brand-1);
}
.prose blockquote {
  margin: 28px 0;
  padding: 18px 22px;
  background: var(--grad-soft);
  border-left: 3px solid var(--brand-1);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text);
  font-style: italic;
}

@media (max-width: 720px) {
  .prose { font-size: 1rem; }
  .prose .lede { font-size: 1.08rem; }
}
