/* Birge — playbirge.com. Vanilla CSS, no build step. */

:root {
  --ink: #0E1530;
  --muted: #5D677F;
  --secondary: #3A4360;
  --ground: #F3F5FA;
  --card: #FFFFFF;
  --line: #E6EAF2;
  --border: #D9DEE8;
  --border-strong: #B3BACB;
  --blue: #2557E8;
  --blue-text: #1D46C6;
  --blue-soft: #EEF2FF;
  --orange: #FF8A2B;
  --display: 'Geologica', system-ui, -apple-system, sans-serif;
  --text: 'Onest', system-ui, -apple-system, sans-serif;
  --wrap: 1120px;
  --gutter: 20px;
  --nav-h: 72px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: auto; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #FFFFFF;
  color: var(--ink);
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, p { margin: 0; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }

/* ---------- Type ---------- */
.h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(40px, 6.4vw, 86px);
  line-height: 1.02;
  letter-spacing: -.035em;
  text-wrap: balance;
}
.h1 span { display: block; }
.h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(30px, 3.8vw, 52px);
  line-height: 1.06;
  letter-spacing: -.03em;
  text-wrap: balance;
}
.h2.big { font-size: clamp(36px, 5.6vw, 76px); line-height: 1.02; }
.sub {
  margin-top: 24px;
  font-size: clamp(17px, 1.55vw, 22px);
  line-height: 1.45;
  color: var(--secondary);
  max-width: 34em;
  margin-inline: auto;
  text-wrap: balance;
}
.lead {
  margin-top: 20px;
  font-size: clamp(18px, 1.8vw, 24px);
  line-height: 1.4;
  color: var(--secondary);
  text-wrap: balance;
}

/* ---------- Buttons, badges ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 48px; padding: 0 22px; border-radius: 999px;
  font-family: var(--text); font-size: 15px; font-weight: 700;
  transition: transform .25s var(--ease), background-color .25s, box-shadow .25s;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn-ghost { color: var(--ink); background: #FFFFFF; box-shadow: inset 0 0 0 1.5px var(--border); }
.btn-ghost:hover { background: var(--ground); }
.btn-light { height: 56px; padding: 0 28px; font-size: 16px; color: var(--blue-text); background: #FFFFFF; box-shadow: 0 8px 24px rgba(14, 21, 48, .18); }
.btn-light:hover { box-shadow: 0 12px 32px rgba(14, 21, 48, .24); }

.stores {
  margin-top: 28px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px;
  font-size: 15px; font-weight: 500; color: var(--muted);
}
.store {
  display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: 999px;
  font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: -.01em;
  color: var(--ink); background: #FFFFFF; box-shadow: inset 0 0 0 1.5px var(--border);
}
.stores-light { color: rgba(255, 255, 255, .78); }
.stores-light .store { color: #FFFFFF; background: rgba(255, 255, 255, .14); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .35); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  height: var(--nav-h);
  transition: background-color .35s, box-shadow .35s;
}
.nav-wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.logo { color: var(--ink); display: inline-flex; }
.nav.is-scrolled {
  background: rgba(255, 255, 255, .72);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  backdrop-filter: blur(22px) saturate(180%);
  box-shadow: 0 1px 0 rgba(14, 21, 48, .06);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: calc(var(--nav-h) + clamp(56px, 10vh, 120px)) 0 0;
  text-align: center;
  overflow: hidden;
}
.hero-copy { position: relative; z-index: 2; }
.hero-phone {
  position: relative; z-index: 2;
  margin: clamp(48px, 7vh, 88px) auto 0;
  width: fit-content;
}
.tilt { will-change: transform; transform-origin: 50% 0; }

/* Entrance (hero): time-based, once */
.js .rise { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease) var(--d, 0ms), transform .9s var(--ease) var(--d, 0ms); }
.js.is-ready .rise { opacity: 1; transform: none; }

/* Brand arc with the ball */
.arc { position: absolute; pointer-events: none; z-index: 0; }
.arc-svg { width: 100%; height: 100%; overflow: visible; }
.ball {
  position: absolute; left: 0; top: 0;
  width: 28px; height: 28px; margin: -14px 0 0 -14px;
  border-radius: 50%; background: var(--orange);
  box-shadow: 0 6px 18px rgba(255, 138, 43, .35);
  will-change: transform;
}
.hero .arc {
  left: 50%; top: calc(var(--nav-h) + 20px);
  width: min(1320px, 92vw); aspect-ratio: 1200 / 760;
  transform: translateX(-50%);
  will-change: transform;
}
.hero .ball { left: 95.8%; top: 39.5%; } /* no-JS rest point (the curve's end) */
.js .hero .ball { left: 0; top: 0; }

/* ---------- Phone frame ---------- */
.phone {
  --pw: 360px;
  --bezel: 11px;
  position: relative;
  width: calc(var(--pw) + var(--bezel) * 2);
  padding: var(--bezel);
  border-radius: calc(var(--pw) * .155);
  background: #0B1024;
  box-shadow: 0 30px 80px rgba(14, 21, 48, .22), 0 2px 6px rgba(14, 21, 48, .18);
}
.phone::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .16);
}
.phone-screen {
  position: relative; width: var(--pw); aspect-ratio: 390 / 844;
  border-radius: calc(var(--pw) * .125); overflow: hidden; background: var(--ground);
  -webkit-mask-image: -webkit-radial-gradient(white, black); /* Safari: clip children with radius */
}
.phone-screen::before {
  content: ""; position: absolute; z-index: 3; left: 50%; top: calc(var(--pw) * .032);
  width: calc(var(--pw) * .30); height: calc(var(--pw) * .092);
  transform: translateX(-50%); border-radius: 999px; background: #0B1024;
}
.phone-screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.phone-hero { --pw: clamp(250px, 26vw, 360px); }

/* ---------- Scrollytelling ---------- */
.story { position: relative; background: var(--ground); height: 460vh; }
.story-sticky {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  padding: 0 clamp(20px, 6vw, 96px);
  overflow: hidden;
}
.story-text { position: relative; min-height: 220px; padding-right: clamp(16px, 4vw, 56px); }
.beat { position: absolute; inset: auto 0 auto 0; top: 50%; transform: translateY(-50%); will-change: transform, opacity; }
.beat p { margin-top: 16px; font-size: clamp(16px, 1.45vw, 21px); line-height: 1.45; color: var(--secondary); max-width: 24em; }
.js .beat { opacity: 0; }
.js .beat[data-beat="0"] { opacity: 1; }
.story-phone { display: flex; justify-content: center; }
.phone-story { --pw: min(340px, 36vh, 36svh); }
.phone-story .screen { opacity: 0; will-change: opacity, transform; }
.phone-story .screen[data-screen="0"] { opacity: 1; }
.story-dots { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.story-dots li { width: 8px; height: 8px; border-radius: 50%; background: var(--border); transition: background-color .3s, transform .3s var(--ease); }
.story-dots li.is-on { background: var(--blue); transform: scale(1.3); }

/* ---------- Sports ---------- */
.sports { padding: clamp(96px, 14vw, 180px) 0; text-align: center; }
.chips { margin-top: 40px; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.chip {
  display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 20px 0 16px; border-radius: 999px;
  font-size: 16px; font-weight: 600; color: var(--muted); background: #FFFFFF;
  box-shadow: inset 0 0 0 1.5px var(--border);
}
.chip.is-on { color: #FFFFFF; background: var(--ink); box-shadow: none; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; }
.soon { font-size: 13px; font-weight: 500; color: var(--border-strong); margin-left: 2px; }

/* ---------- CTA ---------- */
.cta { padding: 0 0 clamp(72px, 10vw, 140px); }
.cta-card {
  position: relative; overflow: hidden; text-align: center;
  padding: clamp(72px, 10vw, 128px) clamp(24px, 6vw, 96px);
  border-radius: 36px; background: var(--blue); color: #FFFFFF;
}
.cta-card .stores { margin-top: 24px; }
.cta-card .btn { margin-top: 32px; }
.cta-card .h2, .cta-card .stores, .cta-card .btn { position: relative; z-index: 1; }
.arc-cta { right: 3%; top: -6%; width: 64%; aspect-ratio: 1200 / 760; }
.ball-cta { left: 95.8%; top: 39.5%; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 40px 0 48px; font-size: 14px; color: var(--muted); }
.footer-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 28px; font-weight: 500; }
.footer-links a:hover, .langs a:hover { color: var(--ink); }
.footer-bottom { margin-top: 28px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
.langs { display: inline-flex; gap: 18px; }
.langs a[aria-current] { color: var(--ink); font-weight: 600; }
.langs span { color: var(--border-strong); }

/* ---------- Reveals (IntersectionObserver) ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease) var(--d, 0ms), transform .9s var(--ease) var(--d, 0ms); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Mobile ---------- */
@media (max-width: 820px) {
  :root { --nav-h: 64px; --gutter: 16px; }
  .logo svg { width: 78px; height: 36px; }
  .btn-ghost { height: 42px; padding: 0 16px; font-size: 14px; }
  .hero .arc { top: calc(var(--nav-h) + 300px); width: 96vw; }
  .ball { width: 22px; height: 22px; margin: -11px 0 0 -11px; }
  .story { height: 440vh; }
  .story-sticky {
    grid-template-columns: 1fr; grid-template-rows: auto 1fr auto; align-items: start;
    padding: calc(var(--nav-h) + 16px) var(--gutter) 24px; text-align: center;
  }
  .story-text { min-height: 132px; padding: 0; }
  .beat { top: 0; transform: none; }
  .beat p { margin: 10px auto 0; max-width: 22em; }
  .story-phone { align-self: center; }
  .phone-story { --pw: min(70vw, 27vh, 27svh); }
  .story-dots { flex-direction: row; justify-content: center; align-items: center; margin-top: 16px; }
  .cta-card { border-radius: 28px; }
  .arc-cta { right: 4%; top: 0; width: 110%; }
  .stores-label { flex-basis: 100%; text-align: center; margin-bottom: 2px; }
  .footer-top, .footer-bottom { flex-direction: column; align-items: flex-start; }
  .footer-links { flex-direction: column; gap: 14px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .js .rise, .js .reveal { opacity: 1; transform: none; transition: none; }
  .tilt, .hero .arc { transform: none !important; }
  .beat, .screen, .story-dots li { transition: none !important; }
}

/* Debug: ?y=NNN freezes every time-based animation at its end state */
.is-frozen *, .is-frozen *::before, .is-frozen *::after { transition: none !important; animation: none !important; }

/* ---------- Документы (privacy, terms) ---------- */
.nav-doc { position: static; height: var(--nav-h); border-bottom: 1px solid var(--line); }
.doc { padding-block: 48px 96px; }
.doc-body { max-width: 720px; margin-inline: auto; font-size: 17px; line-height: 1.7; color: var(--secondary); }
.doc-body h1 { font-family: var(--display); font-weight: 700; font-size: clamp(30px, 5vw, 42px); line-height: 1.15; letter-spacing: -.01em; color: var(--ink); }
.doc-meta { margin-top: 12px; font-size: 14px; line-height: 1.6; color: var(--muted); }
.doc-meta span { display: block; }
.doc-body h2 { margin-top: 44px; font-family: var(--display); font-weight: 700; font-size: 22px; line-height: 1.3; color: var(--ink); }
.doc-body h1 + .doc-meta + h2 { margin-top: 36px; }
.doc-body p { margin-top: 14px; }
.doc-body ul { margin-top: 12px; padding-left: 22px; list-style: disc; }
.doc-body li { margin-top: 8px; padding-left: 4px; }
.doc-body li::marker { color: var(--border-strong); }
.doc-body strong { font-weight: 600; color: var(--ink); }
.doc-body a { color: var(--blue-text); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.doc-body a:hover { text-decoration-thickness: 2px; }
.footer-links a[aria-current="page"] { color: var(--ink); }
@media (max-width: 640px) {
  .doc { padding-block: 32px 72px; }
  .doc-body { font-size: 16px; }
  .doc-body h2 { margin-top: 36px; font-size: 20px; }
}
