/* =========================================================
   Baby Promotions - style.css
   Soft, warm, baby-themed landing page.
   Light theme is primary; a warm "evening nursery" dark theme
   follows the user's system preference.
   ========================================================= */

/* ---------- Design tokens ---------- */
:root {
  --font: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Light theme (primary - soft baby) */
  --bg: #fbf6f1;
  --bg-soft: #f7ece9;        /* alt section wash (soft rose) */
  --bg-card: #fffdfb;
  --bg-final-a: #f6dde4;     /* final CTA gradient start */
  --bg-final-b: #f1d2dc;     /* final CTA gradient end */
  --text: #3a2c27;           /* primary text - high contrast on all bgs */
  --text-soft: #6b5a50;      /* secondary text - AA on cream and soft-rose */
  --text-faint: #7a6a5e;     /* disclaimers - AA on cream */
  --accent: #a8465e;         /* dusty rose - links, icons, eyebrow (AA on all section bgs) */
  --accent-btn: #b04f66;     /* button fill - a touch brighter for pop, white text passes AA */
  --accent-btn-deep: #974055;/* button hover - deeper, white text still passes */
  --accent-soft: #f4d8e0;    /* soft rose wash */
  --border: #e7d9cc;
  --border-soft: #f1e7db;
  --header-bg: rgba(251, 246, 241, 0.82);

  /* Pastel icon-chip tints (light) */
  --chip-mint: #e6f2ea;      --chip-mint-ink: #3f7a5c;
  --chip-peach: #f8e7d6;     --chip-peach-ink: #b06a3a;
  --chip-butter: #f7edd2;    --chip-butter-ink: #937a22;
  --chip-lavender: #ece6f4;  --chip-lavender-ink: #6a5a9a;
  --chip-rose: #f7e0e8;      --chip-rose-ink: #b04f66;

  /* Radii - documented scale: buttons & tags = pill, cards = 20px,
     all icon containers = circle, inputs = 12px */
  --r-pill: 999px;
  --r-card: 20px;
  --r-sm: 12px;

  /* Shadows (tinted to the warm background hue) */
  --shadow-sm: 0 1px 2px rgba(120, 60, 50, 0.06);
  --shadow-md: 0 14px 34px -14px rgba(120, 60, 50, 0.22);
  --shadow-cta: 0 14px 32px -10px rgba(176, 79, 102, 0.42);

  /* Layout */
  --maxw: 1120px;
  --gutter: clamp(1.1rem, 4vw, 2rem);
  --header-h: 68px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #241b1f;
    --bg-soft: #2d2127;
    --bg-card: #312429;
    --bg-final-a: #3a2530;
    --bg-final-b: #432a36;
    --text: #f5ece6;
    --text-soft: #cdb9af;
    --text-faint: #9c8a80;
    --accent: #eaa3b4;         /* lighter rose for text/icons on dark */
    --accent-btn: #b04f66;     /* kept deep so white text still passes AA */
    --accent-btn-deep: #974055;/* hover deepens (consistent with light) */
    --accent-soft: #43262e;
    --border: #47333a;
    --border-soft: #3a2a30;
    --header-bg: rgba(36, 27, 31, 0.82);

    --chip-mint: #2c3a32;     --chip-mint-ink: #8fc7a6;
    --chip-peach: #3a2f23;    --chip-peach-ink: #e2b483;
    --chip-butter: #37331f;   --chip-butter-ink: #d9c878;
    --chip-lavender: #322c47; --chip-lavender-ink: #b3a6e0;
    --chip-rose: #3f2530;     --chip-rose-ink: #eaa3b4;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 16px 36px -16px rgba(0, 0, 0, 0.6);
    --shadow-cta: 0 14px 32px -10px rgba(0, 0, 0, 0.55);
  }
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

section[id], #main { scroll-margin-top: calc(var(--header-h) + 12px); }

/* ---------- Accessibility helpers ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--accent-btn);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: var(--r-sm);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { left: 10px; top: 10px; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-family: var(--font);
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}
.btn-primary { background: var(--accent-btn); color: #fff; box-shadow: var(--shadow-cta); }
.btn-primary:hover { background: var(--accent-btn-deep); transform: translateY(-2px); }
.btn-primary:active { transform: translateY(0); }
.btn-lg { padding: 0.95rem 1.7rem; font-size: 1.06rem; }
.btn-sm { padding: 0.58rem 1.05rem; font-size: 0.95rem; }
.btn-arrow { width: 1.15em; height: 1.15em; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}
.nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: var(--header-h);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-right: auto;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
}
.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
}
.brand-mark svg { width: 16px; height: 16px; }
.nav-links { display: flex; gap: 1.4rem; }
.nav-links a {
  color: var(--text-soft);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.97rem;
  transition: color 0.18s ease;
}
.nav-links a:hover { color: var(--accent); }

@media (max-width: 860px) { .nav-links { display: none; } }
@media (max-width: 560px) { .nav-cta { display: none; } }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-block: clamp(2.5rem, 7vw, 5rem) clamp(2rem, 6vw, 4rem);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.7;
  background:
    radial-gradient(38% 50% at 10% 8%, var(--accent-soft) 0%, transparent 70%),
    radial-gradient(42% 52% at 96% 6%, var(--chip-butter) 0%, transparent 72%),
    radial-gradient(46% 58% at 82% 98%, var(--chip-rose) 0%, transparent 70%);
}
.hero > .container { position: relative; z-index: 1; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}
@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
}

.hero-copy { max-width: 40rem; }
.eyebrow {
  margin: 0 0 1rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.hero-title {
  margin: 0 0 1.1rem;
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  line-height: 1.09;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}
.hero-sub {
  margin: 0 0 1.9rem;
  font-size: clamp(1.05rem, 1.7vw, 1.22rem);
  color: var(--text-soft);
  max-width: 36ch;
}

/* Hero visual (decorative, soft floating composition) */
.hero-visual {
  position: relative;
  aspect-ratio: 1 / 1;
  max-width: 28rem;
  margin-inline: auto;
}
.hero-emblem {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 40%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-md);
  display: grid;
  place-items: center;
  color: var(--accent);
}
.hero-emblem svg { width: 46%; height: 46%; }
.orb { position: absolute; border-radius: 50%; opacity: 0.85; }
.orb-a { width: 56%; height: 56%; left: -6%; top: 2%;
  background: radial-gradient(circle at 30% 30%, var(--chip-rose), transparent 68%); }
.orb-b { width: 48%; height: 48%; right: -4%; top: 8%;
  background: radial-gradient(circle at 60% 40%, var(--chip-butter), transparent 68%); }
.orb-c { width: 50%; height: 50%; right: 6%; bottom: -6%;
  background: radial-gradient(circle at 40% 60%, var(--chip-lavender), transparent 68%); }
.float-chip {
  position: absolute;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-md);
  color: var(--accent);
}
.float-chip svg { width: 26px; height: 26px; }
.chip-heart { left: 4%; top: 40%; }
.chip-star { right: 6%; bottom: 12%; }

/* Gentle, motivated float (draws the eye to the hero, adds softness) */
@keyframes float-up { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes float-dn { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(9px); } }
.hero-emblem { animation: float-up 6.5s ease-in-out infinite; }
.orb-a, .orb-c { animation: float-up 7.5s ease-in-out infinite; }
.orb-b { animation: float-dn 8s ease-in-out infinite; }
.float-chip { animation: float-dn 6s ease-in-out infinite; }

/* ---------- Section heads ---------- */
.section-head {
  max-width: 42rem;
  margin: 0 auto clamp(2rem, 5vw, 3rem);
  text-align: center;
}
.section-head h2 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.12;
  color: var(--text);
}
.section-head p { margin: 0; color: var(--text-soft); font-size: 1.05rem; }

/* ---------- Benefits ---------- */
.benefits { padding-block: clamp(3rem, 8vw, 5.5rem); background: var(--bg); }
.card-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(1rem, 2.6vw, 1.6rem);
}
.benefit-card {
  flex: 1 1 250px;
  max-width: 330px;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-card);
  padding: clamp(1.4rem, 3vw, 1.8rem);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.benefit-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border);
}
.icon-chip {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin-bottom: 1.05rem;
}
.icon-chip svg { width: 26px; height: 26px; }
.tint-mint { background: var(--chip-mint); color: var(--chip-mint-ink); }
.tint-peach { background: var(--chip-peach); color: var(--chip-peach-ink); }
.tint-butter { background: var(--chip-butter); color: var(--chip-butter-ink); }
.tint-lavender { background: var(--chip-lavender); color: var(--chip-lavender-ink); }
.tint-rose { background: var(--chip-rose); color: var(--chip-rose-ink); }
.benefit-card h3 { margin: 0 0 0.5rem; font-size: 1.15rem; font-weight: 700; color: var(--text); }
.benefit-card p { margin: 0; color: var(--text-soft); font-size: 0.98rem; }

/* ---------- How it works (timeline) ---------- */
.how { padding-block: clamp(3rem, 8vw, 5.5rem); background: var(--bg-soft); }
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: clamp(1.2rem, 3vw, 1.6rem);
  position: relative;
}
.step { display: grid; align-items: start; gap: 1rem; position: relative; }
.step-num {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--accent);
  color: var(--accent);
  font-weight: 800;
  font-size: 1.2rem;
  display: grid;
  place-items: center;
  position: relative;
  z-index: 1;
}
.step-text { margin: 0; color: var(--text-soft); font-size: 0.98rem; }

/* Mobile / tablet: vertical timeline */
@media (max-width: 919px) {
  .step { grid-template-columns: 52px 1fr; }
  .steps::before {
    content: "";
    position: absolute;
    left: 25px;
    top: 26px;
    bottom: 26px;
    width: 2px;
    background: var(--border);
  }
  .step-text { padding-top: 0.55rem; }
}

/* Desktop: horizontal 5-step rail */
@media (min-width: 920px) {
  .steps { grid-template-columns: repeat(5, 1fr); }
  .steps::before {
    content: "";
    position: absolute;
    top: 25px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: var(--border);
  }
  .step { justify-items: center; text-align: center; }
  .step-text { max-width: 22ch; }
}

/* ---------- Final CTA ---------- */
.final { padding-block: clamp(3rem, 8vw, 6rem); }
.final-inner {
  background: linear-gradient(135deg, var(--bg-final-a), var(--bg-final-b));
  border: 1px solid var(--border-soft);
  border-radius: clamp(1.25rem, 3vw, 2rem);
  padding: clamp(2.2rem, 6vw, 4rem);
  text-align: center;
  max-width: 54rem;
  margin-inline: auto;
  box-shadow: var(--shadow-sm);
}
.final-inner h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.8rem, 3.6vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}
.final-inner p {
  margin: 0 auto 1.9rem;
  max-width: 48ch;
  color: var(--text);
  font-size: 1.08rem;
}

/* ---------- Footer ---------- */
.site-footer {
  padding-block: clamp(2.5rem, 6vw, 3.5rem) clamp(2rem, 5vw, 2.5rem);
  border-top: 1px solid var(--border-soft);
  background: var(--bg);
}
.footer-inner { display: grid; gap: 0.5rem; text-align: center; }
.footer-brand { margin: 0 0 0.25rem; font-weight: 700; font-size: 1.05rem; color: var(--text); }
.footer-copy { margin: 0; color: var(--text-soft); font-size: 0.92rem; }
.footer-disc {
  margin: 0.1rem auto 0;
  color: var(--text-faint);
  font-size: 0.82rem;
  max-width: 52ch;
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.is-visible { opacity: 1; transform: none; }
/* stagger benefit cards and steps */
.benefit-card.reveal:nth-child(2) { transition-delay: 0.07s; }
.benefit-card.reveal:nth-child(3) { transition-delay: 0.14s; }
.benefit-card.reveal:nth-child(4) { transition-delay: 0.21s; }
.benefit-card.reveal:nth-child(5) { transition-delay: 0.28s; }
.step.reveal:nth-child(2) { transition-delay: 0.08s; }
.step.reveal:nth-child(3) { transition-delay: 0.16s; }
.step.reveal:nth-child(4) { transition-delay: 0.24s; }
.step.reveal:nth-child(5) { transition-delay: 0.32s; }

/* ---------- Reduced motion ---------- */
@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;
  }
  .reveal { opacity: 1; transform: none; }
}