/* ==========================================================
   Smart Family Planner — styles
   ========================================================== */

:root {
  --cream: #fbf6ef;
  --sand: #f3e9dc;
  --white: #ffffff;
  --ink: #1f2a37;
  --ink-soft: #4b5563;
  --muted: #6b7280;
  --coral: #f2604a;
  --coral-dark: #d94a35;
  --coral-soft: #fde4de;
  --navy: #18233a;
  --gold: #f5b301;
  --line: #e9dfd1;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 10px 30px rgba(31, 42, 55, .08);
  --shadow-lg: 0 24px 60px rgba(31, 42, 55, .14);
  --font-head: "Fraunces", Georgia, serif;
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 600; line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.4rem, 5.2vw, 4rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.eyebrow {
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 14px;
}
.lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 34em; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  border: 2px solid transparent;
  font: 700 .98rem/1 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s, background .2s, color .2s, box-shadow .2s, border-color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--coral); color: #fff; box-shadow: 0 8px 20px rgba(242, 96, 74, .3); }
.btn--primary:hover { background: var(--coral-dark); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; }
.btn--outline { background: transparent; color: var(--coral); border-color: var(--coral); }
.btn--outline:hover { background: var(--coral); color: #fff; }
.btn--dark { background: var(--navy); color: #fff; }
.btn--dark:hover { background: #000; }
.btn--sm { padding: 10px 18px; font-size: .9rem; }
.btn--lg { padding: 17px 30px; font-size: 1.02rem; }
.btn--block { width: 100%; }

/* ---------- Announcement ---------- */
.announce { background: var(--navy); color: #fff; text-align: center; font-size: .88rem; padding: 9px 16px; }
.announce p { margin: 0; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 246, 239, .9);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}
.header.is-scrolled { border-color: var(--line); box-shadow: 0 4px 20px rgba(31, 42, 55, .05); }
.header__inner { display: flex; align-items: center; justify-content: space-between; height: 74px; gap: 24px; }

.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.logo__mark svg { width: 36px; height: 36px; display: block; }
.logo__mark rect { fill: var(--coral); }
.logo__mark path { stroke: #fff; stroke-width: 2.5; stroke-linecap: round; fill: none; }
.logo__text { font-family: var(--font-head); font-size: 1.3rem; font-weight: 500; color: var(--ink); }
.logo__text b { font-weight: 600; color: var(--coral); }
.logo--light .logo__text { color: #fff; }

.nav { display: flex; align-items: center; gap: 30px; }
.nav a { text-decoration: none; font-weight: 500; color: var(--ink-soft); position: relative; }
.nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; bottom: -4px; width: 100%; height: 2px;
  background: var(--coral); transform: scaleX(0); transform-origin: left; transition: transform .25s;
}
.nav a:not(.btn):hover { color: var(--ink); }
.nav a:not(.btn):hover::after { transform: scaleX(1); }
.nav__cta-mobile { display: none; }

.header__actions { display: flex; align-items: center; gap: 12px; }
.menu-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; padding: 10px; }
.menu-toggle span { display: block; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; transition: transform .3s, opacity .3s; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  padding: 64px 0 90px;
  background:
    radial-gradient(900px 500px at 85% 20%, #ffe7dc 0%, transparent 60%),
    radial-gradient(700px 400px at 0% 100%, #f6ead9 0%, transparent 60%);
  overflow: hidden;
}
.hero__inner { display: grid; grid-template-columns: 1fr 1.15fr; gap: 56px; align-items: center; }
.hero h1 em { font-style: italic; color: var(--coral); }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 14px; margin: 30px 0 26px; }
.hero__rating { display: flex; align-items: center; gap: 10px; color: var(--ink-soft); font-size: .95rem; flex-wrap: wrap; }
.stars { color: var(--gold); letter-spacing: 2px; font-size: 1.1rem; }

.hero__media { position: relative; }
.hero__media > img {
  border-radius: 28px;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 1184 / 835;
  object-fit: cover;
}
.float-card {
  position: absolute;
  display: flex; align-items: center; gap: 12px;
  background: #fff;
  padding: 12px 18px 12px 14px;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  font-size: .9rem;
  animation: float 5s ease-in-out infinite;
}
.float-card b { display: block; line-height: 1.2; }
.float-card small { color: var(--muted); }
.float-card--a { left: -28px; bottom: 18%; }
.float-card--b { right: -18px; top: -18px; animation-delay: -2.5s; }
.dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.dot--green { background: #34c759; box-shadow: 0 0 0 5px #e3f8e8; }
.check {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: var(--coral-soft); color: var(--coral); font-weight: 700;
}
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ---------- Trust strip ---------- */
.trust { background: var(--white); border-block: 1px solid var(--line); padding: 26px 0; }
.trust__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.trust__item { display: flex; align-items: center; gap: 14px; }
.trust__icon {
  width: 48px; height: 48px; flex: none; border-radius: 14px;
  display: grid; place-items: center; font-size: 1.4rem; background: var(--cream);
}
.trust__item b { display: block; font-size: .98rem; }
.trust__item small { color: var(--muted); }

/* ---------- Statement ---------- */
.statement { padding: 110px 0 40px; text-align: center; }
.statement__text {
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 3.2vw, 2.5rem);
  line-height: 1.3;
  max-width: 900px;
  margin: 0 auto;
}
.hl { color: var(--coral); font-style: italic; }

/* ---------- Section heads ---------- */
.section-head { text-align: center; max-width: 680px; margin: 0 auto 50px; }
.section-head p { color: var(--ink-soft); }
.section-head--left { text-align: left; margin: 0; }
.section-head--left a { color: var(--coral); font-weight: 700; }

/* ---------- Features / tabs ---------- */
.features { padding: 70px 0 110px; }
.tabs__list {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 10px;
  margin-bottom: 40px;
}
.tabs__list button {
  font: 600 .98rem var(--font-body);
  padding: 12px 22px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--white);
  color: var(--ink-soft);
  cursor: pointer;
  transition: all .2s;
}
.tabs__list button:hover { border-color: var(--coral); color: var(--ink); }
.tabs__list button[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

.tabs__panel {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 56px; align-items: center;
  background: var(--white);
  border-radius: 32px;
  padding: 28px;
  box-shadow: var(--shadow);
  animation: fadeUp .45s ease;
}
.tabs__panel[hidden] { display: none; }
.tabs__media img { border-radius: 22px; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--cream); }
.tabs__copy { padding-right: 24px; }
.tabs__copy p { color: var(--ink-soft); }
.checklist { list-style: none; padding: 0; margin: 20px 0 0; }
.checklist li { position: relative; padding-left: 34px; margin-bottom: 12px; font-weight: 500; }
.checklist li::before {
  content: "✓";
  position: absolute; left: 0; top: 1px;
  width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--coral-soft); color: var(--coral); font-size: .75rem; font-weight: 700;
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- Shop ---------- */
.shop { padding: 110px 0; background: var(--sand); }
.products { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.product {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .3s, box-shadow .3s;
}
.product:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.product__img { aspect-ratio: 1 / 1; background: #f7f4f0; overflow: hidden; }
.product__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.product:hover .product__img img { transform: scale(1.05); }
.product__body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.product__body p { color: var(--ink-soft); font-size: .95rem; flex: 1; }
.product h3 { font-size: 1.25rem; margin-bottom: 8px; }
.price { display: flex; align-items: baseline; gap: 10px; margin-bottom: 16px; }
.price__now { font-size: 1.35rem; font-weight: 700; }
.price__was { color: var(--muted); text-decoration: line-through; }
.badge {
  position: absolute; top: 14px; left: 14px; z-index: 2;
  background: var(--coral); color: #fff;
  font-size: .75rem; font-weight: 700; letter-spacing: .04em;
  padding: 6px 12px; border-radius: 999px;
}
.badge--dark { background: var(--navy); }

/* ---------- How it works ---------- */
.how { padding: 120px 0; }
.how__inner { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; align-items: center; }
.how__media { position: relative; padding: 0 0 60px 40px; }
.how__img-main { border-radius: 28px; box-shadow: var(--shadow-lg); width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.how__img-small {
  position: absolute; left: 0; bottom: 0; width: 46%; z-index: 2;
  border-radius: 18px; border: 6px solid var(--cream); box-shadow: var(--shadow-lg);
}
.steps { list-style: none; padding: 0; margin: 30px 0 0; }
.steps li { display: flex; gap: 20px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.steps li:last-child { border-bottom: 0; }
.steps__num {
  width: 46px; height: 46px; flex: none; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--coral); color: #fff;
  font-family: var(--font-head); font-size: 1.25rem; font-weight: 600;
}
.steps h3 { font-family: var(--font-body); font-size: 1.12rem; font-weight: 700; margin-bottom: 4px; }
.steps p { margin: 0; color: var(--ink-soft); }

/* ---------- Banner ---------- */
.banner { position: relative; min-height: 560px; display: flex; align-items: center; overflow: hidden; }
.banner > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% center; }
.banner__content { position: relative; }
.banner__card {
  max-width: 440px;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(10px);
  padding: 40px;
  border-radius: 28px;
  box-shadow: var(--shadow-lg);
}
.banner__card p { color: var(--ink-soft); }

/* ---------- Reviews ---------- */
.reviews { padding: 120px 0; }
.reviews__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.review {
  margin: 0;
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}
.review blockquote { margin: 14px 0 24px; font-size: 1.05rem; line-height: 1.6; flex: 1; }
.review figcaption { display: flex; align-items: center; gap: 12px; }
.review figcaption b { display: block; line-height: 1.2; }
.review figcaption small { color: var(--muted); }
.avatar {
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--c); color: #fff; font-weight: 700; font-size: 1.1rem;
}

/* ---------- FAQ ---------- */
.faq { padding: 110px 0; background: var(--white); }
.faq__inner { display: grid; grid-template-columns: 1fr 1.5fr; gap: 70px; align-items: start; }
.faq__list details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq__list summary {
  list-style: none;
  cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 20px 0;
  font-weight: 700; font-size: 1.08rem;
}
.faq__list summary::-webkit-details-marker { display: none; }
.faq__list summary::after {
  content: "+";
  width: 32px; height: 32px; flex: none; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--cream); font-size: 1.3rem; font-weight: 400;
  transition: transform .3s, background .3s, color .3s;
}
.faq__list details[open] summary::after { transform: rotate(45deg); background: var(--coral); color: #fff; }
.faq__list details p { color: var(--ink-soft); padding-right: 50px; }

/* ---------- CTA ---------- */
.cta { padding: 100px 0; }
.cta__inner {
  text-align: center;
  background: linear-gradient(135deg, var(--coral) 0%, #f58a5a 100%);
  color: #fff;
  border-radius: 36px;
  padding: 70px 30px;
}
.cta__inner p { opacity: .95; max-width: 520px; margin-inline: auto; }
.cta__form { display: flex; gap: 10px; max-width: 480px; margin: 28px auto 0; }
.cta__form input {
  flex: 1; min-width: 0;
  padding: 15px 22px;
  border-radius: 999px;
  border: 0;
  font: 1rem var(--font-body);
  outline: 3px solid transparent;
}
.cta__form input:focus { outline-color: rgba(255, 255, 255, .5); }
.cta__msg { margin-top: 14px; min-height: 1.6em; font-weight: 700; }

/* ---------- Footer ---------- */
.footer { background: var(--navy); color: rgba(255, 255, 255, .7); padding: 80px 0 30px; font-size: .95rem; }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.footer__brand p { margin-top: 18px; max-width: 320px; }
.footer h4 { color: #fff; font-size: 1rem; margin: 6px 0 16px; }
.footer__grid a:not(.logo) { display: block; text-decoration: none; margin-bottom: 10px; transition: color .2s; }
.footer__grid a:not(.logo):hover { color: #fff; }
.footer__bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  margin-top: 60px; padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  font-size: .88rem;
}
.footer__bottom p { margin: 0; }

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

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .products { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .menu-toggle { display: block; }
  .header__actions .btn { display: none; }
  .nav {
    position: fixed; inset: 74px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--cream);
    padding: 10px 24px 28px;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    transform: translateY(-120%);
    visibility: hidden;
    transition: transform .35s ease, visibility .35s;
  }
  .nav.is-open { transform: none; visibility: visible; }
  .nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .nav a:not(.btn)::after { display: none; }
  .nav__cta-mobile { display: inline-flex; margin-top: 18px; }

  .hero { padding: 40px 0 70px; }
  .hero__inner, .how__inner, .faq__inner { grid-template-columns: 1fr; gap: 44px; }
  .hero__media { order: -1; }
  .float-card--a { left: 8px; }
  .float-card--b { right: 8px; }
  .trust__grid { grid-template-columns: 1fr 1fr; }
  .tabs__panel { grid-template-columns: 1fr; gap: 28px; }
  .tabs__copy { padding: 0 8px 8px; }
  .reviews__grid { grid-template-columns: 1fr; }
  .how__media { padding: 0 0 40px 24px; }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .container { padding: 0 16px; }
  .statement { padding-top: 80px; }
  .features, .shop, .how, .reviews, .faq { padding: 80px 0; }
  .products { grid-template-columns: 1fr; }
  .trust__grid { grid-template-columns: 1fr; }
  .tabs__list { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 6px; }
  .tabs__list button { flex: none; }
  .tabs__panel { padding: 14px; border-radius: 24px; }
  .float-card { font-size: .8rem; padding: 9px 12px; }
  .float-card--b { top: -12px; }
  .float-card--a { bottom: -14px; }
  .banner { min-height: 0; flex-direction: column; }
  .banner > img { position: static; height: 280px; }
  .banner__content { margin-top: -50px; }
  .banner__card { padding: 28px; }
  .cta__form { flex-direction: column; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .faq__list details p { padding-right: 0; }
}
