/* ============================================================
   Glow With Heather — Shared Design System
   Luxury-femme wellness brand for women 40+. Lavender identity.
   ============================================================ */

/* ---------- Design Tokens ---------- */
:root {
  /* Brand palette */
  --lavender: #9D8CD6;
  --lavender-deep: #7C68C4;
  --plum: #43355F;
  --lilac-mist: #F6F3FB;
  --ink: #221C33;
  --glow-gold: #C9A227;
  --live-red: #E5484D;
  --white: #FFFFFF;
  --muted: #6B6480;
  --line: #E6E0F2;

  /* Typography */
  --font-display: "Cormorant Garamond", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Spacing scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;

  /* Radius & shadow */
  --radius: 16px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --shadow-soft: 0 2px 8px rgba(67,53,95,0.06), 0 8px 24px rgba(67,53,95,0.08);
  --shadow-lift: 0 4px 12px rgba(67,53,95,0.10), 0 16px 40px rgba(67,53,95,0.12);

  /* The Glow — soft radial lavender-to-gold (used in exactly 3 places) */
  --glow-radial: radial-gradient(circle at 50% 40%, rgba(201,162,39,0.28) 0%, rgba(157,140,214,0.30) 35%, rgba(246,243,251,0) 72%);
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--lilac-mist);
  line-height: 1.6;
  font-size: 17px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--lavender-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { font-family: var(--font-display); color: var(--plum); line-height: 1.15; font-weight: 600; margin: 0 0 var(--space-4); }
h1 { font-size: clamp(2rem, 7vw, 3.25rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 5vw, 2.25rem); }
h3 { font-size: clamp(1.15rem, 4vw, 1.5rem); }
p { margin: 0 0 var(--space-4); }

/* Visible keyboard focus */
:focus-visible { outline: 3px solid var(--lavender-deep); outline-offset: 2px; border-radius: 4px; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 var(--space-5); }
.section { padding: var(--space-7) 0; }
.center { text-align: center; }

/* Answer block: a normal paragraph that opens each page */
.answer-block { font-size: 1.125rem; color: var(--ink); max-width: 65ch; margin: 0 auto var(--space-6); }

/* ---------- Buttons & tap targets ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 48px; padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-pill); border: 0; cursor: pointer;
  font-family: var(--font-body); font-weight: 600; font-size: 1rem;
  text-decoration: none; transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--lavender-deep); color: var(--white); box-shadow: var(--shadow-soft); }
.btn-primary:hover { background: var(--plum); color: var(--white); }
.btn-gold { background: var(--glow-gold); color: var(--ink); box-shadow: var(--shadow-soft); }
.btn-ghost { background: var(--white); color: var(--plum); border: 1px solid var(--line); }
.btn-block { width: 100%; }

/* ---------- Cards ---------- */
.card {
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow-soft); padding: var(--space-5);
}
.grid { display: grid; gap: var(--space-5); }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
@media (min-width: 720px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: var(--space-4); }
.brand { font-family: var(--font-display); font-size: 1.4rem; font-weight: 600; color: var(--plum); white-space: nowrap; }
.brand:hover { text-decoration: none; }
.main-nav { display: none; gap: var(--space-5); }
.main-nav a { color: var(--ink); font-weight: 500; font-size: 0.95rem; }
@media (min-width: 880px) { .main-nav { display: flex; } }

/* Live-aware chip */
.live-chip {
  display: inline-flex; align-items: center; gap: var(--space-2);
  min-height: 40px; padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-pill); font-size: 0.85rem; font-weight: 600;
  background: var(--lilac-mist); color: var(--plum); white-space: nowrap;
}
.live-chip.is-live { background: var(--live-red); color: var(--white); }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--live-red); }
.live-chip.is-live .live-dot { background: var(--white); animation: pulse 1.4s infinite ease-in-out; }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.4; transform: scale(0.7); } }

/* ---------- Sticky mobile bottom bar ---------- */
.mobile-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: flex; background: var(--white); border-top: 1px solid var(--line);
  box-shadow: 0 -4px 16px rgba(67,53,95,0.08);
  transition: transform 0.25s ease; padding-bottom: env(safe-area-inset-bottom);
}
.mobile-bar.hidden { transform: translateY(110%); }
.mobile-bar a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  min-height: 56px; justify-content: center; color: var(--plum);
  font-size: 0.7rem; font-weight: 600; text-decoration: none;
}
.mobile-bar a .ico { font-size: 1.2rem; }
@media (min-width: 880px) { .mobile-bar { display: none; } }
body { padding-bottom: 64px; }
@media (min-width: 880px) { body { padding-bottom: 0; } }

/* ---------- Hero & the Glow ---------- */
.hero { position: relative; text-align: center; padding: var(--space-7) 0 var(--space-6); }
.hero-portrait { position: relative; width: 180px; height: 180px; margin: 0 auto var(--space-5); }
.hero-portrait::before {
  content: ""; position: absolute; inset: -40%; background: var(--glow-radial); z-index: 0;
}
.hero-portrait img {
  position: relative; z-index: 1; width: 180px; height: 180px; border-radius: 50%;
  object-fit: cover; border: 4px solid var(--white); box-shadow: var(--shadow-soft);
}

/* Intent router tiles */
.tiles { display: grid; gap: var(--space-3); max-width: 520px; margin: var(--space-6) auto 0; }
.tile {
  display: flex; align-items: center; gap: var(--space-4); min-height: 64px;
  padding: var(--space-4) var(--space-5); background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow-soft); color: var(--plum); font-weight: 600; font-size: 1.05rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.tile:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.tile .emoji { font-size: 1.5rem; }
.tile .arrow { margin-left: auto; color: var(--lavender); }

/* ---------- Email capture ---------- */
.email-capture { background: var(--plum); color: var(--white); border-radius: var(--radius); padding: var(--space-6); text-align: center; }
.email-capture h2, .email-capture h3 { color: var(--white); }
.email-capture .lead { color: rgba(255,255,255,0.85); margin-bottom: var(--space-5); }
.email-form { display: flex; flex-direction: column; gap: var(--space-3); max-width: 420px; margin: 0 auto; }
.email-form input[type=email] {
  min-height: 48px; padding: var(--space-3) var(--space-4); border-radius: var(--radius-pill);
  border: 0; font-size: 1rem; font-family: var(--font-body);
}
.email-form .microcopy { font-size: 0.8rem; color: rgba(255,255,255,0.7); margin: 0; }

/* ---------- Code chips (/codes) ---------- */
.code-chip {
  display: inline-flex; align-items: center; gap: var(--space-2); min-height: 48px;
  padding: var(--space-3) var(--space-5); border-radius: var(--radius-sm);
  background: var(--lilac-mist); border: 2px dashed var(--lavender);
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-weight: 700; font-size: 1.1rem;
  color: var(--plum); cursor: pointer; width: 100%; justify-content: space-between;
}
.code-chip:hover { background: #efe9fb; }
.code-chip .copy-state { font-size: 0.75rem; color: var(--lavender-deep); font-family: var(--font-body); }
.code-chip.copied { border-color: var(--glow-gold); }
.code-chip.copied .copy-state { color: var(--glow-gold); }

.featured-card { position: relative; overflow: hidden; border: 2px solid var(--glow-gold); }
.featured-card::before { content: ""; position: absolute; inset: -30% -10% auto; height: 200px; background: var(--glow-radial); z-index: 0; pointer-events: none; }
.featured-card > * { position: relative; z-index: 1; }
.badge-featured { display: inline-block; background: var(--glow-gold); color: var(--ink); font-weight: 700; font-size: 0.75rem; padding: var(--space-1) var(--space-3); border-radius: var(--radius-pill); text-transform: uppercase; letter-spacing: 0.04em; }

/* Filter chips */
.filter-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: var(--space-5) 0; }
.filter-chip { min-height: 44px; padding: var(--space-2) var(--space-4); border-radius: var(--radius-pill); border: 1px solid var(--line); background: var(--white); color: var(--plum); font-weight: 600; cursor: pointer; }
.filter-chip.active { background: var(--lavender-deep); color: var(--white); border-color: var(--lavender-deep); }

/* ---------- Badges / proof ---------- */
.proof-strip { display: flex; flex-wrap: wrap; gap: var(--space-3); justify-content: center; margin-bottom: var(--space-5); }
.badge { display: inline-flex; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-4); border-radius: var(--radius-pill); background: var(--white); box-shadow: var(--shadow-soft); font-weight: 600; font-size: 0.9rem; color: var(--plum); }
.testimonial { font-style: italic; }
.testimonial cite { display: block; margin-top: var(--space-3); font-style: normal; font-weight: 600; color: var(--lavender-deep); }
.sample-tag { display: inline-block; font-size: 0.7rem; background: #FFF4D6; color: #8a6d00; padding: 2px 8px; border-radius: 6px; font-weight: 700; margin-bottom: var(--space-2); }

/* ---------- Quiz ---------- */
.quiz-progress { height: 8px; background: var(--line); border-radius: var(--radius-pill); overflow: hidden; margin-bottom: var(--space-6); }
.quiz-progress > span { display: block; height: 100%; background: var(--lavender); width: 0; transition: width 0.3s ease; }
.quiz-option { display: block; width: 100%; text-align: left; min-height: 56px; padding: var(--space-4); margin-bottom: var(--space-3); border-radius: var(--radius); border: 1px solid var(--line); background: var(--white); color: var(--plum); font-weight: 600; font-size: 1rem; cursor: pointer; }
.quiz-option:hover { border-color: var(--lavender); background: var(--lilac-mist); }
.quiz-result-glow { position: relative; }
.quiz-result-glow::before { content: ""; position: absolute; inset: -20%; background: var(--glow-radial); z-index: 0; pointer-events: none; }
.quiz-result-glow > * { position: relative; z-index: 1; }

/* ---------- Calculators ---------- */
.calc-grid { display: grid; gap: var(--space-4); }
.calc-field label { display: block; font-weight: 600; margin-bottom: var(--space-2); color: var(--plum); }
.calc-field input, .calc-field select { width: 100%; min-height: 48px; padding: var(--space-3) var(--space-4); border-radius: var(--radius-sm); border: 1px solid var(--line); font-size: 1rem; font-family: var(--font-body); }
.calc-result { background: var(--lilac-mist); border-radius: var(--radius); padding: var(--space-5); margin-top: var(--space-5); }
.calc-result dt { font-weight: 600; color: var(--muted); font-size: 0.85rem; }
.calc-result dd { margin: 0 0 var(--space-3); font-size: 1.4rem; font-weight: 700; color: var(--plum); font-family: var(--font-display); }
.syringe { width: 100%; max-width: 320px; height: 48px; margin: var(--space-4) auto; border: 2px solid var(--plum); border-radius: var(--radius-pill); overflow: hidden; background: var(--white); position: relative; }
.syringe > span { display: block; height: 100%; background: var(--lavender); width: 0; transition: width 0.4s ease; }

/* ---------- Disclaimer / footer ---------- */
.disclaimer-mini { font-size: 0.85rem; color: var(--muted); border-left: 3px solid var(--lavender); padding-left: var(--space-4); margin: var(--space-5) 0; }
.ftc-line { font-size: 0.85rem; color: var(--muted); margin: var(--space-3) 0; }
.site-footer { background: var(--plum); color: rgba(255,255,255,0.8); padding: var(--space-7) 0 var(--space-8); margin-top: var(--space-8); }
.site-footer a { color: rgba(255,255,255,0.9); }
.site-footer .brand-line { font-family: var(--font-display); font-size: 1.3rem; color: var(--white); margin-bottom: var(--space-4); }
.footer-social { display: flex; gap: var(--space-4); margin: var(--space-4) 0; flex-wrap: wrap; }
.footer-nav { display: flex; flex-wrap: wrap; gap: var(--space-4); margin: var(--space-4) 0; }
.footer-disclaimer { font-size: 0.8rem; color: rgba(255,255,255,0.6); margin-top: var(--space-5); max-width: 70ch; }

/* ---------- Exit-intent popup ---------- */
.exit-popup { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; background: rgba(34,28,51,0.6); padding: var(--space-5); }
.exit-popup.open { display: flex; }
.exit-popup .exit-inner { max-width: 440px; width: 100%; position: relative; }
.exit-popup .exit-close { position: absolute; top: var(--space-3); right: var(--space-3); background: rgba(255,255,255,0.2); color: var(--white); border: 0; width: 36px; height: 36px; border-radius: 50%; font-size: 1.2rem; cursor: pointer; }

/* ---------- Motion: fade-up on scroll ---------- */
.fade-up { opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease, transform 0.5s ease; }
.fade-up.in { opacity: 1; transform: none; }

/* ---------- Utility ---------- */
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.muted { color: var(--muted); }
.row-link { display: flex; align-items: center; justify-content: space-between; padding: var(--space-4) 0; border-bottom: 1px solid var(--line); color: var(--plum); font-weight: 600; }
.row-link:hover { text-decoration: none; color: var(--lavender-deep); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
