:root {
  --ink: #1a1033;
  --ink-soft: #4c3d73;
  --card: #fff8ef;
  --stroke: #2b184a;
  --sky-top: #7dd3fc;
  --sky-mid: #c4b5fd;
  --sky-bot: #fde68a;
  --accent: #fb7185;
  --accent-2: #34d399;
  --accent-3: #fbbf24;
  --accent-4: #60a5fa;
  --radius: 1.4rem;
  --chunk: 4px;
  --font: "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  --shadow: 0 10px 0 color-mix(in srgb, var(--stroke) 88%, black),
            0 18px 40px rgba(43, 24, 74, 0.28);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  font-family: var(--font);
  overflow-x: hidden;
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 48%, var(--sky-bot) 100%);
}

.sky {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.blob {
  position: absolute;
  border-radius: 40% 60% 55% 45%;
  filter: blur(2px);
  opacity: 0.55;
  animation: drift 18s ease-in-out infinite;
}
.b1 { width: 42vw; height: 42vw; left: -8%; top: -10%; background: radial-gradient(circle, #f9a8d4, transparent 70%); }
.b2 { width: 36vw; height: 36vw; right: -6%; top: 18%; background: radial-gradient(circle, #86efac, transparent 70%); animation-duration: 22s; animation-direction: reverse; }
.b3 { width: 48vw; height: 28vw; left: 20%; bottom: -12%; background: radial-gradient(circle, #fde047, transparent 70%); animation-duration: 26s; }

.cloud {
  position: absolute;
  background: rgba(255,255,255,0.78);
  border-radius: 999px;
  box-shadow: 28px 8px 0 rgba(255,255,255,0.78), -24px 10px 0 rgba(255,255,255,0.7);
  animation: floatx 28s linear infinite;
}
.c1 { width: 90px; height: 28px; top: 12%; left: -20%; }
.c2 { width: 120px; height: 34px; top: 28%; left: -30%; animation-duration: 36s; opacity: 0.7; }
.c3 { width: 70px; height: 22px; top: 48%; left: -15%; animation-duration: 24s; opacity: 0.65; }

.blocks span {
  position: absolute;
  width: 18px; height: 18px;
  border: 2px solid rgba(43,24,74,0.25);
  border-radius: 3px;
  opacity: 0.35;
  animation: bob 5s ease-in-out infinite;
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 1.5rem));
  margin: 0 auto;
  padding: 1.25rem 0 2rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  background: color-mix(in srgb, white 82%, #fbcfe8);
  border: var(--chunk) solid var(--stroke);
  border-radius: calc(var(--radius) + 0.3rem);
  box-shadow: var(--shadow);
  padding: 0.85rem 1.1rem;
  transform: rotate(-1deg);
}

.logo {
  font-size: 2.2rem;
  filter: drop-shadow(2px 3px 0 rgba(43,24,74,0.25));
  animation: wiggle 2.8s ease-in-out infinite;
}

.eyebrow {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #db2777;
}

h1 {
  margin: 0.1rem 0;
  font-size: clamp(1.8rem, 5vw, 2.7rem);
  line-height: 1;
  letter-spacing: -0.02em;
  text-shadow: 3px 3px 0 #fde68a;
}

.subtitle {
  margin: 0.2rem 0 0;
  color: var(--ink-soft);
  font-weight: 700;
  font-size: 1rem;
}

.mute-btn {
  appearance: none;
  border: var(--chunk) solid var(--stroke);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 5px 0 var(--stroke);
  padding: 0.65rem 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.mute-btn:hover { transform: translateY(-2px); }
.mute-btn:active, .mute-btn[aria-pressed="true"] {
  transform: translateY(3px);
  box-shadow: 0 2px 0 var(--stroke);
}
.mute-btn[aria-pressed="true"] .mute-icon::after { content: ""; }

.stage {
  flex: 1;
  background: color-mix(in srgb, white 70%, #ddd6fe);
  border: var(--chunk) solid var(--stroke);
  border-radius: calc(var(--radius) + 0.6rem);
  box-shadow: var(--shadow);
  padding: 1rem 1rem 1.4rem;
  position: relative;
  overflow: hidden;
}

.stage::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 3px dashed rgba(43,24,74,0.12);
  border-radius: var(--radius);
  pointer-events: none;
}

.stage-banner {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.25rem 0 1rem;
  padding: 0.35rem 0.85rem;
  background: var(--accent-3);
  border: 3px solid var(--stroke);
  border-radius: 999px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.78rem;
  transform: rotate(-2deg);
}

.pulse-dot {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 0 0 rgba(239,68,68,0.55);
  animation: ping 1.6s ease-out infinite;
}

.rail-wrap {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.35rem;
}
.rail {
  position: relative;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(240px, 280px);
  gap: 1.15rem;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-padding: 0.25rem;
  padding: 0.35rem 0.15rem 1rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.rail > * { scroll-snap-align: start; }
.gallery { /* games rail */ }
.rail-btn {
  appearance: none;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  border: 3px solid var(--stroke);
  background: #fff;
  box-shadow: 0 4px 0 var(--stroke);
  font-size: 1.4rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  z-index: 3;
  flex-shrink: 0;
}
.rail-btn:hover { transform: translateY(-2px); }
.rail-btn:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--stroke); }
@media (max-width: 640px) {
  .rail { grid-auto-columns: minmax(78vw, 86vw); }
  .rail-btn { width: 2rem; height: 2rem; font-size: 1.2rem; }
}

.card {
  --tile: var(--accent-4);
  position: relative;
  background: var(--card);
  border: var(--chunk) solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: 0 8px 0 var(--stroke);
  min-height: 270px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.16s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.16s ease;
  transform-origin: center bottom;
}
.card:nth-child(3n+1) { --tile: #fb7185; }
.card:nth-child(3n+2) { --tile: #34d399; }
.card:nth-child(3n) { --tile: #60a5fa; }
.card.soon { --tile: #c4b5fd; opacity: 0.92; }

.card:hover, .card:focus-within {
  transform: translateY(-8px) rotate(-1.5deg) scale(1.02);
  box-shadow: 0 14px 0 var(--stroke);
  z-index: 2;
}

.card .thumb-link, .card .soon-body {
  color: inherit;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  height: 100%;
  outline: none;
}

.thumb {
  position: relative;
  aspect-ratio: 16 / 11;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--tile) 80%, white), var(--tile)),
    repeating-linear-gradient(90deg, rgba(43,24,74,0.08) 0 12px, transparent 12px 24px),
    repeating-linear-gradient(0deg, rgba(43,24,74,0.08) 0 12px, transparent 12px 24px);
  border-bottom: var(--chunk) solid var(--stroke);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.thumb .glyph {
  font-size: 3rem;
  filter: drop-shadow(3px 4px 0 rgba(43,24,74,0.25));
  animation: bob 3.4s ease-in-out infinite;
}
.card:nth-child(even) .thumb .glyph { animation-delay: -1.2s; }

.badge-row {
  position: absolute;
  top: 0.55rem;
  left: 0.55rem;
  right: 0.55rem;
  display: flex;
  justify-content: space-between;
  gap: 0.35rem;
  pointer-events: none;
}

.pill {
  font-size: 0.7rem;
  font-weight: 900;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  border: 2px solid var(--stroke);
  background: #fff;
  box-shadow: 1px 2px 0 var(--stroke);
}
.pill.age { background: #fef08a; }
.pill.play { background: #bbf7d0; }
.pill.soon-pill { background: #e9d5ff; }

.card-body {
  padding: 0.9rem 0.95rem 1.05rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}

.card h2 {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.15;
}

.card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.35;
  flex: 1;
}

.play-cta {
  margin-top: 0.55rem;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  max-width: 100%;
  background: var(--tile);
  color: var(--stroke);
  border: 3px solid var(--stroke);
  border-radius: 999px;
  padding: 0.45rem 0.95rem;
  font-weight: 900;
  font-size: 0.85rem;
  line-height: 1.1;
  box-shadow: 0 3px 0 var(--stroke);
  text-decoration: none;
  white-space: nowrap;
}
a.play-cta:focus-visible {
  outline: 3px solid #fbbf24;
  outline-offset: 3px;
}

.card:hover .play-cta, .card:focus-within .play-cta {
  animation: wiggle 0.55s ease;
}

.card.soon .play-cta {
  background: #ede9fe;
  color: var(--ink-soft);
}

.foot {
  text-align: center;
  color: var(--ink-soft);
  font-weight: 700;
  font-size: 0.9rem;
}
.foot code {
  background: rgba(255,255,255,0.7);
  border: 2px solid rgba(43,24,74,0.2);
  border-radius: 0.4rem;
  padding: 0.05rem 0.35rem;
}

@keyframes drift {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(3%, 4%) rotate(8deg); }
}
@keyframes floatx {
  from { transform: translateX(0); }
  to { transform: translateX(140vw); }
}
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes wiggle {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-6deg); }
  75% { transform: rotate(6deg); }
}
@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(239,68,68,0.55); }
  100% { box-shadow: 0 0 0 12px rgba(239,68,68,0); }
}

@media (max-width: 640px) {
  .brand { transform: none; width: 100%; }
  .gallery.rail { gap: 0.75rem; }
  .card { min-height: 230px; }
  .card h2 { font-size: 1.05rem; }
  .card p { font-size: 0.8rem; }
  .mute-label { display: none; }
  .trailer-grid.rail { grid-auto-columns: minmax(82vw, 90vw); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.cta-row {
  margin-top: 0.55rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}
.thumb-link {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: inherit;
  text-decoration: none;
}
a.play-cta {
  text-decoration: none;
}
.dl-cta {
  display: inline-block;
  background: #fff;
  color: var(--stroke);
  border: 3px solid var(--stroke);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  font-weight: 900;
  font-size: 0.85rem;
  box-shadow: 0 3px 0 var(--stroke);
  text-decoration: none;
}
.dl-cta:hover {
  transform: translateY(-2px);
}
.card .play-cta {
  margin-top: 0;
}


/* download chip on game cards */
.card { position: relative; }
.card .dl-cta {
  display: inline-flex;
  margin: 0 1rem 1rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.85rem;
  background: #111827;
  color: #fde68a;
  text-decoration: none;
  border: 3px solid #0f172a;
  width: fit-content;
}
.card .dl-cta:hover { transform: translateY(-1px); }
.pill.ver { background: #a7f3d0; color: #064e3b; }

.trailers-stage { margin-top: 0.25rem; }
.trailer-grid.rail {
  grid-auto-columns: minmax(280px, 340px);
}
.trailer-card {
  background: var(--card);
  border: var(--chunk) solid var(--stroke);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 0 var(--stroke);
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.trailer-card video {
  display: block;
  width: 100%;
  aspect-ratio: 16/9;
  background: #0f172a;
  border-bottom: var(--chunk) solid var(--stroke);
}
.trailer-card h3 {
  margin: 0;
  padding: 0.85rem 1rem 1rem;
  font-size: 1.05rem;
}
.empty-trailer { padding: 1.25rem; }
.trailer-soon { font-size: 2.5rem; padding: 1.5rem 1rem 0.25rem; text-align: center; }
.trailer-note { margin: 0 1rem 1.1rem; color: #4c3d73; font-weight: 700; line-height: 1.35; }
.badge-row { flex-wrap: wrap; }
.play-cta.locked { opacity: 0.7; cursor: default; }
section.trailers-stage[hidden] { display: none; }
