:root {
  --navy: #1a1a3a;
  --navy-soft: #23234a;
  --blue: #4d84f5;
  --blue-dark: #3a6de0;
  --teal: #00c896;
  --grey: #c4c4d4;
  --bg: #100f22;
  --bg-elevated: #1c1c3d;
  --bg-elevated-2: #24244a;
  --ink: #f5f6fb;
  --ink-soft: #a9a9c6;
  --border: rgba(255, 255, 255, 0.09);
  --radius: 20px;
  --shadow: 0 20px 45px -20px rgba(0, 0, 0, 0.55);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", system-ui, Roboto, Helvetica, Arial, sans-serif;
  /* GSAP's elastic.out(1, .75) sampled at 24 steps — the overshoot-and-settle the
     game fan uses whenever cards rearrange under the cursor. */
  --ease-fan: linear(
    0 0%, 0.296 4.2%, 0.5701 8.3%, 0.7898 12.5%, 0.9453 16.7%, 1.041 20.8%,
    1.0884 25%, 1.1014 29.2%, 1.0932 33.3%, 1.0743 37.5%, 1.0523 41.7%,
    1.032 45.8%, 1.0156 50%, 1.0041 54.2%, 0.997 58.3%, 0.9934 62.5%,
    0.9925 66.7%, 0.9931 70.8%, 0.9945 75%, 0.9961 79.2%, 0.9976 83.3%,
    0.9988 87.5%, 0.9997 91.7%, 1.0002 95.8%, 1 100%
  );
}

* {
  box-sizing: border-box;
}

.icon-sprite {
  display: none;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  user-select: none;
  cursor: default;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
  -webkit-user-drag: none;
  user-drag: none;
  -webkit-touch-callout: none;
}

a,
button,
.btn,
.store-badge,
.card {
  cursor: pointer;
}

.selectable {
  user-select: text;
  cursor: text;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(16, 15, 34, 0.82);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav .wrap {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  flex-shrink: 0;
  object-fit: cover;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink-soft);
  flex-wrap: wrap;
}

.nav-links a:hover {
  color: var(--ink);
}

.lang-switch {
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12.5px;
}

.footer-links .lang-switch {
  border: none;
  padding: 0;
  border-radius: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14.5px;
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 12px 24px -10px rgba(77, 132, 245, 0.6);
}

.btn-primary:hover {
  background: var(--blue-dark);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--ink-soft);
}

.btn-on-dark {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.btn-on-dark:hover {
  background: rgba(255, 255, 255, 0.16);
}

.btn-sm {
  padding: 9px 16px;
  font-size: 13.5px;
}

/* Store badges (App Store / Google Play) — white fill reads better on a dark page */
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: #fff;
  color: #0b0b1a;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 11px;
  padding: 7px 14px 7px 12px;
  white-space: nowrap;
}

.store-badge svg {
  flex-shrink: 0;
}

.store-badge .lines {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.store-badge .lines small {
  font-size: 9.5px;
  font-weight: 600;
  opacity: 0.7;
  letter-spacing: 0.02em;
}

.store-badge .lines strong {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.badge-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.store-badge.sm {
  padding: 5px 11px 5px 9px;
  border-radius: 9px;
  gap: 7px;
}

.store-badge.sm .lines small {
  font-size: 8px;
}

.store-badge.sm .lines strong {
  font-size: 12.5px;
}

.gp-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  display: inline-block;
  background: conic-gradient(from 205deg, #00d2ff 0deg 90deg, #23d97a 90deg 180deg, #ffcd3c 180deg 270deg, #ff4d5e 270deg 360deg);
  clip-path: polygon(18% 2%, 100% 50%, 18% 98%, 18% 2%);
  border-radius: 3px;
}

.store-badge.sm .gp-icon {
  width: 13px;
  height: 13px;
}

/* Hero */
.hero {
  background: radial-gradient(120% 140% at 15% 0%, var(--navy-soft) 0%, var(--navy) 55%, #101026 100%);
  color: #fff;
  overflow: hidden;
  position: relative;
}

.hero .wrap {
  max-width: 1240px;
  display: grid;
  grid-template-columns: 0.85fr 1.3fr;
  align-items: center;
  gap: 48px;
  padding-top: 88px;
  padding-bottom: 64px;
}

.hero .wrap > *,
.nav .wrap > *,
.showcase > *,
.game-showcase > *,
.badge-row {
  min-width: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 13px;
  font-weight: 700;
  color: var(--grey);
  margin-bottom: 20px;
}

.eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
}

.hero h1 {
  font-size: 48px;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin: 0 0 18px;
  font-weight: 800;
}

.hero h1 span {
  color: var(--teal);
}

.hero p.lead {
  font-size: 17.5px;
  line-height: 1.65;
  color: var(--grey);
  max-width: 480px;
  margin: 0 0 30px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero-visual::before {
  content: "";
  position: absolute;
  width: 380px;
  height: 380px;
  background: radial-gradient(closest-side, rgba(77, 132, 245, 0.35), transparent);
  filter: blur(10px);
  z-index: 0;
}

.hero-visual img {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 680px;
  filter: drop-shadow(0 35px 60px rgba(0, 0, 0, 0.55));
}

/* Sections */
section {
  padding: 88px 0;
}

.section-head {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 48px;
}

.section-head.left {
  text-align: left;
  margin: 0 0 20px;
}

.section-head .tag {
  color: var(--blue);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 12px;
  display: block;
}

.section-head h2 {
  font-size: 32px;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  color: var(--ink);
}

.section-head p {
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.6;
  margin: 0;
}

.bg-soft {
  background: var(--bg-elevated);
}

.bg-navy {
  background: var(--navy);
  color: #fff;
}

/* Card grids */
.card {
  background: var(--bg-elevated-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: rgba(255, 255, 255, 0.16);
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 18px;
}

.card-icon.blue {
  background: rgba(77, 132, 245, 0.16);
  color: var(--blue);
}

.card-icon.teal {
  background: rgba(0, 200, 150, 0.16);
  color: var(--teal);
}

.card-icon.navy {
  background: rgba(255, 255, 255, 0.08);
  color: var(--grey);
}

.card h3 {
  font-size: 18px;
  margin: 0 0 8px;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.card p {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0;
}

/* Game showcase (splash-style: fanned art + logo lockup cards, copy on the left) */

/* Every card's transform is composed from these instead of being written as one
   `transform` declaration, so the three things that move a card — the resting fan,
   the hover choreography and the scroll-driven unfold — can each own their own
   variables rather than fighting over a single property. They have to be registered:
   an unregistered custom property is a string and will never transition. */
@property --tx {
  syntax: "<length>";
  inherits: false;
  initial-value: 0px;
}
@property --ty {
  syntax: "<length>";
  inherits: false;
  initial-value: 0px;
}
@property --rot {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}
@property --scale {
  syntax: "<number>";
  inherits: false;
  initial-value: 1;
}
/* Unfold progress: 0 = cards squared up in a single stack, 1 = fully fanned. */
@property --fan {
  syntax: "<number>";
  inherits: false;
  initial-value: 1;
}
@property --rise {
  syntax: "<length>";
  inherits: false;
  initial-value: 0px;
}
@property --pop {
  syntax: "<number>";
  inherits: false;
  initial-value: 1;
}

.game-showcase {
  display: grid;
  grid-template-columns: 0.6fr 1.4fr;
  align-items: center;
  gap: 40px;
}

.game-fan {
  position: relative;
  height: 480px;
  /* Card width drives every offset below, so a breakpoint only has to change --w. */
  --w: 240px;
}

.game-card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--w);
  max-width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-elevated-2);
  transform: translate(-50%, -50%)
    translate(calc(var(--tx) * var(--fan)), calc(var(--ty) * var(--fan) + var(--rise)))
    rotate(calc(var(--rot) * var(--fan)))
    scale(calc(var(--scale) * var(--pop)));
  transition: --tx 0.55s var(--ease-fan), --ty 0.55s var(--ease-fan),
    --rot 0.55s var(--ease-fan), --scale 0.55s var(--ease-fan), box-shadow 0.4s ease;
}

/* Resting fan arrangement */
.game-card-1 {
  --tx: calc(var(--w) * -0.7);
  --ty: calc(var(--w) * 0.11);
  --rot: -12deg;
  --scale: 0.9;
  z-index: 1;
}

.game-card-2 {
  --tx: 0px;
  --ty: 0px;
  --rot: 0deg;
  --scale: 1;
  z-index: 3;
}

.game-card-3 {
  --tx: calc(var(--w) * 0.7);
  --ty: calc(var(--w) * 0.11);
  --rot: 12deg;
  --scale: 0.9;
  z-index: 2;
}

.game-card:hover {
  box-shadow: var(--shadow);
}

/* The hovered card lifts and grows; the rest swing away from it, nearest card first,
   and every card settles with the same elastic overshoot. Gated on a real pointer so
   touch devices never get stuck holding an open fan. */
@media (hover: hover) {
  /* Hovering the left card: it lifts and straightens a touch, the other two slide right */
  .game-fan:has(.game-card-1:hover) .game-card-1 {
    --ty: calc(var(--w) * -0.03);
    --rot: -9deg;
    --scale: 0.98;
  }
  .game-fan:has(.game-card-1:hover) .game-card-2 {
    --tx: calc(var(--w) * 0.36);
    --ty: calc(var(--w) * -0.02);
    --rot: 3deg;
    transition-delay: 0.05s;
  }
  .game-fan:has(.game-card-1:hover) .game-card-3 {
    --tx: calc(var(--w) * 1);
    --ty: calc(var(--w) * 0.07);
    --rot: 15deg;
    transition-delay: 0.1s;
  }

  /* Hovering the middle card: the fan opens symmetrically around it */
  .game-fan:has(.game-card-2:hover) .game-card-2 {
    --ty: calc(var(--w) * -0.13);
    --scale: 1.08;
  }
  .game-fan:has(.game-card-2:hover) .game-card-1 {
    --tx: calc(var(--w) * -1.02);
    --ty: calc(var(--w) * 0.075);
    --rot: -15deg;
    transition-delay: 0.05s;
  }
  .game-fan:has(.game-card-2:hover) .game-card-3 {
    --tx: calc(var(--w) * 1.02);
    --ty: calc(var(--w) * 0.075);
    --rot: 15deg;
    transition-delay: 0.05s;
  }

  /* Hovering the right card: mirror of the left case */
  .game-fan:has(.game-card-3:hover) .game-card-3 {
    --ty: calc(var(--w) * -0.03);
    --rot: 9deg;
    --scale: 0.98;
  }
  .game-fan:has(.game-card-3:hover) .game-card-2 {
    --tx: calc(var(--w) * -0.36);
    --ty: calc(var(--w) * -0.02);
    --rot: -3deg;
    transition-delay: 0.05s;
  }
  .game-fan:has(.game-card-3:hover) .game-card-1 {
    --tx: calc(var(--w) * -1);
    --ty: calc(var(--w) * 0.07);
    --rot: -15deg;
    transition-delay: 0.1s;
  }
}

/* Entry: the deck rises from below and unfolds into the fan as the section scrolls in.
   Scroll-driven rather than time-driven because the section sits well below the fold —
   a load-time animation would be over before anyone reached it. The timeline lives on
   .game-fan, which is never transformed, so the cards' own movement can't feed back
   into the measurement that drives them. Browsers without scroll-driven animations
   simply skip the @supports block and get the resting fan, already visible. */
@keyframes fan-unfold {
  from {
    opacity: 0;
    --fan: 0;
    --rise: calc(var(--w) * 0.58);
    --pop: 0.5;
  }
  60% {
    opacity: 1;
  }
  to {
    opacity: 1;
    --fan: 1;
    --rise: 0px;
    --pop: 1;
  }
}

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .game-fan {
      view-timeline-name: --game-fan-view;
    }
    .game-card {
      animation: fan-unfold ease-out both;
      /* Explicit: progress comes from the timeline, not from a wall-clock duration */
      animation-duration: auto;
      animation-timeline: --game-fan-view;
    }
    .game-card-1 {
      animation-range: entry 6% entry 58%;
    }
    .game-card-2 {
      animation-range: entry 13% entry 65%;
    }
    .game-card-3 {
      animation-range: entry 20% entry 72%;
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  .game-card {
    transition-duration: 0.15s;
    transition-timing-function: ease;
  }
}

.game-card .art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-card .scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(16, 15, 34, 0) 45%, rgba(16, 15, 34, 0.92) 100%);
}

.game-card .logo {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  width: 72%;
  margin: 0 auto;
}

/* Showcase (checklist + image, alternating) */
.showcase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 56px;
}

.showcase.reverse .showcase-copy {
  order: 2;
}

.showcase.reverse .showcase-visual {
  order: 1;
}

.showcase-visual img {
  width: 100%;
  filter: drop-shadow(0 30px 45px rgba(0, 0, 0, 0.5));
}

/* Stat block under a section heading. Each figure sits over its own label in an
   equal column with a hairline rule between, so the numbers read as data rather
   than as a run-on sentence — and a long label ("CATEGORIES") wraps inside its
   own cell instead of pushing the whole row onto a second line. */
.stat-line {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat-line li {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-left: 16px;
  border-left: 1px solid var(--border);
}

.stat-line li:first-child {
  padding-left: 0;
  border-left: 0;
}

.stat-line strong {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.05;
  color: var(--teal);
  letter-spacing: -0.02em;
}

.stat-line span {
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink-soft);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.checklist li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.checklist .check {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--teal);
  color: #08281f;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  margin-top: 1px;
}

.checklist strong {
  display: block;
  font-size: 16px;
  margin-bottom: 3px;
  letter-spacing: -0.01em;
}

.checklist p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--grey);
}

.bg-navy .section-head p {
  color: var(--grey);
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
}

footer .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  gap: 24px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
  flex-wrap: wrap;
}

.footer-links a:hover {
  color: var(--ink);
}

.copyright {
  font-size: 13px;
  color: var(--ink-soft);
}

/* Stub / placeholder page (privacy, terms) */
.doc-hero {
  background: var(--navy);
  color: #fff;
  padding: 64px 0 40px;
}

.doc-hero h1 {
  font-size: 34px;
  margin: 0 0 10px;
  letter-spacing: -0.02em;
}

.doc-hero p {
  color: var(--grey);
  margin: 0;
  font-size: 15px;
}

.placeholder-card {
  max-width: 620px;
  margin: 0 auto;
  text-align: center;
  padding: 64px 32px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
}

.placeholder-card .card-icon {
  margin: 0 auto 18px;
}

.placeholder-card h3 {
  font-size: 20px;
  color: var(--ink);
  margin: 0 0 10px;
}

.placeholder-card p {
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 22px;
}

/* Legal document body (real Privacy Policy / Terms of Service copy) */
.legal-doc {
  max-width: 760px;
  margin: 0 auto;
}

.legal-doc h2 {
  font-size: 21px;
  margin: 40px 0 12px;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.legal-doc h2:first-of-type {
  margin-top: 0;
}

.legal-doc h3 {
  font-size: 16px;
  margin: 22px 0 8px;
  color: var(--ink);
}

.legal-doc p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-soft);
  margin: 0 0 14px;
}

.legal-doc ul,
.legal-doc ol {
  margin: 0 0 16px;
  padding-left: 22px;
}

.legal-doc li {
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-soft);
  margin: 0 0 8px;
}

.legal-doc strong {
  color: var(--ink);
}

.legal-doc p a,
.legal-doc li a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-doc p a:hover,
.legal-doc li a:hover {
  color: var(--blue-dark);
}

.legal-doc .legal-intro {
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-soft);
  margin: 0 0 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.legal-doc .back-link {
  display: inline-flex;
  margin-top: 24px;
}

/* Responsive */
@media (max-width: 860px) {
  .hero .wrap {
    grid-template-columns: 1fr;
    padding-top: 48px;
    text-align: center;
  }
  .hero p.lead {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-actions {
    justify-content: center;
  }
  .hero-visual {
    order: -1;
  }
  .hero-visual img {
    max-width: 360px;
  }
  .showcase,
  .showcase.reverse {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .showcase .showcase-copy,
  .showcase.reverse .showcase-copy {
    order: 2;
  }
  .showcase .showcase-visual,
  .showcase.reverse .showcase-visual {
    order: 1;
  }
  .checklist li {
    text-align: left;
  }
  .section-head.left {
    text-align: center;
    margin: 0 auto 24px;
  }
  .game-showcase {
    grid-template-columns: 1fr;
  }
  .game-showcase-copy {
    order: 2;
  }
  .game-fan {
    order: 1;
    height: 330px;
    --w: 168px;
  }
  /* Tighter spread than the desktop 0.62 so the fan clears a phone's viewport */
  .game-card-1 {
    --tx: calc(var(--w) * -0.52);
  }
  .game-card-3 {
    --tx: calc(var(--w) * 0.52);
  }
  .nav-links {
    display: none;
  }
  section {
    padding: 64px 0;
  }
  .hero h1 {
    font-size: 34px;
  }
  .badge-row {
    justify-content: center;
  }
}

@media (max-width: 560px) {
  footer .wrap {
    flex-direction: column;
    text-align: center;
  }
}
