/* Colors mirror theme/Colors.ts in the app so the site and app stay on-brand. */
:root {
  --primary: #6B5B8E;
  --primary-light: #EDE9F5;
  --primary-mid: #B8ADD4;
  --primary-deep: #3D2F6B;
  --background: #FFFFFF;
  --background-soft: #F3EDF6;
  --background-warm: #F2EFE9;
  --mission-background: #F8F5FC;
  --text-primary: #2C2930;
  --text-secondary: #948FA5;
  --text-body: #5E5970;
  --border: rgba(0, 0, 0, 0.08);

  --pink: #F4DCDF;
  --pink-dark: #C9445A;
  --green: #D4EDDA;
  --green-dark: #3A6B3A;
  --amber: #FBF5E6;
  --amber-dark: #9B7A2A;
  --blue-light: #E3F2FD;
  --blue-dark: #1565C0;
  --gold: #F2C94C;

  --bezel: #1a1720;

  --serif: 'DM Serif Display', Georgia, serif;
  --sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --radius: 22px;
  --shadow: 0 30px 60px -25px rgba(61, 47, 107, 0.45);
  --shadow-soft: 0 12px 30px -16px rgba(61, 47, 107, 0.3);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; }
p { margin: 0; }

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

.material-icons-round { line-height: 1; }

/* ---------- Shared type ---------- */

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: var(--primary);
  margin-bottom: 14px;
}

h1, h2 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.5px;
}
h1 { font-size: clamp(42px, 6.4vw, 76px); }
h2 { font-size: clamp(32px, 4.2vw, 50px); }
h1 em, h2 em { color: var(--primary); font-style: italic; }

.section { padding: 110px 0; }

.section-head {
  max-width: 720px;
  margin: 0 auto 60px;
  text-align: center;
}
.section-sub {
  margin-top: 18px;
  font-size: 18px;
  line-height: 1.65;
  color: var(--text-body);
}

/* ---------- Device frame (wraps real app screenshots) ---------- */

.device {
  position: relative;
  padding: 9px;
  border-radius: 50px;
  background: var(--bezel);
  box-shadow: var(--shadow), 0 0 0 1.5px #3a3542 inset;
}
.device img {
  width: 100%;
  height: auto;
  border-radius: 41px;
  background: var(--background-warm);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  transition: transform .2s ease, background .2s ease;
}
.btn-primary { background: var(--primary); color: #fff; box-shadow: var(--shadow-soft); }
.btn-primary:hover { background: var(--primary-deep); transform: translateY(-2px); }
.btn-sm { padding: 10px 20px; font-size: 14px; }

.store-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.store-buttons-center { justify-content: center; }

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 11px 22px 11px 18px;
  border-radius: 14px;
  background: var(--text-primary);
  color: #fff;
  transition: transform .2s ease, background .2s ease;
}
.store-btn:hover { transform: translateY(-2px); background: var(--primary-deep); }
.store-btn svg { width: 24px; height: 24px; flex-shrink: 0; }
.store-btn span { display: flex; flex-direction: column; font-size: 17px; font-weight: 700; line-height: 1.15; text-align: left; }
.store-btn small { font-size: 11px; font-weight: 500; opacity: .8; }
.store-btn-light { background: #fff; color: var(--primary-deep); }
.store-btn-light:hover { background: var(--primary-light); }

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.nav.scrolled { border-bottom-color: var(--border); }

.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }

.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand img { border-radius: 10px; }
.brand span { font-family: var(--serif); font-size: 26px; letter-spacing: 1px; color: var(--primary-deep); }

.nav-links { display: flex; align-items: center; gap: 32px; font-size: 15px; font-weight: 500; }
.nav-links a:not(.btn) { color: var(--text-body); transition: color .2s; }
.nav-links a:not(.btn):hover { color: var(--primary); }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 8px;
  color: var(--text-primary);
  cursor: pointer;
}
.nav-toggle .material-icons-round { font-size: 28px; }

/* ---------- 1. Hero ---------- */

.hero {
  position: relative;
  padding: 72px 0 0;
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(900px 520px at 50% 105%, var(--primary-light), transparent 70%),
    linear-gradient(180deg, var(--mission-background) 0%, var(--background) 60%);
}
.hero-copy { max-width: 860px; }
.hero .lede {
  max-width: 620px;
  margin: 24px auto 0;
  font-size: 20px;
  line-height: 1.6;
  color: var(--text-body);
}
.hero .store-buttons { justify-content: center; }

.hero-devices {
  position: relative;
  height: 560px;
  margin-top: 64px;
}
.hero-devices .device { position: absolute; left: 50%; top: 0; }
.device-center { width: 290px; transform: translateX(-50%); z-index: 3; }
.hero-devices .device-side { width: 250px; top: 70px; z-index: 2; opacity: .96; }
.device-left { transform: translateX(-138%) rotate(-7deg); }
.device-right { transform: translateX(38%) rotate(7deg); }

/* ---------- Ribbon ---------- */

.ribbon {
  overflow: hidden;
  background: var(--primary-deep);
  color: #fff;
  padding: 18px 0;
}
.ribbon-track {
  display: flex;
  gap: 44px;
  width: max-content;
  animation: ribbon 40s linear infinite;
}
.ribbon span { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; font-size: 15px; white-space: nowrap; }
.ribbon i { font-size: 20px; color: var(--primary-mid); }
@keyframes ribbon { to { transform: translateX(-50%); } }

/* ---------- 2. Phases ---------- */

.phase-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }

.phase-card { padding: 30px 26px 32px; border-radius: var(--radius); }
.phase-label { font-size: 11px; font-weight: 700; letter-spacing: .5px; margin-bottom: 10px; }
.phase-card h3 { font-family: var(--serif); font-size: 28px; font-weight: 400; line-height: 1.1; margin-bottom: 12px; }
.phase-card p:last-child { font-size: 15px; line-height: 1.6; color: #4a4552; }

.phase-menstrual { background: var(--pink); }
.phase-menstrual .phase-label { color: var(--pink-dark); }
.phase-follicular { background: var(--green); }
.phase-follicular .phase-label { color: var(--green-dark); }
.phase-ovulation { background: var(--amber); }
.phase-ovulation .phase-label { color: var(--amber-dark); }
.phase-luteal { background: var(--primary-light); }
.phase-luteal .phase-label { color: var(--primary-deep); }

/* ---------- 3. How it works ---------- */

.how { background: var(--background-warm); }
.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px;
  counter-reset: step;
}
.step {
  position: relative;
  padding: 34px 30px;
  border-radius: var(--radius);
  background: #fff;
}
.step-num {
  display: grid; place-items: center;
  width: 46px; height: 46px; border-radius: 50%;
  margin-bottom: 22px;
  background: var(--primary); color: #fff;
  font-family: var(--serif); font-size: 22px;
}
.step h3 { font-size: 20px; margin-bottom: 10px; }
.step p { font-size: 15px; line-height: 1.65; color: var(--text-body); }

/* ---------- 4. Tour (sticky phone) ---------- */

.tour { background: var(--background); }
.tour-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 80px;
  align-items: start;
}

/* The phone scales with the viewport height so it always fits while sticky. */
.tour-device {
  position: sticky;
  top: max(96px, calc(50vh - 320px));
  display: flex;
  justify-content: center;
}
.device-stack { width: min(300px, calc((100vh - 140px) * 0.46)); }
.device-stack img { transition: opacity .45s ease; }
.device-stack img:not(:first-child) { position: absolute; inset: 9px; width: calc(100% - 18px); opacity: 0; }
.device-stack img:first-child { opacity: 0; }
.device-stack img.is-active { opacity: 1; }

.tour-step {
  min-height: 82vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 0;
  transition: opacity .4s ease;
}
.js .tour-step { opacity: .3; }
.js .tour-step.is-active { opacity: 1; }

.tour-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  padding: 7px 14px 7px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; letter-spacing: .8px;
  margin-bottom: 20px;
}
.tour-eyebrow i { font-size: 18px; }
.tone-pink { background: var(--pink); color: var(--pink-dark); }
.tone-violet { background: var(--primary-light); color: var(--primary); }
.tone-green { background: var(--green); color: var(--green-dark); }
.tone-amber { background: var(--amber); color: var(--amber-dark); }
.tone-blue { background: var(--blue-light); color: var(--blue-dark); }
.tone-deep { background: var(--primary-deep); color: #fff; }

.tour-step h3 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(30px, 3.4vw, 42px); line-height: 1.1;
  margin-bottom: 18px;
}
.tour-step > p:not(.tour-eyebrow) { font-size: 18px; line-height: 1.65; color: var(--text-body); }

.ticks { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 12px; }
.ticks li { position: relative; padding-left: 34px; font-weight: 500; }
.ticks li::before {
  content: 'check';
  font-family: 'Material Icons Round';
  position: absolute; left: 0; top: 1px;
  width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 15px; background: var(--primary); color: #fff;
}

.step-device { display: none; }

/* ---------- 5. Community ---------- */

.community { background: var(--mission-background); }
.community-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }

.community-devices { position: relative; height: 640px; }
.community-devices .device { position: absolute; width: 270px; }
.device-back { left: 0; top: 60px; transform: rotate(-6deg); opacity: .95; }
.device-front { right: 10px; top: 0; z-index: 2; }

.community-list { list-style: none; padding: 0; margin: 30px 0 0; display: grid; gap: 20px; }
.community-list li { display: flex; gap: 16px; align-items: flex-start; }
.community-list i {
  flex-shrink: 0; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; font-size: 22px;
  background: var(--primary-light); color: var(--primary);
}
.community-list strong { display: block; font-size: 16px; margin-bottom: 2px; }
.community-list span { font-size: 15px; line-height: 1.55; color: var(--text-body); }

/* ---------- 6. FAQ ---------- */

.faq { background: var(--background); }
.faq-inner { max-width: 820px; }
.faq-list { display: grid; gap: 12px; }

details {
  border-radius: 18px; background: var(--mission-background); border: 1px solid var(--border);
  transition: box-shadow .2s ease, background .2s ease;
}
details[open] { background: #fff; box-shadow: var(--shadow-soft); }
summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 22px 26px; font-size: 17px; font-weight: 700;
}
summary::-webkit-details-marker { display: none; }
summary .material-icons-round { color: var(--primary); transition: transform .25s ease; }
details[open] summary .material-icons-round { transform: rotate(180deg); }
details p { padding: 0 26px 24px; font-size: 16px; line-height: 1.7; color: var(--text-body); }

/* ---------- 7. Final CTA ---------- */

.cta {
  padding: 110px 0;
  background:
    radial-gradient(600px 300px at 20% 0%, rgba(184, 173, 212, .35), transparent 70%),
    linear-gradient(135deg, var(--primary) 0%, var(--primary-deep) 100%);
  color: #fff;
  text-align: center;
}
.cta-inner { display: flex; flex-direction: column; align-items: center; }
.cta-inner img { border-radius: 24px; margin-bottom: 28px; box-shadow: 0 20px 40px -15px rgba(0, 0, 0, .4); }
.cta-inner p { margin-top: 16px; font-size: 18px; color: var(--primary-light); }

/* ---------- Footer ---------- */

.footer { background: var(--text-primary); color: #C9C5D3; padding: 60px 0 30px; }
.footer-inner { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.footer .brand span { color: #fff; }
.footer-brand p { margin-top: 14px; max-width: 360px; font-size: 14px; line-height: 1.6; }
.footer-links { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: flex-start; font-size: 15px; }
.footer-links a:hover { color: #fff; }
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  margin-top: 40px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .1);
  font-size: 13px; color: #8C86A3;
}

/* ---------- Scroll reveal ---------- */

/* Only hidden once script.js has run, so the page still shows without JS. */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .ribbon-track { animation: none; }
}

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
  .phase-grid { grid-template-columns: repeat(2, 1fr); }
  .tour-grid, .community-grid { gap: 50px; }
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px 24px 24px; background: #fff; border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--border); }
  .nav-links .btn { margin-top: 16px; }

  .section { padding: 80px 0; }
  .section-head { margin-bottom: 40px; }

  .hero { padding-top: 44px; }
  .hero-devices { height: 470px; margin-top: 48px; }
  .device-center { width: 240px; }
  .hero-devices .device-side { width: 200px; top: 60px; }
  .device-left { transform: translateX(-128%) rotate(-7deg); }
  .device-right { transform: translateX(28%) rotate(7deg); }

  .steps { grid-template-columns: 1fr; }

  /* Tour: drop the sticky phone and show each screen under its own copy. */
  .tour-grid { grid-template-columns: 1fr; }
  .tour-device { display: none; }
  .tour-step { min-height: 0; padding: 0 0 72px; }
  .js .tour-step { opacity: 1; }
  .step-device { display: block; width: 260px; margin: 36px auto 0; }

  .community-grid { grid-template-columns: 1fr; }
  .community-copy { order: -1; }
  .community-devices { height: 560px; max-width: 420px; width: 100%; margin: 0 auto; }
  .community-devices .device { width: 230px; }
}

@media (max-width: 560px) {
  .container { padding: 0 16px; }
  .phase-grid { grid-template-columns: 1fr; }
  .section-sub, .hero .lede, .tour-step > p:not(.tour-eyebrow) { font-size: 17px; }

  .hero-devices { height: 420px; }
  .device-center { width: 210px; }
  .hero-devices .device-side { width: 170px; }
  .device { padding: 7px; border-radius: 38px; }
  .device img { border-radius: 31px; }

  .community-devices { height: 470px; }
  .community-devices .device { width: 195px; }
  .device-back { top: 50px; }
  .device-front { right: 0; }

  summary { padding: 18px 20px; font-size: 16px; }
  details p { padding: 0 20px 20px; }
}
