/* ==========================================================================
   Tokens
   ========================================================================== */

@font-face {
  font-family: Jakarta;
  src: url('assets/jakarta-extrabold.woff2?v=7c1af51544') format('woff2');
  font-weight: 800;
  font-display: swap;
}

:root {
  --ink: #22211f;
  --muted: #65635e;
  --gold: #ffd466;
  --paper: #fffaf1;
  --line: #e7e2d9;
  --heading: Jakarta, 'Plus Jakarta Sans', sans-serif;
  --body: -apple-system, BlinkMacSystemFont, 'SF Pro', Arial, sans-serif;
  --ease-out: cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* ==========================================================================
   Base
   ========================================================================== */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font: 17px/1.6 var(--body);
  letter-spacing: -.15px;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3 {
  font-family: var(--heading);
  font-weight: 800;
  line-height: 1.14;
  font-kerning: normal;
  text-wrap: balance;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid #9a6b00;
  outline-offset: 5px;
}

.skip {
  position: fixed;
  top: -100px;
  left: 20px;
  background: var(--gold);
  padding: 10px;
  z-index: 10;
}

.skip:focus {
  top: 10px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.eyebrow {
  font-size: 12px;
  letter-spacing: .14em;
  font-weight: 700;
}

.section {
  max-width: 1240px;
  margin: auto;
  padding: 100px 48px;
}

.section-intro {
  text-align: center;
  margin: 0 auto 54px;
}

.section-intro h2 {
  font-size: clamp(34px, 4.3vw, 58px);
  letter-spacing: -.01em;
  line-height: 1.16;
  margin: 18px 0 22px;
}

.section-intro > p:last-child {
  font-size: 19px;
  line-height: 1.6;
  color: var(--muted);
}

/* App Store badge artwork (hero and closing). */
.app-store-badge {
  display: inline-flex;
  vertical-align: middle;
  width: 176px;
  height: 50px;
  flex-shrink: 0;
  border-radius: 6px;
  line-height: 0;
  --hover-transition: opacity .2s, translate .25s, scale .25s, box-shadow .25s;
  transition: var(--hover-transition);
}

.app-store-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@media (max-width: 950px) {
  .section {
    padding: 75px 32px;
  }
}

@media (max-width: 700px) {
  .section {
    padding: 65px 22px;
  }

  .section-intro {
    margin-bottom: 35px;
  }

  .section-intro > p:last-child {
    font-size: 17px;
  }
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  height: 76px;
  max-width: 1320px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  gap: 30px;
}

.brand {
  display: flex;
  align-items: center;
  --hover-transition: translate .25s;
  transition: var(--hover-transition);
}

.brand img {
  width: 140px;
  height: auto;
  object-fit: contain;
}

.site-header nav {
  display: flex;
  gap: 34px;
  font-size: 14px;
  font-weight: 600;
}

@media (max-width: 700px) {
  .site-header {
    height: 74px;
    padding: 0 22px;
    gap: 12px;
  }

  .site-header nav {
    display: none;
  }

  .site-header .brand img {
    width: 112px;
  }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  text-align: center;
  padding: 20px 24px 30px;
  overflow: hidden;
  background: radial-gradient(ellipse 65% 35% at 50% 76%, #fff4d6 0%, #fffaf1 52%, #fff 100%);
}

.hero h1 {
  font-size: clamp(62px, 6.2vw, 88px);
  letter-spacing: -.01em;
  line-height: 1.12;
  margin: 20px 0;
}

.hero-line {
  display: block;
}

.hero h1 .hero-line:first-child {
  color: var(--ink);
}

/* "Little buddy.": a flowing gradient of the five buddies' theme colours
   (Sola blue, JiuJiu green, ChewWee gold, BuBu tan, RooRoo red). The band is
   twice the word's width and repeats seamlessly, flowing left to right; every
   letter cycles through all five colours every 12s. Blue and gold are darkened
   (same hue) so every point of the band is at least 3.1:1 against white. */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .hero h1 .hero-line:last-child {
    display: inline-block;
    padding: 0 .04em .1em;
    margin-bottom: -.1em;
    color: transparent;
    -webkit-text-fill-color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    background-color: #c3850d;
    background-image:
      linear-gradient(180deg, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, .05) 100%),
      linear-gradient(105deg, #009ec4 0%, #00a269 20%, #c3850d 40%, #c07746 60%, #e63946 80%, #009ec4 100%);
    background-size: 100% 100%, 200% 100%;
    background-repeat: no-repeat, repeat-x;
    background-position: 0 0, 200% 50%;
    animation: buddy-hue-flow 12s linear infinite;
  }
}

@keyframes buddy-hue-flow {
  from {
    background-position: 0 0, 200% 50%;
  }

  to {
    background-position: 0 0, 0% 50%;
  }
}

.hero-copy {
  font-size: 19px;
  line-height: 1.55;
  margin-bottom: 22px;
  color: var(--muted);
}

.hero-art {
  max-width: 820px;
  margin: 20px auto 0;
}

.hero-art img {
  width: 100%;
  height: auto;
}

.hero-footnote {
  font-size: 14px;
  color: var(--muted);
  margin-top: 20px;
}

/* Keep the whole illustration inside the first viewport on laptop screens
   (aspect 1640 / 915). Full 820px from roughly 1000px of viewport height. */
@media (min-width: 701px) {
  .hero-art {
    max-width: clamp(560px, calc((100vh - 520px) * 1.79), 820px);
    max-width: clamp(560px, calc((100svh - 520px) * 1.79), 820px);
  }
}

@media (max-width: 700px) {
  .hero {
    padding-top: 32px;
  }

  .hero .eyebrow {
    font-size: 11px;
    letter-spacing: .12em;
  }

  .hero h1 {
    font-size: clamp(38px, 11.7vw, 64px);
  }

  .hero-copy {
    font-size: 18px;
    margin-bottom: 26px;
  }

  .hero-art {
    margin-top: 30px;
  }
}

@media (max-width: 360px) {
  .hero h1 {
    font-size: clamp(34px, 11.7vw, 42px);
  }
}

/* ==========================================================================
   Film
   ========================================================================== */

.film-section {
  max-width: 1240px;
  margin: 0 auto;
  padding: 56px 48px 0;
}

.film-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 24px;
}

.film-heading h2 {
  font-size: clamp(27px, 3vw, 40px);
  letter-spacing: -.01em;
  margin-top: 12px;
}

.film-frame {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #fbf5ed;
}

.film-frame video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: contain;
}

.film-controls {
  position: absolute;
  right: 18px;
  bottom: 18px;
  display: flex;
  gap: 10px;
  z-index: 1;
}

.film-controls[hidden] {
  display: none;
}

.film-controls button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #ffffffa6;
  border-radius: 50%;
  background: #ffffff99;
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 4px 18px #00000014;
  color: #22211f;
  cursor: pointer;
  transition: background .2s, transform .2s;
}

.film-controls button:hover {
  background: #ffffffbf;
  transform: translateY(-1px);
}

.film-controls button:disabled {
  opacity: .5;
  cursor: default;
}

.film-controls svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.film-controls .icon-pause,
.film-controls .icon-sound,
#film-play[data-playing=true] .icon-play,
#film-sound[aria-pressed=true] .icon-muted {
  display: none;
}

#film-play[data-playing=true] .icon-pause,
#film-sound[aria-pressed=true] .icon-sound {
  display: block;
}

.film-error {
  font-size: 14px;
  color: var(--muted);
  margin-top: 14px;
}

.film-error a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 950px) {
  .film-section {
    padding: 44px 32px 0;
  }
}

@media (max-width: 700px) {
  .film-section {
    padding: 40px 22px 0;
  }

  .film-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 18px;
  }

  .film-heading h2 {
    font-size: 29px;
    letter-spacing: -.012em;
  }

  .film-heading .eyebrow {
    font-size: 10px;
    letter-spacing: 1.6px;
  }

  .film-frame {
    border-radius: 16px;
  }

  .film-controls {
    right: 12px;
    bottom: 12px;
    gap: 8px;
  }
}

@media (max-width: 360px) {
  .film-heading h2 {
    font-size: 26px;
  }
}

/* ==========================================================================
   Experience (feature cards)
   >= 1100px: 2 x 2 grid, copy left / phone right in each card.
   561-1099px: one card per row, copy left / 250px phone column right.
   <= 560px: copy on top, phone below showing the top 380px of the screen.
   Each phone can carry a demo loop (site.js) over its screenshot.
   ========================================================================== */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.feature {
  border-radius: 26px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-width: 0;
  min-height: 485px;
  padding: 36px 20px 0 32px;
  /* clip, not hidden: a hidden box can still be scrolled by scrollIntoView(). */
  overflow: hidden;
  overflow: clip;
  background: #f5f3ef;
}

.chat-feature {
  background: #f4eee6;
}

.plan-feature {
  background: #fff0ba;
}

.form-feature {
  background: #eaf0ec;
}

.share-feature {
  background: #e7eef6;
}

.feature-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
  padding-right: 10px;
  container-type: inline-size;
}

.feature .eyebrow {
  font-size: 11px;
  letter-spacing: 1.1px;
}

/* Scales with the copy column so each authored line stays on one line
   (never below 24px in the 2 x 2 grid). */
.feature h3 {
  font-size: 30px;
  font-size: clamp(24px, 11.2cqi, 30px);
  white-space: nowrap;
  letter-spacing: -.012em;
  line-height: 1.2;
  margin: 52px 0 20px;
}

.feature-copy > p:last-child {
  font-size: 16px;
  color: #56534e;
  max-width: 225px;
  line-height: 1.6;
}

.feature-art {
  position: relative;
  align-self: end;
  min-width: 0;
  width: 100%;
  aspect-ratio: 640 / 1300;
  overflow: hidden;
  border-radius: 25px 25px 0 0;
  transform: translateY(40px);
  filter: drop-shadow(0 10px 15px #00000016);
}

.feature-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Demo loop over the screenshot, invisible until it plays (site.js adds .is-shown).
   The screenshots carry the phone's rounded top corners in their alpha (radius 88px
   of 640); a video frame cannot, so it clips to the same shape. Percentages keep it
   exact at any size because the box is always 640:1300. */
.feature-demo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  border-radius: 13.75% 13.75% 0 0 / 6.769% 6.769% 0 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s ease;
}

.feature-demo.is-shown {
  opacity: 1;
}

@media (max-width: 1099px) {
  .feature-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .feature {
    grid-template-columns: minmax(0, 1fr) minmax(0, 250px);
  }

  .feature h3 {
    font-size: clamp(19px, 11.2cqi, 30px);
    white-space: normal;
  }

  .feature-copy > p:last-child {
    max-width: 340px;
  }
}

@media (max-width: 950px) {
  .feature {
    min-height: 460px;
    padding: 26px 12px 0 24px;
  }

  .feature h3 {
    margin-top: 40px;
  }

  .feature-art {
    transform: translateY(15px);
  }
}

@media (max-width: 700px) {
  .feature-grid {
    gap: 16px;
  }

  .feature {
    min-height: 410px;
    padding: 28px 20px 0 25px;
  }

  .feature-art {
    transform: translateY(22px);
  }
}

@media (max-width: 560px) {
  /* Symmetric side padding so the phone sits on the card's centre line. */
  .feature {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    padding-right: 25px;
  }

  .feature-copy {
    padding-right: 0;
  }

  .feature h3 {
    font-size: 27px;
  }

  .feature-copy > p:last-child {
    max-width: none;
  }

  /* A 380px window onto the top of the screen; the card clips the rest. */
  .feature-art {
    justify-self: center;
    width: 230px;
    margin: 28px 0 calc(380px - 230px * 1300 / 640);
    transform: none;
  }

  .feature-art img {
    object-position: top;
  }
}

@media (max-width: 360px) {
  .feature {
    padding-left: 18px;
    padding-right: 18px;
  }

  /* Same window, scaled with the phone: 380 x 210 / 230 = 347px. */
  .feature-art {
    width: 210px;
    margin-bottom: calc(347px - 210px * 1300 / 640);
  }
}

/* ==========================================================================
   Buddies (queue stage)
   Five buddies on one ground line, the selected one centre-front. Each
   figure's size and position come from buddy-stage.js as custom properties
   (--hit-w/h, --img-*, --live-*, --x, --s); the stage geometry is active once
   the script sets data-stage="ready". Without the script, the five poses sit
   in a row with ChewWee's description.
   ========================================================================== */

/* Theme colours of the selected buddy, set by buddy-stage.js and transitioned
   as registered properties (instant where @property is unsupported). Initial
   values = the default buddy, ChewWee (tools/site.py check enforces this). */
@property --band-soft {
  syntax: '<color>';
  inherits: true;
  initial-value: #FFEFA8;
}

@property --band-mid {
  syntax: '<color>';
  inherits: true;
  initial-value: #FFD84A;
}

/* Full-bleed band: white at both edges, the theme's soft colour in the middle. */
.buddies {
  max-width: none;
  padding: 84px max(48px, calc((100% - 1240px) / 2 + 48px)) 96px;
  overflow-x: hidden;
  overflow-x: clip;
  background: linear-gradient(180deg, #fff 0%, var(--band-soft) 24%, var(--band-soft) 76%, #fff 100%);
  transition: --band-soft .6s ease, --band-mid .6s ease;
}

.buddies .section-intro {
  margin-bottom: 22px;
}

.buddy-carousel {
  position: relative;
  text-align: center;
}

.buddy-stage {
  position: relative;
  overflow: clip;
  max-width: 800px;
  height: 460px;
  margin: 0 auto 12px;
}

.buddy-glow {
  position: absolute;
  left: 50%;
  top: 60%;
  width: 370px;
  height: 220px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--band-mid) 0%, transparent 100%);
  opacity: .55;
  pointer-events: none;
}

.buddy-picker {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.buddy-picker button {
  pointer-events: auto;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: var(--ink);
  flex: 1;
  min-width: 0;
}

.buddy-picker button img {
  width: 100%;
  height: 160px;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.buddy-picker button:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 6px;
  border-radius: 28px;
}

/* Stage geometry (buddy-stage.js). */
.buddy-carousel[data-stage=ready] .buddy-stage {
  overflow: visible;
  height: var(--stage-h, 460px);
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
}

/* Big soft glow behind the line-up, in the theme's mid colour. */
.buddy-carousel[data-stage=ready] .buddy-glow {
  top: auto;
  bottom: calc(var(--ground, 36px) - 40px);
  width: min(920px, 150%);
  height: calc(var(--fig-h, 340px) * 1.35);
  transform: translateX(-50%);
}

.buddy-carousel[data-stage=ready] .buddy-picker {
  position: absolute;
  inset: 0;
  display: block;
}

/* Each figure = a button whose box is the buddy's body (its tap target);
   the pose image overflows it and ignores the pointer. Anchor = body centre
   on the ground line; slots move it with translate + scale from the feet. */
.buddy-carousel[data-stage=ready] .buddy-picker button {
  position: absolute;
  left: 50%;
  bottom: var(--ground, 36px);
  flex: none;
  width: var(--hit-w);
  height: var(--hit-h);
  margin-left: calc(var(--hit-w) / -2);
  border-radius: 28px;
  transform: translateX(var(--x, 0px)) scale(var(--s, 1));
  transform-origin: 50% 100%;
  transition: transform .6s cubic-bezier(.34, 1.3, .64, 1);
  will-change: transform;
  -webkit-tap-highlight-color: transparent;
}

.buddy-carousel[data-stage=ready] .buddy-picker button img {
  position: absolute;
  left: var(--img-left);
  bottom: var(--img-bottom);
  width: var(--img-w);
  max-width: none;
  height: var(--img-h);
  transition: opacity .25s ease;
}

.buddy-carousel[data-stage=ready] .buddy-picker button.is-live img {
  opacity: 0;
}

.fig-shadow {
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: calc(var(--foot-w) * 1.15);
  height: 16px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(34, 33, 31, .26), rgba(34, 33, 31, 0));
  pointer-events: none;
}

.fig-hop,
.fig-breathe {
  position: absolute;
  inset: 0;
  transform-origin: 50% 100%;
  pointer-events: none;
}

/* The live Rive character, cross-faded over the pose once it has drawn. */
.fig-live {
  position: absolute;
  left: var(--live-left);
  bottom: var(--live-bottom);
  width: var(--live-size);
  height: var(--live-size);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}

.buddy-picker button.is-live .fig-live {
  opacity: 1;
}

/* Glow pool under the selected buddy. */
.stage-spot {
  position: absolute;
  left: 50%;
  bottom: calc(var(--ground, 36px) - 26px);
  width: calc(var(--fig-h, 340px) * 1.05);
  height: 52px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--band-mid), transparent);
  opacity: .9;
  pointer-events: none;
}

/* "Tap <Name>" above a live buddy until it has been tapped once. */
.stage-hint {
  position: absolute;
  left: 50%;
  bottom: calc(var(--ground, 36px) + var(--fig-h, 340px) + 14px);
  z-index: 60;
  padding: 6px 13px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(34, 33, 31, .12);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  white-space: nowrap;
  transform: translate(-50%, 6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s ease, transform .35s ease;
}

.stage-hint.is-shown {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Figure motion: selection hop, idle hop (live buddies only), tap squash
   (static buddies) and breathing (selected static buddy). Off under reduced motion. */
@keyframes fig-select-hop {
  0% { transform: translateY(0); }
  42% { transform: translateY(calc(var(--fig-h, 340px) * -.08)); }
  72% { transform: translateY(0) scale(1.03, .97); }
  100% { transform: none; }
}

@keyframes fig-nudge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes fig-squash {
  0% { transform: none; }
  16% { transform: scale(1.06, .9); }
  48% { transform: translateY(-18px) scale(.97, 1.04); }
  78% { transform: translateY(0) scale(1.03, .97); }
  100% { transform: none; }
}

@keyframes fig-breathe {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(1.012); }
}

.fig-hop.is-hop { animation: fig-select-hop .6s cubic-bezier(.3, .7, .4, 1); }
.fig-hop.is-nudge { animation: fig-nudge .22s ease-in-out; }
.fig-hop.is-squash { animation: fig-squash .45s ease-out; }

.buddy-picker button[aria-pressed=true]:not(.is-live) .fig-breathe {
  animation: fig-breathe 3.2s ease-in-out infinite;
}

.buddy-description {
  position: relative;
  max-width: 580px;
  min-height: 172px;
  margin: 0 auto;
}

/* Cross-fade when the selection changes. */
.buddy-carousel[data-stage=ready] .buddy-description {
  transition: opacity .25s ease;
}

.buddy-description.is-fading {
  opacity: 0;
}

.buddy-description .eyebrow {
  font-size: 11px;
  letter-spacing: 1.5px;
}

.buddy-description h3 {
  font-size: 48px;
  letter-spacing: -.01em;
  margin: 13px 0 15px;
}

.buddy-description > p:not(.eyebrow) {
  font-size: 18px;
  line-height: 1.65;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto;
}

@media (max-width: 950px) {
  .buddies {
    padding-left: 32px;
    padding-right: 32px;
  }
}

@media (max-width: 700px) {
  .buddies {
    padding: 56px 22px 72px;
  }

  .buddies .section-intro {
    margin-bottom: 6px;
  }

  .buddy-stage {
    height: 350px;
    margin-bottom: 14px;
  }

  .buddy-description {
    min-height: 186px;
    padding: 0 5px;
  }

  .buddy-description .eyebrow {
    font-size: 9px;
    letter-spacing: 1.3px;
  }

  .buddy-description h3 {
    font-size: 39px;
  }

  .buddy-description > p:not(.eyebrow) {
    font-size: 16px;
    line-height: 1.6;
  }
}

/* ==========================================================================
   FAQ
   ========================================================================== */

.faq {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 80px;
  padding-top: 20px;
}

.faq h2 {
  font-size: 46px;
  letter-spacing: -.01em;
  margin-top: 18px;
}

.faq details {
  border-top: 1px solid var(--line);
  padding: 22px 0;
}

.faq details:last-child {
  border-bottom: 1px solid var(--line);
}

summary {
  cursor: pointer;
  font-size: 18px;
  font-weight: 600;
  position: relative;
  padding-right: 30px;
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: '+';
  position: absolute;
  right: 0;
  font-size: 23px;
  line-height: 1.1;
}

details[open] summary::after {
  content: '−';
}

details p {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.7;
  padding-top: 15px;
}

/* At <= 950px the section padding takes over the top padding. */
@media (max-width: 950px) {
  .faq {
    gap: 35px;
    padding-top: 75px;
  }

  .faq h2 {
    font-size: 36px;
  }
}

@media (max-width: 700px) {
  .faq {
    grid-template-columns: 1fr;
    gap: 25px;
    padding-top: 65px;
  }

  .faq h2 {
    font-size: 34px;
  }
}

/* ==========================================================================
   Closing
   Background and the pose beside the download button follow the selected
   buddy (buddy-stage.js); the note names it.
   ========================================================================== */

/* Theme soft colour mixed 55% with white; initial value = ChewWee. */
@property --closing-tint {
  syntax: '<color>';
  inherits: true;
  initial-value: #fff6cf;
}

.closing {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 76px 24px 88px;
  background: var(--closing-tint);
  transition: --closing-tint .6s ease;
}

.closing h2 {
  font-size: clamp(38px, 5vw, 64px);
  letter-spacing: -.01em;
  line-height: 1.16;
  margin: 22px 0 32px;
}

.closing-note {
  font-size: 14px;
  color: var(--muted);
  margin-top: 20px;
}

.closing-buddy {
  position: absolute;
  bottom: 0;
  left: calc(50% + var(--closing-offset, 300px));
  height: var(--closing-h, 220px);
  width: calc(var(--closing-h, 220px) * 1.1);
  pointer-events: none;
}

.closing-buddy img {
  position: absolute;
  left: 0;
  bottom: -2%;
  height: 100%;
  width: auto;
  max-width: none;
  opacity: 0;
  transition: opacity .3s ease;
}

.closing-buddy img.is-current {
  opacity: 1;
}

@media (min-width: 761px) and (max-width: 1180px) {
  .closing-buddy {
    --closing-h: clamp(150px, 17vw, 200px);
    --closing-offset: clamp(190px, 25vw, 270px);
  }
}

@media (min-width: 1181px) {
  .closing-buddy {
    --closing-offset: clamp(300px, 26vw, 400px);
  }
}

@media (max-width: 760px) {
  .closing {
    padding-bottom: 0;
  }

  .closing-buddy {
    position: relative;
    left: auto;
    height: 140px;
    width: 100%;
    margin-top: 22px;
  }

  .closing-buddy img {
    left: 50%;
    transform: translateX(-50%);
  }
}

/* ==========================================================================
   Footer
   ========================================================================== */

footer {
  max-width: 1240px;
  margin: auto;
  padding: 38px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

footer p {
  color: var(--muted);
}

footer > div {
  display: flex;
  gap: 24px;
  align-items: center;
}

footer > div span {
  color: var(--muted);
}

@media (max-width: 950px) {
  footer {
    flex-wrap: wrap;
  }
}

@media (max-width: 700px) {
  footer {
    padding: 30px 24px;
  }

  footer p {
    width: 60%;
  }

  footer > div {
    flex-wrap: wrap;
    gap: 18px;
  }
}

/* ==========================================================================
   Legal pages (full documents with a compact expandable contents list)
   ========================================================================== */

.legal-main {
  max-width: 920px;
  margin: auto;
  padding: 65px 32px 100px;
}

.legal-main > h1 {
  font-size: clamp(40px, 5vw, 62px);
  letter-spacing: -.01em;
  margin: 16px 0;
}

.legal-meta {
  color: var(--muted);
  font-size: 15px;
}

.legal-content {
  max-width: 740px;
}

.legal-intro {
  margin-top: 28px;
}

.legal-content section {
  scroll-margin-top: 30px;
}

.legal-content h2 {
  font-size: 24px;
  letter-spacing: -.01em;
  line-height: 1.3;
  margin: 40px 0 14px;
}

.legal-content p,
.legal-content li {
  font-size: 17px;
  color: #4c4a45;
  line-height: 1.8;
}

.legal-content p + p {
  margin-top: 16px;
}

.legal-content ul {
  padding-left: 24px;
}

.legal-content li + li {
  margin-top: 7px;
}

.legal-content a {
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.legal-index {
  max-width: 740px;
  margin: 28px 0 32px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.legal-index summary {
  font-size: 16px;
}

.legal-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  font-size: 15px;
  margin-bottom: 30px;
}

.legal-index .legal-toc {
  margin: 18px 0 0;
  gap: 10px 24px;
  line-height: 1.7;
}

.legal-toc a {
  text-decoration: underline;
  text-underline-offset: 4px;
}

@media (max-width: 700px) {
  .legal-header {
    height: auto;
    min-height: 74px;
    flex-wrap: wrap;
    padding-top: 16px;
    padding-bottom: 16px;
  }

  .legal-header nav {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 14px;
  }

  .legal-main {
    padding: 40px 24px 70px;
  }
}

/* ==========================================================================
   Entrance motion
   Above the fold (home header + hero): CSS keyframes, no script involved.
   Below the fold: [data-reveal] elements are hidden only while <html> has the
   .motion class (added by the inline head script); site.js adds .is-in per
   group as it enters the viewport, then removes the hooks once settled.
   ========================================================================== */

@keyframes rise {
  from {
    opacity: 0;
    transform: translate3d(0, var(--rise-y, 28px), 0);
  }
}

@keyframes rise-transform-only {
  from {
    transform: translate3d(0, 28px, 0);
  }
}

[data-reveal] {
  --reveal-delay: calc(var(--lead, 0s) + var(--delay, 0s) + var(--i, 0) * var(--stagger, .09s));
}

[data-reveal="film"] {
  --reveal-y: 30px;
  --reveal-scale: .975;
  --reveal-duration: .9s;
}

[data-reveal="card"] {
  --reveal-y: 36px;
  --reveal-scale: .985;
}

.feature-grid > .feature:nth-child(even) {
  --delay: .08s;
}

[data-reveal="card-art"] {
  --reveal-y: 28px;
  --reveal-scale: 1.03;
  --reveal-duration: 1.05s;
  --reveal-delay: calc(var(--lead, 0s) + .1s);
}

[data-reveal="stage"] {
  --reveal-y: 24px;
  --reveal-scale: .97;
  --reveal-duration: .9s;
}

.closing {
  --stagger: .1s;
}

@media screen and (prefers-reduced-motion: no-preference) {
  .site-header:not(.legal-header) > * {
    --rise-y: 10px;
    animation: rise .55s var(--ease-out) backwards;
  }

  .site-header:not(.legal-header) > :nth-child(2) {
    animation-delay: .07s;
  }

  .hero > .eyebrow,
  .hero-line,
  .hero-copy,
  .hero > .app-store-badge,
  .hero-footnote {
    animation: rise .8s var(--ease-out) backwards;
  }

  .hero h1 .hero-line:first-child {
    animation-delay: .09s;
  }

  .hero h1 .hero-line:last-child {
    animation:
      rise .8s var(--ease-out) .18s backwards,
      buddy-hue-flow 12s linear infinite;
  }

  .hero-copy {
    animation-delay: .27s;
  }

  .hero > .app-store-badge {
    animation-delay: .36s;
  }

  /* The illustration is the LCP element: it moves but is never transparent. */
  .hero-art {
    animation: rise-transform-only .8s var(--ease-out) .45s backwards;
  }

  .hero-footnote {
    animation-delay: .54s;
  }

  html.motion [data-reveal] {
    opacity: 0;
    transform: translate3d(0, var(--reveal-y, 22px), 0) scale(var(--reveal-scale, 1));
  }

  html.motion [data-reveal="card-art"] {
    opacity: 1;
  }

  html.motion [data-reveal].is-in {
    opacity: 1;
    transform: none;
    transition:
      var(--hover-transition, all 0s),
      opacity var(--reveal-duration, .8s) var(--ease-out) var(--reveal-delay),
      transform var(--reveal-duration, .8s) var(--ease-out) var(--reveal-delay);
  }
}

/* ==========================================================================
   Interaction feedback
   ========================================================================== */

.app-store-badge:hover {
  opacity: .85;
}

.app-store-badge:active {
  scale: .97;
}

.film-controls button:active {
  scale: .94;
}

.site-header nav a,
footer > div a {
  position: relative;
}

.site-header nav a::after,
footer > div a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s;
}

.site-header nav a:hover::after,
.site-header nav a:focus-visible::after,
footer > div a:hover::after,
footer > div a:focus-visible::after {
  transform: scaleX(1);
}

.faq summary {
  transition: color .2s;
}

.faq summary::after {
  transition: transform .25s;
}

.faq details[open] summary::after {
  transform: rotate(180deg);
}

@media (hover: hover) and (pointer: fine) {
  .app-store-badge:hover {
    translate: 0 -3px;
    scale: 1.015;
    box-shadow: 0 8px 20px #00000012;
  }

  .brand:hover {
    translate: 0 -2px;
  }

  .faq summary:hover {
    color: #9a6b00;
  }
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition: none !important;
  }

  .hero h1 .hero-line:last-child {
    animation: none;
    background-position: 0 0, 100% 50%;
  }

  .app-store-badge,
  .brand,
  .film-controls button {
    translate: none !important;
    scale: none !important;
  }

  .film-controls button:hover {
    transform: none;
  }

  .site-header nav a::after,
  footer > div a::after,
  .faq summary::after {
    transition: none;
  }

  .fig-hop,
  .fig-breathe,
  .buddy-picker button[aria-pressed=true]:not(.is-live) .fig-breathe {
    animation: none !important;
  }

  .feature-demo {
    display: none;
  }
}
