:root {
  color-scheme: dark;
  --background: #090711;
  --panel: #141022;
  --ink: #fffbf3;
  --muted: #bcb3cf;
  --subtle: #a79cbf;
  --line: #2b243c;
  --lime: #d7ff67;
  --page: 73rem;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  line-height: 1.55;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--background);
}

a { color: inherit; }

a:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 4px;
}

img { display: block; max-width: 100%; }
h1, h2, h3, p, figure { margin: 0; }

.shell {
  width: min(calc(100% - 4rem), var(--page));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  z-index: 5;
  top: 1rem;
  left: 1rem;
  padding: 0.65rem 1rem;
  transform: translateY(-200%);
  border-radius: 0.4rem;
  color: var(--background);
  background: var(--lime);
  font-weight: 700;
}

.skip-link:focus { transform: none; }
.site-header { border-bottom: 1px solid var(--line); }

.header-inner, .footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 2.75rem;
  font-size: 1.38rem;
  font-weight: 780;
  letter-spacing: -0.032em;
  text-decoration: none;
}

.brand img { border-radius: 0.65rem; }

.nav { display: flex; align-items: center; gap: clamp(0.625rem, 2.2vw, 2rem); }
.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding-inline: 0.25rem;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 650;
  text-decoration: none;
  transition: color 160ms ease;
}

.nav a:hover, .nav a[aria-current="page"] { color: var(--lime); }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(0, 1.06fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
  padding-block: clamp(3rem, 6vw, 5.2rem);
}

.eyebrow {
  color: #d4bcff;
  font-size: 0.82rem;
  font-weight: 750;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1 {
  margin-block: 1.1rem 1.55rem;
  font-size: clamp(3.65rem, 7.05vw, 6.25rem);
  font-weight: 800;
  line-height: 0.99;
  letter-spacing: -0.045em;
}

.hero h1 span { color: var(--lime); }

.hero-description {
  max-width: 25rem;
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem 1.1rem;
  margin-top: 1.9rem;
}

.button, .outline-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 3rem;
  padding: 0.5rem 1.1rem;
  border: 1px solid transparent;
  border-radius: 0.65rem;
  font-size: 0.93rem;
  font-weight: 760;
  text-align: center;
  text-decoration: none;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.button { color: #171c0b; background: var(--lime); }
.button:hover { background: #e9ffac; }
.platform { color: var(--subtle); font-size: 0.86rem; font-weight: 650; }

.showcase {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  aspect-ratio: 1.09;
  border: 1px solid #3b2a65;
  border-radius: clamp(1.35rem, 3vw, 2.15rem);
  background:
    radial-gradient(ellipse at 75% 85%, #4c2c92 0, transparent 58%),
    radial-gradient(ellipse at 25% 5%, #372364 0, transparent 62%),
    linear-gradient(143deg, #1b132e, #22133e 57%, #301657);
}

.showcase::before {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, #d5c1ff 0.7px, transparent 1px);
  background-size: 16px 16px;
  content: "";
  opacity: 0.2;
  mask-image: radial-gradient(ellipse at 50% 54%, transparent 31%, #000 88%);
}

.orbit, .orbit::before, .orbit::after {
  position: absolute;
  border: 1px solid #c9b3ff3f;
  border-radius: 50%;
}

.orbit { inset: 12% 4%; transform: rotate(-22deg); }
.orbit::before { inset: -8%; content: ""; }
.orbit::after { inset: 9%; content: ""; }

.device {
  position: absolute;
  width: 40%;
  padding: clamp(3px, 0.5vw, 7px);
  border: 1px solid #9384ae;
  border-radius: 12% / 5.6%;
  background: linear-gradient(150deg, #302941, #151020);
  box-shadow: inset 0 0 0 1px #0c0815, 0 1.8rem 3.75rem #0c071bd6;
}

.device img {
  width: 100%;
  height: auto;
  border-radius: 10% / 4.8%;
  background: #100b1c;
}

.device-back { left: 53%; top: 18%; transform: rotate(12deg); }
.device-front { left: 14%; top: 10%; transform: rotate(-11deg); }

.spark {
  position: absolute;
  z-index: 1;
  width: var(--spark-size);
  height: var(--spark-size);
  background: currentColor;
  clip-path: polygon(50% 0%, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
}

.spark-lime { --spark-size: 2.05rem; color: var(--lime); top: 11%; right: 12%; }
.spark-pink { --spark-size: 1.55rem; color: #ff8cbd; bottom: 16%; left: 7%; }
.spark-white { --spark-size: 1.15rem; color: #e6d8ff; top: 6%; left: 14%; }

.catalog {
  padding-block: 2.3rem clamp(3rem, 7vw, 5.8rem);
  border-top: 1px solid var(--line);
  scroll-margin-block-start: 1rem;
}

.catalog > h2 {
  margin-bottom: 1.5rem;
  font-size: clamp(2.65rem, 5vw, 4.25rem);
  font-weight: 790;
  line-height: 1.06;
  letter-spacing: -0.046em;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.game-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1.05rem;
  background: var(--panel);
}

.game-art {
  display: grid;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  place-items: center;
  height: 8.6rem;
  background: radial-gradient(ellipse at 50% 90%, var(--art), transparent 74%), var(--art-base);
}

.game-art::before {
  position: absolute;
  z-index: -1;
  width: 11rem;
  height: 11rem;
  border: 1px solid var(--art-line);
  border-radius: 50%;
  box-shadow: 0 0 0 1.4rem #ffffff07, 0 0 0 2.8rem #ffffff05;
  content: "";
}

.game-2048 { --art: #93345e; --art-base: #311836; --art-line: #ffc2da44; --label: #ffadd4; }
.game-memory { --art: #41479c; --art-base: #1d2247; --art-line: #c5d0ff44; --label: #c4c9ff; }
.game-star { --art: #37664b; --art-base: #172d2c; --art-line: #c8f87944; --label: #d5fa96; }
.game-number { --art: #874b3f; --art-base: #3e242d; --art-line: #ffcfbd44; --label: #ffc3aa; }
.game-four { --art: #287369; --art-base: #162d3a; --art-line: #a1f9d944; --label: #99f1d0; }
.game-figure { --art: #7c4c7a; --art-base: #36203c; --art-line: #eac3fd44; --label: #edbef8; }

.game-copy { padding: 1.15rem 1.25rem 1.3rem; }
.game-copy .genre {
  color: var(--label);
  font-size: 0.75rem;
  font-weight: 780;
  letter-spacing: 0.105em;
  text-transform: uppercase;
}

.game-copy h3 {
  margin-block: 0.26rem 0.35rem;
  font-size: 1.38rem;
  font-weight: 770;
  line-height: 1.16;
  letter-spacing: -0.035em;
}

.game-copy p { color: var(--muted); }

.merge-board, .disc-board {
  display: grid;
  justify-content: center;
  padding: 0.36rem;
  border: 1px solid #ffffff3d;
  border-radius: 0.68rem;
  background: #140d23a6;
  box-shadow: 0 0.65rem 1.1rem #0b041a65;
}

.merge-board { grid-template-columns: repeat(2, 2.1rem); gap: 0.25rem; transform: rotate(-12deg); }
.merge-board span, .number-stack span {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border: 1px solid #ffffff3b;
  border-radius: 0.34rem;
  font-weight: 800;
}

.merge-board span { background: #b95b885c; }
.merge-board span:nth-child(3) { background: #c84e9e; }
.merge-board span:nth-child(4) { color: #5e2450; background: #ffc7dd; }

.memory-cards { display: flex; align-items: center; }
.memory-cards span {
  display: grid;
  place-items: center;
  width: 3.35rem;
  height: 4.45rem;
  border: 1px solid #d7dbff8c;
  border-radius: 0.65rem;
  color: #e1f5ff;
  background: linear-gradient(145deg, #495cbe, #312c69);
  box-shadow: 0 0.6rem 1rem #0b041a5c;
  font-size: 1.55rem;
  font-weight: 820;
}

.memory-cards span:first-child { transform: translateX(0.35rem) rotate(-16deg); }
.memory-cards span:last-child { transform: translateX(-0.35rem) rotate(15deg); background: linear-gradient(145deg, #6563d4, #4842a0); }

.memory-cards i, .star-target span {
  width: 1.7rem;
  height: 1.7rem;
  background: currentColor;
  clip-path: polygon(50% 0%, 61% 37%, 100% 50%, 61% 63%, 50% 100%, 39% 63%, 0 50%, 39% 37%);
}

.star-target {
  display: grid;
  place-items: center;
  width: 4.9rem;
  height: 4.9rem;
  border: 1px solid #d7ff677d;
  border-radius: 50%;
  color: var(--lime);
  background: radial-gradient(circle, #9bcf6766, #ccfb6a0d 72%);
  box-shadow: 0 0 0 0.5rem #d7ff6721, 0 0 0 1rem #d7ff670d;
}

.star-target span { width: 2.65rem; height: 2.65rem; }
.number-stack { display: flex; gap: 0.2rem; transform: rotate(-9deg); }
.number-stack span {
  width: 2.48rem;
  color: #572719;
  background: #ffad8e;
  box-shadow: 0 0.5rem 0.9rem #0b041a55;
}

.number-stack span:nth-child(2) { translate: 0 -0.4rem; background: #ffcf85; }
.number-stack span:nth-child(3) { translate: 0 -0.8rem; background: #ffe0aa; }
.disc-board { grid-template-columns: repeat(4, 1rem); gap: 0.22rem; transform: rotate(-10deg); }
.disc-board span { aspect-ratio: 1; border-radius: 50%; background: #4f687b7a; }
.disc-board .mint { background: #82edce; }
.disc-board .coral { background: #ff9992; }

.detective-art { position: relative; display: flex; align-items: center; transform: rotate(-12deg); }
.detective-art span {
  width: 2.52rem;
  height: 3.45rem;
  margin-inline: -0.1rem;
  border: 1px solid #fff8;
  border-radius: 0.42rem;
  background: radial-gradient(circle at 50% 46%, #fcce85 24%, #904b7f 26%);
  box-shadow: 0 0.5rem 0.9rem #0b041a55;
}

.detective-art span:nth-child(2) {
  translate: 0 -0.22rem;
  background: radial-gradient(circle at 50% 46%, #f3b2e6 24%, #7062a4 26%);
}

.detective-art span:nth-child(3) {
  translate: 0 -0.44rem;
  background: radial-gradient(circle at 50% 46%, #9fe2bd 24%, #4d607c 26%);
}

.detective-art i {
  position: absolute;
  left: 37%;
  top: -15%;
  width: 3.15rem;
  height: 3.15rem;
  transform: rotate(-32deg);
  border: 0.3rem solid #fff1d6;
  border-radius: 50%;
  background: #fff1d61d;
  box-shadow: 0 0 0.6rem #30133158;
}

.detective-art i::after {
  position: absolute;
  top: 96%;
  left: 41%;
  width: 0.38rem;
  height: 1.32rem;
  border-radius: 0.3rem;
  background: #fff1d6;
  content: "";
}

.local-note {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.2rem;
  margin-top: 2rem;
  padding: clamp(1.2rem, 4vw, 2.35rem);
  border: 1px solid #3c3456;
  border-radius: 1rem;
  background: linear-gradient(112deg, #1d192d, #1b1326);
}

.local-note h2 {
  margin-bottom: 0.28rem;
  font-size: clamp(1.43rem, 3vw, 2.05rem);
  font-weight: 770;
  line-height: 1.1;
  letter-spacing: -0.042em;
}

.local-note p { color: var(--muted); }
.outline-button { flex-shrink: 0; border-color: #76668c; color: var(--ink); }
.outline-button:hover { border-color: var(--lime); color: var(--lime); background: #211833; }
.site-footer { border-top: 1px solid var(--line); }
.footer-inner { min-height: 5.5rem; }

.document {
  max-width: 53rem;
  padding-block: clamp(2.6rem, 7vw, 5.4rem);
}

.document-heading {
  margin-bottom: 0.9rem;
  padding-bottom: clamp(1.5rem, 4vw, 2.4rem);
  border-bottom: 1px solid var(--line);
}

.document-heading h1 {
  margin-block: 0.25rem 0.75rem;
  font-size: clamp(2.85rem, 7vw, 5.25rem);
  font-weight: 790;
  line-height: 1.04;
  letter-spacing: -0.045em;
}

.document-heading p { color: var(--muted); font-size: 1.06rem; }
.document-body p { max-width: 70ch; color: var(--muted); }
.document-body section { padding-block: 1.5rem; border-bottom: 1px solid var(--line); }
.document-body section:last-child { border-bottom: 0; }
.document-body h2 { margin-bottom: 0.48rem; font-size: 1.35rem; letter-spacing: -0.028em; }
.document-body p + p { margin-top: 0.6rem; }
.document a { color: var(--lime); text-underline-offset: 0.2em; }

.document-contents { padding-block: 1rem; border-bottom: 1px solid var(--line); }
.document-contents h2 { font-size: 1rem; }
.document-contents ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  column-gap: 1.5rem;
  margin: 0.45rem 0 0;
  padding: 0;
  list-style: none;
}
.document-contents a { display: flex; align-items: center; min-height: 2.75rem; }

@media (max-width: 58rem) {
  .hero { grid-template-columns: minmax(0, 0.94fr) minmax(0, 1.06fr); gap: 1.6rem; }
  .hero h1 { font-size: clamp(2.8rem, 7.15vw, 4.7rem); }
  .hero-description { font-size: 1.03rem; }
  .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 42rem) {
  .shell { width: min(calc(100% - 2.5rem), var(--page)); }
  .header-inner { min-height: 4.1rem; }
  .brand { font-size: 1.18rem; gap: 0.46rem; }
  .brand img { width: 2rem; height: 2rem; border-radius: 0.55rem; }
  .nav a { font-size: 0.83rem; }
  .hero { grid-template-columns: 1fr; gap: 2rem; padding-block: 2.75rem; }
  .hero h1 { font-size: clamp(3.3rem, 11.5vw, 4.7rem); }
  .hero-actions { margin-top: 1.4rem; }
  .showcase { aspect-ratio: 1.16; }
  .catalog { padding-top: 1.8rem; }
  .game-grid { gap: 0.75rem; }
  .game-copy { padding: 0.9rem; }
  .game-copy h3 { font-size: 1.2rem; }
  .game-art { height: 7.15rem; }
  .local-note { flex-wrap: wrap; }
  .footer-inner { min-height: 4.7rem; }
}

@media (max-width: 23rem) {
  .shell { width: calc(100% - 2rem); }
  .header-inner { flex-wrap: wrap; gap: 0 0.65rem; }
  .nav { gap: 0.35rem; }
  .hero h1 { font-size: clamp(2.6rem, 13vw, 3.25rem); }
  .game-grid { grid-template-columns: minmax(0, 1fr); }
}

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