@font-face {
  font-family: "Barlow Condensed";
  src: url("media/barlow-condensed-800.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("media/dm-sans.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}
:root {
  color-scheme: dark;
  --night: #0d1230;
  --blue: #243baf;
  --gold: #ffda64;
  --ink: #11183d;
  --white: #f9f6ef;
  --line: #ffffff26;
  --shell: 1240px;
  --display: "Barlow Condensed", Impact, "Arial Narrow", sans-serif;
  --body: "DM Sans", system-ui, sans-serif;
  font: 16px/1.55 var(--body);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--night); color: var(--white); }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: .96; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid currentColor; outline-offset: 5px; }
.shell { width: min(var(--shell), calc(100% - clamp(36px, 9vw, 144px))); margin-inline: auto; }
.skip:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: absolute; z-index: 5; top: 8px; left: 8px; padding: 12px; background: var(--gold); color: var(--ink); }

.masthead { background: #151d4a; border-bottom: 1px solid var(--line); }
.topbar { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 22px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-family: var(--display); font-size: 28px; letter-spacing: .025em; line-height: 1; white-space: nowrap; }
.brand b { color: var(--gold); font-weight: inherit; }
.topbar nav { display: flex; gap: clamp(16px, 4vw, 54px); color: #dce3ff; font-weight: 650; font-size: .91rem; }
.topbar nav a:hover, .footer-link:hover { color: var(--gold); }
.nav-download, .store-link, .footer-link { display: inline-flex; align-items: center; gap: 16px; font-weight: 750; white-space: nowrap; }
.nav-download { min-height: 44px; padding-inline: 15px; font-size: .88rem; border: 1px solid #a5b6ff69; border-radius: 7px; }
.nav-download:hover { background: #26336c; }
.hero { overflow: hidden; position: relative; isolation: isolate; background: radial-gradient(ellipse at 80% 40%, #4164dc, transparent 57%), linear-gradient(135deg, #172665 0%, var(--blue) 56%, #172863 100%); }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .46;
  background-image: linear-gradient(#a4bcff26 1px, transparent 1px), linear-gradient(90deg, #a4bcff26 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(100deg, transparent 8%, black 70%);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); align-items: center; gap: 24px; min-height: 660px; padding-block: 62px 70px; }
.hero-copy { position: relative; z-index: 2; }
.kicker { display: flex; align-items: center; gap: 10px; text-transform: uppercase; letter-spacing: .15em; font: 750 .72rem/1.15 var(--body); letter-spacing: .15em; }
.kicker { color: #e4ebff; margin-bottom: 23px; }
.kicker span { width: 9px; height: 9px; background: var(--gold); border-radius: 2px; transform: rotate(45deg); flex: none; }
.hero h1 { font-size: clamp(4.1rem, 8.3vw, 8.4rem); letter-spacing: -.048em; line-height: .88; text-transform: uppercase; }
.hero h1 em { font-style: normal; color: var(--gold); }
.hero-copy > p:not(.kicker) { max-width: 38ch; margin-top: 27px; color: #e0e7ff; font-size: clamp(1rem, 1.6vw, 1.22rem); }
#download { scroll-margin: 24px; }
.download { margin-top: 28px; }
.download-status { color: #e0e7ff; font-size: .87rem; font-weight: 650; }
.store-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; }
.store-link { min-height: 50px; padding: 0 16px; color: var(--ink); background: var(--gold); border: 1px solid var(--gold); border-radius: 7px; box-shadow: 0 4px 0 #8d5b24; transition: transform .18s, box-shadow .18s, background .18s; }
.store-link + .store-link { color: var(--white); background: #182761; border-color: #b8c8ff70; box-shadow: 0 4px 0 #101943; }
.store-link:hover { transform: translateY(-2px); background: #ffe88d; }
.store-link + .store-link:hover { background: #243572; }
.store-link:active { transform: translateY(2px); }
.store-link:focus-visible { outline-color: var(--white); }

.arcade { position: relative; display: grid; place-items: center; isolation: isolate; scroll-margin: 18px; }
.orbit, .orbit::before, .orbit::after { position: absolute; pointer-events: none; border: 1px solid #bed1ff52; border-radius: 50%; }
.orbit { width: 123%; height: 83%; transform: rotate(-27deg); z-index: -1; }
.orbit::before { content: ""; inset: -10% -9%; border-style: dashed; opacity: .55; }
.orbit::after { content: ""; width: 13px; height: 13px; background: var(--gold); border: 0; box-shadow: 0 0 23px #ffdc83a0; left: 5%; top: 21%; }
.plancia {
  width: min(100%, 465px);
  padding: clamp(8px, 1.3vw, 16px);
  background: linear-gradient(155deg, #293766, #101635 72%);
  border: 1px solid #a3b8ff82;
  border-radius: 22px;
  box-shadow: 0 8px 0 #0b143d, 0 34px 72px #080e38bf, inset 0 1px #ffffff38;
  transform: rotate(5deg);
}
.plancia img { width: 100%; height: auto; border-radius: 15px; }
.arcade figcaption { margin-top: 22px; color: #e0e7ff; font-size: .81rem; }

.rules { background: #f7f3e8; color: var(--ink); padding-block: clamp(56px, 8vw, 108px); }
.rules h2, .modes h2 { font-size: clamp(3.2rem, 7vw, 6.4rem); text-transform: uppercase; letter-spacing: -.035em; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); padding: 0; margin: 38px 0 0; list-style: none; border-top: 1px solid #171c3e32; }
.steps li { padding: 24px clamp(10px, 3vw, 42px) 0 0; }
.steps li + li { border-left: 1px solid #171c3e32; padding-left: clamp(14px, 3vw, 42px); }
.steps h3 { margin-top: 18px; font-size: clamp(1.73rem, 3vw, 2.7rem); }
.steps p { margin-top: 9px; color: #3a4463; max-width: 31ch; }
.step-icon { height: 47px; display: flex; align-items: center; gap: 5px; }
.step-icon i { width: 25px; height: 25px; border-radius: 6px; border: 1px solid #3335; background: var(--tile); box-shadow: inset 0 -3px #0003, inset 0 2px #fff8; }
.step-icon span { font-size: 1.48rem; font-weight: 800; }
.square-icon { display: grid; width: max-content; grid-template-columns: repeat(2, 21px); grid-template-rows: repeat(2, 21px); }
.square-icon i { width: 21px; height: 21px; }
.cascade-icon i:first-child { align-self: flex-start; }
.cascade-icon i:nth-child(2) { align-self: flex-end; }

.modes { padding-block: clamp(56px, 8vw, 108px); background: #101735; }
.mode-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 34px; }
.mode { display: grid; grid-template-columns: 1.05fr 1fr; background: #182249; border: 1px solid #b5c3ff39; border-radius: 14px; overflow: hidden; }
.mode-copy { padding: 24px; }
.mode h3 { font-size: clamp(2rem, 4vw, 3.4rem); color: var(--mode); }
.mode p { color: #e2e8ff; margin-top: 10px; }
.classic { --mode: #72daf5; --stage: #1a5675; }
.adventure { --mode: #ffd776; --stage: #795025; }
.mode-art { display: grid; place-items: start center; min-height: clamp(194px, 24vw, 290px); position: relative; overflow: hidden; background: repeating-linear-gradient(138deg, transparent 0 18px, #ffffff0d 18px 19px), var(--stage); }
.mode-art img { position: absolute; top: 17px; width: min(calc(100% - 28px), 217px); height: auto; border: 1px solid #ffffff60; border-radius: 11px; box-shadow: 0 14px 30px #0007; transition: transform .3s ease; }
.mode:hover img { transform: translateY(-6px); }

.footer { border-top: 1px solid var(--line); }
.footer-inner { min-height: 138px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 19px; padding-block: 20px; }
.footer img { object-fit: contain; }
.footer-link { min-height: 44px; }

@media (max-width: 1040px) {
  .hero-grid { min-height: 600px; gap: 18px; }
  .hero h1 { font-size: clamp(3.5rem, 8.8vw, 6.5rem); }
  .mode-copy { padding: 21px; }
}
@media (max-width: 740px) {
  .topbar { min-height: 64px; gap: 10px; }
  .topbar nav { display: none; }
  .brand { font-size: 25px; }
  .hero-grid { grid-template-columns: 1fr; gap: 43px; min-height: 0; padding-block: 49px 57px; }
  .hero h1 { font-size: clamp(3.35rem, 12vw, 6.2rem); }
  .arcade { width: min(100%, 470px); justify-self: center; }
  .plancia { width: calc(100% - 20px); transform: rotate(3deg); }
  .mode-grid { grid-template-columns: 1fr; }
  .mode { grid-template-columns: 1.12fr .88fr; }
  .mode-art { min-height: 190px; }
  .mode-art img { position: absolute; width: min(calc(100% - 22px), 175px); top: 15px; }
}
@media (max-width: 500px) {
  .steps { grid-template-columns: 1fr; margin-top: 24px; }
  .steps li, .steps li + li { display: grid; grid-template-columns: 62px 1fr; align-items: center; padding: 18px 0; border-left: 0; border-bottom: 1px solid #171c3e32; }
  .steps h3 { margin: 0; }
  .steps p { grid-column: 2; margin-top: 3px; }
  .mode-copy { padding: 17px; }
  .mode p { font-size: .91rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
