/* Landing page at /learn (public/learn.html, learn/en.html). Standalone on
   purpose: it does not load the app bundle, so the tokens below are copied
   from src/index.css ("red" colour theme) and the drawn phones' sizes from
   the V2 app (Dashboard.css, design-v2.css). Keep them in step if those
   change. Every animation is a CSS loop; the non-animated state of each
   element is the one shown under prefers-reduced-motion, so it must read on
   its own. */

@font-face {
  font-family: "Space Grotesk";
  font-weight: 500 700;
  font-display: swap;
  src: url("/fonts/space-grotesk-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Space Grotesk";
  font-weight: 500 700;
  font-display: swap;
  src: url("/fonts/space-grotesk-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308,
    U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #f2ede4;
  --surface: #ffffff;
  --surface-2: #ece6d9;
  --border: #16130d;
  --border-soft: #d8d0bf;
  --text: #55503f;
  --text-h: #0f0d09;
  --text-dim: color-mix(in srgb, var(--text) 60%, var(--bg));
  --accent: #b2564f;
  --accent-ink: #ffffff;
  --accent-2: #7c3aed;
  --plus: #2f8a4e;
  /* History icons and card line in the V2 home screen (learn-img/). */
  --in-bg: #beddc1;
  --in-ring: #16130d;
  --in-ink: #16130d;
  --out-bg: #dfb7b0;
  --out-ring: #16130d;
  --out-ink: #16130d;
  --h-plus: #2f7d3a;
  --card-line: #8a8271;
  --band: #16130d;
  --band-ink: #f2ede4;
  --sans: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --spring: cubic-bezier(0.3, 1.35, 0.5, 1);
  --out: cubic-bezier(0.2, 0.8, 0.2, 1);
  color-scheme: light dark;
  font-synthesis: none;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #100e0a;
    --surface: #1c1811;
    --surface-2: #1a1610;
    --border: #f2ede4;
    --border-soft: #3a3226;
    --text: #b3aa96;
    --text-h: #f9f5ec;
    --accent-2: #a78bfa;
    --plus: #5cc683;
    --in-bg: #112513;
    --in-ring: #3d5f41;
    --in-ink: #beddc1;
    --out-bg: #301714;
    --out-ring: #734843;
    --out-ink: #dfb7b0;
    --h-plus: #5cc683;
    --card-line: #a49b87;
    --band: #050403;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font: 17px/1.55 var(--sans);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1,
h2,
h3 {
  margin: 0;
  text-wrap: balance;
  color: var(--text-h);
  font-weight: 800;
  letter-spacing: -0.035em;
}

p {
  margin: 0;
  text-wrap: pretty;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
}

figure {
  margin: 0;
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

[id] {
  scroll-margin-top: 24px;
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  /* Sides only: sections that are also .wrap set their own top and bottom. */
  padding-right: max(24px, env(safe-area-inset-right));
  padding-left: max(24px, env(safe-area-inset-left));
}

section h2 {
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1;
  margin-bottom: 40px;
}

/* ---------- header ---------- */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 22px;
  padding-bottom: 22px;
}

.top-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.lang {
  font-size: 15px;
  font-weight: 700;
  text-underline-offset: 3px;
}

.wordmark {
  display: inline-block;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-h);
  text-decoration: none;
  transform: rotate(-3deg);
}

.accent-r {
  display: inline-block;
  color: var(--accent-2);
  font-style: italic;
  transition: transform 0.4s var(--spring);
}

.accent-r.r1 {
  transform: rotate(-4deg);
}

.accent-r.r2 {
  transform: rotate(9deg);
}

@media (hover: hover) {
  .top .wordmark:hover .r1 {
    transform: rotate(-14deg) translateY(-3px);
  }
  .top .wordmark:hover .r2 {
    transform: rotate(20deg) translateY(-5px);
  }
}

/* ---------- pills ---------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px 12px 12px;
  border-radius: 999px;
  border: 2.5px solid var(--border);
  box-shadow: 3.4px 3.4px 0 var(--border);
  background: var(--surface);
  color: var(--text-h);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 0.14s var(--spring),
    box-shadow 0.14s ease;
}

@media (hover: hover) {
  .pill:hover {
    transform: translate(-2px, -2px);
    box-shadow: 5.1px 5.1px 0 var(--border);
  }
}

.pill:active {
  transform: translate(3px, 3px) scale(0.98);
  box-shadow: 0 0 0 var(--border);
}

.pill:focus-visible,
.text-link:focus-visible {
  outline: 3px solid var(--accent-2);
  outline-offset: 4px;
}

.pill--primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.pill--small {
  padding: 8px 18px;
  font-size: 15px;
}

.pill-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2.5px solid var(--border);
  box-shadow: 2.5px 2.5px 0 var(--border);
  background: var(--surface);
  color: var(--text-h);
}

.pill-icon svg {
  width: 21px;
  height: 21px;
  transition: transform 0.3s var(--spring);
}

@media (hover: hover) {
  .pill:hover .pill-icon svg {
    transform: translateX(3px);
  }
}

.text-link {
  font-weight: 700;
  color: var(--text-h);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
  padding: 8px 4px;
}

.text-link::after {
  content: " ↓";
}

.text-link:hover {
  color: var(--accent);
}

.beta {
  display: inline-block;
  vertical-align: 0.35em;
  margin-left: 4px;
  padding: 2px 9px;
  border: 2px solid currentColor;
  border-radius: 999px;
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.4;
}

/* ---------- drawn phone ---------- */

.phone {
  --ph-border: var(--border);
  position: relative;
  aspect-ratio: 9 / 19;
  border: 2.5px solid var(--ph-border);
  border-radius: 40px;
  box-shadow: 7px 7px 0 var(--ph-border);
  background: var(--surface);
  color: var(--text-h);
  overflow: hidden;
}

.mini-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 14px;
  border-radius: 999px;
  border: 2px solid var(--border);
  box-shadow: 2.5px 2.5px 0 var(--border);
  background: var(--surface);
  color: var(--text-h);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.mini-pill--accent {
  background: var(--accent);
  color: var(--accent-ink);
}

/* ---------- rolling digits ----------
   Each digit is a strip 0..9 0..9 drawn by ::before; translating it by
   --t lines shows digit --t mod 10. A rolling digit goes from --f to --t,
   past a full turn when --t >= 10, like the app's balance. */

.odo {
  --h: 1.1em;
  display: inline-flex;
  height: var(--h);
  line-height: var(--h);
  overflow: hidden;
  vertical-align: bottom;
  font-variant-numeric: tabular-nums;
}

.odo .d {
  display: block;
  height: var(--h);
  overflow: hidden;
}

.odo .d::before {
  content: "0\A 1\A 2\A 3\A 4\A 5\A 6\A 7\A 8\A 9\A 0\A 1\A 2\A 3\A 4\A 5\A 6\A 7\A 8\A 9";
  display: block;
  white-space: pre;
  transform: translateY(calc(var(--t) * -1 * var(--h)));
}

.odo .sep {
  width: 0.28em;
}

/* English groups digits with a comma. */
:lang(en) .odo .sep {
  width: auto;
}

:lang(en) .odo .sep::before {
  content: ",";
}

.dg-0 { --t: 0; }
.dg-1 { --t: 1; }
.dg-2 { --t: 2; }
.dg-3 { --t: 3; }
.dg-5 { --t: 5; }
.dg-7 { --t: 7; }

/* 151 300 -> 172 300 */
.odo--hero { --h: 1em; }
.odo--hero .r1 { --f: 5; --t: 7; }
.odo--hero .r2 { --f: 1; --t: 12; }
/* +0 000 -> +5 000 */
.odo--tap .q1 { --f: 0; --t: 5; }
.odo--tap .q2,
.odo--tap .q3,
.odo--tap .q4 { --f: 0; --t: 10; }

/* ---------- hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 56px;
  align-items: center;
  padding-top: 32px;
  padding-bottom: 104px;
}

.hero h1 {
  font-size: clamp(52px, 8.6vw, 112px);
  line-height: 0.92;
  letter-spacing: -0.05em;
  margin-bottom: 28px;
}

.hero h1 > span {
  display: block;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.lead {
  font-size: clamp(19px, 2vw, 22px);
  color: var(--text-h);
  max-width: 22em;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 32px;
}

.hero-visual {
  display: flex;
  justify-content: center;
}

/* The V2 home screen (learn-img/home-light.webp) at ~0.77 scale. */
.phone--hero {
  width: min(310px, 82vw);
  aspect-ratio: 9 / 19;
  background: var(--bg);
}

/* The camera cut-out grows into the payment toast, like the app's island
   (Dashboard.css .toast-island). */
.island {
  position: absolute;
  z-index: 2;
  top: 11px;
  left: 50%;
  width: 84px;
  height: 24px;
  margin-left: -42px;
  border-radius: 999px;
  background: #000;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.island-in {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px;
  opacity: 0;
  white-space: nowrap;
}

.island-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #1fa56c;
  color: #fff;
}

.island-icon svg {
  width: 18px;
  height: 18px;
}

.island-txt {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  color: #fff;
}

.island-title {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.62);
}

.island-txt b {
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

/* Measured from the V2 home screen rendered by tools/learn-shots (390 px
   wide) and scaled by ~0.78 to this phone. */
.app {
  position: absolute;
  inset: 0;
  padding: 66px 16px 0;
}

.app-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.app-mark {
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.02em;
  transform: rotate(-3deg);
}

.app-icons {
  display: flex;
  gap: 6px;
}

/* Flat rounded squares, no offset shadow (design-v2.css header). */
.icon-btn {
  display: grid;
  place-items: center;
  width: 33px;
  height: 33px;
  border: 2px solid var(--border);
  border-radius: 10.5px;
  background: var(--surface);
  color: var(--text-h);
}

.icon-btn svg {
  width: 16px;
  height: 16px;
}

/* As design-v2.css: one stroke width for all three, and the gear lifted by
   its own off-centre drawing (painted centre is y 13.05 of 24). */
.icon-btn svg :is(path, circle, rect) {
  stroke-width: 1.8;
}

.icon-btn:nth-child(3) svg {
  transform: translateY(calc(-1.05 / 24 * 16px));
}

.balance {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 7px;
  margin: 30px 0 0;
  font-size: 51px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}

.balance-unit {
  font-size: 20px;
  color: var(--accent);
  letter-spacing: 0;
  padding-bottom: 1px;
}

/* ≈ euros under the balance; the new value takes over as the digits roll. */
.fiat {
  display: grid;
  justify-items: center;
  margin-top: 14px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.fiat span {
  grid-area: 1 / 1;
}

.fiat-a {
  opacity: 0;
}

.big-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  margin-top: 30px;
}

.big-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 44px;
  border: 2px solid var(--border);
  border-radius: 16px;
  box-shadow: 2.7px 2.7px 0 var(--border);
  background: var(--surface);
  color: var(--text-h);
  font-size: 12.5px;
  font-weight: 700;
}

.big-btn svg {
  flex: none;
  width: 14px;
  height: 14px;
  color: var(--text);
}

.scan {
  display: grid;
  place-items: center;
  width: 53px;
  height: 53px;
  border: 2px solid var(--border);
  border-radius: 50%;
  box-shadow: 2.4px 2.4px 0 var(--border);
  background: var(--accent);
  color: var(--accent-ink);
}

.scan svg {
  width: 20px;
  height: 20px;
}

.recent {
  margin: 26px 2px 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-h);
}

.history {
  margin-top: 19px;
  border: 1px solid var(--card-line);
  border-radius: 12.5px;
  background: var(--surface);
  overflow: hidden;
}

.h-row {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 61px;
  padding: 0 14px;
  border-top: 1px solid var(--card-line);
}

.h-row:first-child {
  border-top: none;
}

.h-row--new {
  overflow: hidden;
}

.h-row--new + .h-row {
  border-top: 1px solid var(--card-line);
}

.h-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  margin-right: 3px;
  border: 2px solid var(--h-ring);
  border-radius: 50%;
  box-shadow: 1.4px 1.4px 0 var(--h-ring);
  color: var(--h-ink);
}

.h-icon svg {
  width: 15px;
  height: 15px;
}

.h-icon.in {
  --h-ring: var(--in-ring);
  --h-ink: var(--in-ink);
  background: var(--in-bg);
}

.h-icon.out {
  --h-ring: var(--out-ring);
  --h-ink: var(--out-ink);
  background: var(--out-bg);
}

.h-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  line-height: 1.3;
}

.h-info b {
  overflow: hidden;
  font-size: 13px;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--text-h);
}

.h-info span {
  font-size: 10.5px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.h-amt {
  flex: none;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  color: var(--text-h);
  font-variant-numeric: tabular-nums;
}

.h-amt.plus {
  color: var(--h-plus);
}

.plus {
  color: var(--plus);
}

.t-plus {
  color: var(--plus);
}

/* ---------- tap to pay band ---------- */

.band {
  background: var(--band);
  color: color-mix(in srgb, var(--band-ink) 72%, var(--band));
  border-block: 2.5px solid var(--border);
  overflow: hidden;
}

.band h2 {
  color: var(--band-ink);
}

.tap {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 48px;
  align-items: center;
  padding-top: 112px;
  padding-bottom: 112px;
}

.tap h2 {
  margin-bottom: 16px;
}

.tap .beta {
  color: #c4b0ff;
}

.tap-sub {
  font-size: 20px;
  color: var(--band-ink);
  margin-bottom: 36px;
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 340px;
}

.step {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--band-ink);
}

/* The underline that fills while the phones are in that step. */
.step::after {
  content: "";
  position: absolute;
  left: 42px;
  right: 0;
  bottom: 0;
  height: 2px;
  background: color-mix(in srgb, var(--band-ink) 14%, transparent);
}

.step::before {
  content: "";
  position: absolute;
  z-index: 1;
  left: 42px;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

.step-n {
  display: grid;
  place-items: center;
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid currentColor;
  font-size: 13px;
}

.tap-note {
  margin-top: 28px;
  font-size: 15px;
}

.tap-stage {
  --gap: 28px;
  --apart: 56px;
  position: relative;
  display: flex;
  justify-content: center;
  gap: var(--gap);
  padding: 24px 0;
}

.phone--tap {
  --ph-border: var(--band-ink);
  width: min(210px, 38vw);
  font-size: 14px;
}

.cam {
  position: absolute;
  top: 10px;
  left: 50%;
  width: 64px;
  height: 20px;
  margin-left: -32px;
  border-radius: 999px;
  background: #000;
}

.layer {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 40px 12px 24px;
  text-align: center;
  opacity: 0;
}

.layer.is-static {
  opacity: 1;
}

.layer .mini-pill {
  width: 100%;
  max-width: 132px;
}

.t-dim {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dim);
}

.t-big {
  font-size: clamp(26px, 4.4vw, 34px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.t-title {
  font-size: 18px;
  font-weight: 700;
}

.emo {
  display: flex;
  gap: 4px;
  margin: 4px 0 10px;
  font-size: clamp(24px, 4.6vw, 34px);
  line-height: 1;
}

.emo span {
  display: block;
}

.check {
  width: 54px;
  height: 54px;
  fill: none;
  stroke: var(--plus);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.check circle {
  stroke-dasharray: 145;
}

.check path {
  stroke-dasharray: 34;
}

.spin {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 3.5px solid var(--border-soft);
  border-top-color: var(--accent);
  margin-bottom: 4px;
}

.dots {
  display: flex;
  gap: 6px;
  height: 46px;
  align-items: center;
}

.dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--text-dim);
}

.bump-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 180px;
  height: 180px;
  margin: -90px 0 0 -90px;
  border-radius: 50%;
  border: 3px solid var(--accent);
  opacity: 0;
  pointer-events: none;
}

/* ---------- features ---------- */

.feats {
  padding-top: 112px;
  padding-bottom: 40px;
}

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

.card {
  display: flex;
  flex-direction: column;
  padding: 24px;
  border: 2.5px solid var(--border);
  border-radius: 28px;
  box-shadow: 6px 6px 0 var(--border);
  background: var(--surface);
}

.card h3 {
  font-size: clamp(22px, 2.6vw, 28px);
  line-height: 1.1;
  margin: 24px 0 6px;
}

.card p {
  font-size: 16px;
}

.card .beta {
  font-size: 11px;
}

.vis {
  position: relative;
  height: 180px;
  border-radius: 18px;
  background: var(--surface-2);
  overflow: hidden;
}

/* Pay anything: the field types out a destination, the app names it. */
.vis--field {
  display: flex;
  align-items: center;
  padding: 0 20px;
}

.field {
  position: relative;
  width: 100%;
  height: 54px;
  border: 2px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}

.fl {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding: 0 14px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-h);
  opacity: 0;
}

.fl1 {
  opacity: 1;
}

.fl-txt {
  overflow: hidden;
  white-space: nowrap;
}

.chip {
  position: absolute;
  left: 12px;
  top: calc(100% + 14px);
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--accent-2);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

/* Speed: one bolt, drawn like the app's buttons (thick outline, accent
   fill, hard offset shadow). It drops in, hits, and the payment rolls in. */
.vis--bolt {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.bolt-stage {
  position: relative;
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
}

.bolt {
  position: relative;
  width: 96px;
  height: 96px;
  overflow: visible;
}

.bolt-g {
  transform-box: fill-box;
  transform-origin: 50% 100%;
}

.bolt-body {
  fill: var(--accent);
  stroke: var(--border);
  stroke-width: 2.6;
  stroke-linejoin: round;
}

.bolt-shadow {
  fill: var(--border);
}

.sparks {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.sparks i {
  grid-area: 1 / 1;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--accent);
  opacity: 0;
}

.sparks i:nth-child(even) {
  width: 4px;
  height: 4px;
  background: var(--text-h);
}

.sparks i:nth-child(1) { --x: 0px; --y: -64px; }
.sparks i:nth-child(2) { --x: 46px; --y: -46px; }
.sparks i:nth-child(3) { --x: 66px; --y: 0px; }
.sparks i:nth-child(4) { --x: 46px; --y: 44px; }
.sparks i:nth-child(5) { --x: 0px; --y: 60px; }
.sparks i:nth-child(6) { --x: -46px; --y: 44px; }
.sparks i:nth-child(7) { --x: -66px; --y: 0px; }
.sparks i:nth-child(8) { --x: -46px; --y: -46px; }

.bolt-amt {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  margin-top: 8px;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--plus);
  font-variant-numeric: tabular-nums;
}

.bolt-amt > span:last-child {
  margin-left: 5px;
  font-size: 14px;
  letter-spacing: 0;
}

.odo--bolt {
  --h: 1em;
  align-self: center;
}

/* +00 000 -> +21 000 */
.bq1 { --f: 0; --t: 2; }
.bq2 { --f: 0; --t: 11; }
.bq3,
.bq4,
.bq5 { --f: 0; --t: 10; }

.bolt-took {
  position: relative;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dim);
}

/* Gift link: a chat message, then the card the recipient opens. */
.vis--gift {
  padding: 16px 20px;
}

.bubble {
  display: inline-flex;
  flex-direction: column;
  padding: 8px 14px;
  border-radius: 16px 16px 16px 4px;
  background: var(--surface);
  border: 2px solid var(--border-soft);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-h);
  line-height: 1.35;
}

.bubble-link {
  color: var(--accent-2);
  text-decoration: underline;
  font-weight: 500;
}

.gift-card {
  position: absolute;
  right: 18px;
  bottom: 14px;
  width: 172px;
  padding: 12px 14px 14px;
  border: 2px solid var(--border);
  border-radius: 18px;
  box-shadow: 4px 4px 0 var(--border);
  background: var(--surface);
  text-align: center;
  transform: rotate(-3deg);
}

.gift-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dim);
}

.gift-amount {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-h);
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.gift-amount span {
  font-size: 13px;
  color: var(--text-dim);
}

.gift-btn {
  font-size: 12px;
  padding: 5px 12px;
}

/* @name: handles take turns, each with its profile picture, drawn by the
   app's own avatar code (src/lib/names/avatar.ts) from a sample address. */
.vis--name {
  display: grid;
  place-items: center;
}

.pf {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
}

.pf1 {
  opacity: 1;
}

.pf-avatar {
  display: block;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  margin-bottom: 12px;
}

.pf-handle {
  display: flex;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text-h);
}

.pf-at {
  color: var(--accent-2);
}

.pf-name {
  overflow: hidden;
  white-space: nowrap;
}

.pf-url {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dim);
}

/* ---------- notes: as on the live page (public/learn.css) ---------- */

.notes {
  padding: 96px 0;
  border-top: 2.5px solid var(--border);
  margin-top: 112px;
}

.notes h2 {
  margin-bottom: 32px;
}

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

.note-list li {
  padding: 24px 0 28px;
  border-top: 2.5px solid var(--border);
}

.note-list h3 {
  font-size: 21px;
  margin-bottom: 8px;
}

/* The notes already end with their own padding. */
.notes + .faq {
  padding-top: 0;
}

/* ---------- faq ---------- */

.faq {
  padding-top: 112px;
  padding-bottom: 40px;
}

.faq-list {
  max-width: 780px;
  border-bottom: 2px solid var(--border-soft);
}

.faq-list details {
  border-top: 2px solid var(--border-soft);
}

.faq-list summary {
  position: relative;
  padding: 20px 44px 20px 0;
  list-style: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-h);
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 2.5px solid var(--text-h);
  border-bottom: 2.5px solid var(--text-h);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.3s var(--spring);
}

.faq-list details[open] summary::after {
  transform: translateY(-25%) rotate(-135deg);
}

.faq-list summary:focus-visible {
  outline: 3px solid var(--accent-2);
  outline-offset: 4px;
}

.faq-list details p {
  margin: -4px 0 22px;
  max-width: 36em;
}

.faq-list a {
  text-underline-offset: 3px;
}

/* ---------- end + footer ---------- */

.end {
  padding-top: 120px;
  padding-bottom: 120px;
  text-align: center;
}

.end h2 {
  font-size: clamp(40px, 7vw, 84px);
  letter-spacing: -0.05em;
}

/* Footer as on the live page: the wordmark across the width, links under it. */
.foot {
  overflow: hidden;
  padding-bottom: 40px;
  font-size: 14px;
  color: var(--text-dim);
}

.foot-inner {
  display: flex;
  flex-direction: column;
  padding-top: 28px;
}

.foot .foot-mark {
  align-self: center;
  width: max-content;
  margin: 0 0 0.46em;
  font-size: clamp(80px, 15vw, 210px);
  line-height: 1;
  letter-spacing: -0.045em;
  white-space: nowrap;
  user-select: none;
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
}

/* Contact and legal links stay together on the left; the Ark server credit
   sits on the right and wraps below them as a whole on a narrow screen. */
.foot-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.foot a {
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

.foot a:hover {
  color: var(--text-h);
}

/* ---------- narrower screens ---------- */

@media (max-width: 900px) {
  .hero,
  .tap {
    grid-template-columns: minmax(0, 1fr);
    gap: 56px;
  }

  .hero {
    padding-bottom: 88px;
  }

  /* Phones first: the steps read as a caption under them. */
  .tap-stage {
    order: -1;
  }

}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  .wrap {
    padding-right: max(16px, env(safe-area-inset-right));
    padding-left: max(16px, env(safe-area-inset-left));
  }

  .top-right {
    gap: 14px;
  }

  .foot .foot-mark {
    font-size: 24vw;
  }

  .foot {
    padding-bottom: max(32px, env(safe-area-inset-bottom));
  }

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

  .tap {
    padding-top: 80px;
    padding-bottom: 80px;
  }

  .tap-stage {
    --gap: 16px;
    --apart: 22px;
  }

  .phone--tap {
    border-radius: 30px;
  }

  .layer .mini-pill {
    font-size: 11px;
    padding: 6px 8px;
  }

  .feats,
  .faq {
    padding-top: 88px;
  }

  .notes {
    padding: 64px 0;
    margin-top: 88px;
  }

  .note-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .note-list li {
    padding: 20px 0 24px;
  }

  .note-list h3 {
    font-size: 19px;
  }
}

/* =====================================================================
   Motion. Everything below is off under prefers-reduced-motion; what is
   left is the static state defined above.
   ===================================================================== */

@media (prefers-reduced-motion: no-preference) {
  /* --- page load --- */
  .h-rise > span {
    animation: rise 0.9s var(--out) both;
  }
  .h-rise > span:nth-child(2) {
    animation-delay: 0.08s;
  }
  .h-fade {
    animation: fade-up 0.8s 0.25s var(--out) both;
  }
  .hero-visual {
    animation: phone-in 1.1s 0.15s var(--spring) both;
  }

  /* --- scroll reveal, where the browser can tie it to scroll --- */
  @supports (animation-timeline: view()) {
    .rv {
      animation: fade-up linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 55%;
    }
  }

  /* --- hero: a payment lands (8 s loop) --- */
  .island {
    animation: island 8s infinite;
  }
  .island-in {
    animation: island-in 8s infinite;
  }
  .odo--hero {
    animation: bal-reset 8s infinite;
  }
  .odo--hero .r::before {
    animation: roll-hero 8s infinite;
  }
  .odo--hero .r1::before {
    animation-delay: 0.1s;
  }
  .h-row--new {
    animation: row-in 8s infinite;
  }
  .fiat {
    animation: bal-reset 8s infinite;
  }
  .fiat-a {
    animation: fiat-out 8s infinite;
  }
  .fiat-b {
    animation: fiat-in 8s infinite;
  }
  .h-row--new .h-icon {
    animation: fly-in 8s infinite;
  }

  /* --- tap to pay (10 s loop) --- */
  .phone--a {
    animation: tap-a 10s infinite;
  }
  .phone--b {
    animation: tap-b 10s infinite;
  }
  .bump-ring {
    animation: ring 10s infinite;
  }
  .layer.is-static {
    opacity: 0;
  }
  .s0 { animation: s0 10s infinite; }
  .s1 { animation: s1 10s infinite; }
  .s2 { animation: s2 10s infinite; }
  .s3 { animation: s3 10s infinite; }
  .s4 { animation: s4 10s infinite; }
  .emo span {
    animation: emo 10s infinite;
  }
  .emo span:nth-child(2) {
    animation-delay: 0.1s;
  }
  .emo span:nth-child(3) {
    animation-delay: 0.2s;
  }
  .press1 {
    animation: press1 10s infinite;
  }
  .press2 {
    animation: press2 10s infinite;
  }
  .spin {
    animation: spin 0.8s linear infinite;
  }
  .dots i {
    animation: dot 1s ease-in-out infinite;
  }
  .dots i:nth-child(2) {
    animation-delay: 0.15s;
  }
  .dots i:nth-child(3) {
    animation-delay: 0.3s;
  }
  .check circle {
    animation: draw-ring 10s infinite;
  }
  .check path {
    animation: draw-tick 10s infinite;
  }
  .odo--tap .q::before {
    animation: roll-tap 10s infinite;
  }
  .odo--tap .q3::before {
    animation-delay: 0.06s;
  }
  .odo--tap .q2::before {
    animation-delay: 0.12s;
  }
  .odo--tap .q1::before {
    animation-delay: 0.18s;
  }
  /* One step at a time, in the same place; its underline fills while the
     phones are in that step. */
  .steps {
    display: grid;
  }
  .step {
    grid-area: 1 / 1;
    opacity: 0;
  }
  .st1 { animation: c1 10s infinite; }
  .st2 { animation: c2 10s infinite; }
  .st3 { animation: c3 10s infinite; }
  .st4 { animation: c4 10s infinite; }
  .st1::before { animation: sf1 10s infinite; }
  .st2::before { animation: sf2 10s infinite; }
  .st3::before { animation: sf3 10s infinite; }
  .st4::before { animation: sf4 10s infinite; }

  /* --- feature cards --- */
  .fl {
    animation: field 9s infinite both;
  }
  .fl1 {
    opacity: 0;
  }
  .fl2 {
    animation-delay: 3s;
  }
  .fl3 {
    animation-delay: 6s;
  }
  .fl-txt {
    animation: type 9s infinite both;
  }
  .fl2 .fl-txt {
    animation-delay: 3s;
  }
  .fl3 .fl-txt {
    animation-delay: 6s;
  }
  .chip {
    animation: chip 9s infinite both;
  }
  .fl2 .chip {
    animation-delay: 3s;
  }
  .fl3 .chip {
    animation-delay: 6s;
  }

  .vis--bolt {
    animation: bolt-shake 8s infinite;
  }
  .bolt-g {
    animation: bolt-drop 8s infinite;
  }
  .bolt {
    animation: bolt-glow 8s infinite;
  }
  .sparks i {
    animation: bolt-spark 8s infinite;
  }
  .sparks i:nth-child(even) {
    animation-delay: 0.04s;
  }
  .bolt-amt,
  .bolt-took {
    animation: bolt-text 8s infinite;
  }
  .bolt-took {
    animation-delay: 0.3s;
  }
  .odo--bolt .d::before {
    animation: bolt-roll 8s infinite;
  }
  .odo--bolt .bq4::before {
    animation-delay: 0.05s;
  }
  .odo--bolt .bq3::before {
    animation-delay: 0.1s;
  }
  .odo--bolt .bq2::before {
    animation-delay: 0.15s;
  }
  .odo--bolt .bq1::before {
    animation-delay: 0.2s;
  }

  .bubble {
    animation: bubble 7s infinite;
  }
  .gift-card {
    animation: gift 7s infinite;
  }
  .gift-btn {
    animation: gift-press 7s infinite;
  }

  .pf {
    animation: pf 12s infinite both;
  }
  .pf1 {
    opacity: 0;
  }
  .pf .pf-avatar {
    animation: pf-avatar 12s infinite both;
  }
  .pf .pf-name {
    animation: pf-type 12s infinite both;
  }
  .pf2,
  .pf2 .pf-avatar,
  .pf2 .pf-name {
    animation-delay: 3s;
  }
  .pf3,
  .pf3 .pf-avatar,
  .pf3 .pf-name {
    animation-delay: 6s;
  }
  .pf4,
  .pf4 .pf-avatar,
  .pf4 .pf-name {
    animation-delay: 9s;
  }
}

/* ---------- keyframes ---------- */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(0.4em) rotate(2deg);
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
}

@keyframes phone-in {
  from {
    opacity: 0;
    transform: translateY(60px) rotate(8deg);
  }
}

/* hero, 8 s: 16-21 island opens, 28-46 digits roll, 30-38 row arrives,
   66-71 island closes, 92-99 quiet reset */
@keyframes island {
  0%,
  16% {
    width: 84px;
    height: 24px;
    margin-left: -42px;
    animation-timing-function: var(--spring);
  }
  21%,
  66% {
    width: 196px;
    height: 44px;
    margin-left: -98px;
    animation-timing-function: cubic-bezier(0.5, 0, 0.75, 0);
  }
  71%,
  100% {
    width: 84px;
    height: 24px;
    margin-left: -42px;
  }
}

@keyframes island-in {
  0%,
  19% {
    opacity: 0;
  }
  23%,
  63% {
    opacity: 1;
  }
  67%,
  100% {
    opacity: 0;
  }
}

@keyframes bal-reset {
  0%,
  92% {
    opacity: 1;
  }
  95%,
  98% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes roll-hero {
  0%,
  28% {
    transform: translateY(calc(var(--f) * -1 * var(--h)));
    animation-timing-function: cubic-bezier(0.45, 0, 0.15, 1);
  }
  46%,
  100% {
    transform: translateY(calc(var(--t) * -1 * var(--h)));
  }
}

@keyframes fiat-out {
  0%,
  40% {
    opacity: 1;
  }
  44%,
  100% {
    opacity: 0;
  }
}

@keyframes fiat-in {
  0%,
  40% {
    opacity: 0;
  }
  44%,
  100% {
    opacity: 1;
  }
}

@keyframes row-in {
  0%,
  29% {
    height: 0;
    opacity: 0;
    animation-timing-function: var(--out);
  }
  36%,
  91% {
    height: 58px;
    opacity: 1;
    animation-timing-function: ease-in;
  }
  97%,
  100% {
    height: 0;
    opacity: 0;
  }
}

/* The icon arrives along its own arrow, as in the app (history-icon fly-in). */
@keyframes fly-in {
  0%,
  31% {
    transform: translate(-16px, -16px) scale(0.6);
    opacity: 0;
    animation-timing-function: var(--spring);
  }
  38%,
  100% {
    transform: none;
    opacity: 1;
  }
}

/* tap to pay, 10 s. 0-10 apart, 19 contact, 21 recoil, 26 settled,
   26-43 paired, 44-57 amount, 58-65 sending, 66-93 done, 94-100 apart. */
@keyframes tap-a {
  0%,
  10% {
    transform: translateX(calc(var(--apart) * -1)) rotate(-7deg);
    animation-timing-function: cubic-bezier(0.55, 0, 0.9, 0.4);
  }
  19% {
    transform: translateX(calc(var(--gap) / 2)) rotate(0);
    animation-timing-function: ease-out;
  }
  21.5% {
    transform: translateX(-6px) rotate(-1deg);
    animation-timing-function: var(--spring);
  }
  27%,
  91% {
    transform: translateX(0) rotate(0);
    animation-timing-function: var(--out);
  }
  100% {
    transform: translateX(calc(var(--apart) * -1)) rotate(-7deg);
  }
}

@keyframes tap-b {
  0%,
  10% {
    transform: translateX(var(--apart)) rotate(7deg);
    animation-timing-function: cubic-bezier(0.55, 0, 0.9, 0.4);
  }
  19% {
    transform: translateX(calc(var(--gap) / -2)) rotate(0);
    animation-timing-function: ease-out;
  }
  21.5% {
    transform: translateX(6px) rotate(1deg);
    animation-timing-function: var(--spring);
  }
  27%,
  91% {
    transform: translateX(0) rotate(0);
    animation-timing-function: var(--out);
  }
  100% {
    transform: translateX(var(--apart)) rotate(7deg);
  }
}

@keyframes ring {
  0%,
  18.9% {
    opacity: 0;
    transform: scale(0.2);
  }
  19% {
    opacity: 1;
    transform: scale(0.25);
    animation-timing-function: var(--out);
  }
  30%,
  100% {
    opacity: 0;
    transform: scale(2.6);
  }
}

@keyframes s0 {
  0%,
  22% {
    opacity: 1;
    transform: none;
  }
  25%,
  94% {
    opacity: 0;
    transform: scale(0.94);
  }
  98%,
  100% {
    opacity: 1;
    transform: none;
  }
}

@keyframes s1 {
  0%,
  24% {
    opacity: 0;
    transform: translateY(14px);
  }
  27%,
  42% {
    opacity: 1;
    transform: none;
  }
  44%,
  100% {
    opacity: 0;
    transform: translateY(-14px);
  }
}

@keyframes s2 {
  0%,
  43% {
    opacity: 0;
    transform: translateY(14px);
  }
  46%,
  56% {
    opacity: 1;
    transform: none;
  }
  58%,
  100% {
    opacity: 0;
    transform: translateY(-14px);
  }
}

@keyframes s3 {
  0%,
  57% {
    opacity: 0;
    transform: translateY(14px);
  }
  60%,
  64% {
    opacity: 1;
    transform: none;
  }
  66%,
  100% {
    opacity: 0;
    transform: translateY(-14px);
  }
}

@keyframes s4 {
  0%,
  65% {
    opacity: 0;
    transform: translateY(14px);
  }
  68%,
  91% {
    opacity: 1;
    transform: none;
  }
  95%,
  100% {
    opacity: 0;
  }
}

@keyframes emo {
  0%,
  26% {
    transform: scale(0);
  }
  29% {
    transform: scale(1.25);
  }
  31%,
  100% {
    transform: scale(1);
  }
}

@keyframes press1 {
  0%,
  38% {
    transform: none;
    box-shadow: 2.5px 2.5px 0 var(--border);
  }
  39.5% {
    transform: translate(2.5px, 2.5px) scale(0.97);
    box-shadow: 0 0 0 var(--border);
  }
  41.5%,
  100% {
    transform: none;
    box-shadow: 2.5px 2.5px 0 var(--border);
  }
}

@keyframes press2 {
  0%,
  53% {
    transform: none;
    box-shadow: 2.5px 2.5px 0 var(--border);
  }
  54.5% {
    transform: translate(2.5px, 2.5px) scale(0.97);
    box-shadow: 0 0 0 var(--border);
  }
  56.5%,
  100% {
    transform: none;
    box-shadow: 2.5px 2.5px 0 var(--border);
  }
}

@keyframes spin {
  to {
    transform: rotate(1turn);
  }
}

@keyframes dot {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  40% {
    transform: translateY(-7px);
    opacity: 1;
  }
}

@keyframes draw-ring {
  0%,
  66% {
    stroke-dashoffset: 145;
    animation-timing-function: var(--out);
  }
  72%,
  100% {
    stroke-dashoffset: 0;
  }
}

@keyframes draw-tick {
  0%,
  70% {
    stroke-dashoffset: 34;
    animation-timing-function: var(--out);
  }
  75%,
  100% {
    stroke-dashoffset: 0;
  }
}

@keyframes roll-tap {
  0%,
  68% {
    transform: translateY(calc(var(--f) * -1 * var(--h)));
    animation-timing-function: cubic-bezier(0.45, 0, 0.15, 1);
  }
  82%,
  100% {
    transform: translateY(calc(var(--t) * -1 * var(--h)));
  }
}

/* Each step's underline fills across its own window. */
@keyframes sf1 {
  0%,
  2% {
    transform: scaleX(0);
  }
  22%,
  100% {
    transform: scaleX(1);
  }
}

@keyframes sf2 {
  0%,
  27% {
    transform: scaleX(0);
  }
  42%,
  100% {
    transform: scaleX(1);
  }
}

@keyframes sf3 {
  0%,
  46% {
    transform: scaleX(0);
  }
  63%,
  100% {
    transform: scaleX(1);
  }
}

@keyframes sf4 {
  0%,
  68% {
    transform: scaleX(0);
  }
  90%,
  100% {
    transform: scaleX(1);
  }
}

/* Steps, in step with the phones: tap, paired, amount, done. */
@keyframes c1 {
  0%,
  0% {
    opacity: 0;
    transform: translateY(0.6em);
    animation-timing-function: var(--out);
  }
  3%,
  22% {
    opacity: 1;
    transform: none;
    animation-timing-function: ease-in;
  }
  25%,
  100% {
    opacity: 0;
    transform: translateY(-0.6em);
  }
}

@keyframes c2 {
  0%,
  25% {
    opacity: 0;
    transform: translateY(0.6em);
    animation-timing-function: var(--out);
  }
  28%,
  42% {
    opacity: 1;
    transform: none;
    animation-timing-function: ease-in;
  }
  45%,
  100% {
    opacity: 0;
    transform: translateY(-0.6em);
  }
}

@keyframes c3 {
  0%,
  44% {
    opacity: 0;
    transform: translateY(0.6em);
    animation-timing-function: var(--out);
  }
  47%,
  63% {
    opacity: 1;
    transform: none;
    animation-timing-function: ease-in;
  }
  66%,
  100% {
    opacity: 0;
    transform: translateY(-0.6em);
  }
}

@keyframes c4 {
  0%,
  66% {
    opacity: 0;
    transform: translateY(0.6em);
    animation-timing-function: var(--out);
  }
  69%,
  92% {
    opacity: 1;
    transform: none;
    animation-timing-function: ease-in;
  }
  96%,
  100% {
    opacity: 0;
    transform: translateY(-0.6em);
  }
}


/* pay anything, 9 s: each line owns one third */
@keyframes field {
  0% {
    opacity: 0;
  }
  1%,
  31% {
    opacity: 1;
  }
  33.3%,
  100% {
    opacity: 0;
  }
}

@keyframes type {
  0%,
  1% {
    max-width: 0;
    animation-timing-function: steps(16, end);
  }
  14%,
  100% {
    max-width: 100%;
  }
}

@keyframes chip {
  0%,
  15% {
    opacity: 0;
    transform: translateY(6px) scale(0.8);
  }
  17%,
  100% {
    opacity: 1;
    transform: none;
    animation-timing-function: var(--spring);
  }
}

/* speed, 8 s (1 % = 80 ms): 5-9 drop, 9 impact, 16-32 amount rolls,
   hold, 92-98 quiet reset. Every property is pinned in each keyframe so
   nothing drifts between them. */
@keyframes bolt-drop {
  0%,
  5% {
    transform: translateY(-140%) scale(0.7, 1.5);
    opacity: 0;
    filter: blur(3px);
    animation-timing-function: cubic-bezier(0.6, 0, 1, 0.6);
  }
  9% {
    transform: translateY(0) scale(1.18, 0.78);
    opacity: 1;
    filter: blur(0);
    animation-timing-function: var(--out);
  }
  12% {
    transform: scale(0.94, 1.1);
    opacity: 1;
    filter: blur(0);
    animation-timing-function: var(--spring);
  }
  17%,
  92% {
    transform: none;
    opacity: 1;
    filter: blur(0);
  }
  98%,
  100% {
    transform: scale(0.85);
    opacity: 0;
    filter: blur(0);
  }
}

@keyframes bolt-glow {
  0%,
  8.9% {
    filter: none;
  }
  9% {
    filter: brightness(1.4);
    animation-timing-function: var(--out);
  }
  30%,
  100% {
    filter: none;
  }
}

@keyframes bolt-shake {
  0%,
  9% {
    transform: none;
  }
  10% {
    transform: translate(-3px, 2px);
  }
  11% {
    transform: translate(3px, -2px);
  }
  12% {
    transform: translate(-2px, -1px);
  }
  13% {
    transform: translate(1px, 1px);
  }
  14%,
  100% {
    transform: none;
  }
}

@keyframes bolt-spark {
  0%,
  8.9% {
    opacity: 0;
    transform: translate(0, 0) scale(1);
  }
  9% {
    opacity: 1;
    transform: translate(0, 0) scale(1.4);
    animation-timing-function: cubic-bezier(0.1, 0.8, 0.3, 1);
  }
  22%,
  100% {
    opacity: 0;
    transform: translate(var(--x), var(--y)) scale(0.3);
  }
}

@keyframes bolt-text {
  0%,
  14% {
    opacity: 0;
    transform: translateY(14px);
    animation-timing-function: var(--spring);
  }
  20%,
  92% {
    opacity: 1;
    transform: none;
  }
  98%,
  100% {
    opacity: 0;
    transform: none;
  }
}

@keyframes bolt-roll {
  0%,
  15% {
    transform: translateY(calc(var(--f) * -1 * var(--h)));
    animation-timing-function: cubic-bezier(0.45, 0, 0.15, 1);
  }
  32%,
  100% {
    transform: translateY(calc(var(--t) * -1 * var(--h)));
  }
}

/* gift, 7 s */
@keyframes bubble {
  0% {
    opacity: 0;
    transform: translateY(14px);
  }
  6%,
  90% {
    opacity: 1;
    transform: none;
  }
  97%,
  100% {
    opacity: 0;
  }
}

@keyframes gift {
  0%,
  20% {
    opacity: 0;
    transform: translateY(70px) rotate(6deg);
    animation-timing-function: var(--spring);
  }
  30%,
  90% {
    opacity: 1;
    transform: rotate(-3deg);
  }
  97%,
  100% {
    opacity: 0;
    transform: rotate(-3deg);
  }
}

@keyframes gift-press {
  0%,
  52% {
    transform: none;
    box-shadow: 2.5px 2.5px 0 var(--border);
  }
  54% {
    transform: translate(2.5px, 2.5px) scale(0.96);
    box-shadow: 0 0 0 var(--border);
  }
  57%,
  100% {
    transform: none;
    box-shadow: 2.5px 2.5px 0 var(--border);
  }
}

/* @name, 12 s: each handle owns a quarter */
@keyframes pf {
  0% {
    opacity: 0;
  }
  1.5%,
  22.5% {
    opacity: 1;
  }
  25%,
  100% {
    opacity: 0;
  }
}

@keyframes pf-avatar {
  0% {
    transform: scale(0.5) rotate(-20deg);
    animation-timing-function: var(--spring);
  }
  5%,
  100% {
    transform: none;
  }
}

@keyframes pf-type {
  0%,
  3% {
    max-width: 0;
    animation-timing-function: steps(7, end);
  }
  11%,
  100% {
    max-width: 7ch;
  }
}
