:root {
  color-scheme: dark;
  --ink: #f8f5ea;
  --muted: #aaaec2;
  --night: #0b0d20;
  --panel: #12162d;
  --panel-2: #191e3c;
  --line: rgba(255, 255, 255, 0.12);
  --coral: #ff6b65;
  --cyan: #67e8e4;
  --lemon: #f9df64;
  --violet: #9987ff;
  --max: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 85% 4%, rgba(105, 82, 218, 0.2), transparent 28rem),
    linear-gradient(180deg, #10142c 0, var(--night) 45rem);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-width: 320px;
}
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--cyan); outline-offset: 4px; }
.skip-link { position: fixed; left: 1rem; top: -6rem; z-index: 99; padding: .8rem 1rem; background: var(--ink); color: var(--night); border-radius: .5rem; }
.skip-link:focus { top: 1rem; }

.site-header {
  width: min(calc(100% - 3rem), var(--max));
  margin: 0 auto;
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .85rem; text-decoration: none; font: 600 1.05rem ui-rounded, "SF Pro Rounded", system-ui, sans-serif; letter-spacing: -.02em; }
.brand strong { color: var(--coral); }
.brand-mark { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 10px; display: grid; grid-template-columns: repeat(3, 5px); gap: 3px; place-content: center; transform: rotate(-5deg); }
.brand-mark i { width: 5px; height: 5px; background: var(--cyan); border-radius: 1px; }
.brand-mark i:nth-child(2) { background: var(--coral); transform: translateY(-5px); }
.brand-mark i:nth-child(3) { background: var(--lemon); }
nav { display: flex; gap: 2rem; }
nav a { color: var(--muted); text-decoration: none; font-size: .9rem; }
nav a:hover { color: var(--ink); }

.hero {
  width: min(calc(100% - 3rem), var(--max));
  margin: 0 auto;
  min-height: 675px;
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  align-items: center;
  gap: 6rem;
  position: relative;
  overflow: hidden;
}
.hero::before { content: ""; position: absolute; inset: 10% auto auto 48%; width: 480px; height: 480px; border: 1px solid rgba(103, 232, 228, .08); border-radius: 50%; box-shadow: 0 0 0 80px rgba(103,232,228,.025), 0 0 0 160px rgba(103,232,228,.015); }
.hero-copy { position: relative; z-index: 1; }
.eyebrow { color: var(--muted); text-transform: uppercase; letter-spacing: .17em; font-size: .72rem; font-weight: 700; display: flex; align-items: center; gap: .6rem; }
.eyebrow span { width: 23px; height: 3px; background: var(--coral); border-radius: 2px; }
h1, h2, h3 { font-family: ui-rounded, "SF Pro Rounded", system-ui, sans-serif; }
.hero h1 { margin: 1.25rem 0 1.5rem; font-size: clamp(3.3rem, 6.5vw, 6.3rem); line-height: .93; letter-spacing: -.065em; }
.hero h1 em { color: var(--cyan); font-style: normal; }
.hero-text { max-width: 620px; color: var(--muted); font-size: 1.12rem; line-height: 1.7; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.25rem; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: .8rem; min-height: 52px; padding: 0 1.25rem; border-radius: 12px; text-decoration: none; font-weight: 700; font-size: .9rem; }
.button-primary { background: var(--coral); color: #1a1020; box-shadow: 0 13px 30px rgba(255, 107, 101, .2); }
.button-primary:hover { background: #ff817b; transform: translateY(-1px); }
.button-quiet { border: 1px solid var(--line); color: var(--ink); background: rgba(255,255,255,.03); }
.button-quiet:hover { background: rgba(255,255,255,.08); }

.hero-cabinet { width: min(100%, 340px); justify-self: center; transform: rotate(3deg); filter: drop-shadow(0 30px 50px rgba(0,0,0,.4)); position: relative; z-index: 1; }
.cabinet-top { height: 72px; background: var(--lemon); border-radius: 24px 24px 7px 7px; color: #11162b; display: flex; justify-content: space-between; padding: 13px 24px; font: 800 2.2rem ui-rounded, "SF Pro Rounded", system-ui; border: 5px solid #080b18; }
.cabinet-top span:last-child { color: var(--coral); }
.cabinet-screen { height: 275px; margin: -2px 12px 0; background: #101733; border: 12px solid #5b65c8; border-bottom-width: 18px; position: relative; overflow: hidden; box-shadow: inset 0 0 60px rgba(103,232,228,.12); }
.cabinet-screen::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(255,255,255,.025) 4px); pointer-events: none; }
.pixel-stars { position: absolute; inset: 0; background-image: radial-gradient(var(--ink) 1px, transparent 1px); background-size: 32px 32px; opacity: .3; }
.pixel-ship { position: absolute; left: 50%; top: 34%; color: var(--cyan); font-size: 3.8rem; transform: translate(-50%, -50%); text-shadow: -28px 30px 0 rgba(255,107,101,.8), 28px 30px 0 rgba(249,223,100,.7); }
.screen-copy { position: absolute; inset: auto 0 24px; text-align: center; color: var(--ink); font: 700 1rem/1.2 ui-rounded, "SF Pro Rounded", system-ui; letter-spacing: .25em; }
.cabinet-controls { height: 125px; background: var(--violet); border: 5px solid #080b18; border-top: 0; border-radius: 0 0 28px 28px; display: flex; align-items: center; gap: 26px; padding: 0 48px; }
.cabinet-controls i { width: 13px; height: 50px; background: #171a33; border-radius: 8px; transform: translateY(-10px); box-shadow: 0 12px 0 #080b18; }
.cabinet-controls b { width: 34px; height: 34px; border-radius: 50%; background: var(--coral); border: 4px solid #080b18; }
.cabinet-controls b:last-child { background: var(--cyan); transform: translateY(12px); }

.library { padding: 7rem max(1.5rem, calc((100vw - var(--max)) / 2)); background: #f4f0e6; color: #15172c; }
.library .eyebrow { color: #6f7080; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 2rem; margin-bottom: 3rem; }
.section-heading h2, .motion-section h2, .about h2 { margin: .8rem 0 0; font-size: clamp(2.2rem, 4vw, 4rem); letter-spacing: -.055em; line-height: 1; }
.filters { display: flex; gap: .45rem; flex-wrap: wrap; justify-content: flex-end; }
.filter { border: 1px solid #d3cfc5; background: transparent; color: #555767; min-height: 40px; padding: 0 .9rem; border-radius: 99px; cursor: pointer; font: 600 .78rem Inter, ui-sans-serif, system-ui, sans-serif; }
.filter.active { background: #15172c; border-color: #15172c; color: #fff; }
.game-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.game-card { border: 1px solid #d8d3c7; border-radius: 18px; overflow: hidden; background: #fffcf6; transition: transform .2s ease, box-shadow .2s ease; }
.game-card:hover { transform: translateY(-5px); box-shadow: 0 18px 40px rgba(28, 25, 47, .1); }
.game-card[hidden], .motion-games article[hidden] { display: none; }
.card-art { height: 185px; position: relative; overflow: hidden; display: grid; place-items: center; }
.card-body { padding: 1.45rem; }
.card-kicker { text-transform: uppercase; color: #777685; letter-spacing: .12em; font-size: .65rem; font-weight: 700; }
.card-body h3 { margin: .45rem 0 .6rem; font-size: 1.65rem; letter-spacing: -.04em; }
.card-body > p:not(.card-kicker) { color: #676775; line-height: 1.55; min-height: 75px; font-size: .91rem; }
.card-links { display: flex; flex-wrap: wrap; gap: .45rem 1rem; padding-top: .9rem; border-top: 1px solid #e3dfd6; }
.card-links a { font-size: .78rem; font-weight: 700; text-decoration: none; color: #38366f; }
.card-links a::after { content: " →"; color: var(--coral); }
.card-space .card-art { background: #172352; }
.art-ship { color: var(--cyan); font-size: 4rem; transform: rotate(90deg); filter: drop-shadow(0 0 14px var(--cyan)); }
.card-space .card-art i { position: absolute; width: 5px; height: 5px; background: #fff; border-radius: 50%; }
.card-space .card-art i:nth-of-type(1) { left: 15%; top: 24%; }.card-space .card-art i:nth-of-type(2) { right: 20%; top: 17%; }.card-space .card-art i:nth-of-type(3) { right: 27%; bottom: 22%; background: var(--coral); }
.card-butts .card-art { background: #f2b6d4; }.art-cloud { display: grid; place-items: center; width: 112px; height: 86px; border-radius: 50% 50% 45% 45%; background: #813d78; color: #ffddeb; font: 700 3rem ui-rounded, "SF Pro Rounded", system-ui; transform: rotate(-6deg); }.art-boom { position: absolute; font-size: 3.5rem; color: #ff5e4f; right: 19%; top: 18%; }
.card-tower .card-art { background: #bfe2cf; }.art-tower { font-size: 6rem; color: #22554b; z-index: 1; }.art-path { position: absolute; width: 150%; height: 46px; background: #e9d58d; transform: rotate(-9deg); border-block: 5px dashed rgba(58,80,64,.3); }
.card-racing .card-art { background: #ee7868; }.art-road { position: absolute; width: 90px; height: 260px; background: #252a3e; transform: rotate(55deg); }.art-road::after { content: ""; position: absolute; left: 44px; height: 100%; border-left: 4px dashed var(--lemon); }.art-car { z-index: 1; color: var(--cyan); font-size: 3.8rem; transform: rotate(-35deg); }
.card-stealth .card-art { background: #5b4c86; }.art-crowd { color: #d9d4f1; font: 700 2.1rem/1.25 monospace; letter-spacing: .4rem; text-align: center; }.art-crowd::first-line { color: var(--cyan); }
.card-command .card-art { background: #c8d0bd; }.art-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(34,52,52,.12) 1px, transparent 1px), linear-gradient(90deg, rgba(34,52,52,.12) 1px, transparent 1px); background-size: 25px 25px; transform: perspective(260px) rotateX(50deg) scale(1.4); }.art-units { z-index: 1; color: #263f4a; font: 700 2rem/1.4 monospace; text-align: center; text-shadow: 30px -20px 0 var(--coral); }

.motion-section { width: min(calc(100% - 3rem), var(--max)); margin: 0 auto; padding: 8rem 0; display: grid; grid-template-columns: .75fr 1.25fr; gap: 7rem; align-items: start; }
.motion-intro { position: sticky; top: 3rem; }
.motion-intro > p:not(.eyebrow) { color: var(--muted); line-height: 1.7; max-width: 430px; margin: 1.5rem 0; }
.text-link { color: var(--cyan); text-decoration: none; font-weight: 700; }
.motion-games { border-top: 1px solid var(--line); }
.motion-games article { display: grid; grid-template-columns: 60px 1fr auto; gap: 1.5rem; align-items: center; padding: 2.1rem 0; border-bottom: 1px solid var(--line); }
.motion-number { color: var(--coral); font: 600 .75rem ui-rounded, "SF Pro Rounded", system-ui; }
.motion-games h3 { margin: 0 0 .35rem; font-size: 1.55rem; }
.motion-games p { margin: 0; color: var(--muted); }
.motion-games a { text-decoration: none; font-weight: 700; color: var(--lemon); }

.about { padding: 7rem max(1.5rem, calc((100vw - var(--max)) / 2)); background: var(--coral); color: #1b1627; }
.about .eyebrow { color: rgba(27,22,39,.65); }.about .eyebrow span { background: #1b1627; }
.about h2 { max-width: 970px; font-size: clamp(2.5rem, 5vw, 5.2rem); }
.about > p:last-child { max-width: 710px; margin: 2rem 0 0 auto; font-size: 1.08rem; line-height: 1.75; color: rgba(27,22,39,.75); }
footer { width: min(calc(100% - 3rem), var(--max)); min-height: 120px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: center; color: var(--muted); font-size: .82rem; }
footer > span { color: var(--ink); font: 600 1rem ui-rounded, "SF Pro Rounded", system-ui; } footer p { text-align: center; } footer a { text-align: right; text-decoration: none; }
.not-found { display: grid; min-height: 100vh; place-items: center; }.not-found main { width: min(90%, 680px); }.not-found h1 { font-size: clamp(3rem, 8vw, 6rem); line-height: .95; margin: 1rem 0; }.not-found main > p:not(.eyebrow) { color: var(--muted); margin-bottom: 2rem; }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; gap: 2rem; padding: 5rem 0; }
  .hero-cabinet { display: none; }
  .game-grid { grid-template-columns: repeat(2, 1fr); }
  .motion-section { grid-template-columns: 1fr; gap: 3.5rem; }
  .motion-intro { position: static; }
}
@media (max-width: 660px) {
  .site-header { min-height: 76px; width: min(calc(100% - 2rem), var(--max)); }
  nav { gap: 1rem; } nav a:nth-child(3) { display: none; }
  .hero, .motion-section { width: min(calc(100% - 2rem), var(--max)); }
  .hero { min-height: 610px; padding: 3.5rem 0; }
  .hero h1 { font-size: clamp(3rem, 15vw, 4.5rem); }
  .section-heading { align-items: start; flex-direction: column; }
  .filters { justify-content: flex-start; }
  .game-grid { grid-template-columns: 1fr; }
  .card-body > p:not(.card-kicker) { min-height: 0; }
  .motion-games article { grid-template-columns: 40px 1fr; }.motion-games article > a { grid-column: 2; }
  footer { grid-template-columns: 1fr auto; padding: 2rem 0; } footer p { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
