/* ==========================================================================
   Wapan Health — "First Light" design system
   Fonts: Fraunces (display) + DM Sans (body/UI)
   Palette: Dawn #F2A23A · Plum #1F3B63 · Ember #CC4A22 · Sage #94A687
            Mist #F1EBE2 · Earth #18222F
   ========================================================================== */

:root {
  --dawn: #F2A23A;
  --dawn-soft: #E2DDD4;
  --dawn-faint: #F1EBE2;
  --plum: #1F3B63;
  --plum-soft: #2C4D7A;
  --ember: #CC4A22;
  --ember-dark: #B33E1B;
  --sage: #94A687;
  --sage-faint: #E7ECE2;
  --mist: #F1EBE2;
  --mist-light: #FAF8F4;
  --earth: #18222F;
  --earth-soft: #586273;
  --white: #FFFFFF;
  --peach: #F1EBE2;
  --peach-nav: #FAF8F4;
  --line: #E2DDD4;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 2px 24px rgba(42, 33, 27, 0.08);
  --font-display: "Lora", Georgia, serif;
  --font-body: "Public Sans", -apple-system, "Segoe UI", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--earth);
  background: var(--mist-light);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--plum);
  line-height: 1.15;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.35rem; line-height: 1.3; }

p { color: var(--earth-soft); }
a { color: var(--ember); }
strong { color: var(--earth); }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 780px; margin: 0 auto; padding: 0 24px; }

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #CC4A22;
  margin-bottom: 14px;
}

/* --- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--ember); color: var(--white); }
.btn-primary:hover { background: var(--ember-dark); }
.btn-ghost { background: transparent; color: var(--plum); border-color: var(--plum); }
.btn-ghost:hover { background: var(--plum); color: var(--white); }
.btn-soft { background: var(--dawn-faint); color: var(--plum); }
.btn-soft:hover { background: var(--dawn-soft); }
.btn-sm { padding: 9px 18px; font-size: 0.9rem; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; }

/* --- Topbar -------------------------------------------------------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--plum);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--plum);
  font-family: var(--font-display);
  font-size: 1.3rem;
  letter-spacing: 0.01em;
}
.logo small {
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--ember);
  align-self: flex-end;
  margin-bottom: 4px;
}
.nav { display: flex; align-items: center; gap: 26px; }
.nav a {
  color: rgba(250, 249, 246, 0.85);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}
.nav a:hover, .nav a[aria-current="page"] { color: #FFFFFF; }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.crisis-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--plum);
  background: var(--dawn-faint);
  border: 1px solid var(--dawn-soft);
  border-radius: 999px;
  padding: 7px 14px;
  text-decoration: none;
}
.crisis-pill:hover { background: var(--dawn-soft); }
.crisis-pill { white-space: nowrap; }
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--plum);
}

/* --- Sections ------------------------------------------------------------ */
.section { padding: 84px 0; }
.section-alt { background: var(--mist); }
.section-plum { background: var(--plum); }
.section-plum h2, .section-plum h3 { color: var(--mist-light); }
.section-plum p { color: rgba(245, 235, 217, 0.82); }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* --- Cards & grids -------------------------------------------------------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow);
}
.card h3 { margin-bottom: 10px; }
.card p { font-size: 0.98rem; }
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--dawn-faint);
  color: var(--ember);
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin-bottom: 18px;
}

.chip-row { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--plum);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
}
.chip::before { content: "✓"; color: var(--sage); font-weight: 700; }

/* --- FAQ accordion --------------------------------------------------------- */
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  background: none;
  border: none;
  text-align: left;
  padding: 22px 4px;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--plum);
}
.faq-q::after { content: "+"; font-size: 1.5rem; color: var(--ember); transition: transform 0.2s; flex-shrink: 0; }
.faq-item.open .faq-q::after { transform: rotate(45deg); }
.faq-a { display: none; padding: 0 4px 24px; max-width: 640px; }
.faq-item.open .faq-a { display: block; }

/* --- Crisis strip ---------------------------------------------------------- */
.crisis-strip {
  background: var(--dawn-faint);
  border: 1px solid var(--dawn-soft);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
}
.crisis-lines { display: flex; flex-wrap: wrap; gap: 12px; }
.crisis-line {
  background: var(--white);
  border-radius: var(--radius);
  padding: 12px 18px;
  font-size: 0.92rem;
}
.crisis-line strong { display: block; color: var(--plum); }
.crisis-line a { font-weight: 700; text-decoration: none; }

/* --- Footer ----------------------------------------------------------------- */
.footer {
  background: var(--plum);
  color: rgba(245, 235, 217, 0.85);
  padding: 64px 0 32px;
  margin-top: 0;
}
.footer a { color: var(--dawn-soft); text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(245, 235, 217, 0.18);
}
.footer h4 {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dawn);
  margin-bottom: 14px;
}
.footer ul { list-style: none; }
.footer li { margin-bottom: 9px; font-size: 0.95rem; }
.footer-name-story {
  font-size: 0.95rem;
  line-height: 1.7;
  max-width: 420px;
}
.footer-name-story .cree { font-family: var(--font-display); font-size: 1.15rem; color: var(--mist-light); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-top: 28px;
  font-size: 0.85rem;
  color: rgba(245, 235, 217, 0.6);
}

/* --- Forms (shared) ----------------------------------------------------------- */
label { display: block; font-weight: 600; color: var(--plum); margin-bottom: 7px; font-size: 0.97rem; }
.hint { font-size: 0.87rem; color: var(--earth-soft); margin: -2px 0 10px; font-weight: 400; }
input[type="text"], input[type="email"], input[type="tel"], select, textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--earth);
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 13px 16px;
  transition: border-color 0.15s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--dawn);
  box-shadow: 0 0 0 3px var(--dawn-faint);
}
textarea { resize: vertical; min-height: 120px; }
.field { margin-bottom: 22px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.choice-group { display: flex; flex-direction: column; gap: 10px; }
.choice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  font-weight: 400;
}
.choice:hover { border-color: var(--dawn-soft); }
.choice input { margin-top: 4px; accent-color: var(--ember); width: 17px; height: 17px; flex-shrink: 0; }
.choice.selected { border-color: var(--dawn); background: var(--dawn-faint); }
.choice .choice-label { font-weight: 600; color: var(--plum); display: block; }
.choice .choice-sub { font-size: 0.86rem; color: var(--earth-soft); display: block; margin-top: 2px; }

/* --- Responsive ------------------------------------------------------------------ */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--mist-light);
    border-bottom: 1px solid var(--line);
    padding: 12px 24px 20px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; width: 100%; }
  .menu-toggle { display: block; }
  .topbar-inner { gap: 10px; }
  .nav-actions { gap: 8px; }
  .nav-actions .btn { display: none; } /* page CTAs remain; topbar stays uncrowded */
  .crisis-pill { font-size: 0.78rem; padding: 6px 10px; }
}

/* Narrower than any common phone — let the topbar wrap rather than overflow */
@media (max-width: 359px) {
  .topbar-inner { flex-wrap: wrap; justify-content: center; row-gap: 4px; }
  .section { padding: 56px 0; }
  .field-row { grid-template-columns: 1fr; }
}

/* Figma redesign chrome */
.logo img { width: clamp(150px, 22vw, 200px); height: auto; display: block; }
.logo--footer img { width: clamp(190px, 26vw, 250px); }

/* Colour-audit fixes */
.menu-toggle { color: #FAF8F4; }
.footer-name-story, .footer p { color: rgba(250, 249, 246, 0.82); }
.footer h4 { color: #F2A23A; }
.crisis-hero .eyebrow { color: #F2A23A !important; }
a { color: #B33E1B; }
.line-tag, .line__num { color: #B33E1B; }

/* --- Topbar parity with the figma.css .nav (legacy pages share one header look) --- */
.topbar { position: relative; min-height: 88px; display: flex; align-items: center; }
.topbar .topbar-inner { width: 100%; max-width: 1440px; margin: 0 auto; padding: 14px clamp(20px, 5vw, 60px); gap: 24px; }
.topbar .logo img { width: clamp(170px, 32vw, 275px); }
.topbar .nav { gap: 26px; }
.topbar .nav a { font-size: 16px; font-weight: 500; line-height: 25px; white-space: nowrap; color: rgba(250, 249, 246, 0.85); }
.topbar .nav a:hover { color: #FFFFFF; }
.topbar .nav-actions { gap: 24px; }
.topbar .crisis-pill { background: none; border: 0; border-radius: 0; padding: 0; font-size: 16px; font-weight: 500; line-height: 25px; color: rgba(250, 249, 246, 0.85); }
.topbar .crisis-pill:hover { background: none; color: #FFFFFF; }
.topbar .nav-actions .btn-primary { height: 51px; padding: 10px 24px; border: 0; border-radius: 32px; font-size: 17px; font-weight: 600; white-space: nowrap; display: inline-flex; align-items: center; }
@media (max-width: 1179px) {
  .topbar .nav { gap: 18px; }
  .topbar .nav a, .topbar .crisis-pill { font-size: 15px; }
}
@media (max-width: 900px) {
  .topbar { min-height: 0; }
  .topbar .crisis-pill { color: rgb(255, 178, 77); font-weight: 600; }
}
