@font-face {
  font-family: "Work Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("./work-sans-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Work Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("./work-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/*
 * One token set for all four pages. Light values here, dark values in the
 * prefers-color-scheme block below — nothing forces color-scheme: light
 * anywhere, so the OS/browser theme is respected everywhere, landing included.
 */
:root {
  /* Cathedral of white space: white canvas, one soft grey panel tone, ink
     that is near-black rather than black, and an accent that appears rarely
     enough to mean something when it does. */
  --bg: #ffffff;
  --bg-secondary: #f5f5f7;
  --surface: #ffffff;
  --text: #1d1d1f;
  --text-secondary: #6e6e73;
  --border-decorative: #e3e3e6;
  --border-card: #d2d2d7;
  --brand: #5b3fc4;
  --brand-ink: #4c33a8;
  --brand-subtle: #f0ecfd;
  --on-brand: #ffffff;
  --phase-menstrual: #e8879f;
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-raised: 0 12px 40px rgba(0, 0, 0, 0.08);
  --ring: rgba(29, 29, 31, 0.08);
  --radius-button: 980px;
  --radius-card: 18px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --measure: 42rem;
  --measure-narrow: 34rem;
  --page: 68rem;
  --control: 48px;
  --focus: 3px;
  --section-space: 72px;
}

@media (min-width: 840px) {
  :root {
    --section-space: 128px;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    /* The same cathedral after dark: one canvas, one panel tone, the same
       restraint. Not a different design. */
    --bg: #000000;
    --bg-secondary: #1c1c1e;
    --surface: #121214;
    --text: #f5f5f7;
    --text-secondary: #98989d;
    --border-decorative: #2c2c2e;
    --border-card: #3a3a3c;
    --brand: #b9a7f5;
    --brand-ink: #c9baff;
    --brand-subtle: #1f1833;
    --on-brand: #1d1029;
    --shadow-card: none;
    --shadow-raised: none;
    --ring: rgba(245, 245, 247, 0.12);
  }
}

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

/* Degrades silently to normal wrapping where unsupported — zero risk.
   Headings and short lines only; costly and capped at ~6 lines by design,
   so it never goes on long-form paragraphs like .trust-statement. */
h1,
h2,
h3,
.lede {
  text-wrap: balance;
}

html {
  color-scheme: light dark;
  /* Never px at the root — an absolute size here overrides the user's
     browser default font-size preference, which a relative value respects. */
  font-size: 100%;
}

html:focus-within {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  /* dvh, not vh: vh includes the area behind Safari's collapsing toolbar on
     iOS, which is exactly the platform this pre-launch app targets. */
  min-height: 100dvh;
  font-family: "Work Sans", ui-sans-serif, system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background:
    radial-gradient(1200px 480px at 12% -10%, var(--brand-subtle), transparent 60%),
    var(--bg);
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--brand-ink);
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

/* Inline text links get a visible affordance beyond color alone. Nav, footer
   and button links carry their own treatment and opt out below. */
main :where(p, li, dd) > a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

:focus-visible {
  /* brand-ink, not brand: the pale brand purple sits at 1.91:1 on light
     backgrounds, well under the 3:1 a focus indicator needs. brand-ink holds
     7:1+ against both the light and dark surface. */
  outline: var(--focus) solid var(--brand-ink);
  outline-offset: 3px;
  border-radius: 4px;
  /* Belt-and-braces: a soft halo behind the outline so the indicator still
     reads if it ever lands against a surface closer to brand-ink itself. */
  box-shadow: 0 0 0 6px rgba(91, 63, 196, 0.16);
}

.skip {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 20;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-raised);
  transform: translateY(-160%);
}

.skip:focus {
  transform: none;
}

.wrap {
  width: min(calc(100% - 32px), var(--page));
  margin-inline: auto;
}

.narrow {
  width: min(calc(100% - 32px), var(--measure));
  margin-inline: auto;
}

/* Shared header, identical on all four pages. */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-5) 0;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.mark {
  width: 28px;
  height: 28px;
  flex: none;
}

.nav {
  display: flex;
  gap: var(--space-5);
  font-weight: 500;
}

.nav a {
  color: var(--text-secondary);
  text-decoration: none;
}

.nav a[aria-current="page"],
.nav a:hover {
  color: var(--brand-ink);
}

/* Buttons. No aria-disabled variant exists on purpose — a control that cannot
   be used is not rendered here at all. */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  min-height: var(--control);
  padding: 0 20px;
  border-radius: var(--radius-button);
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
}

.button-primary {
  background: var(--brand);
  color: var(--on-brand);
}

/* Section rhythm: one variable, not per-section padding. */
/* Margin, not padding: adjacent block siblings with no border/padding
   between them collapse their margins to the larger value, so this stays a
   single 88px/56px gap between sections instead of doubling at every seam. */
.land-section {
  width: min(calc(100% - 32px), 54rem);
  margin-top: var(--section-space);
}


/* Section headings carry real weight; before this they sat ~2px above body
   copy and every section read as one undifferentiated column of text. */
.land-section > h2:not(.eyebrow) {
  margin: 0 0 var(--space-4);
  font-size: clamp(1.6rem, 1vw + 1.35rem, 2.1rem);
  font-weight: 620;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

/* Hero */
.hero {
  display: grid;
  gap: var(--space-10);
  padding-top: var(--space-12);
  text-align: center;
  justify-items: center;
}

.hero-copy {
  display: grid;
  justify-items: center;
  max-width: 34rem;
}

.hero-copy h1 {
  margin: 0 0 var(--space-5);
  max-width: 18ch;
  font-size: clamp(2.1rem, 2.4vw + 1.6rem, 3.75rem);
  font-weight: 620;
  line-height: 1.03;
  letter-spacing: -0.04em;
}

.lede {
  margin: 0 0 var(--space-6);
  max-width: 32rem;
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.5;
}

.cta-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
}

.microline {
  margin: var(--space-3) 0 0;
  color: var(--text-secondary);
  font-size: 14px;
}

/* Mechanic: You log · The app derives · She has no login. */
/* Trust & privacy */
.trust-statement {
  margin: 0 0 var(--space-5);
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.55;
}

.spec-list {
  padding: var(--space-3) var(--space-5);
  border: 1px solid var(--border-decorative);
  border-radius: var(--radius-card);
  background: var(--bg-secondary);
  display: grid;
  gap: var(--space-3);
  margin: 0 0 var(--space-5);
}

.spec-row {
  display: grid;
  grid-template-columns: minmax(7rem, 10rem) 1fr;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-top: 1px solid var(--border-decorative);
}

.spec-row dt {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
}

.spec-row dd {
  margin: 0;
  color: var(--text);
  font-size: 14px;
}

/*
 * The single UI fragment. A flat surface — border-radius, a hairline ring,
 * a soft shadow — not a phone: no bezel, no rotation, no notch. It shows one
 * screen state (period logged, day 3) built entirely from strings that exist
 * in app/src today, so nothing here can be mistaken for a claim about
 * features that don't exist yet.
 */
/*
 * The stage: a wider, softer plane the fragment sits inside. Three barely-
 * distinguishable planes (page bg -> stage -> fragment) are what make the
 * fragment read as an object rather than "a div on the page" — reuses
 * --bg-secondary, which was already the right middle value between --bg and
 * --surface in both themes, so no new token was needed.
 */
.stage {
  justify-self: center;
  width: fit-content;
  max-width: 100%;
  --stage-pad: clamp(1.25rem, 2.5vw, 2rem);
  position: relative;
  display: grid;
  justify-items: center;
  width: 100%;
  padding: var(--stage-pad);
  border-radius: calc(16px + var(--stage-pad));
  text-align: left;
  background: var(--bg-secondary);
  isolation: isolate;
}

/* Grounding wash: a soft blurred ellipse under the fragment reads as contact
   with the stage, cheaper and more honest than a heavier drop shadow. */
.stage::after {
  content: "";
  position: absolute;
  inset: auto 14% -2% 14%;
  height: 40px;
  border-radius: 50%;
  filter: blur(26px);
  background: rgba(91, 63, 196, 0.16);
  z-index: -1;
}

.surface {
  width: min(100%, 30rem);
  margin: 0;
  padding: var(--space-6);
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.8125rem;
  line-height: 1.32;
  /* A tight 1px ring carries the edge; three very-low-opacity ambient layers
     (never one medium shadow) give it a place in space without going soft. */
  box-shadow:
    0 0 0 1px var(--ring),
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 8px 16px rgba(0, 0, 0, 0.04),
    0 24px 48px rgba(0, 0, 0, 0.035);
}

@media (prefers-color-scheme: dark) {
  /* Shadows don't read against a near-black background. Dark-mode elevation
     is the ring plus a 1px lit top edge, not a shadow. */
  .surface {
    box-shadow:
      0 0 0 1px var(--ring),
      inset 0 1px 0 rgba(255, 255, 255, 0.07);
  }
}

.ui-person {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0 0 var(--space-4);
  color: var(--brand-ink);
  font-size: 0.9375rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.ui-person svg {
  width: 12px;
  height: 12px;
}

.ui-status {
  margin: 0 0 var(--space-4);
  color: var(--text);
  font-size: 0.9375rem;
  font-weight: 620;
  letter-spacing: -0.02em;
}

/* The phase colour belongs on the phase, not on a button. A dot is enough. */
.ui-status::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--phase-menstrual);
  vertical-align: 0.1em;
}

/* Nested elements never share the fragment's own radius (16px) — a smaller,
   near-square radius reads as "inside a system"; the same radius one level
   down reads as a mistake. */
.tip-card {
  margin: 0 0 var(--space-4);
  padding: var(--space-4);
  border-radius: 8px;
  background: var(--bg-secondary);
}

.tip-label {
  margin: 0 0 4px;
  color: var(--brand-ink);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.tip-text {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.8125rem;
  line-height: 1.4;
}

.ui-action {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 8px;
  background: var(--brand);
  color: var(--on-brand);
  font-size: 0.8125rem;
  font-weight: 700;
}

/* Features */
.feature-grid {
  display: grid;
  gap: var(--space-8);
}

.feature {
  margin: 0;
  padding: var(--space-5);
  border: 1px solid var(--border-decorative);
  border-radius: var(--radius-card);
  background: var(--bg-secondary);
}

.feature h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.feature p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.5;
}

/* Medical disclaimer: body-size type in a bordered block, not footer fine
   print — this is the highest-value paragraph on the site. */
.disclaimer {
  padding: 0;
  border: 0;
}

.disclaimer h2 {
  margin: 0 0 var(--space-3);
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.disclaimer p {
  margin: 0 0 var(--space-3);
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.55;
}

.disclaimer p:last-child {
  margin-bottom: 0;
  color: var(--text);
}

/* Shared footer */
.site-footer {
  border-top: 1px solid var(--border-decorative);
  padding: var(--space-8) 0 var(--space-10);
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 22px;
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-4);
}

.footer-links {
  display: flex;
  gap: var(--space-5);
}

/* Legal / support / 404 pages */
.page {
  padding: var(--space-8) 0 var(--section-space);
}

.page h1 {
  margin: 0 0 var(--space-3);
  font-size: clamp(2rem, 4vw + 1rem, 2.75rem);
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.page .meta {
  margin: 0 0 var(--space-8);
  color: var(--text-secondary);
}

.page h2 {
  margin: var(--space-8) 0 var(--space-3);
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.page p,
.page li {
  color: var(--text-secondary);
}

.page ul,
.page ol {
  padding-left: 1.2rem;
}

.toc {
  display: grid;
  gap: 8px;
  margin: 0 0 var(--space-8);
  padding: var(--space-5);
  background: var(--bg-secondary);
  border-radius: var(--radius-card);
}

.toc a {
  text-decoration: none;
  font-weight: 500;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: var(--space-6);
}

.card p {
  margin: 0;
  color: var(--text-secondary);
}

.note {
  background: var(--brand-subtle);
  border-color: transparent;
}

.note h2,
.note p {
  color: var(--text);
}

@media (min-width: 840px) {
  .hero {
    gap: var(--space-12);
  }

    .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---- Component vocabulary -------------------------------------------------
   From the reference set: a dot-prefixed uppercase kicker, headlines whose
   second clause turns to serif italic, a dot-separated strip of small
   verifiable facts, and a two-card contrast block that states the incapacity
   claim as two lists rather than as a paragraph of denial. The serif accent is
   the system ui-serif, so it costs zero font bytes.
   ------------------------------------------------------------------------- */

.kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 var(--space-4);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.kicker::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brand);
  flex: none;
}

h1 em,
h2 em {
  font-family: ui-serif, Georgia, "Times New Roman", serif;
  font-style: italic;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--brand-ink);
}

.land-section > h2 {
  margin: 0 0 var(--space-6);
  font-size: clamp(1.75rem, 1.4vw + 1.4rem, 2.5rem);
  font-weight: 620;
  line-height: 1.12;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.meta-strip {
  /* Stacked on small screens: a wrapped dot-separated row leaves a separator
     orphaned at the start of the second line. */
  display: grid;
  justify-items: center;
  gap: 6px;
  margin: var(--space-6) 0 0;
  padding: 0;
  list-style: none;
  color: var(--text-secondary);
  font-size: 13px;
}

.meta-strip li + li::before {
  content: "";
}

@media (min-width: 840px) {
  .meta-strip {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
  }

  .meta-strip li + li::before {
    content: "·";
    margin: 0 10px;
    opacity: 0.5;
  }
}

.steps {
  display: grid;
  gap: var(--space-8);
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps li {
  margin: 0;
}

.step-index {
  display: block;
  margin: 0 0 var(--space-3);
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
}

.steps h3 {
  margin: 0 0 8px;
  font-size: 1.0625rem;
  font-weight: 620;
  letter-spacing: -0.02em;
}

.steps p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.55;
}

.contrast {
  display: grid;
  gap: var(--space-4);
  margin: 0 0 var(--space-8);
}

.contrast-card {
  padding: var(--space-6);
  border: 1px solid var(--border-decorative);
  border-radius: var(--radius-card);
  background: var(--bg-secondary);
}

.contrast-label {
  margin: 0 0 var(--space-4);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ticks,
.crosses {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
  line-height: 1.45;
}

.ticks li,
.crosses li {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 10px;
  align-items: start;
}

.ticks li::before {
  content: "\2713";
  color: var(--brand);
  font-weight: 700;
}

.crosses li {
  color: var(--text-secondary);
}

.crosses li::before {
  content: "\2715";
  color: var(--text-secondary);
  font-weight: 700;
}

.closing h2 {
  margin-bottom: var(--space-3);
}

@media (min-width: 840px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-10);
  }

  .contrast {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---- The content library --------------------------------------------------
   Four phases, real tips from server/src/cycle/guidance.ts. Tabs are radio
   inputs plus labels rather than buttons, so switching phases needs no
   JavaScript and _headers can keep script-src 'none'. Keyboard users get
   arrow-key navigation for free from the radio group.
   ------------------------------------------------------------------------- */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.phases {
  margin: var(--space-8) 0 var(--space-6);
}

.phase-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 var(--space-6);
}

.phase-tabs label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid var(--border-decorative);
  border-radius: 980px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.phase-tabs label:hover {
  color: var(--text);
  border-color: var(--border-card);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
}

.dot-menstrual { background: #e8879f; }
.dot-follicular { background: #6fb6a0; }
.dot-ovulation { background: #e0a94f; }
.dot-luteal { background: #8f9bb3; }

.phase-panel {
  display: none;
  gap: var(--space-4);
}

/* Each radio reveals the panel at its own index and lights its own tab. */
#phase-1:checked ~ .phase-panels > :nth-child(1),
#phase-2:checked ~ .phase-panels > :nth-child(2),
#phase-3:checked ~ .phase-panels > :nth-child(3),
#phase-4:checked ~ .phase-panels > :nth-child(4) {
  display: grid;
}

#phase-1:checked ~ .phase-tabs label[for="phase-1"],
#phase-2:checked ~ .phase-tabs label[for="phase-2"],
#phase-3:checked ~ .phase-tabs label[for="phase-3"],
#phase-4:checked ~ .phase-tabs label[for="phase-4"] {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

/* The radio is visually hidden, so the focus ring has to move to its label. */
.phase-input:focus-visible ~ .phase-tabs label[for="phase-1"],
.phase-input:focus-visible ~ .phase-tabs label[for="phase-2"],
.phase-input:focus-visible ~ .phase-tabs label[for="phase-3"],
.phase-input:focus-visible ~ .phase-tabs label[for="phase-4"] {
  outline: var(--focus) solid var(--brand-ink);
  outline-offset: 3px;
}

.tip {
  padding: var(--space-5);
  border: 1px solid var(--border-decorative);
  border-radius: var(--radius-card);
  background: var(--bg-secondary);
}

.tip p:last-child {
  margin: 0;
  color: var(--text);
  font-size: 0.9375rem;
  line-height: 1.55;
}

.tip-cat {
  margin: 0 0 10px;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.meta-strip-left {
  justify-items: start;
  margin-top: var(--space-6);
}

@media (min-width: 840px) {
  .phase-panel {
    grid-template-columns: repeat(3, 1fr);
  }

  .meta-strip-left {
    justify-content: flex-start;
  }
}
