/* FixMyBCP — shared styles
   Palette: warm cream + deep civic navy + terracotta accent + forest green
   Type: Newsreader (display) + system-ui (body) — only one webfont request */

:root {
  --bg: #faf6ec;
  --bg-alt: #f3ecd9;
  --surface: #ffffff;
  --ink: #0d1f3c;
  --ink-soft: #3a4a66;
  --ink-mute: #6b7588;
  --line: #d8cfb6;
  --line-soft: #e8e0c8;
  --accent: #c75d3c;          /* terracotta */
  --accent-ink: #8a3a20;
  --leaf: #1f6f54;            /* forest green */
  --leaf-soft: #2f8f72;
  --sky: #2a5fa3;             /* civic blue */
  --gold: #c89b3c;
  --shadow-1: 0 1px 2px rgba(13,31,60,.06), 0 8px 24px -12px rgba(13,31,60,.18);
  --radius: 14px;
  --radius-sm: 8px;
  --maxw: 1200px;
  --gutter: clamp(20px, 4vw, 40px);

  --serif: "Newsreader", "Iowan Old Style", "Charter", Georgia, serif;
  --sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
          Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

/* Layout primitives */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }
.row { display: flex; align-items: center; gap: 12px; }
.eyebrow {
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent-ink); font-weight: 600;
  display: inline-flex; align-items: center; gap: 8px;
}
.eyebrow::before {
  content: ""; width: 22px; height: 1px; background: var(--accent);
  display: inline-block;
}
h1, h2, h3, h4 {
  font-family: var(--serif); font-weight: 500; color: var(--ink);
  letter-spacing: -0.01em; margin: 0; line-height: 1.08;
  text-wrap: balance;
}
h1 { font-size: clamp(40px, 6vw, 76px); letter-spacing: -0.02em; }
h2 { font-size: clamp(30px, 4vw, 48px); }
h3 { font-size: clamp(22px, 2.4vw, 28px); line-height: 1.2; }
h4 { font-size: 18px; font-family: var(--sans); font-weight: 600; letter-spacing: 0; }
p { margin: 0; color: var(--ink-soft); }
.lede { font-size: clamp(18px, 1.8vw, 22px); line-height: 1.5; color: var(--ink-soft); text-wrap: pretty; }
em.serif-i { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--accent-ink); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 20px; border-radius: 999px;
  font-weight: 600; font-size: 15px;
  border: 1px solid transparent;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #1b2e54; box-shadow: var(--shadow-1); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: rgba(13,31,60,.04); }
.btn .arrow { transition: transform .2s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* === Header / nav === */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 246, 236, .82);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--serif); font-size: 22px; font-weight: 500;
  letter-spacing: -.01em;
}
.brand-mark {
  width: 32px; height: 32px; border-radius: 9px;
  background: var(--ink); color: #faf6ec;
  display: grid; place-items: center;
  font-family: var(--serif); font-weight: 500; font-size: 16px;
  font-style: italic;
}
.brand b { font-weight: 500; }
.brand i { color: var(--accent); font-style: italic; }

.nav-links { display: flex; gap: 4px; align-items: center; }
.nav-links a {
  padding: 8px 14px; border-radius: 8px;
  font-size: 14.5px; font-weight: 500; color: var(--ink-soft);
}
.nav-links a:hover { color: var(--ink); background: rgba(13,31,60,.04); }
.nav-links a.is-active { color: var(--ink); background: rgba(199,93,60,.08); }
.nav-cta { display: flex; gap: 10px; align-items: center; }
.nav-burger {
  display: none; width: 40px; height: 40px;
  border: 1px solid var(--line); border-radius: 10px; background: transparent;
}
.nav-burger span {
  display: block; width: 18px; height: 1.5px; background: var(--ink); margin: 4px auto;
}

@media (max-width: 880px) {
  .nav-links, .nav-cta { display: none; }
  .nav-burger { display: block; }
  .nav[data-open="true"] + .mobile-menu { display: flex; }
}
.mobile-menu {
  display: none; flex-direction: column; padding: 12px var(--gutter) 20px;
  border-bottom: 1px solid var(--line-soft); background: var(--bg);
}
.mobile-menu a {
  padding: 12px 4px; border-bottom: 1px solid var(--line-soft);
  font-size: 16px; font-weight: 500;
}
.mobile-menu a:last-child { border-bottom: 0; }

/* === Footer === */
.site-footer {
  margin-top: clamp(80px, 10vw, 140px);
  background: var(--ink); color: #d6dcea;
  padding: clamp(48px, 7vw, 88px) 0 32px;
}
.site-footer h4 {
  color: #f4f0e3; font-family: var(--sans); font-weight: 600;
  font-size: 13px; letter-spacing: .14em; text-transform: uppercase;
  margin-bottom: 18px;
}
.footer-grid {
  display: grid; gap: 40px;
  grid-template-columns: 1.4fr 1fr 1fr;
}
.footer-brand p { color: #b6c0d4; font-size: 15px; max-width: 38ch; margin-top: 12px; }
.footer-brand .brand-mark { background: #faf6ec; color: var(--ink); }
.footer-brand .brand i { color: var(--accent); }
.footer-brand .brand { color: #faf6ec; }
.footer-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-list a { color: #b6c0d4; font-size: 14.5px; }
.footer-list a:hover { color: #fff; }
.footer-bottom {
  margin-top: 48px; padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.1);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  color: #8d99b3; font-size: 13px;
}
.footer-meta a { color: #b6c0d4; }
.footer-meta a:hover { color: #fff; }
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}

/* === Hero banner === */
.hero {
  position: relative; padding: clamp(40px, 6vw, 84px) 0 clamp(60px, 7vw, 96px);
  overflow: hidden;
}
.hero-banner {
  background: linear-gradient(135deg, rgba(13,31,60,.72), rgba(13,31,60,.64)), url("assets/hero-bg.webp");
  background-size: cover;
  background-position: center;
  color: #f4eedc;
  border-radius: 24px;
  padding: clamp(36px, 6vw, 72px) clamp(28px, 5vw, 64px);
  position: relative; overflow: hidden;
  isolation: isolate;
}
.hero-banner::before {
  content: ""; position: absolute; inset: 0;
  background: none;
  z-index: -1;
}
.hero-pill {
  display: inline-flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14);
  padding: 6px 12px 6px 8px; border-radius: 999px;
  font-size: 13px; color: #f4eedc; backdrop-filter: blur(6px);
  margin-bottom: 24px;
}
.hero-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: #6ed3a6; box-shadow: 0 0 0 4px rgba(110,211,166,.18); }
.hero-banner h1 {
  color: #faf6ec;
  font-size: clamp(38px, 6vw, 80px);
  letter-spacing: -.02em; line-height: 1.04;
  max-width: 22ch;
}
.hero-banner h1 b { font-weight: 500; color: #f7c98c; font-style: italic; }
.hero-banner h1 u {
  text-decoration: none; background: linear-gradient(transparent 65%, rgba(199,93,60,.45) 65%);
}
.hero-stats {
  margin-top: 36px;
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1px; background: rgba(255,255,255,.12);
  border-radius: 14px; overflow: hidden;
}
.hero-stat {
  background: rgba(13,31,60,.55);
  padding: 22px 22px;
}
.hero-stat .num {
  font-family: var(--serif); font-size: clamp(34px, 4.4vw, 52px);
  line-height: 1; color: #faf6ec;
  display: flex; align-items: baseline; gap: 4px;
}
.hero-stat .num small { font-size: .55em; color: #f7c98c; font-style: italic; font-family: var(--serif); font-weight: 400; }
.hero-stat .label {
  margin-top: 8px; font-size: 13.5px; color: #c9d2e3; line-height: 1.4;
}

@media (max-width: 720px) {
  .hero-stats { grid-template-columns: 1fr; }
}

/* === Section scaffolding === */
.section {
  padding: clamp(64px, 9vw, 120px) 0;
  position: relative;
}
.section + .section { padding-top: 0; }
.section-head {
  display: grid; grid-template-columns: 1fr 1.4fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: end;
  margin-bottom: clamp(40px, 6vw, 64px);
}
.section-head .lede { max-width: 52ch; }
@media (max-width: 800px) {
  .section-head { grid-template-columns: 1fr; gap: 16px; align-items: start; }
}

/* Section visual + copy split */
.split {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.split.flip { grid-template-columns: 1fr 1.05fr; }
.split.flip .split-visual { order: 2; }
@media (max-width: 880px) {
  .split, .split.flip { grid-template-columns: 1fr; gap: 32px; }
  .split.flip .split-visual { order: 0; }
}
.split-copy h2 { margin-bottom: 18px; }
.split-copy p + p { margin-top: 14px; }

/* Visual frame */
.frame {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  box-shadow: var(--shadow-1);
  padding: clamp(20px, 3vw, 32px);
  position: relative;
  overflow: hidden;
}
.frame.tinted { background: var(--bg-alt); }

/* Photo frame — image fills the frame edge-to-edge with rounded corners + soft shadow */
.frame.frame-photo {
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 18px;
  box-shadow:
    0 1px 2px rgba(13,31,60,.06),
    0 18px 40px -18px rgba(13,31,60,.28),
    0 4px 14px -8px rgba(13,31,60,.14);
  overflow: hidden;
}
.frame.frame-photo img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 18px;
}

/* === Theme variants (Tweak: palette) === */
body[data-theme="slate"] {
  --bg: #eef1f6;
  --bg-alt: #dde3ee;
  --ink: #0e1726;
  --ink-soft: #2d3a52;
  --line: #c2cad8;
  --line-soft: #dde3ee;
  --accent: #2a5fa3;
  --accent-ink: #1a3f74;
  --leaf: #1f6f54;
  --gold: #c89b3c;
}
body[data-theme="forest"] {
  --bg: #f1efe2;
  --bg-alt: #e2e7d2;
  --ink: #122418;
  --ink-soft: #2c3d31;
  --line: #c8cdb2;
  --line-soft: #d9deca;
  --accent: #2a8d6a;
  --accent-ink: #1f6f54;
  --leaf: #1f6f54;
}
body[data-theme="ink"] {
  --bg: #f5f0e4;
  --bg-alt: #e7e1d0;
  --ink: #0a0a0a;
  --ink-soft: #2a2a2a;
  --line: #c9c2af;
  --line-soft: #ddd6c2;
  --accent: #c75d3c;
  --accent-ink: #0a0a0a;
  --leaf: #0a0a0a;
}

/* === Headline voice variants (Tweak: voice) === */
body[data-voice="grotesk"] h1,
body[data-voice="grotesk"] h2,
body[data-voice="grotesk"] h3,
body[data-voice="grotesk"] .brand,
body[data-voice="grotesk"] .brand-mark {
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: -0.025em;
}
body[data-voice="grotesk"] em.serif-i {
  font-family: var(--sans);
  font-style: italic;
  font-weight: 600;
}
body[data-voice="monumental"] h1,
body[data-voice="monumental"] h2 {
  font-family: var(--serif);
  text-transform: uppercase;
  letter-spacing: -0.005em;
  font-weight: 500;
}
body[data-voice="monumental"] h1 { font-size: clamp(36px, 5.4vw, 68px); line-height: 1.0; }
body[data-voice="monumental"] em.serif-i {
  text-transform: none;
  font-style: italic;
}

/* === Density variants (Tweak: density) === */
body[data-density="roomy"] .section { padding: clamp(96px, 13vw, 180px) 0; }
body[data-density="roomy"] .hero { padding: clamp(56px, 8vw, 110px) 0 clamp(80px, 10vw, 130px); }
body[data-density="roomy"] .hero-banner { padding: clamp(56px, 8vw, 100px) clamp(40px, 6vw, 80px); }
body[data-density="roomy"] .section-head { margin-bottom: clamp(56px, 8vw, 88px); }

body[data-density="compact"] .section { padding: clamp(40px, 6vw, 80px) 0; }
body[data-density="compact"] .hero { padding: clamp(24px, 4vw, 56px) 0 clamp(36px, 5vw, 64px); }
body[data-density="compact"] .hero-banner { padding: clamp(24px, 4vw, 48px) clamp(20px, 4vw, 44px); }
body[data-density="compact"] .section-head { margin-bottom: clamp(24px, 4vw, 40px); }
body[data-density="compact"] h1 { font-size: clamp(34px, 5vw, 60px); }
body[data-density="compact"] h2 { font-size: clamp(26px, 3.4vw, 40px); }

/* Bullet list */
.checklist { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.checklist li {
  display: grid; grid-template-columns: 22px 1fr; gap: 12px;
  font-size: 16px; color: var(--ink-soft);
}
.checklist li::before {
  content: ""; width: 22px; height: 22px; border-radius: 50%;
  background: rgba(31,111,84,.12);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f6f54' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
  background-size: 14px; background-position: center; background-repeat: no-repeat;
}

/* Problem cards */
.problem-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
@media (max-width: 1000px) { .problem-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .problem-grid { grid-template-columns: 1fr; } }
.problem {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  padding: 24px;
  display: flex; flex-direction: column; gap: 14px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.problem:hover { transform: translateY(-2px); box-shadow: var(--shadow-1); }
.problem-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--bg-alt); color: var(--accent);
}
.problem h3 { font-size: 19px; font-family: var(--sans); font-weight: 600; letter-spacing: 0; }
.problem p { font-size: 14.5px; line-height: 1.5; }
.problem .strike {
  margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--line);
  font-size: 13px; color: var(--accent-ink); font-weight: 500;
}

/* Benefit cards */
.benefit-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
@media (max-width: 880px) { .benefit-grid { grid-template-columns: 1fr; } }
.benefit {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  padding: 28px;
  display: grid; gap: 14px;
  position: relative; overflow: hidden;
}
.benefit.dark { background: var(--ink); color: #f4eedc; border-color: transparent; }
.benefit.dark p { color: #c9d2e3; }
.benefit.dark .stat .num { color: #f7c98c; }
.benefit.warm { background: linear-gradient(180deg, #f7e8d6 0%, #f3d7bd 100%); border-color: transparent; }
.benefit .stat {
  display: flex; align-items: baseline; gap: 6px;
  font-family: var(--serif);
}
.benefit .stat .num {
  font-size: clamp(40px, 5vw, 60px); line-height: .95;
  color: var(--ink); letter-spacing: -.02em;
}
.benefit .stat .unit {
  font-size: 22px; color: var(--accent); font-style: italic;
}
.benefit .stat .label {
  font-family: var(--sans); font-size: 13px; color: var(--ink-mute);
  font-weight: 500; letter-spacing: .04em; text-transform: uppercase;
  margin-left: auto; align-self: end;
}
.benefit h3 { font-family: var(--sans); font-size: 18px; font-weight: 600; letter-spacing: 0; }
.benefit p { font-size: 14.5px; line-height: 1.55; }

/* CTA strip */
.cta-strip {
  margin: clamp(60px, 8vw, 96px) auto 0;
  background: var(--bg-alt);
  border-radius: 24px;
  padding: clamp(32px, 5vw, 60px);
  display: grid; grid-template-columns: 1.4fr auto;
  gap: 32px; align-items: center;
}
.cta-strip h2 { font-size: clamp(26px, 3.4vw, 40px); max-width: 22ch; }
.cta-strip-actions { display: flex; gap: 12px; }
@media (max-width: 720px) {
  .cta-strip { grid-template-columns: 1fr; }
  .cta-strip-actions { flex-wrap: wrap; }
}

/* Stub page styles */
.stub {
  padding: clamp(80px, 12vw, 160px) 0 clamp(60px, 8vw, 100px);
  text-align: center;
}
.stub h1 { font-size: clamp(48px, 7vw, 96px); margin-bottom: 18px; }
.stub .stub-tag {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--bg-alt); border: 1px solid var(--line);
  padding: 6px 12px; border-radius: 999px;
  font-size: 13px; color: var(--accent-ink); font-weight: 500;
  margin-bottom: 28px;
}
.stub p.lede { max-width: 60ch; margin: 0 auto; }
.stub-toc {
  margin-top: 48px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px; max-width: 880px; margin-inline: auto;
  text-align: left;
}
.stub-toc-item {
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: 14px; padding: 20px;
}
.stub-toc-item h4 { color: var(--accent-ink); margin-bottom: 8px; font-size: 14px; }
.stub-toc-item p { font-size: 14px; }

/* Subtle decorative dots — civic map vibe */
.dots-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(13,31,60,.07) 1px, transparent 1.2px);
  background-size: 22px 22px;
  mask: linear-gradient(180deg, black, transparent 70%);
  -webkit-mask: linear-gradient(180deg, black, transparent 70%);
}

/* Reveal-on-scroll */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* Skip link for a11y/lighthouse */
.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px;
}
.skip:focus { left: 12px; top: 12px; z-index: 100; }
