/* BounceMark site. Colours are the app's own (ios/.../DesignSystem/Theme.swift). No web fonts, no trackers. */
:root {
  --bg: #0c120f;
  --surface: #161f1a;
  --surface-high: #202c25;
  --accent: #d9f24b;
  --on-accent: #0f170d;
  --text: #ffffff;
  --text-2: #9eb0a6;
  --line: rgba(255, 255, 255, 0.09);
  --gutter: clamp(20px, 5vw, 72px);
  --nav-h: 68px;
  --display: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--on-accent); padding: 8px 14px; border-radius: 999px; z-index: 10; }
.skip:focus { left: 12px; }

/* ---------- top bar ---------- */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: calc(var(--nav-h) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) var(--gutter) 0;
  position: relative; z-index: 2;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 700 19px/1 var(--display); letter-spacing: -0.01em; min-height: 44px; }
.brand-icon { width: 30px; height: 30px; border-radius: 7px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14); }
.langs { display: flex; gap: 2px; background: var(--surface); border-radius: 999px; padding: 3px; }
.langs button {
  font: 600 13px/1 var(--body); color: var(--text-2); background: none; border: 0; cursor: pointer;
  min-width: 44px; min-height: 38px; padding: 0 12px; border-radius: 999px;
  transition: color 0.2s, background-color 0.2s;
}
.langs button:hover { color: var(--text); }
.langs button[aria-pressed="true"] { background: var(--surface-high); color: var(--accent); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: calc(100vh - var(--nav-h));
  min-height: calc(100dvh - var(--nav-h) - env(safe-area-inset-top));
  display: flex; flex-direction: column; justify-content: space-between;
  padding: clamp(24px, 5vh, 72px) var(--gutter) clamp(24px, 4vh, 48px);
  gap: clamp(8px, 2vh, 32px);
  isolation: isolate;
}
.hero-copy { max-width: 1100px; }
h1 {
  margin: 0;
  font: 800 clamp(44px, min(10.5vw, 16.5vh), 136px) / 0.98 var(--display);
  letter-spacing: -0.035em;
}
h1 span { display: block; }
h1 .drop { color: #51615a; }
.lede { margin: clamp(22px, 3.2vh, 36px) 0 0; max-width: 34em; font-size: clamp(17px, 1.5vw, 21px); color: var(--text-2); }
.cta-row { margin-top: clamp(24px, 3.6vh, 40px); display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; }
.cta {
  display: inline-flex; align-items: center; min-height: 52px; padding: 0 26px; border-radius: 999px;
  background: var(--accent); color: var(--on-accent); font: 700 17px/1 var(--display); text-decoration: none;
}
a.cta { transition: transform 0.2s var(--ease), filter 0.2s; }
a.cta:hover { filter: brightness(1.06); transform: translateY(-1px); }
a.cta:active { transform: scale(0.98); }
.cta-note { color: var(--text-2); font-size: 15px; }

/* ---------- the tape: a recording, and what is left of it ---------- */
.tape { margin: 0; padding-top: 96px; /* room for the ball to fly */ }
.tape[hidden] { display: none; }
.tape-foot { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-top: 16px; transition: opacity 0.45s ease; }
.tape-words { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.tape-label { font: 600 13px/1 var(--body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); }
.tape-time { font: 700 clamp(28px, 3.4vw, 46px) / 1 var(--display); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.tape-track {
  position: relative; display: flex; height: clamp(52px, 8vh, 84px);
  transition: opacity 0.45s ease;
}
.tape.fading .tape-track, .tape.fading .tape-foot { opacity: 0; }
.seg { flex: 1 1 0; min-width: 0; height: 100%; transition: flex-grow 1.1s var(--ease), opacity 0.5s ease, margin 1.1s var(--ease), background-color 0.25s ease, border-radius 0.6s ease; }
.seg.wait {
  background: repeating-linear-gradient(115deg, var(--surface) 0 7px, #121a15 7px 14px);
}
.seg.play { background: var(--surface-high); transform-origin: 50% 100%; }
.seg.play.hit { background: var(--accent); animation: land 0.42s var(--ease); }
.seg:first-child { border-radius: 10px 0 0 10px; }
.seg:last-of-type { border-radius: 0 10px 10px 0; }
.tape.cut .seg.wait { flex-grow: 0 !important; opacity: 0; }
.tape.cut .seg.play { margin: 0 2px; border-radius: 8px; }
@keyframes land { 0% { transform: scaleY(1); } 35% { transform: scaleY(0.86); } 100% { transform: scaleY(1); } }

.ball { position: absolute; left: -11px; bottom: 100%; width: 22px; height: 22px; opacity: 0; transition: opacity 0.25s ease; will-change: transform; pointer-events: none; z-index: 1; }
.ball.on { opacity: 1; }
.ball-body {
  width: 100%; height: 100%; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 24px rgba(217, 242, 75, 0.45);
  transform-origin: 50% 100%;
}
.ball-body.squash { animation: squash 0.2s ease-out; }
@keyframes squash { 0% { transform: scale(1.22, 0.74); } 100% { transform: scale(1, 1); } }

.tape-status { min-height: 1.6em; color: var(--text-2); font-size: 16px; transition: color 0.4s ease; }
.tape.cut .tape-status { color: var(--text); }

/* ---------- how it works ---------- */
.eyebrow { margin: 0 0 clamp(28px, 4vw, 48px); font: 600 13px/1 var(--body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); }
.steps { padding: clamp(72px, 12vh, 150px) var(--gutter); border-top: 1px solid var(--line); }
.steps ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(28px, 4vw, 64px); }
.steps li { border-top: 2px solid var(--text); padding-top: 22px; }
.num { display: block; font: 800 15px/1 var(--display); color: var(--accent); margin-bottom: 18px; font-variant-numeric: tabular-nums; }
.steps h3 { margin: 0 0 10px; font: 700 clamp(24px, 2.4vw, 32px) / 1.12 var(--display); letter-spacing: -0.02em; }
.steps p { margin: 0; color: var(--text-2); max-width: 32em; }

/* ---------- footer ---------- */
.foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 24px;
  padding: 28px var(--gutter) max(28px, env(safe-area-inset-bottom)); color: var(--text-2); font-size: 15px;
  border-top: 1px solid var(--line);
}
.foot nav { display: flex; gap: 8px; }
.foot a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; text-decoration: none; border-radius: 8px; transition: color 0.2s; }
.foot a:hover { color: var(--text); }

/* ---------- text pages: privacy, support ---------- */
.doc { max-width: 720px; margin: 0 auto; padding: clamp(40px, 8vh, 90px) var(--gutter) clamp(60px, 10vh, 120px); }
.doc h1 { font-size: clamp(36px, 6vw, 60px); line-height: 1.05; letter-spacing: -0.03em; }
.doc .dated { color: var(--text-2); margin: 14px 0 0; }
.doc h2 { margin: 2.2em 0 0.5em; font: 700 22px/1.25 var(--display); letter-spacing: -0.01em; }
.doc p, .doc li { color: #d3dcd7; }
.doc ul { padding-left: 1.2em; }
.doc li { margin: 0.4em 0; }
.doc strong { color: var(--text); }
.doc a { color: var(--accent); text-underline-offset: 3px; }
.doc address { font-style: normal; color: #d3dcd7; }
.doc [lang][hidden] { display: none; }

@media (max-width: 820px) {
  .steps ol { grid-template-columns: 1fr; }
  .hero { min-height: 0; }
  .tape { padding-top: 76px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}
