/* Hughie's eyes open by moving the top edge of the awake art's eye band up
   from 61% (shut) to 46% (open) of his height, as in the product's
   `.hughie-peek`. Each reason to open them animates its own property, so a
   stir never restarts the opening blinks. */
@property --blink { syntax: "<percentage>"; inherits: true; initial-value: 61%; }
@property --stir { syntax: "<percentage>"; inherits: true; initial-value: 61%; }
@property --wake { syntax: "<percentage>"; inherits: true; initial-value: 61%; }
@property --peek { syntax: "<percentage>"; inherits: true; initial-value: 61%; }

:root {
  --night: #0d0c0b;
  --night-ink: #f2eee9;
  --night-soft: #a59d94;
  --night-faint: #756d65;
  --night-surface: #1d1a17;
  --night-hairline: rgb(255 255 255 / 0.1);
  --canvas: #f5f3ef;
  --ink: #1f1b17;
  --ink-soft: #6f665d;
  --ink-faint: #9a9086;
  --surface: #fffdfa;
  --hairline: rgb(70 50 30 / 0.12);
  --glow-from: #ffb56b;
  --glow-to: #ff5f8a;
  --attention: #f0a35a;
  /* The product's --ease-spring and --ease-settle. */
  --spring: linear(
    0, 0.048, 0.157, 0.291, 0.427, 0.553, 0.662, 0.752, 0.823, 0.878, 0.92, 0.95, 0.971,
    0.985, 0.994, 1, 1.003, 1.005, 1.005, 1.005, 1.004, 1.004, 1.003, 1.002, 1
  );
  --settle: cubic-bezier(0.25, 0.6, 0.3, 1);
  --face: min(44svh, 70vw, 400px);
  color-scheme: dark;
  background: var(--night);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
body { background: var(--night); }

/* What follows the first screen, the second act and the footer, stays at
   night when joining brings the morning. */
.page, .page ~ * {
  --text: var(--night-ink);
  --soft: var(--night-soft);
  --faint: var(--night-faint);
  --ground: var(--night);
  --panel: var(--night-surface);
  --line: var(--night-hairline);
  --accent: var(--glow-from);
}

.page {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100svh;
  padding: 56px 16px 96px;
  overflow: hidden;
  background: var(--night);
  color: var(--text);
}

/* Joining brings the morning: once the light has opened out of Hughie, the
   page itself is day, and so is the closing, where joining can happen too. */
.page.morning, .closing.morning {
  --text: var(--ink);
  --soft: var(--ink-soft);
  --faint: var(--ink-faint);
  --ground: var(--canvas);
  --panel: var(--surface);
  --line: var(--hairline);
  --accent: #c8702a;
  background: var(--canvas);
  transition: background 0s 1.5s;
}

/* Hughie */

.hughie { position: relative; width: var(--face); aspect-ratio: 1; animation: blink-twice 1.2s ease 1.9s both; }

.hughie::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: -1;
  width: 320vmax;
  height: 320vmax;
  margin: -160vmax 0 0 -160vmax;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--canvas) 80%, rgb(255 222 186 / 0.9) 90%, rgb(255 181 107 / 0.3) 96%, transparent);
  transform: scale(0);
  pointer-events: none;
}

.morning .hughie::before { transform: scale(1); transition: transform 1.6s cubic-bezier(0.55, 0, 0.35, 1); }

.face {
  all: unset;
  position: absolute;
  inset: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.face:focus-visible { outline: 2px solid var(--glow-from); outline-offset: 8px; border-radius: 22%; }

.tile {
  position: absolute;
  inset: 0;
  border-radius: 22%;
  background: #000;
  opacity: 0;
  scale: 0.94;
}

.morning .tile { opacity: 1; scale: 1; transition: opacity 500ms var(--settle) 1s, scale 700ms var(--spring) 1s; }

.bands { position: absolute; inset: 0; }

/* He is drawn the way the terminal draws him: stripe by stripe, each sliding
   in from alternate sides, stretched while it flies. */
.band {
  position: absolute;
  left: 0;
  width: 100%;
  animation: band-in 720ms var(--spring) calc(150ms + var(--index) * 24ms) both;
}

@keyframes band-in {
  from { translate: calc(var(--side) * 70vw) 0; scale: 2.4 1; opacity: 0; }
  30% { opacity: 1; }
  to { translate: 0 0; scale: 1 1; opacity: 1; }
}

/* He breathes: his stripes thicken and thin. */
.slice { position: absolute; inset: 0; overflow: hidden; animation: breathe 4.2s ease-in-out 1.6s infinite; }

@keyframes breathe {
  0%, 100% { scale: 1 1; }
  50% { scale: 1 1.09; }
}

.art { position: absolute; left: 0; width: 100%; }
.art > img, .patch, .glow { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
.art img { display: block; }

/* A patch shows another state of the art over the sleeping face; it is backed
   by whatever is behind him, since the art's black is transparent. */
.patch { background: var(--night); }
.morning .patch { background: #000; transition: background 0s 1s; }
.patch img { position: absolute; inset: 0; width: 100%; height: 100%; }

.eyes { clip-path: inset(min(var(--blink), var(--stir), var(--wake)) 0 39% 0); }
.peek { clip-path: inset(var(--peek) 45% 39% 38%); }
.mouth { clip-path: inset(72% 30% 16% 53%); opacity: 0; }

/* A wave of his logo's two colours travels across his stripes. */
.glow {
  background: linear-gradient(115deg, var(--glow-from), var(--glow-to), var(--glow-from), var(--glow-to), var(--glow-from));
  background-size: 200% 100%;
  mix-blend-mode: overlay;
  opacity: 0.5;
  -webkit-mask: url(./hughie/asleep.png) 0 0 / 100% 100% no-repeat;
  mask: url(./hughie/asleep.png) 0 0 / 100% 100% no-repeat;
  animation: glow 9s linear infinite;
}

@keyframes glow {
  from { background-position: 0% 0; }
  to { background-position: 100% 0; }
}

/* Once drawn, he blinks twice; then he sleeps. */
@keyframes blink-twice {
  0%, 100% { --blink: 61%; }
  6%, 16% { --blink: 46%; }
  24% { --blink: 61%; }
  34%, 46% { --blink: 46%; }
  56% { --blink: 61%; }
}

/* Hovering a sleeping Hughie makes him peek with one eye. */
.hughie:not(.awake) .face:hover .peek { animation: peek 1200ms cubic-bezier(0.2, 0.8, 0.2, 1); }

@keyframes peek {
  25%, 65% { --peek: 46%; }
}

/* Someone starts writing to him: his eyes flutter open and fall shut. */
.stirring .face { animation: stir 900ms ease-in-out; }

@keyframes stir {
  25%, 50% { --stir: 46%; }
}

/* Joined: he wakes, blinks once, and stays awake. */
.awake .face { animation: wake 2.4s ease 0.9s both; }

@keyframes wake {
  0% { --wake: 61%; }
  14%, 62% { --wake: 46%; }
  68% { --wake: 61%; }
  76%, 100% { --wake: 46%; }
}

/* Poked, he mumbles in his sleep: the closed mouth shows in beats. */
.mumbling .mouth { animation: talk 3200ms step-end; }

@keyframes talk {
  10%, 20%, 28%, 40%, 50%, 60% { opacity: 1; }
  15%, 24%, 34%, 45%, 55%, 66% { opacity: 0; }
}

.says {
  position: absolute;
  left: 50%;
  bottom: 100%;
  z-index: 1;
  width: max-content;
  max-width: 80vw;
  margin-bottom: 16px;
  padding: 10px 18px;
  border: 1px solid var(--hairline);
  border-radius: 16px;
  background: var(--surface);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.35;
  text-align: center;
  translate: -50% 0;
  transform-origin: 50% 100%;
  animation: say 3200ms ease-out both;
}

.says::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-right: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  background: var(--surface);
  rotate: 45deg;
}

@keyframes say {
  0% { opacity: 0; scale: 0.9; }
  8%, 88% { opacity: 1; scale: 1; }
  100% { opacity: 0; scale: 0.96; }
}

/* Words */

.pitch {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(560px, 100%);
  margin-top: 40px;
  text-align: center;
  animation: arrive 900ms var(--settle) 1.3s both;
}

@keyframes arrive {
  from { opacity: 0; filter: blur(10px); translate: 0 8px; }
}

h1 {
  font-size: clamp(34px, 5.6vw, 58px);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.035em;
  text-wrap: balance;
  color: var(--text);
  transition: color 600ms 1.2s;
}

.lede {
  max-width: 28em;
  margin-top: 14px;
  font-size: clamp(17px, 2.1vw, 20px);
  line-height: 1.4;
  letter-spacing: -0.01em;
  text-wrap: balance;
  color: var(--soft);
  transition: color 600ms 1.2s;
}

.signup { display: contents; }
.waitlist { display: flex; flex-wrap: wrap; gap: 10px; width: 100%; margin-top: 30px; }

.waitlist input[type="email"] {
  flex: 1 1 240px;
  height: 52px;
  padding: 0 18px;
  border: 1px solid var(--night-hairline);
  border-radius: 14px;
  outline: none;
  background: var(--night-surface);
  color: var(--night-ink);
  caret-color: var(--glow-from);
  font: inherit;
  font-size: 17px;
  transition: border-color 150ms;
}

.waitlist input[type="email"]::placeholder { color: var(--night-faint); }
.waitlist input[type="email"]:focus { border-color: rgb(255 255 255 / 0.28); }

.button {
  all: unset;
  display: inline-grid;
  place-items: center;
  flex: 0 1 auto;
  height: 52px;
  padding: 0 22px;
  border-radius: 14px;
  background: var(--night-ink);
  color: var(--night);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 150ms;
}

.button:hover { opacity: 0.88; }
.button:active { opacity: 0.72; }
.button:disabled { opacity: 0.4; cursor: default; }
.button:focus-visible { outline: 2px solid var(--glow-from); outline-offset: 3px; }

.morning .button { background: var(--ink); color: var(--canvas); }

/* Below the width where the address and the button share a line. */
@media (max-width: 480px) {
  .waitlist .button { flex: 1 1 100%; }
}

.fine, .note { margin-top: 14px; font-size: 14px; color: var(--faint); }
.note { color: var(--attention); }

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

.quiet { color: var(--soft); font-size: 16px; text-decoration: none; }
.quiet:hover { color: var(--text); }

/* The hero: Hughie, and what he does, in one place. Choosing an example
   shrinks him into the corner of its scene, one eye open, with his line
   beside him; the scene follows him in. Closing it, or joining, lets the
   scene recede and him grow back. Each scene plays once from the moment it
   mounts; choosing again mounts it afresh. */

.hero {
  --face-box: var(--face);
  --stage-box: 470px; /* the tallest scene, Bills & papers, at a phone's width */
  --box: var(--face-box);
  --pad: 16px;
  --face-top: 0px;
  --avatar: 0.12;
  container-type: inline-size;
  display: grid;
  grid-template-rows: var(--box) auto;
  justify-items: center;
  width: min(560px, 100%);
  transition: grid-template-rows 560ms var(--spring);
}

.hero.showing { --box: var(--stage-box); }

/* He comes after the scenes in the page so he is drawn over them. He
   scales from his top left corner, so it is that corner that travels to the
   scene's. */
.hero .hughie {
  grid-area: 1 / 1;
  align-self: start;
  margin-top: var(--face-top);
  transform-origin: 0 0;
  transition: translate 560ms var(--spring), scale 560ms var(--spring), --peek 240ms var(--settle);
}

.showing .hughie {
  --peek: 46%;
  translate: calc(var(--pad) - (100cqw - var(--face)) / 2) calc(var(--pad) - var(--face-top));
  scale: var(--avatar);
  transition: translate 560ms var(--spring), scale 560ms var(--spring), --peek 300ms var(--settle) 420ms;
}

.showing .face { pointer-events: none; }

/* While he moves he is a layer of his own, holding the morning's light
   (`.hughie::before`) over what came before him; the words stay above it. */
.pitch { position: relative; z-index: 1; }

.stage-slot {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  opacity: 0;
  scale: 0.98;
  filter: blur(4px);
  visibility: hidden;
  transition: opacity 260ms var(--settle), scale 260ms var(--settle), filter 260ms var(--settle), visibility 0s 260ms;
}

.showing .stage-slot { opacity: 1; scale: 1; filter: none; visibility: visible; transition: none; }

.stage {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: var(--pad);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  color: var(--text);
  font-size: 15px;
  line-height: 1.4;
  text-align: left;
  animation: enter 520ms var(--spring) 100ms both;
}

.stage-head {
  display: grid;
  grid-template-columns: calc(var(--face) * var(--avatar)) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: calc(var(--face) * var(--avatar));
  margin-bottom: 16px;
}

.stage-head .line { color: var(--soft); font-size: 14px; line-height: 1.4; }

.close {
  all: unset;
  align-self: start;
  color: var(--faint);
  font-size: 13px;
  cursor: pointer;
  transition: color 150ms;
}

.close:hover { color: var(--text); }
.close:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.scene > div { display: flex; flex-direction: column; }

.tries { grid-row: 2; margin-top: 22px; text-align: center; animation: arrive 900ms var(--settle) 1.3s both; }
.tries h2 { font-size: 14px; font-weight: 500; color: var(--faint); transition: color 600ms 1.2s; }

.choices { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 10px; }

.choice, .do {
  all: unset;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 150ms, scale 150ms var(--settle);
}

.choice:hover, .do:hover { opacity: 0.82; }
.choice:active, .do:active { scale: 0.97; }
.choice:focus-visible, .do:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.choice {
  height: 36px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  color: var(--text);
  font-size: 15px;
  line-height: 36px;
}

.choice.chosen { border-color: transparent; background: var(--text); color: var(--ground); opacity: 1; }

@keyframes enter {
  from { opacity: 0; scale: 1.03; filter: blur(6px); }
}

@keyframes leave {
  to { opacity: 0; scale: 0.98; filter: blur(4px); }
}

/* A 1ms animation that only holds its `from` until its delay ends. */
@keyframes type {
  from { font-size: 0; }
}

@keyframes unmarked {
  from { color: var(--faint); }
}

.stage .title { color: var(--text); }
.stage .snippet { color: var(--soft); font-size: 14px; }
.stage .who, .stage .about, .stage .why, .stage dt { color: var(--faint); font-size: 13px; }

/* Wide screens set Hughie and his scenes beside the words, at a fixed size,
   so a scene opens in his place. */
@media (min-width: 1080px) {
  :root { --face: min(400px, 48svh); --column: 560px; --words: 460px; --gap: clamp(48px, 7vw, 104px); }

  .page {
    display: grid;
    grid-template-columns: var(--column) minmax(0, var(--words));
    column-gap: var(--gap);
    align-content: center;
    align-items: center;
    justify-content: center;
  }

  .hero { --face-box: 420px; --stage-box: 420px; --pad: 20px; --face-top: calc((420px - var(--face)) / 2); }
  .pitch { align-items: flex-start; margin-top: 0; text-align: left; }
  .pitch .actions { justify-content: flex-start; }
}

/* A field someone types into: each letter takes its width when its turn in
   the typing comes, so the caret moves along with it. */
.field {
  display: flex;
  align-items: center;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--ground);
  font-size: 16px;
}

.typed { white-space: pre; }
.letter { animation: type 1ms calc(var(--type-from) + var(--at) * var(--typing)) both; }
.caret { width: 2px; height: 20px; margin-left: 1px; border-radius: 1px; background: var(--accent); }

/* Smart search: the query is typed, then what every app found arrives as
   one layer. */
.search { --type-from: 200ms; --typing: 460ms; --found: 820ms; }

.found { display: grid; gap: 12px; margin-top: 16px; animation: enter 560ms var(--spring) var(--found) both; }
.group { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; align-items: baseline; }
.group dd { display: flex; flex-direction: column; gap: 2px; margin: 0; overflow-wrap: anywhere; }
.group .photos { display: grid; grid-template-columns: repeat(4, minmax(0, 72px)); gap: 6px; align-self: center; }
.photos img { width: 100%; aspect-ratio: 1; border-radius: 8px; object-fit: cover; }
.photos .more { grid-column: 1 / -1; margin-top: 2px; color: var(--soft); font-size: 13px; }

/* Assistant: the question lands, the answer follows, and the proposal under
   it waits for the visitor's tap. */
.assistant { --answer: 700ms; }

.asked { align-self: flex-end; max-width: 82%; transform-origin: 100% 100%; animation: enter 460ms var(--spring) both; }
.asked .who { text-align: right; }

.bubble {
  margin-top: 4px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 16px 16px 4px 16px;
  background: var(--ground);
}

.reply { max-width: 92%; margin-top: 18px; animation: enter 560ms var(--spring) var(--answer) both; }

.proposal {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--ground);
  animation: enter 560ms var(--spring) calc(var(--answer) + 140ms) both;
}

.do {
  margin-top: 10px;
  padding: 6px 14px;
  border-radius: 16px;
  background: var(--text);
  color: var(--ground);
  font-size: 14px;
  font-weight: 500;
}

.taken { margin-top: 10px; color: var(--soft); font-size: 14px; font-weight: 500; line-height: 29px; animation: enter 320ms var(--spring) both; }

/* Reminders & events: the line is typed and sent; what it said lands on its
   day, and the night before, the reminder rings where the line was. */
.days {
  --type-from: 200ms;
  --typing: 1500ms;
  --sent: calc(var(--type-from) + var(--typing) + 300ms);
  --ring: calc(var(--sent) + 1600ms);
}

.slot { display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; min-height: 56px; }
.slot > * { grid-area: 1 / 1; }
.days .typed, .days .caret { animation: leave 220ms var(--settle) var(--sent) both; }
.days .field { animation: leave 300ms var(--settle) var(--ring) both; }

.rings {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0 12px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--ground);
  animation: enter 560ms var(--spring) var(--ring) both;
}

.rings .at { grid-column: 2; grid-row: 1 / 3; align-self: center; color: var(--accent); font-size: 13px; }
.rings .title { grid-row: 1; font-weight: 500; }
.rings .snippet { grid-row: 2; }

.week { display: grid; margin-top: 12px; padding: 0; list-style: none; }

.week li {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: baseline;
  min-height: 34px;
  padding: 7px 0;
  border-top: 1px solid var(--line);
}

.week li:first-child { border-top: 0; }
.week .day { color: var(--faint); font-size: 13px; }
.week .time { color: var(--soft); font-size: 14px; font-variant-numeric: tabular-nums; }
.week .title .snippet { display: block; font-size: 13px; }
.week .new .title, .week .new .time { animation: land 560ms var(--spring) calc(var(--sent) + 80ms) both; }
.week .new .day { color: var(--accent); animation: unmarked 1ms calc(var(--sent) + 80ms) both; }

@keyframes land {
  from { opacity: 0; translate: 0 -12px; filter: blur(4px); }
}

/* Bills & papers: a photo of a bill; Hughie marks what it read, and the
   to-do it makes comes out of the paper's side. Then the transfer's
   screenshot lands on the bill; its payee and amount match the bill's, so
   the payment settles it and he checks the to-do off, which keeps its
   reminder from ringing. */
.scene > .papers {
  --marked: 520ms;
  --planned: 980ms;
  --receipt: 2600ms;
  --matched: 3100ms;
  --settled: 3600ms;
  --out-x: -16px;
  --out-y: 0px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.pile { position: relative; }

.paper, .receipt {
  border: 1px solid rgb(70 50 30 / 0.12);
  color: #3a332c;
  line-height: 1.7;
}

.paper {
  padding: 16px 18px;
  border-radius: 4px;
  background: #fbf8f2;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.18);
  font-size: 13px;
  rotate: -1.5deg;
  animation: enter 520ms var(--spring) both;
}

.receipt {
  position: absolute;
  right: -10px;
  bottom: -14px;
  width: 64%;
  padding: 10px 14px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.24);
  font-size: 12px;
  rotate: 1deg;
  animation: enter 520ms var(--spring) var(--receipt) both;
}

.pile .from { margin-bottom: 6px; color: #1f1b17; font-size: 14px; font-weight: 600; }
.receipt .from { margin-bottom: 2px; font-size: 13px; }
.pile b { color: #1f1b17; font-weight: 600; }
.pile .read { position: relative; isolation: isolate; }

.pile .read::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 1px -5px;
  border-radius: 4px;
  background: rgb(240 163 90 / 0.32);
  transform-origin: 0 50%;
  animation: mark 420ms var(--settle) var(--marked) both;
}

.pile .read + .read::after { animation-delay: calc(var(--marked) + 120ms); }
.receipt .read::after { animation-delay: var(--matched); }
.receipt .read + .read::after { animation-delay: calc(var(--matched) + 120ms); }

@keyframes mark {
  from { scale: 0 1; }
}

.planned { display: flex; flex-direction: column; gap: 2px; animation: out-of-paper 600ms var(--spring) var(--planned) both; }
.planned .title { display: flex; gap: 8px; align-items: center; margin-top: 4px; font-size: 16px; font-weight: 500; }
.planned .why { display: grid; margin-top: 10px; }
.planned .why > span { grid-area: 1 / 1; }
.planned .why > span:first-child { animation: leave 300ms var(--settle) var(--settled) both; }
.planned .why > span:last-child { animation: enter 420ms var(--spring) calc(var(--settled) + 160ms) both; }

@keyframes out-of-paper {
  from { opacity: 0; translate: var(--out-x) var(--out-y); filter: blur(6px); }
}

/* Checked off: the circle fills, its tick grows in, and a line runs
   through the to-do and its reminder. */
.check {
  display: grid;
  flex: none;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  background: var(--accent);
  animation: unchecked 240ms var(--settle) var(--settled) both;
}

.check::after {
  content: "";
  width: 4px;
  height: 8px;
  margin-top: -2px;
  border: solid var(--ground);
  border-width: 0 2px 2px 0;
  rotate: 45deg;
  animation: tick 320ms var(--spring) var(--settled) both;
}

@keyframes unchecked {
  from { border-color: var(--faint); background: transparent; }
}

@keyframes tick {
  from { scale: 0; }
}

.struck { position: relative; animation: done 360ms var(--settle) var(--settled) both; }

.struck::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 55%;
  height: 1px;
  background: currentColor;
  transform-origin: 0 50%;
  animation: mark 360ms var(--settle) calc(var(--settled) + 80ms) both;
}

@keyframes done {
  to { opacity: 0.55; }
}

@media (max-width: 480px) {
  .scene > .papers { --out-x: 0px; --out-y: -14px; grid-template-columns: minmax(0, 1fr); }
  .pile { justify-self: center; width: min(100%, 260px); }
}

/* Kept off screen: people never see it, and bots that fill it get nothing kept. */
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; opacity: 0; }

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

footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 22px;
  padding: 40px 16px 32px;
  font-size: 13px;
  color: var(--faint);
}

footer a { color: inherit; text-decoration: none; }
footer a:hover { color: var(--text); }

/* The second act, "Everyone at home" (src/at_home.rs). Until its own files
   arrive it keeps its room, so the page scrolls to it and the tab's link
   lands where it settles: pinned under the first screen, the Mac mini
   assembles over --assembly of scrolling, then the door rises over the last
   --overlap, under the mini on narrow screens and beside it on wide ones. */
.at-home { --assembly: 280svh; --overlap: 76svh; position: relative; overflow-x: clip; }
.at-home-track { height: calc(100svh + var(--assembly) + var(--overlap)); }
.at-home-door { position: relative; margin-top: calc(-1 * var(--overlap)); scroll-margin-top: calc(100svh - var(--overlap)); }

@media (min-width: 1080px) {
  .at-home { --overlap: 100svh; }
  .at-home-door { min-height: 100svh; }
}

/* The heading of each act after the first screen, and of the closing. */
.headline {
  font-size: clamp(30px, 4.2vw, 44px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.03em;
  text-wrap: balance;
  color: var(--text);
  transition: color 600ms 1.2s;
}

/* The closing: Hughie again, and the waitlist again. He shares the first
   screen's mood, so he sleeps, stirs and wakes with it, and joining here
   brings the morning out of him as it does there. */
.closing {
  --face: min(34svh, 60vw, 300px);
  position: relative;
  isolation: isolate;
  display: grid;
  justify-items: center;
  gap: 40px;
  padding: 96px 16px 32px;
  overflow: hidden;
}

.closing-words { display: flex; flex-direction: column; align-items: center; width: min(560px, 100%); text-align: center; }

@media (min-width: 1080px) {
  .closing {
    grid-template-columns: var(--column) minmax(0, var(--words));
    column-gap: var(--gap);
    justify-content: center;
    align-items: center;
    min-height: 100svh;
  }

  .closing-words { align-items: flex-start; text-align: left; }
}

/* The tab: a Mac mini peeking up over the first screen's bottom edge, its
   status light breathing with Hughie (`breathe`), as a sleeping Mac's does. */
.tab {
  position: absolute;
  bottom: 100%;
  left: 50%;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding-top: 8px;
  color: var(--faint);
  font-size: 13px;
  text-decoration: none;
  translate: -50% 0;
  transition: color 150ms;
}

.tab:hover { color: var(--text); }
.tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 8px; }

.tab-mini {
  --mini: 64px;
  position: relative;
  width: var(--mini);
  height: calc(var(--mini) * 0.58);
  overflow: hidden;
}

/* The mini from a little above: its lid, and the front under it. */
.tab-mini::before, .tab-mini::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  border-radius: calc(var(--mini) * 0.2) / calc(var(--mini) * 0.08);
}

.tab-mini::before { height: 100%; background: #9c958d; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.tab-mini::after { height: calc(var(--mini) * 0.4); background: #d9d4cd; }

.light {
  position: absolute;
  top: calc(var(--mini) * 0.4 + 5px);
  right: 16%;
  width: 4px;
  height: 3px;
  border-radius: 50%;
  background: #fff4e2;
  box-shadow: 0 0 6px 1px rgb(255 228 190 / 0.7);
  animation: asleep 4.2s ease-in-out 1.6s infinite;
}

@keyframes asleep {
  50% { opacity: 0.2; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .at-home { --assembly: 0px; }
  .light { animation: none; }
  .hughie, .band, .slice, .glow, .pitch, .says, .face, .tries { animation: none !important; }
  .hero, .hughie { transition: none !important; }
  .stage-slot { scale: none; filter: none; }
  .morning .hughie::before, .morning .tile { transition: none; }
  .awake .face { --wake: 46%; }
  /* A scene shows its end at once, and crossfades in. */
  .stage *, .stage *::after { animation-duration: 1ms !important; animation-delay: 0s !important; }
  .stage, .scene { animation: fade 240ms ease both !important; }
}

@keyframes fade {
  from { opacity: 0; }
}

.fine a { color: inherit; }

/* The privacy page, public/privacy.html. */
.privacy {
  max-width: 640px;
  margin: 0 auto;
  padding: 48px 16px 80px;
  color: var(--night-ink);
  font-size: 16px;
  line-height: 1.6;
}
.privacy .home { color: var(--night-soft); font-size: 14px; text-decoration: none; }
.privacy h1 { margin: 32px 0 4px; font-size: 34px; letter-spacing: -0.02em; }
.privacy .effective { color: var(--night-faint); font-size: 14px; margin-bottom: 28px; }
.privacy h2 { margin: 32px 0 8px; font-size: 18px; }
.privacy p, .privacy li { color: var(--night-soft); }
.privacy ul { padding-left: 20px; }
.privacy a { color: var(--night-ink); }
