@property --cut { syntax: "<percentage>"; inherits: false; initial-value: 100%; }

:root {
  /* A damped spring (zeta 0.8): about 1.5% overshoot, then still. */
  --spring: linear(0, 0.0224, 0.0795, 0.1582, 0.2488, 0.3438, 0.4379, 0.5273, 0.6097, 0.6837, 0.7488, 0.8048, 0.8521, 0.8914, 0.9234, 0.949, 0.969, 0.9842, 0.9956, 1.0036, 1.0091, 1.0126, 1.0144, 1.0151, 1.015, 1.0142, 1.0131, 1.0118, 1.0103, 1.0089, 1.0075, 1.0062, 1.0051, 1.0041, 1.0032, 1.0024, 1.0018, 1.0013, 1.0009, 1.0005, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  /* Apple's dark palette: black page, #1d1d1f tiles, #86868b secondary text. */
  --bg: #000000;
  --tile: #1d1d1f;
  --tile-2: #161617;
  --line: rgba(255, 255, 255, 0.1);
  --ink: #f5f5f7;
  --faint: #86868b;
  --link: #2997ff;
  --button: #0071e3;
  --button-hover: #0077ed;
  --sky: #91b8f3;
  --caffeine: #ff7a2f;
  --water: #38bdf8;
  --sugar: #f472b6;
  --violet: #a78bfa;
  --green: #30d158;
  /* San Francisco where the device has it (Apple's license keeps it off the
     web), then the closest system faces. */
  --sf: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  /* The Daily Limits screenshot holds two cards; a half phone ends between them. */
  --half: 65.2%;
  color-scheme: dark;
  accent-color: var(--button);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  overflow-x: clip;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.47 var(--sf);
  letter-spacing: -0.022em;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

::selection { background: var(--button); color: #fff; }

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

.skip {
  position: absolute;
  left: 16px;
  top: -64px;
  z-index: 30;
  padding: 12px 20px;
  border-radius: 980px;
  background: #fff;
  color: #000;
  font-weight: 600;
  text-decoration: none;
  transition: top 160ms var(--ease-out);
}
.skip:focus { top: 12px; }

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, .button:focus-visible, .strip:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 3px;
  border-radius: 980px;
}

h1, h2, h3 {
  margin: 0;
  font-family: var(--sf);
  font-weight: 600;
  text-wrap: balance;
}

h2 { font-size: clamp(40px, 5vw, 56px); line-height: 1.07; letter-spacing: -0.005em; }

p { margin: 0; text-wrap: pretty; }

.wrap {
  width: min(980px, 100% - 44px);
  margin-inline: auto;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--mark, var(--sky));
  font-size: clamp(19px, 2vw, 24px);
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: 0.009em;
}

/* ---------- Buttons: Apple's pills and chevron links ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 22px;
  border-radius: 980px;
  font: 400 17px/1.18 var(--sf);
  letter-spacing: -0.022em;
  text-decoration: none;
  transition: background-color 200ms, transform 300ms var(--spring);
}
.button:hover { text-decoration: none; }
.button svg { width: 18px; height: 18px; flex: none; }
.button.primary { background: var(--button); color: #fff; }
.button.primary:hover { background: var(--button-hover); }
.button.primary:active { transform: scale(0.97); }
.button.small {
  min-height: 28px;
  padding: 4px 12px;
  font-size: 12px;
  line-height: 1.33;
  letter-spacing: -0.01em;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-height: 44px;
  color: var(--link);
  font-size: 17px;
}
.text-link svg { width: 15px; height: 15px; margin-top: 1px; transition: translate 300ms var(--spring); }
.text-link:hover svg { translate: 3px 0; }

/* ---------- Navigation: the shared bar (shared.css), fixed over the
   hero here and clear until the page moves (motion.js adds .scrolled) ---------- */

.gnav {
  position: fixed;
  inset: 0 0 auto;
  border-bottom-color: transparent;
  background: rgba(22, 22, 23, 0.72);
  transition: border-color 300ms, background-color 300ms;
}
.gnav.scrolled { border-bottom-color: var(--line); background: rgba(22, 22, 23, 0.85); }

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

.hero {
  --tide-h: clamp(80px, 10vw, 140px);
  --front-wave: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 2880 140' preserveAspectRatio='none'%3E%3Cpath d='M0 84 Q60 112 120 84 T240 84 T360 84 T480 84 T600 84 T720 84 T840 84 T960 84 T1080 84 T1200 84 T1320 84 T1440 84 T1560 84 T1680 84 T1800 84 T1920 84 T2040 84 T2160 84 T2280 84 T2400 84 T2520 84 T2640 84 T2760 84 T2880 84 V0 H0 Z'/%3E%3C/svg%3E");
  position: relative;
  overflow: clip;
  padding-top: clamp(100px, 13vh, 140px);
  text-align: center;
  background:
    radial-gradient(80% 55% at 50% 0%, rgba(28, 95, 204, 0.55) 0%, rgba(17, 44, 128, 0.35) 45%, transparent 75%);
  /* The front wave and the strip under it are cut out of the hero, not
     painted over it in black, so the pointer's glow behind the page shows
     through them as it does everywhere else. One layer is the wave (twice
     the hero's width, so it can slide), the other everything above it. */
  -webkit-mask:
    var(--front-wave) 0% calc(100% - 30px) / 200% var(--tide-h) no-repeat,
    linear-gradient(#000 0 0) 0 0 / 100% calc(100% - 30px - var(--tide-h) * 0.6) no-repeat;
  mask:
    var(--front-wave) 0% calc(100% - 30px) / 200% var(--tide-h) no-repeat,
    linear-gradient(#000 0 0) 0 0 / 100% calc(100% - 30px - var(--tide-h) * 0.6) no-repeat;
}
.hero .eyebrow { font-size: clamp(21px, 2.4vw, 28px); line-height: 1.14; }

.hero h1 {
  font-size: clamp(48px, 7.4vw, 80px);
  line-height: 1.05;
  letter-spacing: -0.015em;
}
.hero h1 .word { display: inline-block; }
.hero h1 .accent { color: var(--sky); }

.lede {
  max-width: 30em;
  margin: 20px auto 0;
  color: var(--ink);
  font-size: clamp(19px, 2vw, 21px);
  line-height: 1.38;
  letter-spacing: 0.011em;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 28px;
  margin-top: 32px;
}

.note { margin-top: 18px; color: #a1a1a6; font-size: 14px; letter-spacing: -0.016em; }

.fan {
  --cw: clamp(210px, 24vw, 300px);
  --s: 0;
  position: relative;
  height: calc(var(--cw) * 1.62);
  margin-top: 64px;
}

.phone {
  --w: 280px;
  position: relative;
  width: var(--w);
  padding: calc(var(--w) * 0.034);
  border-radius: calc(var(--w) * 0.175);
  background: #0b0d12;
  box-shadow:
    0 50px 80px -30px rgba(0, 0, 0, 0.8),
    0 18px 30px -18px rgba(0, 0, 0, 0.6),
    inset 0 0 0 1.5px #3b4152;
}
.phone img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 560 / 1218;
  border-radius: calc(var(--w) * 0.141);
}
.phone::after {
  content: "";
  position: absolute;
  top: calc(var(--w) * 0.06);
  left: 50%;
  translate: -50% 0;
  width: calc(var(--w) * 0.29);
  height: calc(var(--w) * 0.085);
  border-radius: 999px;
  background: #0b0d12;
}

/* A half phone: cut straight across between the two Daily Limits cards. */
.phone.half {
  -webkit-mask-image: linear-gradient(#000 var(--half), transparent var(--half));
  mask-image: linear-gradient(#000 var(--half), transparent var(--half));
}

.fan .phone { position: absolute; top: 0; left: 50%; }
.fan .center {
  --w: var(--cw);
  z-index: 2;
  transform: translateX(-50%) translateY(calc(var(--s) * -60px));
}
.fan .side {
  --w: calc(var(--cw) * 0.86);
  --dir: -1;
  top: calc(var(--cw) * 0.24);
  z-index: 1;
  filter: brightness(0.78);
  transform:
    translateX(calc(-50% + var(--dir) * (58% + var(--s) * 22%)))
    rotate(calc(var(--dir) * (7deg + var(--s) * 5deg)));
}
.fan .right { --dir: 1; }

.tide {
  position: absolute;
  left: 0;
  bottom: 30px;
  z-index: 3;
  width: 100%;
  height: var(--tide-h);
}
.tide-back { fill: rgba(0, 113, 227, 0.6); }

/* ---------- At a glance: Apple's highlight figures ---------- */

.stats { padding-block: 72px 24px; }
.stats h2 { margin-bottom: 36px; }
.stats ul {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 36px 0;
  list-style: none;
  border-radius: 28px;
  background: var(--tile);
}
.stats li { padding: 0 28px; border-left: 1px solid var(--line); }
.stats li:first-child { border-left: 0; }
.stats strong {
  display: block;
  color: var(--ink);
  font-size: clamp(40px, 4.4vw, 56px);
  font-weight: 600;
  line-height: 1.07;
  letter-spacing: -0.005em;
  font-variant-numeric: tabular-nums;
}
.stats li > span { display: block; margin-top: 8px; color: var(--faint); font-size: 17px; line-height: 1.35; }

/* ---------- The story: steps scroll past a phone that stays put ---------- */

.story {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 64px;
  padding-top: 48px;
}

.step {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 92vh;
  max-width: 28em;
  transition: opacity 500ms var(--ease-out);
}
/* The last step keeps its full height so the sticky phone stays centred
   beside it; Goals starts inside the empty half screen below its text
   instead of after it. */
@media (min-width: 901px) {
  .story { margin-bottom: -16vh; }
  /* That empty half screen holds the sticky stage, so Goals stacks above
     it; the reveal's translate did this, but not with Reduce Motion on. */
  .goals { position: relative; }
}
.step h2 { margin-bottom: 20px; font-size: clamp(40px, 4.4vw, 48px); line-height: 1.08; }
.step > p:not(.eyebrow) { color: var(--faint); font-size: 21px; line-height: 1.38; letter-spacing: 0.011em; }
/* A link inside running text needs more than colour to stand out. */
.step > p a { text-decoration: underline; text-underline-offset: 0.15em; }

[data-tint="violet"] { --mark: var(--violet); }
[data-tint="sugar"] { --mark: var(--sugar); }
[data-tint="water"] { --mark: var(--water); }
[data-tint="caffeine"] { --mark: var(--caffeine); }

.checks { display: grid; gap: 18px; margin: 32px 0 0; padding: 0; list-style: none; }
.checks li { display: flex; gap: 12px; color: var(--ink); font-weight: 600; line-height: 1.47; }
.checks svg { width: 20px; height: 20px; flex: none; margin-top: 2px; color: var(--mark); }
.checks span { color: var(--faint); font-weight: 400; }

.phone.inline { display: none; }

.story-stage {
  position: sticky;
  top: 0;
  display: grid;
  place-items: center;
  height: 100vh;
}
.story-stage .glow {
  position: absolute;
  width: 120%;
  aspect-ratio: 1;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--mark, var(--button)) 26%, transparent), transparent);
}
/* The sticky phone trims itself to a half phone on the Daily Limits step,
   and drops by half the cut so what's left stays centred. A clip, not a
   mask: the dropped half reaches into Goals, which starts 16vh up beside
   it, and a masked part still sat over the Goals heading, invisible but
   catching the pointer (and painted above it with Reduce Motion on). */
.screens {
  --w: clamp(220px, min(24vw, (100vh - 140px) / 2.33), 310px);
  display: grid;
  clip-path: inset(0 0 calc(100% - var(--cut)) 0);
  transition: --cut 700ms var(--ease-out), translate 800ms var(--spring);
}
.screens.half { --cut: var(--half); translate: 0 17.4%; }
.screens img {
  grid-area: 1 / 1;
  opacity: 0;
  transform: scale(0.94);
  filter: blur(6px);
  transition: opacity 500ms var(--ease-out), transform 700ms var(--spring), filter 500ms var(--ease-out);
}
.screens img.on { opacity: 1; transform: none; filter: none; }
@media (prefers-reduced-motion: reduce) { .screens, .screens img { transition: none; } }

.rail {
  position: absolute;
  right: 0;
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.rail li {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
  transition: height 400ms var(--spring), background-color 300ms;
}
.rail li.on { height: 28px; background: var(--mark, #fff); }

/* ---------- Bedtime: the countdown and the curve, on a tile ---------- */

.bedtime {
  --mark: var(--caffeine);
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: 48px;
  margin-top: 96px;
  padding: clamp(28px, 5vw, 56px);
  border-radius: 28px;
  background: var(--tile);
}
.clock {
  margin: 0 0 24px;
  color: var(--ink);
  font-size: clamp(56px, 7.4vw, 96px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.015em;
  font-variant-numeric: tabular-nums;
}
.bedtime h2 { margin-bottom: 14px; font-size: clamp(28px, 3vw, 40px); line-height: 1.1; }
.bedtime-copy > p:not(.eyebrow, .clock) { color: var(--faint); }
.bedtime .fine { margin-top: 14px; font-size: 14px; }

.chart { margin: 0; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid line { stroke: var(--line); }
.chart text { fill: var(--faint); font: 400 12px var(--sf); }
.chart .grid text { text-anchor: end; }
.chart .axis text { text-anchor: middle; }
.chart .area { fill: url(#under); }
.chart .curve { fill: none; stroke: var(--caffeine); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.chart .limit { stroke: var(--green); stroke-width: 1.5; stroke-dasharray: 6 6; }
.chart .limit-label { fill: var(--green); text-anchor: end; font-weight: 600; }
.chart .mark circle { fill: var(--tile); stroke: var(--caffeine); stroke-width: 3; }
.chart .mark text { fill: var(--ink); font-weight: 600; font-size: 14px; }
.chart .m-bed line { stroke: rgba(255, 255, 255, 0.25); stroke-dasharray: 3 4; }
.chart .m-under circle { stroke: var(--green); }

/* ---------- And so much more: Apple's tiles ---------- */

.bento-wrap { padding-top: 140px; }
.bento-wrap > h2 { margin-bottom: 40px; }

.bento {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.card {
  --x: 50%;
  --y: 50%;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 260px;
  padding: 32px 28px 28px;
  overflow: hidden;
  border-radius: 28px;
  background: var(--tile);
  text-align: center;
  isolation: isolate;
}
/* Every box lights up under the pointer (motion.js sets --x and --y). */
.stats ul, .bedtime, .gtile { position: relative; isolation: isolate; }
.card::before, .stats ul::before, .bedtime::before, .gtile::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(420px circle at var(--x) var(--y), rgba(255, 255, 255, 0.07), transparent 45%);
  opacity: 0;
  transition: opacity 300ms;
  pointer-events: none;
}
:is(.card, .stats ul, .bedtime, .gtile):hover::before { opacity: 1; }
.card h3 {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  order: -1;
  font-size: 24px;
  line-height: 1.17;
  letter-spacing: 0.009em;
}
.card h3 svg { width: 28px; height: 28px; flex: none; color: var(--sky); }
.card p { order: -1; margin-top: 6px; color: var(--faint); font-size: 17px; }
.card.tall { grid-row: span 2; }
.card.wide { grid-column: span 2; }

.viz {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  min-height: 110px;
  margin-top: 24px;
}

/* Apple's tile device: the phone rises from the tile's bottom edge, which
   cuts it under the Passport card. */
.card.tall { padding-bottom: 0; }
.card.tall p { margin-bottom: 28px; }
.card.tall .phone.peek {
  --w: 252px;
  margin: auto auto calc(var(--w) * -0.3);
  padding-bottom: 0;
  transition: translate 600ms var(--spring);
}
.card.tall:hover .phone.peek { translate: 0 -16px; }

.cups { align-items: flex-end; gap: 10px; }
.cups span {
  position: relative;
  display: grid;
  place-items: end center;
  width: 34px;
  padding-bottom: 6px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 0;
  border-radius: 4px 4px 10px 10px;
  clip-path: polygon(0 0, 100% 0, 88% 100%, 12% 100%);
  color: var(--ink);
  font: 600 11px/1 var(--sf);
  letter-spacing: 0;
}
.cups span:nth-child(1) { height: 44px; }
.cups span:nth-child(2) { height: 56px; }
.cups span:nth-child(3) { height: 68px; }
.cups span:nth-child(4) { height: 80px; }
.cups span:nth-child(5) { height: 92px; }
.cups span::before {
  content: "";
  position: absolute;
  inset: auto 0 0;
  z-index: -1;
  height: 70%;
  background: linear-gradient(#c2410c, #9a3412);
}

.drop { position: relative; }
.drop svg { width: 56px; height: 56px; color: var(--water); }
.drop i {
  position: absolute;
  width: 56px;
  height: 56px;
  border: 2px solid var(--water);
  border-radius: 50%;
  opacity: 0;
}

.week { gap: 10px; }
.week b { width: 26px; height: 26px; border-radius: 50%; background: var(--water); }
.week b.off { background: transparent; border: 2px dashed rgba(255, 255, 255, 0.3); }

.pulse-line svg { width: 100%; max-width: 220px; height: auto; overflow: visible; }
.pulse-line path { fill: none; stroke: var(--sugar); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
/* A faint whole trace under the moving beat, so the line reads as a heartbeat
   between beats instead of two stray dashes. */
.pulse-line .trace { stroke-opacity: 0.3; }

.scan { position: relative; }
.scan svg { width: 72px; height: 72px; color: var(--ink); }
.scan i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 84px;
  height: 2px;
  translate: -50% 0;
  border-radius: 2px;
  background: #ff453a;
}

.widgets { gap: 12px; }
.widgets b {
  width: 76px;
  height: 76px;
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(0, 113, 227, 0.7), rgba(0, 113, 227, 0.2));
}
.widgets b.w { width: 164px; background: linear-gradient(160deg, rgba(255, 122, 47, 0.65), rgba(255, 122, 47, 0.18)); }

/* ---------- Goals: what a goal does, on tiles ---------- */

.goals { --mark: var(--water); padding-top: 140px; }
.goals-head { text-align: center; }
.goals-head .lede { color: var(--faint); }
.goal-kinds {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: 760px;
  margin: 32px auto 0;
  padding: 0;
  list-style: none;
}
.goal-kinds li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 980px;
  background: var(--tile);
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
}
.goal-kinds svg { width: 18px; height: 18px; color: var(--k); }

.goals-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 48px;
}
.gtile {
  display: flex;
  flex-direction: column;
  min-height: 280px;
  padding: 36px 32px 32px;
  overflow: hidden;
  border-radius: 28px;
  background: var(--tile);
  text-align: center;
}
.gtile h3 { font-size: 28px; line-height: 1.14; letter-spacing: 0.007em; }
.gtile > p { max-width: 24em; margin: 10px auto 0; color: var(--faint); }
.gtile.phone-tile { padding-bottom: 0; }
.gtile.phone-tile > p { margin-bottom: 32px; }
.gtile.phone-tile .phone.peek {
  --w: 264px;
  margin: auto auto calc(var(--w) * -0.62);
  transition: translate 600ms var(--spring);
}
.gtile.phone-tile:hover .phone.peek { translate: 0 -12px; }

.stepdown { align-items: flex-end; gap: 18px; height: 140px; }
.stepdown figure { display: grid; justify-items: center; gap: 8px; height: 100%; margin: 0; grid-template-rows: 1fr auto; }
.stepdown b {
  align-self: end;
  width: 44px;
  height: var(--h);
  border-radius: 10px 10px 4px 4px;
  background: linear-gradient(var(--water), #1d7fd1);
}
.stepdown b.zero { height: 6px; background: var(--green); border-radius: 3px; }
.stepdown figcaption { color: var(--faint); font-size: 13px; }

.saved { gap: 40px; }
.saved div { display: grid; gap: 4px; }
.saved strong { font-size: 56px; font-weight: 600; line-height: 1; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.saved strong.money { color: var(--green); }
.saved span { color: var(--faint); font-size: 14px; }

.goal-widget .gw {
  display: grid;
  justify-items: start;
  gap: 2px;
  width: 170px;
  padding: 16px;
  border-radius: 24px;
  background: linear-gradient(170deg, #142a52, #0a1428);
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.8), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  text-align: left;
}
.gw-over { display: inline-flex; align-items: center; gap: 4px; color: #b0b0b5; font-size: 10px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.gw-over svg { width: 11px; height: 11px; color: var(--water); }
.gw strong { margin-top: 6px; color: var(--water); font-size: 40px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.gw-label { color: var(--ink); font-size: 12px; }
.gw-left { margin-top: 10px; color: #b0b0b5; font-size: 11px; }

.year div {
  display: grid;
  justify-items: start;
  width: 120px;
  padding: 14px 14px 18px;
  border-radius: 18px;
  background: linear-gradient(140deg, #12295c, #050f2b);
  box-shadow: 0 16px 30px -16px rgba(0, 0, 0, 0.8);
  aspect-ratio: 9 / 14;
  text-align: left;
}
.year span { color: rgba(255, 255, 255, 0.6); font-size: 8px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.year strong { margin-top: auto; font-size: 36px; font-weight: 800; line-height: 0.95; font-variant-numeric: tabular-nums; }
.year em { color: rgba(255, 255, 255, 0.85); font-size: 15px; font-style: normal; font-weight: 700; }

/* ---------- Section ledes ---------- */

.section-lede { max-width: 30em; margin: 20px auto 0; color: var(--faint); font-size: 21px; line-height: 1.38; letter-spacing: 0.011em; }

/* ---------- Questions and answers ---------- */

.faq { padding-top: 140px; }
.faq h2 { text-align: center; }
.qa { max-width: 760px; margin: 48px auto 0; border-top: 1px solid var(--line); }
.qa details { border-bottom: 1px solid var(--line); }
.qa summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 44px;
  padding: 20px 0;
  cursor: pointer;
  color: var(--ink);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.24;
  list-style: none;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after {
  content: "";
  flex: none;
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--faint);
  border-bottom: 2px solid var(--faint);
  rotate: 45deg;
  translate: 0 -3px;
  transition: rotate 300ms var(--spring), translate 300ms var(--spring);
}
.qa details[open] summary::after { rotate: -135deg; translate: 0 3px; }
.qa summary:focus-visible { outline: 2px solid var(--link); outline-offset: 4px; border-radius: 8px; }
.qa details p { max-width: 40em; padding: 0 0 24px; color: var(--faint); font-size: 17px; }
.faq-more { margin-top: 28px; color: var(--faint); text-align: center; }

/* ---------- From the blog: the newest posts and the tools, as cards
   (shared.css; stamped by scripts/stamp_site.py) ---------- */

.reads { padding-top: 140px; text-align: center; }
.reads .post-cards { margin-top: 48px; }
/* The home page is black, so its cards take the tile grey. */
.reads .post-card { background: var(--tile); }
.reads .tool-card { background: radial-gradient(120% 90% at 100% 0%, rgba(41, 151, 255, 0.18), transparent 60%), var(--tile); }
.tools-title { margin: 72px 0 24px; font-size: 28px; line-height: 1.14; }

/* ---------- Privacy ---------- */

.privacy { padding-block: 160px 120px; text-align: center; }
.privacy .wrap { max-width: 820px; }
.shield { width: 64px; height: 64px; margin-bottom: 20px; color: var(--green); }
.privacy h2 { font-size: clamp(40px, 5vw, 56px); }
.privacy p { max-width: 34em; margin: 24px auto 8px; color: var(--faint); font-size: 21px; line-height: 1.38; letter-spacing: 0.011em; }
.scrub .w { transition: opacity 200ms linear; }

/* ---------- Gallery ---------- */

.gallery { padding-block: 40px; }
.gallery h2 { margin-bottom: 48px; }
.strip { overflow: hidden; padding-block: 12px 60px; }
.track { display: flex; gap: 28px; width: max-content; padding-inline: 16px; }
.track .phone { --w: clamp(200px, 20vw, 250px); flex: none; }

/* ---------- Closing ---------- */

.closing { padding-block: 100px 140px; text-align: center; }
.closing-can { width: 104px; height: auto; margin-bottom: 24px; overflow: visible; }
.closing h2 { font-size: clamp(48px, 6.4vw, 80px); line-height: 1.05; letter-spacing: -0.015em; }
.closing p { margin: 16px auto 0; color: var(--ink); font-size: 21px; line-height: 1.38; }

/* ---------- Footer: the shared one (shared.css), flush under the closing ---------- */

.gfoot { margin-top: 0; }

/* ---------- Small screens ---------- */

@media (max-width: 900px) {
  .story { display: block; padding-top: 24px; }
  .story-stage { display: none; }
  .step { min-height: 0; max-width: none; padding-block: 56px; }
  .step:last-child { padding-bottom: 0; }
  .phone.inline { --w: min(260px, 70vw); display: block; margin: 40px auto 0; }
  /* Close the gap the cut leaves under a half phone. */
  .phone.inline.half { margin-bottom: calc(var(--w) * -2.095 * (1 - 0.652)); }
  .bedtime { grid-template-columns: 1fr; }
  .stats ul { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 32px; }
  .stats li:nth-child(3) { border-left: 0; }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card.tall { grid-row: auto; grid-column: span 2; }
  .goals, .faq, .reads { padding-top: 112px; }
}

@media (max-width: 620px) {
  .wrap { width: calc(100% - 32px); }
  .fan { --cw: 190px; margin-top: 48px; }
  .stats ul { grid-template-columns: 1fr; padding: 8px 0; row-gap: 0; }
  .stats li { padding: 20px 24px; border-left: 0; border-top: 1px solid var(--line); }
  .stats li:first-child { border-top: 0; }
  .step > p:not(.eyebrow), .privacy p { font-size: 19px; }
  .bento { grid-template-columns: 1fr; }
  .card.tall, .card.wide { grid-column: auto; }
  .widgets b { width: 60px; height: 60px; }
  .widgets b.w { width: 120px; }
  .bento-wrap, .privacy { padding-top: 96px; }
  .bedtime { padding: 24px 20px; }
  /* The chart draws at about half size here, so its type doubles. */
  .chart text { font-size: 22px; }
  .chart .mark text { font-size: 24px; }
  .goals-grid { grid-template-columns: 1fr; }
  .gtile { min-height: 0; padding: 28px 24px; }
  .gtile .viz { min-height: 120px; }
  .gtile.phone-tile { min-height: 0; }
  .gtile.phone-tile .phone.peek { --w: min(240px, 66vw); margin-bottom: calc(var(--w) * -0.9); }
  .goal-kinds li { font-size: 14px; padding: 8px 14px; }
  .saved strong { font-size: 44px; }
  .qa summary { font-size: 19px; }
  .goals, .faq { padding-top: 96px; }
}

/* ---------- Motion: every hidden start state needs .motion, which the
   script adds only when Reduce Motion is off. ---------- */

.motion .rise, .motion .hero h1 .word {
  opacity: 0;
  translate: 0 0.35em;
  transition: opacity 800ms var(--ease-out), translate 1000ms var(--spring);
  transition-delay: var(--d, 0ms);
}
.motion .hero.loaded .rise, .motion .hero.loaded h1 .word { opacity: 1; translate: 0 0; }

.motion .fan .phone { opacity: 0; translate: 0 140px; transition: opacity 800ms var(--ease-out), translate 1300ms var(--spring); }
.motion .fan .center { transition-delay: 500ms; }
.motion .fan .side { transition-delay: 700ms; }
.motion .hero.loaded .fan .phone { opacity: 1; translate: 0 0; }

.motion .tide path { animation: tide 9s linear infinite; }
@keyframes tide { to { transform: translateX(-480px); } }
/* The front wave drifts the other way: a third of its width is two crests. */
.motion .hero { animation: front-tide 6s linear infinite; }
@keyframes front-tide {
  from {
    -webkit-mask-position: 33.333% calc(100% - 30px), 0 0;
    mask-position: 33.333% calc(100% - 30px), 0 0;
  }
  to {
    -webkit-mask-position: 0% calc(100% - 30px), 0 0;
    mask-position: 0% calc(100% - 30px), 0 0;
  }
}

.motion [data-reveal] { opacity: 0; translate: 0 48px; transition: opacity 900ms var(--ease-out), translate 1100ms var(--spring); }
.motion [data-reveal].in { opacity: 1; translate: 0 0; }

.motion .stats li { opacity: 0; translate: 0 20px; transition: opacity 700ms var(--ease-out), translate 900ms var(--spring); }
.motion .stats.in li { opacity: 1; translate: 0 0; }
.stats li:nth-child(2) { transition-delay: 100ms; }
.stats li:nth-child(3) { transition-delay: 200ms; }
.stats li:nth-child(4) { transition-delay: 300ms; }

.motion .step { opacity: 0.4; }
.motion .step.active { opacity: 1; }
@media (max-width: 900px) { .motion .step { opacity: 1; } }

.motion .chart .curve { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 2200ms var(--ease-out) 300ms; }
.motion .chart .area { opacity: 0; transition: opacity 1200ms var(--ease-out) 1400ms; }
.motion .chart .mark { opacity: 0; scale: 0.6; transform-box: fill-box; transform-origin: center; transition: opacity 400ms, scale 600ms var(--spring); }
.motion .chart .m-now { transition-delay: 300ms; }
.motion .chart .m-bed { transition-delay: 1000ms; }
.motion .chart .m-under { transition-delay: 2200ms; }
.motion .bedtime.in .curve { stroke-dashoffset: 0; }
.motion .bedtime.in .area, .motion .bedtime.in .mark { opacity: 1; scale: 1; }

.motion .gtile { opacity: 0; translate: 0 32px; transition: opacity 700ms var(--ease-out), translate 900ms var(--spring); transition-delay: calc(var(--i, 0) * 80ms); }
.motion .in .gtile { opacity: 1; translate: 0 0; }
.motion .stepdown b { transform-origin: bottom; scale: 1 0; transition: scale 900ms var(--spring); }
.motion .in .stepdown b { scale: 1 1; }
.stepdown figure:nth-child(2) b { transition-delay: 120ms; } .stepdown figure:nth-child(3) b { transition-delay: 240ms; } .stepdown figure:nth-child(4) b { transition-delay: 360ms; }

.motion .card { opacity: 0; translate: 0 32px; transition: opacity 700ms var(--ease-out), translate 900ms var(--spring); transition-delay: calc(var(--i, 0) * 80ms); }
.motion .in .card { opacity: 1; translate: 0 0; }

.motion .in .cups span::before { animation: pour 4s var(--ease-out) infinite; animation-delay: calc(var(--n) * 160ms); }
.cups span:nth-child(1) { --n: 0; } .cups span:nth-child(2) { --n: 1; } .cups span:nth-child(3) { --n: 2; } .cups span:nth-child(4) { --n: 3; } .cups span:nth-child(5) { --n: 4; }
@keyframes pour { 0% { height: 0; } 40%, 85% { height: 70%; } 100% { height: 0; } }

.motion .in .drop i { animation: ripple 2.4s var(--ease-out) infinite; }
.motion .in .drop i + i { animation-delay: 1.2s; }
@keyframes ripple { from { scale: 1; opacity: 0.7; } to { scale: 2.4; opacity: 0; } }

.motion .week b { scale: 0; transition: scale 500ms var(--spring); }
.motion .in .week b { scale: 1; }
.week b:nth-child(2) { transition-delay: 80ms; } .week b:nth-child(3) { transition-delay: 160ms; } .week b:nth-child(4) { transition-delay: 240ms; }
.week b:nth-child(5) { transition-delay: 320ms; } .week b:nth-child(6) { transition-delay: 400ms; } .week b:nth-child(7) { transition-delay: 480ms; }

.motion .in .pulse-line .beat { stroke-dasharray: 0.35 0.65; animation: beat 2.2s linear infinite; }
@keyframes beat { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }

.motion .in .scan i { animation: scanline 1.8s ease-in-out infinite alternate; }
@keyframes scanline { from { translate: -50% -34px; } to { translate: -50% 32px; } }

.motion .in .widgets b { animation: bob 3.2s ease-in-out infinite; }
.motion .in .widgets b:nth-child(2) { animation-delay: 0.3s; }
.motion .in .widgets b:nth-child(3) { animation-delay: 0.6s; }
@keyframes bob { 50% { translate: 0 -6px; } }

.motion .shield .draw { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1400ms var(--ease-out); }
.motion .shield .draw-late { transition-delay: 900ms; transition-duration: 600ms; }
.motion .privacy.in .shield .draw { stroke-dashoffset: 0; }

.motion .track.looping { animation: marquee 70s linear infinite; }
.motion .strip:hover .track, .motion .strip:focus-within .track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(calc(-50% - 14px)); } }

.motion .closing .liquid { transform: translateY(330px); transition: transform 2400ms var(--spring) 300ms; }
.motion .closing.in .liquid { transform: none; }
.motion .closing .wave-a { animation: can-wave 3.4s linear infinite; }
.motion .closing .wave-b { animation: can-wave 2.6s linear infinite reverse; }
@keyframes can-wave { to { transform: translateX(-432px); } }

/* ---------- The pointer's glow (motion.js, mouse only) ----------
   Behind everything: under the text, the phones and the cards, over only
   the page's own background, which is why the hero has none of its own. */

.cursor-glow {
  --glow: #2997ff;
  position: fixed;
  top: 0;
  left: 0;
  z-index: -1;
  width: 1260px;
  height: 1260px;
  margin: -630px 0 0 -630px;
  border-radius: 50%;
  /* Soft by its gradient alone: a blur filter this size repaints a huge
     area on every move. */
  background: radial-gradient(closest-side,
    color-mix(in srgb, var(--glow) 45%, transparent),
    color-mix(in srgb, var(--glow) 24%, transparent) 30%,
    color-mix(in srgb, var(--glow) 9%, transparent) 60%,
    transparent);
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms var(--ease-out), scale 400ms var(--spring);
}
.cursor-glow.on { opacity: 1; }
.cursor-glow.over { scale: 1.15; }

/* Waitlist form: the address and the button side by side, stacked when
   narrow. .hp hides the field only bots fill in. */
.waitlist-form { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 0; }
.waitlist-form input[type="email"] {
  flex: 1 1 220px;
  min-width: 0;
  padding: 11px 18px;
  border: 1px solid #424245;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #f5f5f7;
  font: inherit;
}
.waitlist-form input[type="email"]::placeholder { color: #86868b; }
.waitlist-form input[type="email"]:focus-visible { outline: 2px solid #2997ff; outline-offset: 2px; }
.waitlist-form button {
  padding: 11px 22px;
  border: 0;
  border-radius: 999px;
  background: #0071e3;
  color: #fff;
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
}
.waitlist-form button:hover { background: #0077ed; }
.form-fine { margin-top: 12px; color: #86868b; font-size: 14px; }
.form-error { color: #ff6961; font-weight: 600; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.waitlist-form { justify-content: center; max-width: 480px; margin: 28px auto 0; }
