/* wifeline.app — the landing page and its two document pages.
   One idea runs through it: her phone is bone, his is Midnight, and the
   heartbeat line from the app icon crosses the seam between them. */

:root {
  /* Her side (the app's light palette) */
  --bone: #F2ECE1;
  --bone-2: #E9DFD0;
  --paper: #FBF7F0;
  --ink: #2C2620;
  --taupe: #6E6253;
  --muted: #7F7463;
  --rule: #E2D7C5;
  --rose: #B27968;
  --rose-ink: #93594A;   /* rose for small text on bone (4.8:1) */
  --rose-btn: #A2644F;   /* white on it: 4.7:1 */
  --blush: #EFDFD8;

  /* His side (the app's Midnight dark palette, bronze accent) */
  --night: #0F131C;
  --night-2: #151A26;
  --night-card: #1A2030;
  --night-rule: #283044;
  --night-text: #EEE7DB;
  --night-muted: #A39C90;
  --bronze: #8A7B55;
  --bronze-lift: #B0A074;
  --rose-lift: #CD9684;

  /* Phases */
  --menstrual: #B0655F;
  --follicular: #7E8C6A;
  --ovulatory: #C7A24E;
  --luteal: #8C7691;

  /* Twilight: the app icon's tile */
  --twilight-a: #D46A6A;
  --twilight-b: #8A559A;
  --dusk: #19121F;

  --f-display: 'Cormorant Garamond', 'Cormorant', 'Iowan Old Style', Georgia, serif;
  --f-body: 'Mulish', 'Avenir Next', 'Segoe UI', 'Helvetica Neue', sans-serif;

  --gutter: clamp(20px, 5.2vw, 76px);
  --maxw: 1240px;
  --ease-out: cubic-bezier(.16, .84, .24, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}

body {
  margin: 0;
  background: var(--bone);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.6;
  font-feature-settings: 'kern', 'liga';
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Paper grain over everything, very faint */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: .055;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

img { max-width: 100%; display: block; }
.ico { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.chip .ico { width: 14px; height: 14px; stroke-width: 2; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 500; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

:focus-visible {
  outline: 2px solid var(--rose);
  outline-offset: 3px;
  border-radius: 6px;
}
.on-night :focus-visible, .on-night:focus-visible { outline-color: var(--bronze-lift); }

/* ───────── Shared type ───────── */

.display {
  font-family: var(--f-display);
  font-weight: 500;
  line-height: .9;
  letter-spacing: -.02em;
  font-variant-numeric: lining-nums;
}
.display em { font-style: italic; font-weight: 500; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .7em;
  font-family: var(--f-body);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow::before {
  content: '';
  width: 26px;
  height: 1.5px;
  background: currentColor;
  opacity: .7;
}
.on-night .eyebrow { color: var(--night-muted); }

.h2 {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(2.6rem, 5.6vw, 5rem);
  line-height: .95;
  letter-spacing: -.018em;
  margin-top: 18px;
  font-variant-numeric: lining-nums;
  text-wrap: balance;
}
.h2 em { font-style: italic; }
.h2 + .lede { margin-top: 28px; }

.lede {
  font-size: clamp(1.05rem, 1.35vw, 1.2rem);
  line-height: 1.6;
  color: var(--taupe);
  max-width: 34em;
}
.on-night .lede { color: var(--night-muted); }

.wrap {
  width: 100%;
  max-width: calc(var(--maxw) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ───────── Buttons ───────── */

.btn {
  --bg: var(--rose-btn);
  --fg: #fff;
  display: inline-flex;
  align-items: center;
  gap: .6em;
  padding: 15px 26px 15px 28px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--fg);
  font: 700 16px/1 var(--f-body);
  letter-spacing: .01em;
  white-space: nowrap;
  text-decoration: none;
  box-shadow: 0 10px 28px -12px color-mix(in srgb, var(--bg) 80%, transparent);
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out), background .2s;
}
.btn svg { width: 18px; height: 18px; transition: transform .35s var(--ease-out); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 16px 34px -12px color-mix(in srgb, var(--bg) 90%, transparent); }
.btn:hover svg { transform: translateX(4px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn--him { --bg: var(--bronze-lift); --fg: var(--night); }
.btn--ghost {
  --bg: transparent;
  --fg: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--rule);
}
.btn--ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }

.note {
  margin-top: 16px;
  font-size: 14px;
  color: var(--muted);
}
.on-night .note { color: var(--night-muted); }

/* ───────── Brand ───────── */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--ink);
}
.brand img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  box-shadow: 0 4px 12px -4px rgba(138, 85, 154, .45);
}
.wordmark {
  font-family: var(--f-display);
  font-size: 30px;
  font-weight: 500;
  letter-spacing: -.01em;
  line-height: 1;
}
.wordmark b { font-weight: 500; color: var(--rose); }

/* ───────── Phone frame ───────── */

.phone {
  --w: 280px;
  position: relative;
  width: var(--w);
  margin: 0;
  padding: calc(var(--w) * .034);
  border-radius: calc(var(--w) * .16);
  background:
    linear-gradient(145deg, rgba(255,255,255,.55), rgba(255,255,255,0) 38%),
    #D8D0C2;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.6),
    inset 0 0 0 3px rgba(44,38,32,.08),
    0 2px 2px rgba(44,38,32,.06),
    0 30px 60px -22px rgba(44,38,32,.45),
    0 70px 90px -50px rgba(44,38,32,.35);
  flex: none;
}
.phone--night {
  background:
    linear-gradient(145deg, rgba(255,255,255,.16), rgba(255,255,255,0) 40%),
    #20232B;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.12),
    0 30px 60px -20px rgba(0,0,0,.7),
    0 60px 120px -40px rgba(176,160,116,.18);
}
.phone-screen {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--w) * .13);
  background: #FAF5EE;
}
.phone--night .phone-screen { background: #151A26; }
.phone-status {
  position: relative;
  height: calc(var(--w) * .1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 calc(var(--w) * .085) 0 calc(var(--w) * .1);
  font: 700 calc(var(--w) * .04)/1 var(--f-body);
  color: var(--ink);
}
.phone--night .phone-status { color: #F2ECE1; }
.phone-status::after {
  /* the island */
  content: '';
  position: absolute;
  left: 50%;
  top: calc(var(--w) * .026);
  width: calc(var(--w) * .27);
  height: calc(var(--w) * .066);
  transform: translateX(-50%);
  border-radius: 99px;
  background: #0B0B0D;
}
.phone-status svg { height: calc(var(--w) * .036); width: auto; }
.phone-status .icons { display: inline-flex; gap: calc(var(--w) * .014); align-items: center; }
.phone-screen img { width: 100%; height: auto; aspect-ratio: 390 / 844; }

/* Floating UI fragments that sit beside the phones */
.chip-card {
  position: absolute;
  z-index: 3;
  background: var(--paper);
  border-radius: 20px;
  padding: 16px 18px;
  box-shadow: 0 1px 0 rgba(255,255,255,.7) inset, 0 24px 50px -20px rgba(44,38,32,.4);
  font-size: 13px;
  color: var(--ink);
}
.chip-card .k {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 99px;
  background: #EFE7DA;
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
}
.chip--on { background: var(--follicular); color: #fff; }
.chip--add { background: transparent; box-shadow: inset 0 0 0 1.3px var(--rule); color: var(--taupe); }
.bars { display: flex; gap: 4px; margin-top: 12px; align-items: center; }
.bars i { display: block; width: 22px; height: 6px; border-radius: 9px; background: #E4DACB; }
.bars i.on { background: var(--follicular); }
.bars span { margin-left: 8px; font-weight: 700; font-size: 12px; color: var(--taupe); }

/* ═════════════════ HERO ═════════════════ */

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas:
    "hc mc"
    "hp mp";
}
.side-her { background: var(--bone); color: var(--ink); }
.side-him { background: var(--night); color: var(--night-text); }

.nav {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 26px var(--gutter);
}
.nav-links {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: clamp(16px, 2.2vw, 34px);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--night-text);
}
.nav-links a { text-decoration: none; opacity: .78; transition: opacity .2s; }
.nav-links a:hover { opacity: 1; }
.nav-links .btn { opacity: 1; padding: 11px 20px; font-size: 14.5px; }

.hero-copy {
  padding: clamp(116px, 15vh, 164px) var(--gutter) 30px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.hero-copy.side-her { grid-area: hc; }
/* His copy steps down a little: read her side, then his, on a diagonal */
.hero-copy.side-him { grid-area: mc; }
.hero-copy.side-him > * { position: relative; z-index: 3; top: clamp(24px, 5vh, 52px); }

.hero-line {
  font-size: clamp(3.3rem, 7.3vw, 7.6rem);
  margin-top: 22px;
}
.side-her .hero-line em { color: var(--rose); }
.side-him .hero-line em { color: var(--bronze-lift); }
.hero-copy .lede { margin-top: 26px; max-width: 25em; }
.side-him .lede { color: var(--night-muted); }
.hero-copy .btn { margin-top: 30px; }

.hero-phone {
  position: relative;
  height: clamp(420px, 54vh, 600px);
}
.hero-phone.side-her { grid-area: hp; }
.hero-phone.side-him { grid-area: mp; }
.hero-phone .clip {
  /* Above the line: the heartbeat runs behind the phones */
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  justify-content: center;
  overflow: hidden;
  padding-top: 18px;
  -webkit-mask-image: linear-gradient(#000 58%, transparent 97%);
  mask-image: linear-gradient(#000 58%, transparent 97%);
}
.hero-phone .phone {
  --w: clamp(236px, 20.5vw, 296px);
  z-index: 2;
}
.hero-phone.side-her .phone { transform: rotate(-2.2deg); }
.hero-phone.side-him .phone { transform: rotate(2.2deg) translateY(62px); }

/* The heartbeat: flat on her side, spikes across the seam, flat on his */
.beat {
  grid-column: 1 / -1;
  grid-row: 2;
  align-self: start;
  /* Zero height: the line is a horizon, the spike hangs off it both ways
     without stretching the row. */
  height: 0;
  margin-top: clamp(150px, 19vh, 200px);
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  pointer-events: none;
}
.beat-flat {
  flex: 1;
  height: 2.5px;
  border-radius: 3px;
  transform-origin: left center;
}
.beat-flat.l { background: linear-gradient(90deg, rgba(178,121,104,0), var(--rose) 30%); }
.beat-flat.r { background: linear-gradient(90deg, var(--bronze-lift) 70%, rgba(176,160,116,0)); }
.beat-spike {
  width: clamp(200px, 22vw, 320px);
  height: auto;
  flex: none;
  overflow: visible;
  margin-inline: -1px;
}
.beat-spike path {
  fill: none;
  stroke: url(#beatGrad);
  stroke-width: 2.6;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.beat-spike .glow { stroke-width: 9; opacity: .18; filter: blur(4px); }
.beat-tag {
  position: absolute;
  left: 50%;
  top: clamp(124px, 13.5vw, 180px);
  transform: translateX(-50%);
  padding: 9px 16px;
  border-radius: 99px;
  background: var(--paper);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .02em;
  white-space: nowrap;
  box-shadow: 0 12px 30px -12px rgba(0,0,0,.45);
}
.beat-tag b { color: var(--follicular); font-weight: 800; }

/* Hero entrance */
.hero .rise { opacity: 0; transform: translateY(26px); animation: rise 1s var(--ease-out) forwards; }
.hero .side-her .rise:nth-child(1) { animation-delay: .1s; }
.hero .side-her .rise:nth-child(2) { animation-delay: .2s; }
.hero .side-her .rise:nth-child(3) { animation-delay: .32s; }
.hero .side-her .rise:nth-child(4) { animation-delay: .42s; }
.hero .side-him .rise:nth-child(1) { animation-delay: .38s; }
.hero .side-him .rise:nth-child(2) { animation-delay: .48s; }
.hero .side-him .rise:nth-child(3) { animation-delay: .6s; }
.hero .side-him .rise:nth-child(4) { animation-delay: .7s; }
.nav { animation: fade 1s .05s both; }
.hero-phone .clip { animation: phone-in 1.4s var(--ease-out) both; }
.hero-phone.side-her .clip { animation-delay: .45s; }
.hero-phone.side-him .clip { animation-delay: .7s; }
.beat-flat.l { animation: draw-flat .7s .9s var(--ease-out) both; }
.beat-spike .draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw-path 1.1s 1.45s cubic-bezier(.5,0,.3,1) forwards; }
.beat-flat.r { animation: draw-flat .8s 2.35s var(--ease-out) both; }
.beat-tag { animation: tag-in .6s 2.5s var(--ease-out) both; }

@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } }
@keyframes phone-in { from { opacity: 0; transform: translateY(70px); } }
@keyframes draw-flat { from { transform: scaleX(0); } }
@keyframes draw-path { to { stroke-dashoffset: 0; } }
@keyframes tag-in { from { opacity: 0; transform: translate(-50%, 10px) scale(.94); } }

/* Mini bar once the hero is gone */
.minibar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) var(--gutter) 10px;
  background: rgba(251, 247, 240, .84);
  -webkit-backdrop-filter: saturate(1.4) blur(16px);
  backdrop-filter: saturate(1.4) blur(16px);
  border-bottom: 1px solid rgba(44, 38, 32, .08);
  transform: translateY(-110%);
  transition: transform .5s var(--ease-out);
}
.minibar.show { transform: none; }
.minibar .brand img { width: 28px; height: 28px; border-radius: 7px; }
.minibar .wordmark { font-size: 25px; }
.minibar nav { display: flex; gap: 26px; font-size: 14px; font-weight: 600; color: var(--taupe); }
.minibar nav a { text-decoration: none; }
.minibar nav a:hover { color: var(--ink); }
.minibar .btn { padding: 10px 18px; font-size: 14px; }

/* ═════════════════ PHASES ═════════════════ */

.phases { padding-block: clamp(96px, 13vw, 168px) clamp(90px, 11vw, 150px); }
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 28px 64px;
  align-items: end;
}
.section-head .lede { padding-bottom: 10px; }

.cycle-strip {
  margin-top: clamp(56px, 7vw, 88px);
  position: relative;
}
.cycle-days {
  display: grid;
  grid-template-columns: repeat(29, 1fr);
  gap: 4px;
  align-items: end;
}
.cycle-days i {
  height: 12px;
  border-radius: 6px;
  background: var(--c);
  opacity: .85;
  transform-origin: bottom;
}
.cycle-days i.m { --c: var(--menstrual); }
.cycle-days i.f { --c: var(--follicular); }
.cycle-days i.o { --c: var(--ovulatory); }
.cycle-days i.l { --c: var(--luteal); }
.cycle-days i.today { position: relative; height: 34px; opacity: 1; box-shadow: 0 8px 18px -8px var(--follicular); }
.cycle-days i.today b {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--follicular);
  white-space: nowrap;
}
.phase.is-today { box-shadow: 0 0 0 2px var(--follicular), 0 20px 40px -24px rgba(126,140,106,.6); }
.cycle-marks {
  display: grid;
  grid-template-columns: repeat(29, 1fr);
  gap: 4px;
  margin-top: 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.cycle-marks span:nth-child(1) { grid-column: 1; }
.cycle-marks span:nth-child(2) { grid-column: 6; }
.cycle-marks span:nth-child(3) { grid-column: 9; color: var(--follicular); }
.cycle-marks span:nth-child(4) { grid-column: 14; }
.cycle-marks span:nth-child(5) { grid-column: 18; }
.cycle-marks span:nth-child(6) { grid-column: 29; text-align: right; }

.phase-grid {
  margin-top: 34px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
.phase {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 26px;
  overflow: hidden;
  background: var(--paper);
  box-shadow: 0 1px 2px rgba(44,38,32,.05), 0 20px 40px -28px rgba(44,38,32,.35);
  transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out);
}
.phase:hover { transform: translateY(-6px); box-shadow: 0 1px 2px rgba(44,38,32,.05), 0 34px 60px -30px color-mix(in srgb, var(--c) 70%, transparent); }
.phase.m { --c: var(--menstrual); }
.phase.f { --c: var(--follicular); }
.phase.o { --c: var(--ovulatory); }
.phase.l { --c: var(--luteal); }
.phase-her {
  padding: 26px 24px 24px;
  flex: 1;
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 13%, var(--paper)), var(--paper) 70%);
}
.phase-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}
.phase-meta::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 22%, transparent);
}
.phase h3 {
  font-family: var(--f-display);
  font-size: clamp(1.9rem, 2.4vw, 2.3rem);
  line-height: 1;
  margin-top: 16px;
}
.who {
  display: block;
  margin-top: 18px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--c) 70%, var(--ink));
}
.phase-her p { margin-top: 6px; color: var(--taupe); font-size: 15.5px; line-height: 1.55; }
.phase-him {
  padding: 22px 24px 26px;
  background: var(--night);
  color: var(--night-text);
}
.phase-him .who { margin-top: 0; color: var(--bronze-lift); }
.phase-him p {
  margin-top: 8px;
  font-family: var(--f-display);
  font-style: italic;
  font-size: 1.32rem;
  line-height: 1.25;
}

/* ═════════════════ HER SIDE ═════════════════ */

.her-side {
  padding-block: clamp(90px, 11vw, 150px);
  background:
    radial-gradient(60% 70% at 18% 40%, rgba(178,121,104,.16), transparent 70%),
    linear-gradient(180deg, var(--bone), #EEE3D9);
  overflow: hidden;
}
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  gap: clamp(40px, 7vw, 110px);
  align-items: center;
}
.split--flip { grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); }
.stage {
  position: relative;
  display: flex;
  justify-content: center;
  padding-block: 30px;
}
.stage .phone { --w: clamp(250px, 24vw, 310px); }
.her-side .stage .phone { transform: rotate(-4deg); }

.her-side .log-card { left: max(0px, calc(50% + 6vw)); bottom: 12%; width: 250px; transform: rotate(3deg); }
.notif {
  position: absolute;
  z-index: 3;
  top: 8%;
  right: max(-10px, calc(50% - 22vw));
  width: 270px;
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 2px 12px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 22px;
  background: rgba(251, 247, 240, .74);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: 0 1px 0 rgba(255,255,255,.8) inset, 0 24px 48px -22px rgba(44,38,32,.45);
  font-size: 13px;
  transform: rotate(-2deg);
}
.notif img { grid-row: span 2; width: 38px; height: 38px; border-radius: 10px; }
.notif .t { display: flex; justify-content: space-between; font-weight: 800; font-size: 12px; letter-spacing: .04em; color: var(--ink); }
.notif .t span { font-weight: 600; color: var(--muted); letter-spacing: 0; }
.notif p { color: var(--taupe); }

.features {
  list-style: none;
  margin: 44px 0 0;
  padding: 0;
  display: grid;
  gap: 0;
  counter-reset: f;
}
.features li {
  counter-increment: f;
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 4px 12px;
  padding: 20px 0;
  border-top: 1px solid var(--rule);
}
.features li:last-child { border-bottom: 1px solid var(--rule); }
.features li::before {
  content: counter(f, decimal-leading-zero);
  grid-row: span 2;
  font-family: var(--f-display);
  font-style: italic;
  font-size: 26px;
  line-height: 1;
  color: var(--rose);
  font-variant-numeric: lining-nums;
}
.features h3 { font: 800 16.5px/1.35 var(--f-body); letter-spacing: .005em; }
.features p { color: var(--taupe); font-size: 15.5px; line-height: 1.55; }
.on-night .features li { border-color: var(--night-rule); }
.on-night .features li::before { color: var(--bronze-lift); }
.on-night .features p { color: var(--night-muted); }

/* ═════════════════ HIS SIDE ═════════════════ */

.his-side {
  position: relative;
  padding-block: clamp(90px, 11vw, 150px);
  background:
    radial-gradient(50% 60% at 82% 45%, rgba(176,160,116,.13), transparent 70%),
    radial-gradient(40% 50% at 10% 100%, rgba(140,118,145,.12), transparent 70%),
    var(--night);
  color: var(--night-text);
  overflow: hidden;
}
.his-side .stage .phone { transform: rotate(3.5deg); }
.move-card {
  left: max(-12px, calc(50% - 21vw));
  bottom: 14%;
  width: 262px;
  background: #1F2637;
  color: var(--night-text);
  box-shadow: 0 1px 0 rgba(255,255,255,.06) inset, 0 28px 56px -18px rgba(0,0,0,.8);
  transform: rotate(-3deg);
}
.move-card .k { color: var(--bronze-lift); }
.move-card .q { margin-top: 6px; font-family: var(--f-display); font-style: italic; font-size: 20px; line-height: 1.2; }
.move-card .pick {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 11px 12px;
  border-radius: 14px;
  background: rgba(176,160,116,.14);
  box-shadow: inset 0 0 0 1px rgba(176,160,116,.4);
  font-weight: 600;
  line-height: 1.35;
}
.move-card .pick svg { flex: none; width: 18px; height: 18px; margin-top: 1px; color: var(--bronze-lift); }
.noticed {
  position: absolute;
  z-index: 4;
  right: max(-6px, calc(50% - 19vw));
  top: 16%;
  display: grid;
  place-items: center;
  width: 108px;
  height: 108px;
  border-radius: 50%;
  background: var(--rose-lift);
  color: var(--night);
  text-align: center;
  font: 800 11px/1.25 var(--f-body);
  letter-spacing: .16em;
  text-transform: uppercase;
  box-shadow: 0 0 0 6px rgba(205,150,132,.18), 0 20px 40px -12px rgba(0,0,0,.7);
  transform: rotate(12deg);
}
.noticed svg { width: 24px; height: 24px; margin: 0 auto 4px; display: block; }

.flow {
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  position: relative;
}
.flow::before {
  content: '';
  position: absolute;
  left: 7px;
  right: 12%;
  top: 7px;
  height: 1.5px;
  background: linear-gradient(90deg, var(--rose-lift), var(--bronze-lift) 65%, var(--rose-lift));
  transform-origin: left;
}
.flow li { position: relative; padding-top: 28px; padding-right: 12px; font-size: 14px; line-height: 1.4; color: var(--night-muted); }
.flow li::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--night);
  box-shadow: inset 0 0 0 2px var(--bronze-lift);
}
.flow li:nth-child(1)::before, .flow li:nth-child(4)::before { box-shadow: inset 0 0 0 2px var(--rose-lift); }
.flow li:nth-child(4)::before { background: var(--rose-lift); }
.flow b { display: block; color: var(--night-text); font-size: 15px; margin-bottom: 2px; }

/* ═════════════════ TOGETHER ═════════════════ */

.together {
  position: relative;
  padding-block: clamp(96px, 12vw, 160px);
  color: var(--night-text);
  background:
    radial-gradient(70% 55% at 0% 0%, rgba(212,106,106,.30), transparent 70%),
    radial-gradient(60% 60% at 100% 100%, rgba(138,85,154,.42), transparent 70%),
    radial-gradient(40% 40% at 60% 30%, rgba(138,85,154,.12), transparent 70%),
    var(--dusk);
  overflow: hidden;
}
.together .eyebrow { color: #D9B9C2; }
.together .h2 em { color: #E7A9A0; }
.together .lede { color: #C9B8C6; }
.together .lede strong { color: var(--night-text); font-weight: 700; }

.line-panel {
  margin: clamp(48px, 6vw, 72px) 0 0;
  padding: clamp(22px, 3vw, 36px) clamp(18px, 3vw, 40px) 26px;
  border-radius: 28px;
  background: rgba(15, 10, 20, .42);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.07);
}
.line-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
}
.line-head .t { font-family: var(--f-display); font-size: 28px; line-height: 1; }
.line-head .s { font-size: 13px; color: #B9A9B8; }
#line-art { margin-top: 18px; width: 100%; }
#line-art svg { width: 100%; height: auto; display: block; overflow: visible; font-family: var(--f-body); }
#line-art .s { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .45s ease-out; }
#line-art .f { opacity: 0; transition: opacity .7s ease-out; }
.line-panel.in #line-art .s { stroke-dashoffset: 0; }
.line-panel.in #line-art .f { opacity: 1; }
html:not(.js) #line-art { display: none; }
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin-top: 18px;
  font-size: 13.5px;
  color: #CDBFCB;
}
.legend span { display: inline-flex; align-items: center; gap: 10px; }
.legend i { display: inline-block; width: 26px; height: 3px; border-radius: 3px; }
.legend .her i { background: var(--rose-lift); }
.legend .him i { background: var(--bronze-lift); }
.legend .both i { height: 10px; background: linear-gradient(90deg, var(--rose-lift) 0 50%, var(--bronze-lift) 50%); border-radius: 6px; }
.legend .gap i { height: 2px; background: repeating-linear-gradient(90deg, #8C7E8C 0 2px, transparent 2px 6px); }

.together-grid {
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.t-card {
  position: relative;
  padding: 28px 26px 30px;
  border-radius: 26px;
  background: rgba(255,255,255,.045);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
  transition: background .4s, transform .5s var(--ease-out);
}
.t-card:hover { background: rgba(255,255,255,.07); transform: translateY(-4px); }
.t-card h3 { font-family: var(--f-display); font-size: 2rem; line-height: 1; margin-top: 22px; }
.t-card p { margin-top: 10px; color: #C9B8C6; font-size: 15.5px; line-height: 1.55; }
.t-card .viz { height: 74px; display: flex; align-items: flex-end; }

.ranks { display: flex; align-items: flex-end; gap: 7px; }
.ranks span { display: grid; justify-items: center; gap: 8px; font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #A8979F; }
.ranks i { display: block; width: 16px; border-radius: 5px; background: rgba(255,255,255,.12); }
.ranks span:nth-child(1) i { height: 14px; background: var(--rose-lift); }
.ranks span:nth-child(2) i { height: 26px; background: var(--rose-lift); }
.ranks span:nth-child(3) i { height: 38px; }
.ranks span:nth-child(4) i { height: 52px; }
.ranks span:nth-child(2) { color: var(--night-text); }

.seal { position: relative; width: 74px; height: 74px; flex: none; }
.seal svg { width: 100%; height: 100%; }
.seal-quote { font-family: var(--f-display); font-style: italic; font-size: 1.35rem; line-height: 1.15; color: var(--night-text); margin-left: 16px; }
.jar-viz { display: flex; align-items: center; }

.score { display: flex; align-items: baseline; gap: 10px; }
.score b { font-family: var(--f-display); font-weight: 500; font-size: 64px; line-height: .8; font-variant-numeric: lining-nums; }
.score span { font-size: 13px; color: #B9A9B8; line-height: 1.3; }

/* ═════════════════ BABY ═════════════════ */

.baby {
  padding-block: clamp(96px, 12vw, 160px);
  background:
    radial-gradient(50% 60% at 85% 20%, rgba(199,162,78,.16), transparent 70%),
    var(--bone);
  overflow: hidden;
}
.baby .split { align-items: start; }
.duo {
  position: relative;
  min-height: 640px;
}
.duo .phone { position: absolute; --w: clamp(230px, 21vw, 280px); }
.duo .phone:nth-child(1) { left: 0; top: 0; transform: rotate(-3deg); }
.duo .phone:nth-child(2) { right: 0; top: 110px; transform: rotate(3deg); }
.baby .features li::before { color: #A98632; }
.baby-note {
  margin-top: 30px;
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 14px;
  padding: 22px 24px;
  border-radius: 20px;
  background: rgba(251,247,240,.75);
  box-shadow: inset 0 0 0 1px var(--rule);
  font-size: 15px;
  color: var(--taupe);
}
.baby-note svg { width: 24px; height: 24px; color: var(--luteal); margin-top: 2px; }
.baby-note b { color: var(--ink); }

/* ═════════════════ PRIVACY ═════════════════ */

.privacy {
  padding-block: clamp(96px, 12vw, 160px);
  background: var(--night);
  color: var(--night-text);
}
.privacy .h2 em { color: var(--bronze-lift); }
.privacy-grid {
  margin-top: clamp(48px, 6vw, 80px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--night-rule);
}
.p-item {
  padding: 34px 34px 38px 0;
  border-bottom: 1px solid var(--night-rule);
}
.p-item:not(:nth-child(3n + 1)) { padding-left: 34px; border-left: 1px solid var(--night-rule); }
.p-item svg { width: 30px; height: 30px; color: var(--bronze-lift); }
.p-item h3 { margin-top: 20px; font-family: var(--f-display); font-size: 1.85rem; line-height: 1.05; }
.p-item p { margin-top: 10px; color: var(--night-muted); font-size: 15.5px; line-height: 1.6; }
.p-item a { color: var(--bronze-lift); text-underline-offset: 3px; }
.privacy-links { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 14px; }
.privacy-links .btn--ghost { --fg: var(--night-text); box-shadow: inset 0 0 0 1.5px var(--night-rule); }
.privacy-links .btn--ghost:hover { box-shadow: inset 0 0 0 1.5px var(--night-text); }

/* ═════════════════ FINALE ═════════════════ */

/* "Get on | the same line." — the words sit on the line like a baseline,
   and the spike fills the gap at the seam. */
.finale {
  --fs: clamp(3rem, 5.6vw, 6rem);
  --pt: clamp(110px, 12vw, 170px);
  --inner: clamp(100px, 11vw, 170px);
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.finale > .side-her, .finale > .side-him {
  padding: var(--pt) var(--gutter) clamp(90px, 10vw, 140px);
  display: flex;
  flex-direction: column;
}
.finale > .side-her { align-items: flex-end; text-align: right; padding-right: var(--inner); }
.finale > .side-him { align-items: flex-start; padding-left: var(--inner); }
.finale .display { font-size: var(--fs); line-height: 1; white-space: nowrap; }
.finale .side-her .display { color: var(--ink); }
.finale .side-her em { color: var(--rose); }
.finale .side-him em { color: var(--bronze-lift); }
.finale .btn { margin-top: 44px; }
.finale .beat {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(var(--pt) + var(--fs) * .86);
  margin: 0;
  grid-row: auto;
}
.finale .beat-spike { width: clamp(140px, 14vw, 220px); }
.finale .beat .beat-flat, .finale .beat .draw { animation: none; }
.finale.in .beat-flat.l { animation: draw-flat .7s .1s var(--ease-out) both; }
.finale.in .beat .draw { animation: draw-path 1s .6s cubic-bezier(.5,0,.3,1) forwards; }
.finale.in .beat-flat.r { animation: draw-flat .7s 1.4s var(--ease-out) both; }
.finale:not(.in) .beat-flat { transform: scaleX(0); }

.footer {
  background: var(--night-2);
  color: var(--night-muted);
  padding: 48px var(--gutter) calc(40px + env(safe-area-inset-bottom, 0px));
  font-size: 14px;
}
.footer .row {
  max-width: calc(var(--maxw));
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 22px 40px;
}
.footer .brand { color: var(--night-text); }
.footer .brand b { color: var(--rose-lift); }
.footer nav { display: flex; flex-wrap: wrap; gap: 10px 28px; }
.footer nav a { text-decoration: none; color: var(--night-text); opacity: .8; }
.footer nav a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }
.footer .fine { max-width: calc(var(--maxw)); margin: 30px auto 0; padding-top: 22px; border-top: 1px solid var(--night-rule); font-size: 13px; line-height: 1.6; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 30px; }

/* ═════════════════ Scroll reveals ═════════════════ */

.js .reveal { opacity: 0; transform: translateY(34px); transition: opacity 1s var(--ease-out), transform 1.1s var(--ease-out); }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal.d1 { transition-delay: .08s; }
.js .reveal.d2 { transition-delay: .16s; }
.js .reveal.d3 { transition-delay: .24s; }
.js .reveal.d4 { transition-delay: .32s; }
.js .cycle-days i { transform: scaleY(0); transition: transform .6s var(--ease-out); }
.js .cycle-strip.in .cycle-days i { transform: none; }
.js .flow::before { transform: scaleX(0); transition: transform 1.4s .3s var(--ease-out); }
.js .flow.in::before { transform: none; }

/* ═════════════════ Document pages (privacy, terms, 404) ═════════════════ */

.doc-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 26px var(--gutter);
}
.doc-top a.back { font-size: 14.5px; font-weight: 700; color: var(--rose-ink); text-decoration: none; }
.doc-top a.back:hover { text-decoration: underline; text-underline-offset: 4px; }
.doc {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(40px, 7vw, 90px) var(--gutter) 110px;
}
.doc h1 { font-family: var(--f-display); font-size: clamp(3rem, 8vw, 5.2rem); line-height: .95; letter-spacing: -.02em; margin-top: 18px; }
.doc .meta { margin-top: 18px; font-size: 14px; color: var(--muted); }
.doc .intro { margin-top: 30px; font-size: 1.15rem; color: var(--taupe); }
.doc h2 { font-family: var(--f-display); font-size: 2rem; line-height: 1.1; margin-top: 52px; padding-top: 30px; border-top: 1px solid var(--rule); }
.doc h3 { font: 800 16px/1.4 var(--f-body); margin-top: 26px; }
.doc p, .doc li { color: #4E4539; font-size: 16.5px; line-height: 1.7; }
.doc p + p { margin-top: 14px; }
.doc ul { padding-left: 1.2em; margin: 14px 0 0; }
.doc li + li { margin-top: 8px; }
.doc li::marker { color: var(--rose); }
.doc a { color: var(--rose-ink); text-underline-offset: 3px; }
.doc strong { color: var(--ink); }
.doc .callout { margin-top: 30px; padding: 22px 24px; border-radius: 18px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--rule); }
.doc .callout p { font-size: 15.5px; }

.lost {
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 40px var(--gutter);
}
.lost .display { font-size: clamp(4rem, 14vw, 9rem); }
.lost .lede { margin: 18px auto 0; }
.lost .btn { margin-top: 34px; }
.lost svg { width: min(320px, 70vw); margin: 0 auto 30px; }
.lost svg path { fill: none; stroke: var(--rose); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

/* ═════════════════ Responsive ═════════════════ */

@media (max-width: 1100px) {
  .beat-tag { display: none; }
  .phase-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .together-grid { grid-template-columns: 1fr; }
  .t-card { display: grid; grid-template-columns: 250px 1fr; gap: 0 32px; align-items: center; }
  .t-card .viz { grid-row: span 2; justify-content: flex-start; align-items: center; }
  .t-card h3 { margin-top: 0; }
  .privacy-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .p-item:not(:nth-child(3n + 1)) { padding-left: 0; border-left: 0; }
  .p-item:nth-child(2n) { padding-left: 34px; border-left: 1px solid var(--night-rule); }
  .minibar nav { display: none; }
}

@media (max-width: 1000px) {
  .nav-links a:not(.btn) { display: none; }
}

@media (max-width: 900px) {
  .section-head { grid-template-columns: 1fr; }
  .split, .split--flip { grid-template-columns: 1fr; }
  .his-side .split > .stage { order: 2; }
  .stage { padding-block: 10px 30px; }
  .baby .duo { max-width: 560px; width: 100%; margin-inline: auto; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }

  .hero {
    grid-template-columns: 1fr;
    grid-template-areas: "hc" "hp" "beat" "mc" "mp";
  }
  .nav { grid-template-columns: auto auto; justify-content: space-between; padding: 20px var(--gutter); }
  .nav-links a:not(.btn) { display: none; }
  .nav-links .btn { --bg: var(--ink); --fg: var(--bone); padding: 10px 16px; font-size: 13.5px; box-shadow: none; }
  .hero-copy { padding-top: 112px; padding-bottom: 26px; }
  .hero-copy.side-him { padding-top: 92px; }
  .hero-line { font-size: clamp(3rem, 14.5vw, 4.6rem); }
  .hero-phone { height: 420px; }
  .hero-phone .clip { -webkit-mask-image: linear-gradient(#000 55%, transparent 95%); mask-image: linear-gradient(#000 55%, transparent 95%); }
  .hero-phone .phone { --w: min(68vw, 270px); }
  .hero-phone.side-him .phone { transform: rotate(2deg); }
  .hero .beat { grid-area: beat; margin-top: 0; height: 0; align-self: center; z-index: 3; }
  .beat-spike { width: min(46vw, 200px); }
  .beat-flat.l { background: linear-gradient(90deg, rgba(178,121,104,0), var(--rose) 40%); }
  .beat-tag { display: none; }

  .cycle-days { gap: 2px; }
  .cycle-marks { gap: 2px; font-size: 11px; }
  .phase-grid { grid-template-columns: 1fr; }

  .notif { right: 0; top: 0; width: 248px; }
  .her-side .log-card { left: 0; bottom: 4%; width: 230px; }
  .move-card { left: 0; bottom: 6%; width: 236px; }
  .noticed { right: 2px; top: 10%; width: 92px; height: 92px; font-size: 10px; }

  .flow { grid-template-columns: 1fr 1fr; row-gap: 26px; }
  .flow::before { display: none; }

  .t-card { grid-template-columns: 1fr; }
  .t-card .viz { justify-content: flex-start; }
  .t-card h3 { margin-top: 22px; }

  .duo { min-height: 0; display: flex; justify-content: center; padding-bottom: 40px; }
  .duo .phone { position: relative; --w: min(46vw, 230px); }
  .duo .phone:nth-child(1) { left: auto; top: 0; margin-right: -8vw; }
  .duo .phone:nth-child(2) { right: auto; top: 60px; }

  .privacy-grid { grid-template-columns: 1fr; }
  .p-item, .p-item:nth-child(2n), .p-item:not(:nth-child(3n + 1)) { padding: 28px 0 30px; border-left: 0; }

  .finale { grid-template-columns: 1fr; }
  .finale > .side-her { align-items: flex-start; text-align: left; padding: 96px var(--gutter) 80px; }
  .finale > .side-him { grid-row: 3; padding: 84px var(--gutter) 80px; }
  .finale .beat { top: auto; position: relative; grid-row: 2; height: 0; z-index: 2; }
  .finale .beat-spike { width: min(42vw, 180px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .beat-spike .draw { stroke-dashoffset: 0; }
  .finale:not(.in) .beat-flat { transform: none; }
}
