/* My Bubble — site styles.
   Tokens from the app (ios/MyBubble/Design/Tokens.swift). Candy is fill, text is
   ink or paper. One gradient only: the shimmer, used on the time ring and the pop.
   Type is SF Pro Rounded on Apple devices (ui-rounded); Nunito, self-hosted, elsewhere. */

@font-face {
  font-family: "Nunito";
  src: url("assets/fonts/nunito-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
  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;
}

@property --hole {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 0%;
}

:root {
  --ink: #2B2140;
  --paper: #FFFDF7;
  --bubblegum: #FF7BAC;
  --sky: #4FC3F7;
  --mint: #6EE7B7;
  --lemon: #FFD65C;
  --grape: #A78BFA;
  --ink-soft: #6B6280;
  --paper-soft: #B9B0CC;
  --ink-raised: #3A2E55;
  --shimmer: #FFB3D9, #7EE8E0, #C3B1F5, #FFD873, #FFB3D9;

  --font: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, -apple-system, sans-serif;
  --stroke: 3px;
  --stroke-hero: 4px;
  --r-card: 24px;
  --margin: clamp(20px, 5vw, 56px);
  --wide: 1200px;

  /* one crescent highlight, top-left, for CSS-drawn bubbles */
  --glint: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M25.27 41.97A26 26 0 0 1 41.11 25.57' fill='none' stroke='white' stroke-opacity='.9' stroke-width='5.5' stroke-linecap='round'/%3E%3C/svg%3E");

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: .2em; }
a:hover { text-decoration-color: var(--bubblegum); text-decoration-thickness: 4px; }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; border-radius: 6px; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

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

.site-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  max-width: var(--wide); margin: 0 auto; padding: 20px var(--margin);
}
.brand {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px;
  text-decoration: none; border-radius: 12px;
}
.brand-wordmark { width: 148px; height: auto; }
.brand-wand { width: 48px; height: 48px; }

.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px;
  border: var(--stroke) solid var(--ink); border-radius: 999px;
  background: var(--paper); color: var(--ink);
  font-weight: 700; font-size: 1.0625rem; line-height: 1; text-decoration: none;
  transition: transform .2s ease-out;
}
.pill:hover { text-decoration: none; transform: translateY(-2px); }
.pill-candy { background: var(--lemon); }

/* ---------------------------------------------------------------- footer */

.site-foot {
  margin-top: 0;
  padding: 40px 0 48px;
  border-top: var(--stroke) solid var(--ink);
  background: var(--paper);
}
.site-foot-inner {
  max-width: var(--wide); margin: 0 auto; padding: 0 var(--margin);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px;
}
.site-foot ul {
  display: flex; flex-wrap: wrap; gap: 4px 8px;
  list-style: none; margin: 0 0 0 -12px; padding: 0;
}
.site-foot li a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px;
  font-weight: 700; font-size: 1.0625rem;
}
.site-foot li a[aria-current="page"] { text-decoration-color: var(--bubblegum); text-decoration-thickness: 4px; }
.site-foot small { font-size: 0.9375rem; color: var(--ink-soft); }

/* ---------------------------------------------------------------- legal pages */

body:not(.home) main {
  max-width: 42rem; margin: 0 auto; padding: 24px var(--margin) 80px;
  font-size: 1.125rem; line-height: 1.6;
}
body:not(.home) main h2 {
  margin: 2.2em 0 .5em; font-size: 1.625rem; font-weight: 800; line-height: 1.2; letter-spacing: -.01em;
}
body:not(.home) main > p:first-child {
  display: inline-block; margin: 0 0 1.25em; padding: 6px 14px;
  border: var(--stroke) solid var(--ink); border-radius: 999px; background: var(--mint);
  font-size: 0.9375rem; font-weight: 700;
}
body:not(.home) main ul { padding-left: 1.25em; }
body:not(.home) main li { margin: .35em 0; }
body:not(.home) main li::marker { color: var(--ink); }
body:not(.home) main a { font-weight: 700; overflow-wrap: anywhere; }

/* ================================================================ landing */

.home .wrap { max-width: var(--wide); margin: 0 auto; padding: 0 var(--margin); }

/* the CSS-drawn bubble: candy fill, ink outline, one glint */
.bub {
  position: absolute; border-radius: 50%;
  border: var(--stroke-hero) solid var(--ink);
  background: var(--glint) center / 100% no-repeat, var(--fill, var(--sky));
}
.bub.s { border-width: var(--stroke); }

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

.hero { position: relative; overflow: clip; padding-bottom: 72px; }
.hero-inner {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center; gap: 24px;
  max-width: var(--wide); margin: 0 auto; padding: 8px var(--margin) 0;
  min-height: min(720px, calc(100svh - 100px));
}
.hero-copy { position: relative; z-index: 2; padding: 24px 0; }
.hero h1 { margin: 0; }
.hero-wordmark { width: min(100%, 620px); height: auto; overflow: visible; }
.tagline {
  margin: 28px 0 0; max-width: 15ch;
  font-size: clamp(2rem, 1.2rem + 3.2vw, 3.5rem); font-weight: 800; line-height: 1.04; letter-spacing: -.025em;
  text-wrap: balance;
}
/* Apple badge: unaltered, 56px tall, clear space well over a quarter of its height */
.store { display: inline-block; margin: 40px 0 0; padding: 0; border-radius: 10px; }
.store img { width: auto; height: 56px; }
.store:focus-visible { outline-offset: 6px; }

.hero-art { position: relative; height: 640px; }
.hero-art .bub.big { --fill: var(--lemon); width: 560px; height: 560px; right: -170px; top: 30px; }
.hero-art .bub.mid { --fill: var(--mint); width: 150px; height: 150px; left: 0; bottom: 30px; }
.hero-art .bub.b1 { --fill: var(--sky); width: 64px; height: 64px; left: 40px; top: 70px; border-width: var(--stroke); }
.hero-art .bub.b2 { --fill: var(--bubblegum); width: 28px; height: 28px; left: 120px; top: 30px; border-width: var(--stroke); }
.hero-art .bub.b3 { --fill: var(--grape); width: 36px; height: 36px; right: 30px; bottom: 10px; border-width: var(--stroke); }

.phone {
  position: absolute; left: 50%; top: 50%;
  width: 300px; aspect-ratio: 393 / 852;
  margin: calc(300px * -852 / 393 / 2) 0 0 -150px;
  padding: 11px;
  background: var(--grape);
  border: var(--stroke-hero) solid var(--ink);
  border-radius: 52px;
  transform: rotate(5deg);
}
.phone::before { /* the case's glint */
  content: ""; position: absolute; left: -2px; top: 40px; width: 4px; height: 70px;
  border-radius: 4px; background: var(--ink);
}
.phone-screen {
  width: 100%; height: 100%; overflow: hidden;
  border: var(--stroke) solid var(--ink); border-radius: 40px; background: var(--paper);
}
.phone-screen svg { width: 100%; height: 100%; }
.art text, .phone-screen text, .pop text { font-family: var(--font); }

/* ---------------------------------------------------------------- how it works */

.points { position: relative; padding: 56px 0 120px; }
.section-title {
  margin: 0 0 56px; font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem); font-weight: 800;
  line-height: 1.05; letter-spacing: -.02em;
}
.cards {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; align-items: start;
}
.card {
  position: relative; display: flex; flex-direction: column;
  padding: 28px 28px 32px;
  border: var(--stroke) solid var(--ink); border-radius: var(--r-card);
  background: var(--fill, var(--paper));
  transform: rotate(var(--tilt, 0deg)) translateY(var(--drop, 0));
  transition: transform .5s cubic-bezier(.34, 1.56, .64, 1);
}
.card:hover { transform: rotate(0deg) translateY(var(--drop, 0)); }
.card-sky { --fill: var(--sky); --tilt: -1.6deg; }
.card-paper { --fill: var(--paper); --tilt: 1.2deg; --drop: 56px; }
.card-lemon { --fill: var(--lemon); --tilt: -1deg; }
.card h3 {
  order: 1; margin: 24px 0 8px;
  font-size: 1.75rem; font-weight: 800; line-height: 1.12; letter-spacing: -.015em; text-wrap: balance;
}
.card p { order: 2; margin: 0; font-size: 1.25rem; line-height: 1.4; }
.card-art { order: 0; position: relative; min-height: 290px; display: grid; place-items: center; }

/* card 1: two people, one code */
.scan-phone {
  position: relative; width: 158px; aspect-ratio: 9 / 16;
  padding: 26px 16px 16px;
  background: var(--paper); border: var(--stroke) solid var(--ink); border-radius: 30px;
  transform: rotate(-5deg);
}
.scan-phone::before {
  content: ""; position: absolute; top: 9px; left: 50%; width: 46px; height: 12px; margin-left: -23px;
  border-radius: 8px; background: var(--ink);
}
.scan-phone svg { width: 100%; height: auto; margin-top: 18px; overflow: visible; }
.scan-face { position: absolute; width: 92px; bottom: 6px; }
.scan-face svg { width: 100%; height: auto; overflow: visible; }
.scan-face.a { left: calc(50% - 150px); transform: rotate(-8deg); }
.scan-face.b { right: calc(50% - 150px); transform: rotate(7deg); }

/* card 3: a quiet chat, no ticks, no counts */
.chat { width: 100%; max-width: 300px; display: flex; flex-direction: column; gap: 12px; }
.msg { display: flex; align-items: flex-end; gap: 8px; }
.msg.me { justify-content: flex-end; }
.msg .who { width: 40px; flex: none; }
.msg .who svg { width: 40px; height: 40px; overflow: visible; }
.blob {
  margin: 0; padding: 10px 18px;
  border: var(--stroke) solid var(--ink); border-radius: 28px;
  background: var(--fill); font-size: 1.125rem; font-weight: 600; line-height: 1.25;
}
.msg:not(.me) .blob { border-bottom-left-radius: 10px; }
.msg.me .blob { border-bottom-right-radius: 10px; }
.chat .stamp { align-self: center; font-size: .9375rem; font-weight: 600; color: var(--ink); }

/* card 2: the pop */
.pop { position: relative; width: 100%; display: grid; justify-items: center; }
.pop-input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.pop-label { display: grid; justify-items: center; gap: 10px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.pop-stage {
  position: relative; display: block; width: min(250px, 72vw); aspect-ratio: 1;
  border-radius: 50%; transition: transform .26s cubic-bezier(.34, 1.56, .64, 1);
}
.pop-label:active .pop-stage { transform: scale(.94); }
.pop-input:focus-visible + .pop-label .pop-stage { outline: 3px solid var(--ink); outline-offset: 2px; }
.pop-film { position: absolute; inset: 0; }
.pop-film svg { width: 100%; height: 100%; overflow: visible; }

/* the time ring: shimmer, trimmed to what's left, clockwise from the top */
.pop-ring, .pop-burst {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, var(--shimmer));
}
.pop-ring {
  -webkit-mask: radial-gradient(closest-side, transparent 90.6%, #000 91%, #000 94.6%, transparent 95%), conic-gradient(#000 0 62%, transparent 0);
  -webkit-mask-composite: source-in;
  mask: radial-gradient(closest-side, transparent 90.6%, #000 91%, #000 94.6%, transparent 95%) intersect, conic-gradient(#000 0 62%, transparent 0);
}
.pop-tip { /* the droplet at the end of the ring */
  position: absolute; width: 5%; aspect-ratio: 1; border-radius: 50%;
  left: calc(50% + 46.3% * -0.6845); top: calc(50% - 46.3% * -0.7290);
  transform: translate(-50%, -50%); background: #F3D18A;
}
.pop-burst {
  opacity: 0;
  -webkit-mask: radial-gradient(closest-side, transparent 84%, #000 84.5%, #000 88.5%, transparent 89%);
  mask: radial-gradient(closest-side, transparent 84%, #000 84.5%, #000 88.5%, transparent 89%);
}
.pop-drop {
  position: absolute; left: 50%; top: 92%; width: 3.4%; aspect-ratio: 1; margin-left: -1.7%;
  border-radius: 50%; background: var(--c, #7EE8E0); opacity: 0;
}
.pop-ripple {
  position: absolute; left: 50%; top: 104%; width: 48%; height: 9%;
  border: 3px solid var(--ink); border-radius: 50%;
  transform: translate(-50%, -50%) scale(0); opacity: 0;
}
.pop-hint { font-size: 1rem; font-weight: 700; padding: 8px 16px; margin-top: 18px; border: var(--stroke) solid var(--ink); border-radius: 999px; background: var(--lemon); min-height: 44px; display: inline-flex; align-items: center; }
.pop-hint-off { display: none; background: var(--paper); }
.pop-input:checked + .pop-label .pop-hint-on { display: none; }
.pop-input:checked + .pop-label .pop-hint-off { display: inline-flex; }

/* popped, at rest: empty paper and a ripple's ghost */
.pop-input:checked + .pop-label :is(.pop-film, .pop-ring, .pop-tip) { opacity: 0; }
.pop-input:checked + .pop-label .pop-ripple { opacity: .3; transform: translate(-50%, -50%) scale(1); }

/* ---------------------------------------------------------------- grown-ups */

.grown {
  position: relative; background: var(--ink); color: var(--paper);
  padding: 120px 0 128px; margin-top: 40px;
}
.grown::before { /* a row of suds along the top edge */
  content: ""; position: absolute; left: 0; right: 0; top: -27px; height: 28px;
  background: radial-gradient(circle at 50% 100%, var(--ink) 27px, transparent 28px) 0 0 / 56px 28px repeat-x;
}
.grown-inner { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px 72px; align-items: start; }
.grown h2 { margin: 0; font-size: clamp(2.25rem, 1.4rem + 3vw, 3.75rem); font-weight: 800; line-height: 1; letter-spacing: -.025em; text-wrap: balance; }
.grown-lede { margin: 20px 0 32px; max-width: 26ch; color: var(--paper-soft); font-size: 1.25rem; line-height: 1.4; }
.grown .pill { margin-top: 32px; background: var(--ink); color: var(--paper); border-color: var(--paper); }
.grown .pill:focus-visible, .grown a:focus-visible { outline-color: var(--paper); }
.grown-faces { position: relative; height: 150px; margin-top: 56px; }
.grown-faces span { position: absolute; display: block; }
.grown-faces svg { width: 100%; height: auto; overflow: visible; }
.safe-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px; }
.safe-list li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 20px; align-items: start; }
.safe-list p { margin: 0; padding-top: 6px; font-size: 1.375rem; line-height: 1.4; font-weight: 600; text-wrap: pretty; }
.safe-list .sub { display: block; margin-top: 4px; font-size: 1.0625rem; font-weight: 500; color: var(--paper-soft); }
.glyph {
  width: 64px; height: 64px; display: grid; place-items: center;
  border: var(--stroke) solid var(--ink); border-radius: 50%;
  box-shadow: 0 0 0 3px var(--paper); /* the dark-mode sticker offset */
  background: var(--fill);
  color: var(--ink);
}
.glyph svg { width: 30px; height: 30px; }

/* ---------------------------------------------------------------- closing */

.closing { position: relative; overflow: clip; padding: 120px 0 112px; text-align: center; }
.closing-wand { width: 200px; height: 200px; margin: 0 auto 24px; transform: rotate(-8deg); overflow: visible; }
.closing h2 { margin: 0 auto; max-width: 14ch; font-size: clamp(2.25rem, 1.4rem + 3.4vw, 4rem); font-weight: 800; line-height: 1; letter-spacing: -.025em; text-wrap: balance; }
.closing .store { margin-top: 36px; }
.closing .bub.c1 { --fill: var(--mint); width: 90px; height: 90px; left: 8%; top: 22%; }
.closing .bub.c2 { --fill: var(--bubblegum); width: 40px; height: 40px; left: 16%; top: 62%; border-width: var(--stroke); }
.closing .bub.c3 { --fill: var(--sky); width: 130px; height: 130px; right: 6%; top: 46%; }
.closing .bub.c4 { --fill: var(--grape); width: 28px; height: 28px; right: 18%; top: 18%; border-width: var(--stroke); }

/* ---------------------------------------------------------------- responsive */

@media (max-width: 1080px) {
  .cards { grid-template-columns: minmax(0, 1fr); max-width: 520px; margin: 0 auto; gap: 40px; }
  .card-paper { --drop: 0px; }
  .grown-inner { grid-template-columns: minmax(0, 1fr); }
  .grown-faces { display: none; }
}

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr); min-height: 0; gap: 0; }
  .hero-copy { padding: 8px 0 0; }
  .hero-art { height: 560px; margin: 8px calc(var(--margin) * -1) 0; }
  .phone { width: 248px; margin: calc(248px * -852 / 393 / 2) 0 0 -124px; border-radius: 44px; padding: 9px; }
  .phone-screen { border-radius: 34px; }
  .hero-art .bub.big { width: 400px; height: 400px; right: -150px; top: 40px; }
  .hero-art .bub.mid { width: 110px; height: 110px; left: 12px; bottom: 36px; }
  .hero-art .bub.b1 { left: 24px; top: 40px; width: 52px; height: 52px; }
  .hero-art .bub.b2 { left: 86px; top: 8px; }
  .hero-art .bub.b3 { right: 24px; bottom: 6px; }
  .points { padding-top: 24px; }
  .closing { padding-top: 96px; }
  .closing .bub.c1 { width: 72px; height: 72px; left: -18px; top: 64px; }
  .closing .bub.c2 { left: 8%; top: 236px; }
  .closing .bub.c3 { width: 96px; height: 96px; right: -34px; top: 150px; }
  .closing .bub.c4 { right: 20%; top: 56px; }
}

@media (max-width: 480px) {
  .site-head { padding-top: 14px; padding-bottom: 6px; }
  .pill { padding: 0 16px; font-size: 1rem; }
  .store img { height: 52px; }
  .hero-art { height: 500px; }
  .phone { width: 220px; margin: calc(220px * -852 / 393 / 2) 0 0 -110px; border-radius: 40px; padding: 8px; }
  .phone-screen { border-radius: 31px; }
  .card { padding: 22px 20px 26px; }
  .card h3 { font-size: 1.5rem; }
  .card p { font-size: 1.125rem; }
  .card-art { min-height: 260px; }
  .scan-face { width: 76px; }
  .scan-face.a { left: calc(50% - 128px); }
  .scan-face.b { right: calc(50% - 128px); }
  .scan-phone { width: 140px; }
  .safe-list li { grid-template-columns: 52px minmax(0, 1fr); gap: 16px; }
  .glyph { width: 52px; height: 52px; }
  .glyph svg { width: 26px; height: 26px; }
  .safe-list p { font-size: 1.1875rem; padding-top: 2px; }
  .closing-wand { width: 160px; height: 160px; }
}

@media (max-width: 359px) {
  .tagline { font-size: 1.875rem; }
  .scan-face { width: 64px; }
  .scan-face.a { left: 0; }
  .scan-face.b { right: 0; }
  .scan-phone { width: 128px; }
  .chat .blob { font-size: 1rem; padding: 8px 14px; }
}

/* ---------------------------------------------------------------- motion
   Everything is still unless the visitor is fine with motion. The pop is the
   one spectacle: 1.4 s, the app's own storyboard (design-system.md §6). */

@media (prefers-reduced-motion: no-preference) {
  .hero-wordmark { animation: squash .7s cubic-bezier(.34, 1.56, .64, 1) both; transform-origin: 50% 80%; }
  .tagline { animation: rise .6s .12s cubic-bezier(.2, .8, .2, 1) both; }
  .hero .store { animation: rise .6s .22s cubic-bezier(.2, .8, .2, 1) both; }
  .phone { animation: phone-in .9s .25s cubic-bezier(.34, 1.4, .64, 1) both; }
  .hero-art .bub { animation: blow .7s cubic-bezier(.34, 1.56, .64, 1) both, float 3s ease-in-out infinite alternate; }
  .hero-art .bub.big { animation-delay: .35s, 1.1s; }
  .hero-art .bub.mid { animation-delay: .55s, 1.9s; }
  .hero-art .bub.b1  { animation-delay: .65s, 1.4s; }
  .hero-art .bub.b2  { animation-delay: .75s, 2.3s; }
  .hero-art .bub.b3  { animation-delay: .85s, 1.7s; }
  .closing .bub { animation: float 3.2s ease-in-out infinite alternate; }
  .closing .bub.c2 { animation-delay: -1.1s; }
  .closing .bub.c3 { animation-delay: -2s; }
  .closing .bub.c4 { animation-delay: -.6s; }

  /* the pop */
  .pop-input:checked + .pop-label .pop-film {
    animation: film-pop 1.4s linear both;
    -webkit-mask: radial-gradient(circle at 50% 5%, transparent var(--hole), #000 calc(var(--hole) + .6%));
    mask: radial-gradient(circle at 50% 5%, transparent var(--hole), #000 calc(var(--hole) + .6%));
  }
  .pop-input:checked + .pop-label :is(.pop-ring, .pop-tip) { animation: ring-out 1.4s linear both; }
  .pop-input:checked + .pop-label .pop-burst { animation: burst 1.4s linear both; }
  .pop-input:checked + .pop-label .pop-drop { animation: drop 1.4s linear both; }
  .pop-input:checked + .pop-label .pop-ripple { animation: ripple 1.4s linear both; }
  .pop-input:checked + .pop-label .pop-hint-off { animation: rise .4s 1.3s ease-out both; }
  /* blow a new one */
  .pop-input:not(:checked) + .pop-label .pop-film { animation: blow .7s cubic-bezier(.34, 1.56, .64, 1) both; }
  .pop-input:not(:checked) + .pop-label :is(.pop-ring, .pop-tip) { animation: fade-in .4s .5s ease-out both; }
}

@media (prefers-reduced-motion: reduce) {
  .pop-film, .pop-ring, .pop-tip, .pop-ripple { transition: opacity .2s ease-out; }
  .pop-input:checked + .pop-label :is(.pop-film, .pop-ring, .pop-tip, .pop-ripple) { transition: opacity .6s ease-in-out; }
  .card, .pill, .pop-stage { transition: none; }
  .card:hover { transform: rotate(var(--tilt, 0deg)) translateY(var(--drop, 0)); }
}

@keyframes squash { 0% { transform: scale(.92); opacity: 0; } 45% { transform: scale(1.04); opacity: 1; } 100% { transform: scale(1); } }
@keyframes rise { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes blow { 0% { transform: scale(.15); opacity: 0; } 30% { opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
@keyframes float { from { translate: 0 -4px; } to { translate: 0 4px; } }
@keyframes phone-in { from { transform: translateY(60px) rotate(14deg); opacity: 0; } 40% { opacity: 1; } to { transform: rotate(5deg); opacity: 1; } }

/* 0–300 film thins and wobbles · 300–500 a hole opens at the top · 500–800 film
   retracts to a shimmer rim · 800–1100 the rim fades, six droplets fall ·
   1100–1400 one lands, a ripple · then empty paper */
@keyframes film-pop {
  0%    { transform: scale(1); opacity: 1; --hole: 0%; }
  7%    { transform: scale(1.035, .97); }
  14%   { transform: scale(.975, 1.025); }
  21.4% { transform: scale(1.01, .99); opacity: .6; --hole: 0%; }
  35.7% { transform: scale(1); opacity: .55; --hole: 17%; }
  57.1% { transform: scale(1.03); opacity: 0; --hole: 110%; }
  100%  { transform: scale(1.03); opacity: 0; --hole: 110%; }
}
@keyframes ring-out { 0%, 21.4% { opacity: 1; } 32% { opacity: 0; } 100% { opacity: 0; } }
@keyframes burst {
  0%, 35.7% { opacity: 0; transform: scale(.97); }
  45%       { opacity: 1; transform: scale(1); }
  57.1%     { opacity: 1; transform: scale(1.015); }
  78.6%     { opacity: 0; transform: scale(1.05); }
  100%      { opacity: 0; }
}
@keyframes drop {
  0%, 57.1% { opacity: 0; transform: translate(calc(var(--dx) * .25px), -8px); animation-timing-function: cubic-bezier(.55, 0, 1, .45); }
  58%       { opacity: 1; }
  78.6%     { opacity: 1; transform: translate(calc(var(--dx) * 1px), var(--fall, 42px)); }
  84%, 100% { opacity: 0; transform: translate(calc(var(--dx) * 1px), var(--fall, 42px)); }
}
@keyframes ripple {
  0%, 78.6% { opacity: 0; transform: translate(-50%, -50%) scale(.05, .3); }
  79%       { opacity: .6; }
  100%      { opacity: 0; transform: translate(-50%, -50%) scale(1); }
}
