/* Game Challenger — marketing site.
 * The palette is taken from the app's own neon-arcade home so the page and the
 * product look like the same thing. */

:root {
  --ink: #eaf0ff;
  --ink-soft: rgba(202, 217, 255, 0.72);
  --ink-faint: rgba(202, 217, 255, 0.46);
  --bg: #06091f;
  --bg-2: #0d1240;
  --bg-3: #150a35;
  --cyan: #22d3ee;
  --violet: #7c5cff;
  --pink: #ec4899;
  --amber: #f59e0b;
  --card: rgba(255, 255, 255, 0.055);
  --card-line: rgba(160, 190, 255, 0.18);
  --radius: 20px;
  --display: 'Baloo 2', system-ui, sans-serif;
  --body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --wrap: 1140px;
}

* { box-sizing: border-box; }

/* The nav is sticky, so an anchor jump has to stop short of it or the heading
 * it lands on ends up hidden underneath. The mobile value is larger because the
 * links wrap onto a second row there. */
html { scroll-behavior: smooth; scroll-padding-top: 86px; }
@media (max-width: 900px) { html { scroll-padding-top: 122px; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--body);
  font-weight: 600;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* The neon glow is painted by its own fixed layer rather than by
 * `background-attachment: fixed` on the body. That property repaints the whole
 * page on every scroll frame, iOS Safari drops it as the URL bar moves, and it
 * leaves everything below the first screen white when the page is printed or
 * captured full-height. A fixed element has none of those problems. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(1200px 780px at 6% -14%, rgba(124, 92, 255, 0.4), transparent 56%),
    radial-gradient(1040px 720px at 118% 2%, rgba(6, 214, 226, 0.3), transparent 54%),
    radial-gradient(940px 940px at 50% 118%, rgba(236, 72, 153, 0.24), transparent 58%),
    linear-gradient(168deg, var(--bg) 0%, var(--bg-2) 48%, var(--bg-3) 100%);
}

h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.08; margin: 0; }
a { color: inherit; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: #fff; color: #06091f; padding: 10px 16px; border-radius: 0 0 10px 0;
}
.skip:focus { left: 0; }

/* ------------------------------------------------------------------ nav */
.nav {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 18px;
  padding: 14px clamp(16px, 4vw, 34px);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(6, 9, 31, 0.55);
  border-bottom: 1px solid transparent;
  transition: background 0.25s ease, border-color 0.25s ease, padding 0.25s ease;
}
.nav.shrunk {
  padding-block: 9px;
  background: rgba(6, 9, 31, 0.86);
  border-bottom-color: var(--card-line);
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--display); font-weight: 800; font-size: 1.06rem;
  text-decoration: none; letter-spacing: 0.01em;
}
.brand img { border-radius: 9px; }
.nav-links { display: flex; gap: 22px; margin-left: auto; }
.nav-links a {
  text-decoration: none; color: var(--ink-soft); font-size: 0.92rem; font-weight: 700;
  transition: color 0.18s ease;
}
.nav-links a:hover { color: var(--ink); }

.lang { position: relative; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 7px;
  font: inherit; font-weight: 800; font-size: 0.86rem; color: var(--ink);
  background: var(--card); border: 1px solid var(--card-line);
  border-radius: 999px; padding: 7px 13px; cursor: pointer;
  letter-spacing: 0.04em;
}
.lang-btn svg { width: 15px; height: 15px; opacity: 0.8; flex: none; }
.lang-btn:hover { border-color: rgba(125, 249, 255, 0.5); }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 50;
  margin: 0; padding: 6px; list-style: none; min-width: 190px;
  background: #0c1136; border: 1px solid var(--card-line); border-radius: 14px;
  box-shadow: 0 24px 50px -20px #000;
}
.lang-menu li {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 9px; cursor: pointer; font-size: 0.9rem;
}
.lang-menu li:hover { background: rgba(255, 255, 255, 0.07); }
.lang-menu .code { margin-left: auto; color: var(--ink-faint); font-size: 0.76rem; font-weight: 800; }

/* ----------------------------------------------------------------- hero */
.hero {
  max-width: var(--wrap); margin-inline: auto;
  padding: clamp(36px, 7vw, 76px) clamp(16px, 4vw, 34px) clamp(20px, 4vw, 40px);
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(24px, 5vw, 56px);
  align-items: center;
}
.eyebrow {
  margin: 0 0 12px; font-family: var(--display); font-weight: 800;
  font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--cyan);
}
.hero h1 {
  font-size: clamp(1.88rem, 5.4vw, 3.6rem);
  text-shadow: 0 0 30px rgba(124, 92, 255, 0.45);
}
.lede { color: var(--ink-soft); font-size: clamp(1rem, 1.5vw, 1.12rem); margin: 18px 0 26px; max-width: 46ch; }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.store-badge {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 11px 22px 11px 18px; border-radius: 14px; text-decoration: none;
  color: #0a1030; background: linear-gradient(120deg, var(--cyan), #b6a2ff 60%, var(--pink));
  box-shadow: 0 14px 34px -14px rgba(34, 211, 238, 0.9);
  transition: transform 0.16s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
}
.store-badge:hover { transform: translateY(-2px); box-shadow: 0 20px 44px -14px rgba(236, 72, 153, 0.9); }
.store-badge-icon { font-size: 1.2rem; }
.store-badge-text { display: grid; line-height: 1.15; }
.store-badge-text small { font-size: 0.66rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.75; }
.store-badge-text strong { font-family: var(--display); font-size: 1.08rem; }

.btn-ghost {
  display: inline-flex; align-items: center; padding: 11px 20px;
  border-radius: 14px; text-decoration: none; font-weight: 800; font-size: 0.94rem;
  color: var(--ink); background: var(--card); border: 1px solid var(--card-line);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.btn-ghost:hover { border-color: rgba(125, 249, 255, 0.55); background: rgba(255, 255, 255, 0.09); }

.hero-bullets { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 9px; }
.hero-bullets li {
  position: relative; padding-left: 26px; color: var(--ink-soft); font-size: 0.95rem;
}
.hero-bullets li::before {
  content: '✓'; position: absolute; left: 0; top: -1px;
  color: var(--cyan); font-weight: 800;
}

/* phones */
.hero-art { position: relative; display: grid; place-items: center; min-height: 460px; }
.phone {
  border-radius: 26px; overflow: hidden; background: #0a0e28;
  border: 2px solid rgba(160, 190, 255, 0.22);
  box-shadow: 0 40px 80px -30px #000, 0 0 60px -22px rgba(124, 92, 255, 0.8);
}
.phone img { display: block; width: 100%; height: auto; }
.phone-front { position: relative; z-index: 3; width: min(250px, 62%); }
.phone-back, .phone-side {
  position: absolute; z-index: 1; width: min(190px, 46%); opacity: 0.72;
  filter: saturate(0.92);
}
.phone-back { left: 0; top: 8%; transform: rotate(-7deg); }
.phone-side { right: 0; bottom: 6%; transform: rotate(7deg); }

/* ---------------------------------------------------------------- stats */
.stats {
  max-width: var(--wrap); margin: 8px auto 0;
  padding: 18px clamp(16px, 4vw, 34px);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; text-align: center;
}
.stats div {
  padding: 16px 8px; border-radius: 16px;
  background: var(--card); border: 1px solid var(--card-line);
}
.stats b {
  display: block; font-family: var(--display); font-size: clamp(1.5rem, 3vw, 2.1rem);
  background: linear-gradient(120deg, var(--cyan), #b6a2ff);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.stats span { font-size: 0.74rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint); }

/* ------------------------------------------------------------- sections */
.section { max-width: var(--wrap); margin-inline: auto; padding: clamp(44px, 7vw, 82px) clamp(16px, 4vw, 34px); }
.section-header { text-align: center; margin-bottom: clamp(26px, 4vw, 44px); }
.section-header h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); }
.section-sub { color: var(--ink-soft); margin: 12px auto 0; max-width: 52ch; }

/* packs */
/* Flex rather than grid: with five cards an auto-fit grid leaves a lone card
 * stranded on the second row, while `justify-content: center` centres whatever
 * is left over at every width. */
.pack-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.pack {
  flex: 1 1 300px; max-width: 356px;
  padding: 22px 20px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--card-line);
  transition: transform 0.18s ease, border-color 0.2s ease;
}
.pack:hover { transform: translateY(-4px); border-color: rgba(125, 249, 255, 0.45); }
.pack-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pack-icon { font-size: 1.7rem; }
.pack-count { font-family: var(--display); font-weight: 800; font-size: 1.5rem; color: var(--cyan); }
.pack h3 { margin: 12px 0 6px; font-size: 1.16rem; }
.pack p { margin: 0 0 12px; color: var(--ink-soft); font-size: 0.9rem; }
.pack ul { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.pack li {
  font-size: 0.74rem; font-weight: 800; padding: 4px 9px; border-radius: 999px;
  color: var(--ink-soft); background: rgba(255, 255, 255, 0.06); border: 1px solid var(--card-line);
}

/* screenshots */
.shot-rail {
  display: flex; gap: 18px; overflow-x: auto; padding: 6px 2px 20px;
  scroll-snap-type: x mandatory; scrollbar-width: thin;
  scrollbar-color: rgba(160, 190, 255, 0.35) transparent;
  /* Ten shots never fit, so the edges fade to say "there is more this way".
   * app.js drops the fade on whichever end has been reached, so the first and
   * last screenshot are never dimmed for no reason. */
  --fade-l: 44px;
  --fade-r: 44px;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 var(--fade-l),
    #000 calc(100% - var(--fade-r)), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 var(--fade-l),
    #000 calc(100% - var(--fade-r)), transparent 100%);
}
.shot-rail.at-start { --fade-l: 0px; }
.shot-rail.at-end { --fade-r: 0px; }
.shot-rail::-webkit-scrollbar { height: 7px; }
.shot-rail::-webkit-scrollbar-thumb { background: rgba(160, 190, 255, 0.35); border-radius: 4px; }
.shot { flex: 0 0 auto; width: 214px; scroll-snap-align: center; text-align: center; }
.shot img {
  display: block; width: 100%; height: auto; border-radius: 22px;
  border: 2px solid rgba(160, 190, 255, 0.2); background: #0a0e28;
  box-shadow: 0 26px 54px -26px #000;
}
.shot span {
  display: block; margin-top: 10px; font-size: 0.8rem; font-weight: 800;
  color: var(--ink-faint); letter-spacing: 0.06em;
}

/* features */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(258px, 1fr)); gap: 16px; }
.feature {
  padding: 22px 20px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--card-line);
}
.feature-icon {
  width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center;
  font-size: 1.25rem; margin-bottom: 14px;
  background: linear-gradient(140deg, rgba(34, 211, 238, 0.24), rgba(236, 72, 153, 0.22));
  border: 1px solid var(--card-line);
}
.feature h3 { font-size: 1.08rem; margin-bottom: 7px; }
.feature p { margin: 0; color: var(--ink-soft); font-size: 0.92rem; }

/* faq */
.faq-list { max-width: 780px; margin-inline: auto; display: grid; gap: 10px; }
.faq-item {
  border-radius: 15px; background: var(--card); border: 1px solid var(--card-line);
  padding: 4px 18px;
}
.faq-item summary {
  cursor: pointer; padding: 14px 0; font-family: var(--display); font-weight: 700;
  font-size: 1rem; list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; float: right; color: var(--cyan); font-size: 1.2rem; line-height: 1; }
.faq-item[open] summary::after { content: '−'; }
.faq-a { padding: 0 0 16px; color: var(--ink-soft); font-size: 0.94rem; }

/* privacy strip */
.privacy-strip {
  display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between;
  max-width: var(--wrap); margin: 0 auto clamp(30px, 5vw, 60px);
  padding: clamp(24px, 4vw, 36px) clamp(20px, 4vw, 34px);
  border-radius: var(--radius); background: var(--card); border: 1px solid var(--card-line);
}
.privacy-strip h2 { font-size: 1.35rem; }
.privacy-strip p { margin: 8px 0 0; color: var(--ink-soft); max-width: 60ch; font-size: 0.95rem; }

/* footer */
.site-footer {
  display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between;
  max-width: var(--wrap); margin-inline: auto;
  padding: 26px clamp(16px, 4vw, 34px) 46px;
  border-top: 1px solid var(--card-line);
  color: var(--ink-faint); font-size: 0.86rem;
}
.site-footer > div { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 800; color: var(--ink-soft); }
.site-footer img { border-radius: 8px; }
.site-footer nav { display: flex; gap: 18px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--ink); }

/* ----------------------------------------------------------- responsive */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; text-align: center; }
  .lede, .hero-bullets { margin-inline: auto; }
  .hero-bullets li { text-align: left; }
  .cta-row { justify-content: center; }

  /* The phones lead on a narrow screen, so they have to be small enough that
   * the headline is still above the fold on a 844px-tall phone. At the old
   * size the whole first screen was artwork and nothing said what the app is. */
  .hero { padding-top: 22px; }
  .hero-art { min-height: 0; order: -1; padding: 2px 0; }
  .phone-front { width: min(178px, 48%); }
  .phone-back, .phone-side { width: min(138px, 37%); }

  /* The links drop to their own row rather than disappearing: there is no
   * hamburger here, so hiding them left a phone with no way to jump sections. */
  .nav { flex-wrap: wrap; row-gap: 8px; }
  .brand { margin-right: auto; }
  .nav-links {
    order: 3; width: 100%; margin-left: 0; justify-content: center; gap: 16px;
    font-size: 0.84rem; overflow-x: auto; scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links a { white-space: nowrap; }
}
@media (max-width: 560px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .shot { width: 172px; }
  /* On a 360px phone every pixel above the fold counts: shrink the art and
   * tighten the spacing so the headline and the sentence under it both land
   * on the first screen. */
  .hero { padding-top: 16px; }
  .phone-front { width: min(152px, 43%); }
  .phone-back, .phone-side { width: min(120px, 33%); }
  .lede { margin: 14px 0 22px; }
  .hero-bullets { margin-top: 20px; }
}
