/* ============ Reset & tokens ============ */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

:root {
  --cream: #FFF8F0;
  --ink: #1A1A1A;
  --purple-black: #1A1625;
  --orange: #FF5C39;
  --orange-hover: #FF8A6B;
  --border: #E8DDD0;
  --muted: #57534E;
  --muted-2: #7A7268;
  --footer-muted: #9A93A0;
  --footer-border: #322E3C;
  --yellow: #FFD23F;
  --pink: #FF6B9D;
  --teal: #4ECDC4;
  --mint: #A8E6CF;
  --lavender: #C9B1FF;
  --blue: #7FB3FF;
  --green-dot: #06A77D;

  --font-display: 'Bricolage Grotesque', sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Motion. One shared vocabulary so every transition on the page agrees.
     --ease-out is the workhorse for anything entering or responding to a
     press; --ease-spring adds a little overshoot for the playful moments. */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-press: 140ms;
  --dur-hover: 250ms;
  --dur-reveal: 520ms;
}

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  position: relative;
  /* `clip` rather than `hidden`: hidden turns body into a scroll container,
     which silently breaks the sticky header. */
  overflow-x: clip;
}

img { max-width: 100%; }

.wrap {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding-left: clamp(20px, 5vw, 48px);
  padding-right: clamp(20px, 5vw, 48px);
}

/* ============ Page-wide background texture + confetti ============ */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(26,26,26,0.5) 1px, transparent 1.4px);
  background-size: 11px 11px;
  opacity: 0.05;
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 600px at 88% -4%, rgba(255,210,63,0.20), transparent 60%),
    radial-gradient(700px 500px at -4% 30%, rgba(78,205,196,0.14), transparent 60%);
}

.confetti-bg {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}
.confetti-piece { position: absolute; }
.confetti-piece.c1  { top:14%; left:6%;   width:12px; height:12px; border-radius:3px;   background:var(--yellow);   opacity:.75; --r:-18deg; animation: confSpin 9s ease-in-out infinite; }
.confetti-piece.c2  { top:19%; right:9%;  width:9px;  height:19px; border-radius:99px;  background:var(--pink);     opacity:.7;  --r:22deg;  animation: confDrift 11s ease-in-out infinite .7s; }
.confetti-piece.c3  { top:26%; left:14%;  width:10px; height:10px; border-radius:50%;   background:var(--teal);     opacity:.7;  --r:0deg;   animation: confDrift 10s ease-in-out infinite 1.4s; }
.confetti-piece.c4  { top:31%; right:5%;  width:8px;  height:17px; border-radius:99px;  background:var(--blue);     opacity:.7;  --r:-30deg; animation: confSpin 12s ease-in-out infinite .4s; }
.confetti-piece.c5  { top:37%; left:4%;   width:11px; height:11px; border-radius:3px;   background:var(--mint);     opacity:.75; --r:14deg;  animation: confSpin 9.5s ease-in-out infinite 1.6s; }
.confetti-piece.c6  { top:43%; right:13%; width:10px; height:10px; border-radius:50%;   background:var(--lavender); opacity:.7;  --r:0deg;   animation: confDrift 10.5s ease-in-out infinite .9s; }
.confetti-piece.c7  { top:50%; left:9%;   width:8px;  height:18px; border-radius:99px;  background:var(--orange);   opacity:.6;  --r:34deg;  animation: confSpin 11.5s ease-in-out infinite 1.1s; }
.confetti-piece.c8  { top:56%; right:7%;  width:12px; height:12px; border-radius:3px;   background:var(--yellow);   opacity:.7;  --r:-12deg; animation: confSpin 10s ease-in-out infinite .2s; }
.confetti-piece.c9  { top:62%; left:5%;   width:9px;  height:9px;  border-radius:50%;   background:var(--pink);     opacity:.65; --r:0deg;   animation: confDrift 9s ease-in-out infinite 1.9s; }
.confetti-piece.c10 { top:68%; right:11%; width:9px;  height:19px; border-radius:99px;  background:var(--teal);     opacity:.65; --r:26deg;  animation: confDrift 12s ease-in-out infinite .5s; }
.confetti-piece.c11 { top:75%; left:12%;  width:11px; height:11px; border-radius:3px;   background:var(--lavender); opacity:.7;  --r:-22deg; animation: confSpin 10.5s ease-in-out infinite 1.3s; }
.confetti-piece.c12 { top:81%; right:4%;  width:10px; height:10px; border-radius:50%;   background:var(--yellow);   opacity:.65; --r:0deg;   animation: confDrift 11s ease-in-out infinite .8s; }
.confetti-piece.c13 { top:88%; left:7%;   width:8px;  height:17px; border-radius:99px;  background:var(--blue);     opacity:.6;  --r:18deg;  animation: confSpin 9.5s ease-in-out infinite 1.7s; }
.confetti-piece.c14 { top:93%; right:15%; width:11px; height:11px; border-radius:3px;   background:var(--mint);     opacity:.65; --r:-16deg; animation: confSpin 12s ease-in-out infinite .6s; }

@keyframes confDrift { 0%,100% { transform: translate(0,0) rotate(var(--r,0deg)); } 50% { transform: translate(6px,-12px) rotate(calc(var(--r,0deg) + 14deg)); } }
@keyframes confSpin  { 0%,100% { transform: translateY(0) rotate(var(--r,0deg)); } 50% { transform: translateY(-16px) rotate(calc(var(--r,0deg) - 20deg)); } }
@keyframes phoneFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes iridPan { to { background-position: 220% 0; } }
@keyframes gleamMove { 0%,55% { left: -45%; } 100% { left: 135%; } }

@media (prefers-reduced-motion: reduce) {
  .confetti-piece, .hd-conf, .hero-phone, .donate-border, .donate-gleam {
    animation: none !important;
  }
}

/* ============ Header ============ */
/* The sticky header (.site-header, .brand, .brand-logo, .lang-toggle) lives in
   css/header.css so the landing page and the legal pages share one source. */

/* ============ Hero ============ */
.hero {
  position: relative;
  z-index: 2;
  padding: clamp(28px, 6vw, 64px) 0 clamp(20px, 5vw, 40px);
}
.hero-decor {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.hd-squiggle { position: absolute; top: 6%; left: 2%; transform: rotate(-12deg); }
.hd-circle   { position: absolute; bottom: 8%; left: 6%; }
.hd-conf { position: absolute; }
.hd-conf-1 { top:12%; left:44%; width:13px; height:13px; border-radius:3px;  background:var(--yellow); --r:-18deg; animation: confSpin 7s ease-in-out infinite; }
.hd-conf-2 { top:30%; left:38%; width:9px;  height:20px; border-radius:99px; background:var(--pink);   --r:24deg;  animation: confDrift 9s ease-in-out infinite .6s; }
.hd-conf-3 { top:62%; left:33%; width:11px; height:11px; border-radius:50%;  background:var(--teal);   --r:0deg;   animation: confDrift 8s ease-in-out infinite 1.2s; }
.hd-conf-4 { top:78%; left:47%; width:8px;  height:18px; border-radius:99px; background:var(--blue);   --r:-32deg; animation: confSpin 10s ease-in-out infinite .3s; }
.hd-conf-5 { top:8%;  right:14%; width:12px; height:12px; border-radius:3px; background:var(--mint);   --r:14deg;  animation: confSpin 8.5s ease-in-out infinite 1.5s; }
.hd-conf-6 { top:46%; right:3%;  width:9px;  height:19px; border-radius:99px; background:var(--yellow); --r:-8deg; animation: confDrift 7.5s ease-in-out infinite .9s; }
.hd-conf-7 { bottom:14%; right:20%; width:10px; height:10px; border-radius:50%; background:var(--lavender); --r:0deg; animation: confDrift 9.5s ease-in-out infinite .2s; }
.hd-conf-8 { top:22%; left:8%;  width:8px;  height:16px; border-radius:99px; background:var(--orange); --r:36deg; animation: confSpin 8s ease-in-out infinite 1.1s; }
.hd-conf-9 { top:70%; left:16%; width:9px;  height:9px;  border-radius:50%;  background:var(--yellow); --r:0deg;  animation: confDrift 7s ease-in-out infinite 1.8s; }

.hero-row {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(24px, 5vw, 56px);
}
.hero-copy {
  flex: 1 1 340px;
  min-width: 300px;
  /* Establishes a query container so the headline can size itself off the
     actual column width, not the viewport — the column narrows well below
     the viewport once .hero-visual claims its share of the flex row. */
  container-type: inline-size;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1.5px solid var(--border);
  color: var(--ink);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.4px;
  padding: 7px 13px;
  border-radius: 999px;
  transform: rotate(-1deg);
}
.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green-dot);
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  /* cqw (of .hero-copy, not the viewport) so "The party word game" and
     "that gets the whole room" each hold one row regardless of how much
     width .hero-visual leaves them. Overridden below 640px.
     The vw line is the fallback for browsers without container queries —
     without it the declaration is dropped and the heading collapses. */
  font-size: clamp(30px, 4.6vw, 48px);
  font-size: clamp(30px, 7.8cqw, 52px);
  line-height: 1.05;
  letter-spacing: -0.032em;
  margin: 20px 0 0;
  text-wrap: balance;
  color: var(--purple-black);
}
.hero-title .line { display: block; }
.accent-line { color: var(--orange); }

/* Inline-block wrapper so the squiggle tracks the width of the accent
   word itself, not the full line box — works in both locales. */
.accent-wrap {
  position: relative;
  display: inline-block;
}
.underline-squiggle {
  position: absolute;
  left: 0;
  bottom: -0.06em;
  width: 100%;
  height: 0.2em;
  overflow: visible;
}

.hero-sub {
  font-size: clamp(16px, 2.4vw, 19px);
  line-height: 1.6;
  color: var(--muted);
  margin: 18px 0 0;
  max-width: 46ch;
  text-wrap: pretty;
}

.store-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
}
.store-badges.center { justify-content: center; margin-top: 24px; }
.badge-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  border-radius: 10px;
  transition: transform 0.2s ease;
}
.badge-link:hover { transform: translateY(-2px); }
.badge-link img { height: 52px; width: auto; display: block; }

/* Stands in for the store badges until the apps ship. Inline-flex so it
   follows the surrounding text-align — left in the hero on desktop, centred
   in the CTA card and on mobile. */
.coming-soon {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 28px 0 0;
  padding: 13px 22px;
  border: 2px dashed var(--ink);
  border-radius: 999px;
  background: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
  color: var(--ink);
  transform: rotate(-0.8deg);
}
.coming-soon svg {
  flex: none;
  color: var(--orange);
}
.cta-card .coming-soon { margin-top: 24px; }

@media (max-width: 640px) {
  .coming-soon {
    font-size: 14px;
    padding: 12px 18px;
    gap: 8px;
  }
}

.hero-visual {
  flex: 0 1 300px;
  min-width: 240px;
  display: flex;
  justify-content: center;
  position: relative;
}
.hero-glow {
  position: absolute;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--pink), var(--yellow), var(--teal), var(--mint), var(--lavender), var(--blue), var(--pink));
  filter: blur(38px);
  opacity: 0.35;
}
.hero-phone {
  position: relative;
  animation: phoneFloat 6s ease-in-out infinite;
}
.hero-phone img {
  width: clamp(240px, 42vw, 300px);
  height: auto;
  display: block;
  filter: drop-shadow(0 40px 64px rgba(20,14,5,0.35));
}

/* ============ Sections shared ============ */
.section {
  position: relative;
  z-index: 2;
  padding: clamp(28px, 5vw, 52px) 0;
}
.section-head {
  text-align: center;
  max-width: 44em;
  margin: 0 auto 30px;
}
.section-head.center { max-width: none; margin-bottom: 46px; }
.kicker {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--orange);
}
.section-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(26px, 4.6vw, 40px);
  line-height: 1.12;
  letter-spacing: -0.028em;
  margin: 8px 0 0;
  text-wrap: balance;
}
.how-to-play .section-title { font-size: clamp(28px, 5vw, 44px); }
.section-body {
  font-size: clamp(15px, 2vw, 18px);
  line-height: 1.65;
  color: var(--muted);
  margin: 14px 0 0;
  text-wrap: pretty;
}

/* ============ Grids ============ */
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.step-grid { gap: 18px; }
@media (max-width: 960px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .grid-4 { grid-template-columns: 1fr; }
}

/* ============ Feature cards ============ */
.feature-card {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 12px 22px -16px rgba(20,14,5,0.2);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 32px -18px rgba(20,14,5,0.3);
}
.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  border: 1.5px solid var(--ink);
  display: grid;
  place-items: center;
  margin-bottom: 13px;
}
.icon-amber  { background: #FFE6B0; }
.icon-teal   { background: #C9F2EE; }
.icon-pink   { background: #FFD1DF; }
.icon-purple { background: #E4D7FF; }
.feature-card h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  line-height: 1.25;
  letter-spacing: -0.018em;
  margin: 0;
  text-wrap: balance;
}
.feature-card p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  margin: 7px 0 0;
  text-wrap: pretty;
}

/* ============ Step cards ============ */
.step-card {
  position: relative;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 20px;
  padding: 22px;
  box-shadow: 0 6px 0 -1px rgba(26,26,26,0.12), 0 14px 22px -14px rgba(20,14,5,0.25);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.step-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 0 -1px rgba(26,26,26,0.14), 0 24px 32px -16px rgba(20,14,5,0.32);
}
.step-num {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
  color: var(--orange);
}
.step-phone {
  display: block;
  margin: 14px auto 24px;
  width: 120px;
  aspect-ratio: 9 / 19;
  border-radius: 12px;
  background: var(--cream);
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 0 5px #111, 0 0 0 6.5px #2a2a2a, 0 14px 24px -14px rgba(20,14,5,0.4);
}
.step-notch {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 46px;
  height: 13px;
  background: #0a0a0a;
  border-radius: 999px;
  z-index: 5;
}
.step-phone img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.step-card h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: -0.022em;
  margin: 0;
  text-wrap: balance;
}
.step-card p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  margin: 7px 0 0;
  text-wrap: pretty;
}

/* ============ CTA band ============ */
.cta-band {
  position: relative;
  z-index: 2;
  margin-top: clamp(20px, 4vw, 40px);
  background: var(--orange);
  overflow: hidden;
}
.cta-band::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.55) 1px, transparent 1.3px);
  background-size: 9px 9px;
  opacity: 0.14;
}
.cta-decor { position: absolute; inset: 0; pointer-events: none; }
.cd-circle   { position: absolute; top: 14%; left: 6%;  transform: rotate(-10deg); }
.cd-triangle { position: absolute; top: 22%; right: 14%; transform: rotate(14deg); }

.cta-wrap {
  position: relative;
  z-index: 1;
  /* padding-block only — the `padding` shorthand would zero out the
     horizontal gutter .wrap provides and push the card to the screen edge. */
  padding-block: clamp(40px, 7vw, 76px);
  display: flex;
  justify-content: center;
}
.cta-card {
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: 28px;
  padding: clamp(28px, 4vw, 44px);
  max-width: 600px;
  width: 100%;
  text-align: center;
  box-shadow: 0 24px 44px -20px rgba(20,14,5,0.5);
  transform: rotate(-0.6deg);
}
.cta-card h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(28px, 5vw, 42px);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0;
  text-wrap: balance;
}
.cta-card > p {
  font-size: clamp(15px, 2vw, 17px);
  line-height: 1.6;
  color: var(--muted);
  margin: 12px 0 0;
  text-wrap: pretty;
}

.dashed-divider {
  margin: 24px auto 0;
  height: 1.5px;
  max-width: 200px;
  background: repeating-linear-gradient(90deg, var(--border) 0 6px, transparent 6px 11px);
}

.donate-wrap { margin-top: 22px; }
.donate-border {
  display: inline-block;
  border-radius: 18px;
  padding: 2.5px;
  background: linear-gradient(110deg, var(--pink), var(--yellow), var(--teal), var(--mint), var(--lavender), var(--blue), var(--pink));
  background-size: 220% 100%;
  animation: iridPan 6s linear infinite;
  box-shadow: 0 14px 26px -12px rgba(127,179,255,0.6);
  transform: rotate(-0.8deg);
}
.donate-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  background: var(--cream);
  color: var(--purple-black);
  border-radius: 15.5px;
  padding: 13px 24px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.3px;
  overflow: hidden;
}
.donate-gleam {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -45%;
  width: 32%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.7), transparent);
  transform: skewX(-18deg);
  animation: gleamMove 3.6s ease-in-out infinite;
}
.donate-sub {
  font-size: 12.5px;
  color: var(--muted-2);
  margin: 11px 0 0;
}

/* ============ Footer ============ */
.site-footer {
  position: relative;
  z-index: 2;
  background: var(--purple-black);
  color: var(--cream);
}
.footer-row {
  padding-block: clamp(36px, 5vw, 56px) clamp(28px, 4vw, 40px);
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  align-items: flex-start;
  justify-content: space-between;
}
.footer-brand { flex: 1 1 260px; min-width: 240px; }
.footer-logo { height: 28px; }
.footer-tagline {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 15px;
  color: #C9C2BC;
  margin: 14px 0 0;
}
.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.footer-link {
  color: var(--cream);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s ease;
}
.footer-link:hover {
  color: var(--orange-hover);
  text-decoration: underline;
}
.footer-bottom { border-top: 1px solid var(--footer-border); }
.footer-bottom-row {
  padding-block: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
}
.legal {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--footer-muted);
}

/* ============ Tablet ============ */
@media (max-width: 900px) {
  .hero-row { gap: 24px; }
  .hero-visual { flex-basis: 100%; }
  .hero-phone img {
    width: clamp(230px, 46vw, 280px);
    /* The desktop shadow is sized for a 300px phone; at this scale it reads
       as a grey smudge on the cream, so tighten and lighten it. */
    filter: drop-shadow(0 20px 30px rgba(20, 14, 5, 0.22));
  }
  .hero-glow { width: 230px; height: 230px; opacity: 0.28; }
}

/* ============ Mobile ============ */
@media (max-width: 640px) {
  /* Decorative confetti sits directly behind hero copy at narrow widths —
     drop the in-hero layer and soften the page-wide one for legibility. */
  .hero-decor { display: none; }
  .confetti-bg { opacity: 0.45; }

  .hero { padding-top: 18px; }

  /* Let the headline reflow naturally instead of holding three rigid
     lines that wrap raggedly in the middle of a phrase. */
  .hero-title {
    font-size: clamp(32px, 9vw, 44px);
    line-height: 1.08;
  }
  .hero-title .line { display: inline; }

  /* Centred copy reads better above the centred phone visual. */
  .hero-copy { text-align: center; }
  .hero-sub { margin-inline: auto; }
  .store-badges { justify-content: center; }

  /* Both badges side by side overflow a 390px viewport at 52px tall. */
  .badge-link img { height: 46px; }

  .section { padding: 26px 0; }
  .section-head { margin-bottom: 24px; }
  .section-head.center { margin-bottom: 30px; }

  .feature-card { padding: 18px; }
  .step-card { padding: 20px; }

  /* Full-bleed cards look cramped with the sticker rotation at this size. */
  .cta-card { transform: none; }
  .donate-btn { justify-content: center; }

  .footer-bottom-row { justify-content: flex-start; gap: 6px; }
}

@media (max-width: 380px) {
  .store-badges { gap: 10px; }
  .badge-link img { height: 42px; }
}

/* ============ Focus visibility ============ */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

/* ============================================================
   Motion
   Everything here is gated behind .js-motion, which main.js adds
   to <html>. Without JS the page renders in its final state — no
   content is ever hidden behind an animation that might not run.
   ============================================================ */

/* ---- Press feedback ----
   Applies on touch too, where it matters most: tapping a store badge
   previously gave no acknowledgment at all. */
.badge-link,
.donate-btn {
  transition: transform var(--dur-hover) var(--ease-out);
}
.badge-link:active,
.donate-btn:active {
  transform: scale(0.97);
  transition-duration: var(--dur-press);
}
.feature-card:active,
.step-card:active {
  transition-duration: var(--dur-press);
}

/* Hover lift belongs to fine pointers only — on touch it sticks after tap. */
@media (hover: hover) and (pointer: fine) {
  .badge-link:hover { transform: translateY(-2px); }
  .badge-link:active { transform: translateY(-1px) scale(0.97); }
}

/* ---- Scroll reveal ---- */
.js-motion [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity var(--dur-reveal) var(--ease-out),
    transform var(--dur-reveal) var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
.js-motion [data-reveal].is-revealed {
  opacity: 1;
  transform: none;
  will-change: auto;
}

/* Stagger inside a group. The step cards are numbered 01–04, so the
   sequence carries meaning rather than just decoration. */
.js-motion .grid-4 > [data-reveal]:nth-child(2) { --reveal-delay: 70ms; }
.js-motion .grid-4 > [data-reveal]:nth-child(3) { --reveal-delay: 140ms; }
.js-motion .grid-4 > [data-reveal]:nth-child(4) { --reveal-delay: 210ms; }

/* ---- Hero entrance ----
   The <h1> is deliberately absent: it is the LCP element, and fading it
   in from zero delays the largest paint and the core message. It lands
   instantly; the squiggle below gives the hero its moment instead. */
/* `backwards` rather than `forwards` with an opacity:0 base: the language
   swap later replaces `animation` on these same elements, and a base of 0
   would leave them invisible once that animation ends. Here the resting
   state is visible and the animation only borrows the hidden state. */
.js-motion .hero-copy .badge-pill,
.js-motion .hero-copy .hero-sub,
.js-motion .hero-copy .store-badges,
.js-motion .hero-visual {
  animation: heroRise 560ms var(--ease-out) backwards;
}
.js-motion .hero-copy .hero-sub    { animation-delay: 120ms; }
.js-motion .hero-copy .store-badges { animation-delay: 200ms; }
.js-motion .hero-visual             { animation-delay: 150ms; }

@keyframes heroRise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

/* The floating phone owns its own transform, so it rises via opacity only
   to avoid two animations fighting over the same property. */
.js-motion .hero-visual { animation-name: heroFade; }
@keyframes heroFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ---- Signature squiggle draws itself on ---- */
.js-motion .underline-squiggle path {
  stroke-dasharray: 320;
  stroke-dashoffset: 320;
  animation: squiggleDraw 700ms var(--ease-out) 400ms forwards;
}
@keyframes squiggleDraw {
  to { stroke-dashoffset: 0; }
}

/* ---- Language swap ----
   Text is swapped first, then faded in, so the switch reads as instant while
   still bridging what would otherwise be every string on the page changing at
   once. Opacity only: several of these sit inside the <h1>, and translating
   them would drag the absolutely-positioned squiggle out of alignment. */
.js-motion.is-lang-swapping [data-i18n] {
  animation: langIn 300ms var(--ease-out);
}
@keyframes langIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ---- Reduced motion ----
   Reveals resolve to their final state immediately: content visibility is
   never negotiable. Ambient loops stop; press feedback stays, since it is
   information rather than decoration. */
@media (prefers-reduced-motion: reduce) {
  .js-motion [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .js-motion .hero-copy .badge-pill,
  .js-motion .hero-copy .hero-sub,
  .js-motion .hero-copy .store-badges,
  .js-motion .hero-visual {
    opacity: 1;
    animation: none;
  }
  .js-motion .underline-squiggle path {
    stroke-dashoffset: 0;
    animation: none;
  }
  .js-motion.is-lang-swapping [data-i18n] { animation: none; }
}
