/* =========================================================
   Before Design System
   Single source of truth for all Before pages.
   Import this on every page — do not duplicate styles inline.
   ========================================================= */

/* ── FONTS ── */
/* Google Fonts loaded via <link> in each HTML page — no @import needed.
   Removing @import avoids render-blocking double-fetch on mobile. */

/* ── CUSTOM PROPERTIES ── */
:root {
  /* Colors */
  --cream:           #FAF7F2;
  --white:           #FFFFFF;
  --blush:           #E8A5B5;
  --blush-light:     #F0BCC9;
  --blush-deep:      #C2185B;
  --blush-pale:      #FFF0F5;
  --rose:            #F0BCC9;
  --sage:            #2d5a3d;
  --dark:            #1a1a1a;
  --text:            #2a2a2a;
  --text-light:      #666666;
  --warm-gray:       #7a6b66;
  --mid-gray:        #b0a39e;
  --light-gray:      #e8ddd9;
  --border:          #F0EBE3;
  --border-strong:   #d4c9c3;

  /* Typography */
  --serif:   'DM Serif Display', Georgia, serif;
  --sans:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --grotesk: 'Space Grotesk', var(--sans);

  /* Spacing */
  --space-xs:  8px;
  --space-sm:  12px;
  --space-md:  20px;
  --space-lg:  32px;
  --space-xl:  48px;
  --space-2xl: 64px;

  /* Radius & shadow */
  --radius-sm:  6px;
  --radius:     8px;
  --radius-lg:  12px;
  --radius-xl:  16px;
  --radius-pill: 24px;

  --shadow:     0 2px 8px rgba(232, 165, 181, 0.10);
  --shadow-md:  0 4px 16px rgba(232, 165, 181, 0.18);
  --shadow-lg:  0 4px 24px rgba(74, 44, 82, 0.10);

  /* Layout */
  --max-width:  600px;
  --max-width-lg: 1200px;
}

/* ── RESET ── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--sans);
  background: var(--cream);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── CRISIS BANNER ── */
.crisis-banner {
  background: var(--dark);
  padding: 10px 16px;
  text-align: center;
}
.crisis-banner p {
  font-size: 12px;
  font-weight: 400;
  color: rgba(255,255,255,0.9);
  line-height: 1.4;
}
.crisis-banner a {
  color: white;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.4);
}

/* ── HEADER / NAV ── */
.before-header {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 200;
}
.before-header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

/* Logo */
.before-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.before-logo-mark {
  width: 32px;
  height: 32px;
  background: var(--blush);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}
.before-logo:hover .before-logo-mark {
  transform: translateY(-1px);
}
.before-logo-mark svg {
  width: 18px;
  height: 18px;
  fill: white;
}
.before-logo-name {
  font-family: var(--grotesk);
  font-size: 18px;
  color: var(--text);
  letter-spacing: -0.3px;
  font-weight: 500;
  line-height: 1;
}

/* Header nav pill buttons */
.before-header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}
.before-nav-btn {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-light);
  text-decoration: none;
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  transition: all 0.2s ease;
  white-space: nowrap;
}
.before-nav-btn:hover {
  color: var(--text);
  border-color: var(--blush-light);
  background: rgba(232, 165, 181, 0.06);
}
.before-nav-btn.cta {
  background: var(--blush);
  color: white;
  border-color: var(--blush);
}
.before-nav-btn.cta:hover {
  background: #d98ba1;
  border-color: #d98ba1;
}

/* ── SHARED COMPONENT CLASSES ── */

/* Card */
.before-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

/* Buttons */
.before-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 28px;
  background: var(--blush);
  color: white;
  border: none;
  border-radius: var(--radius-pill);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 4px 16px rgba(232, 165, 181, 0.40);
  min-height: 48px;
}
.before-btn-primary:hover {
  background: #D4919D;
  box-shadow: 0 6px 20px rgba(232, 165, 181, 0.50);
  transform: translateY(-1px);
}

.before-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 28px;
  background: var(--white);
  color: var(--blush);
  border: 1.5px solid var(--blush);
  border-radius: var(--radius-pill);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  min-height: 48px;
}
.before-btn-secondary:hover {
  background: var(--blush-pale);
}

/* Full-width button variant */
.before-btn-full {
  width: 100%;
  max-width: 360px;
  font-size: 16px;
  padding: 16px 24px;
}

/* Input fields */
.before-input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--sans);
  font-size: 15px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
}
.before-input:focus {
  border-color: var(--blush);
  box-shadow: 0 0 0 3px rgba(232, 165, 181, 0.15);
}

/* Section wrapper */
.before-section {
  padding: 64px 24px;
  max-width: var(--max-width-lg);
  margin: 0 auto;
}
.before-section--tight {
  padding: 40px 24px;
}
.before-section--wide {
  max-width: 800px;
}

/* ── TYPOGRAPHY ── */
h1, h2, h3 {
  font-family: var(--serif);
  color: var(--dark);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(28px, 6vw, 42px); }
h2 { font-size: clamp(24px, 4vw, 36px); }
h3 { font-size: 18px; }

p, li {
  font-family: var(--sans);
  font-size: 16px;
  color: var(--text-light);
  line-height: 1.65;
}

/* ── PROGRESS BAR ── */
.before-progress-wrap {
  padding: 16px 0 0;
}
.before-progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.before-progress-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--blush);
  letter-spacing: 1.4px;
  text-transform: uppercase;
}
.before-progress-fraction {
  font-size: 11px;
  color: var(--mid-gray);
  font-weight: 500;
}
.before-progress-bar {
  height: 5px;
  background: rgba(212, 196, 200, 0.35);
  border-radius: 3px;
  overflow: hidden;
}
.before-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blush-light), var(--blush));
  border-radius: 3px;
  transition: width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ── QUIZ / ANSWER OPTIONS ── */
.before-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}
.before-option {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 12px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  text-align: center;
  transition: all 0.18s ease;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.before-option:hover {
  border-color: var(--blush);
  background: var(--blush-pale);
  color: var(--dark);
}
.before-option.selected {
  background: var(--blush);
  border-color: var(--blush);
  color: white;
}
.before-option:active {
  transform: scale(0.98);
}

/* Single-column option variant (for longer text) */
.before-options--stack .before-option {
  grid-template-columns: 1fr;
}

/* ── TRUST SIGNAL STRIP ── */
.before-trust {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}
.before-trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--text-light);
  font-weight: 500;
}
.before-trust-item::before {
  content: '✓';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  background: rgba(232, 165, 181, 0.12);
  color: var(--blush);
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
}

/* ── FOOTER ── */
.before-footer {
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 40px 24px;
  text-align: center;
}
.before-footer-logo {
  font-family: var(--grotesk);
  font-size: 18px;
  color: var(--text);
  font-weight: 500;
  margin-bottom: 20px;
  display: block;
}
.before-footer-links {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.before-footer-links a {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--text-light);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}
.before-footer-links a:hover { color: var(--blush); }
.before-footer-disclaimer {
  font-family: var(--sans);
  font-size: 11px;
  color: var(--mid-gray);
  line-height: 1.6;
  max-width: 520px;
  margin: 0 auto;
}

/* ── MOBILE RESPONSIVE ── */
@media (max-width: 600px) {
  .before-section {
    padding: 48px 20px;
  }
  .before-section--tight {
    padding: 32px 20px;
  }

  h1 { font-size: 28px; }
  h2 { font-size: 24px; }
  p, li { font-size: 15px; }

  .before-btn-primary,
  .before-btn-secondary {
    display: block;
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
  }

  .before-options {
    grid-template-columns: 1fr;
  }

  .before-header-nav .before-nav-btn {
    font-size: 12px;
    padding: 6px 12px;
  }
}

@media (max-width: 400px) {
  .before-header {
    padding: 0 16px;
  }
  .before-header-inner {
    height: 52px;
  }
}

/* ================================================================
   SITE-WIDE STICKY NAVIGATION
   Used by every page. Replace old per-page .header blocks with this.
   ================================================================ */

.site-header {
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 200;
}
.site-header-inner {
  max-width: var(--max-width-lg);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  gap: 16px;
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.site-logo-mark {
  width: 30px;
  height: 30px;
  background: var(--blush);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}
.site-logo:hover .site-logo-mark { transform: translateY(-1px); }
.site-logo-mark svg { width: 17px; height: 17px; fill: white; }
.site-logo-name {
  font-family: var(--grotesk);
  font-size: 18px;
  color: var(--text);
  font-weight: 500;
  letter-spacing: -0.3px;
}

/* Desktop nav links */
.site-nav-desktop {
  display: flex;
  align-items: center;
  gap: 2px;
}
.site-nav-desktop a {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-light);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: var(--radius);
  transition: all 0.2s;
  white-space: nowrap;
}
.site-nav-desktop a:hover {
  color: var(--text);
  background: rgba(232, 165, 181, 0.08);
}
.site-nav-desktop a.site-nav-active {
  color: var(--blush-deep);
  font-weight: 600;
}
.site-nav-desktop .site-nav-cta {
  background: var(--blush);
  color: white !important;
  font-weight: 600;
  margin-left: 8px;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
}
.site-nav-desktop .site-nav-cta:hover {
  background: #d98ba1;
}
/* "Tell us what happened" nav item with sublabel */
.site-nav-desktop a.site-nav-log {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 4px 12px;
  white-space: nowrap;
}
.site-nav-desktop a.site-nav-log .site-nav-sub {
  font-size: 10px;
  font-weight: 400;
  color: var(--mid-gray);
  margin-top: 1px;
  white-space: nowrap;
}
.site-nav-desktop a.site-nav-log:hover .site-nav-sub {
  color: var(--text-light);
}
/* Mobile sublabel */
.site-nav-mobile a.site-nav-log {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.site-nav-mobile a.site-nav-log .site-nav-sub {
  font-size: 12px;
  font-weight: 400;
  color: var(--mid-gray);
  margin-top: 2px;
}

/* Hamburger button (hidden on desktop) */
.site-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius);
  transition: background 0.2s;
}
.site-hamburger:hover { background: rgba(232, 165, 181, 0.08); }
.site-hamburger span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  width: 100%;
  transition: all 0.3s ease;
}
.site-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-hamburger.open span:nth-child(2) { opacity: 0; }
.site-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav fullscreen overlay */
.site-nav-mobile {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--white);
  z-index: 300;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 20px;
}
.site-nav-mobile.open { display: flex; }
.site-nav-mobile-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 22px;
  color: var(--text);
  border-radius: var(--radius);
  transition: background 0.2s;
}
.site-nav-mobile-close:hover { background: rgba(232, 165, 181, 0.08); }
.site-nav-mobile a {
  font-family: var(--sans);
  font-size: 17px;
  color: var(--text);
  text-decoration: none;
  padding: 13px 32px;
  border-radius: var(--radius);
  transition: all 0.2s;
  width: 100%;
  text-align: center;
  max-width: 320px;
}
.site-nav-mobile a:hover {
  background: rgba(232, 165, 181, 0.08);
  color: var(--blush-deep);
}
.site-nav-mobile a.site-nav-active {
  color: var(--blush-deep);
  font-weight: 600;
}
.site-nav-mobile .site-nav-mobile-cta {
  background: var(--blush);
  color: white !important;
  font-weight: 600;
  margin-top: 16px;
  padding: 14px 32px;
  border-radius: var(--radius-pill);
  width: auto;
}
.site-nav-mobile .site-nav-mobile-cta:hover { background: #d98ba1; }

/* Responsive breakpoint — show hamburger */
@media (max-width: 860px) {
  .site-nav-desktop { display: none; }
  .site-hamburger { display: flex; }
}
@media (max-width: 480px) {
  .site-header { padding: 0 16px; }
  .site-logo-name { font-size: 16px; }
}
@media print {
  .site-header, .site-nav-mobile { display: none !important; }
}