/* Birthtide site. Palette and type follow the iOS app (Theme.swift, D-87):
   lavender-white canvas, ink text, coral from the app icon, SF Rounded. */
:root {
  color-scheme: light dark;
  --canvas: #faf8ff;
  --surface: #ffffff;
  --raised: #f0e9fc;
  --text: #241d33;
  --muted: #62556f;
  --accent: #674095;
  --line: #e2d9f0;
  --coral: #ff866f;
  --coral-press: #f4735b;
  --ink: #1b201f;
  --night: #171421;
  --night-text: #f7f3fe;
  --night-muted: #c8bed4;
  --night-line: rgb(255 255 255 / .14);
  --dusk: #4a3d66;
  --shadow: 36 29 51;
  --font: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: min(100% - 2rem, 70rem);
  --narrow: min(100% - 2rem, 41rem);
}
@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #171421;
    --surface: #241f30;
    --raised: #2b2538;
    --text: #f7f3fe;
    --muted: #c8bed4;
    --accent: #c3a6ff;
    --line: #3a3249;
    --night: #0f0d16;
    --dusk: #2b2538;
    --shadow: 0 0 0;
  }
}

* { box-sizing: border-box; }
html { font-family: var(--font); line-height: 1.6; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--canvas); color: var(--text); font-size: 1.0625rem; }
@media (min-width: 48rem) { body { font-size: 1.125rem; } }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { font-weight: 700; text-wrap: balance; margin: 0; }
p { margin: 0 0 1em; text-wrap: pretty; }
a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
main:focus { outline: none; }
.wrap { width: var(--wrap); margin-inline: auto; }
.skip { position: absolute; top: .5rem; left: 1rem; z-index: 2; padding: .625rem 1rem; border-radius: .75rem; background: var(--surface); transform: translateY(-200%); }
.skip:focus { transform: none; }

/* Header: sticky, with EN/FR/DE as real links (as on theverbi.com) */
.site-header { position: sticky; top: 0; z-index: 10; background: var(--canvas); background: color-mix(in srgb, var(--canvas) 86%, transparent); -webkit-backdrop-filter: saturate(1.4) blur(16px); backdrop-filter: saturate(1.4) blur(16px); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .75rem; }
.brand { display: inline-flex; align-items: center; gap: .625rem; min-height: 2.75rem; color: var(--text); font-size: 1.25rem; font-weight: 700; letter-spacing: -.02em; text-decoration: none; }
.brand img, .footer-brand img { border-radius: 22.5%; }
.header-end { display: flex; align-items: center; gap: .5rem; }
.site-nav { display: flex; align-items: center; gap: .125rem; }
.site-nav a { display: inline-flex; align-items: center; min-height: 2.75rem; padding-inline: .75rem; border-radius: 999px; color: var(--text); font-weight: 600; text-decoration: none; }
.site-nav a:hover { background: var(--raised); }
.lang { display: flex; gap: .125rem; padding: .1875rem; border-radius: 999px; background: var(--raised); }
.lang a { display: inline-grid; place-items: center; min-width: 2.75rem; min-height: 2.375rem; padding-inline: .5rem; border-radius: 999px; color: var(--muted); font-size: .875rem; font-weight: 700; letter-spacing: .02em; text-decoration: none; }
.lang a:hover { color: var(--text); }
.lang a[aria-current] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgb(var(--shadow) / .14); }
.nav-store { display: inline-flex; align-items: center; min-height: 2.75rem; padding-inline: 1rem; border-radius: 999px; background: var(--text); color: var(--canvas); font-weight: 700; text-decoration: none; }
.nav-store:hover { background: var(--accent); }
@media (max-width: 52rem) { .nav-store { display: none; } }
@media (max-width: 40rem) { .site-nav { display: none; } .lang a { min-width: 2.5rem; } }
@supports (animation-timeline: scroll()) {
  .site-header { animation: header-rule linear both; animation-timeline: scroll(); animation-range: 0 4rem; }
}
@keyframes header-rule { from { box-shadow: 0 1px 0 transparent; } to { box-shadow: 0 1px 0 var(--line); } }
[id] { scroll-margin-top: 5rem; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

.site-footer { margin-top: 2rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .9375rem; }
.site-footer .wrap { display: grid; gap: 1rem 2rem; padding-block: 2.5rem 3rem; }
.footer-brand { display: flex; align-items: center; gap: .5rem; margin: 0; color: var(--text); font-weight: 700; }
.footer-nav { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
.footer-nav a { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--muted); }
.site-footer p { margin: 0; max-width: 46rem; }
@media (min-width: 48rem) {
  .site-footer .wrap { grid-template-columns: auto 1fr; align-items: center; }
  .footer-nav { justify-content: flex-end; }
  .site-footer p:not(.footer-brand) { grid-column: 1 / -1; }
}

/* Buttons */
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 3.25rem; padding: .75rem 1.625rem; border-radius: 999px; background: var(--coral); color: var(--ink); font-weight: 700; letter-spacing: -.01em; text-decoration: none; }
.button:hover { background: var(--coral-press); }
.button:active { transform: translateY(1px); }
.fine { color: var(--muted); font-size: .9375rem; }

/* Phone frame around real app screenshots */
.phone { position: relative; padding: .5rem; border-radius: 3rem; background: var(--ink); box-shadow: 0 2px 4px rgb(var(--shadow) / .12), 0 2.5rem 5rem -1.5rem rgb(var(--shadow) / .35); }
.phone img { width: 100%; border-radius: 2.5rem; }
.screen { position: relative; overflow: hidden; border-radius: 2.5rem; }
.phone::before { content: ""; position: absolute; z-index: 1; top: 1.15rem; left: 50%; width: 30%; height: 1.55rem; border-radius: 999px; background: #000; transform: translateX(-50%); }
.phone.small { border-radius: 2.4rem; padding: .4rem; }
.phone.small img { border-radius: 2rem; }
.phone.small::before { top: .9rem; height: 1.2rem; }

/* Home: hero */
.hero { display: grid; gap: 3rem; padding-block: 2.5rem 1rem; }
.hero h1 { font-size: clamp(2.75rem, 1.6rem + 5vw, 5rem); line-height: 1.02; letter-spacing: -.03em; margin-bottom: 1.5rem; }
.hero h1 span { display: block; }
.hero h1 .kicker { font-size: 1.0625rem; line-height: 1.4; letter-spacing: 0; color: var(--accent); margin-bottom: 1rem; }
.hero .lede { max-width: 34rem; color: var(--muted); font-size: 1.25rem; line-height: 1.5; margin-bottom: 2rem; }
.hero .fine { max-width: 30rem; margin-top: 1rem; }
.hero-phone { justify-self: center; width: min(76vw, 19rem); }
@media (max-width: 59.99rem) {
  .hero-phone { max-height: 31rem; overflow: hidden; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
}
@media (min-width: 60rem) {
  .hero { grid-template-columns: minmax(0, 1fr) 20rem; align-items: center; gap: 5rem; padding-block: 4rem 6rem; }
  .hero-phone { width: 20rem; }
}

/* Section rhythm */
.section { padding-block: 4rem; }
.section h2 { font-size: clamp(2rem, 1.35rem + 2.2vw, 3rem); line-height: 1.08; letter-spacing: -.022em; margin-bottom: 1rem; }
.section .intro { max-width: 38rem; color: var(--muted); font-size: 1.1875rem; line-height: 1.55; }

/* The tide line: contractions as waves on a time axis */
.tide { margin: 2.5rem 0 0; view-timeline: --tide block; }
.tide svg { display: block; width: 100%; height: auto; overflow: visible; }
.tide .tide-narrow { display: none; }
@media (max-width: 40rem) { .tide .tide-wide { display: none; } .tide .tide-narrow { display: block; } }
.tide-line { fill: none; stroke: var(--text); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.tide-fill { fill: var(--coral); }
.tide-tick { stroke: var(--muted); stroke-width: 1.5; stroke-linecap: round; }
.tide-bracket { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; }
.tide-time, .tide-duration { fill: var(--muted); font-family: var(--font); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tide-duration { text-anchor: middle; }
.tide-interval { fill: var(--accent); font-family: var(--font); font-size: 14px; font-weight: 700; text-anchor: middle; font-variant-numeric: tabular-nums; }
.tide figcaption { display: flex; flex-wrap: wrap; gap: .75rem 2rem; margin-top: 1.5rem; color: var(--muted); font-size: .9375rem; }
.tide figcaption span { display: inline-flex; align-items: center; gap: .625rem; }
.tide figcaption svg { flex: none; width: 2rem; height: 1rem; }
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .tide > svg .tide-line { stroke-dasharray: 1 2; animation: tide-draw linear both; animation-timeline: --tide; animation-range: entry 20% cover 50%; }
    .tide > svg .tide-fill, .tide > svg .tide-duration { animation: tide-fade linear both; animation-timeline: --tide; animation-range: cover 38% cover 50%; }
    .tide > svg .tide-bracket, .tide > svg .tide-interval, .tide > svg .tide-time, .tide > svg .tide-tick { animation: tide-fade linear both; animation-timeline: --tide; animation-range: cover 44% cover 56%; }
  }
}
@keyframes tide-draw { from { stroke-dashoffset: 1.01; } to { stroke-dashoffset: 0; } }
@keyframes tide-fade { from { opacity: 0; } to { opacity: 1; } }

/* Night band */
.night { background: var(--night); color: var(--night-text); }
.night .wrap { display: grid; gap: 2rem 4rem; }
.night h2 { color: var(--night-text); }
.night .intro { color: var(--night-muted); }
.promises { list-style: none; margin: 0; padding: 0; }
.promises li { padding-block: 1.375rem; border-top: 1px solid var(--night-line); }
.promises li:last-child { border-bottom: 1px solid var(--night-line); }
.promises h3 { font-size: 1.1875rem; line-height: 1.3; margin-bottom: .375rem; }
.promises p { margin: 0; color: var(--night-muted); }
@media (min-width: 56rem) {
  .night .wrap { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; }
  .night .section-head { position: sticky; top: 2rem; }
}

/* App screens */
.shots { list-style: none; margin: 2.5rem 0 0; padding: 0; display: grid; gap: 2.5rem; }
.shots .phone { width: min(100%, 15.5rem); margin-bottom: 1.75rem; }
.shots h3 { font-size: 1.25rem; line-height: 1.25; margin-bottom: .5rem; }
.shots p { color: var(--muted); max-width: 22rem; }
@media (max-width: 47.99rem) {
  .shots { grid-auto-flow: column; grid-auto-columns: min(66%, 15rem); gap: 1.5rem; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: -1rem; padding: .5rem 1rem 1rem; scroll-padding-inline: 1rem; overscroll-behavior-x: contain; }
  .shots li { scroll-snap-align: start; }
  .shots .phone { width: 100%; }
}
@media (min-width: 48rem) { .shots { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pricing-note { margin-top: 1rem; max-width: 40rem; color: var(--muted); }

/* Guide lists */
.guide-list { list-style: none; margin: 2rem 0 0; padding: 0; border-bottom: 1px solid var(--line); }
.guide-list li { border-top: 1px solid var(--line); }
.guide-list a { display: grid; gap: .25rem; padding-block: 1.25rem; color: var(--text); text-decoration: none; }
.guide-list .title { font-size: 1.25rem; font-weight: 700; line-height: 1.3; letter-spacing: -.01em; }
.guide-list .desc { color: var(--muted); max-width: 44rem; }
.guide-list a:hover .title { color: var(--accent); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .2em; }
.languages { display: grid; gap: 2rem 3rem; margin-top: 3rem; }
.languages h3 { font-size: 1.0625rem; margin-bottom: .5rem; }
.languages ul { list-style: none; margin: 0; padding: 0; }
.languages a { display: inline-flex; align-items: center; min-height: 2.75rem; }
@media (min-width: 48rem) { .languages { grid-template-columns: 1fr 1fr; } }

/* Closing call to action */
.closing { text-align: center; padding-block: 5rem; border-top: 1px solid var(--line); }
.closing img { margin: 0 auto 1.75rem; border-radius: 22.5%; box-shadow: 0 1.25rem 2.5rem -1rem rgb(var(--shadow) / .35); }
.closing h2 { font-size: clamp(2rem, 1.35rem + 2.2vw, 3rem); line-height: 1.08; letter-spacing: -.022em; margin-bottom: .75rem; }
.closing p { color: var(--muted); margin-inline: auto; max-width: 30rem; }
.closing .button { margin-top: 1rem; }

/* Articles: guides and policy pages */
.article { width: var(--narrow); margin-inline: auto; padding-block: 1.5rem 3rem; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1.25rem; margin-bottom: 2rem; font-size: .9375rem; }
.crumbs a { display: inline-flex; align-items: center; min-height: 2.75rem; }
.crumbs .langs { color: var(--muted); }
.crumbs .langs a { margin-left: .5rem; }
.article h1 { font-size: clamp(2.25rem, 1.5rem + 3vw, 3.5rem); line-height: 1.06; letter-spacing: -.025em; margin-bottom: 1.25rem; }
.article .lede { color: var(--muted); font-size: 1.25rem; line-height: 1.5; margin-bottom: 2.5rem; }
.article h2 { font-size: 1.625rem; line-height: 1.2; letter-spacing: -.02em; margin: 2.75rem 0 .875rem; }
.article h3 { font-size: 1.25rem; line-height: 1.3; margin: 2rem 0 .5rem; }
.article ul { padding-inline-start: 1.25rem; margin: 0 0 1.25rem; }
.article ul li::marker { color: var(--coral); }
.article li { margin-bottom: .5rem; }
.article ol { list-style: none; counter-reset: step; margin: 0 0 1.5rem; padding: 0; }
.article ol > li { counter-increment: step; position: relative; padding-left: 2.75rem; margin-bottom: 1rem; min-height: 1.875rem; }
.article ol > li::before { content: counter(step); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 1.875rem; height: 1.875rem; border-radius: 50%; background: var(--coral); color: var(--ink); font-size: .9375rem; font-weight: 700; }
.article .tide { margin: 0 0 2.5rem; }
.table-wrap { overflow-x: auto; margin: 0 0 1.5rem; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
caption { text-align: start; color: var(--muted); font-size: .9375rem; padding-bottom: .5rem; }
th, td { text-align: start; padding: .625rem .75rem .625rem 0; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-size: .9375rem; font-weight: 600; }
.app-card { display: grid; grid-template-columns: auto 1fr; gap: 1.25rem; align-items: start; margin: 3rem 0 2rem; padding: 1.5rem; border-radius: 1.5rem; background: var(--raised); }
.app-card img { border-radius: 22.5%; }
.app-card h2 { font-size: 1.375rem; margin: 0 0 .25rem; }
.app-card p { margin: 0 0 .5rem; color: var(--muted); }
.app-card .button { margin-top: .75rem; }
@media (max-width: 30rem) { .app-card { grid-template-columns: 1fr; } }
.note { color: var(--muted); font-size: .9375rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.sources { font-size: .9375rem; }
.details { color: var(--muted); font-size: .9375rem; }
.article .guide-list { margin-top: 0; }
.article .guide-list a { padding-block: 1rem; }
.article .guide-list .title { font-size: 1.125rem; }
/* Inside an article the three-contraction figure matches the example table. */
.article .tide .tide-wide { display: none; }
.article .tide .tide-narrow { display: block; max-width: 30rem; }

/* Motion. One page-load moment in the hero (two lines, two taps), the timer's
   ring breathing three times like the app's active ring, the tide line drawing
   as it scrolls in, and dusk turning to night behind "Made for 3 a.m.". */
.pulse { position: absolute; left: 50%; top: 35.45%; width: 87.4%; aspect-ratio: 1; border: 3px solid var(--coral); border-radius: 50%; opacity: 0; transform: translate(-50%, -50%); pointer-events: none; }
@media (prefers-reduced-motion: no-preference) {
  .hero h1 span, .hero .lede, .hero .button, .hero .fine { animation: rise .8s cubic-bezier(.2, .7, .2, 1) both; }
  .hero h1 span + span { animation-delay: .38s; }
  .hero h1 .kicker + span { animation-delay: 0s; }
  .hero .lede { animation-delay: .6s; }
  .hero .button, .hero .fine { animation-delay: .75s; }
  .hero-phone .phone { animation: phone-in 1s cubic-bezier(.2, .7, .2, 1) .2s both; }
  .pulse { animation: breathe 2.6s cubic-bezier(.25, .6, .3, 1) 1.5s 3 forwards; }
  @supports (animation-timeline: view()) {
    .night { animation: nightfall linear both; animation-timeline: view(); animation-range: entry 0% entry 90%; }
  }
}
@keyframes rise { from { opacity: 0; transform: translateY(.5em); } }
@keyframes phone-in { from { opacity: 0; transform: translateY(2.5rem); } }
@keyframes breathe {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(1); }
  15% { opacity: .8; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.16); }
}
@keyframes nightfall { from { background-color: var(--dusk); } to { background-color: var(--night); } }
