/* The one-page landing (index.html). Shared tokens and type live in style.css. Every animation here
   is switched off under prefers-reduced-motion at the bottom of this file. */

:root {
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

body {
  overflow-x: hidden;
}

.page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px 20px 48px;
}

/* --- Header --------------------------------------------------------------------------------- */

.top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--color-canvas) 86%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.top .page {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  padding-bottom: 12px;
}

.top nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.top nav a:not(.btn) {
  font-size: 14px;
  color: var(--color-muted);
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 999px;
}

.top nav a:not(.btn):hover {
  color: var(--color-ink);
  background: var(--color-surface);
}

.btn-sm {
  min-height: 42px;
  padding: 0 18px;
  font-size: 14px;
  border-radius: 12px;
  margin-left: 6px;
}

.logo-spin {
  animation: spin-in 1.1s var(--ease-out) both;
}

/* --- Hero ----------------------------------------------------------------------------------- */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
  padding: 48px 0 40px;
}

.blobs {
  position: absolute;
  inset: -80px -200px auto;
  height: 720px;
  z-index: -1;
  pointer-events: none;
}

.blob {
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
  animation: drift 18s ease-in-out infinite alternate;
}

.blob.b1 { background: var(--color-menstrual-soft); top: 0; left: 8%; }
.blob.b2 { background: var(--color-follicular-soft); top: 260px; left: 30%; animation-delay: -4s; }
.blob.b3 { background: var(--color-ovulatory-soft); top: 40px; right: 10%; animation-delay: -8s; }
.blob.b4 { background: var(--color-luteal-soft); top: 300px; right: 2%; animation-delay: -12s; }

@keyframes drift {
  to {
    transform: translate(40px, -30px) scale(1.12);
  }
}

.hero h1 {
  font-size: 60px;
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 0 0 18px;
}

.hero h1 .accent {
  background: linear-gradient(90deg, var(--color-menstrual-ink), var(--color-luteal-ink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero .lede {
  font-size: 20px;
  color: var(--color-muted);
  max-width: 28em;
  margin-bottom: 30px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 22px;
}

.btn-play {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.btn-play .play {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--color-accent-soft);
  color: var(--color-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn:hover {
  transform: translateY(-2px);
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.pills li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--color-ink);
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: 999px;
  padding: 7px 13px;
}

.pills li::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--dot);
}

.pills li:nth-child(1) { --dot: var(--color-menstrual); }
.pills li:nth-child(2) { --dot: var(--color-follicular); }
.pills li:nth-child(3) { --dot: var(--color-luteal); }

/* Hero entrance: each piece rises in after the one before. */
.rise {
  animation: rise 800ms var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 110ms + 120ms);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
}

/* --- Phone ---------------------------------------------------------------------------------- */

.stage {
  position: relative;
  display: flex;
  justify-content: center;
  animation: rise 1s var(--ease-out) 300ms both;
}

.phone {
  position: relative;
  width: 300px;
  aspect-ratio: 390 / 800;
  border-radius: 44px;
  padding: 10px;
  background: #2d2331;
  box-shadow: 0 40px 80px -30px rgba(45, 35, 49, 0.5), 0 16px 30px -18px rgba(45, 35, 49, 0.3);
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  50% {
    transform: translateY(-10px);
  }
}

.screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 35px;
  overflow: hidden;
  background: var(--color-canvas);
}

.screen img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: auto;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 700ms ease, transform 1.2s var(--ease-out);
}

.screen img.on {
  opacity: 1;
  transform: none;
}

.dots {
  position: absolute;
  bottom: -34px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}

.dots button {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #d9c9cb;
  cursor: pointer;
  transition: width 400ms var(--ease-out), background 400ms;
}

.dots button[aria-current='true'] {
  width: 24px;
  background: var(--color-accent);
}

/* Little cards that float beside the phone. */
.chip {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: 16px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 14px 30px -16px rgba(45, 35, 49, 0.35);
  white-space: nowrap;
  animation: pop-in 700ms var(--ease-spring) both, bob 5s ease-in-out infinite;
}

.chip small {
  display: block;
  font-weight: 400;
  color: var(--color-muted);
  font-size: 12px;
}

.chip .ic {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.chip.c1 { top: 12%; left: -6%; animation-delay: 900ms, 0s; }
.chip.c2 { top: 46%; right: -10%; animation-delay: 1100ms, -1.5s; }
.chip.c3 { bottom: 12%; left: -2%; animation-delay: 1300ms, -3s; }

.c1 .ic { background: var(--color-luteal-soft); color: var(--color-luteal-ink); }
.c2 .ic { background: var(--color-follicular-soft); color: var(--color-follicular-ink); }
.c3 .ic { background: var(--color-ovulatory-soft); color: var(--color-ovulatory-ink); }

@keyframes pop-in {
  from {
    opacity: 0;
    transform: scale(0.6) translateY(10px);
  }
}

@keyframes bob {
  50% {
    translate: 0 -8px;
  }
}

/* --- Sections ------------------------------------------------------------------------------- */

section.band {
  padding: 80px 0 0;
}

.band-head {
  text-align: center;
  max-width: 34em;
  margin: 0 auto 40px;
}

.band-head .kicker {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin: 0 0 10px;
}

.band-head h2 {
  font-size: 40px;
  margin: 0 0 10px;
  letter-spacing: -0.015em;
}

.band-head p {
  color: var(--color-muted);
  font-size: 17px;
  margin: 0;
}

/* Reveal on scroll: landing.js adds .in when an element comes into view. */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 800ms var(--ease-out), transform 800ms var(--ease-out);
  transition-delay: calc(var(--i, 0) * 100ms);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

.no-js .reveal {
  opacity: 1;
  transform: none;
}

/* --- How it works --------------------------------------------------------------------------- */

.how {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.how::before {
  /* The line that joins the four steps, drawn in as the section appears. */
  content: '';
  position: absolute;
  top: 34px;
  left: 12%;
  right: 12%;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--color-menstrual), var(--color-follicular), var(--color-ovulatory), var(--color-luteal));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.4s var(--ease-out) 200ms;
}

.how.in::before {
  transform: scaleX(1);
}

.how li {
  position: relative;
  text-align: center;
  padding: 0 8px;
}

.how .num {
  position: relative;
  width: 70px;
  height: 70px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface);
  border: 3px solid var(--c);
  color: var(--ink);
  box-shadow: 0 0 0 8px var(--color-canvas);
}

.how li:nth-child(1) { --c: var(--color-menstrual); --ink: var(--color-menstrual-ink); }
.how li:nth-child(2) { --c: var(--color-follicular); --ink: var(--color-follicular-ink); }
.how li:nth-child(3) { --c: var(--color-ovulatory); --ink: var(--color-ovulatory-ink); }
.how li:nth-child(4) { --c: var(--color-luteal); --ink: var(--color-luteal-ink); }

.how h3 {
  font-family: var(--font-display);
  font-size: 21px;
  text-transform: none;
  letter-spacing: 0;
  color: var(--color-ink);
  margin: 0 0 6px;
}

.how p {
  font-size: 15px;
  color: var(--color-muted);
  margin: 0;
}

/* --- Features ------------------------------------------------------------------------------- */

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.feature {
  position: relative;
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: 28px;
  padding: 26px;
  transition: transform 300ms var(--ease-out), box-shadow 300ms var(--ease-out), opacity 800ms var(--ease-out);
}

.feature:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 40px -28px rgba(45, 35, 49, 0.35);
}

.feature .ic {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  background: var(--soft);
  color: var(--ink);
}

.feature h3 {
  font-family: var(--font-display);
  font-size: 22px;
  text-transform: none;
  letter-spacing: 0;
  color: var(--color-ink);
  margin: 0 0 6px;
}

.feature p {
  font-size: 15px;
  color: var(--color-muted);
  margin: 0;
}

.feature.wide {
  grid-column: span 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: center;
}

.f-pink { --soft: var(--color-menstrual-soft); --ink: var(--color-menstrual-ink); }
.f-green { --soft: var(--color-follicular-soft); --ink: var(--color-follicular-ink); }
.f-amber { --soft: var(--color-ovulatory-soft); --ink: var(--color-ovulatory-ink); }
.f-purple { --soft: var(--color-luteal-soft); --ink: var(--color-luteal-ink); }

.feature.dark {
  background: var(--color-ink);
  border-color: var(--color-ink);
  color: #fff;
}

.feature.dark h3 {
  color: #fff;
}

.feature.dark p {
  color: rgba(255, 255, 255, 0.75);
}

.feature .big-num {
  font-family: var(--font-display);
  font-size: 72px;
  color: var(--color-ink);
  line-height: 1;
  margin: 0 0 6px;
  font-variant-numeric: tabular-nums;
}

/* A mini evidence list inside the wide card. */
.mini {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.mini li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--color-canvas);
  border: 1px solid var(--color-line);
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 600;
}

.mini span {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}

.ev-good { background: var(--color-follicular-soft); color: var(--color-follicular-ink); }
.ev-some { background: var(--color-ovulatory-soft); color: var(--color-ovulatory-ink); }
.ev-derm { background: var(--color-luteal-soft); color: var(--color-luteal-ink); }

/* The cycle ring in the "four phases" card draws itself in. */
.ring-arc {
  stroke-dasharray: var(--len) 999;
  stroke-dashoffset: var(--len);
  transition: stroke-dashoffset 1.2s var(--ease-out);
  transition-delay: calc(var(--i) * 180ms + 200ms);
}

.in .ring-arc {
  stroke-dashoffset: 0;
}

.phase-key {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 14px;
  font-size: 14px;
}

.phase-key li {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* --- Final call to action ------------------------------------------------------------------- */

.final {
  margin-top: 80px;
  position: relative;
  overflow: hidden;
  border-radius: 36px;
  padding: 56px 32px;
  text-align: center;
  color: #fff;
  background: var(--color-ink);
}

.final::before {
  content: '';
  position: absolute;
  inset: -40%;
  background: conic-gradient(
    from 0deg,
    rgba(215, 96, 122, 0.35),
    rgba(98, 165, 132, 0.3),
    rgba(226, 160, 79, 0.3),
    rgba(139, 118, 194, 0.35),
    rgba(215, 96, 122, 0.35)
  );
  filter: blur(60px);
  animation: turn 16s linear infinite;
}

@keyframes turn {
  to {
    transform: rotate(1turn);
  }
}

.final > * {
  position: relative;
}

.final h2 {
  color: #fff;
  font-size: 42px;
  margin: 0 0 10px;
}

.final p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 17px;
  margin: 0 0 28px;
}

.final .cta-row {
  justify-content: center;
  margin: 0;
}

.btn-light {
  background: #fff;
  color: var(--color-ink);
}

.btn-ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}

.btn-ghost:hover {
  border-color: #fff;
}

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

.foot {
  margin-top: 48px;
  padding-top: 22px;
  border-top: 1px solid var(--color-line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
  font-size: 13px;
  color: var(--color-muted);
}

.foot p {
  margin: 0;
  font-size: 13px;
}

.foot a {
  color: var(--color-muted);
}

.disclaimer {
  flex-basis: 100%;
}

/* --- Small screens -------------------------------------------------------------------------- */

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 64px;
    padding-top: 28px;
    text-align: center;
  }
  .hero .lede {
    margin-left: auto;
    margin-right: auto;
  }
  .cta-row,
  .pills {
    justify-content: center;
  }
  .how {
    grid-template-columns: 1fr 1fr;
    row-gap: 36px;
  }
  .how::before {
    display: none;
  }
  .features {
    grid-template-columns: 1fr;
  }
  .feature.wide {
    grid-column: auto;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .top nav a:not(.btn) {
    display: none;
  }
  .hero h1 {
    font-size: 42px;
  }
  .hero .lede {
    font-size: 17px;
  }
  .cta-row .btn {
    flex: 1 1 100%;
  }
  .phone {
    width: 250px;
  }
  .chip {
    font-size: 12px;
    padding: 8px 10px;
  }
  .chip.c1 { left: -2%; }
  .chip.c2 { right: -3%; }
  .chip.c3 { left: 0; }
  .chip small {
    display: none;
  }
  .band-head h2,
  .final h2 {
    font-size: 32px;
  }
  .how {
    grid-template-columns: 1fr;
  }
  .final {
    padding: 44px 22px;
    border-radius: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
  .how::before {
    transform: none;
  }
  .ring-arc {
    stroke-dashoffset: 0;
  }
}

@keyframes spin-in {
  from {
    opacity: 0;
    transform: rotate(-120deg) scale(0.6);
  }
}
