/*
  Filia holding page — myfilia.com until launch.

  The palette, type and ring are the site's own (src/styles/tokens.css), and
  the lockup is the end card of the ads: FILIA, letterspaced, inside the
  cycle ring. Heather is the default, regardless of the device's theme.
*/
:root {
  color-scheme: dark;
  --page: #2c2731;
  --paper: #352f3b;
  --sunken: #3f3846;
  --ink: #f0ebf1;
  --muted: #b9a9b9;
  --accent: #c297a6;
  --accent-strong: #d7b3c0;
  --accent-contrast: #221b27;
  --line: #4a4252;
  --line-strong: #5b5164;
  --danger: #e5736b;
  --success: #93c4a4;
  --glow: rgba(66, 57, 74, 0.7);
  --shadow: 0 18px 42px rgba(18, 12, 20, 0.45);

  --c-menses: #bb6276;
  --c-brown: #b08462;
  --c-dry: #8a7d70;
  --c-prepeak: #ccac7d;
  --c-peak: #d58e89;
  --c-post: #8fae9c;

  --sans: 'Manrope', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --gutter: clamp(16px, 5vw, 48px);
  --max: 1120px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
h1, h2, h3 { text-wrap: balance; margin: 0; }
p { margin: 0; }
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.eyebrow {
  font-size: 12px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent-strong);
}
.mono { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-block: clamp(56px, 10vw, 112px) clamp(48px, 8vw, 88px);
  text-align: center;
  background: radial-gradient(ellipse 70% 55% at 50% 30%, var(--glow), transparent 70%);
}
.lockup { position: relative; width: clamp(196px, 36vw, 268px); aspect-ratio: 1; margin-inline: auto; }
.lockup svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.seg { fill: none; stroke-width: 3.1; stroke-linecap: butt; }
.seg-menses { stroke: var(--c-menses); }
.seg-brown { stroke: var(--c-brown); }
.seg-dry { stroke: var(--c-dry); }
.seg-prepeak { stroke: var(--c-prepeak); }
.seg-peak { stroke: var(--c-peak); }
.seg-post { stroke: var(--c-post); }
.wordmark {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: clamp(22px, 4.1vw, 31px); font-weight: 300; letter-spacing: 0.42em;
  /* Letter-spacing trails the last letter; pull it back so FILIA sits centred. */
  text-indent: 0.42em;
  color: var(--ink);
}
/* The ring rests fully drawn; the draw-in only runs from hidden while it
   plays (fill-mode backwards), so anywhere animation doesn't run, such as a
   crawler, a print or a paused tab, still shows the whole logo. */
@media (prefers-reduced-motion: no-preference) {
  .seg { stroke-dasharray: 1; stroke-dashoffset: 0; animation: draw 0.9s cubic-bezier(.4,0,.2,1) backwards; }
  .seg-menses { animation-delay: 0.05s; }
  .seg-brown { animation-delay: 0.2s; }
  .seg-dry { animation-delay: 0.32s; }
  .seg-prepeak { animation-delay: 0.44s; }
  .seg-peak { animation-delay: 0.58s; }
  .seg-post { animation-delay: 0.68s; }
  .wordmark { animation: rise 1s 0.35s cubic-bezier(.2,.7,.2,1) backwards; }
  @keyframes draw { from { stroke-dashoffset: 1; } }
  @keyframes rise { from { opacity: 0; transform: translateY(6px); } }
}
.hero h1 {
  margin-top: clamp(28px, 5vw, 40px);
  font-size: clamp(34px, 6vw, 56px); font-weight: 700; line-height: 1.04; letter-spacing: -0.02em;
}
.hero .lede {
  max-width: 38rem; margin: 18px auto 0;
  font-size: clamp(16px, 2vw, 18px); color: var(--muted);
}
.hero .status { margin-top: 26px; display: inline-flex; align-items: center; gap: 10px; }
.hero .status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--c-post); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c-post) 22%, transparent); }

/* ---------- Sign-up form ---------- */
.signup { max-width: 640px; margin: 22px auto 0; text-align: left; }
.signup .fields { display: grid; grid-template-columns: 1fr 1.3fr auto; gap: 10px; align-items: end; }
.field label { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 700; color: var(--muted); }
.field input {
  width: 100%; height: 50px; padding-inline: 16px;
  border: 1px solid var(--line-strong); border-radius: 14px;
  background: var(--paper); color: var(--ink);
  font: inherit; font-size: 16px;
}
.field input::placeholder { color: color-mix(in srgb, var(--muted) 65%, transparent); }
.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent); }
.signup button {
  height: 50px; padding-inline: 26px; border: 0; border-radius: 999px;
  background: var(--accent); color: var(--accent-contrast);
  font: inherit; font-size: 12px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase;
  cursor: pointer; white-space: nowrap; transition: background-color .2s, transform .2s;
}
.signup button:hover { background: var(--accent-strong); transform: translateY(-1px); }
.signup button:disabled { opacity: .6; cursor: progress; transform: none; }
.signup button:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }
.signup .fine { margin-top: 10px; font-size: 13px; color: var(--muted); }
.signup .status-line { margin-top: 8px; font-size: 14px; font-weight: 600; color: var(--danger); min-height: 0; }
.signup .status-line:empty { display: none; }
.signup .thanks {
  display: none; padding: 20px 22px; border: 1px solid var(--line); border-radius: 18px;
  background: var(--paper); text-align: center;
}
.signup .thanks strong { display: block; font-size: 18px; }
.signup .thanks p { margin-top: 4px; color: var(--muted); }
.signup.is-done .fields, .signup.is-done .fine, .signup.is-done .status-line { display: none; }
.signup.is-done .thanks { display: block; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 640px) {
  .signup .fields { grid-template-columns: 1fr; }
  .signup button { width: 100%; }
}

.scroll-cue { margin-top: clamp(40px, 7vw, 64px); display: inline-flex; flex-direction: column; align-items: center; gap: 8px; color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 600; }
.scroll-cue span[aria-hidden] { width: 1px; height: 34px; background: linear-gradient(var(--line-strong), transparent); }

/* ---------- Photo band ---------- */
.photo { padding-inline: var(--gutter); }
.photo figure { position: relative; max-width: 1280px; margin: 0 auto; border-radius: 28px; overflow: hidden; }
.photo img { width: 100%; height: clamp(280px, 46vw, 560px); object-fit: cover; object-position: 62% 40%; }
.photo figcaption {
  position: absolute; left: clamp(18px, 4vw, 44px); bottom: clamp(18px, 4vw, 40px); max-width: 26rem;
  padding: 16px 20px; border-radius: 18px;
  background: color-mix(in srgb, var(--page) 86%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  font-size: clamp(15px, 1.8vw, 17px); font-weight: 600; line-height: 1.45;
}
.photo figcaption span { display: block; margin-top: 4px; font-size: 13px; font-weight: 500; color: var(--muted); }
/* On a phone the photo is too short to carry a caption over it. */
@media (max-width: 640px) {
  .photo figure { overflow: visible; border-radius: 0; }
  .photo img { border-radius: 22px; }
  .photo figcaption { position: static; max-width: none; margin-top: 14px; padding: 0 4px; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
}

/* ---------- Walkthrough ---------- */
.walk { padding-block: clamp(72px, 11vw, 128px) clamp(40px, 6vw, 64px); }
.walk-head { max-width: 44rem; }
.walk-head h2 { margin-top: 12px; font-size: clamp(30px, 4.6vw, 44px); font-weight: 700; line-height: 1.08; letter-spacing: -0.02em; }
.walk-head p { margin-top: 16px; font-size: 17px; color: var(--muted); }
.walk-grid { margin-top: clamp(40px, 6vw, 64px); display: grid; grid-template-columns: 210px 1fr; gap: clamp(32px, 5vw, 72px); }
.rail { position: sticky; top: 32px; align-self: start; }
.rail ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.rail li {
  position: relative; padding: 7px 0 7px 18px; font-size: 14px; font-weight: 600; color: var(--muted);
  transition: color .25s;
}
.rail li .mono { display: inline-block; width: 2.4em; color: var(--accent); }
.rail li::before {
  content: ''; position: absolute; left: -1px; top: 8px; bottom: 8px; width: 2px; border-radius: 2px;
  background: var(--ink); transform: scaleY(0); transition: transform .25s;
}
.rail li.is-current { color: var(--ink); }
.rail li.is-current::before { transform: scaleY(1); }
.rail .rail-note { margin-top: 18px; padding-left: 18px; font-size: 12px; color: var(--muted); }

.stops { display: grid; gap: clamp(56px, 8vw, 96px); }
.stop { scroll-margin-top: 24px; }
.stop-num { display: flex; align-items: center; gap: 12px; color: var(--accent); }
.stop-num::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.stop h3 { margin-top: 14px; font-size: clamp(25px, 3.4vw, 34px); font-weight: 700; line-height: 1.12; letter-spacing: -0.015em; }
.stop .intro { margin-top: 14px; max-width: 40rem; font-size: 17px; color: var(--muted); }
.stop .detail { margin-top: 26px; }

.items { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.items.cols-3 { grid-template-columns: repeat(3, 1fr); }
.items.cols-2 { grid-template-columns: repeat(2, 1fr); }
.item { padding: 20px 22px; background: var(--paper); }
.item .mono { color: var(--accent); }
.item h4 { margin: 8px 0 0; font-size: 16px; font-weight: 700; }
.item p { margin-top: 6px; font-size: 14.5px; color: var(--muted); }
@media (max-width: 760px) { .items.cols-3, .items.cols-2 { grid-template-columns: 1fr; } }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 7px 14px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--ink); background: transparent; }
.note { margin-top: 16px; font-size: 13.5px; color: var(--muted); }
.example-tag { display: inline-block; padding: 2px 8px; border-radius: 6px; background: var(--sunken); color: var(--muted); }

/* Panel: the shared "specimen card" a few stops use for their illustration. */
.card { padding: clamp(20px, 3vw, 28px); border: 1px solid var(--line); border-radius: 22px; background: var(--paper); box-shadow: var(--shadow); }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }

/* Cycle strip (stop 02) */
.strip { margin-top: 18px; position: relative; padding-top: 40px; }
.strip-bar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; gap: 2px; }
.strip-bar i { display: block; height: 100%; }
.strip-days { display: flex; justify-content: space-between; margin-top: 8px; color: var(--muted); }
.pin { position: absolute; top: 0; transform: translateX(-50%); text-align: center; }
.pin b { display: block; font-size: 12px; font-weight: 800; white-space: nowrap; }
.pin::after { content: ''; display: block; width: 2px; height: 14px; margin: 3px auto 0; background: var(--ink); border-radius: 2px; }

/* Ring legend (stop 03) */
.ring-demo { display: grid; grid-template-columns: auto 1fr; gap: clamp(20px, 4vw, 40px); align-items: center; }
.ring-demo svg { width: clamp(132px, 22vw, 168px); height: auto; }
.legend { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.legend li { display: grid; grid-template-columns: 10px auto 1fr; align-items: baseline; column-gap: 10px; font-size: 14.5px; }
.legend strong { white-space: nowrap; }
.legend i { flex: none; width: 10px; height: 10px; border-radius: 50%; transform: translateY(1px); }
.legend span { color: var(--muted); }
@media (max-width: 520px) {
  .ring-demo { grid-template-columns: 1fr; justify-items: center; }
  .pin .mono { display: none; }
}

/* Gauge (stop 04) */
.gauge { margin-top: 18px; }
.gauge-track { position: relative; display: grid; grid-template-columns: 1fr 3fr 1.4fr; gap: 3px; height: 10px; }
.gauge-track i { border-radius: 999px; }
.gauge-marker { position: absolute; top: 50%; width: 18px; height: 18px; border-radius: 50%; background: var(--paper); border: 3px solid var(--ink); transform: translate(-50%, -50%); }
.gauge-scale { display: flex; justify-content: space-between; margin-top: 10px; color: var(--muted); }
.value { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.value small { font-size: 14px; font-weight: 600; color: var(--muted); letter-spacing: 0; }

/* Steps (stop 05) */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; counter-reset: step; margin: 0; padding: 0; list-style: none; }
.steps li { position: relative; padding: 18px 18px 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); font-size: 14.5px; font-weight: 600; line-height: 1.4; }
.steps li::before { counter-increment: step; content: '0' counter(step); display: block; margin-bottom: 10px; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; color: var(--accent); }
@media (max-width: 860px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .steps { grid-template-columns: 1fr; } }

/* Evidence meter (stop 08) */
.meter { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; margin-top: 14px; }
.meter i { height: 10px; border-radius: 3px; background: var(--sunken); }
.meter i.on { background: var(--c-post); }

@media (max-width: 900px) {
  .walk-grid { grid-template-columns: 1fr; }
  .rail { display: none; }
}

/* ---------- Closing ---------- */
.closing { padding-block: clamp(56px, 9vw, 104px); text-align: center; }
.closing .inner { max-width: 760px; margin-inline: auto; padding: clamp(32px, 6vw, 56px) clamp(20px, 5vw, 56px); border-radius: 32px; background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow); }
.closing svg { width: 64px; height: 64px; margin: 0 auto; }
.closing h2 { margin-top: 18px; font-size: clamp(28px, 4.4vw, 40px); font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; }
.closing p.sub { margin: 12px auto 0; max-width: 32rem; color: var(--muted); }

/* ---------- Footer ---------- */
footer { padding-block: 40px 56px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--muted); }
footer .disclaimer { color: var(--ink); font-weight: 600; }
footer .row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; margin-top: 14px; }
footer details { margin-top: 22px; max-width: 46rem; }
footer summary { cursor: pointer; font-weight: 700; color: var(--ink); }
footer details p { margin-top: 10px; }

/* Scoped additions for navigation and accessible focus. */
.vanguard { margin-top: 24px; }
.vanguard a, footer a { color: var(--ink); text-underline-offset: 4px; text-decoration-color: var(--accent); font-weight: 700; }
:focus-visible, .field input:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.skip-link { position: absolute; top: 8px; left: 8px; z-index: 10; padding: 8px 16px; background: var(--paper); color: var(--ink); transform: translateY(-200%); }
.skip-link:focus { transform: translateY(0); }
[aria-invalid="true"] { border-color: var(--danger); }
