/* Bunrise waitlist site. Plan: ../DESIGN-PLAN.md. Tokens: tokens.css. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; color-scheme: light; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--cocoa);
  font: 400 var(--step-0)/1.55 var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, video, canvas, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3 {
  font-family: var(--display);
  font-weight: 1000;
  letter-spacing: -0.022em;
  line-height: 0.98;
  text-wrap: balance;
}
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); line-height: 1.04; }
p { text-wrap: pretty; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
.counter, .bar__count, .alarmbar__n, .done__stats b, .set__time { font-variant-numeric: tabular-nums; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--cocoa); outline-offset: 3px; border-radius: 6px; }
[data-bar="cream"] :focus-visible, .try :focus-visible { outline-color: var(--cream); }
[hidden] { display: none !important; }

.wrap { width: min(100% - 2 * var(--gutter), 76rem); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip {
  position: fixed; left: 1rem; top: -4rem; z-index: 100;
  background: var(--cocoa); color: var(--cream); padding: 0.7rem 1rem; border-radius: var(--r-s);
  font-weight: 700; text-decoration: none; transition: top var(--dur-ui) var(--ease-out);
}
.skip:focus { top: 1rem; }

/* ---------- top bar ---------- */
/* The bar scrolls away with the hero. A fixed logo ran over the headline once the page moved. */
.bar {
  position: absolute; inset: 0 0 auto 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center;
  padding: max(0.9rem, env(safe-area-inset-top)) var(--gutter) 0.6rem;
  pointer-events: none;
}
.bar > * { pointer-events: auto; }
.bar__logo { display: grid; align-items: center; min-height: 2.75rem; }
.bar__logo img { grid-area: 1 / 1; width: clamp(6.4rem, 9vw, 8.4rem); transition: opacity var(--dur-ui) linear; }
.bar[data-theme="ink"] .bar__cream, .bar[data-theme="cream"] .bar__ink { opacity: 0; }
.bar__count {
  font: 800 var(--step--1)/1 var(--display);
  text-decoration: none;
  padding: 0.62rem 0.95rem;
  min-height: 2.75rem; display: inline-flex; align-items: center; gap: 0.15em;
  border-radius: var(--r-pill);
  border: 2px solid currentColor;
  transition: color var(--dur-ui) linear, background-color var(--dur-ui) linear;
}
.bar__count b { font-weight: 1000; display: inline-block; }
.bar__count b.pop { animation: pop var(--spring-pop-time) var(--spring-pop); }
.bar[data-theme="ink"] .bar__count { color: var(--cocoa); }
.bar[data-theme="cream"] .bar__count { color: var(--night-cream); }

/* ---------- signup field ---------- */
.signup {
  display: flex; gap: 0.5rem; flex-wrap: wrap;
  max-width: 31rem; margin-top: 1.8rem;
}
.signup input {
  flex: 1 1 13rem; min-width: 0;
  font-size: max(1rem, 16px);
  padding: 0.95rem 1.15rem;
  border: 2px solid var(--cocoa); border-radius: var(--r-pill);
  background: var(--cream); color: var(--cocoa);
}
.signup input::placeholder { color: var(--oat); opacity: 1; }
.signup button {
  flex: 0 0 auto;
  font: 900 1rem/1 var(--display);
  padding: 1rem 1.5rem; min-height: 3.25rem;
  border: 2px solid var(--cocoa); border-radius: var(--r-pill);
  background: var(--cocoa); color: var(--cream);
  transition: transform var(--dur-press) var(--ease-out), background-color var(--dur-ui) linear;
}
.signup button:active { transform: scale(0.97); }
@media (hover: hover) { .signup button:hover { background: var(--night); } }
.signup__note { margin-top: 0.8rem; font-size: var(--step--1); color: var(--cocoa); opacity: 0.86; }
.signup__done {
  margin-top: 1.8rem; max-width: 31rem;
  font: 900 var(--step-1)/1.15 var(--display);
  animation: pop var(--spring-pop-time) var(--spring-pop);
}

/* the hero demo runs for longer than five seconds, so it can be paused */
.bar__right { display: flex; align-items: center; gap: clamp(0.6rem, 2vw, 1.4rem); }
.demo-toggle {
  background: none; border: 0; padding: 0.7rem 0.1rem; min-height: 2.75rem;
  font: 800 var(--step--1)/1 var(--display); color: var(--cocoa);
  text-decoration: underline; text-underline-offset: 0.25em; text-decoration-thickness: 2px;
}

/* ---------- stickers ---------- */
.sticker {
  position: absolute; z-index: 4;
  font: 900 var(--step--1)/1 var(--display);
  padding: 0.6em 0.95em;
  background: var(--cream); color: var(--cocoa);
  border: 2px solid var(--cocoa); border-radius: var(--r-pill);
  white-space: nowrap;
  box-shadow: 3px 4px 0 var(--cocoa);
}

/* ---------- 1. hero ---------- */
.hero {
  position: relative; isolation: isolate;
  background: linear-gradient(180deg, #FFD3B8 0%, #FFB79C 48%, var(--peach) 100%);
  padding: clamp(6.5rem, 13vh, 9rem) 0 0;
  overflow: clip;
}
.hero__grid {
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
  gap: clamp(1.5rem, 4vw, 4rem); align-items: end;
}
.hero__copy { padding-bottom: clamp(5rem, 13vh, 9rem); }
.hero h1 { font-size: clamp(2.7rem, 1.5rem + 4.6vw, 5.4rem); line-height: 0.94; max-width: 13.5ch; }
.hero__sub { margin-top: 1.4rem; font-size: var(--step-1); line-height: 1.35; max-width: 30rem; }
.hero__stage { position: relative; min-height: clamp(27rem, 62vh, 43rem); display: flex; justify-content: center; align-items: flex-end; }
.hero__bun {
  position: absolute; z-index: 4; left: -30%; bottom: 3%;
  width: min(56%, 19rem);
  transform-origin: 50% 100%;
}
.phone--hero { z-index: 3; margin-bottom: clamp(-1.4rem, -2vw, -0.6rem); rotate: 4.5deg; translate: 13% 0; }
.sticker--a { left: -4%; top: 17%; rotate: -9deg; }
.sticker--b { right: -5%; top: 3%; rotate: 7deg; }
.sticker--c { left: -2%; bottom: 52%; rotate: 5deg; }
.hero__hill { position: absolute; z-index: 2; left: 0; right: 0; bottom: -1px; width: 100%; height: clamp(3.2rem, 8vw, 7.5rem); fill: var(--night); }

/* the one page-load sequence: night lifts, the bun rises, the copy settles */
.hero__night { display: none; }
.js .hero__night { display: block; position: absolute; inset: 0; z-index: 9; background: var(--night); transform-origin: 50% 0; }
.js body.awake .hero__night { transform: translateY(-101%); transition: transform 900ms var(--ease-in-out); }
.js .hero__copy > *, .js .phone--hero, .js .hero .sticker { opacity: 0; }
.js .hero__bun { transform: translateY(70%) scale(1.12, 0.84); }
.js body.awake .hero__copy > * { opacity: 1; transform: none; transition: opacity var(--dur-enter) linear, transform 500ms var(--ease-out); }
.js .hero__copy > * { transform: translateY(14px); }
.js body.awake .hero__copy > :nth-child(1) { transition-delay: 620ms; }
.js body.awake .hero__copy > :nth-child(2) { transition-delay: 680ms; }
.js body.awake .hero__copy > :nth-child(n+3) { transition-delay: 740ms; }
.js body.awake .hero__bun { transform: none; transition: transform var(--spring-bun-time) var(--spring-bun) 520ms; }
.js .phone--hero { transform: translateY(40px); }
.js body.awake .phone--hero { opacity: 1; transform: none; transition: opacity var(--dur-enter) linear 430ms, transform var(--spring-soft-time) var(--spring-soft) 430ms; }
.js body.awake .hero .sticker { opacity: 1; transition: opacity var(--dur-ui) linear 1250ms; }

/* ---------- the phone and the app inside it ---------- */
.phone {
  --w: clamp(15rem, 24vw, 20.5rem);
  position: relative; flex: none;
  width: var(--w); aspect-ratio: 390 / 844;
  padding: calc(var(--w) * 0.03);
  border-radius: calc(var(--w) * 0.16);
  background: #120B07;
  box-shadow: inset 0 0 0 2px #33231A, 0 34px 60px -24px rgba(59, 36, 22, 0.55), 0 10px 22px rgba(59, 36, 22, 0.18);
}
.phone__screen {
  position: relative; width: 100%; height: 100%;
  border-radius: calc(var(--w) * 0.132);
  overflow: hidden; background: var(--night);
  container-type: inline-size;
}
.app { position: absolute; inset: 0; font: 700 calc(100cqw / 24.4) / 1.2 var(--display); color: var(--night-cream); }
.app p, .app b, .app span { margin: 0; }
.app__status { position: absolute; top: 1.15em; left: 2em; font-weight: 900; font-size: 1em; }
.app__island { position: absolute; top: 0.8em; left: 50%; width: 7.2em; height: 2.15em; margin-left: -3.6em; border-radius: 2em; background: #000; }
.app__home { position: absolute; bottom: 0.55em; left: 50%; width: 8.6em; height: 0.32em; margin-left: -4.3em; border-radius: 1em; background: var(--night-cream); opacity: 0.9; }
.app__home--ink { background: var(--cocoa); }
.app__head { position: absolute; top: 4.1em; left: 1.4em; right: 1.3em; display: flex; justify-content: space-between; align-items: center; }
.app__logo { height: 2.5em; width: auto; }
.pill { display: inline-flex; align-items: center; gap: 0.5em; padding: 0.55em 0.95em; border-radius: 3em; font-size: 0.8em; font-weight: 800; color: var(--peach); background: rgba(255, 158, 128, 0.16); }
.pill i { width: 0.6em; height: 0.6em; border-radius: 50%; background: currentColor; animation: blink 0.9s steps(2, jump-none) infinite; }
.pill.is-off { color: var(--bun); background: rgba(242, 169, 78, 0.16); }
.pill.is-off i, .is-held .pill i { animation: none; }
.cam { --cam-h: 37em; position: absolute; top: 7.5em; left: 1.2em; right: 1.2em; height: var(--cam-h); border-radius: 1.55em; overflow: hidden; background: #2A1D14; }
/* picture and skeleton share one 3:4 box, taller than the card is wide, centred; the pose data stays in step with the picture */
.cam video, .cam img, .cam canvas { position: absolute; top: 0; left: 50%; width: calc(var(--cam-h) * 0.75); max-width: none; height: 100%; margin-left: calc(var(--cam-h) * -0.375); object-fit: cover; }
.cam video, .cam img { transform: scaleX(-1); }
.cam::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 0.3em var(--bun); opacity: 0; }
.cam.pop::after { animation: flash 500ms linear; }
.counter { position: absolute; top: 0.12em; left: 0.22em; font-size: 4.5em; font-weight: 1000; line-height: 1; letter-spacing: -0.045em; color: #fff; text-shadow: 0 0.05em 0.28em rgba(0, 0, 0, 0.55); transform-origin: 0 0; }
.counter small { font-size: 0.56em; font-weight: 900; letter-spacing: -0.02em; opacity: 0.9; }
.counter.pop { animation: pop var(--spring-pop-time) var(--spring-pop); }
.hint { position: absolute; bottom: 0.95em; left: 50%; transform: translateX(-50%); padding: 0.5em 1em; border-radius: 3em; font-size: 0.76em; font-weight: 700; white-space: nowrap; background: rgba(27, 17, 10, 0.62); }
.app__foot { position: absolute; left: 1.2em; right: 1.3em; top: 46.3em; display: flex; align-items: center; gap: 0.95em; }
.badge { flex: none; width: 5.3em; height: 5.3em; border-radius: 50%; background: var(--cream); overflow: hidden; box-shadow: 0 0 0 0.22em rgba(242, 169, 78, 0.42); }
.badge img { width: 100%; height: 100%; object-fit: contain; scale: 1.2; translate: 0 -2%; transform-origin: 50% 96%; }
.badge.pop img { animation: squat-rep 520ms var(--ease-out); }
.app__prog { flex: 1; display: grid; gap: 0.28em; min-width: 0; }
.app__prog b { font-size: 1.16em; font-weight: 1000; letter-spacing: -0.01em; }
.app__prog > span:not(.bar-track) { font-size: 0.78em; font-weight: 700; color: #B9AA9B; white-space: nowrap; }
.bar-track { height: 0.62em; border-radius: 1em; background: rgba(245, 233, 216, 0.14); overflow: hidden; margin-top: 0.3em; }
.bar-track i { display: block; height: 100%; border-radius: inherit; background: var(--bun); transform-origin: 0 50%; transform: scaleX(0.7); transition: transform 350ms var(--ease-out); }

/* done screen */
.app--done { color: var(--cocoa); background: linear-gradient(180deg, #FFD3B8 0%, #FFE9D6 40%, var(--cream) 72%); }
[data-demo] .app--done { clip-path: circle(0 at 16% 89.5%); visibility: hidden; transition: clip-path 520ms var(--ease-out), visibility 0s 520ms; }
[data-demo][data-state="done"] .app--done { clip-path: circle(150% at 16% 89.5%); visibility: visible; transition: clip-path 520ms var(--ease-out); }
.done__logo { position: absolute; top: 4.3em; left: 50%; height: 2.8em; width: auto; translate: -50% 0; }
.done__bun { position: absolute; top: 8.4em; left: 50%; width: 21.5em; height: auto; translate: -50% 0; transform-origin: 50% 96%; }
.done__h { position: absolute; top: 10.15em; left: 0; right: 0; text-align: center; font-size: 3.05em; font-weight: 1000; letter-spacing: -0.03em; line-height: 1; }
.done__p { position: absolute; top: 32.4em; left: 0; right: 0; text-align: center; font-size: 1.08em; font-weight: 700; color: var(--oat); }
.done__stats { position: absolute; top: 39.5em; left: 1.5em; right: 1.5em; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6em; }
.done__stats span { display: grid; gap: 0.1em; padding: 0.8em 0.2em 0.7em; text-align: center; border-radius: 1.1em; background: #fff; font-size: 0.72em; font-weight: 800; color: var(--oat); }
.done__stats b { font-size: 2.1em; font-weight: 1000; color: var(--cocoa); line-height: 1; }
.done__btn { position: absolute; left: 1.5em; right: 1.5em; top: 43.9em; display: grid; place-items: center; height: 3.4em; border-radius: 2em; background: var(--cocoa); color: var(--cream); font-weight: 900; font-size: 1.08em; }
[data-demo][data-state="done"] .done__bun { animation: bun-pop var(--spring-bun-time) var(--spring-bun) 120ms backwards; }
[data-demo][data-state="done"] .done__h { animation: rise 420ms var(--ease-out) 300ms backwards; }
[data-demo][data-state="done"] .done__p { animation: rise 420ms var(--ease-out) 380ms backwards; }
[data-demo][data-state="done"] .done__stats { animation: rise 420ms var(--ease-out) 480ms backwards; }
[data-demo][data-state="done"] .done__btn { animation: rise 420ms var(--ease-out) 600ms backwards; }

/* streak screen: follows the done screen in the hero demo (the bun hops, 1 rolls to 2, today gets its tick) */
.app--streak { color: var(--cocoa); background: linear-gradient(180deg, #FFD3B8 0%, #FFE9D6 40%, var(--cream) 72%); opacity: 0; visibility: hidden; transition: opacity 300ms linear, visibility 0s 300ms; }
[data-demo][data-state="streak"] .app--streak { opacity: 1; visibility: visible; transition: opacity 300ms linear; }
[data-demo][data-state="streak"] .app--done { clip-path: circle(150% at 16% 89.5%); visibility: visible; }
.streak__bun { position: absolute; top: 6.6em; left: 50%; width: 11.6em; height: auto; translate: -50% 0; }
.streak__num { position: absolute; top: 17.6em; left: 0; right: 0; height: 9.4em; overflow: hidden; }
.streak__num b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 9.2em; font-weight: 1000; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.streak__new { opacity: 0; }
.streak__label { position: absolute; top: 18.3em; left: 0; right: 0; text-align: center; font-size: 1.5em; font-weight: 900; color: var(--toast); }
.streak__week { position: absolute; top: 30.3em; left: 2em; right: 2em; margin: 0; padding: 0.7em 0.9em 1em; list-style: none; display: grid; grid-template-columns: repeat(7, 1fr); border-radius: 1.3em; background: #fff; }
.streak__week li { display: grid; justify-items: center; gap: 0.55em; }
.streak__week span { font-size: 0.72em; font-weight: 800; color: var(--oat); }
.streak__week i { width: 2em; height: 2em; border-radius: 50%; box-shadow: inset 0 0 0 0.12em #E8DAC8; display: grid; place-items: center; }
.streak__week .is-done i, .streak__week .is-today i { box-shadow: none; background: var(--gold, #F2A94E) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 62% no-repeat; }
.streak__week .is-today i { scale: 0; }
.streak__line { position: absolute; top: 33em; left: 0; right: 0; text-align: center; font-size: 1.13em; font-weight: 700; color: var(--oat); opacity: 0; }
[data-demo][data-state="streak"] .streak__bun { animation: streak-hop 460ms var(--ease-out) 500ms; }
[data-demo][data-state="streak"] .streak__old { animation: streak-out 350ms var(--ease-out) 550ms forwards; }
[data-demo][data-state="streak"] .streak__new { animation: streak-in 520ms var(--spring-bun) 550ms forwards; }
[data-demo][data-state="streak"] .is-today i { animation: streak-dot 420ms var(--spring-bun) 750ms forwards; }
[data-demo][data-state="streak"] .streak__line { animation: rise 420ms var(--ease-out) 1050ms forwards; opacity: 1; animation-fill-mode: both; }
@keyframes streak-hop { 50% { translate: -50% -1.05em; } }
@keyframes streak-out { to { opacity: 0; transform: translateY(-60%); } }
@keyframes streak-in { from { opacity: 0; transform: translateY(60%); } to { opacity: 1; transform: none; } }
@keyframes streak-dot { from { scale: 0.4; } to { scale: 1; } }
@media (prefers-reduced-motion: reduce) {
  .streak__old { opacity: 0; } .streak__new { opacity: 1; } .streak__week .is-today i { scale: 1; } .streak__line { opacity: 1; }
}

/* set-alarm screen */
.app--set { color: var(--cocoa); background: var(--cream); }
.set__logo { position: absolute; top: 4.3em; left: 1.5em; height: 2.5em; width: auto; }
.set__label { position: absolute; top: 8.9em; left: 1.6em; font-size: 1em; font-weight: 800; color: var(--oat); }
.set__time { position: absolute; top: 1.78em; left: 0.27em; font-size: 5.9em; font-weight: 1000; letter-spacing: -0.05em; line-height: 1; }
.set__time small { font-size: 0.28em; font-weight: 900; letter-spacing: 0; margin-left: 0.35em; color: var(--oat); }
.set__days { position: absolute; top: 18.6em; left: 1.5em; right: 1.5em; display: flex; justify-content: space-between; }
.set__days b, .set__days span { display: grid; place-items: center; width: 2.55em; height: 2.55em; border-radius: 50%; font-size: 0.9em; font-weight: 900; }
.set__days b { background: var(--cocoa); color: var(--cream); }
.set__days span { box-shadow: inset 0 0 0 0.14em var(--cocoa); opacity: 0.5; }
.set__row { position: absolute; left: 1.5em; right: 1.5em; display: flex; justify-content: space-between; align-items: center; padding: 1em 1.1em; border-radius: 1.2em; background: #fff; font-size: 0.95em; }
.set__row span { font-weight: 700; color: var(--oat); }
.set__row b { font-weight: 1000; }
.set__row:nth-of-type(4) { top: 23.8em; }
.set__row:nth-of-type(5) { top: 27.9em; }
.set__bun { position: absolute; top: 31.2em; left: 50%; width: 13em; height: auto; translate: -50% 0; }
.set__btn { position: absolute; left: 1.5em; right: 1.5em; top: 44.6em; display: grid; place-items: center; height: 3.4em; border-radius: 2em; background: var(--cocoa); color: var(--cream); font-weight: 900; font-size: 1.08em; }

/* ---------- 2. try it ---------- */
.try { position: relative; isolation: isolate; background: var(--night); color: var(--night-cream); padding: clamp(4rem, 10vw, 8rem) 0 0; overflow: clip; }
.try__dawn { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, #FFD3B8 0%, #FFB79C 55%, var(--peach) 100%); opacity: var(--sky); transition: opacity 600ms var(--ease-out); }
.try[data-lit] { color: var(--cocoa); }
.try h2, .try p, .alarmbar, .sound, .again { transition: color 400ms linear, border-color 400ms linear; }
.try__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.5rem, 5vw, 5rem); align-items: end; }
.try__copy { padding-bottom: clamp(4rem, 9vw, 7rem); }
.try__lede { margin-top: 1.1rem; font-size: var(--step-1); line-height: 1.35; max-width: 27rem; }
.alarmbar { margin-top: 2.2rem; display: flex; align-items: center; gap: 0.75rem; max-width: 27rem; font: 800 var(--step-0)/1 var(--display); }
.alarmbar__dot { flex: none; width: 0.75rem; height: 0.75rem; border-radius: 50%; background: var(--peach); animation: blink 0.9s steps(2, jump-none) 5; }
.try[data-done] .alarmbar__dot { animation: none; background: currentColor; }
.alarmbar__track { flex: 1; height: 0.7rem; border-radius: 1rem; background: color-mix(in srgb, currentColor 18%, transparent); overflow: hidden; }
.alarmbar__track i { display: block; height: 100%; border-radius: inherit; background: var(--peach); transform-origin: 0 50%; transition: transform 380ms var(--ease-out), background-color 400ms linear; }
.try[data-lit] .alarmbar__track i { background: var(--cocoa); }
.alarmbar__n b { display: inline-block; font-weight: 1000; }
.alarmbar__n b.pop { animation: pop var(--spring-pop-time) var(--spring-pop); }
.try__actions { margin-top: 2rem; display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.squat {
  width: clamp(8.5rem, 16vw, 11rem); aspect-ratio: 1;
  border-radius: 50%; border: 0;
  background: var(--cream); color: var(--cocoa);
  font: 1000 var(--step-2)/1 var(--display); letter-spacing: -0.02em;
  box-shadow: 0 0.6rem 0 var(--peach);
  transition: transform var(--dur-press) var(--ease-out), box-shadow var(--dur-press) var(--ease-out);
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.squat:active, .squat.down { transform: translateY(0.45rem); box-shadow: 0 0.15rem 0 var(--peach); }
.try[data-lit] .squat { background: var(--cocoa); color: var(--cream); box-shadow: 0 0.6rem 0 rgba(59, 36, 22, 0.35); }
.try[data-lit] .squat:active, .try[data-lit] .squat.down { box-shadow: 0 0.15rem 0 rgba(59, 36, 22, 0.35); }
@media (hover: hover) { .squat:hover:not(:active) { transform: translateY(-0.12rem); } .sound:hover, .again:hover, .demo-toggle:hover { text-decoration-thickness: 3px; } }
.sound, .again { background: none; border: 0; padding: 0.8rem 0.2rem; min-height: 2.75rem; font: 800 var(--step--1)/1 var(--display); text-decoration: underline; text-underline-offset: 0.25em; text-decoration-thickness: 2px; }
.try__after { margin-top: 2rem; }
.try__punch { font: 1000 var(--step-2)/1.02 var(--display); letter-spacing: -0.02em; animation: pop var(--spring-pop-time) var(--spring-pop); }
.try__after .signup { margin-top: 1.3rem; }
.again { margin-top: 0.9rem; }
.try__stage { position: relative; z-index: 1; align-self: end; height: clamp(17rem, 40vw, 31rem); }
.try__sun { position: absolute; left: 50%; bottom: -34%; width: 120%; aspect-ratio: 1; translate: -50% 0; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 233, 199, 0.95), rgba(255, 233, 199, 0) 70%); opacity: calc(0.12 + var(--sky) * 0.88); transition: opacity 600ms var(--ease-out); }
.try__bun { position: absolute; left: 50%; bottom: 0; width: min(78%, 25rem); translate: -50% calc((1 - var(--p)) * 9% - 2%); transition: translate 620ms var(--spring-pop); transform-origin: 50% 96%; }
.try__bun.rep { animation: squat-rep 520ms var(--ease-out); }
.try__bun.hop { animation: hop 900ms var(--ease-out); }
.try__hill { position: absolute; z-index: 2; left: 0; right: 0; bottom: -1px; width: 100%; height: clamp(2.6rem, 6.5vw, 6rem); fill: var(--cream); }

/* ---------- 3. how a morning goes ---------- */
.how { background: var(--cream); padding: clamp(4.5rem, 10vw, 8.5rem) 0 clamp(3rem, 8vw, 7rem); }
.how__grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr); gap: clamp(2rem, 7vw, 7rem); margin-top: clamp(2rem, 5vw, 4rem); }
.how__pin { position: sticky; top: max(5.5rem, calc(50vh - 21.5rem)); align-self: start; display: flex; justify-content: center; padding-bottom: 2rem; }
.phone--how { rotate: -3deg; }
.phone--how .app { opacity: 0; visibility: hidden; transition: opacity 260ms linear, visibility 0s 260ms; }
.phone--how[data-step="1"] [data-screen="1"], .phone--how[data-step="2"] [data-screen="2"], .phone--how[data-step="3"] [data-screen="3"] { opacity: 1; visibility: visible; transition: opacity 260ms linear; }
.how__steps > li { min-height: min(78vh, 40rem); display: flex; flex-direction: column; justify-content: center; max-width: 30rem; }
.how__steps > li > h3, .how__steps > li > p:not(.how__when) { margin-top: 0.9rem; }
.how__when { font: 900 var(--step-0)/1 var(--display); color: var(--crust); }
.how__steps > li > p:not(.how__when) { font-size: var(--step-1); line-height: 1.4; }
.how__steps .phone { display: none; }

/* ---------- 4. why squats ---------- */
.why { background: var(--butter); padding: clamp(5rem, 12vw, 10rem) 0; }
.why__line { font: 1000 var(--step-4)/0.98 var(--display); letter-spacing: -0.025em; max-width: 19ch; text-wrap: balance; }
.why__line span { transition: opacity 300ms linear; }
.js .why__line[data-lit] span { opacity: 0.22; }
.js .why__line[data-lit] span.on { opacity: 1; }
.why__facts { margin-top: clamp(3rem, 7vw, 6rem); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.5rem, 4vw, 4rem); border-top: 2px solid var(--cocoa); padding-top: clamp(1.5rem, 3vw, 2.5rem); }
.why__facts dt { font: 1000 var(--step-1)/1.1 var(--display); letter-spacing: -0.01em; }
.why__facts dd { margin-top: 0.6rem; max-width: 24rem; }

/* ---------- 5. meet the bun ---------- */
.bun { background: var(--peach); padding: clamp(4.5rem, 10vw, 8.5rem) 0 clamp(4rem, 9vw, 7.5rem); }
.bun__lede { margin-top: 0.9rem; font-size: var(--step-1); }
.bun__moods { margin-top: clamp(2rem, 5vw, 4rem); display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(1rem, 2.4vw, 2.4rem); align-items: start; }
.bun__moods li { display: grid; gap: 0.3rem; align-content: start; }
.bun__moods img { width: 118%; max-width: none; margin: 0 -9% 0.5rem; transform-origin: 50% 94%; filter: drop-shadow(0 0.7rem 0.5rem rgba(59, 36, 22, 0.18)); }
.bun__moods b { font: 1000 var(--step-1)/1 var(--display); }
.bun__moods span { font-size: var(--step--1); line-height: 1.4; }
@media (hover: hover) { .bun__moods li:hover img { animation: wobble 620ms var(--ease-out); } }

/* ---------- 6. note and questions ---------- */
.note { background: var(--cream); padding: clamp(4.5rem, 10vw, 8.5rem) 0; }
.note__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2.5rem, 7vw, 7rem); align-items: start; }
.note h2 { font-size: var(--step-2); }
.note__letter p { margin-top: 1.1rem; font-size: var(--step-1); line-height: 1.45; max-width: 31rem; }
.note__sign { margin-top: 1.8rem; width: 8.5rem; }
.faq details { border-top: 2px solid var(--cocoa); }
.faq details:first-of-type { margin-top: 1.4rem; }
.faq details:last-of-type { border-bottom: 2px solid var(--cocoa); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.15rem 0; min-height: 2.75rem; font: 900 var(--step-1)/1.15 var(--display); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 0.85rem; height: 0.85rem; border-right: 3px solid currentColor; border-bottom: 3px solid currentColor; rotate: 45deg; translate: 0 -25%; transition: rotate var(--dur-ui) var(--ease-out), translate var(--dur-ui) var(--ease-out); }
.faq details[open] summary::after { rotate: 225deg; translate: 0 25%; }
.faq details p { padding: 0 2.5rem 1.4rem 0; max-width: 34rem; }

/* ---------- 7. the field again ---------- */
.last { background: var(--cocoa); color: var(--cream); padding: clamp(4.5rem, 10vw, 8.5rem) 0 0; overflow: clip; }
.last__grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: clamp(1.5rem, 5vw, 5rem); align-items: end; }
.last__grid > div { padding-bottom: clamp(4rem, 9vw, 7.5rem); }
.last h2 { font-size: var(--step-4); line-height: 0.93; }
.signup--big { max-width: 40rem; margin-top: 2.2rem; }
.last .signup input { border-color: var(--cream); font-size: var(--step-1); padding: 1.15rem 1.4rem; }
.last .signup button { background: var(--peach); color: var(--cocoa); border-color: var(--peach); font-size: var(--step-1); padding: 1.15rem 1.8rem; }
@media (hover: hover) { .last .signup button:hover { background: var(--peach-soft); } }
.last .signup__note { color: var(--night-cream); }
.last__bun { width: min(100%, 24rem); justify-self: center; margin-bottom: -6%; transform-origin: 50% 96%; }
.last__bun.rep { animation: squat-rep 520ms var(--ease-out); }

/* ---------- footer ---------- */
.foot { background: var(--night); color: var(--night-cream); padding: 2.6rem 0 max(2.6rem, env(safe-area-inset-bottom)); font-size: var(--step--1); }
.foot__grid { display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; align-items: center; }
.foot img { width: 7rem; }
.foot p:last-child { margin-left: auto; }

/* ?still in the address shows the page with nothing in motion, for screenshots */
.still *, .still *::before, .still *::after { transition: none !important; animation-duration: 1ms !important; animation-delay: 0ms !important; }

/* ---------- keyframes ---------- */
@keyframes blink { 0% { opacity: 1; } 50% { opacity: 0.25; } }
@keyframes pop { from { transform: scale(0.72); } to { transform: scale(1); } }
@keyframes flash { from { opacity: 1; } to { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(0.9em); } }
@keyframes bun-pop { from { transform: scale(0.55); } to { transform: scale(1); } }
/* one squat: down (wider, shorter), then up past standing, then settle. Volume stays roughly constant. */
@keyframes squat-rep {
  0% { transform: scale(1, 1); }
  28% { transform: scale(1.13, 0.84); }
  62% { transform: scale(0.95, 1.07); }
  100% { transform: scale(1, 1); }
}
@keyframes hop {
  0% { transform: translateY(0) scale(1, 1); }
  18% { transform: translateY(0) scale(1.14, 0.82); }
  45% { transform: translateY(-17%) scale(0.94, 1.08); }
  72% { transform: translateY(0) scale(1.08, 0.9); }
  100% { transform: translateY(0) scale(1, 1); }
}
@keyframes wobble {
  0% { transform: rotate(0) scale(1, 1); }
  25% { transform: rotate(-4deg) scale(1.06, 0.94); }
  55% { transform: rotate(3deg) scale(0.97, 1.04); }
  100% { transform: rotate(0) scale(1, 1); }
}

/* ---------- narrower screens ---------- */
@media (max-width: 60rem) {
  .hero__grid, .try__grid, .note__grid, .last__grid { grid-template-columns: minmax(0, 1fr); }
  .hero__copy { padding-bottom: 1.5rem; }
  .hero__stage { min-height: 0; padding-top: 2.5rem; }
  .phone { --w: clamp(14.5rem, 62vw, 19rem); }
  .phone--hero { translate: 13% 0; margin-bottom: -0.5rem; }
  .hero__bun { left: -7%; bottom: 0; width: min(31%, 8.5rem); } /* small enough to stand clear of the phone's footer */
  .sticker--a { left: 1%; top: 6%; }
  .sticker--b { right: 0; top: 2%; }
  .sticker--c { left: 0; bottom: 38%; }
  .try__copy { padding-bottom: 1rem; }
  .try__stage { height: clamp(15rem, 62vw, 22rem); }
  .how__grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .how__pin { display: none; }
  .how__steps > li { min-height: 0; padding: 2.2rem 0 3rem; max-width: none; }
  .how__steps .phone { display: block; margin: 2.4rem auto 0; }
  /* each phone stands differently: left lean, right lean and off to the right, then nearly straight and larger */
  .how__steps > li:nth-child(1) .phone { rotate: -3.5deg; translate: -8% 0; }
  .how__steps > li:nth-child(2) .phone { rotate: 4deg; translate: 9% 0; }
  .how__steps > li:nth-child(3) .phone { --w: clamp(15.5rem, 70vw, 20.5rem); rotate: -1.5deg; }
  .how__steps .phone .app { opacity: 1; visibility: visible; }
  .why__facts { grid-template-columns: minmax(0, 1fr); }
  .bun__moods { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 2.2rem; }
  .last__grid > div { padding-bottom: 1rem; }
  .last__bun { width: min(70%, 17rem); margin-bottom: -5%; }
  .foot p:last-child { margin-left: 0; }
}
@media (max-width: 30rem) {
  .bun__moods { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-bottom: 1.8rem; }
  .bun__moods li:nth-child(even) { translate: 0 1.8rem; } /* stagger the two columns so it is not a plain grid */
  .signup button { flex: 1 1 100%; }
  .bar__count { padding-inline: 0.8rem; }
}

/* ---------- reduced motion: keep fades, drop travel, bounce and loops ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; }
  .js .hero__night { display: none; }
  .js .hero__copy > *, .js .phone--hero, .js .hero__bun { transform: none !important; }
  .js body.awake .hero__copy > *, .js body.awake .phone--hero, .js body.awake .hero .sticker { transition: opacity 200ms linear !important; transition-delay: 0ms !important; }
  .try__bun, .bar-track i, .alarmbar__track i { transition-duration: 1ms; }
  .squat, .signup button { transition: none; }
}
