:root {
  color-scheme: dark;
  --primary-50: #e9fcff;
  --primary-100: #c9f7ff;
  --primary-200: #96edff;
  --primary-300: #5de0fb;
  --primary-400: #25cbea;
  --primary-500: #06afd1;
  --primary-600: #078bab;
  --primary-700: #0c6f8b;
  --primary-800: #115a70;
  --primary-900: #124a5d;
  --primary-950: #062f40;
  --page: #090b12;
  --surface: #10131e;
  --surface-raised: #171b29;
  --muted: #9ba3b7;
  --line: rgb(183 196 230 / 13%);
  --cyan: #66e2f3;
  --pink: #ff9ec8;
  font-family: "DM Sans", "Segoe UI", sans-serif;
  background: var(--page);
  color: #edf2ff;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(ellipse at 78% 15%, rgb(34 45 96 / 19%), transparent 34rem),
    radial-gradient(ellipse at 7% 50%, rgb(19 67 85 / 12%), transparent 40rem),
    var(--page);
  color: #edf2ff;
}

a { color: inherit; }

@keyframes scroll-cue { 0%, 100% { transform: translateY(0); opacity: 0.55; } 50% { transform: translateY(9px); opacity: 1; } }

@scope ([data-scope="GamesPage"]) to ([data-scope]) {
  :scope { overflow: clip; }

.site-header {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  min-height: 88px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 37px;
  height: 37px;
  place-items: center;
  border: 1px solid rgb(102 226 243 / 50%);
  border-radius: 11px;
  background: linear-gradient(145deg, rgb(30 95 122 / 50%), rgb(44 39 88 / 68%));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 14%), 0 0 25px rgb(25 178 216 / 15%);
  color: var(--cyan);
  font-size: 17px;
  font-weight: 800;
}

.brand-name { display: grid; gap: 1px; line-height: 1; }
.brand-name strong { font-size: 11px; letter-spacing: 0.2em; }
.brand-name small { color: #9aa4bd; font-size: 9px; letter-spacing: 0.34em; }

.main-nav { display: flex; align-items: center; gap: 34px; margin-left: auto; }
.main-nav a, .header-link { color: #b7bfd2; font-size: 13px; text-decoration: none; }
.main-nav a { transition: color 150ms ease; }
.main-nav a:hover, .text-link:hover { color: var(--cyan); }
.header-link { gap: 12px; border-color: rgb(189 202 232 / 22%); background: rgb(255 255 255 / 3%); }
.header-link:hover { border-color: rgb(102 226 243 / 55%); color: white; }

.hero {
  position: relative;
  display: grid;
  min-height: min(740px, calc(100svh - 88px));
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(20px, 5vw, 72px);
  padding-top: 54px;
  padding-bottom: 78px;
}

.hero-copy { position: relative; z-index: 1; padding: 24px 0 16px; }
.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 24px;
  color: #93a0ba;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
}
.status-pip, .label-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 13px rgb(102 226 243 / 75%);
}
.eyebrow-divider { color: #555f77; }

h1, h2, h3, p { margin-top: 0; }
h1 {
  max-width: 710px;
  margin-bottom: 23px;
  color: #f7f8ff;
  font-size: clamp(3.4rem, 6.6vw, 6.45rem);
  font-weight: 650;
  letter-spacing: -0.075em;
  line-height: 0.99;
}
.accent-period { color: var(--cyan); }
.hero-description {
  max-width: 425px;
  margin-bottom: 30px;
  color: #aeb6ca;
  font-size: 16px;
  line-height: 1.75;
}
.hero-actions { display: flex; align-items: center; gap: 27px; flex-wrap: wrap; }
.play-button { gap: 24px; min-height: 52px; padding-inline: 21px; font-weight: 650; }
.play-button span, .card-play span { font-size: 17px; }
.text-link { display: inline-flex; align-items: center; gap: 12px; color: #c2c9da; font-size: 13px; text-decoration: none; transition: color 150ms ease; }
.hero-facts { display: flex; gap: 26px; flex-wrap: wrap; margin-top: 54px; color: #8691a9; font-size: 11px; }
.hero-facts span { display: inline-flex; align-items: center; gap: 8px; }
.hero-facts i { color: var(--cyan); font-size: 15px; font-style: normal; }

.hero-visual { position: relative; min-width: 0; isolation: isolate; }
.game-scene {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  border: 1px solid rgb(141 174 219 / 29%);
  border-radius: 20px;
  background: #090d1d;
  box-shadow: 0 34px 100px rgb(0 0 0 / 45%), 0 0 75px rgb(25 104 174 / 15%);
  transform: perspective(1300px) rotateY(-3deg) rotateX(1deg);
}
.visual-orbit { position: absolute; z-index: -1; border: 1px solid rgb(95 210 238 / 15%); border-radius: 50%; pointer-events: none; }
.orbit-one { width: 116%; height: 96%; top: 4%; left: -11%; transform: rotate(-17deg); }
.orbit-two { width: 130%; height: 81%; top: 13%; left: -14%; border-color: rgb(166 125 228 / 12%); transform: rotate(19deg); }
.visual-label {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 13px;
  border: 1px solid rgb(185 203 239 / 18%);
  border-radius: 8px;
  background: rgb(13 17 31 / 86%);
  box-shadow: 0 12px 32px rgb(0 0 0 / 25%);
  color: #dce5f7;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.15em;
  backdrop-filter: blur(12px);
}
.label-top { top: -18px; right: 8%; color: #b9f5fc; }
.label-dot { width: 6px; height: 6px; }
.label-bottom { right: -18px; bottom: 30px; left: auto; justify-content: space-between; gap: 30px; color: #f0e6fd; }
.label-bottom span:last-child { color: #8491a9; }
.scroll-cue { position: absolute; bottom: 18px; left: 50%; display: grid; width: 28px; height: 40px; place-items: start center; padding-top: 8px; border: 1px solid rgb(165 183 222 / 25%); border-radius: 20px; }
.scroll-cue span { width: 3px; height: 7px; border-radius: 3px; background: var(--cyan); animation: scroll-cue 1.5s ease-in-out infinite; }

.library-section { padding-top: 110px; padding-bottom: 125px; border-top: 1px solid var(--line); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 32px; margin-bottom: 34px; }
.section-heading .eyebrow, .how-heading .eyebrow { margin-bottom: 14px; color: var(--cyan); }
h2 { margin-bottom: 12px; color: #f0f2fc; font-size: clamp(2.1rem, 4vw, 3.4rem); font-weight: 600; letter-spacing: -0.06em; line-height: 1.05; }
.section-intro { margin-bottom: 0; color: var(--muted); font-size: 14px; }
.library-count { display: flex; align-items: center; gap: 11px; padding-bottom: 5px; color: #7f8aa2; font-size: 9px; font-weight: 700; letter-spacing: 0.17em; white-space: nowrap; }
.library-count span { display: grid; width: 31px; height: 31px; place-items: center; border: 1px solid rgb(102 226 243 / 30%); border-radius: 50%; color: var(--cyan); font-size: 10px; letter-spacing: 0; }

.game-card {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(24px, 4.4vw, 62px);
  padding: clamp(18px, 3vw, 34px);
  border-color: rgb(190 203 233 / 13%);
  border-radius: 17px;
  background:
    radial-gradient(ellipse at 10% 0%, rgb(34 82 118 / 11%), transparent 45%),
    linear-gradient(145deg, #141827, #10131d 72%);
  box-shadow: 0 24px 70px rgb(0 0 0 / 22%);
}
.game-art-link { position: relative; display: block; overflow: hidden; align-self: stretch; min-height: 275px; border: 1px solid rgb(120 175 219 / 18%); border-radius: 11px; background: #090d1d; }
.game-art-link::after { position: absolute; inset: 50% 0 0; background: linear-gradient(transparent, rgb(4 7 16 / 45%)); content: ""; pointer-events: none; }
.game-art-link img { display: block; width: 100%; height: 100%; min-height: 275px; object-fit: cover; transition: transform 600ms cubic-bezier(.2,.7,.2,1); }
.game-art-link:hover img { transform: scale(1.035); }
.art-tag { position: absolute; z-index: 1; top: 14px; left: 14px; padding: 8px 10px; border: 1px solid rgb(200 217 246 / 22%); border-radius: 4px; background: rgb(11 15 29 / 74%); color: #c4d2e8; font-size: 8px; font-weight: 700; letter-spacing: 0.15em; }
.art-play { position: absolute; z-index: 1; right: 15px; bottom: 14px; display: grid; width: 41px; height: 41px; place-items: center; border: 1px solid rgb(102 226 243 / 40%); border-radius: 50%; background: rgb(10 25 40 / 78%); color: var(--cyan); font-size: 19px; }
.game-content { display: flex; flex-direction: column; justify-content: center; padding-block: 8px; }
.game-kicker { margin-bottom: 12px; color: var(--cyan); font-size: 9px; font-weight: 700; letter-spacing: 0.15em; }
.game-kicker span { padding-inline: 4px; color: #65728b; }
.game-title-row { display: flex; justify-content: space-between; gap: 18px; }
.game-title-row h3 { margin-bottom: 15px; color: #f4f6ff; font-size: clamp(2rem, 3vw, 2.65rem); font-weight: 600; letter-spacing: -0.055em; }
.game-number { color: rgb(207 219 244 / 14%); font-size: 27px; font-weight: 700; letter-spacing: -0.08em; }
.game-description { max-width: 465px; margin-bottom: 27px; color: #a5aec2; font-size: 13px; line-height: 1.8; }
.game-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-top: 19px; border-top: 1px solid var(--line); }
.game-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.game-tags [ui-badge] { border-color: rgb(183 198 232 / 19%); background: rgb(255 255 255 / 2%); color: #aab5cb; font-size: 8px; letter-spacing: 0.1em; }
.card-play { gap: 16px; }
.library-note { display: flex; align-items: center; gap: 11px; margin: 23px 0 0; color: #737f98; font-size: 11px; }
.library-note span { color: #c49cf7; font-size: 15px; }

.how-section { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(48px, 9vw, 132px); padding-top: 100px; padding-bottom: 116px; border-top: 1px solid var(--line); }
.how-heading h2 { font-size: clamp(2.15rem, 3.8vw, 3.45rem); }
.how-heading h2 span { color: #9aa6bd; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.step { position: relative; padding-top: 12px; border-top: 1px solid rgb(189 204 234 / 20%); }
.step-index { position: absolute; top: 13px; right: 0; color: #68758d; font-size: 9px; letter-spacing: 0.1em; }
.step-icon { display: grid; width: 38px; height: 38px; place-items: center; margin: 19px 0 19px; border: 1px solid rgb(104 220 241 / 25%); border-radius: 11px; background: rgb(40 111 139 / 12%); color: var(--cyan); font-size: 20px; }
.step:nth-child(2) .step-icon { border-color: rgb(255 158 200 / 24%); background: rgb(147 52 113 / 11%); color: var(--pink); }
.step h3 { margin-bottom: 8px; color: #e7ebf6; font-size: 14px; font-weight: 600; letter-spacing: -0.02em; }
.step p { max-width: 190px; margin-bottom: 0; color: #8792a9; font-size: 11px; line-height: 1.7; }

.site-footer { display: flex; align-items: center; gap: 28px; min-height: 94px; border-top: 1px solid var(--line); }
.brand-small .brand-mark { width: 29px; height: 29px; border-radius: 9px; font-size: 13px; }
.brand-small .brand-name strong { font-size: 9px; }
.brand-small .brand-name small { font-size: 8px; }
.site-footer p { margin: 0 auto 0 0; color: #77829a; font-size: 11px; }
.footer-year { color: #6e7890; font-size: 9px; letter-spacing: 0.15em; }

@media (max-width: 900px) {
  .hero { min-height: 0; grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr); gap: 28px; padding-top: 90px; padding-bottom: 95px; }
  h1 { font-size: clamp(3.1rem, 7vw, 5rem); }
  .hero-facts { gap: 15px; }
  .game-card { grid-template-columns: 1fr 0.9fr; gap: 25px; }
  .game-art-link, .game-art-link img { min-height: 230px; }
  .how-section { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 680px) {
  .site-header { min-height: 72px; gap: 12px; }
  .brand { gap: 8px; }
  .brand-mark { width: 33px; height: 33px; }
  .main-nav { gap: 15px; margin-left: auto; }
  .main-nav a { font-size: 11px; }
  .header-link { display: none; }
  .hero { grid-template-columns: 1fr; gap: 48px; padding-top: 68px; padding-bottom: 76px; }
  .hero-copy { padding: 0; }
  h1 { font-size: clamp(3.3rem, 14vw, 5rem); }
  .hero-description { max-width: 450px; font-size: 14px; }
  .hero-facts { margin-top: 28px; }
  .hero-visual { width: 94%; margin-inline: auto; }
  .label-bottom { right: -12px; bottom: 18px; }
  .scroll-cue { display: none; }
  .library-section { padding-top: 76px; padding-bottom: 82px; }
  .section-heading { align-items: start; flex-direction: column; gap: 19px; }
  .section-heading h2 { max-width: 340px; }
  .game-card { grid-template-columns: 1fr; gap: 22px; padding: 16px; }
  .game-art-link, .game-art-link img { min-height: auto; aspect-ratio: 1.48; }
  .game-content { padding: 0 3px 3px; }
  .game-footer { align-items: end; flex-direction: column; }
  .card-play { align-self: stretch; }
  .how-section { gap: 32px; padding-top: 76px; padding-bottom: 82px; }
  .steps { grid-template-columns: 1fr; gap: 25px; }
  .step { display: grid; grid-template-columns: 48px 1fr; column-gap: 15px; padding-top: 16px; }
  .step-index { top: 18px; }
  .step-icon { grid-row: span 2; margin: 0; }
  .step h3 { margin: 3px 28px 6px 0; }
  .step p { max-width: 100%; }
  .site-footer { min-height: 90px; gap: 14px; flex-wrap: wrap; padding-block: 20px; }
  .site-footer p { order: 3; flex-basis: 100%; }
}
}

@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  [data-scope="GamesPage"], [data-scope="GamesPage"] *, [data-scope="GamesPage"] *::before, [data-scope="GamesPage"] *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
