:root {
  --night: #140a36;
  --night-2: #1f1152;
  --night-3: #2b1a6b;
  --gold: #ffc533;
  --gold-2: #ff9f1a;
  --bark: #4a2609;
  --cream: #fff6e2;
  --ink: #2a1a10;
  --muted: #b9acdf;
  --line: rgba(255, 255, 255, .12);
  --radius: 28px;
  --wrap: 1120px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--night);
  color: #fff;
  font: 17px/1.6 "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  overflow-x: hidden;
}

h1, h2, h3, .display {
  font-family: "Fredoka", "Nunito", -apple-system, sans-serif;
  font-weight: 700;
  line-height: 1.1;
  margin: 0;
  letter-spacing: .2px;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

/* ---------- Nav ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  background: rgba(20, 10, 54, .72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.nav .wrap { display: flex; align-items: center; gap: 24px; height: 68px; }
.nav .brand { display: flex; align-items: center; margin-right: auto; }
.nav .brand img { height: 46px; width: auto; }
.nav .links { display: flex; gap: 26px; }
.nav .links a {
  color: #e9e1ff;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
}
.nav .links a:hover, .nav .links a[aria-current="page"] { color: var(--gold); }

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: "Fredoka", sans-serif;
  font-weight: 700;
  font-size: 19px;
  color: var(--bark);
  text-decoration: none;
  background: linear-gradient(180deg, #ffe07a 0%, var(--gold) 45%, var(--gold-2) 100%);
  padding: 15px 30px;
  border-radius: 18px;
  border: 3px solid var(--bark);
  box-shadow: 0 6px 0 var(--bark), 0 16px 30px rgba(0, 0, 0, .35);
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 0 var(--bark), 0 20px 34px rgba(0, 0, 0, .4); }
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--bark); }
.btn svg { width: 24px; height: 24px; flex: none; }
.btn small { display: block; font: 700 11px/1 "Nunito", sans-serif; letter-spacing: .6px; text-transform: uppercase; opacity: .75; }
.btn.small { font-size: 15px; padding: 9px 18px; border-radius: 14px; border-width: 2px; box-shadow: 0 4px 0 var(--bark); }
.btn.ghost {
  background: rgba(255, 255, 255, .1);
  color: #fff;
  border-color: rgba(255, 255, 255, .45);
  box-shadow: none;
}
.btn.ghost:hover { background: rgba(255, 255, 255, .18); box-shadow: none; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: 104px 0 0;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(20, 10, 54, .25) 0%, rgba(20, 10, 54, 0) 30%, rgba(20, 10, 54, .55) 70%, var(--night) 100%),
    url("img/hero.jpg") center 60% / cover no-repeat;
}

.hero .logo {
  width: min(360px, 66vw);
  margin: 0 auto;
  filter: drop-shadow(0 18px 26px rgba(40, 20, 0, .45));
  animation: bob 5s ease-in-out infinite;
}

@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-10px) rotate(1deg); } }

.hero h1 {
  font-size: clamp(30px, 4.6vw, 52px);
  margin-top: 14px;
  text-shadow: 0 3px 0 rgba(60, 30, 5, .55), 0 10px 30px rgba(0, 0, 0, .45);
}

.hero p.lead {
  max-width: 600px;
  margin: 14px auto 30px;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 10px rgba(20, 10, 40, .8);
}

.hero .cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.phones {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 0;
  margin-top: 48px;
  padding: 0 16px;
}

.phones img {
  width: min(250px, 30vw);
  border-radius: clamp(14px, 3vw, 30px);
  border: 4px solid #0d0626;
  box-shadow: 0 30px 60px rgba(0, 0, 0, .55);
}

.phones img:nth-child(1) { transform: rotate(-7deg) translate(34px, 26px); }
.phones img:nth-child(2) { position: relative; z-index: 2; width: min(280px, 34vw); }
.phones img:nth-child(3) { transform: rotate(7deg) translate(-34px, 26px); }

/* ---------- Stats ---------- */

.stats {
  position: relative;
  z-index: 3;
  margin: -34px auto 0;
  max-width: 940px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: linear-gradient(180deg, #3a2390, #281668);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 24px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, .45);
}

.stats div { padding: 22px 12px; text-align: center; border-left: 1px solid var(--line); }
.stats div:first-child { border-left: 0; }
.stats b { display: block; font: 700 36px/1 "Fredoka", sans-serif; color: var(--gold); }
.stats span { font-size: 14px; font-weight: 700; color: #d9cffa; text-transform: uppercase; letter-spacing: .8px; }

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

section { padding: 96px 0; }

.eyebrow {
  display: inline-block;
  font: 700 13px/1 "Nunito", sans-serif;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--bark);
  background: var(--gold);
  padding: 8px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.head { text-align: center; max-width: 680px; margin: 0 auto 48px; }
.head h2, .row h2 { font-size: clamp(30px, 4vw, 46px); }
.head p { color: var(--muted); font-size: 19px; margin: 14px 0 0; }

/* ---------- Games grid ---------- */

.games { background: radial-gradient(1000px 500px at 50% 0%, var(--night-3), var(--night) 70%); }

.grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 18px;
}

.game {
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 14px 8px 12px;
  text-align: center;
  transition: transform .15s ease, background .15s ease;
}
.game:hover { transform: translateY(-6px) rotate(-1.5deg); background: rgba(255, 255, 255, .12); }
.game img { border-radius: 22%; width: 76%; margin: 0 auto 8px; filter: drop-shadow(0 8px 12px rgba(0, 0, 0, .4)); }
.game span { font: 600 14px/1.2 "Fredoka", sans-serif; color: #f2ecff; }

/* ---------- Feature rows ---------- */

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  margin-bottom: 96px;
}
.row:last-child { margin-bottom: 0; }
.row.flip .art { order: 2; }

.row .art img {
  width: 100%;
  border-radius: var(--radius);
  border: 4px solid rgba(255, 255, 255, .14);
  box-shadow: 0 30px 60px rgba(0, 0, 0, .5);
}
.row .art { transform: rotate(-1.5deg); }
.row.flip .art { transform: rotate(1.5deg); }

.row p { color: var(--muted); font-size: 19px; margin: 16px 0 0; }
.row ul { list-style: none; padding: 0; margin: 22px 0 0; }
.row li { position: relative; padding: 0 0 12px 34px; font-weight: 700; color: #efe8ff; }
.row li::before {
  content: "★";
  position: absolute;
  left: 0;
  top: -2px;
  color: var(--gold);
  font-size: 20px;
}

/* ---------- Screens rail ---------- */

.screens { background: linear-gradient(180deg, var(--night), var(--night-2)); padding-bottom: 72px; }

.rail {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 10px max(24px, calc((100vw - var(--wrap)) / 2 + 24px)) 30px;
  scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.rail img {
  flex: none;
  width: 250px;
  border-radius: 26px;
  scroll-snap-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, .45);
}

/* ---------- Fair cards ---------- */

.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

.tile {
  background: var(--cream);
  color: var(--ink);
  border-radius: 24px;
  padding: 26px 22px;
  border: 3px solid var(--bark);
  box-shadow: 0 8px 0 rgba(0, 0, 0, .35);
}
.tile .emoji { font-size: 34px; line-height: 1; }
.tile h3 { font-size: 21px; margin: 14px 0 6px; color: var(--bark); }
.tile p { margin: 0; font-size: 16px; color: #5a4636; }

/* ---------- CTA ---------- */

.final {
  margin: 0 24px 80px;
  border-radius: 36px;
  padding: 90px 24px;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(20, 10, 54, .15), rgba(20, 10, 54, .45)),
    url("img/cta.jpg") center / cover no-repeat;
  border: 1px solid rgba(255, 255, 255, .16);
  max-width: calc(var(--wrap) + 80px);
}
@media (min-width: 1250px) { .final { margin-left: auto; margin-right: auto; } }
.final img.appicon { width: 112px; border-radius: 26px; margin: 0 auto 22px; box-shadow: 0 18px 36px rgba(0, 0, 0, .5); }
.final h2 { font-size: clamp(30px, 4.4vw, 50px); text-shadow: 0 4px 20px rgba(0, 0, 0, .6); }
.final p { color: #efe8ff; font-size: 19px; font-weight: 700; margin: 12px 0 28px; text-shadow: 0 2px 10px rgba(0, 0, 0, .7); }

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

footer { border-top: 1px solid var(--line); padding: 36px 0 48px; color: var(--muted); font-size: 15px; }
footer .wrap { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
footer img { height: 52px; width: auto; }
footer nav { display: flex; gap: 22px; margin-left: auto; flex-wrap: wrap; }
footer a { color: #e9e1ff; text-decoration: none; font-weight: 700; }
footer a:hover { color: var(--gold); }
footer .copy { flex-basis: 100%; font-size: 14px; }

/* ---------- Inner pages (support, privacy) ---------- */

.page-hero {
  padding: 132px 0 110px;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(20, 10, 54, .35), var(--night) 100%),
    url("img/hero.jpg") center 30% / cover no-repeat;
}
.page-hero h1 { font-size: clamp(34px, 5vw, 54px); text-shadow: 0 3px 0 rgba(60, 30, 5, .55), 0 10px 30px rgba(0, 0, 0, .5); }
.page-hero p { margin: 10px 0 0; font-weight: 700; text-shadow: 0 2px 10px rgba(20, 10, 40, .8); }

.sheet {
  position: relative;
  max-width: 800px;
  margin: -64px auto 80px;
  background: var(--cream);
  color: var(--ink);
  border-radius: var(--radius);
  border: 3px solid var(--bark);
  box-shadow: 0 10px 0 rgba(0, 0, 0, .35), 0 30px 60px rgba(0, 0, 0, .4);
  padding: 44px 48px;
}
.sheet h2 { font-size: 24px; color: var(--bark); margin: 34px 0 8px; }
.sheet h2:first-child { margin-top: 0; }
.sheet h3 { font-size: 19px; color: var(--bark); margin: 0; }
.sheet p, .sheet li { color: #3d2c20; }
.sheet a { color: #6a3fe0; font-weight: 700; }
.sheet .muted { color: #8a7566; font-size: 15px; }
.sheet ul { padding-left: 22px; }
.sheet li { margin: 6px 0; }

.contact {
  display: flex;
  align-items: center;
  gap: 18px;
  background: #fff;
  border: 2px solid #ecdcbd;
  border-radius: 20px;
  padding: 20px 22px;
  margin-bottom: 30px;
}
.contact .emoji { font-size: 34px; }
.contact p { margin: 0; }

details {
  border-top: 2px solid #ecdcbd;
  padding: 16px 0;
}
details:last-of-type { border-bottom: 2px solid #ecdcbd; }
summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font: 600 19px/1.3 "Fredoka", sans-serif;
  color: var(--bark);
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 24px; line-height: 1; color: var(--gold-2); }
details[open] summary::after { content: "–"; }
details p { margin: 10px 0 0; }

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .row { grid-template-columns: 1fr; gap: 32px; margin-bottom: 72px; }
  .row.flip .art { order: 0; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .nav .links { display: none; }
  .hero { padding-top: 110px; }
  .hero p.lead { font-size: 18px; }
  .phones { margin-top: 44px; }
  .phones img:nth-child(1) { transform: rotate(-7deg) translate(18px, 16px); }
  .phones img:nth-child(3) { transform: rotate(7deg) translate(-18px, 16px); }
  .stats { grid-template-columns: repeat(2, 1fr); margin: -20px 16px 0; }
  .stats div:nth-child(3) { border-left: 0; }
  .stats div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .stats b { font-size: 30px; }
  section { padding: 64px 0; }
  .grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .game { border-radius: 16px; padding: 10px 4px 8px; }
  .game span { font-size: 12px; }
  .cards { grid-template-columns: 1fr; }
  .rail img { width: 200px; }
  .rail { padding-left: 16px; padding-right: 16px; }
  .final { margin: 0 16px 56px; padding: 64px 18px; border-radius: 26px; }
  .sheet { margin: -48px 16px 56px; padding: 28px 22px; }
  footer nav { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .hero .logo { animation: none; }
  html { scroll-behavior: auto; }
}
