/* ── TOKENS ── */
:root {
  --sky:    #5BA4E8;
  --sky-lt: #C4DBF6;
  --cream:  #F0EDE2;
  --white:  #FFFFFF;
  --navy:   #1A2240;
  --red:    #D4562A;
  --teal:   #4DBDA8;
  --blue:   #3B8BEB;
  --green:  #4AAD52;
  --slate:  #8590AA;
  --border: rgba(26,34,64,0.13);
}

/* ── RESET ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--cream);
  color: var(--navy);
  font-family: 'DM Sans', sans-serif;
  overflow-x: hidden;
  text-wrap: pretty;
}

/* ── HEADER / NAV ── */
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 200; }
nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 60px; height: 72px;
  background: var(--white);
  border-bottom: 2.5px solid var(--navy);
}
.nav-logo {
  display: inline-flex; align-items: center;
  text-decoration: none;
}
.nav-logo img { height: 44px; width: auto; display: block; }
.nav-links { display: flex; gap: 36px; list-style: none; }
.nav-links a {
  color: var(--slate); text-decoration: none;
  font-size: 14px; font-weight: 500; transition: color .15s;
}
.nav-links a:hover { color: var(--navy); }
.nav-cta {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--red); color: #fff;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700; font-size: 13px; text-decoration: none;
  padding: 9px 22px; border-radius: 7px;
  border: 2px solid var(--navy);
  box-shadow: 3px 3px 0 var(--navy);
  transition: box-shadow .1s, transform .1s;
}
.nav-cta:hover { box-shadow: none; transform: translate(3px, 3px); }

/* ── HERO ── */
.hero {
  min-height: 100vh;
  display: flex; align-items: center;
  padding: 120px 60px 80px;
  position: relative; overflow: hidden;
  background: linear-gradient(155deg, #3B8BEB 0%, #4DBDA8 30%, #5BA4E8 60%, #C4DBF6 100%);
}
.hero-dots {
  position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(circle, rgba(255,255,255,0.18) 2px, transparent 2px);
  background-size: 36px 36px;
}
.cloud {
  position: absolute; pointer-events: none;
  background: rgba(255,255,255,0.55);
  border-radius: 100px;
}
.cloud-1 { width: 180px; height: 50px; top: 18%; right: 15%; }
.cloud-1::before { content: ''; position: absolute; width: 80px; height: 80px; background: inherit; border-radius: 50%; top: -40px; left: 30px; }
.cloud-1::after  { content: ''; position: absolute; width: 60px; height: 60px; background: inherit; border-radius: 50%; top: -28px; left: 90px; }
.cloud-2 { width: 130px; height: 38px; top: 60%; right: 38%; opacity: .4; }
.cloud-2::before { content: ''; position: absolute; width: 60px; height: 60px; background: inherit; border-radius: 50%; top: -30px; left: 20px; }
.cloud-2::after  { content: ''; position: absolute; width: 50px; height: 50px; background: inherit; border-radius: 50%; top: -22px; left: 68px; }
.cloud-3 { width: 220px; height: 55px; top: 30%; right: 4%; opacity: .3; }
.cloud-3::before { content: ''; position: absolute; width: 90px; height: 90px; background: inherit; border-radius: 50%; top: -45px; left: 40px; }
.cloud-3::after  { content: ''; position: absolute; width: 70px; height: 70px; background: inherit; border-radius: 50%; top: -32px; left: 110px; }
.hero-bg-num {
  position: absolute; right: -20px; top: 50%; transform: translateY(-50%);
  font-family: 'Space Grotesk', sans-serif; font-weight: 700;
  font-size: clamp(220px, 28vw, 500px);
  color: transparent;
  -webkit-text-stroke: 2px rgba(255,255,255,0.22);
  line-height: 1; user-select: none; pointer-events: none;
}
.hero-content { position: relative; max-width: 900px; }
.hero-eyebrow {
  display: flex; align-items: center; gap: 12px;
  font-size: 11px; font-weight: 700; letter-spacing: 3px;
  text-transform: uppercase; color: var(--white);
  margin-bottom: 24px;
}
.hero-eyebrow::before {
  content: ''; display: block; width: 40px; height: 2px; background: #fff;
}
.hero-h1 {
  font-family: 'Space Grotesk', sans-serif; font-weight: 700;
  font-size: clamp(52px, 7.5vw, 112px);
  line-height: 0.92; letter-spacing: -3px; color: var(--navy);
}
.hero-h1 em { font-style: normal; color: var(--red); }
.hero-sub {
  margin-top: 28px; font-size: 18px; line-height: 1.65;
  color: var(--navy); max-width: 480px; font-weight: 400; opacity: .8;
}
.hero-ctas { display: flex; gap: 16px; margin-top: 44px; flex-wrap: wrap; align-items: center; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--red); color: #fff;
  font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 15px;
  padding: 14px 32px; text-decoration: none; border-radius: 8px;
  border: 2.5px solid var(--navy);
  box-shadow: 4px 4px 0 var(--navy);
  transition: box-shadow .1s, transform .1s;
}
.btn-primary:hover { box-shadow: none; transform: translate(4px, 4px); }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--white); color: var(--navy);
  font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 15px;
  padding: 14px 32px; text-decoration: none; border-radius: 8px;
  border: 2.5px solid var(--navy);
  box-shadow: 4px 4px 0 var(--navy);
  transition: box-shadow .1s, transform .1s;
}
.btn-ghost:hover { box-shadow: none; transform: translate(4px, 4px); }

/* ── HERO STATS ── */
.hero-stats {
  display: flex; gap: 48px; margin-top: 64px;
  padding-top: 36px; border-top: 2px solid rgba(26,34,64,0.18);
}
.stat-num {
  font-family: 'Space Grotesk', sans-serif; font-weight: 700;
  font-size: 38px; letter-spacing: -1px; color: var(--navy);
}
.stat-label { font-size: 12px; color: rgba(26,34,64,0.55); margin-top: 2px; font-weight: 500; letter-spacing: .5px; }

/* ── SECTIONS ── */
.section { padding: 100px 60px; }
#playable-ads { background: var(--cream); }
#instant-games { background: oklch(0.95 0.04 175); }

.section-top { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 52px; }
.section-tag {
  font-size: 11px; font-weight: 700; letter-spacing: 3px;
  text-transform: uppercase; color: var(--red); margin-bottom: 10px;
}
.section-tag.teal { color: var(--teal); }
.section-tag.blue { color: var(--blue); }
.section-title {
  font-family: 'Space Grotesk', sans-serif; font-weight: 700;
  font-size: clamp(38px, 4.5vw, 64px); letter-spacing: -2px; line-height: 1;
}
.section-num {
  font-family: 'Space Grotesk', sans-serif; font-weight: 700;
  font-size: clamp(80px, 10vw, 130px); line-height: 1;
  color: transparent; -webkit-text-stroke: 2px rgba(26,34,64,0.1);
  margin-bottom: -12px;
}

/* ── GAME GRID ── */
.game-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.game-card {
  background: var(--white); border: 2.5px solid var(--navy);
  border-radius: 18px; overflow: hidden;
  box-shadow: 6px 6px 0 var(--navy);
  transition: transform .12s, box-shadow .12s;
  display: flex; flex-direction: column;
}
.game-card:hover { transform: translate(6px, 6px); box-shadow: none; }

.iframe-wrap {
  width: 100%; height: 260px; position: relative; overflow: hidden;
  flex-shrink: 0; border-bottom: 2.5px solid var(--navy);
  background: #C4DBF6;
}
.iframe-wrap iframe { width: 100%; height: 100%; border: none; display: block; }

.card-body { padding: 20px 22px 24px; flex: 1; }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  background: var(--red); color: #fff;
  padding: 4px 12px; border-radius: 20px; margin-bottom: 12px;
  border: 1.5px solid var(--navy);
}
.badge.teal { background: var(--teal); }
.badge.blue { background: var(--blue); }
.badge::before {
  content: ''; display: block; width: 5px; height: 5px;
  border-radius: 50%; background: rgba(255,255,255,0.7);
  animation: blink 2s ease-in-out infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .2; } }

.card-title {
  font-family: 'Space Grotesk', sans-serif; font-weight: 700;
  font-size: 20px; letter-spacing: -.5px; margin-bottom: 6px; color: var(--navy);
}
.card-desc { font-size: 13px; color: var(--slate); line-height: 1.55; }
.card-tags {
  display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px;
  list-style: none;
}
.tag {
  font-size: 11px; color: var(--slate);
  background: var(--cream); border: 1.5px solid var(--border);
  padding: 3px 10px; border-radius: 20px;
}
#instant-games .tag { background: rgba(77,189,168,0.12); }

/* ── DIVIDER ── */
.section-divider { border: none; height: 3px; background: var(--navy); }

/* ── FOOTER ── */
footer {
  padding: 52px 60px; display: flex; align-items: center; justify-content: space-between;
  background: var(--navy);
}
.footer-left { }
.footer-logo { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 24px; letter-spacing: -1px; color: #fff; }
.footer-logo em { font-style: normal; color: var(--red); }
.footer-logo img { height: 48px; width: auto; filter: brightness(0) invert(1); }
.footer-left .footer-copy { margin-top: 6px; }
.footer-right { text-align: right; }
.footer-right .footer-copy { margin-top: 4px; }
.footer-copy { font-size: 13px; color: var(--slate); }
.footer-link { font-size: 13px; color: var(--slate); text-decoration: none; transition: color .15s; }
.footer-link:hover { color: #fff; }

/* ── SCROLL REVEAL ── */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .65s ease, transform .65s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── TWEAKS PANEL ── */
#tweaks-panel {
  display: none; position: fixed; bottom: 24px; right: 24px;
  width: 280px; background: var(--white);
  border: 2.5px solid var(--navy); border-radius: 16px;
  padding: 20px; z-index: 9999;
  box-shadow: 4px 4px 0 var(--navy);
  font-family: 'DM Sans', sans-serif;
}
#tweaks-panel h3 {
  font-family: 'Space Grotesk', sans-serif; font-size: 14px; font-weight: 700;
  margin-bottom: 16px; color: var(--navy);
  display: flex; justify-content: space-between; align-items: center;
}
#tweaks-panel label {
  display: block; font-size: 12px; color: var(--slate);
  margin-bottom: 6px; margin-top: 14px; text-transform: uppercase; letter-spacing: .5px;
}
#tweaks-panel input[type=url] {
  width: 100%; background: var(--cream); border: 2px solid var(--navy);
  color: var(--navy); border-radius: 6px; padding: 8px 10px;
  font-family: 'DM Sans', sans-serif; font-size: 13px;
}
.tweak-close-btn { background: none; border: none; color: var(--slate); cursor: pointer; font-size: 18px; line-height: 1; }
.tweak-close-btn:hover { color: var(--navy); }
#tweak-themes {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 4px;
}
.theme-swatch {
  height: 36px; border-radius: 8px; border: 2.5px solid transparent;
  cursor: pointer; transition: transform .1s, border-color .1s;
}
.theme-swatch:hover { transform: scale(1.08); }
.theme-swatch.active { border-color: #1A2240; box-shadow: 0 0 0 1px #1A2240; }

/* ── IN-PAGE THEME SWITCHER ── */
#theme-switcher {
  position: fixed; bottom: 28px; right: 28px; z-index: 500;
  display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
}
#theme-toggle {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--navy); color: var(--cream);
  border: 2.5px solid var(--navy);
  box-shadow: 3px 3px 0 rgba(0,0,0,0.25);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: transform .15s, box-shadow .15s;
}
#theme-toggle:hover { transform: scale(1.08); }
#theme-toggle.open { background: var(--red); }
#theme-swatches {
  background: var(--white);
  border: 2.5px solid var(--navy);
  border-radius: 14px;
  padding: 14px;
  box-shadow: 4px 4px 0 var(--navy);
  opacity: 0; transform: translateY(8px) scale(0.95);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
#theme-swatches.open {
  opacity: 1; transform: translateY(0) scale(1);
  pointer-events: all;
}
.ts-label {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 10px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--slate);
  margin-bottom: 10px;
}
.ts-grid { display: flex; gap: 8px; }
.ts-swatch {
  width: 36px; height: 36px; border-radius: 8px;
  border: 2.5px solid transparent;
  cursor: pointer; transition: transform .12s, border-color .12s;
}
.ts-swatch:hover { transform: scale(1.12); }
.ts-swatch.active { border-color: var(--navy); box-shadow: 0 0 0 1.5px var(--navy); }

/* ── RESPONSIVE ── */
@media (max-width: 1100px) {
  nav { padding: 0 32px; }
  .hero { padding: 100px 32px 64px; }
  .section { padding: 80px 32px; }
  .section-divider { margin: 0 32px; }
  footer { padding: 40px 32px; }
  .game-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-h1 { font-size: clamp(48px, 6vw, 90px); }
}

@media (max-width: 680px) {
  nav { padding: 0 20px; height: 60px; }
  .nav-links { display: none; }
  .nav-logo img { height: 36px; }
  .nav-cta { padding: 8px 16px; font-size: 12px; }

  .hero { padding: 80px 20px 48px; }
  .hero-bg-num { display: none; }
  .cloud { display: none; }
  .hero-h1 { font-size: 44px; letter-spacing: -2px; line-height: 0.95; }
  .hero-eyebrow { margin-bottom: 16px; }
  .hero-sub { font-size: 15px; margin-top: 20px; }
  .hero-ctas { flex-direction: column; margin-top: 28px; gap: 12px; }
  .btn-primary, .btn-ghost { width: 100%; justify-content: center; padding: 13px 24px; }
  .hero-stats { gap: 24px; margin-top: 40px; padding-top: 28px; flex-wrap: wrap; }
  .stat-num { font-size: 30px; }

  .section { padding: 56px 20px; }
  .section-divider { margin: 0 20px; }
  .section-top { flex-direction: column; align-items: flex-start; gap: 4px; margin-bottom: 32px; }
  .section-num { display: none; }
  .section-title { font-size: 36px; }

  .game-grid { grid-template-columns: 1fr; gap: 16px; }
  .iframe-wrap { height: 220px; }
  .card-body { text-align: center; }
  .card-tags { justify-content: center; }

  footer { flex-direction: column; gap: 20px; padding: 36px 20px; text-align: center; }
  .footer-right { text-align: center; }
  footer img { margin: 0 auto; }
  .footer-left .footer-copy { margin-top: 6px; }

  #tweaks-panel { bottom: 16px; right: 16px; left: 16px; width: auto; }
  #theme-switcher { bottom: 20px; right: 20px; }
  #theme-toggle { width: 42px; height: 42px; }
}
