/* BimBoom coming-soon page. Mobile-first. Palette: black / red / yellow / cream.
   Motion: html[data-motion="full"] (set by assets/motion.js for everyone) = comic slam intro + pop-ins, plus the
   LIVE WALLPAPER at the end of this file, which moves constantly and therefore has a Pause button. */
@font-face {
  font-family: "Bangers";
  src: url("/assets/fonts/bangers.woff2") format("woff2");
  font-display: swap;
}

:root {
  --black: #0b0b0c;
  --ink: #16161a;
  --red: #e4261c;
  --red-bright: #ff4a3d;
  --yellow: #ffc61a;
  --cream: #fff5dc;
  --muted: #d8cfbf;
  --line: #2c2a26;
  --radius: 14px;
  --display: "Bangers", "Impact", "Arial Black", sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --pop: cubic-bezier(0.2, 1.45, 0.45, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--black); color: var(--cream); }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.55;
  background:
    radial-gradient(ellipse at 50% -10%, #1d1a14 0%, var(--black) 60%) no-repeat,
    var(--black);
  min-height: 100vh;
  overflow-x: clip;        /* clip at the body (html keeps the page scroll) so intro pops never widen the phone layout */
}
html { overflow-x: hidden; }

a { color: var(--yellow); text-underline-offset: 3px; }
a:hover { color: #ffe07a; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute; left: 12px; top: -48px; z-index: 10;
  background: var(--yellow); color: var(--black); padding: 8px 14px; border-radius: 8px;
  font-weight: 700; text-decoration: none;
}
.skip:focus { top: 12px; }

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

.wrap { width: min(100% - 32px, 720px); margin-inline: auto; }

/* ---------- hero ---------- */
.hero { position: relative; text-align: center; padding: 44px 0 8px; overflow: hidden; }
.hero::before {                       /* comic action rays behind the logo */
  content: ""; position: absolute; left: 50%; top: 42%; width: 1400px; height: 1400px;
  translate: -50% -50%; z-index: -1; pointer-events: none;
  background: repeating-conic-gradient(from 0deg, rgba(228, 38, 28, 0.13) 0deg 6deg, transparent 6deg 18deg);
  -webkit-mask-image: radial-gradient(circle, #000 18%, transparent 58%);
  mask-image: radial-gradient(circle, #000 18%, transparent 58%);
}
.hero h1 { margin: 0; line-height: 0; }
.hero-logo { width: min(100%, 560px); height: auto; overflow: visible; cursor: pointer; }
.bubble {                             /* speech-bubble tagline */
  position: relative; display: inline-block; margin: 6px auto 14px; padding: 10px 20px 8px;
  font-family: var(--display); font-size: clamp(1.55rem, 6vw, 2.3rem); letter-spacing: 0.02em; line-height: 1.05;
  color: var(--black); background: var(--cream);
  border: 3px solid var(--black); border-radius: 22px;
  box-shadow: 5px 5px 0 var(--red);
}
.bubble::after {                      /* the bubble's tail */
  content: ""; position: absolute; left: 28%; top: -16px; width: 22px; height: 18px;
  background: var(--cream); border: 3px solid var(--black); border-bottom: 0; border-right: 0;
  transform: skewX(28deg) rotate(8deg); transform-origin: bottom left;
}
.lead { margin: 0 auto; max-width: 34ch; color: var(--muted); }

/* ---------- cards ---------- */
.card {
  position: relative;
  margin: 30px 0;
  padding: 24px 20px 22px;
  background: var(--ink);
  border: 3px solid var(--cream);
  border-radius: var(--radius);
  box-shadow: 8px 8px 0 var(--red);
}
.card h2 {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(1.7rem, 6vw, 2.25rem); letter-spacing: 0.02em; line-height: 1.05;
  margin: 0 0 8px; color: var(--yellow);
}
.card p { margin: 0 0 14px; }
.kicker {
  display: inline-block; font-family: var(--display); letter-spacing: 0.06em; font-size: 1.05rem;
  background: var(--red); color: #fff; padding: 2px 10px 1px; border-radius: 6px;
  transform: rotate(-2deg); margin-bottom: 10px;
}

/* stickers on card corners ("NEW!", and the BimBoom logo): decorative */
.sticker {
  position: absolute; top: -26px; right: -8px; z-index: 2;
  width: 92px; height: 92px; display: grid; place-items: center;
  font-family: var(--display); font-size: 1.35rem; letter-spacing: 0.03em; color: var(--black);
  background: var(--yellow);
  clip-path: polygon(50% 0%, 61% 18%, 82% 8%, 80% 30%, 100% 36%, 85% 52%, 98% 70%, 76% 72%, 76% 94%, 58% 82%,
                     46% 100%, 38% 80%, 16% 92%, 20% 70%, 0% 62%, 16% 48%, 4% 28%, 26% 26%, 24% 4%, 42% 16%);
  transform: rotate(12deg);
  pointer-events: none;
}
.sticker span { transform: translateY(1px); }
.sticker.red { background: var(--red); color: #fff; }

/* ---------- form ---------- */
.field { display: flex; flex-direction: column; gap: 10px; margin: 16px 0 12px; }
label.email-label { font-weight: 700; }
input[type="email"] {
  width: 100%; font: inherit; padding: 14px; border-radius: 10px;
  border: 3px solid var(--cream); background: #fff; color: var(--black);
}
input[type="email"][aria-invalid="true"] { border-color: var(--red-bright); }
.consent { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 16px; font-size: 0.97rem; }
.consent input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--yellow); flex: none; }
button[type="submit"] {
  width: 100%; font-family: var(--display); font-size: 1.5rem; letter-spacing: 0.05em;
  padding: 12px 18px 10px; border: 3px solid var(--black); border-radius: 12px;
  background: var(--yellow); color: var(--black); box-shadow: 5px 5px 0 var(--red);
  cursor: pointer; transition: transform 0.08s ease, box-shadow 0.08s ease;
}
button[type="submit"]:hover { transform: translate(-1px, -1px) rotate(-1deg); box-shadow: 7px 7px 0 var(--red); }
button[type="submit"]:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--red); }
button[type="submit"][disabled] { opacity: 0.7; cursor: progress; }
.status { min-height: 1.5em; margin: 12px 0 0; font-weight: 700; }
.status.ok { color: var(--yellow); }
.status.err { color: var(--red-bright); }
.fine { font-size: 0.9rem; color: var(--muted); margin: 14px 0 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.joined .signup-form { display: none; }
.done-msg { display: none; }
.joined .done-msg { display: block; }
.done-msg p { font-size: 1.1rem; }

/* ---------- first collection ---------- */
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; }
.chips li { border: 2px solid var(--yellow); color: var(--cream); border-radius: 999px; padding: 4px 12px; font-size: 0.92rem; }

/* ---------- contact / footer ---------- */
.contact { text-align: center; margin: 32px 0 12px; }
.contact p { margin: 0 0 12px; }
.social { list-style: none; display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; padding: 0; margin: 0; }
.social a, .social span {
  display: inline-flex; align-items: center; gap: 6px;
  border: 2px solid var(--line); border-radius: 999px; padding: 6px 12px;
  color: var(--muted); font-size: 0.9rem; text-decoration: none;
}
.social span { opacity: 0.8; }
footer { text-align: center; color: var(--muted); font-size: 0.85rem; padding: 18px 0 32px; }
footer a { color: var(--muted); }

/* ---------- simple pages (privacy, thanks, 404) ---------- */
.page { padding: 24px 0 40px; }
.page .mini-logo { display: inline-block; width: 150px; }
.page .mini-logo img { width: 100%; height: auto; display: block; }
.page h1 { font-family: var(--display); font-weight: 400; font-size: 2.4rem; color: var(--yellow); margin: 16px 0 8px; letter-spacing: 0.02em; }
.page h2 { font-size: 1.15rem; margin: 22px 0 6px; color: var(--cream); }
.page p, .page li { color: var(--cream); }
.page .muted { color: var(--muted); }

@media (min-width: 640px) {
  .hero { padding-top: 48px; }
  .card { padding: 30px 32px 26px; }
  .field { flex-direction: row; align-items: stretch; }
  .field .email-wrap { flex: 1; display: flex; flex-direction: column; gap: 8px; }
  button[type="submit"] { width: auto; }
  .sticker { right: -22px; }
}

/* =====================================================================================
   MOTION
   ===================================================================================== */

/* ---- FULL: "bim... BOOM" slam, rays spin-in, bubble pop, cards and stickers pop on scroll ---- */
html[data-motion="full"] .hero-logo .burst { transform-box: fill-box; transform-origin: 50% 50%; animation: burst-pop 0.42s var(--pop) both; }
html[data-motion="full"] .hero-logo .ht { animation: fade-in 0.5s 0.12s ease-out both; }
html[data-motion="full"] .hero-logo .bim { transform-box: fill-box; transform-origin: 50% 100%; animation: bim-pop 0.2s cubic-bezier(0.2, 1.4, 0.5, 1) both; }
html[data-motion="full"] .hero-logo .boom { transform-box: fill-box; transform-origin: 50% 50%; animation: boom-slam 0.24s cubic-bezier(0.25, 1.25, 0.35, 1) both; }
html[data-motion="full"] .hero-logo .shake { animation: shake 0.3s 1.02s ease-out both; }
html[data-motion="full"] .hero::before { animation: rays-in 1.3s 0.05s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
html[data-motion="full"] .bubble { animation: bubble-pop 0.38s 1.05s var(--pop) both; }
html[data-motion="full"] .lead { animation: fade-up 0.4s 1.25s ease-out both; }
html.bb-io[data-motion="full"] .reveal { opacity: 0; }
html[data-motion="full"] .reveal.in { animation: card-pop 0.5s var(--pop) both; }
html.bb-io[data-motion="full"] .reveal .sticker { opacity: 0; }
html[data-motion="full"] .reveal.in .sticker { animation: sticker-slap 0.36s 0.28s var(--pop) both; }
html[data-motion="full"] .hero-logo:hover .word { transform-box: fill-box; transform-origin: 50% 50%; animation: wobble 0.45s ease-in-out; }


/* letter timing, shared by both modes: "bim..." then a beat, then "BOOM" */
html[data-motion] .hero-logo .l1 { animation-delay: 0.30s; }
html[data-motion] .hero-logo .l2 { animation-delay: 0.36s; }
html[data-motion] .hero-logo .l3 { animation-delay: 0.42s; }
html[data-motion] .hero-logo .l4 { animation-delay: 0.72s; }
html[data-motion] .hero-logo .l5 { animation-delay: 0.78s; }
html[data-motion] .hero-logo .l6 { animation-delay: 0.84s; }
html[data-motion] .hero-logo .l7 { animation-delay: 0.90s; }

@keyframes burst-pop {
  0% { transform: scale(0) rotate(-28deg); opacity: 0; }
  60% { transform: scale(1.12) rotate(4deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes bim-pop { 0% { transform: translateY(-70px) scale(0.55); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes boom-slam { 0% { transform: scale(2.9); opacity: 0; } 70% { transform: scale(0.93); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
@keyframes shake {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-7px, 4px); }
  40% { transform: translate(6px, -4px); }
  60% { transform: translate(-4px, 2px); }
  80% { transform: translate(2px, -1px); }
}
@keyframes rays-in { from { opacity: 0; rotate: -25deg; scale: 0.6; } to { opacity: 1; rotate: 0deg; scale: 1; } }
@keyframes bubble-pop { 0% { opacity: 0; transform: scale(0.3) rotate(-8deg); } 100% { opacity: 1; transform: scale(1) rotate(-1.5deg); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes card-pop { 0% { opacity: 0; transform: translateY(26px) scale(0.92) rotate(-1.5deg); } 100% { opacity: 1; transform: none; } }
@keyframes sticker-slap { 0% { opacity: 0; transform: scale(2.2) rotate(-30deg); } 100% { opacity: 1; transform: scale(1) rotate(12deg); } }
@keyframes wobble { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-2deg) scale(1.02); } 60% { transform: rotate(1.5deg); } }
/* failsafe: content hidden for scroll pop-ins becomes visible after 6 s if the page script never ran */
html.bb-io:not(.bb-ready) .reveal, html.bb-io:not(.bb-ready) .reveal .sticker { animation: bb-failsafe 0.01s 6s forwards; }
@keyframes bb-failsafe { to { opacity: 1; } }

/* stickers never cover heading text: smaller and higher on phones, and headings after a sticker leave room */
.card .sticker ~ h2 { padding-right: 58px; }
@media (max-width: 639px) {
  .card .sticker { width: 74px; height: 74px; font-size: 1.1rem; top: -34px; right: -6px; }
}

/* =====================================================================================
   LIVE WALLPAPER: BimBoom brand-art motion behind the whole page that keeps moving (pure CSS, so it runs
   even where video autoplay is blocked). Full mode: turning action rays, drifting halftone dots, "boom"
   shockwave rings, speed lines and BimBoom logo bursts popping in around the edges, plus a light sheen
   that sweeps over the whole page. One mode for everyone. assets/bg.js adds "Pause background"
   (stops everything) and mouse / phone-tilt parallax (--tx / --ty).
   ===================================================================================== */
body { background: transparent; padding-bottom: 70px; }
.bg-stage { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: #0b0b0c; contain: strict; }
.bg-stage > div { position: absolute; inset: 0; }
.bg-stage i { position: absolute; display: block; will-change: transform; }

/* 1 action rays: 24 red wedges turning around the logo */
.bg-rays, .bg-rings { translate: calc(var(--tx, 0) * -38px) calc(var(--ty, 0) * -28px); }
.bg-rays i { left: 50%; top: 46%; width: 180vmax; height: 180vmax; margin: -90vmax 0 0 -90vmax; border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, #e4261c 0deg 14.6deg, #8a140e 15deg 29.6deg, #e4261c 30deg); }
html[data-motion="full"] .bg-rays i { animation: bb-spin 45s linear infinite; }

/* 2 halftone dots drifting diagonally, denser toward the centre */
.bg-dots { translate: calc(var(--tx, 0) * -24px) calc(var(--ty, 0) * -18px);
  -webkit-mask-image: radial-gradient(ellipse 72% 68% at 50% 46%, #000 0%, rgba(0, 0, 0, 0.6) 42%, transparent 80%);
  mask-image: radial-gradient(ellipse 72% 68% at 50% 46%, #000 0%, rgba(0, 0, 0, 0.6) 42%, transparent 80%); }
.bg-dots i { inset: -60px; background:
  radial-gradient(circle, #ffc61a 0 4px, transparent 4.6px) 0 0 / 28px 28px,
  radial-gradient(circle, #ffc61a 0 4px, transparent 4.6px) 14px 14px / 28px 28px; }
html[data-motion="full"] .bg-dots { animation: bb-breathe 1.6s ease-in-out infinite alternate; }
html[data-motion="full"] .bg-dots i { animation: bb-drift 2.4s linear infinite; }

/* 3 "boom" shockwave rings from the centre */
.bg-rings i { left: 50%; top: 46%; width: 130vmax; height: 130vmax; margin: -65vmax 0 0 -65vmax; border-radius: 50%; opacity: 0;
  background: radial-gradient(circle, rgba(255, 198, 26, 0) 56%, rgba(255, 198, 26, 0.5) 64%, rgba(255, 198, 26, 0) 71%); }
html[data-motion="full"] .bg-rings i { animation: bb-ring 3.6s cubic-bezier(0.15, 0.6, 0.35, 1) infinite; }
html[data-motion="full"] .bg-rings i + i { animation-delay: -1.8s; }

/* 4 centre glow */
.bg-glow { background: radial-gradient(circle at 50% 46%, rgba(255, 198, 26, 0.32) 0%, rgba(255, 198, 26, 0) 42%); }
html[data-motion="full"] .bg-glow { animation: bb-breathe 1.8s ease-in-out infinite alternate; }

/* 5 speed lines streaking up and across */
.bg-lines i { left: -10%; width: 26vmax; height: 3px; border-radius: 2px; opacity: 0;
  background: linear-gradient(90deg, rgba(255, 245, 220, 0), rgba(255, 245, 220, 0.6)); }
.bg-lines i:nth-child(1) { top: 34%; } .bg-lines i:nth-child(2) { top: 58%; } .bg-lines i:nth-child(3) { top: 82%; }
.bg-lines i:nth-child(4) { top: 106%; } .bg-lines i:nth-child(5) { top: 130%; } .bg-lines i:nth-child(6) { top: 150%; }
html[data-motion="full"] .bg-lines i { animation: bb-streak 2.6s linear infinite; }
html[data-motion="full"] .bg-lines i:nth-child(2) { animation-duration: 2.2s; animation-delay: -0.9s; }
html[data-motion="full"] .bg-lines i:nth-child(3) { animation-duration: 3s; animation-delay: -1.7s; }
html[data-motion="full"] .bg-lines i:nth-child(4) { animation-duration: 2.4s; animation-delay: -0.4s; }
html[data-motion="full"] .bg-lines i:nth-child(5) { animation-duration: 2.8s; animation-delay: -2.1s; }
html[data-motion="full"] .bg-lines i:nth-child(6) { animation-duration: 2.3s; animation-delay: -1.2s; }

/* 6 text-safe scrim: darker where the text column is, a vignette at the edges */
.bg-scrim { background: radial-gradient(ellipse at 50% 46%, rgba(11, 11, 12, 0) 40%, rgba(11, 11, 12, 0.5) 100%),
  linear-gradient(90deg, rgba(11, 11, 12, 0.15) 0%, rgba(11, 11, 12, 0.5) 26%, rgba(11, 11, 12, 0.5) 74%, rgba(11, 11, 12, 0.15) 100%); }
@media (max-width: 760px) { .bg-scrim { background: radial-gradient(ellipse at 50% 46%, rgba(11, 11, 12, 0) 40%, rgba(11, 11, 12, 0.45) 100%), rgba(11, 11, 12, 0.45); } }

/* 7 BimBoom logo bursts around the edges, in two layers: the splat bursts in, then the BIMBOOM
   lettering slams on top with a shake (the splat bumps as it lands); they float together, then the word pops
   out and the splat after it. The two SVG layers share one viewBox, so stacked they are the exact logo. */
.bg-bursts { --bw: clamp(130px, 22vmin, 250px); translate: calc(var(--tx, 0) * 34px) calc(var(--ty, 0) * 26px); }
.bg-bursts > span { position: absolute; width: var(--bw); aspect-ratio: 1083 / 970; margin: calc(var(--bw) * -0.45) 0 0 calc(var(--bw) * -0.5);
  will-change: transform; }
.bg-bursts img { position: absolute; inset: 0; width: 100%; height: 100%; transform: scale(0); opacity: 0; will-change: transform; }
.bg-bursts > span:nth-child(1) { left: 10%; top: 20%; rotate: -12deg; --d: 0s; }
.bg-bursts > span:nth-child(2) { left: 90%; top: 24%; rotate: 10deg; --d: -1.5s; }
.bg-bursts > span:nth-child(3) { left: 8%; top: 56%; rotate: 7deg; --d: -3s; }
.bg-bursts > span:nth-child(4) { left: 92%; top: 58%; rotate: -8deg; --d: -4.5s; }
.bg-bursts > span:nth-child(5) { left: 12%; top: 88%; rotate: -5deg; --d: -6s; }
.bg-bursts > span:nth-child(6) { left: 88%; top: 88%; rotate: 9deg; --d: -7.5s; }
@media (orientation: portrait) {
  .bg-bursts { --bw: clamp(110px, 32vw, 210px); }
  .bg-bursts > span:nth-child(1) { left: 14%; top: 9%; } .bg-bursts > span:nth-child(2) { left: 86%; top: 25%; }
  .bg-bursts > span:nth-child(3) { left: 12%; top: 44%; } .bg-bursts > span:nth-child(4) { left: 88%; top: 62%; }
  .bg-bursts > span:nth-child(5) { left: 16%; top: 80%; } .bg-bursts > span:nth-child(6) { left: 84%; top: 95%; }
}
html[data-motion="full"] .bg-bursts > span { animation: bb-float 9s ease-in-out infinite; animation-delay: var(--d); }
html[data-motion="full"] .bg-bursts .splat { animation: bb-splat 9s linear infinite; animation-delay: var(--d); }
html[data-motion="full"] .bg-bursts .word { animation: bb-word 9s linear infinite; animation-delay: var(--d); }

/* 8 a light sheen sweeping over the whole page, in front of the content (never blocks clicks) */
.fx-sheen { position: fixed; inset: 0; z-index: 55; pointer-events: none; overflow: hidden; }
.fx-sheen i { position: absolute; top: -50%; left: 0; width: 40vmax; height: 200%; display: block; opacity: 0; will-change: transform;
  background: linear-gradient(90deg, rgba(255, 245, 220, 0), rgba(255, 245, 220, 0.08) 50%, rgba(255, 245, 220, 0));
  transform: translateX(-60vmax) rotate(16deg); }
html[data-motion="full"] .fx-sheen i { animation: bb-sheen 6.5s ease-in-out infinite; }

/* "Pause background" stops every moving layer */
html.bg-paused .bg-stage *, html.bg-paused .fx-sheen * { animation-play-state: paused !important; }

@keyframes bb-spin { to { transform: rotate(360deg); } }
@keyframes bb-drift { to { transform: translate(28px, -28px); } }
@keyframes bb-breathe { from { opacity: 0.4; } to { opacity: 1; } }
@keyframes bb-ring { 0% { transform: scale(0.04); opacity: 0.95; } 75% { opacity: 0.3; } 100% { transform: scale(1); opacity: 0; } }
@keyframes bb-streak {
  0% { transform: rotate(-24deg) translateX(-30vmax); opacity: 0; }
  8%, 48% { opacity: 1; }
  58%, 100% { transform: rotate(-24deg) translateX(150vmax); opacity: 0; }
}
/* 9 s cycle; 1% = 0.09 s. Splat pops in over ~0.3 s; the word slams down 0.25 s later and lands at ~0.5 s. */
@keyframes bb-splat {
  0% { transform: scale(0) rotate(-25deg); opacity: 0; animation-timing-function: cubic-bezier(0.2, 1.7, 0.4, 1); }
  3.5% { transform: scale(1) rotate(0deg); opacity: 1; animation-timing-function: ease-out; }
  5.6% { transform: scale(1); animation-timing-function: ease-out; }
  6.4% { transform: scale(1.12); animation-timing-function: ease-in-out; }
  8% { transform: scale(1); }
  28% { transform: scale(1); opacity: 1; animation-timing-function: cubic-bezier(0.5, -0.6, 0.8, 0.4); }
  32%, 100% { transform: scale(0); opacity: 0; }
}
@keyframes bb-word {
  0%, 2.8% { transform: scale(2.6) rotate(-8deg); opacity: 0; animation-timing-function: cubic-bezier(0.3, 1.2, 0.4, 1); }
  5.6% { transform: scale(1) rotate(0deg); opacity: 1; animation-timing-function: linear; }
  6.3% { transform: translate(-5px, 2px) rotate(-1deg); }
  7% { transform: translate(4px, -2px) rotate(1deg); }
  7.7% { transform: none; }
  25% { transform: none; opacity: 1; animation-timing-function: cubic-bezier(0.5, -0.6, 0.8, 0.4); }
  28%, 100% { transform: scale(0); opacity: 0; }
}
@keyframes bb-float {
  0%, 8% { transform: none; }
  18% { transform: translateY(-8px) rotate(4deg) scale(1.05); }
  28%, 100% { transform: none; }
}
@keyframes bb-sheen {
  0% { transform: translateX(-60vmax) rotate(16deg); opacity: 0; }
  6%, 42% { opacity: 1; }
  48%, 100% { transform: translateX(calc(100vw + 20vmax)) rotate(16deg); opacity: 0; }
}

/* text never sits on the bare wallpaper: the tagline and panels are dark and see-through, so the motion shows everywhere */
.hero::before { display: none; }
.lead { display: inline-block; background: rgba(11, 11, 12, 0.72); padding: 4px 12px; border-radius: 10px; }
.card { background: rgba(22, 22, 26, 0.86); }
.kicker { background: #b81d14; }   /* darker red keeps white text above 4.5:1 even under the sheen */

.fx-controls { position: fixed; right: 12px; bottom: 12px; z-index: 60; max-width: calc(100% - 24px); transition: opacity 0.2s ease; }
.fx-controls button { font: 700 0.8rem/1 var(--body); color: var(--cream); background: rgba(22, 22, 26, 0.94); border: 2px solid var(--line);
  border-radius: 999px; padding: 8px 12px; cursor: pointer; box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.5); }
.fx-controls button:hover { border-color: var(--yellow); }
/* Pause background: one small round button in the corner (the words stay for screen readers and as a tooltip).
   Required for constant motion (WCAG 2.2.2); on iPhones a tilt button appears above it until tilt is allowed. */
.fx-controls { display: flex; flex-direction: column-reverse; align-items: flex-end; gap: 8px; }
.fx-controls button { display: grid; place-items: center; width: 42px; height: 42px; padding: 0; font-size: 1.05rem; }
.fx-controls button[hidden] { display: none; }
.fx-controls svg { width: 16px; height: 16px; fill: currentColor; }
.fx-controls .fx-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.bg-toggle .i-play, html.bg-paused .bg-toggle .i-pause { display: none; }
html.bg-paused .bg-toggle .i-play { display: block; }
@media (max-width: 640px) {
  body { padding-bottom: 24px; }
  .fx-controls { right: 10px; bottom: 10px; }
  .fx-controls button { width: 44px; height: 44px; }
  /* while someone types in a form field, the button steps aside */
  html:has(input:not([type="checkbox"]):focus, textarea:focus, select:focus) .fx-controls { opacity: 0; pointer-events: none; }
}

/* parallax depths (bg.js eases --tx/--ty toward the mouse or phone tilt) */
html[data-motion="full"] .hero h1 { translate: calc(var(--tx, 0) * 14px) calc(var(--ty, 0) * 10px); }
html[data-motion="full"] .bubble { translate: calc(var(--tx, 0) * -12px) calc(var(--ty, 0) * -9px); }
html[data-motion="full"] .sticker { translate: calc(var(--tx, 0) * 18px) calc(var(--ty, 0) * 12px); }

.contact, footer { background: rgba(11, 11, 12, 0.8); border-radius: 14px; padding: 14px 12px; }

/* the BimBoom logo as the card sticker (the brand name, never a generic comic word) */
.sticker.logo { width: 132px; height: auto; top: -46px; right: -20px; background: none; clip-path: none; transform: rotate(10deg); }
.sticker.logo img { display: block; width: 100%; height: auto; }
.card .sticker.logo ~ h2 { padding-right: 96px; }
@media (max-width: 760px) {
  .card .sticker.logo { width: 108px; height: auto; top: -44px; right: -10px; }
  .card .sticker.logo ~ h2 { padding-right: 78px; }
}
