/* ==========================================================================
   Spina Bifida Association — Next-gen site
   Design tokens
   ========================================================================== */
:root {
  --teal: #1594a1;
  --teal-dark: #0f6f79;
  --teal-600: #12808c;
  --blue-100: #d9efff;
  --blue-200: #cce1ff;
  --blue-300: #99bbff;
  --accent: #66e8e8;
  --ink: #10262b;
  --ink-soft: #3f5157;
  --muted: #6b7c82;
  --line: #e3ebee;
  --bg: #ffffff;
  --bg-soft: #f4f9fb;
  --bg-tint: #eef7f9;
  --white: #fff;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 28px;
  --shadow-sm: 0 2px 8px rgba(16, 38, 43, .06);
  --shadow: 0 12px 32px rgba(16, 38, 43, .10);
  --shadow-lg: 0 24px 60px rgba(16, 38, 43, .16);
  --maxw: 1200px;
  --gap: clamp(1rem, 3vw, 2.25rem);
  --font-body: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-head: "Libre Baskerville", Georgia, "Times New Roman", serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--ink); line-height: 1.2; font-weight: 700; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2.2vw, 1.5rem); }
p { margin: 0 0 1rem; }
ul, ol { margin: 0 0 1rem; padding-left: 1.25rem; }
li { margin-bottom: .4rem; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2rem); }
.section { padding-block: clamp(3rem, 7vw, 6rem); }
.section--soft { background: var(--bg-soft); }
.section--tint { background: var(--bg-tint); }
.section-head { max-width: 760px; margin-bottom: 2.5rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.eyebrow { display: inline-block; font-family: var(--font-body); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; font-size: .8rem; color: var(--teal); margin-bottom: .75rem; }
.lead { font-size: 1.18rem; color: var(--ink-soft); }
.title-rule { width: 64px; height: 5px; border-radius: 4px; background: var(--accent); margin: 1rem 0 0; }
.center .title-rule { margin-inline: auto; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; font-family: var(--font-body); border-radius: 999px; padding: .8rem 1.6rem; border: 2px solid transparent; cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease; text-decoration: none; font-size: 1rem; }
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary { background: var(--teal); color: #fff; box-shadow: 0 8px 20px rgba(21,148,161,.35); }
.btn-primary:hover { background: var(--teal-dark); color: #fff; }
.btn-ghost { background: transparent; color: var(--teal-dark); border-color: var(--teal); }
.btn-ghost:hover { background: var(--teal); color: #fff; }
.btn-light { background: #fff; color: var(--teal-dark); }
.btn-light:hover { background: var(--blue-100); color: var(--teal-dark); }
.btn-lg { padding: 1rem 2rem; font-size: 1.05rem; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.92); backdrop-filter: saturate(180%) blur(10px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 1.5rem; min-height: 76px; }
.brand { display: flex; align-items: center; gap: .65rem; margin-right: auto; }
.brand svg, .brand img { height: 46px; width: auto; }
.nav { display: flex; align-items: center; gap: .35rem; }
.nav a { color: var(--ink); font-weight: 600; font-size: .98rem; padding: .55rem .8rem; border-radius: 8px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--teal-dark); background: var(--bg-tint); text-decoration: none; }
.header-cta { display: flex; align-items: center; gap: .5rem; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: .5rem; }
.nav-toggle span { display: block; width: 26px; height: 3px; border-radius: 2px; background: var(--ink); margin: 5px 0; transition: .25s; }

@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .nav { position: fixed; inset: 76px 0 auto 0; flex-direction: column; align-items: stretch; background: #fff; padding: 1rem clamp(1rem,4vw,2rem) 1.5rem; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); transform: translateY(-140%); transition: transform .3s ease; gap: .15rem; }
  .nav.open { transform: translateY(0); }
  .nav a { padding: .85rem .6rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .header-cta .btn-ghost { display: none; }
}

/* ---------- Hero ---------- */
.hero { position: relative; background: linear-gradient(135deg, var(--bg-tint), var(--blue-100)); overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; padding-block: clamp(3rem, 6vw, 5.5rem); }
.hero h1 { margin-bottom: 1rem; }
.hero .lead { max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 1.75rem; }
.hero-media { position: relative; }
.hero-media img { border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); width: 100%; object-fit: cover; aspect-ratio: 4/3; }
.hero-badge { position: absolute; left: -12px; bottom: -18px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem 1.25rem; display: flex; align-items: center; gap: .75rem; max-width: 260px; }
.hero-badge strong { font-family: var(--font-head); font-size: 1.6rem; color: var(--teal-dark); display: block; line-height: 1; }
.hero-badge span { font-size: .85rem; color: var(--muted); }
.blob { position: absolute; border-radius: 50%; filter: blur(0); opacity: .5; }
.blob-1 { width: 380px; height: 380px; background: var(--accent); top: -160px; right: -120px; opacity: .25; }
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; text-align: left; }
  .hero-media { order: -1; }
  .hero-badge { max-width: 220px; }
}

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); }
.stat { text-align: center; padding: 1.5rem 1rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.stat strong { display: block; font-family: var(--font-head); font-size: clamp(1.8rem, 3.5vw, 2.6rem); color: var(--teal-dark); line-height: 1; margin-bottom: .35rem; }
.stat span { font-size: .95rem; color: var(--muted); }
@media (max-width: 720px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Cards / priorities ---------- */
.grid { display: grid; gap: var(--gap); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 980px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.75rem; box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease; height: 100%; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card h3 { margin-bottom: .5rem; }
.card p { color: var(--ink-soft); margin-bottom: 0; font-size: .97rem; }
.card-icon { width: 56px; height: 56px; border-radius: 14px; background: var(--bg-tint); display: grid; place-items: center; margin-bottom: 1rem; }
.card-icon img { width: 34px; height: 34px; }
.card-link { display: inline-flex; align-items: center; gap: .35rem; margin-top: 1rem; font-weight: 700; color: var(--teal-dark); }
.card-link::after { content: "→"; transition: transform .2s ease; }
.card:hover .card-link::after { transform: translateX(4px); }

/* ---------- Feature split ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem,4vw,3.5rem); align-items: center; }
.split.reverse .split-media { order: 2; }
.split-media img { border-radius: var(--radius-lg); box-shadow: var(--shadow); aspect-ratio: 5/4; object-fit: cover; width: 100%; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } .split.reverse .split-media { order: 0; } }

/* ---------- Life stages ---------- */
.stage-list { display: grid; grid-template-columns: repeat(2,1fr); gap: 1rem; }
@media (max-width: 640px){ .stage-list { grid-template-columns: 1fr; } }
.stage { display: flex; gap: 1rem; align-items: flex-start; padding: 1.1rem 1.25rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.stage .n { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%; background: var(--teal); color: #fff; font-weight: 700; display: grid; place-items: center; font-family: var(--font-head); }
.stage h4 { margin: 0 0 .2rem; font-family: var(--font-body); font-size: 1.05rem; }
.stage p { margin: 0; font-size: .9rem; color: var(--muted); }

/* ---------- CTA band ---------- */
.cta-band { background: linear-gradient(135deg, var(--teal), var(--teal-dark)); color: #fff; border-radius: var(--radius-lg); padding: clamp(2rem,5vw,3.5rem); display: grid; grid-template-columns: 1.4fr auto; align-items: center; gap: 2rem; }
.cta-band h2, .cta-band p { color: #fff; }
.cta-band p { margin: 0; opacity: .92; }
@media (max-width: 720px){ .cta-band { grid-template-columns: 1fr; text-align: left; } }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { background: linear-gradient(135deg, var(--bg-tint), var(--blue-100)); padding-block: clamp(2.5rem, 5vw, 4rem); }
.breadcrumb { font-size: .85rem; color: var(--muted); margin-bottom: .75rem; }
.breadcrumb a { color: var(--muted); }
.page-hero h1 { margin-bottom: .5rem; }
.page-hero .lead { max-width: 60ch; }

/* ---------- Prose ---------- */
.prose { max-width: 760px; }
.prose h2 { margin-top: 2.5rem; }
.prose h3 { margin-top: 1.75rem; }
.prose ul li { color: var(--ink-soft); }
.callout { background: var(--bg-tint); border-left: 4px solid var(--teal); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 1.25rem 1.5rem; margin: 1.5rem 0; }
.callout p:last-child { margin-bottom: 0; }

/* Info cards (types, services) */
.info { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow-sm); }
.info h3 { color: var(--teal-dark); margin-bottom: .5rem; }
.info p { margin-bottom: 0; color: var(--ink-soft); font-size: .96rem; }
a.info { display: block; text-decoration: none; transition: transform .2s ease, box-shadow .2s ease; }
a.info:hover { transform: translateY(-4px); box-shadow: var(--shadow); text-decoration: none; }
a.info h3::after { content: " →"; color: var(--teal); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
@media (max-width: 820px){ .contact-grid { grid-template-columns: 1fr; } }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 600; margin-bottom: .35rem; font-size: .95rem; }
.field input, .field textarea, .field select { width: 100%; padding: .8rem .9rem; border: 1px solid var(--line); border-radius: var(--radius-sm); font: inherit; background: #fff; }
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid var(--teal); border-color: var(--teal); }
.contact-detail { display: flex; gap: .85rem; align-items: flex-start; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.contact-detail svg { flex: 0 0 auto; width: 24px; height: 24px; color: var(--teal); }
.contact-detail strong { display: block; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #c7d4d8; padding-block: 3.5rem 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 2rem; }
.site-footer h4 { color: #fff; font-family: var(--font-body); font-size: 1rem; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 1rem; }
.site-footer a { color: #c7d4d8; }
.site-footer a:hover { color: #fff; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: .55rem; }
.footer-logo img { height: 54px; width: auto; filter: brightness(0) invert(1); }
.footer-about { max-width: 34ch; font-size: .95rem; margin-top: 1rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 2.5rem; padding-top: 1.5rem; display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; font-size: .85rem; color: #93a4a9; }
@media (max-width: 820px){ .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px){ .footer-grid { grid-template-columns: 1fr; } }

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

.skip-link { position: absolute; left: -999px; top: 0; background: var(--teal); color: #fff; padding: .6rem 1rem; z-index: 200; border-radius: 0 0 8px 0; }
.skip-link:focus { left: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
