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

:root {
  --bg-top: #140a4a;
  --bg-mid: #2b0f8c;
  --bg-bottom: #4c14c9;
  --panel-top: #43208f;
  --panel-bottom: #26104f;
  --ink: #1c1640;
  --gold: #ffc83d;
  --gold-dark: #b8740f;
  --play: #3cc63f;
  --play-dark: #1f8a25;
  --gutter: clamp(16px, 4vw, 40px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: #fff;
  background: linear-gradient(180deg, var(--bg-top), var(--bg-mid) 45%, var(--bg-top));
  font-family: "Lilita One", system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.4;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

.stars {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    radial-gradient(2px 2px at 12% 18%, #ffe9a8, transparent),
    radial-gradient(2px 2px at 78% 12%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 42% 62%, #ffe9a8, transparent),
    radial-gradient(2px 2px at 88% 72%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 22% 84%, #ffe9a8, transparent),
    radial-gradient(1.5px 1.5px at 60% 34%, #fff, transparent);
  animation: twinkle 4s ease-in-out infinite alternate;
}

@keyframes twinkle { from { opacity: .45; } to { opacity: 1; } }

/* Hero */
.hero {
  position: relative;
  isolation: isolate;
  min-height: min(100vh, 860px);
  display: flex;
  justify-content: center;
  padding: clamp(14px, 3vh, 34px) var(--gutter) 40px;
  overflow: hidden;
}

.hero-art { position: absolute; inset: 0; z-index: -2; }
.hero-art img { width: 100%; height: 100%; object-fit: cover; object-position: center 62%; }

.hero-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(ellipse 46% 60% at 50% 42%, rgba(20, 10, 74, .55), transparent 72%),
    linear-gradient(180deg, transparent 72%, var(--bg-top));
}

.hero-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: min(100%, 560px);
}

h1 { margin: 0; line-height: 0; }

.logo {
  width: min(100%, 440px);
  height: auto;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .55));
  animation: bob 4s ease-in-out infinite;
}

@keyframes bob { 50% { transform: translateY(-8px) rotate(-.6deg); } }

.cta {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 64px;
  padding: 12px 34px;
  border: 3px solid #fff;
  border-radius: 20px;
  color: #fff;
  font-size: 26px;
  text-decoration: none;
  text-shadow: 0 2px 0 rgba(0, 0, 0, .35);
  transition: transform .12s ease, box-shadow .12s ease;
}

.btn-play {
  background: linear-gradient(180deg, #7be36a, var(--play) 55%, #2aa52f);
  box-shadow: 0 7px 0 var(--play-dark), 0 12px 22px rgba(0, 0, 0, .45);
  animation: pulse 2.2s ease-in-out infinite;
}

.btn-play:hover, .btn-play:focus-visible {
  transform: translateY(-2px) scale(1.03);
  animation: none;
}

.btn-play:active {
  transform: translateY(5px);
  box-shadow: 0 2px 0 var(--play-dark), 0 4px 10px rgba(0, 0, 0, .4);
}

@keyframes pulse { 50% { transform: scale(1.04); } }

.btn-icon { font-size: .8em; }

.store {
  position: relative;
  display: inline-flex;
  transition: transform .12s ease;
}

.store img { height: 78px; width: auto; }
a.store:hover, a.store:focus-visible { transform: scale(1.04); }

.store-soon img { filter: grayscale(.25) brightness(.8); }

.store-soon span {
  position: absolute;
  top: -8px;
  right: 2px;
  padding: 1px 9px;
  border-radius: 9px;
  background: var(--gold);
  color: var(--ink);
  font-size: 13px;
  transform: rotate(3deg);
}

@keyframes hop {
  0%, 100% { transform: translateY(0); }
  40% { transform: translateY(-26px) rotate(-6deg); }
}

/* Sections */
.section {
  width: min(100%, 1120px);
  margin: 0 auto;
  padding: clamp(34px, 6vw, 60px) var(--gutter);
}

h2 {
  margin: 0 0 22px;
  text-align: center;
  font-size: clamp(32px, 6vw, 46px);
  font-weight: 400;
  color: var(--gold);
  text-shadow: 0 3px 0 var(--ink), 0 0 18px rgba(255, 200, 61, .25);
}

.games {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.card {
  grid-column: span 2;
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  border: 4px solid var(--gold);
  border-radius: 24px;
  background: var(--panel-bottom);
  box-shadow: 0 6px 0 var(--gold-dark), 0 12px 22px rgba(0, 0, 0, .45);
  text-decoration: none;
  transition: transform .18s ease;
}

.card:nth-child(1), .card:nth-child(2) { grid-column: span 3; aspect-ratio: 3 / 2; }

.card img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.card:hover, .card:focus-visible { transform: translateY(-5px) rotate(-.8deg); }
.card:hover img { transform: scale(1.06); }

.card-text {
  position: absolute;
  inset: auto 0 0;
  padding: 44px 16px 13px;
  background: linear-gradient(180deg, transparent, rgba(20, 10, 74, .94) 55%);
  font-size: 17px;
  line-height: 1.25;
}

.card-text strong {
  display: block;
  font-size: 28px;
  font-weight: 400;
  color: var(--gold);
  text-shadow: 0 2px 0 var(--ink);
}

.shots {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 6px 2px 18px;
  scroll-snap-type: x mandatory;
  scrollbar-color: var(--gold) transparent;
}

.shots img {
  flex: 0 0 auto;
  width: clamp(190px, 26vw, 250px);
  height: auto;
  border: 4px solid var(--gold);
  border-radius: 24px;
  scroll-snap-align: center;
}

.faq { display: grid; gap: 12px; max-width: 760px; margin: 0 auto; }

details, .panel {
  border: 3px solid var(--gold);
  border-radius: 20px;
  background: linear-gradient(180deg, var(--panel-top), var(--panel-bottom));
}

details { padding: 4px 18px; }
summary { padding: 12px 0; font-size: 21px; cursor: pointer; }
details p { margin: 0 0 14px; color: #ece7ff; }

.finale { text-align: center; }
.finale-token {
  width: 92px;
  height: auto;
  margin: 0 auto 6px;
  animation: hop 2.6s ease-in-out infinite;
}

.footer {
  padding: 26px var(--gutter);
  text-align: center;
  background: rgba(20, 10, 74, .75);
  border-top: 3px solid var(--gold);
}

.footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
}

.footer a { min-height: 44px; display: inline-flex; align-items: center; color: var(--gold); }
.footer p { margin: 8px 0 0; color: #cfc6f2; font-size: 15px; }

.sticky {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 14px;
  z-index: 10;
  display: none;
  min-height: 58px;
  font-size: 23px;
}

/* Legal pages */
.legal-top { padding: 16px var(--gutter) 6px; }
.legal-logo { width: 190px; height: auto; margin: 0 auto; }

.doc {
  width: min(calc(100% - 2 * var(--gutter)), 760px);
  margin: 10px auto 34px;
  padding: clamp(18px, 4vw, 34px);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
}

.doc h1, .doc h2 {
  font-family: "Lilita One", system-ui, sans-serif;
  font-weight: 400;
  text-align: left;
  line-height: 1.2;
  text-shadow: none;
}

.doc h1 { margin-bottom: 10px; font-size: clamp(30px, 6vw, 40px); color: var(--gold); }
.doc h2 { margin: 26px 0 6px; font-size: 24px; color: #fff; }
.doc p, .doc ul { margin: 0 0 12px; color: #ece7ff; }
.doc a { color: var(--gold); }
.doc .updated { color: #cfc6f2; font-size: 15px; }

@media (max-width: 760px) {
  .hero {
    min-height: 0;
    padding-bottom: 0;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(180deg, rgba(20, 10, 74, .3), rgba(20, 10, 74, .92)),
      url("/img/hero.webp") center top / auto 130%;
  }
  .hero-art { position: relative; order: 2; inset: auto; z-index: 0; width: calc(100% + 2 * var(--gutter)); margin-top: 18px; }
  .hero-art img { height: auto; aspect-ratio: 16 / 9; object-position: center; }
  .hero-shade { display: none; }
  .logo { width: min(82%, 340px); margin: 0 auto; }
  .games { grid-template-columns: 1fr 1fr; gap: 12px; }
  .card, .card:nth-child(1), .card:nth-child(2) { grid-column: span 1; aspect-ratio: 1; }
  .card:nth-child(1) { grid-column: span 2; aspect-ratio: 16 / 10; }
  .card-text { padding: 30px 11px 9px; font-size: 15px; }
  .card-text strong { font-size: 23px; }
  .sticky { display: inline-flex; }
  .footer { padding-bottom: 96px; }
}

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