/* The sections after the hero: the app preview, reminders, the week, shared care, the extras
   and the closing call to join. Phones are drawn in CSS and sized from their own width. */

.onboarding-style :is(.talk, .feature-row, .shared, .badges, .closing) h2 {
  font-family: var(--rounded);
  font-weight: 700;
  font-size: 46px;
  line-height: 1.06;
  letter-spacing: -.02em;
  text-wrap: balance;
}

/* Reminders: a deep blue band, the app onboarding's canvas, with a mockup on the right. */
.talk {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: center;
  position: relative;
  column-gap: 96px;
  margin-top: 48px;
  padding: 64px max(24px, var(--safe-right), calc((100% - 1000px) / 2)) 64px max(24px, var(--safe-left), calc((100% - 1000px) / 2));
  color: #fff;
  background:
    radial-gradient(ellipse 70% 60% at 85% 55%, #1f5fc7 0%, #1f5fc700 70%),
    var(--canvas-deep);
}
.onboarding-style .talk h2 { color: #fff; font-size: 56px; }
.talk-copy > p { max-width: 420px; margin-top: 16px; color: #ffffffd9; font-size: 20px; line-height: 1.45; text-wrap: pretty; }
.facts { display: grid; gap: 14px; margin: 36px 0 0; padding: 0; list-style: none; }
.facts li { display: flex; align-items: center; gap: 12px; color: #fff; font-size: 17px; line-height: 1.4; }
.facts svg { flex: none; width: 20px; height: 20px; }
.facts circle { fill: #ffffff26; }
.facts path { fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
/* Without a mockup, the band holds its copy alone, centered. */
.talk:not(:has(.mockup-slot)) {
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  text-align: center;
  background: radial-gradient(ellipse 70% 60% at 50% 55%, #1f5fc7 0%, #1f5fc700 70%), var(--canvas-deep);
}
.talk:not(:has(.mockup-slot)) .talk-copy > p { margin-inline: auto; }
.talk:not(:has(.mockup-slot)) .facts { width: fit-content; margin-inline: auto; text-align: left; }

/* A mockup and its copy side by side, as on the Home Screen section. */
.feature-row {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  align-items: center;
  column-gap: 64px;
  width: min(calc(100% - 2 * max(24px, var(--safe-left), var(--safe-right))), 1000px);
  margin: 0 auto;
  padding-top: 60px;
}
.onboarding-style .feature-row h2 { color: var(--charcoal); }
.feature-copy p { max-width: 400px; margin-top: 16px; color: var(--muted); font-size: 18px; line-height: 1.5; text-wrap: pretty; }
/* The next row puts its copy first and a wider, landscape mockup on the right. */
.feature-row--flip { grid-template-columns: minmax(0, 1fr) 620px; }
/* The Calendar and iPhone Duo recordings both carry empty room round the iPhone, so the row
   starts closer to keep the same visible gap as every other section. */
.feature-row--flip { padding-top: 22px; }

/* A slot for a device mockup, supplied separately. Anything placed inside fills it. */
.mockup-slot { position: relative; width: 100%; aspect-ratio: 9 / 19.5; margin: 0; }
.mockup-slot > :is(img, video) { display: block; width: 100%; height: 100%; object-fit: contain; }
/* Each video's first frame sits on top until the video has drawn its own, so iOS never
   shows an empty slot while a video starts. */
.video-poster { position: absolute; inset: 0; pointer-events: none; }
.is-playing .video-poster { visibility: hidden; }
/* While a slot's first frame is still downloading, a skeleton holds the iPhone's place: its
   outline and island where the recorded one will stand, swept by one soft highlight that rests
   between passes. It gives way to a video that starts first. showcase.js adds .is-waiting once
   a slot has been on screen for 0.4 seconds with its poster still loading, so a quick load never
   shows it, with Reduce Motion too. */
.phone-bone {
  position: absolute;
  left: var(--bone-x, 50%);
  top: var(--bone-y, 50%);
  width: var(--bone-w);
  height: var(--bone-h);
  translate: -50% -50%;
  rotate: var(--bone-turn, 0deg);
  overflow: hidden;
  border-radius: 15% / 7%;
  background: #2f312f1a;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease-out;
}
.phone-bone::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 2.6%;
  width: 30%;
  height: 3.4%;
  translate: -50% 0;
  border-radius: 99px;
  background: #2f312f12;
}
.phone-bone::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 70%;
  background: linear-gradient(90deg, #fff0, #ffffffa6, #fff0);
  translate: -100% 0;
}
.is-waiting:not(.is-playing) > .phone-bone { opacity: 1; }
/* A slot whose poster failed keeps the skeleton, without the sweep, and never a broken image. */
.is-missing:not(.is-playing) > .phone-bone { opacity: 1; }
.is-missing > .video-poster { visibility: hidden; }
@media (prefers-reduced-motion: no-preference) {
  .is-waiting:not(.is-playing) > .phone-bone::after { animation: bone-sweep 2s cubic-bezier(.45, 0, .55, 1) infinite; }
}
@keyframes bone-sweep {
  0% { translate: -100% 0; }
  65%, 100% { translate: 150% 0; }
}
/* The app preview's iPhone stands upright in the middle of its frame, seen from the back. */
/* It stands over the scenery, so it's opaque, in the same tone as the bones on Porcelain. */
.video-frame > .phone-bone { --bone-h: 86%; aspect-ratio: 448 / 930; background: #e5e4e0; }
.video-frame > .phone-bone::before { display: none; }
/* On the blue band the skeleton is a faint white. */
.talk .phone-bone { background: #ffffff1a; }
.talk .phone-bone::before { background: #ffffff14; }
.talk .phone-bone::after { background: linear-gradient(90deg, #fff0, #ffffff1f, #fff0); }
.phone-bone--pair-left { --bone-x: 30.5%; --bone-y: 54%; --bone-w: 38%; --bone-h: 72%; --bone-turn: -6deg; }
.phone-bone--pair-right { --bone-x: 73.5%; --bone-y: 41.5%; --bone-w: 34%; --bone-h: 68%; --bone-turn: 5deg; }
.phone-bone--week { --bone-x: 47%; --bone-y: 50.5%; --bone-w: 67%; --bone-h: 80%; --bone-turn: 6deg; }
/* The iPhone Duo recording opens on the closed iPhone, turned a little, in the middle. Its cover has no island. */
.phone-bone--duo { --bone-x: 51%; --bone-w: 38%; --bone-h: 78%; --bone-turn: 2deg; }
.phone-bone--duo::before { display: none; }

/* The pair's first frame, cut between the two iPhones, so each can arrive from its own side. */
.pair-half--left { clip-path: inset(0 46.64% 0 0); transform-origin: 30% 54%; }
.pair-half--right { clip-path: inset(0 0 0 53.36%); transform-origin: 74% 41%; }
/* The recorded mockups are a turned iPhone with room around it, so the slot takes their shape. */
.mockup-slot--video { aspect-ratio: 600 / 1100; }
/* Two overlapping iPhones need a wider slot. */
.mockup-slot--pair { aspect-ratio: 1000 / 1100; }
/* The iPhone Duo recording is a 4:3 landscape canvas. */
.mockup-slot--duo { aspect-ratio: 4 / 3; }
@media (min-width: 1001px) {
  .talk:has(.mockup-slot--pair) { grid-template-columns: minmax(0, 1fr) 520px; column-gap: 32px; }
}
.mockup-placeholder {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0 18px;
  border: 1.5px dashed #ffffff59;
  border-radius: 48px;
  color: #fff;
  text-align: left;
}
.mockup-slot--light .mockup-placeholder { border-color: #2f312f33; color: var(--charcoal); }

/* Until the Lock Screen mockup is recorded, its slot sketches the reminder it will show. */
.sketch-clock { margin-top: 22%; font-family: var(--rounded); font-size: 64px; font-weight: 700; line-height: 1; text-align: center; opacity: .9; }
.sketch-notification { display: flex; align-items: flex-start; gap: 10px; margin: auto 0 26%; padding: 12px 14px; border-radius: 20px; background: #ffffff26; font-size: 14px; line-height: 1.35; }
.sketch-notification img { flex: none; width: 28px; height: 28px; border-radius: 7px; }
.sketch-notification p { flex: 1; min-width: 0; }
.sketch-notification p > span:last-child { display: block; }
.sketch-notification .nudge-title span { color: #ffffffb3; }


/* The deployed app preview: the rotating iPhone over its scenery, between the hero and the demos. */
.app-preview { margin-top: -24px; }
.video-frame { position: relative; isolation: isolate; width: min(100% - 2 * max(var(--safe-left), var(--safe-right)), 720px); aspect-ratio: 4 / 3; margin: 0 auto; }
.app-video, .video-frame .video-poster { display: block; width: 100%; height: 100%; object-fit: cover; }
.phone-scenery { position: absolute; z-index: -1; inset: 0; pointer-events: none; }
.phone-shape { position: absolute; width: 74%; height: auto; left: 13%; top: 8%; }
.phone-grass { position: absolute; width: 50px; height: auto; bottom: 12%; }
.phone-grass--left { left: 18%; }
.phone-grass--right { right: 16%; bottom: 24%; transform: scaleX(-1); }

/* Shared care: Maria's iPhone and yours, each a slice of the app's Today under Biscuit's nudge,
   joined by the track their records travel along. Cards and circles are the app's stickers:
   a Charcoal outline with a hard drop. Every state fits the same space, so logging never moves
   the page. */
.shared { width: min(calc(100% - 2 * max(24px, var(--safe-left), var(--safe-right))), 1000px); margin: 0 auto; padding-top: 72px; text-align: center; }
.shared-copy p { max-width: 460px; margin: 16px auto 0; color: var(--muted); font-size: 18px; line-height: 1.5; text-wrap: pretty; }
.shared-board {
  --ink: var(--charcoal);
  --sage: #4d765b;
  --coral: #a94f46;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px minmax(0, 1fr);
  max-width: 880px;
  margin: 48px auto 0;
  font-family: var(--rounded);
  text-align: left;
  -webkit-user-select: none;
  user-select: none;
}
/* Both iPhones share the board's two rows, so their screens line up even when one name
   wraps onto a second line. */
.person { display: grid; grid-row: span 2; grid-template-rows: subgrid; gap: 10px; min-width: 0; }
.person-head { position: relative; align-self: end; display: flex; align-items: center; gap: 8px; min-height: 22px; padding-inline: 4px; }
.device-glyph { flex: none; width: 11px; height: 16px; fill: none; stroke: var(--ink); stroke-width: 1.4; stroke-linecap: round; }
/* The name keeps its own half of the row and the sync label floats in the other, so a label
   appearing never rewraps the name or moves the screen below it. */
.person-name { max-width: calc(50% - 27px); color: var(--ink); font-size: 15px; font-weight: 700; }
.person-sync { position: absolute; right: 4px; bottom: 3px; max-width: 46%; color: var(--muted); font-size: 12.5px; font-weight: 700; line-height: 1.25; text-align: right; }

/* The screen: the app's blue sky with Porcelain's rounded sheet rising over it. */
.person-screen {
  overflow: hidden;
  border: 1.5px solid var(--ink);
  border-radius: 30px;
  background:
    radial-gradient(ellipse 95% 62% at 50% 112%, #154999 0 70%, #15499900 70.5%),
    var(--signal);
  box-shadow: 0 5px 0 var(--ink);
}
.person-sky { padding: 14px 14px 32px; }
/* The pet's name in the app's sticker lettering: white, a dark outline and a hard drop. */
.sky-pet { display: flex; align-items: baseline; gap: 10px; margin: 16px 4px 0; color: #fff; }
.sky-pet strong {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -.01em;
  line-height: 1.1;
  text-shadow: 1.5px 0 #1d1f1d, -1.5px 0 #1d1f1d, 0 1.5px #1d1f1d, 0 -1.5px #1d1f1d, 1.5px 1.5px #1d1f1d, -1.5px 1.5px #1d1f1d, 1.5px -1.5px #1d1f1d, -1.5px -1.5px #1d1f1d, 0 4px #1d1f1d;
}
.sky-status { display: flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 700; transition: opacity 260ms ease-out, visibility 260ms; }
.sky-alert { display: grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; background: var(--coral); font-size: 10px; font-weight: 900; line-height: 1; }
.person.is-logged .sky-status { opacity: 0; visibility: hidden; }

/* The nudge arrives over the app as a notification. Once logging takes it back, a dashed
   outline marks where it was. */
.person-nudge { display: grid; }
.nudge-state {
  grid-area: 1 / 1;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 13px;
  border-radius: 18px;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 13.5px;
  line-height: 1.35;
}
.nudge-state p { flex: 1; min-width: 0; }
.nudge-state p > span:last-child { display: block; }
.nudge-state--on { color: var(--ink); background: #fffffff2; box-shadow: 0 6px 16px #0c2f7a40; }
.nudge-state--on img { flex: none; width: 30px; height: 30px; border-radius: 7px; }
.nudge-title { display: flex; justify-content: space-between; gap: 8px; }
.nudge-title span { color: var(--muted); font-size: 12px; }
.nudge-state--off { align-items: center; color: #ffffffd9; outline: 1.5px dashed #ffffff73; outline-offset: -1.5px; }
.nudge-state--off strong { display: block; color: #fff; font-family: var(--rounded); }
.nudge-check { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border: 1.5px solid var(--ink); border-radius: 50%; background: var(--sage); }
.nudge-check svg { width: 58%; fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.person:not(.is-cleared) .nudge-state--off, .person.is-cleared .nudge-state--on { visibility: hidden; }

.person-sheet { margin-top: -18px; padding: 14px 16px 18px; border-radius: 24px 24px 0 0; background: var(--porcelain); }
/* Today's section header: Coral "Still to do" with its count, then "Done today". The header not
   shown is also hidden from screen readers. */
.sheet-section { display: grid; margin: 0 0 10px 2px; font-size: 11.5px; font-weight: 800; letter-spacing: .04em; line-height: 20px; text-transform: uppercase; }
.sheet-section > * { grid-area: 1 / 1; display: flex; align-items: center; gap: 7px; transition: opacity 200ms ease-out, visibility 200ms; }
.sheet-section__todo { color: var(--coral); }
.sheet-section__done { color: #2f312fb3; opacity: 0; visibility: hidden; }
.person.is-logged .sheet-section__todo { opacity: 0; visibility: hidden; }
.person.is-logged .sheet-section__done { opacity: 1; visibility: visible; }
.sheet-count { min-width: 20px; padding: 0 6px; border: 1.25px solid var(--ink); border-radius: 999px; color: #fff; background: var(--coral); box-shadow: 0 2px 0 var(--ink); font-size: 11px; line-height: 15px; text-align: center; }

/* One stop on the care trail: the circle and its card, tapped as one. */
.care-stop {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.care-stop:disabled { cursor: default; }
.care-stop:focus-visible { outline: 3px solid var(--signal); outline-offset: 4px; border-radius: 20px; }
.care-node {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 3px 0 var(--ink);
  transition: background-color 260ms ease-out, translate 300ms cubic-bezier(.3, 1.5, .5, 1), box-shadow 300ms cubic-bezier(.3, 1.5, .5, 1);
}
.care-node > svg { width: 20px; fill: none; stroke: #fff; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.care-node__badge {
  position: absolute;
  right: -5px;
  bottom: -5px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1.25px solid var(--ink);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1.5px 0 var(--ink);
  opacity: 0;
  scale: .2;
  transition: opacity 200ms ease-out, scale 450ms cubic-bezier(.34, 1.5, .64, 1);
}
.care-node__badge svg { width: 13px; fill: none; stroke: var(--sage); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.care-node__badge path { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 340ms cubic-bezier(.3, .7, .3, 1) 200ms; }
.person.is-logged .care-node__badge path { stroke-dashoffset: 0; }
.person.is-logged .care-node { background: var(--sage); }
.person.is-logged .care-node__badge { opacity: 1; scale: 1; }
.care-card {
  display: grid;
  flex: 1;
  gap: 3px;
  min-width: 0;
  min-height: 60px;
  align-content: center;
  padding: 10px 14px;
  border: 1.5px solid var(--ink);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 4px 0 var(--ink);
  transition: background-color 160ms ease-out, translate 300ms cubic-bezier(.3, 1.5, .5, 1), box-shadow 300ms cubic-bezier(.3, 1.5, .5, 1);
}
/* A set line height, so a name in a taller script, like マリア, doesn't grow the card. */
.care-card__row { display: flex; align-items: baseline; gap: 8px; min-width: 0; line-height: 1.45; }
.care-card__task { flex: 1; color: var(--ink); font-size: 16px; font-weight: 700; }
.care-card__time { color: var(--coral); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.person.is-logged .care-card__time { color: #2f312fb3; }
.care-card__pet { flex: 1; color: #2f312fb3; font-size: 13.5px; font-weight: 600; }
.care-card__by { overflow: hidden; color: #2f312fb3; font-size: 13.5px; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
/* Pressed, the stickers sink into their shadows, as in the app. */
.care-stop:active:not(:disabled) :is(.care-node, .care-card) { transition-duration: 260ms, 90ms, 90ms; transition-timing-function: ease-out; }
.care-stop:active:not(:disabled) .care-node { translate: 0 2px; box-shadow: 0 1px 0 var(--ink); }
.care-stop:active:not(:disabled) .care-card { translate: 0 3px; box-shadow: 0 1px 0 var(--ink); }
@media (hover: hover) {
  .care-stop:hover:not(:disabled) .care-card { background: #f3f6fc; }
}

/* The link between the two iPhones: up to iCloud and back down, level with the care circles
   at both ends. It starts dashed; a logged record travels it and draws it in solid. */
.sync-link { position: relative; grid-row: span 2; align-self: end; width: 150px; height: 120px; margin-bottom: 28px; }
.link-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.link-base { fill: none; stroke: #185bcb59; stroke-width: 2; stroke-dasharray: 5 6; stroke-linecap: round; }
.link-fill { fill: none; stroke: var(--signal); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 1 1; stroke-dashoffset: 1; }
/* Both links stay drawn once synced, so the line is solid after a resize or with Reduce Motion. */
.sync-link.is-linked .link-fill { stroke-dashoffset: 0; }
.link-port { fill: #fff; stroke: var(--charcoal); stroke-width: 1.5; transform-box: fill-box; transform-origin: center; transition: fill 300ms ease-out; }
.sync-link.is-linked .link-port { fill: var(--signal); }
.link-v { display: none; }
/* Above the record, so it passes behind iCloud on its way. */
.link-cloud {
  position: absolute;
  z-index: 2;
  left: 55px;
  top: 13px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1.5px solid var(--charcoal);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 0 var(--charcoal);
  transition: background-color 300ms ease-out;
}
.link-cloud svg { width: 21px; height: 21px; fill: none; stroke: var(--signal); stroke-width: 1.8; stroke-linejoin: round; transition: stroke 300ms ease-out; }
.link-cloud span { position: absolute; bottom: calc(100% + 8px); left: 50%; color: var(--charcoal); font-family: var(--rounded); font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; transform: translateX(-50%); }
.sync-link.is-linked .link-cloud { background: var(--signal); }
.sync-link.is-linked .link-cloud svg { stroke: #fff; }
.link-packet {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1.5px solid var(--charcoal);
  border-radius: 50%;
  background: #4d765b;
  box-shadow: 0 2px 0 var(--charcoal);
  opacity: 0;
  offset-path: path('M14 96C46 96 44 34 75 34S104 96 136 96');
  offset-rotate: 0deg;
}
.link-packet svg { width: 13px; height: 13px; fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* The handwritten hint sits under Maria's panel and points up at her care circle. */
.shared-hint { position: absolute; top: calc(100% + 12px); left: 30px; display: flex; align-items: flex-start; gap: 2px; color: var(--signal); pointer-events: none; transition: opacity 300ms ease-out; }
.shared-hint span { margin-top: 24px; font-family: var(--hand); font-size: 25px; line-height: 1; white-space: nowrap; rotate: -4deg; }
.shared-hint svg { width: 40px; height: 34px; overflow: visible; scale: -1 1; }
.shared-hint path { stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.shared.is-used .shared-hint { opacity: 0; }

.shared-reset {
  appearance: none;
  min-height: 44px;
  margin-top: 20px;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  color: var(--signal);
  background: none;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.shared-reset[hidden] { display: inline-block; visibility: hidden; }
.shared-reset:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; }
@media (hover: hover) {
  .shared-reset:hover { background: #185bcb12; }
}
.home-screen { -webkit-user-select: none; user-select: none; }
/* Fast taps on the demos never zoom the page on iPhone. */
:is(.home-screen, .shared-board, .shared-reset) { touch-action: manipulation; }

/* Badges: the app's own pictures, rendered from the same models, each with its name. The two
   secret ones stay clay question marks, as in the app's badge case. */
.badges { width: min(calc(100% - 2 * max(24px, var(--safe-left), var(--safe-right))), 1000px); margin: 0 auto; padding-top: 112px; text-align: center; }
.badges > p { max-width: 520px; margin: 16px auto 0; color: var(--muted); font-size: 18px; line-height: 1.5; text-wrap: pretty; }
/* The shelf reads like a badge case part way through: the first seven earned, the rest in clay as
   unearned ones are in the app, then dotted spots where more would stand. It dissolves into the
   page from the second row down, into the line that sends people to the app. The padding keeps a
   lifted badge in the first row inside the mask. */
.badge-shelf {
  --solid: 38%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 26px 0;
  margin: 34px 0 0;
  padding: 10px 0 0;
  list-style: none;
  -webkit-mask-image: linear-gradient(#000 var(--solid), #000a 72%, #0000 100%);
  mask-image: linear-gradient(#000 var(--solid), #000a 72%, #0000 100%);
}
.badge-shelf li { display: flex; width: calc(100% / 7); }
.badge { position: relative; display: flex; flex-direction: column; align-items: center; width: 100%; padding: 0 6px 4px; }
.badge-shelf img { display: block; width: min(100%, 128px); height: auto; aspect-ratio: 1; margin-bottom: -6px; transition: translate 320ms cubic-bezier(.34, 1.56, .64, 1), rotate 320ms cubic-bezier(.34, 1.56, .64, 1); }
.badge-shelf .badge > span:last-child { color: var(--charcoal); font-family: var(--rounded); font-size: 13px; font-weight: 700; line-height: 1.25; text-wrap: balance; }
.badge-shelf :is(.badge--secret, .badge--clay) .badge > span:last-child { color: var(--muted); }
/* A spot is a dotted ring on a badge's soft shadow, the size and place of a picture, with room for
   a name under it so the rows stay even. */
.badge-slot .badge::before {
  content: "";
  width: min(100%, 128px);
  aspect-ratio: 1;
  margin-bottom: -6px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='50' r='46' fill='none' stroke='%232f312f' stroke-opacity='.5' stroke-width='3.4' stroke-linecap='round' stroke-dasharray='0 9.03'/%3E%3C/svg%3E") 50% 42% / 56% no-repeat,
    radial-gradient(closest-side, #5b6fe024, #5b6fe000) 50% 88% / 54% 10% no-repeat;
}
.badge-slot .badge::after { content: ""; height: 1.25em; font-size: 13px; }
.badges-more { position: relative; display: inline-flex; align-items: center; gap: 8px; margin-top: -18px; color: var(--signal); font-family: var(--hand); font-size: 28px; line-height: 1.1; text-decoration: none; rotate: -2deg; }
.badges-more svg { flex: none; width: 34px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: translate 240ms ease-out; }
.badges-more:focus-visible { outline: 3px solid var(--signal); outline-offset: 4px; border-radius: 6px; }
@media (hover: hover) {
  .badge:hover img { translate: 0 -6px; rotate: -5deg; }
  .badges-more:hover svg { translate: 4px 0; }
  /* A secret shakes its head, as it does in the app. */
  .badge--secret .badge:hover img { translate: 0 0; rotate: 0deg; animation: badge-no 520ms ease-in-out; }
}
@keyframes badge-no {
  20% { rotate: -9deg; } 45% { rotate: 8deg; } 70% { rotate: -5deg; } 100% { rotate: 0deg; }
}
/* A picture still loading 0.4 s after it came on screen shows a round skeleton where the badge
   will stand, swept by the site's resting highlight. badge-shelf.js adds .is-waiting. */
.badge-bone {
  position: absolute;
  left: 50%;
  top: 16%;
  width: min(54%, 70px);
  aspect-ratio: 1;
  translate: -50% 0;
  overflow: hidden;
  border-radius: 50%;
  background: #2f312f14;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease-out;
}
.badge-bone::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 70%; background: linear-gradient(90deg, #fff0, #ffffffa6, #fff0); translate: -100% 0; }
.badge:is(.is-waiting, .is-missing) .badge-bone { opacity: 1; }
.badge.is-missing img { visibility: hidden; }
@media (prefers-reduced-motion: no-preference) {
  .badge.is-waiting .badge-bone::after { animation: bone-sweep 2s cubic-bezier(.45, 0, .55, 1) infinite; }
}

/* The rest, without chrome: an icon, a name and one line each. */
.extras {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 48px 40px;
  width: min(calc(100% - 2 * max(24px, var(--safe-left), var(--safe-right))), 1000px);
  margin: 118px auto 0;
}
.extra svg { display: block; width: 28px; height: 28px; fill: none; stroke: var(--signal); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.onboarding-style .extra h3 { margin-top: 10px; color: var(--charcoal); font-family: var(--rounded); font-size: 18px; font-weight: 700; }
.extra p { margin-top: 6px; color: var(--muted); font-size: 15px; line-height: 1.5; text-wrap: pretty; }

.closing { width: min(calc(100% - 2 * max(24px, var(--safe-left), var(--safe-right))), 640px); margin: 120px auto 0; text-align: center; }
.closing-icon {
  display: block;
  width: 104px;
  height: 104px;
  margin: 0 auto 30px;
  border-radius: 23.5%;
  box-shadow: 0 1px 2px #0c2f7a24, 0 18px 36px -14px #0c2f7a73;
}
.closing p { max-width: 520px; margin: 14px auto 0; color: var(--muted); font-size: 18px; line-height: 1.5; text-wrap: balance; }
.closing-cta {
  display: inline-flex;
  align-items: center;
  min-height: 54px;
  margin-top: 26px;
  padding: 0 26px;
  border-radius: 16px;
  color: #fff;
  background: var(--signal);
  font-size: 15px;
  font-weight: 600;
  transition: background-color 160ms, transform 200ms cubic-bezier(.34, 1.56, .64, 1);
}
.onboarding-style .closing-cta:hover { color: #fff; background: var(--interaction); }
.closing-cta:active { transform: scale(.97); }

/* The widget section sits between two demos now; it keeps its own layout. Its scenery starts at
   its top edge, so it needs more room under the blue band than a headline would. */
.onboarding-style .widget-feature { padding-top: 120px; }

/* Things that arrive as the page reaches them. Each plays once, when it first scrolls into
   view (onboarding-motion.js marks it .is-shown), and stays put after, so scrolling back up
   never undoes it. Without JavaScript or with Reduce Motion everything rests in place.

   Arrivals drift a short, fixed distance and fade, over a long, even ease-out. A slide from
   the screen edge covers half the screen in its first few frames, which reads as a jolt on
   a phone, where the arrival starts while the page is still gliding. */
.onboarding-style {
  --arrive: 1100ms cubic-bezier(.3, .7, .3, 1);
  --arrive-fade: 650ms cubic-bezier(.25, .6, .4, 1);
}

/* The dog's tennis ball sits on the band's top edge and rolls in as the band arrives. */
.rolling-ball { position: absolute; z-index: 1; left: 18%; top: -46px; width: 48px; height: 48px; pointer-events: none; }

@media (prefers-reduced-motion: no-preference) {
  .motion-ready .rolling-ball:not(.is-shown) { translate: calc(-18vw - 60px) 0; }
  .motion-ready .rolling-ball.is-shown { translate: calc(var(--roll-distance, 60vw) - 18vw - 60px) 0; rotate: var(--roll-turns, 1440deg); }
  .rolling-ball { transition: translate 1900ms cubic-bezier(.3, .6, .3, 1), rotate 1900ms cubic-bezier(.3, .6, .3, 1); }
  .rolling-ball.has-rolled { transition: none; }

  /* Mockups drift in from their own side, and each pair of iPhones from either side, a beat apart. */
  .motion-ready :is(.feature-row .mockup-slot, .shared-board .person:first-of-type):not(.is-shown),
  .motion-ready .mockup-slot:not(.is-shown) > .pair-half--left { opacity: 0; translate: -48px 12px; rotate: -2deg; }
  .motion-ready .shared-board .person:last-of-type:not(.is-shown),
  .motion-ready .mockup-slot:not(.is-shown) > .pair-half--right { opacity: 0; translate: 48px 12px; rotate: 2deg; }
  .motion-ready .feature-row.feature-row--flip .mockup-slot:not(.is-shown) { translate: 48px 12px; rotate: 2deg; }
  .motion-ready .home-screen:not(.is-shown) { opacity: 0; translate: 32px 0; }
  .motion-ready .sync-link:not(.is-shown) { opacity: 0; }
  :is(.feature-row .mockup-slot, .shared-board .person, .pair-half, .home-screen) {
    transition: opacity var(--arrive-fade), translate var(--arrive), rotate var(--arrive);
  }
  :is(.shared-board .person:last-of-type, .pair-half--right) { transition-delay: 140ms; }
  .sync-link { transition: opacity 600ms ease-out 500ms; }
}

/* Badges pop in with a little turn, one after another, the first time the shelf scrolls into
   view; onboarding-motion.js numbers them in --i. */
@media (prefers-reduced-motion: no-preference) {
  .motion-ready .badge-shelf:not(.is-shown) li { opacity: 0; scale: .55; rotate: -14deg; }
  .badge-shelf li {
    transition: opacity 420ms ease-out, scale 620ms cubic-bezier(.34, 1.56, .64, 1), rotate 620ms cubic-bezier(.34, 1.56, .64, 1);
    transition-delay: calc(var(--i, 0) * 55ms);
  }
}

/* The extras rise in once on scroll. */
@media (prefers-reduced-motion: no-preference) {
  .motion-ready .onboarding-style .extras:not(.is-shown) { opacity: 0; translate: 0 20px; }
  .onboarding-style .extras { transition: opacity var(--arrive-fade), translate var(--arrive); }
}

@media (max-width: 1000px) {
  .onboarding-style :is(.talk, .feature-row, .shared, .badges, .closing) h2 { font-size: 36px; }
  .talk, .feature-row {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    row-gap: 40px;
    text-align: center;
  }
  .talk { padding-block: 48px; }
  .feature-row { padding-top: 56px; }
  .feature-row .feature-copy { order: -1; }
  .onboarding-style .talk h2 { font-size: 40px; }
  .talk-copy > p, .feature-copy p { margin-inline: auto; font-size: 17px; }
  .facts { width: fit-content; margin: 28px auto 0; text-align: left; }
  .facts li { font-size: 16px; }
  .mockup-slot { width: min(270px, 72vw); }
  .feature-row .mockup-slot { width: min(320px, 80vw); }
  /* The recording's transparent edges run into the page margin, so the iPhone Duo reads larger. */
  .feature-row .mockup-slot--duo { width: min(600px, calc(100% + 40px)); margin-inline: -20px; }
  .mockup-slot--pair { width: min(440px, 100%); }
  .app-preview { margin-top: -8px; }
  .talk { margin-top: 40px; }
  .shared { padding-top: 56px; }
  .shared-copy p, .closing p { font-size: 16px; }
  .extras { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; margin-top: 88px; }
  .badges { padding-top: 88px; }
  .badges > p { font-size: 17px; }
  .badge-shelf li { width: 25%; }
  /* Six outlines finish the last row of four. */
  .badge-shelf .badge-slot:last-child { display: none; }
  .onboarding-style .widget-feature { padding-top: 56px; }
  .closing { margin-top: 80px; }
}
@media (max-width: 700px) {
  /* The two stack; the link runs down between their circles, through iCloud. */
  .shared-board { grid-template-columns: minmax(0, 1fr); max-width: 420px; margin-top: 56px; }
  /* Same 150px box as the wider layout, so the drawing never scales. It runs down the middle,
     from Maria's screen past your iPhone's name, which sits below the box, to the top of your
     screen. */
  .sync-link { grid-row: auto; justify-self: center; width: 150px; height: 120px; margin: 3px 0 -2px; }
  .link-h { display: none; }
  .link-v { display: inline; }
  .link-cloud { top: 55px; }
  .link-cloud span { bottom: auto; left: auto; right: calc(100% + 10px); top: 50%; transform: translateY(-50%); }
  .link-packet { offset-path: path('M75 14V138'); }
  /* Stacked, Maria's circle pulses twice instead; a hint would sit far from it. */
  .shared-hint { display: none; }
  .extras { margin-top: 72px; }
}
@media (max-width: 600px) {
  .onboarding-style :is(.talk, .feature-row, .shared, .badges, .closing) h2 { font-size: clamp(28px, 8vw, 34px); text-wrap: balance; }
  .closing-icon { width: 84px; height: 84px; margin-bottom: 24px; }
  .talk { margin-top: 52px; padding-inline: 16px; }
  .onboarding-style .talk h2 { font-size: clamp(30px, 9vw, 38px); }
  .talk-copy > p { font-size: 16px; }
  .video-frame { aspect-ratio: 1; }
  .phone-grass { width: 36px; }
  .shared { width: calc(100% - 32px); }
  .extras { width: calc(100% - 40px); }
  /* "Start over" keeps its room above, hidden until a demo is used. */
  .badges { width: calc(100% - 32px); padding-top: 36px; }
  .badges > p { font-size: 16px; }
  .badge-shelf { gap: 18px 0; margin-top: 32px; }
  .badge-shelf .badge > span:last-child { font-size: 12px; }
  .badges-more { margin-top: -10px; font-size: 25px; }
  .badge-shelf { --solid: 40%; }
  .badge-slot .badge::after { font-size: 12px; }
  .onboarding-style .extra h3 { font-size: 17px; }
  .extra p { font-size: 14px; }
}
@media (max-width: 600px) {
  .rolling-ball { width: 40px; height: 40px; top: -38px; }
}
