/* CareCalendar · carecal.org
   Tokens mirror the app's design system (CCTheme.swift): warm paper canvas, one deep teal accent,
   SF Pro Rounded titles (Nunito where SF Pro Rounded isn't available), SF Pro text. */

@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url("/assets/fonts/nunito-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;
}

:root {
  color-scheme: light;
  --canvas: #f6f5f1;
  --surface: #ffffff;
  --surface-muted: #eeece6;
  --hairline: #dedad1;
  --ink: #1a1c1b;
  --ink-2: #545a57;
  --ink-3: #626864;
  --accent: #1d6a62;
  --accent-pressed: #15514b;
  --accent-soft: #e1eeeb;
  --on-accent: #ffffff;
  --coral: #b2492f;
  --coral-soft: #fbe7e0;
  --caution: #8a5300;
  --positive: #2e7048;
  --info: #2a5a93;
  --ai-ink: #4e46a6;
  --ai-teal: #2a9d8f;
  --ai-sky: #5b8fd6;
  --ai-lavender: #8b7fd9;
  --ai-coral: #e28b73;
  --lavender-soft: #ece9fb;
  --sky-soft: #e3edf8;


  --glass: rgba(255, 255, 255, .74);
  --glass-strong: rgba(255, 255, 255, .88);
  --glass-edge: rgba(255, 255, 255, .95);
  --header-bg: rgba(246, 245, 241, .78);

  --shadow-s: 0 1px 2px rgba(20, 28, 26, .06), 0 4px 12px rgba(20, 28, 26, .05);
  --shadow-m: 0 2px 4px rgba(20, 28, 26, .05), 0 18px 40px -12px rgba(20, 28, 26, .18);
  --shadow-phone: 0 60px 90px -40px rgba(12, 24, 22, .45), 0 30px 60px -30px rgba(12, 24, 22, .25);

  --r-s: 12px;
  --r-m: 18px;
  --r-l: 28px;

  --font-brand: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, sans-serif;
  --font-text: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(16px, 4.5vw, 40px);
  --maxw: 1180px;
  --nav-top: 12px;
  --nav-h: 58px;
  --header-h: calc(var(--nav-top) + var(--nav-h));
  --nav-glass: rgba(255, 255, 255, .58);
  --nav-glass-strong: rgba(255, 255, 255, .84);
  --nav-edge: rgba(255, 255, 255, .7);
  --nav-ring: rgba(20, 44, 40, .07);
  --nav-shadow: rgba(16, 40, 36, .22);
  --nav-hover: rgba(20, 44, 40, .06);
  --nav-active: rgba(29, 106, 98, .1);
  --nav-panel: #fcfbf8;

}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --canvas: #111312;
    --surface: #191c1b;
    --surface-muted: #222625;
    --hairline: #2e3331;
    --ink: #eef0ee;
    --ink-2: #b3bab6;
    --ink-3: #99a19c;
    --accent: #73c2b6;
    --accent-pressed: #5aaa9e;
    --accent-soft: #1c3431;
    --on-accent: #0c1a18;
    --coral: #f2a48f;
    --coral-soft: #33241f;
    --caution: #e6b566;
    --positive: #82c99a;
    --info: #8db5ea;
    --ai-ink: #c9c2fa;
    --lavender-soft: #262338;
    --sky-soft: #172537;


    --glass: rgba(30, 34, 33, .72);
    --glass-strong: rgba(30, 34, 33, .9);
    --glass-edge: rgba(255, 255, 255, .08);
    --header-bg: rgba(17, 19, 18, .78);
    --nav-glass: rgba(30, 34, 33, .78);
    --nav-glass-strong: rgba(30, 34, 33, .88);
    --nav-edge: rgba(255, 255, 255, .08);
    --nav-ring: rgba(0, 0, 0, .3);
    --nav-shadow: rgba(0, 0, 0, .55);
    --nav-hover: rgba(255, 255, 255, .07);
    --nav-active: rgba(154, 219, 209, .14);
    --nav-panel: #1c1f1e;

    --shadow-s: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 12px rgba(0, 0, 0, .25);
    --shadow-m: 0 2px 4px rgba(0, 0, 0, .3), 0 18px 40px -12px rgba(0, 0, 0, .6);
    --shadow-phone: 0 60px 90px -40px rgba(0, 0, 0, .8), 0 30px 60px -30px rgba(0, 0, 0, .5);
  }
}

@media (max-width: 600px) { :root { --nav-top: 10px; --nav-h: 54px; } }

/* Base ------------------------------------------------------------------ */

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: hidden; overflow-x: clip; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img, video, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--accent); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-pressed); }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-brand); color: var(--ink); text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 6.4vw, 4.75rem); line-height: 1.02; letter-spacing: -.028em; font-weight: 750; }
h2 { font-size: clamp(2rem, 4.4vw, 3.3rem); line-height: 1.06; letter-spacing: -.022em; font-weight: 750; }
h3 { font-size: 1.28rem; line-height: 1.25; letter-spacing: -.01em; font-weight: 700; }
ul, ol { margin: 0; padding: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--accent-soft); color: var(--ink); }

.wrap { width: min(var(--maxw), 100% - 2 * var(--gutter)); margin-inline: auto; }
[hidden] { display: none !important; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: fixed; left: 16px; top: 10px; z-index: 200;
  background: var(--surface); color: var(--ink); padding: 10px 16px; border-radius: 10px;
  font-weight: 600; text-decoration: none;
  transform: translateY(-200%);
}
.skip:focus { transform: none; box-shadow: var(--shadow-m); }

.eyebrow {
  font-family: var(--font-text);
  font-size: clamp(1.0625rem, 1.4vw, 1.1875rem); font-weight: 600; letter-spacing: -.01em;
  color: var(--accent);
  margin-bottom: 10px;
}
.lede { font-size: clamp(1.1rem, 1.6vw, 1.28rem); line-height: 1.55; color: var(--ink-2); }
h2 + .lede { margin-top: 18px; }
.muted { color: var(--ink-3); }
.small { font-size: .9rem; }

/* Icons. The site itself uses no decorative icons (John: they looked AI-made). The one left is the
   CareAI sparkle inside the mock of the app's briefing card, drawn the way the app draws it. */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ic { display: block; width: 24px; height: 24px; flex: none; }
.tile.ai {
  display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 12px;
  background: linear-gradient(135deg, var(--ai-teal), var(--ai-lavender)); color: #fff;
}
.tile.ai .ic { width: 20px; height: 20px; }

/* Grouped panels: one rounded surface split by hairlines, like the grouped lists in iOS Settings.
   Each item draws a line on its right and bottom; the panel clips the ones on its outer edge. */
.steps, .ai-facts, .also, .help-grid {
  list-style: none; display: grid; overflow: hidden;
  background: var(--surface); border-radius: 28px;
}
.steps > li, .ai-fact, .also > li, .help-grid > li { position: relative; box-shadow: 1px 0 0 var(--hairline), 0 1px 0 var(--hairline); }

/* Buttons and store badge ------------------------------------------------ */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 20px;
  border-radius: 999px; border: 0;
  background: var(--accent); color: var(--on-accent);
  font: 650 .98rem/1 var(--font-text); text-decoration: none; white-space: nowrap;
  transition: background-color .2s ease, transform .2s ease;
}
.btn:hover { background: var(--accent-pressed); color: var(--on-accent); }
.btn:active { transform: scale(.98); }
.btn-small { min-height: 38px; padding: 8px 16px; font-size: .9rem; }
.btn-quiet { background: var(--accent-soft); color: var(--accent); }
.btn-quiet:hover { background: var(--accent-soft); color: var(--accent-pressed); }

.store { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.store-badge { display: inline-block; border-radius: 12px; line-height: 0; transition: transform .2s ease; }
.store-badge:hover { transform: translateY(-1px); }
.store-badge img { height: 52px; width: auto; }
.store-note { font-size: .92rem; color: var(--ink-3); line-height: 1.4; }
.link-arrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 600; text-decoration: none; color: var(--accent);
}
.link-arrow svg { width: 16px; height: 16px; transition: transform .2s ease; }
.link-arrow:hover svg { transform: translateY(2px); }

/* Header ------------------------------------------------------------------
   A floating glass bar: it hovers a few pixels below the top of the window, lets the page show
   through, and firms up once you scroll. On phones the menu opens as a matching glass panel. */

.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  padding-top: var(--nav-top);
  pointer-events: none; /* only the bar itself takes clicks */
}
.nav {
  pointer-events: auto; position: relative;
  width: min(1160px, 100% - 2 * var(--gutter)); margin-inline: auto;
  height: var(--nav-h); padding: 0 7px 0 16px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px;
  border-radius: 20px;
  background: var(--nav-glass);
  -webkit-backdrop-filter: saturate(180%) blur(22px); backdrop-filter: saturate(180%) blur(22px);
  box-shadow: inset 0 0 0 1px var(--nav-edge), 0 0 0 1px var(--nav-ring), 0 14px 34px -18px var(--nav-shadow), 0 2px 6px -3px var(--nav-shadow);
  transition: background-color .3s ease, box-shadow .3s ease;
}
.site-header.scrolled .nav, .site-header.open .nav { background: var(--nav-glass-strong); }
.brand {
  justify-self: start; display: inline-flex; align-items: center; gap: 10px;
  font: 750 1.06rem/1 var(--font-brand); letter-spacing: -.01em; color: var(--ink); text-decoration: none;
}
.brand:hover { color: var(--ink); }
.brand img { width: 30px; height: 30px; }
.nav-links { list-style: none; display: flex; gap: 2px; }
.nav-links a {
  display: block; padding: 9px 14px; border-radius: 12px;
  color: var(--ink-2); text-decoration: none; font-weight: 560; font-size: .9rem; line-height: 1;
  transition: color .2s ease, background-color .2s ease;
}
.nav-links a:hover { color: var(--ink); background: var(--nav-hover); }
.nav-links a.active, .nav-links a[aria-current="page"] { color: var(--ink); background: var(--nav-active); }
.nav-end { justify-self: end; display: flex; align-items: center; gap: 4px; }
.btn-nav {
  display: inline-flex; align-items: center; gap: 6px;
  height: 42px; padding: 0 14px 0 17px; border-radius: 13px;
  background: linear-gradient(180deg, #24796f, #1b625a); color: #fff;
  font: 650 .9rem/1 var(--font-text); text-decoration: none; white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 6px 16px -8px rgba(20, 90, 82, .8);
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
.btn-nav svg { width: 14px; height: 14px; opacity: .85; transition: transform .2s ease; }
.btn-nav:hover { color: #fff; filter: brightness(1.06); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 10px 22px -10px rgba(20, 90, 82, .9); }
.btn-nav:hover svg { transform: translateX(2px); }
.btn-nav:active { transform: scale(.98); }
.menu-btn { display: none; }

@media (max-width: 860px) {
  .nav { grid-template-columns: 1fr auto; padding: 0 6px 0 14px; }
  .nav-links { display: none; }
  .js .menu-btn {
    display: inline-grid; place-content: center; gap: 5px;
    width: 42px; height: 42px; padding: 0;
    border: 0; border-radius: 13px; background: transparent; color: var(--ink); cursor: pointer;
    transition: background-color .2s ease;
  }
  .js .menu-btn:hover { background: var(--nav-hover); }
  .menu-btn i { display: block; width: 18px; height: 1.75px; border-radius: 2px; background: currentColor; transition: transform .25s ease; }
  .site-header.open .menu-btn i:first-of-type { transform: translateY(3.4px) rotate(45deg); }
  .site-header.open .menu-btn i:last-of-type { transform: translateY(-3.4px) rotate(-45deg); }
  .site-header.open .nav-links {
    display: block; position: absolute; top: calc(100% + 8px); left: 0; right: 0;
    padding: 6px 18px; border-radius: 20px;
    background: var(--nav-panel);
    box-shadow: inset 0 0 0 1px var(--nav-edge), 0 0 0 1px var(--nav-ring), 0 30px 60px -24px var(--nav-shadow);
  }
  .site-header.open .nav-links li + li { border-top: 1px solid var(--hairline); }
  .site-header.open .nav-links a { padding: 16px 2px; border-radius: 0; background: none; font: 700 1.16rem/1.2 var(--font-brand); color: var(--ink); }
}
@media (max-width: 440px) {
  .nav { gap: 8px; padding-left: 12px; }
  .brand { gap: 8px; }
  .btn-nav { height: 38px; padding: 0 14px; font-size: .86rem; border-radius: 12px; }
  .btn-nav svg { display: none; }
  .js .menu-btn { width: 38px; height: 38px; border-radius: 12px; }
}
@media (max-width: 360px) {
  .brand { font-size: .96rem; }
  .brand img { width: 26px; height: 26px; }
  .btn-nav { padding: 0 12px; font-size: .82rem; }
}

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

.phone {
  --w: 300px;
  position: relative; margin: 0;
  width: var(--w);
  padding: calc(var(--w) * .034);
  border-radius: calc(var(--w) * .158);
  background: #0c0d0e;
  box-shadow:
    0 0 0 calc(var(--w) * .006) #6e7075,
    0 0 0 calc(var(--w) * .012) #c9cace,
    0 0 0 calc(var(--w) * .0145) #9a9ca1,
    var(--shadow-phone);
  flex: none;
}
.phone::before, .phone::after {
  content: ""; position: absolute; width: calc(var(--w) * .012); border-radius: 2px; background: #a9abaf;
}
.phone::before { right: calc(var(--w) * -.025); top: 27%; height: 11%; }
.phone::after { left: calc(var(--w) * -.025); top: 21%; height: 7%; box-shadow: 0 calc(var(--w) * .2) 0 #a9abaf; }
.phone img {
  width: 100%; aspect-ratio: 720 / 1564; object-fit: cover;
  border-radius: calc(var(--w) * .124);
  background: var(--surface-muted);
}

/* Glass surfaces (the app's notification and CareAI look) ----------------- */

.glass {
  background: var(--glass);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
  backdrop-filter: saturate(180%) blur(22px);
  border: 1px solid var(--glass-edge);
  border-radius: var(--r-m);
  box-shadow: var(--shadow-m);
}

.notify { width: 300px; padding: 14px 14px 12px; font-size: .84rem; line-height: 1.35; color: var(--ink); }
.notify-top { display: flex; align-items: center; gap: 8px; color: var(--ink-3); font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; font-weight: 600; }
.notify-top img { width: 20px; height: 20px; border-radius: 5px; }
.notify-top time { margin-left: auto; text-transform: none; letter-spacing: 0; font-weight: 500; }
.notify-title { margin-top: 8px; font-weight: 650; }
.notify-body { color: var(--ink-2); }
.notify-actions { display: grid; grid-template-columns: 1fr 1.25fr .8fr; gap: 6px; margin-top: 12px; }
.notify-actions span {
  display: block; text-align: center; padding: 7px 4px; border-radius: 999px;
  background: var(--surface-muted); font-weight: 600; font-size: .76rem; color: var(--ink);
}
.notify-actions span:first-child { background: var(--accent); color: var(--on-accent); }

.chip-card { padding: 12px 14px; display: flex; gap: 12px; align-items: center; font-size: .86rem; line-height: 1.3; }
.chip-card strong { display: block; font-size: .95rem; color: var(--ink); }
.chip-card .k { color: var(--accent); font-weight: 600; font-size: .76rem; }
.date-tile {
  flex: none; width: 46px; height: 50px; border-radius: 12px; background: var(--accent); color: var(--on-accent);
  display: grid; place-content: center; text-align: center; line-height: 1;
}
.date-tile small { font-size: .6rem; font-weight: 700; letter-spacing: .08em; }
.date-tile b { font: 750 1.35rem/1.05 var(--font-brand); }

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

.hero {
  --wash: #fbeadb; --sky: #fef9f3; --scene: url("/assets/img/scenes/dawn-1024.webp"); --scene-l: url("/assets/img/scenes/dawn-2048.webp");
  --h-title: var(--ink); --h-body: var(--ink-2); --h-eyebrow: var(--accent); --h-note: var(--ink-3);
  position: relative; isolation: isolate;
  padding-top: calc(var(--header-h) + clamp(40px, 7vw, 96px));
  background: linear-gradient(180deg, var(--wash) 0%, var(--sky) 62%);
  overflow: clip;
}
[data-tod="day"] .hero { --wash: #d6efea; --sky: #fdfdfc; --scene: url("/assets/img/scenes/day-1024.webp"); --scene-l: url("/assets/img/scenes/day-2048.webp"); }
[data-tod="dusk"] .hero { --wash: #e6def3; --sky: #f8eae7; --scene: url("/assets/img/scenes/dusk-1024.webp"); --scene-l: url("/assets/img/scenes/dusk-2048.webp"); }
[data-tod="night"] .hero {
  --wash: #0f2036; --sky: #07132a; --scene: url("/assets/img/scenes/night-1024.webp"); --scene-l: url("/assets/img/scenes/night-2048.webp");
  --h-title: #f6f5f1; --h-body: #d5dae3; --h-eyebrow: #b9e3dc; --h-note: #b7c0cf;
  color-scheme: dark;
}
.hero-land {
  position: absolute; z-index: -1; left: 0; right: 0; bottom: 0;
  height: clamp(250px, 33vw, 480px);
  background: var(--scene) center bottom / cover no-repeat;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 30%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 30%);
}
@media (min-width: 1000px), (min-resolution: 2dppx) and (min-width: 520px) {
  .hero-land { background-image: var(--scene-l); }
}
.hero-copy { text-align: center; max-width: 860px; }
.hero .eyebrow { color: var(--h-eyebrow); }
.hero h1 { color: var(--h-title); }
.hero h1 .soft { color: var(--accent); }
[data-tod="night"] .hero h1 .soft { color: #9adbd1; }
.hero .lede { color: var(--h-body); margin: 22px auto 0; max-width: 35em; }
.hero-cta { margin-top: 34px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; }
.btn-watch {
  display: inline-flex; align-items: center; gap: 10px;
  height: 52px; padding: 0 18px 0 8px; border-radius: 13px;
  background: var(--surface); color: var(--ink); border: 1px solid var(--hairline);
  font: 650 .98rem/1 var(--font-text); text-decoration: none; white-space: nowrap; box-shadow: var(--shadow-s);
  transition: transform .2s ease, border-color .2s ease;
}
.btn-watch:hover { color: var(--ink); border-color: var(--accent); transform: translateY(-1px); }
.play-dot { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.play-dot svg { width: 15px; height: 15px; margin-left: 2px; }
.hero .store-note { margin-top: 14px; color: var(--h-note); font-size: .88rem; }
[data-tod="night"] .btn-watch { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .16); color: #f6f5f1; box-shadow: none; }
[data-tod="night"] .btn-watch:hover { border-color: #9adbd1; }
[data-tod="night"] .play-dot { background: rgba(154, 219, 209, .16); color: #9adbd1; }

.hero-visual {
  --main: clamp(232px, 21vw, 292px);
  --side: calc(var(--main) * .84);
  position: relative; display: flex; justify-content: center; align-items: flex-end;
  margin-top: clamp(44px, 6vw, 72px); padding-bottom: 88px;
}
.hero-visual .phone.main { --w: var(--main); z-index: 3; }
.hero-visual .phone.side { --w: var(--side); position: absolute; bottom: 104px; left: 50%; z-index: 2; }
.hero-visual .phone.side.left { transform: translateX(calc(-50% - var(--main) * .78)) rotate(-7deg); }
.hero-visual .phone.side.right { transform: translateX(calc(-50% + var(--main) * .78)) rotate(7deg); }
.hero-notify { position: absolute; z-index: 4; left: 50%; bottom: 150px; width: 300px; margin-left: calc(var(--main) * .62); }
.hero-chip { position: absolute; z-index: 4; left: 50%; top: 18%; width: 248px; margin-left: calc(-1 * var(--main) * .62 - 248px); }
.floaty { animation: floaty 7s ease-in-out infinite alternate; }
.floaty.later { animation-delay: -3.5s; animation-duration: 8s; }
@keyframes floaty { from { translate: 0 0; } to { translate: 0 -8px; } }

@media (max-width: 1100px) {
  .hero-notify { margin-left: calc(var(--main) * .2); bottom: 120px; }
  .hero-chip { margin-left: calc(-1 * var(--main) * .2 - 248px); }
}
@media (max-width: 760px) {
  .hero-visual { --main: min(250px, 64vw); padding-bottom: 64px; }
  .hero-visual .phone.side { bottom: 84px; }
  .hero-visual .phone.side.left { transform: translateX(calc(-50% - var(--main) * .7)) rotate(-7deg); }
  .hero-visual .phone.side.right { transform: translateX(calc(-50% + var(--main) * .7)) rotate(7deg); }
  .hero-notify { left: 50%; margin-left: -146px; width: 292px; bottom: 96px; }
  .hero-chip { display: none; }
}

/* The sheet that slides over the landscape (the app's Home does the same) */
.sheet {
  position: relative; z-index: 1;
  margin-top: -40px;
  background: var(--canvas);
  border-radius: 40px 40px 0 0;
  padding-top: clamp(64px, 8vw, 112px);
  padding-bottom: clamp(48px, 6vw, 88px);
}
.how { padding-top: clamp(56px, 7vw, 96px); }

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

.section { position: relative; padding-block: clamp(72px, 10vw, 136px); overflow-x: hidden; overflow-x: clip; }
.section-head { max-width: 760px; margin-bottom: clamp(36px, 5vw, 64px); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head .lede { margin-top: 18px; }

/* How it works */
.steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.step { padding: clamp(28px, 3vw, 40px) clamp(24px, 3vw, 40px) clamp(30px, 3.2vw, 44px); }
.step .step-num { font: 600 1rem/1.2 var(--font-text); color: var(--accent); margin-bottom: 6px; }
.step p { color: var(--ink-2); margin-top: 10px; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } .step { padding: 24px 28px 26px; } }

/* Feature chapters */
.chapter { position: relative; padding-block: clamp(64px, 9vw, 120px); overflow-x: hidden; overflow-x: clip; }
.chapter-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: clamp(32px, 6vw, 96px); }
.chapter.flip .chapter-copy { order: 2; }
.chapter-copy { max-width: 540px; position: relative; z-index: 2; }
.chapter-copy .lede { margin-top: 18px; }
.chapter-visual {
  position: relative; isolation: isolate;
  min-height: 640px; display: flex; align-items: center; justify-content: center;
}
.chapter-visual .phone { --w: clamp(240px, 24vw, 300px); z-index: 2; }
.chapter-visual .phone.back { position: absolute; --w: clamp(200px, 20vw, 252px); z-index: 1; transform: translateX(-56%) rotate(-5deg); opacity: .98; }
.chapter.flip .chapter-visual .phone.back { transform: translateX(56%) rotate(5deg); }
.chapter-visual .phone.front-shift { transform: translateX(18%); }
.chapter.flip .chapter-visual .phone.front-shift { transform: translateX(-18%); }
#scan .chapter-visual .phone.front-shift { transform: translateX(24%); }

.ticks { list-style: none; margin-top: 28px; border-top: 1px solid var(--hairline); }
.ticks li { padding: 13px 0 14px; border-bottom: 1px solid var(--hairline); color: var(--ink); }

.note { margin-top: 28px; padding: 20px 24px 22px; border-radius: 20px; background: var(--surface); }
.note strong { display: block; font-size: 1.0625rem; margin-bottom: 4px; }
.note p { color: var(--ink-2); font-size: .97rem; }

.privacy-line { margin-top: 22px; font-size: .95rem; color: var(--ink-3); }

/* Floating pieces inside chapters */
.chapter-visual .float { position: absolute; z-index: 3; }
.chapter-visual .notify { right: -2%; bottom: 20%; }
.chapter-visual .bottle {
  left: -7%; bottom: 4%; width: clamp(140px, 14vw, 186px);
  border-radius: 20px; overflow: hidden; border: 5px solid var(--surface);
  box-shadow: var(--shadow-m); transform: rotate(-6deg);
}
.chapter-visual .bottle img { aspect-ratio: 540 / 717; object-fit: cover; width: 100%; }
.chapter-visual .refill-chip { right: -3%; top: 16%; width: 250px; }

@media (max-width: 900px) {
  .chapter-grid { grid-template-columns: 1fr; }
  .chapter.flip .chapter-copy { order: 0; }
  .chapter-copy { max-width: none; }
  .chapter-visual { min-height: 0; padding: 48px 0; }
  .chapter-visual .phone { --w: min(272px, 68vw); }
  .chapter-visual .phone.back { --w: min(220px, 52vw); transform: translateX(-50%) rotate(-5deg); }
  .chapter.flip .chapter-visual .phone.back { transform: translateX(50%) rotate(5deg); }
  .chapter-visual .phone.front-shift { transform: translateX(14%); }
  .chapter.flip .chapter-visual .phone.front-shift { transform: translateX(-14%); }
  .chapter-visual .notify { right: 50%; margin-right: -150px; bottom: 8%; }
  .chapter-visual .bottle { left: 2%; }
  .chapter-visual .refill-chip { right: 2%; top: auto; bottom: 6%; }
}
@media (max-width: 520px) {
  .chapter-visual .notify { width: 288px; margin-right: -144px; }
  .chapter-visual .refill-chip { width: 220px; }
}

/* CareAI */
.careai-band { position: relative; }
.ai-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.ai-gets { list-style: none; margin-top: 30px; display: grid; grid-template-columns: 1fr 1fr; column-gap: 28px; }
.ai-gets li { padding: 15px 0 17px; border-top: 1px solid var(--hairline); }
.ai-gets strong { display: block; font-size: 1rem; line-height: 1.35; }
.ai-gets p { color: var(--ink-2); font-size: .94rem; line-height: 1.45; margin-top: 3px; }

/* A still mock of the app's CareAI briefing card. */
.ai-card {
  position: relative; max-width: 520px; margin-inline: auto;
  padding: 24px 24px 20px; border-radius: 26px;
  background: var(--surface); border: 1px solid var(--hairline); box-shadow: var(--shadow-m);
}
.ai-head { display: flex; align-items: center; gap: 12px; }
.ai-by strong { display: block; font-size: 1rem; line-height: 1.3; }
.ai-by small { display: block; font-size: .8rem; line-height: 1.3; color: var(--ai-ink); margin-top: 1px; }
.ai-title { font: 700 1.38rem/1.25 var(--font-brand); letter-spacing: -.01em; margin-top: 16px; color: var(--ink); }
.ai-sum { color: var(--ink-2); margin-top: 8px; font-size: .98rem; }
.ai-label { margin-top: 18px; font-size: .72rem; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.ai-list { list-style: none; margin-top: 10px; background: var(--surface); border-radius: 16px; border: 1px solid var(--hairline); }
.ai-list li { display: grid; grid-template-columns: 26px 1fr auto; gap: 4px 12px; padding: 12px 14px; align-items: baseline; }
.ai-list li + li { border-top: 1px solid var(--hairline); }
.ai-list .n {
  width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--ai-teal), var(--ai-lavender)); color: #fff; font-size: .75rem; font-weight: 700;
  align-self: start;
}
.ai-list b { font-size: .95rem; }
.ai-list .due { font-size: .78rem; color: var(--ink-3); font-weight: 600; white-space: nowrap; }
.ai-list small { grid-column: 2 / 4; color: var(--ink-2); font-size: .85rem; line-height: 1.4; }
.ai-foot { margin-top: 14px; font-size: .78rem; color: var(--ink-3); }

.ai-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: clamp(48px, 6vw, 72px); }
.ai-fact { padding: 28px 28px 30px; }
.ai-fact h3 { font-size: 1.125rem; margin-bottom: 8px; }
.ai-fact p { color: var(--ink-2); font-size: .95rem; }
@media (max-width: 900px) {
  .ai-grid { grid-template-columns: 1fr; }
  .ai-facts { grid-template-columns: 1fr; }
}
@media (max-width: 520px) { .ai-gets { grid-template-columns: 1fr; } }

/* Trio: calendar, cycle, share */
.trio { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.5vw, 32px); }
.trio-card {
  position: relative; isolation: isolate; overflow: hidden;
  border-radius: 32px; padding: 40px 28px 0;
  background: var(--surface);
  display: flex; flex-direction: column;
}
.trio-card h3 { font-size: 1.4rem; }
.trio-card p { color: var(--ink-2); margin-top: 10px; }
.trio-card .phone { --w: min(240px, 100%); margin: 36px auto -110px; box-shadow: 0 0 0 calc(var(--w) * .006) #6e7075, 0 0 0 calc(var(--w) * .012) #c9cace, 0 30px 60px -30px rgba(12, 24, 22, .4); }
@media (max-width: 960px) {
  .trio {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: min(82%, 340px);
    overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px var(--gutter) 18px;
    margin-inline: calc(-1 * var(--gutter)); scroll-padding-inline: var(--gutter);
    scrollbar-width: none;
  }
  .trio::-webkit-scrollbar { display: none; }
  .trio-card { scroll-snap-align: start; }
}

.also { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: clamp(28px, 4vw, 44px); }
.also li { padding: 24px 24px 26px; }
.also strong { display: block; font-size: 1rem; line-height: 1.35; }
.also p { color: var(--ink-2); font-size: .92rem; line-height: 1.45; margin-top: 4px; }
@media (max-width: 1000px) { .also { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .also { grid-template-columns: 1fr; } }

/* Film (sits on the sheet, right under the hero). Wide cut by default; site.js adds .tall on phones. */
.film { overflow: clip; }
.film-head { max-width: 720px; margin: 0 auto clamp(32px, 4vw, 52px); text-align: center; position: relative; z-index: 2; }
.film .lede { margin-top: 18px; }
.film-actions { margin-top: 26px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 18px; }
.btn-play { min-height: 48px; padding: 12px 22px 12px 18px; }
.btn-play svg { width: 15px; height: 15px; }
.film-visual { position: relative; isolation: isolate; display: grid; place-items: center; }

.film-frame {
  position: relative; width: min(1080px, 100%); aspect-ratio: 16 / 9;
  border-radius: clamp(18px, 2.4vw, 30px); overflow: hidden; background: #e9efe9; cursor: pointer;
  box-shadow: 0 50px 90px -50px rgba(12, 24, 22, .55), 0 20px 50px -30px rgba(12, 24, 22, .3), 0 0 0 1px rgba(0, 0, 0, .06);
}
.film-frame.tall { width: min(330px, 78vw); aspect-ratio: 9 / 16; border-radius: 30px; }
.film-frame.playing { cursor: auto; }
.film-frame video { width: 100%; height: 100%; object-fit: cover; }
.film-play {
  position: absolute; left: 16px; bottom: 16px;
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 17px 0 14px;
  border-radius: 999px; border: 1px solid rgba(255, 255, 255, .9); cursor: pointer;
  background: rgba(255, 255, 255, .82); color: #1a1c1b;
  font: 650 .88rem/1 var(--font-text);
  -webkit-backdrop-filter: saturate(180%) blur(16px); backdrop-filter: saturate(180%) blur(16px);
  box-shadow: 0 10px 24px -12px rgba(12, 40, 36, .45);
  transition: transform .2s ease, background-color .2s ease;
}
.film-play svg { color: #1d6a62; }
.film-frame:hover .film-play { transform: translateY(-1px); background: rgba(255, 255, 255, .94); }
.film-pause {
  position: absolute; right: 16px; bottom: 16px; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; padding: 0; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .8); background: rgba(255, 255, 255, .72); color: #1a1c1b;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.film-pause .i-resume { margin-left: 2px; }
.film-pause[aria-pressed="false"] .i-resume, .film-pause[aria-pressed="true"] .i-pause { display: none; }
.film-frame.playing .film-play, .film-frame.playing .film-pause { display: none; }
@media (min-width: 900px) {
  .film-play { left: 24px; bottom: 24px; height: 46px; padding: 0 20px 0 16px; font-size: .95rem; }
  .film-pause { right: 24px; bottom: 24px; width: 46px; height: 46px; }
}
@media (max-width: 700px) {
  .film-actions { flex-direction: column; gap: 12px; }
}

/* Computers: the film plays silently behind the hero, full bleed, like a product page. The headline
   sits in the open space on the left (the film keeps its phone on the right), over a soft wash that
   keeps it readable. The hero stays light in dark mode, like the film, and fades into the page below.
   Tablets and phones keep the phone screens over the landscape. */
.hero-media, .hero-pause { display: none; }
.film-time { color: #5b6461; font-weight: 550; font-variant-numeric: tabular-nums; margin-left: 2px; }
@media (min-width: 901px) {
  html[data-tod] .hero {
    --h-title: #1a1c1b; --h-body: #474f4c; --h-eyebrow: #1d6a62; --h-note: #5d6561;
    color-scheme: light;
    display: flex; align-items: center;
    min-height: max(640px, 100vh); min-height: max(640px, 100svh);
    padding: calc(var(--header-h) + 48px) 0 96px;
    background: #f3eee6;
  }
  html[data-tod] .hero h1 .soft { color: #1d6a62; }
  .hero-land, .hero-visual, .film { display: none; }
  .hero-media {
    display: block; position: absolute; inset: 0; z-index: -1; overflow: hidden;
    background: #f3eee6 url("/assets/video/hero-loop-poster.webp?v=2") 74% 50% / cover no-repeat;
  }
  .hero-video {
    width: 100%; height: 100%; object-fit: cover; object-position: 74% 50%;
    opacity: 0; transition: opacity .8s ease;
  }
  .hero-video.ready { opacity: 1; }
  .hero-media::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background:
      linear-gradient(0deg, var(--canvas) 0, color-mix(in srgb, var(--canvas) 0%, transparent) 16%),
      linear-gradient(90deg, rgba(246, 242, 235, .9) 0%, rgba(246, 242, 235, .72) 28%, rgba(246, 242, 235, 0) 54%);
  }
  .hero-copy { text-align: left; max-width: none; }
  .hero-copy > * { max-width: min(580px, 46vw); }
  .hero h1 { font-size: clamp(3rem, 5.4vw, 5.2rem); line-height: 1.02; }
  .hero .lede { margin: 24px 0 0; max-width: min(520px, 42vw); font-size: clamp(1.08rem, 1.4vw, 1.28rem); }
  .hero-cta { justify-content: flex-start; margin-top: 36px; }
  html[data-tod] .hero .btn-watch {
    background: rgba(255, 255, 255, .72); color: #1a1c1b; border-color: rgba(255, 255, 255, .9);
    -webkit-backdrop-filter: saturate(180%) blur(14px); backdrop-filter: saturate(180%) blur(14px);
    box-shadow: 0 8px 24px -14px rgba(16, 40, 36, .45);
  }
  html[data-tod] .hero .btn-watch:hover { background: rgba(255, 255, 255, .9); border-color: #fff; }
  html[data-tod] .hero .play-dot { background: #1d6a62; color: #fff; }
  .js .hero-pause:not([hidden]) {
    display: grid; place-items: center; position: absolute; z-index: 2;
    right: max(var(--gutter), (100% - 1160px) / 2); bottom: 40px;
    width: 44px; height: 44px; padding: 0; border-radius: 50%; cursor: pointer; color: #1a1c1b;
    border: 1px solid rgba(255, 255, 255, .85); background: rgba(255, 255, 255, .6);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    transition: background-color .2s ease;
  }
  .hero-pause:hover { background: rgba(255, 255, 255, .85); }
  .hero-pause .i-resume { margin-left: 2px; }
  .hero-pause[aria-pressed="false"] .i-resume, .hero-pause[aria-pressed="true"] .i-pause { display: none; }
  .how { padding-top: clamp(64px, 7vw, 104px); }
}

/* Full-window player for the film (a modal dialog) */
html { scrollbar-gutter: stable; }
.theater-open, .theater-open body { overflow: hidden; }
.theater {
  --pad-y: clamp(64px, 8vh, 96px);
  position: fixed; inset: 0; width: 100%; height: 100%; max-width: 100%; max-height: 100%;
  margin: 0; padding: 0; border: 0; background: transparent; color: #fff; overflow: hidden;
}
.theater[open] { display: block; }
.theater::backdrop { background: rgba(4, 8, 8, .9); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.theater-box { width: 100%; height: 100%; display: grid; place-items: center; padding: var(--pad-y) clamp(16px, 4vw, 64px); }
.theater-video {
  display: block; height: auto; aspect-ratio: 16 / 9; background: #000;
  width: min(100%, calc((100vh - 2 * var(--pad-y)) * 16 / 9));
  border-radius: clamp(12px, 1.4vw, 20px);
  box-shadow: 0 50px 140px -40px rgba(0, 0, 0, .85), 0 0 0 1px rgba(255, 255, 255, .06);
}
@supports (height: 100dvh) { .theater-video { width: min(100%, calc((100dvh - 2 * var(--pad-y)) * 16 / 9)); } }
.theater-close {
  position: absolute; top: clamp(14px, 2.4vh, 24px); right: clamp(14px, 2vw, 28px);
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; padding: 0; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .12); color: #fff;
  transition: background-color .2s ease, transform .2s ease;
}
.theater-close:hover { background: rgba(255, 255, 255, .24); transform: scale(1.04); }
.theater-close:focus-visible { outline: 2px solid #9adbd1; outline-offset: 3px; }
@media (prefers-reduced-motion: no-preference) {
  .theater[open], .theater[open]::backdrop { animation: theater-fade .35s ease both; }
  .theater[open] .theater-video { animation: theater-rise .6s cubic-bezier(.2, .8, .2, 1) both; }
}
@keyframes theater-fade { from { opacity: 0; } }
@keyframes theater-rise { from { opacity: 0; transform: translateY(22px) scale(.97); } }

/* Privacy (night scene) */
.night {
  position: relative; isolation: isolate; overflow: clip; color-scheme: dark;
  background: linear-gradient(180deg, #0f2036 0%, #07132a 55%, #07132a 100%);
  color: #d5dae3;
  padding-bottom: clamp(240px, 32vw, 520px);
}
.night::after {
  content: ""; position: absolute; z-index: -1; left: 0; right: 0; bottom: 0; height: clamp(220px, 32vw, 480px);
  background: url("/assets/img/scenes/night-2048.webp") center bottom / cover no-repeat;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 40%);
  mask-image: linear-gradient(180deg, transparent, #000 40%);
}
.night h2, .night h3 { color: #f6f5f1; }
.night .eyebrow { color: #b9e3dc; }
.night .lede { color: #d5dae3; }
.night a { color: #9adbd1; }
.promises {
  list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: hidden;
  background: rgba(255, 255, 255, .06); border-radius: 28px;
}
.promise { padding: 28px 28px 30px; box-shadow: 1px 0 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .1); }
.promise h3 { font-size: 1.16rem; margin-bottom: 8px; }
.promise p { color: #c4ccd8; font-size: .98rem; }
.night-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
@media (max-width: 900px) { .night-grid { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .promises { grid-template-columns: 1fr; } }

/* FAQ */
.faq { max-width: 860px; margin-inline: auto; }
.faq details { border-bottom: 1px solid var(--hairline); }
.faq details:first-of-type { border-top: 1px solid var(--hairline); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 22px 4px; font: 700 1.14rem/1.35 var(--font-brand); color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 12px; height: 12px; margin-right: 6px;
  border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3);
  transform: translateY(-3px) rotate(45deg); transition: transform .25s ease;
}
.faq details[open] summary::after { transform: translateY(3px) rotate(225deg); }
.faq .answer { padding: 0 4px 24px; color: var(--ink-2); max-width: 70ch; }
.faq .answer p + p { margin-top: 10px; }

/* Final call to action */
.finale {
  position: relative; isolation: isolate; overflow: clip; text-align: center;
  background: linear-gradient(180deg, var(--canvas) 0%, #e6def3 38%, #f8eae7 70%);
  padding-top: clamp(80px, 10vw, 140px);
  padding-bottom: clamp(220px, 28vw, 420px);
}
.finale::after {
  content: ""; position: absolute; z-index: -1; left: 0; right: 0; bottom: 0; height: clamp(240px, 34vw, 520px);
  background: url("/assets/img/scenes/dusk-2048.webp") center bottom / cover no-repeat;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 38%);
  mask-image: linear-gradient(180deg, transparent, #000 38%);
}
/* The app icon. site.js empties the tile ("armed", the first frame of the animation) and plays the logo forming
   in it once it's in view; if the film can't play, the still icon fades back in. */
.finale .logo-forms {
  position: relative; width: 128px; height: 128px; border-radius: 29px; overflow: hidden; margin: 0 auto 28px;
  background: linear-gradient(180deg, #fcfcfc, #eff0f3); box-shadow: 0 18px 40px -16px rgba(12, 40, 36, .55);
}
.logo-forms img, .logo-forms video { position: absolute; inset: 0; display: block; width: 100%; height: 100%; border-radius: inherit; }
.logo-forms img { transition: opacity .5s ease; }
.logo-forms video { opacity: 0; }
.logo-forms.armed img { opacity: 0; }
.logo-forms.playing video { opacity: 1; }
@media (max-width: 700px) { .finale .logo-forms { width: 112px; height: 112px; border-radius: 25px; } }
.finale h2 { max-width: 18ch; margin-inline: auto; color: #1a1c1b; }
.finale .lede { margin: 18px auto 0; max-width: 36em; color: #545a57; }
.finale .store { justify-content: center; margin-top: 34px; }
.finale .store-note { color: #545a57; }
.qr { display: inline-flex; align-items: center; gap: 14px; text-align: left; padding: 10px 16px 10px 10px; border-radius: 16px; background: rgba(255, 255, 255, .7); border: 1px solid rgba(255, 255, 255, .9); color: #545a57; font-size: .88rem; line-height: 1.35; }
.qr img { width: 76px; height: 76px; background: #fff; padding: 6px; border-radius: 10px; }
.qr strong { display: block; color: #1a1c1b; font-size: .95rem; }
@media (max-width: 900px), (hover: none) { .qr { display: none; } }
@media (prefers-color-scheme: dark) {
  .finale { background: linear-gradient(180deg, var(--canvas) 0%, #16203a 40%, #0b1730 75%); }
  .finale::after { filter: brightness(.55) saturate(.9); }
  .finale .logo-forms { background: linear-gradient(180deg, #022227, #001316); box-shadow: 0 18px 44px -14px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .08); }
  .finale h2 { color: #f6f5f1; }
  .finale .lede, .finale .store-note { color: #d5dae3; }
  .qr { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .12); color: #d5dae3; }
  .qr strong { color: #f6f5f1; }
}

/* Footer */
.site-footer { border-top: 1px solid var(--hairline); padding: 48px 0 40px; font-size: .92rem; color: var(--ink-3); background: var(--canvas); }
.foot-top { display: flex; flex-wrap: wrap; gap: 24px 48px; justify-content: space-between; align-items: flex-start; }
.foot-links { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 28px; }
.foot-links a { color: var(--ink-2); text-decoration: none; font-weight: 550; }
.foot-links a:hover { color: var(--ink); text-decoration: underline; }
.disclaimer { margin-top: 28px; max-width: 80ch; line-height: 1.55; }
.legal { margin-top: 14px; font-size: .82rem; }

/* Inner pages (support, privacy, terms, 404) ------------------------------- */

.page-hero {
  position: relative; isolation: isolate; overflow: clip;
  padding: calc(var(--header-h) + clamp(48px, 7vw, 88px)) 0 clamp(40px, 5vw, 64px);
  background: linear-gradient(180deg, #d6efea 0%, var(--canvas) 100%);
}
@media (prefers-color-scheme: dark) { .page-hero { background: linear-gradient(180deg, #13262a 0%, var(--canvas) 100%); } }
.page-hero .prose { padding-bottom: 0; }
.page-hero h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); }
.page-hero .lede { margin-top: 14px; }
.prose { max-width: 760px; margin-inline: auto; padding-bottom: clamp(64px, 9vw, 120px); }
.prose h2 { font-size: clamp(1.4rem, 2.4vw, 1.75rem); margin: 44px 0 12px; }
.prose p, .prose li { color: var(--ink-2); }
.prose p + p { margin-top: 14px; }
.prose ul { padding-left: 1.3em; margin: 12px 0; display: grid; gap: 8px; }
.prose strong { color: var(--ink); }
.prose .callout {
  margin: 24px 0; padding: 18px 20px; border-radius: var(--r-m);
  background: var(--coral-soft); color: var(--ink); border: 1px solid color-mix(in srgb, var(--coral) 25%, transparent);
}
.prose .callout p { color: var(--ink); }
.updated { color: var(--ink-3); font-size: .95rem; margin-top: 10px; }

.help-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 56px; }
.help-grid a { display: block; height: 100%; padding: 24px 24px 26px; color: var(--ink); text-decoration: none; transition: background-color .2s ease; }
.help-grid a:hover { color: var(--ink); background: var(--surface-muted); }
.faq-group { margin-top: 8px; }
.faq-group h2 { scroll-margin-top: calc(var(--header-h) + 24px); }
.help-grid h3 { font-size: 1.08rem; margin-bottom: 6px; }
.help-grid p { font-size: .95rem; }
.prose .help-grid { padding-left: 0; }
@media (max-width: 760px) { .help-grid { grid-template-columns: 1fr; } }
.contact-card {
  margin-top: 56px; padding: 36px 32px; border-radius: 28px; text-align: center;
  background: var(--surface);
}
.contact-card h2 { margin: 0 0 8px; }
.contact-card .btn { margin-top: 20px; }

.notfound { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 120px var(--gutter); position: relative; isolation: isolate; overflow: clip; }
.notfound img.app-icon { width: 88px; height: 88px; border-radius: 20px; margin: 0 auto 24px; }
.notfound p { color: var(--ink-2); margin: 14px 0 28px; }

/* Legal pages (privacy, terms) --------------------------------------------- */

.legal-grid { display: grid; grid-template-columns: 220px minmax(0, 720px); column-gap: clamp(40px, 6vw, 80px); justify-content: center; }
.legal-hero {
  padding: calc(var(--header-h) + clamp(44px, 7vw, 84px)) 0 clamp(36px, 5vw, 56px);
  background: linear-gradient(180deg, #e2f0ec 0%, var(--canvas) 100%);
  border-bottom: 1px solid var(--hairline);
}
@media (prefers-color-scheme: dark) { .legal-hero { background: linear-gradient(180deg, #13262a 0%, var(--canvas) 100%); } }
.legal-head { grid-column: 2; }
.legal-hero h1 { font-size: clamp(2.4rem, 5vw, 3.5rem); }
.legal-hero .lede { margin-top: 14px; }
.legal-meta { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--ink-3); font-size: .92rem; }
.legal-meta span + span::before { content: ""; display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .6; margin-right: 18px; vertical-align: middle; }
.legal-switch {
  margin-top: 26px; display: inline-flex; padding: 4px; gap: 2px;
  border-radius: 999px; background: var(--surface-muted); border: 1px solid var(--hairline);
}
.legal-switch a { padding: 8px 16px; border-radius: 999px; color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .9rem; white-space: nowrap; }
.legal-switch a:hover { color: var(--ink); }
.legal-switch a[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-s); }

.legal-body { padding-block: clamp(40px, 6vw, 72px) clamp(72px, 9vw, 120px); }
.toc { position: sticky; top: calc(var(--header-h) + 32px); align-self: start; }
.toc-title { font-size: .9rem; font-weight: 600; color: var(--ink); margin-bottom: 12px; }
.toc ol, .toc-mobile ol { list-style: none; }
.toc ol { border-left: 1px solid var(--hairline); }
.toc a {
  display: block; margin-left: -1px; padding: 7px 0 7px 16px; border-left: 2px solid transparent;
  color: var(--ink-2); text-decoration: none; font-size: .92rem; line-height: 1.35; transition: color .2s ease, border-color .2s ease;
}
.toc a:hover { color: var(--ink); }
.toc a.active { color: var(--accent); border-left-color: var(--accent); font-weight: 600; }
.toc-mobile { display: none; }

.legal-doc { min-width: 0; font-size: 1.0625rem; line-height: 1.7; color: var(--ink-2); }
.legal-doc strong { color: var(--ink); }
.legal-doc p + p { margin-top: 14px; }
.legal-intro p:first-child { font-size: 1.15rem; line-height: 1.6; color: var(--ink); }
.legal-sec { margin-top: 44px; padding-top: 40px; border-top: 1px solid var(--hairline); scroll-margin-top: calc(var(--header-h) + 24px); }
.legal-sec h2 { display: flex; align-items: center; gap: 12px; font-size: clamp(1.35rem, 2.2vw, 1.6rem); line-height: 1.25; margin-bottom: 14px; }
.sec-num { flex: none; min-width: 1.4em; color: var(--ink-3); font-weight: 600; font-variant-numeric: tabular-nums; }
.legal-sec ul { list-style: none; margin: 16px 0; display: grid; gap: 12px; }
.legal-sec ul li { position: relative; padding-left: 24px; }
.legal-sec ul li::before { content: ""; position: absolute; left: 6px; top: .68em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.legal-sec .callout { margin: 18px 0 0; padding: 20px 22px; border-radius: 20px; background: var(--surface); }
.legal-sec .callout p { color: var(--ink); }

.short-version { padding: 28px 28px 24px; border-radius: 28px; background: var(--surface); margin-bottom: 44px; }
.short-version h2 { font-size: 1.3rem; margin-bottom: 22px; }
.short-grid { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 28px; }
.short-grid li { display: block; }
.short-grid strong { display: block; font-size: 1rem; line-height: 1.3; margin: 2px 0 4px; }
.short-grid p { font-size: .94rem; line-height: 1.5; }
.short-note { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--hairline); font-size: .85rem; color: var(--ink-3); }

.legal-contact {
  margin-top: 56px; padding: 28px; border-radius: 28px; background: var(--surface);
  display: grid; grid-template-columns: 1fr auto; gap: 18px 24px; align-items: center;
}
.legal-contact h2 { margin-bottom: 4px; font-size: 1.25rem; }
.legal-contact p { font-size: .98rem; line-height: 1.55; }

@media (max-width: 960px) {
  .legal-grid { grid-template-columns: minmax(0, 720px); }
  .legal-head { grid-column: 1; }
  .toc { display: none; }
  .toc-mobile {
    display: block; margin-bottom: 32px; border: 1px solid var(--hairline); border-radius: var(--r-m); background: var(--surface);
  }
  .toc-mobile summary {
    list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between;
    padding: 14px 18px; font-weight: 650; color: var(--ink);
  }
  .toc-mobile summary::-webkit-details-marker { display: none; }
  .toc-mobile summary::after {
    content: ""; width: 9px; height: 9px; margin-right: 4px; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3);
    transform: translateY(-2px) rotate(45deg); transition: transform .2s ease;
  }
  .toc-mobile[open] summary::after { transform: translateY(2px) rotate(225deg); }
  .toc-mobile ol { padding: 0 18px 10px; }
  .toc-mobile li + li { border-top: 1px solid var(--hairline); }
  .toc-mobile a { display: block; padding: 11px 0; color: var(--ink-2); text-decoration: none; font-size: .98rem; }
}
@media (max-width: 380px) {
  .legal-meta { flex-direction: column; gap: 2px; }
  .legal-meta span + span::before { display: none; }
}
@media (max-width: 640px) {
  .short-version { padding: 22px 20px 20px; }
  .short-grid { grid-template-columns: 1fr; gap: 18px; }
  .legal-contact { grid-template-columns: 1fr; padding: 22px; align-items: start; }
  .legal-contact p { overflow-wrap: anywhere; }
  .legal-contact .btn { grid-column: 1 / -1; justify-self: start; }
  .legal-switch a { padding: 8px 13px; font-size: .86rem; }
}

/* Phones (734 px and narrower) --------------------------------------------------
   Plain and calm, like a product page on apple.com: a simple full-width bar, sections that alternate
   between the warm canvas and white, sentence-case labels, no decorative icon tiles or drifting shapes,
   and grouped lists (one rounded panel with hairlines between rows, like iOS Settings) in place of
   stacks of bordered cards. Computers and tablets keep their own layout above. */
@media (max-width: 734px) {
  :root { --gutter: 22px; --nav-top: 0px; --nav-h: 52px; }
  body { line-height: 1.47; letter-spacing: -.011em; }
  h1 { font-size: 2.5rem; line-height: 1.07; letter-spacing: -.022em; }
  h2 { font-size: 2rem; line-height: 1.12; letter-spacing: -.018em; }
  h3 { font-size: 1.1875rem; }
  .lede { font-size: 1.0625rem; line-height: 1.5; }
  h2 + .lede, .section-head .lede, .chapter-copy .lede, .film .lede { margin-top: 14px; }
  .eyebrow { font-size: 1.0625rem; margin-bottom: 8px; }

  .floaty { animation: none; }

  /* Header: a plain translucent bar across the top, like apple.com */
  .site-header { padding-top: 0; }
  .nav {
    width: 100%; height: var(--nav-h); padding: 0 8px 0 var(--gutter); gap: 10px; border-radius: 0;
    background: color-mix(in srgb, var(--canvas) 78%, transparent);
    box-shadow: 0 1px 0 color-mix(in srgb, var(--ink) 9%, transparent);
  }
  .site-header.scrolled .nav, .site-header.open .nav { background: color-mix(in srgb, var(--canvas) 94%, transparent); }
  .brand, .nav .brand { gap: 8px; font-size: 1.0625rem; }
  .brand img { width: 26px; height: 26px; }
  .btn-nav, .btn-nav:hover {
    height: 30px; padding: 0 13px; border-radius: 999px; background: var(--accent); color: var(--on-accent);
    font: 600 .8125rem/1 var(--font-text); box-shadow: none; filter: none;
  }
  .btn-nav svg { display: none; }
  .js .menu-btn { width: 40px; height: 40px; border-radius: 10px; }
  .site-header.open .nav-links {
    position: absolute; top: 100%; left: 0; right: 0; height: calc(100vh - var(--nav-h)); height: calc(100dvh - var(--nav-h));
    padding: 18px var(--gutter) 40px; border-radius: 0; background: var(--canvas); box-shadow: none; overflow-y: auto;
  }
  .site-header.open .nav-links li + li { border-top: 0; }
  .site-header.open .nav-links a { padding: 9px 0; font: 700 1.75rem/1.2 var(--font-brand); letter-spacing: -.015em; color: var(--ink); }

  /* Hero */
  .hero { padding-top: calc(var(--header-h) + 44px); }
  .hero .lede { margin-top: 16px; }
  .hero-cta { flex-direction: column; gap: 16px; margin-top: 28px; }
  .hero-cta .btn-watch, [data-tod] .hero-cta .btn-watch {
    height: auto; padding: 0; gap: 6px; border: 0; border-radius: 0; background: none; box-shadow: none;
    color: var(--accent); font: 500 1.0625rem/1.2 var(--font-text);
  }
  [data-tod="night"] .hero-cta .btn-watch { color: #9adbd1; }
  .hero-cta .btn-watch:hover { transform: none; text-decoration: underline; }
  .hero-cta .play-dot, [data-tod] .hero-cta .play-dot { width: auto; height: auto; border-radius: 0; background: none; color: inherit; }
  .hero-cta .play-dot svg { width: 12px; height: 12px; }
  .hero .store-note { margin-top: 18px; font-size: .8125rem; }
  .hero-visual { --main: min(264px, 68vw); margin-top: 44px; padding-bottom: 56px; }
  .hero-visual .phone.side { display: none; }
  .hero-notify { bottom: 80px; }

  /* Rhythm: sections alternate between the canvas and white, with the same spacing everywhere. */
  .sheet { margin-top: -28px; border-radius: 28px 28px 0 0; padding-top: 56px; padding-bottom: 32px; }
  .section, .chapter { padding-block: 64px; }
  .how { padding-top: 40px; }
  #plan, #medications, #refills { background: var(--surface); }
  .section-head, .section-head.center { text-align: left; margin-inline: 0; margin-bottom: 28px; }
  .chapter-grid, .night-grid { gap: 8px; }
  .ai-grid { gap: 32px; }
  .chapter-visual { padding: 40px 0 8px; }
  .chapter-visual .phone { --w: min(264px, 68vw); }
  .chapter-visual .phone.back { display: none; }
  .chapter-visual .bottle { left: 0; bottom: 5%; width: 108px; border-width: 4px; border-radius: 16px; }
  .chapter-visual .phone.front-shift, .chapter.flip .chapter-visual .phone.front-shift, #scan .chapter-visual .phone.front-shift { transform: none; }

  /* Grouped lists */
  .steps, .ai-gets, .ai-facts, .also, .help-grid { gap: 0; background: var(--surface); border-radius: 20px; overflow: hidden; }
  .steps > li, .ai-gets > li, .ai-fact, .also > li, .help-grid > li { position: relative; box-shadow: none; }
  .steps > li + li::before, .ai-gets > li + li::before, .ai-fact + .ai-fact::before, .also > li + li::before, .help-grid > li + li::before {
    content: ""; position: absolute; top: 0; left: 20px; right: 0; height: 1px; background: var(--hairline);
  }
  .step { padding: 20px 20px 22px; }
  .step .step-num { font-size: .9375rem; margin-bottom: 4px; }
  .step p { margin-top: 6px; font-size: 1rem; }
  .ai-gets { margin-top: 26px; }
  .ai-gets li { padding: 14px 20px 15px; border-top: 0; }
  .ai-gets strong { font-size: 1rem; }
  .ai-gets p { font-size: .9375rem; }
  .ai-facts { margin-top: 36px; }
  .ai-fact { padding: 18px 20px 20px; }
  .ai-fact h3 { font-size: 1.0625rem; margin-bottom: 4px; }
  .ai-fact p { font-size: .9375rem; }
  .also { margin-top: 28px; }
  .also li { padding: 15px 20px 16px; }
  .also strong { font-size: 1rem; }
  .also p { font-size: .9375rem; }

  .ai-card { padding: 20px 18px 16px; box-shadow: var(--shadow-s); }

  .ticks { margin-top: 24px; }
  .note { margin-top: 24px; padding: 18px 20px; background: var(--canvas); }
  .note strong { font-size: 1rem; }
  .note p { font-size: .9375rem; }

  /* Calendar, cycle and share: a swipeable gallery of plain cards */
  .trio-card { border-radius: 26px; padding: 30px 24px 0; }
  .trio-card h3 { font-size: 1.3rem; }

  /* Privacy */
  .night { padding-bottom: 200px; }
  .promises { gap: 0; background: rgba(255, 255, 255, .07); border-radius: 20px; overflow: hidden; margin-top: 24px; }
  .promise { position: relative; padding: 18px 20px 20px; box-shadow: none; }
  .promise + .promise::before { content: ""; position: absolute; top: 0; left: 20px; right: 0; height: 1px; background: rgba(255, 255, 255, .12); }
  .promise h3 { font-size: 1.0625rem; margin-bottom: 4px; }
  .promise p { font-size: .9375rem; }

  /* Questions */
  .faq summary { padding: 18px 0; font: 600 1.0625rem/1.35 var(--font-text); letter-spacing: -.01em; }
  .faq .answer { padding: 0 0 20px; font-size: 1rem; }

  /* Last call to action */
  .finale { padding-top: 72px; padding-bottom: 200px; }
  .finale .store { margin-top: 28px; }

  /* Footer: small grey type in Apple's order (the brand, the fine print, the links, the copyright) */
  .site-footer { padding: 18px 0 30px; font-size: .75rem; line-height: 1.4; color: var(--ink-3); }
  .site-footer .wrap { display: flex; flex-direction: column; }
  .foot-top { display: contents; }
  .site-footer .brand { order: 1; gap: 7px; padding-bottom: 14px; border-bottom: 1px solid var(--hairline); font-size: .875rem; }
  .site-footer .brand img { width: 18px; height: 18px; }
  .disclaimer { order: 2; margin-top: 14px; max-width: none; }
  .disclaimer strong { color: var(--ink-2); font-weight: 600; }
  .foot-links { order: 3; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--hairline); gap: 8px 0; }
  .foot-links li { display: flex; align-items: center; }
  .foot-links li + li::before { content: ""; width: 1px; height: 12px; margin: 0 10px; background: var(--hairline); }
  .foot-links a { color: var(--ink-2); font-weight: 400; }
  .legal { order: 4; margin-top: 12px; font-size: .75rem; }

  /* Inner pages */
  .page-hero, .legal-hero { padding-top: calc(var(--header-h) + 40px); }
  .help-grid { margin-bottom: 40px; }
  .help-grid a { padding: 15px 20px 16px; }
  .short-version { border-radius: 20px; }
  .legal-contact { display: block; border-radius: 20px; }
  .legal-contact .btn { margin-top: 16px; }
  .contact-card { border-radius: 20px; }
}

/* Very small phones (iPhone SE 1st gen, 320 px): keep the header on one line. */
@media (max-width: 359px) {
  :root { --gutter: 18px; }
  .nav { gap: 6px; padding-right: 4px; }
  .site-header .brand { font-size: 1rem; gap: 7px; }
  .site-header .brand img { width: 24px; height: 24px; }
  .btn-nav, .btn-nav:hover { padding: 0 11px; font-size: .75rem; }
}

/* Reveal on scroll (only when JS is running and motion is welcome) ---------- */

@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s cubic-bezier(.2, .7, .2, 1), transform .8s cubic-bezier(.2, .7, .2, 1); }
  .js .reveal.in { opacity: 1; transform: none; }
  .js .reveal.d1 { transition-delay: .08s; }
  .js .reveal.d2 { transition-delay: .16s; }
}

@media (prefers-reduced-motion: reduce) {
  .floaty { animation: none !important; }
  * { transition-duration: .01ms !important; }
}

@media print {
  .site-header, .hero-land, .hero-media, .hero-pause, .theater, .film, .finale::after, .night::after, .toc, .toc-mobile, .legal-switch { display: none !important; }
  body { background: #fff; color: #000; }
}
