/* Veerball website: one stylesheet, no build step.
   Colors follow the game: azure sky, white road with navy edges, orange and white ball. */

/* ---------- Fonts (self-hosted, SIL Open Font License: see /fonts/*-OFL.txt) ---------- */

@font-face {
  font-family: "Lilita One";
  src: url("/fonts/LilitaOne.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Rubik";
  src: url("/fonts/Rubik-latin.woff2") format("woff2"),
       url("/fonts/Rubik.ttf") format("truetype");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Design tokens ---------- */

:root {
  color-scheme: light dark;

  --sky-top: #2F6FE0;
  --sky-bottom: #BFE2FF;
  --road: #FFFFFF;
  --edge: #1F3B73;
  --accent: #FF7A1A;
  --accent-hover: #FF8C38;
  --accent-shadow: #C4560A;
  --accent-ink: #1C2541;
  --gem: #FFC93C;

  --ink: #1C2541;
  --muted: #475379;
  --bg: #F4F9FF;
  --surface: #FFFFFF;
  --surface-alt: #E7F1FF;
  --line: #D3E2F5;
  --icon-bg: #E7F1FF;
  --icon-ink: #1F3B73;
  --eyebrow-bg: #FFE8D6;
  --eyebrow-ink: #9A3D00;
  --link: #1D56C2;
  --focus: #1F3B73;

  --hero-top: #2F6FE0;
  --hero-bottom: #BFE2FF;
  --header-bg: rgba(47, 111, 224, 0.94);
  --footer-bg: #1C2541;
  --cloud: #FFFFFF;
  --cloud-opacity: 0.6;

  --shadow: 0 1px 2px rgba(31, 59, 115, 0.08), 0 14px 34px -20px rgba(31, 59, 115, 0.5);
  --shadow-lift: 0 2px 4px rgba(31, 59, 115, 0.1), 0 22px 44px -22px rgba(31, 59, 115, 0.6);

  --radius: 22px;
  --radius-sm: 14px;
  --container: 1120px;
  --gutter: 16px;
  --header-h: 64px;

  --font-head: "Lilita One", "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;
  --font-body: "Rubik", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --road: #DCE3F2;
    --edge: #3A5BA8;
    --ink: #EEF1FF;
    --muted: #B3BBDA;
    --bg: #0A0E24;
    --surface: #1E2235;
    --surface-alt: #121633;
    --line: #2D3354;
    --icon-bg: #28315C;
    --icon-ink: #CFE0FF;
    --eyebrow-bg: rgba(255, 122, 26, 0.16);
    --eyebrow-ink: #FFB27A;
    --link: #8DB8FF;
    --focus: #FFC93C;

    --hero-top: #152B5C;
    --hero-bottom: #0A0E24;
    --header-bg: rgba(10, 14, 36, 0.92);
    --footer-bg: #060918;
    --cloud: #9DB4E8;
    --cloud-opacity: 0.12;

    --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 16px 36px -22px rgba(0, 0, 0, 0.9);
    --shadow-lift: 0 2px 4px rgba(0, 0, 0, 0.4), 0 24px 48px -24px rgba(0, 0, 0, 0.95);
  }
}

@media (min-width: 600px) {
  :root { --gutter: 24px; }
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: 0.005em;
  margin: 0 0 0.5em;
}

h2 { font-size: clamp(1.9rem, 1.35rem + 2.2vw, 2.75rem); }
h3 { font-size: 1.35rem; }

p { margin: 0 0 1em; }

a { color: var(--link); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

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

ul, ol { padding-left: 1.25em; }

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

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  border-radius: 12px;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* White text on the blue sky. */
.on-sky {
  color: #FFFFFF;
  --focus: #FFFFFF;
  --link: #FFFFFF;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 48px;
  padding: 0.65em 1.4em;
  border: 0;
  border-radius: 999px;
  font-family: var(--font-head);
  font-size: 1.15rem;
  line-height: 1.1;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.btn-accent {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 4px 0 var(--accent-shadow);
}
.btn-accent:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 5px 0 var(--accent-shadow); }
.btn-accent:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--accent-shadow); }

.btn-ghost {
  background: rgba(255, 255, 255, 0.14);
  color: #FFFFFF;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.85);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.24); }

.btn-outline {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 2px var(--line);
}
.btn-outline:hover { box-shadow: inset 0 0 0 2px var(--link); }

.btn-small { min-height: 40px; padding: 0.5em 1.1em; font-size: 1rem; }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px 18px;
}

/* Self-made store badge: black rounded rectangle, "GET IT ON / Google Play". */
.badge-play {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding: 8px 22px 8px 16px;
  background: #000000;
  color: #FFFFFF;
  border-radius: 14px;
  box-shadow: inset 0 0 0 1.5px #A6A6A6, 0 10px 24px -14px rgba(0, 0, 0, 0.7);
  text-decoration: none;
  transition: transform 0.15s ease;
}
.badge-play:hover { transform: translateY(-2px); }
.badge-play:active { transform: translateY(1px); }
.badge-play svg { flex: none; width: 28px; height: 28px; }
.badge-text { display: flex; flex-direction: column; line-height: 1.05; text-align: left; }
.badge-small { font-size: 0.72rem; font-weight: 500; letter-spacing: 0.08em; }
.badge-big { font-size: 1.5rem; font-weight: 500; letter-spacing: -0.01em; }
.on-sky .badge-play:focus-visible { outline-color: #FFFFFF; }

/* ---------- The ball (CSS drawn, one class per ball in the game) ---------- */

.ball {
  --size: 40px;
  position: relative;
  display: inline-block;
  flex: none;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: linear-gradient(160deg, #FF7A1A 0 33%, #FFFFFF 33% 63%, #FF7A1A 63%);
  box-shadow: 0 3px 6px -2px rgba(10, 14, 36, 0.35);
}
.ball::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 26%, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0) 34%),
    radial-gradient(circle at 70% 80%, rgba(10, 14, 36, 0.3), rgba(10, 14, 36, 0) 62%);
}

.ball--classic { background: linear-gradient(160deg, #FF7A1A 0 33%, #FFFFFF 33% 63%, #FF7A1A 63%); }
.ball--beach {
  background:
    radial-gradient(circle at 50% 50%, #FFFFFF 0 13%, rgba(255, 255, 255, 0) 14%),
    conic-gradient(#FF595E 0 60deg, #FFCA3A 0 120deg, #1982C4 0 180deg, #FF595E 0 240deg, #FFCA3A 0 300deg, #1982C4 0);
}
.ball--tennis {
  background:
    radial-gradient(circle at -18% 50%, rgba(255, 255, 255, 0) 0 50%, #FFFFFF 51% 57%, rgba(255, 255, 255, 0) 58%),
    radial-gradient(circle at 118% 50%, rgba(255, 255, 255, 0) 0 50%, #FFFFFF 51% 57%, rgba(255, 255, 255, 0) 58%),
    #D7F04A;
}
.ball--melon { background: repeating-linear-gradient(100deg, #2F7D32 0 9%, #9BD65A 9% 21%); }
.ball--polka {
  background:
    radial-gradient(circle, #FFD6FF 0 20%, rgba(255, 214, 255, 0) 22%) 0 0 / 50% 50%,
    radial-gradient(circle, #FFD6FF 0 20%, rgba(255, 214, 255, 0) 22%) 25% 25% / 50% 50%,
    #7B2CBF;
}
.ball--hoops {
  background:
    linear-gradient(90deg, rgba(43, 26, 14, 0) 48.5%, #2B1A0E 48.5% 51.5%, rgba(43, 26, 14, 0) 51.5%),
    linear-gradient(0deg, rgba(43, 26, 14, 0) 48.5%, #2B1A0E 48.5% 51.5%, rgba(43, 26, 14, 0) 51.5%),
    radial-gradient(circle at -34% 50%, rgba(43, 26, 14, 0) 0 63%, #2B1A0E 63.5% 65.5%, rgba(43, 26, 14, 0) 66%),
    radial-gradient(circle at 134% 50%, rgba(43, 26, 14, 0) 0 63%, #2B1A0E 63.5% 65.5%, rgba(43, 26, 14, 0) 66%),
    #F77F00;
}
.ball--checker {
  background: conic-gradient(#1B1B1F 0 25%, #F5F5F5 0 50%, #1B1B1F 0 75%, #F5F5F5 0) 0 0 / 50% 50%;
}
.ball--eight {
  background:
    radial-gradient(circle at 44% 40%, #FFFFFF 0 25%, rgba(255, 255, 255, 0) 26%),
    #151518;
}
.ball--marble {
  background:
    radial-gradient(ellipse at 28% 72%, rgba(108, 91, 123, 0.5), rgba(108, 91, 123, 0) 42%),
    linear-gradient(130deg, #ECE8F4 0 30%, #6C5B7B 31% 33%, #ECE8F4 34% 58%, #6C5B7B 59% 60%, #ECE8F4 61%);
}
.ball--neon {
  background:
    linear-gradient(90deg, rgba(0, 245, 212, 0) 42%, #00F5D4 42% 58%, rgba(0, 245, 212, 0) 58%) 0 0 / 33.34% 100%,
    linear-gradient(0deg, rgba(255, 77, 210, 0) 42%, #FF4DD2 42% 58%, rgba(255, 77, 210, 0) 58%) 0 0 / 100% 33.34%,
    #121230;
}
.ball--planet {
  background:
    radial-gradient(circle at 30% 38%, #62D26F 0 15%, rgba(98, 210, 111, 0) 16%),
    radial-gradient(circle at 66% 62%, #62D26F 0 19%, rgba(98, 210, 111, 0) 20%),
    linear-gradient(180deg, #FFFFFF 0 9%, rgba(255, 255, 255, 0) 9% 91%, #FFFFFF 91%),
    linear-gradient(160deg, #3A5BE0, #4CC9F0);
}
.ball--gold { background: linear-gradient(135deg, #FFF2B0 0%, #FFCB45 35%, #B8860B 75%, #FFCB45 100%); }

/* Gold gem: a rotated rounded square. */
.gem {
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background: linear-gradient(135deg, #FFF1BF 0%, #FFC93C 45%, #E09C00 100%);
  box-shadow: 0 6px 12px -6px rgba(10, 14, 36, 0.6);
  transform: rotate(45deg);
}

/* Soft cloud. */
.cloud {
  position: absolute;
  width: 150px;
  height: 46px;
  border-radius: 999px;
  background: var(--cloud);
  opacity: var(--cloud-opacity);
}
.cloud::before,
.cloud::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: inherit;
}
.cloud::before { width: 66px; height: 66px; left: 24px; top: -32px; }
.cloud::after { width: 50px; height: 50px; left: 76px; top: -22px; }

@media (prefers-reduced-motion: no-preference) {
  .cloud { animation: drift 22s ease-in-out infinite alternate; }
  .cloud:nth-of-type(2n) { animation-duration: 28s; animation-delay: -6s; }
  .gem { animation: bob 3.4s ease-in-out infinite; }
  .gem:nth-of-type(2n) { animation-delay: -1.2s; }
  .gem:nth-of-type(3n) { animation-delay: -2.1s; }
}

@keyframes drift {
  from { transform: translateX(-18px); }
  to { transform: translateX(26px); }
}
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(45deg); }
  50% { transform: translateY(-10px) rotate(45deg); }
}
@keyframes roll {
  to { transform: rotate(360deg); }
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  color: #FFFFFF;
  --focus: #FFFFFF;
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #FFFFFF;
  text-decoration: none;
}
.brand .ball { --size: 30px; transition: transform 0.5s ease; }
.brand:hover .ball { transform: rotate(200deg); }
.brand-name {
  font-family: var(--font-head);
  font-size: 1.65rem;
  line-height: 1;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 0 rgba(31, 59, 115, 0.55);
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #FFFFFF;
  font: 500 1rem/1 var(--font-body);
  text-decoration: none;
  cursor: pointer;
}
.nav-toggle:hover { background: rgba(255, 255, 255, 0.26); }

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before,
.nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.site-header.is-open .nav-toggle-bars { background: transparent; }
.site-header.is-open .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.site-header.is-open .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a:not(.btn) {
  color: #FFFFFF;
  font-weight: 500;
  text-decoration: none;
}
.site-nav a:not(.btn):hover { text-decoration: underline; text-decoration-thickness: 2px; }

/* Phones: the nav folds under the Menu button (without JavaScript, Menu jumps to the footer links). */
@media (max-width: 859.98px) {
  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--header-bg);
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 18px 30px -18px rgba(10, 14, 36, 0.6);
  }
  .site-header.is-open .site-nav { display: block; }
  .site-nav ul {
    display: grid;
    gap: 4px;
    padding: 10px var(--gutter) 18px;
  }
  .site-nav a:not(.btn) {
    display: block;
    padding: 12px 6px;
    font-size: 1.1rem;
  }
  .site-nav .btn { margin-top: 8px; width: 100%; }
}

@media (min-width: 860px) {
  .nav-toggle { display: none; }
  .site-nav ul {
    display: flex;
    align-items: center;
    gap: 26px;
  }
}

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

.hero {
  position: relative;
  overflow: hidden;
  background: var(--hero-top);
}

.hero-copy {
  position: relative;
  z-index: 2;
  padding: 40px 0 28px;
  text-align: center;
}
.hero-copy .container { position: relative; z-index: 1; max-width: calc(760px + var(--gutter) * 2); }

.hero-title { margin: 0 auto 6px; }

.hero-logo {
  width: min(100%, 600px);
  margin-inline: auto;
  font-family: var(--font-head);
  font-size: 3.5rem;
  line-height: 1.1;
  color: #FFFFFF;
}

/* Text wordmark: shown only if img/logo.png is missing (site.js marks it). */
.wordmark {
  display: none;
  font-family: var(--font-head);
  font-size: clamp(3.6rem, 2rem + 8vw, 6.5rem);
  line-height: 1;
  letter-spacing: 0.02em;
  color: #FFFFFF;
  text-shadow:
    3px 0 0 #FF7A1A, -3px 0 0 #FF7A1A, 0 3px 0 #FF7A1A, 0 -3px 0 #FF7A1A,
    2px 2px 0 #FF7A1A, -2px -2px 0 #FF7A1A, 2px -2px 0 #FF7A1A, -2px 2px 0 #FF7A1A,
    0 8px 0 #1F3B73;
}
.is-missing > img { display: none; }
.is-missing > .wordmark { display: block; }

.hero-pitch {
  margin: 0 auto 14px;
  font-family: var(--font-head);
  font-size: clamp(1.5rem, 1.05rem + 2vw, 2.25rem);
  line-height: 1.15;
  text-shadow: 0 2px 0 rgba(31, 59, 115, 0.45);
}

.hero-text {
  max-width: 34em;
  margin: 0 auto 26px;
  font-size: 1.125rem;
}

.hero-note {
  margin: 18px 0 0;
  font-size: 0.95rem;
  font-weight: 500;
  opacity: 0.95;
}
.hero-note span { white-space: nowrap; }
.hero-note span + span::before { content: "\00B7"; margin: 0 0.6em; }

.hero-art {
  position: relative;
  padding: 26px 0 96px;
  background: linear-gradient(180deg, var(--hero-top) 0%, var(--hero-bottom) 100%);
}

.hero-road {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
}
.hero-road path { fill: none; stroke-linecap: round; }
.hero-road .road-edge { stroke: #1F3B73; stroke-width: 74; }
.hero-road .road-top { stroke: var(--road); stroke-width: 58; }
.hero-road .road-line { stroke: #BFD8F7; stroke-width: 4; stroke-dasharray: 18 26; }

.hero-frame {
  position: relative;
  z-index: 2;
  max-width: 980px;
  margin-inline: auto;
  aspect-ratio: 4 / 3;
  border-radius: 20px;
  overflow: hidden;
  border: 4px solid var(--road);
  box-shadow: 0 0 0 3px #1F3B73, 0 30px 60px -28px rgba(10, 14, 36, 0.75);
  background:
    radial-gradient(circle at 70% 50%, #FF7A1A 0 9%, rgba(255, 122, 26, 0) 9.2%),
    linear-gradient(180deg, #309EFD 0%, #C5EFFF 100%);
}
.hero-frame img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 80% 50%;
  font-size: 1rem;
  color: #1C2541;
}

.hero .cloud.c1 { left: 3%; top: 14%; }
.hero .cloud.c2 { right: 4%; top: 46%; width: 120px; }
.hero .cloud.c3 { left: 8%; bottom: 18%; }
.hero .gem.g1 { left: 6%; top: 40%; }
.hero .gem.g2 { right: 9%; top: 16%; }
.hero .gem.g3 { right: 14%; bottom: 20%; }

@media (max-width: 599.98px) {
  .hero .gem,
  .hero .cloud { display: none; }
}

@media (min-width: 600px) {
  .hero-frame {
    aspect-ratio: 16 / 9;
    border-radius: 28px;
    border-width: 6px;
  }
  .hero-frame img { object-position: 50% 50%; }
}

/* Wide screens: the key art fills the hero and the text sits on its open sky (left side).
   The hero height follows the width, so the road in the art never runs under the text. */
@media (min-width: 1180px) {
  .hero {
    display: flex;
    align-items: center;
    min-height: clamp(560px, 46vw, 740px);
    background: linear-gradient(180deg, #309EFD 0%, #C5EFFF 100%);
  }
  .hero-copy {
    flex: 1;
    padding: 48px 0 104px;
    text-align: left;
    color: #1C2541;
    --focus: #1C2541;
  }
  .hero-copy .container { max-width: calc(var(--container) + var(--gutter) * 2); }
  .hero-copy .container > * { max-width: min(500px, 40vw); }
  .hero-logo { width: 100%; margin-inline: 0; }
  .hero-title { margin: 0 0 10px; }
  .hero-pitch {
    margin-inline: 0;
    font-size: 2.35rem;
    text-shadow: 0 2px 0 rgba(255, 255, 255, 0.55);
  }
  .hero-text { margin-inline: 0; }
  .hero-copy .btn-row { justify-content: flex-start; }
  .hero .btn-ghost {
    background: rgba(255, 255, 255, 0.55);
    color: #1C2541;
    box-shadow: inset 0 0 0 2px #1C2541;
  }
  .hero .btn-ghost:hover { background: rgba(255, 255, 255, 0.8); }
  .hero .badge-play:focus-visible { outline-color: #1C2541; }
  .wordmark { font-size: 6rem; }

  .hero-art {
    position: absolute;
    inset: 0;
    z-index: 1;
    padding: 0;
    background: none;
  }
  .hero-art .container { max-width: none; padding: 0; }
  .hero-frame {
    position: absolute;
    inset: 0;
    z-index: 0;
    max-width: none;
    aspect-ratio: auto;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: none;
  }
  .hero-frame img {
    position: absolute;
    top: 0;
    right: 0;
    width: auto;
    max-width: none;
    height: 100%;
    object-fit: initial;
    -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0) 0, #000 16%);
    mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0) 0, #000 16%);
  }
  .hero-frame.is-missing {
    background:
      radial-gradient(circle at 74% 52%, #FF7A1A 0 7%, rgba(255, 122, 26, 0) 7.2%);
  }
  .hero-road,
  .hero .cloud,
  .hero .gem { display: none; }
}

/* Wavy road edge at the bottom of the sky. */
.sky-edge {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  z-index: 3;
  width: 100%;
  height: 56px;
  max-width: none;
}
.sky-edge .fill { fill: var(--bg); }
.sky-edge .line { fill: none; stroke: #1F3B73; stroke-width: 4; }

/* ---------- Sections ---------- */

.section { padding: 64px 0; }
.section-alt { background: var(--surface-alt); }

@media (min-width: 860px) {
  .section { padding: 88px 0; }
}

.section-head {
  max-width: 44rem;
  margin: 0 auto 40px;
  text-align: center;
}
.section-head p { color: var(--muted); font-size: 1.1rem; margin: 0; }

.eyebrow {
  display: inline-block;
  margin: 0 0 12px;
  padding: 5px 14px;
  border-radius: 999px;
  background: var(--eyebrow-bg);
  color: var(--eyebrow-ink);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.section-head p.eyebrow { color: var(--eyebrow-ink); font-size: 0.82rem; margin-bottom: 12px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.grid {
  display: grid;
  gap: 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}
@media (min-width: 600px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 860px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* Features and steps: the icon or number sits on the same row as the title. */
.feature,
.step {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 14px;
  align-items: center;
  align-content: start;
}
.feature h3,
.step h3 { margin: 0; }
.feature p,
.step p { grid-column: 1 / -1; margin: 14px 0 0; color: var(--muted); }

/* Features */
.feature { padding: 24px; }

.feature-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(160deg, #4B86EC 0%, #2F6FE0 100%);
  color: #FFFFFF;
  box-shadow: 0 4px 0 #1F3B73;
}
.feature-icon svg { width: 26px; height: 26px; }

/* How to play */
.steps { counter-reset: step; }
.step {
  position: relative;
  padding: 26px 24px 24px;
}
.step-num {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-head);
  font-size: 1.45rem;
  line-height: 1;
  box-shadow: 0 3px 0 var(--accent-shadow);
}

/* Level twists */
.twists { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.twist {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px;
}
.twist h3 { font-size: 1.2rem; margin: 2px 0 4px; }
.twist p { margin: 0; color: var(--muted); font-size: 1rem; }
.twist-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--icon-bg);
  color: var(--icon-ink);
}
.twist-icon svg { width: 26px; height: 26px; }

.twist-note {
  align-items: center;
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
}
.twist-note p { font-size: 0.98rem; }
.twist-note .gem {
  position: relative;
  flex: none;
  width: 16px;
  height: 16px;
  margin: 0 8px 0 6px;
  animation: none;
}

/* Infinity */
.grid-narrow { max-width: 920px; margin-inline: auto; }
.mode { overflow: hidden; }
.mode-band {
  height: 92px;
  position: relative;
}
.mode-band--classic {
  background: linear-gradient(90deg,
    #2F6FE0 0 11.11%, #0F9D8F 0 22.22%, #6FA8DC 0 33.33%, #FF9F43 0 44.44%, #2E7D5B 0 55.55%,
    #0B1033 0 66.66%, #2B2D42 0 77.77%, #4C2A85 0 88.88%, #5E8BFF 0);
}
.mode-band--snow {
  background:
    radial-gradient(circle at 20% 40%, rgba(255, 255, 255, 0.95) 0 3px, rgba(255, 255, 255, 0) 4px),
    radial-gradient(circle at 46% 22%, rgba(255, 255, 255, 0.9) 0 2px, rgba(255, 255, 255, 0) 3px),
    radial-gradient(circle at 72% 58%, rgba(255, 255, 255, 0.95) 0 3px, rgba(255, 255, 255, 0) 4px),
    radial-gradient(circle at 88% 26%, rgba(255, 255, 255, 0.9) 0 2px, rgba(255, 255, 255, 0) 3px),
    linear-gradient(180deg, #6FA8DC 0%, #EAF4FF 100%);
}
.mode-band .ball {
  --size: 52px;
  position: absolute;
  left: 24px;
  bottom: -26px;
  z-index: 1;
  border: 3px solid var(--surface);
  box-sizing: content-box;
}
.mode-body { padding: 40px 24px 26px; }
.mode-body h3 { margin-bottom: 8px; }
.mode-body p { margin: 0; color: var(--muted); }
.mode-tag {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--icon-bg);
  color: var(--icon-ink);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  vertical-align: middle;
}

/* Balls */
.chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  max-width: 54rem;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 18px 7px 7px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow);
  font-family: var(--font-head);
  font-size: 1.15rem;
  line-height: 1;
}
.chip .ball { --size: 34px; }
@media (prefers-reduced-motion: no-preference) {
  .chip .ball { transition: transform 0.6s ease; }
  .chip:hover .ball { transform: rotate(240deg); }
}

/* Screenshot gallery: phone frames in a sideways scroller. */
.gallery-scroll {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: max(var(--gutter), calc((100% - var(--container)) / 2));
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.gallery-scroll:focus-visible { outline-offset: -3px; border-radius: 0; }
.gallery {
  display: flex;
  gap: 20px;
  width: max-content;
  margin: 0;
  padding: 10px max(var(--gutter), calc((100vw - var(--container)) / 2)) 30px;
  list-style: none;
}
.gallery > li {
  flex: none;
  width: clamp(168px, 46vw, 236px);
  scroll-snap-align: start;
}
.gallery-hint {
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}
/* Wide screens: all six phones fit in one row, no scrolling needed. */
@media (min-width: 1180px) {
  .gallery { width: auto; justify-content: center; padding-inline: 24px; }
  .gallery > li { width: clamp(168px, calc((100vw - 190px) / 6), 216px); }
  .gallery-hint { display: none; }
}

.phone { margin: 0; }
.phone-body {
  padding: 8px;
  border-radius: 34px;
  background: #0F1530;
  box-shadow: inset 0 0 0 2px #2B355E, var(--shadow-lift);
}
.phone-screen {
  position: relative;
  aspect-ratio: 9 / 16;
  border-radius: 26px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 66%, #FF7A1A 0 9%, rgba(255, 122, 26, 0) 9.5%),
    linear-gradient(180deg, #2F6FE0 0%, #BFE2FF 100%);
}
.phone-screen::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 30%;
  width: 46%;
  height: 80%;
  border-radius: 40% 40% 0 0;
  background: #FFFFFF;
  box-shadow: 0 0 0 5px #1F3B73;
  transform: translateX(-50%) perspective(200px) rotateX(38deg);
  transform-origin: 50% 100%;
}
.phone-screen img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  font-size: 0.85rem;
  color: #FFFFFF;
}
.phone figcaption {
  margin-top: 14px;
  text-align: center;
  font-family: var(--font-head);
  font-size: 1.15rem;
  line-height: 1.2;
}

/* FAQ */
.faq,
.faq-col {
  display: grid;
  gap: 12px;
  align-content: start;
}
.faq { max-width: 50rem; margin: 0 auto; }
/* Two columns on wide screens; each column grows on its own when a question opens. */
@media (min-width: 860px) {
  .faq { grid-template-columns: 1fr 1fr; gap: 16px; max-width: none; align-items: start; }
  .faq-col { gap: 16px; }
}
.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.faq summary {
  position: relative;
  padding: 18px 60px 18px 22px;
  font-family: var(--font-head);
  font-size: 1.2rem;
  line-height: 1.25;
  list-style: none;
  cursor: pointer;
  border-radius: 18px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 50%;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-top: -15px;
  border-radius: 50%;
  background: var(--icon-bg);
  color: var(--icon-ink);
  font-family: var(--font-body);
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1;
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq-answer { padding: 0 22px 20px; color: var(--muted); }
.faq-answer p { margin: 0; }

/* Final call to action */
.section.section-cta { padding-top: 8px; }
.cta {
  position: relative;
  overflow: hidden;
  padding: 52px 24px;
  border-radius: 32px;
  text-align: center;
  background: linear-gradient(180deg, #2F6FE0 0%, #2F6FE0 70%, #4A88EA 100%);
  box-shadow: 0 0 0 3px #1F3B73, var(--shadow-lift);
}
@media (prefers-color-scheme: dark) {
  .cta { background: linear-gradient(180deg, #152B5C 0%, #1B2A5A 100%); box-shadow: 0 0 0 2px #2D3354, var(--shadow-lift); }
}
.cta h2 { text-shadow: 0 3px 0 rgba(31, 59, 115, 0.5); }
.cta p { max-width: 30rem; margin: 0 auto 24px; font-size: 1.1rem; }
.cta-inner { position: relative; z-index: 1; }
.cta .ball { --size: 74px; display: block; margin: 0 auto 18px; }
@media (prefers-reduced-motion: no-preference) {
  .cta .ball { animation: roll 6s linear infinite; }
}
.cta .cloud.c1 { left: -30px; top: 30px; }
.cta .cloud.c2 { right: -20px; bottom: 34px; }
.cta .gem.g1 { left: 12%; bottom: 22%; }
.cta .gem.g2 { right: 13%; top: 20%; }
@media (max-width: 599.98px) {
  .cta .gem { display: none; }
}

/* ---------- Inner pages ---------- */

.page-hero {
  position: relative;
  padding: 48px 0 104px;
  text-align: center;
  background: linear-gradient(180deg, var(--hero-top) 0%, var(--hero-top) 55%, #3A78E4 100%);
  overflow: hidden;
}
@media (prefers-color-scheme: dark) {
  .page-hero { background: linear-gradient(180deg, var(--hero-top) 0%, #101C42 100%); }
}
.page-hero h1 {
  position: relative;
  z-index: 1;
  margin: 0 0 10px;
  font-size: clamp(2.2rem, 1.5rem + 3vw, 3.4rem);
  text-shadow: 0 3px 0 rgba(31, 59, 115, 0.5);
}
.page-hero p { position: relative; z-index: 1; max-width: 36rem; margin: 0 auto; font-size: 1.1rem; }
.page-hero .cloud.c1 { left: 4%; top: 22%; }
.page-hero .cloud.c2 { right: 3%; top: 54%; width: 120px; }
@media (max-width: 599.98px) {
  .page-hero .cloud { display: none; }
}

.page-body { position: relative; z-index: 4; margin-top: -40px; padding: 0 0 72px; }

.paper {
  max-width: 50rem;
  margin: 0 auto;
  padding: 28px 22px;
}
@media (min-width: 600px) {
  .paper { padding: 44px 48px; }
}

.prose h2 {
  margin: 1.9em 0 0.5em;
  font-size: clamp(1.5rem, 1.25rem + 1vw, 1.9rem);
}
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin: 1.4em 0 0.4em; font-size: 1.2rem; }
.prose ul, .prose ol { margin: 0 0 1em; }
.prose li { margin-bottom: 0.4em; }
.prose li::marker { color: var(--accent); }
.prose address { font-style: normal; margin-bottom: 1em; }
.prose strong { font-weight: 600; }

.meta-line {
  display: inline-block;
  margin: 0 0 1.6em;
  padding: 4px 14px;
  border-radius: 999px;
  background: var(--icon-bg);
  color: var(--icon-ink);
  font-size: 0.95rem;
  font-weight: 500;
}

.summary-list {
  display: grid;
  gap: 10px;
  margin: 0 0 1.5em;
  padding: 18px 20px;
  list-style: none;
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
}
.summary-list li {
  position: relative;
  margin: 0;
  padding-left: 30px;
}
.summary-list li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.55em;
  width: 12px;
  height: 7px;
  border-left: 3px solid var(--accent);
  border-bottom: 3px solid var(--accent);
  transform: rotate(-45deg);
}

.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 2em;
  padding: 0;
  list-style: none;
}
.toc a {
  display: inline-block;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--icon-bg);
  color: var(--icon-ink);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
}
.toc a:hover { text-decoration: underline; }

.contact-box {
  margin-top: 2em;
  padding: 22px;
  border-radius: var(--radius);
  background: var(--surface-alt);
}
.contact-box h2 { margin-top: 0; }
.contact-box .btn { margin-top: 6px; }

/* Press kit */
.facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 10px 22px;
  margin: 0 0 1.5em;
  padding: 20px 22px;
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
}
.facts dt { font-weight: 600; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 420px) {
  .facts { grid-template-columns: 1fr; gap: 2px; }
  .facts dd { margin-bottom: 10px; }
}

.logo-box {
  display: grid;
  place-items: center;
  min-height: 150px;
  padding: 28px 20px;
  margin: 0 0 12px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #2F6FE0 0%, #BFE2FF 100%);
}
.logo-box img { width: min(100%, 460px); font-family: var(--font-head); font-size: 2rem; color: #FFFFFF; }
.logo-box .wordmark { font-size: clamp(2.6rem, 1.8rem + 4vw, 4rem); }

.download-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 0 0 1.5em;
  padding: 0;
  list-style: none;
}
.download-list a { font-weight: 500; }

.shots-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin: 0 0 1.5em;
  padding: 0;
  list-style: none;
}
@media (min-width: 600px) {
  .shots-grid { grid-template-columns: repeat(3, 1fr); }
}
.shots-grid .phone figcaption { font-size: 1rem; }
.shots-grid .phone figcaption a { display: block; margin-top: 4px; font-family: var(--font-body); font-size: 0.9rem; font-weight: 500; }

/* 404 */
.lost {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  display: grid;
  place-items: center;
  padding: 56px 0 96px;
  text-align: center;
  background: linear-gradient(180deg, var(--hero-top) 0%, var(--hero-top) 78%, var(--hero-bottom) 100%);
  overflow: hidden;
}
.lost h1 {
  position: relative;
  z-index: 1;
  font-size: clamp(2.4rem, 1.6rem + 4vw, 4rem);
  text-shadow: 0 3px 0 rgba(31, 59, 115, 0.5);
}
.lost p { position: relative; z-index: 1; max-width: 30rem; margin: 0 auto 26px; font-size: 1.15rem; }
.lost .btn-row { position: relative; z-index: 1; }
.lost-art { position: relative; z-index: 1; width: min(100%, 360px); margin: 0 auto 22px; }
.lost-art .road-edge { fill: none; stroke: #1F3B73; stroke-width: 34; stroke-linecap: round; }
.lost-art .road-top { fill: none; stroke: var(--road); stroke-width: 24; stroke-linecap: round; }
.lost-art .ball-shape { fill: #FF7A1A; }
.lost-art .ball-band { fill: #FFFFFF; }
.lost-art .road-gap { fill: none; stroke: #FFFFFF; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 2 8; opacity: 0.8; }
.lost .cloud.c1 { left: 6%; top: 18%; }
.lost .cloud.c2 { right: 6%; top: 60%; width: 120px; }
@media (max-width: 599.98px) {
  .lost .cloud { display: none; }
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--footer-bg);
  color: #DCE3F7;
  --link: #FFFFFF;
  --focus: #FFC93C;
  padding: 56px 0 28px;
  font-size: 0.98rem;
}
.footer-grid {
  display: grid;
  gap: 32px;
}
@media (min-width: 700px) {
  .footer-grid { grid-template-columns: 1.4fr 2fr 1.2fr; }
}
.footer-brand p { margin: 12px 0 0; max-width: 18rem; }
.footer-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.footer-title {
  margin: 0 0 12px;
  font-family: var(--font-head);
  font-size: 1.15rem;
  color: #FFFFFF;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.site-footer a { color: #FFFFFF; text-decoration: none; }
/* Tall enough to tap with a finger. */
.site-footer li a { display: inline-block; padding: 6px 0; }
.site-footer a:hover { text-decoration: underline; }
.site-footer address { font-style: normal; line-height: 1.7; }
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 24px;
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.9rem;
  color: #B9C3E2;
}
.footer-legal p { margin: 0; }

/* ---------- Motion off ---------- */

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