:root {
  --paper: #FEF9FF;
  --card: #FFFFFF;
  --line: #E7DAD8;
  --plum: #573258;
  --plum-soft: #6B4A6E;
  --marigold: #D9694E;
  --marigold-dark: #8C540D;
  --rose: #A33B50;
  --sage: #5E7A6C;
  --lavender-soft: #ECE5EC;
  --mint-soft: #E5ECE7;
  --ink: #2A2028;
  --ink-soft: #635760;
  --radius: 18px;
  --font-serif: 'Lora', Georgia, serif;
  --font-sans: 'Karla', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --shadow-soft: 0 4px 20px rgba(87,50,88,0.06);
  --shadow-lift: 0 12px 32px rgba(87,50,88,0.12);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
}
/* Same fixed background glow as before, but on its own fixed layer: `background-attachment: fixed`
   on body (with the sticky header + smooth anchor scrolling) made Chrome/Edge skip repainting
   sections after jumping to #categories, leaving empty boxes. */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    radial-gradient(ellipse 120% 80% at 10% -20%, var(--bg-573258-6), transparent 50%),
    radial-gradient(ellipse 80% 60% at 90% 10%, var(--bg-ece5ec-50), transparent 45%);
}
h1, h2, h3 { font-family: var(--font-serif); color: var(--plum); }
a { text-decoration: none; color: inherit; transition: color 0.2s ease; }
button { font-family: var(--font-sans); }
:focus-visible { outline: 3px solid var(--plum); outline-offset: 2px; }

/* ============================== HEADER ============================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  background: linear-gradient(90deg, var(--bg-573258) 0%, var(--bg-a33b50) 60%, var(--bg-d9694e) 100%);
  border-bottom: 1px solid var(--ln-ffffff-15);   /* (blur removed: header is opaque, it only caused repaint glitches) */
}

/* 1. Fix Brand Text Visibility */
.site-header .brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 19px;
  color: #FEF9FF ; /* Bright cream/white text so it pops against dark purple */
}

/* 2. Fix Nav Links Contrast */
.site-header .main-nav a.nav-link {
  font-size: 13.5px;
  font-weight: 600;
  color: rgba(254, 249, 255, 0.82); /* Soft bright cream */
  transition: color 0.2s ease, opacity 0.2s ease;
}

.site-header .main-nav a.nav-link:hover {
  color: #FFFFFF;
  opacity: 1;
}

/* 3. Fix Header Action Buttons */
.site-header .btn.secondary {
  background: var(--bg-ffffff-10);
  border: 1px solid var(--ln-ffffff-35);
  color: #FFFFFF;
}

.site-header .btn.secondary:hover {
  background: var(--bg-ffffff-20);
  border-color: var(--ln-ffffff);
}

.site-header .btn.marigold {
  background: var(--bg-d9694e) ;
  color: #FFFFFF ; /* Crisp white text inside the orange button */
  box-shadow: 0 4px 14px var(--sh-000000-20);
}

.site-header .btn.marigold:hover {
  background: var(--bg-c15a41) ;
}


.brand {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--font-serif); font-weight: 600; font-size: 19px; color: var(--plum);
}
.brand-glow {
  width: 26px; height: 26px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--bg-f6c9b9), var(--marigold) 65%);
  box-shadow: 0 0 14px var(--sh-d9694e-50); flex-shrink: 0;
}
.main-nav { display: flex; align-items: center; gap: 22px; }
.main-nav a.nav-link { font-size: 13.5px; font-weight: 600; color: var(--ink-soft); }
.main-nav a.nav-link:hover { color: var(--plum); }
.header-actions { display: flex; align-items: center; gap: 10px; }

/* ============================== BUTTONS ============================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 20px; border-radius: 11px; border: 1px solid transparent;
  font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.2s var(--ease-out);
}
.btn.marigold { background: var(--marigold); color: var(--ink); box-shadow: 0 4px 14px var(--sh-d9694e-25); }
.btn.marigold:hover { background: var(--bg-c15a41); transform: translateY(-1px); }
.btn.primary { background: var(--plum-solid); color: #fff; box-shadow: 0 4px 14px var(--sh-573258-20); }
.btn.primary:hover { background: var(--bg-6b466c); transform: translateY(-1px); }
.btn.secondary { background: transparent; border-color: var(--line); color: var(--ink); }
.btn.secondary:hover { border-color: var(--plum-soft); background: var(--paper); }
.btn.big { padding: 14px 26px; font-size: 15px; }

/* ============================== HERO ============================== */
.hero {
  max-width: 1080px; margin: 0 auto; padding: 56px 24px 40px;
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 44px; align-items: center;
}
.hero-kicker {
  display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--marigold-dark);
  background: var(--bg-fcefd8); border-radius: 20px; padding: 5px 12px; margin-bottom: 16px;
}
.hero h1 { font-size: clamp(34px, 5vw, 52px); line-height: 1.12; margin-bottom: 16px; }
.hero h1 em { font-style: italic; color: var(--marigold); }
.hero-sub { font-size: 16px; color: var(--ink-soft); line-height: 1.65; margin-bottom: 26px; max-width: 46ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.hero-note { font-size: 12.5px; color: var(--ink-soft); }
.hero-note a { color: var(--plum); font-weight: 700; }

.hero-art { position: relative; }
.hero-art img {
  width: 100%; border-radius: 24px; display: block;
  border: 1px solid var(--line); box-shadow: var(--shadow-lift);
}
.hero-art .caption {
  position: absolute; left: 14px; bottom: 14px;
  background: var(--bg-fef9ff-92); border: 1px solid var(--line);
  border-radius: 12px; padding: 8px 13px; font-size: 12px; color: var(--ink-soft);
}

/* ============================== STATS STRIP ============================== */
.stats-strip { background: var(--plum-solid); }
.stats-inner {
  max-width: 1080px; margin: 0 auto; padding: 26px 24px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 18px;
}
.stat { text-align: center; }
.stat b { display: block; font-family: var(--font-serif); font-size: 26px; color: #fff; }
.stat span { font-size: 12px; color: var(--fg-ffffff-75); }

/* ============================== SECTIONS ============================== */
.section { max-width: 1080px; margin: 0 auto; padding: 64px 24px; }
.section-head { max-width: 620px; margin-bottom: 34px; }
.section-head .kicker {
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--rose); margin-bottom: 8px; display: block;
}
.section-head h2 { font-size: clamp(26px, 3.4vw, 36px); line-height: 1.2; margin-bottom: 10px; }
.section-head p { color: var(--ink-soft); line-height: 1.65; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; }
.split img {
  width: 100%; border-radius: 20px; display: block;
  border: 1px solid var(--line); box-shadow: var(--shadow-soft);
}
.split.reverse > .split-media { order: 2; }

.pillar-list { display: flex; flex-direction: column; gap: 18px; }
.pillar { display: flex; gap: 14px; }
.pillar .dot {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 18px;
  background: var(--lavender-soft);
}
.pillar h3 { font-size: 17px; margin-bottom: 3px; }
.pillar p { font-size: 13.5px; color: var(--ink-soft); line-height: 1.6; }

/* ============================== HOW IT WORKS ============================== */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.step-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow-soft);
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s ease;
}
.step-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.step-num {
  width: 34px; height: 34px; border-radius: 50%; margin-bottom: 14px;
  background: var(--marigold); color: var(--ink); font-weight: 700; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.step-card h3 { font-size: 17px; margin-bottom: 6px; }
.step-card p { font-size: 13.5px; color: var(--ink-soft); line-height: 1.6; }

/* ============================== CATEGORIES ============================== */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.cat-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; display: flex; flex-direction: column; gap: 10px;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s ease;
}
.cat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.cat-icon {
  width: 44px; height: 44px; border-radius: 50%; font-size: 19px;
  display: flex; align-items: center; justify-content: center;
  background: var(--paper); box-shadow: 0 0 0 1px var(--line) inset;
}
.cat-card h3 { font-size: 16px; }
.cat-card p { font-size: 13px; color: var(--ink-soft); line-height: 1.6; flex: 1; }

/* ============================== SAFETY BANNER ============================== */
.safety-band { background: var(--lavender-soft); }
.safety-inner { max-width: 1080px; margin: 0 auto; padding: 56px 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.safety-inner img { width: 100%; border-radius: 20px; border: 1px solid var(--line); box-shadow: var(--shadow-soft); }
.safety-list { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }
.safety-item { display: flex; gap: 10px; font-size: 14px; color: var(--ink-soft); line-height: 1.55; }
.safety-item .check { color: var(--sage); font-weight: 700; flex-shrink: 0; }

/* ============================== FINAL CTA ============================== */
.cta-band { max-width: 1080px; margin: 0 auto; padding: 64px 24px; }
.cta-card {
  background: var(--plum-solid); border-radius: 26px; padding: 52px 40px; text-align: center;
  background-image: radial-gradient(ellipse 90% 120% at 50% -30%, var(--bg-d9694e-35), transparent 60%);
}
.cta-card h2 { color: #fff; font-size: clamp(26px, 3.6vw, 38px); margin-bottom: 12px; }
.cta-card p { color: rgba(255,255,255,0.8); margin-bottom: 26px; max-width: 52ch; margin-left: auto; margin-right: auto; line-height: 1.65; }
.cta-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }

/* ============================== FOOTER ============================== */
.site-footer {
  border-top: 1px solid var(--line); background: var(--card);
}
.footer-inner {
  max-width: 1080px; margin: 0 auto; padding: 34px 24px;
  display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between;
}
.footer-inner .brand { font-size: 16px; }
.footer-links { display: flex; gap: 18px; font-size: 12.5px; color: var(--ink-soft); }
.footer-links a { color: var(--plum); font-weight: 600; }
.footer-note { width: 100%; font-size: 12px; color: var(--ink-soft); }

/* ============================== MOBILE NAV (hamburger) ============================== */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 11px 10px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.nav-toggle:hover { border-color: var(--plum-soft); background: var(--paper); }
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--plum-solid);
  transition: transform 0.25s var(--ease-out), opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-lift);
  padding: 12px 16px 18px;
  flex-direction: column;
  gap: 4px;
  z-index: 39;
}
.mobile-nav.open { display: flex; }
.mobile-nav a.nav-link {
  padding: 11px 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
}
.mobile-nav a.nav-link:hover { background: var(--paper); color: var(--plum); }
.mobile-nav .btn { margin-top: 8px; }

/* ============================== ANCHOR JUMPS ============================== */
/* --header-h = real height of the sticky header (measured: 77px desktop, 65px tablet, 61px phone).
   Jumped-to sections start right under it; on desktop each fills the screen, centred. */
:root { --header-h: 77px; }
@media (max-width: 900px) { :root { --header-h: 65px; } }
@media (max-width: 640px) { :root { --header-h: 61px; } }

/* 901px = where the site switches to the desktop header (the mobile menu ends at 900px). */
@media (min-width: 901px) {
  #about, #how, #categories, #safety {
    min-height: calc(100vh - var(--header-h));
    min-height: calc(100svh - var(--header-h));
    display: flex; flex-direction: column; justify-content: center;
  }
  #categories .cat-grid, #how .steps { width: 100%; }
  .safety-inner { width: 100%; }
  .safety-inner img { max-height: calc(100vh - var(--header-h) - 120px); object-fit: cover; }
}

/* ============================== IMAGES ============================== */
/* Self-hosted in public/img. Fixed proportions + a soft fill, so a slow or missing
   picture shows as a lavender block instead of an empty beige box. */
.hero-art img, .split img, .safety-inner img {
  height: auto; object-fit: cover; background: var(--lavender-soft);
}
.hero-art img     { aspect-ratio: 870 / 675; }
.split img        { aspect-ratio: 3 / 2; }
.safety-inner img { aspect-ratio: 575 / 700; }

/* ============================== RESPONSIVE ============================== */
/* Desktop (> 900px) looks exactly as before; these only take over below it.
   Fluid header spacing keeps 901-1100px from crowding without changing wider screens. */
img { max-width: 100%; height: auto; }
.site-header { padding: 16px clamp(16px, 3vw, 32px); gap: 16px; }
.main-nav { gap: clamp(14px, 2vw, 22px); }
.hero-kicker { max-width: 100%; }

/* ---------- tablet: <= 900px ---------- */
@media (max-width: 900px) {
  .main-nav, .header-actions { display: none; }
  .nav-toggle { display: flex; }
  .site-header { padding: 12px 20px; }

  .hero { grid-template-columns: 1fr; gap: 32px; padding: 44px 24px 36px; }
  .hero > div:first-child { max-width: 640px; }
  .hero-art { max-width: 620px; width: 100%; margin: 0 auto; }

  .stats-inner { grid-template-columns: repeat(2, 1fr); gap: 22px 18px; }

  .section { padding: 52px 24px; }
  .split, .safety-inner { grid-template-columns: 1fr; gap: 32px; }
  .split.reverse > .split-media { order: 0; }
  .split-media, .safety-inner > img { max-width: 620px; width: 100%; margin: 0 auto; }

  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .safety-inner { padding: 48px 24px; }
}

/* ---------- small tablet: <= 768px ---------- */
@media (max-width: 768px) {
  .steps { grid-template-columns: 1fr; }
  .section-head br, .section > br { display: none; }   /* the spacer <br>s are far too tall on small screens */
  .safety-inner > img { max-width: 420px; }            /* portrait picture: don't let it fill a tablet screen */
  .section-head { margin-bottom: 26px; }
  .cta-band { padding: 48px 20px; }
  .cta-card { padding: 40px 28px; border-radius: 22px; }
}

/* ---------- mobile: <= 640px ---------- */
@media (max-width: 640px) {
  body { font-size: 14.5px; }
  .site-header { padding: 10px 16px; }
  .site-header .brand { font-size: 17px; }

  .hero { padding: 32px 16px 28px; gap: 26px; }
  .hero h1 { font-size: clamp(28px, 8vw, 38px); }
  .hero-sub { font-size: 15px; }
  .hero-kicker { font-size: 10.5px; letter-spacing: 0.04em; }
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { width: 100%; }
  .hero-art img { border-radius: 18px; }

  .stats-inner { padding: 22px 16px; gap: 18px 12px; }
  .stat b { font-size: 22px; }

  .section { padding: 40px 16px; }
  .split { gap: 26px; }
  .pillar .dot { width: 36px; height: 36px; font-size: 16px; }

  .step-card, .cat-card { padding: 20px; }
  .cat-grid { grid-template-columns: 1fr; }

  .safety-inner { padding: 40px 16px; gap: 26px; }

  .cta-band { padding: 40px 16px; }
  .cta-card { padding: 32px 20px; }
  .cta-actions { flex-direction: column; }
  .cta-actions .btn { width: 100%; }

  .footer-inner { padding: 28px 16px; flex-direction: column; align-items: flex-start; gap: 14px; }
  .footer-links { flex-wrap: wrap; gap: 10px 18px; }
}

/* ---------- very small phones: <= 360px ---------- */
@media (max-width: 360px) {
  .site-header .brand { font-size: 15.5px; gap: 7px; }
  .brand-glow { width: 22px; height: 22px; }
  .btn.big { padding: 13px 18px; font-size: 14px; }
  .stat span { font-size: 11px; }
}
:root { --header-h: 77px; }
html { scroll-padding-top: var(--header-h); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media (max-width: 860px) {
  :root { --header-h: 65px; }
  body { background-attachment: scroll; }
  .section { padding-top: 40px; padding-bottom: 40px; }
  .safety-inner { padding: 36px 24px; gap: 28px; }
  .safety-inner img { max-height: 70svh; width: auto; max-width: 100%; justify-self: center; object-fit: cover; }
}
@media (min-width: 861px) and (min-height: 560px) {
  .first-screen { min-height: calc(100vh - var(--header-h)); min-height: calc(100svh - var(--header-h)); display: flex; flex-direction: column; }
  .first-screen .hero { flex: 1; width: 100%; padding-top: clamp(16px, 4vh, 56px); padding-bottom: clamp(16px, 3vh, 40px); }
  .first-screen .hero-art img { max-height: calc(100svh - var(--header-h) - 113px - 80px); object-fit: cover; }
  #about, #how, #categories, #safety { min-height: calc(100vh - var(--header-h)); min-height: calc(100svh - var(--header-h)); display: flex; flex-direction: column; justify-content: center; }
  #about, #how, #categories { width: 100%; padding-top: clamp(24px, 5vh, 64px); padding-bottom: clamp(24px, 5vh, 64px); }
  .safety-inner { width: 100%; padding-top: clamp(16px, 4vh, 56px); padding-bottom: clamp(16px, 4vh, 56px); }
  .safety-inner img { width: auto; max-width: 100%; justify-self: center; max-height: calc(100svh - var(--header-h) - 2 * clamp(16px, 4vh, 56px)); }
}/* --header-h must equal the real header: mobile header runs to 900px, and is 61px on phones. */
@media (min-width: 861px) and (max-width: 900px) { :root { --header-h: 65px; } }
@media (max-width: 640px) { :root { --header-h: 61px; } }

/* ============================== ILLUSTRATIONS (public/img/*.svg) ============================== */
.how-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.how-head .section-head { flex: 1; }
.voices-art { width: clamp(150px, 18vw, 220px); height: auto; aspect-ratio: 320 / 220; border-radius: 20px; margin-bottom: 34px; flex-shrink: 0; }
.step-art {
  display: block; width: 100%; height: auto; aspect-ratio: 320 / 200; max-height: 150px; object-fit: cover;
  border-radius: 14px; margin-bottom: 16px; background: var(--lavender-soft);
}
.lanes-art { display: block; width: 100%; height: auto; aspect-ratio: 1080 / 180; border-radius: 20px; margin-bottom: 26px; background: var(--bg-fcefd8); }
.cta-card { position: relative; overflow: hidden; isolation: isolate; }
.cta-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; pointer-events: none; }
@media (max-width: 640px) {
  .how-head { flex-direction: column; align-items: flex-start; gap: 0; }
  .voices-art { width: 160px; margin: 0 0 20px; }
  .lanes-art { margin-bottom: 20px; border-radius: 14px; }
}
