@font-face {
  font-family: "Barlow Condensed";
  src: url("./barlow-condensed-800.woff2") format("woff2");
  font-style: normal;
  font-weight: 800;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #0e0c12;
  --surface: #17131e;
  --border: #322a3c;
  --text: #f7f4fa;
  --muted: #bdb5c6;
  --lime: #d4fa69;
  --cyan: #64def2;
  --pink: #ff7bbc;
  --heading: "Barlow Condensed", "Arial Narrow", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--cyan); outline-offset: 5px; }
img { display: block; max-width: 100%; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { line-height: 0.96; }
section[id] { scroll-margin-top: 28px; }

.wrap { width: min(100% - 96px, 1152px); margin-inline: auto; }
.icon { width: 22px; height: 22px; flex: none; display: block; }

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 3;
  translate: 0 -160%;
  padding: 9px 15px;
  border-radius: 6px;
  background: var(--lime);
  color: #101209;
  font-weight: 700;
}
.skip-link:focus { translate: 0; }

.site-header { border-bottom: 1px solid var(--border); background: #110e17; }
.header-inner {
  min-height: 76px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 28px;
}
.brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 10px;
  font-size: 1.02rem;
  font-weight: 790;
  letter-spacing: -0.035em;
}
.brand .icon { color: var(--lime); width: 26px; height: 26px; }
.nav, .footer-nav { display: flex; align-items: center; gap: clamp(16px, 3vw, 34px); }
.nav a, .footer-nav a { color: var(--muted); font-size: 0.88rem; font-weight: 540; }
.nav a:hover, .footer-nav a:hover { color: var(--lime); }
.locale {
  justify-self: end;
  display: flex;
  align-items: center;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 8px;
  gap: 2px;
  font: 700 0.72rem/1 var(--mono);
}
.locale > * {
  min-width: 38px;
  min-height: 34px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  color: var(--muted);
}
.locale a:hover { color: var(--text); background: var(--surface); }
.locale [aria-current="page"] { background: var(--lime); color: #16190d; }

.hero {
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  background:
    radial-gradient(ellipse at 73% 46%, #2a1943 0%, transparent 52%),
    #100d17;
}
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  align-items: center;
  min-height: 565px;
  padding-block: 78px;
}
.hero-copy { position: relative; z-index: 1; }
.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--lime);
  font: 700 0.75rem/1.4 var(--mono);
  letter-spacing: 0.105em;
  text-transform: uppercase;
}
.eyebrow .icon { width: 17px; height: 17px; }
.hero h1, .display {
  font-family: var(--heading);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.015em;
}
.hero h1 {
  font-size: clamp(3.45rem, 6.7vw, 6rem);
  line-height: 0.87;
  margin-block: 19px 23px;
}
.hero h1 span { display: block; color: var(--lime); }
.hero-copy > p:last-of-type {
  max-width: 39ch;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.12rem);
}
.cta {
  display: inline-flex;
  min-height: 49px;
  width: fit-content;
  align-items: center;
  justify-content: center;
  gap: 23px;
  margin-top: 28px;
  border-radius: 7px;
  padding: 9px 15px 9px 18px;
  background: var(--lime);
  color: #14180c;
  font-size: 0.92rem;
  font-weight: 760;
  transition: background-color 140ms ease;
}
.cta .icon { width: 17px; height: 17px; }
.cta:hover { background: #e5ffa1; }

.hero-art {
  position: relative;
  display: grid;
  place-items: center;
  align-self: stretch;
  min-width: 0;
  isolation: isolate;
}
.hero-art::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -13% -14% -13% -8%;
  background-image: linear-gradient(#aa83db20 1px, transparent 1px),
    linear-gradient(90deg, #aa83db20 1px, transparent 1px);
  background-size: 33px 33px;
  mask-image: radial-gradient(ellipse, #000 28%, transparent 71%);
}
.hero-art::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 82%;
  aspect-ratio: 1;
  border: 1px solid #a17bce29;
  border-radius: 50%;
  box-shadow: 0 0 0 36px #a17bce0c;
}
.hero-art img {
  width: 119%;
  height: auto;
  max-width: none;
  filter: drop-shadow(0 16px 24px #08050cb0);
}
.hero-ornament { position: absolute; display: block; pointer-events: none; }
.hero-ornament.one { top: 8%; right: 7%; color: var(--pink); }
.hero-ornament.two { bottom: 9%; left: 5%; color: var(--cyan); }
.hero-ornament.three { bottom: 3%; right: 13%; color: var(--lime); width: 13px; height: 13px; }

.games { padding-block: 79px 80px; }
.display { font-size: clamp(3.05rem, 6.8vw, 5.9rem); }
.section-title { margin-bottom: 26px; }
.game-feature {
  --game-accent: var(--cyan);
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--surface);
}
.game-feature + .game-feature { margin-top: 24px; }
.game-feature.racing { --game-accent: #ff986c; }
.racing .platform { background: #251711ed; border-color: #b86b496e; color: #ffcbaf; }
.game-image { position: relative; min-height: 390px; background: #0d1422; }
.game-image::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, #0d10222b, transparent 40%), linear-gradient(0deg, #080b1670, transparent 36%);
}
.game-image img { width: 100%; height: 100%; object-fit: cover; object-position: 58% center; }
.platform {
  position: absolute;
  z-index: 1;
  left: 20px;
  bottom: 18px;
  padding: 7px 10px;
  border: 1px solid #6bc4d971;
  border-radius: 5px;
  background: #0b1726ed;
  color: #b2eff9;
  font: 700 0.71rem/1.2 var(--mono);
  letter-spacing: 0.065em;
  text-transform: uppercase;
}
.game-copy { padding: clamp(28px, 4.2vw, 51px); }
.game-copy .eyebrow { color: var(--game-accent); font-size: 0.68rem; }
.game-copy .text-link { color: var(--game-accent); margin-top: 12px; }
.game-copy .display { font-size: clamp(3.1rem, 6.1vw, 5.2rem); margin-block: 9px 13px; }
.game-copy > p:not(.eyebrow) { color: var(--muted); }
.modes { padding: 0; margin: 22px 0 0; list-style: none; }
.modes li {
  display: flex;
  align-items: baseline;
  gap: 9px;
  padding-block: 8px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
}
.modes li::before { content: ""; align-self: center; width: 5px; height: 5px; background: var(--game-accent); rotate: 45deg; margin-inline: 2px 4px; flex: none; }
.modes strong { color: var(--text); white-space: nowrap; }

.studio {
  border-block: 1px solid var(--border);
  background: #140f1c;
}
.studio-inner { padding-block: 43px; display: grid; grid-template-columns: 1fr 1.05fr; align-items: center; gap: 32px; }
.studio-title { display: flex; align-items: center; gap: 18px; }
.studio-title .display { font-size: clamp(2.55rem, 5vw, 4.25rem); }
.studio-copy { color: var(--muted); }
.studio-copy p + p { margin-top: 10px; }
.studio-copy strong { color: var(--text); }
.icon-tile {
  height: 46px;
  width: 46px;
  display: grid;
  place-items: center;
  flex: none;
  border: 1px solid #a15a903f;
  border-radius: 10px;
  background: #a14a9025;
  color: var(--pink);
}
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  min-height: 36px;
  color: var(--lime);
  font-size: 0.91rem;
  font-weight: 730;
}
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.text-link .icon { width: 16px; height: 16px; }
.info-section {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding-block: 70px 78px;
}
.info-card { padding: clamp(23px, 3vw, 34px); border: 1px solid var(--border); border-radius: 13px; background: var(--surface); }
.info-card .display { margin-top: 16px; font-size: clamp(2.25rem, 4vw, 3.5rem); }
.info-card p { margin-block: 9px 10px; color: var(--muted); }
.info-card .icon-tile { color: var(--cyan); border-color: #598fa345; background: #448da628; }
.info-card:last-child .icon-tile { color: var(--lime); border-color: #8ba35945; background: #8ca64422; }
.contact-link { max-width: 100%; overflow-wrap: anywhere; }

.site-footer { border-top: 1px solid var(--border); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 87px; padding-block: 16px; }
.footer-inner small { color: var(--muted); white-space: nowrap; }

.policy-main { padding-block: 66px 84px; }
.policy-article { max-width: 770px; margin: 24px auto 0; }
.policy-article > .display { margin-block: 18px 16px; }
.policy-intro { color: var(--muted); font-size: 1.12rem; max-width: 62ch; }
.policy-section { padding-block: 25px; border-top: 1px solid var(--border); }
.policy-section:first-of-type { margin-top: 34px; }
.policy-section h2 { margin-bottom: 10px; font-size: clamp(1.7rem, 4vw, 2.1rem); font-family: var(--heading); font-weight: 800; }
.policy-section p { color: var(--muted); }
.policy-section p + p { margin-top: 9px; }
.policy-section p a { color: var(--lime); text-decoration: underline; text-underline-offset: 3px; }
.policy-section .contact-link { margin-top: 8px; }
.policy-back .icon { rotate: 180deg; }

@media (max-width: 1050px) {
  .wrap { width: calc(100% - 72px); }
  .hero-inner { min-height: 510px; padding-block: 64px; }
}

@media (max-width: 760px) {
  .wrap { width: calc(100% - 40px); }
  .header-inner { min-height: 68px; grid-template-columns: 1fr auto; gap: 0 12px; }
  .nav { grid-column: 1 / -1; grid-row: 2; justify-content: center; gap: 24px; border-top: 1px solid var(--border); }
  .nav a { display: flex; align-items: center; min-height: 41px; }
  .locale { grid-column: 2; grid-row: 1; margin-block: 10px; }
  .hero-inner { grid-template-columns: 1fr; padding-block: 43px 8px; min-height: 0; }
  .hero h1 { font-size: clamp(3.65rem, 12vw, 6.6rem); margin-block: 15px 17px; }
  .hero-art { width: min(100%, 490px); justify-self: center; margin-top: 4px; }
  .hero-art img { width: 110%; }
  .hero-art::after { width: 62%; }
  .hero-ornament.one { top: 13%; }
  .hero-ornament.two { bottom: 13%; }
  .hero-ornament.three { bottom: 9%; }
  .games { padding-block: 50px; }
  .section-title { margin-bottom: 19px; }
  .game-feature { grid-template-columns: 1fr; }
  .game-image { min-height: 0; aspect-ratio: 16 / 10; }
  .game-copy { padding: 25px; }
  .studio-inner { grid-template-columns: 1fr; gap: 15px; padding-block: 29px; }
  .info-section { grid-template-columns: 1fr; padding-block: 48px; }
  .footer-inner { flex-wrap: wrap; column-gap: 22px; }
  .footer-nav { width: 100%; row-gap: 6px; flex-wrap: wrap; }
  .footer-nav a { display: flex; align-items: center; min-height: 35px; }
  .policy-main { padding-block: 35px 55px; }
}

@media (max-width: 375px) {
  .hero h1 { font-size: clamp(2.9rem, 14vw, 3.35rem); }
  .nav { gap: 15px; }
  .nav a { font-size: 0.82rem; }
  .modes li { flex-wrap: wrap; column-gap: 8px; row-gap: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0s !important; }
}

/* Game pages */
.game-detail { --game-accent: var(--cyan); }
.game-detail.cockpit-gp { --game-accent: #ff986c; }
.detail-hero { position: relative; isolation: isolate; overflow: hidden; background: #100e15; }
.detail-art {
  position: absolute;
  z-index: -2;
  inset: 0 0 0 auto;
  width: 78%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 55%;
}
.detail-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(90deg, #100e15 14%, #100e15f5 30%, #100e15c4 45%, #100e1514 73%),
    linear-gradient(0deg, #100e1580, transparent 45%);
}
.detail-intro { padding-block: 24px clamp(42px, 5vw, 76px); }
.back-link {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  min-height: 40px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 630;
}
.back-link:hover { color: var(--text); }
.back-link .icon, [data-previous] .icon { rotate: 180deg; }
.back-link .icon { width: 16px; height: 16px; }
.detail-heading { margin-top: clamp(30px, 4.8vw, 70px); max-width: 640px; }
.detail-heading .eyebrow { color: var(--game-accent); }
.detail-heading h1 { font-size: clamp(4.4rem, 8.5vw, 8rem); line-height: 0.92; margin-block: 11px 18px; }
.detail-heading > p:last-of-type { max-width: 44ch; color: #e4dfe7; font-size: 1.05rem; }
.detail-heading .cta { background: var(--game-accent); }
.detail-heading .cta:hover { filter: brightness(1.12); }
.detail-specs { background: var(--surface); border-block: 1px solid var(--border); }
.detail-specs dl { display: grid; grid-template-columns: repeat(3, 1fr); margin-block: 0; padding-block: 22px; }
.detail-specs dl > div + div { border-left: 1px solid var(--border); padding-left: clamp(16px, 3.2vw, 44px); }
.detail-specs dt { color: var(--muted); font: 650 0.7rem/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; }
.detail-specs dd { margin: 4px 0 0; font-size: clamp(0.9rem, 1.5vw, 1.1rem); font-weight: 660; }
.detail-body { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); gap: clamp(26px, 4.5vw, 68px); padding-block: clamp(38px, 5vw, 72px); }
.detail-body h2, .game-access h2 { font-size: clamp(2.1rem, 3.4vw, 3.2rem); }
.gallery-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 20px; }
.gallery-controls { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.gallery button { color: var(--text); cursor: pointer; background: var(--surface); border: 1px solid var(--border); }
.gallery button:focus-visible { outline: 2px solid var(--game-accent); outline-offset: 3px; }
.gallery-controls button { display: grid; place-items: center; padding: 0; width: 36px; height: 36px; border-radius: 50%; }
.gallery-controls button:hover { color: var(--game-accent); border-color: currentColor; }
.gallery-controls .icon { width: 16px; height: 16px; }
.gallery-count { color: var(--muted); font: 650 0.75rem/1 var(--mono); }
.screens { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.gallery.interactive .screens { display: block; }
.screen-image {
  display: block;
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #08080a;
  border: 1px solid var(--border);
  border-radius: 9px;
}
.screen-image img { width: 100%; height: 100%; object-fit: contain; }
.expand-icon { position: absolute; bottom: 10px; right: 10px; padding: 7px; border-radius: 5px; color: #fff; background: #100e15d9; }
.screen-image:hover .expand-icon { color: var(--game-accent); }
.expand-icon .icon { width: 16px; height: 16px; }
.screen figcaption { margin-top: 8px; color: var(--muted); font-size: 0.89rem; }
.thumbnails { margin-top: 12px; display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 6px; }
.thumbnails button { padding: 2px; border-radius: 5px; overflow: hidden; }
.thumbnails img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; opacity: 0.65; border-radius: 2px; }
.thumbnails button[aria-current], .thumbnails button:hover { border-color: var(--game-accent); }
.thumbnails button[aria-current] { box-shadow: inset 0 0 0 1px var(--game-accent); }
.thumbnails button[aria-current] img, .thumbnails button:hover img { opacity: 1; }
.car-comparison { margin-top: 14px; color: var(--game-accent); }
.play-notes { margin-top: 20px; border-top: 1px solid var(--border); }
.play-notes > div { padding-block: 16px; border-bottom: 1px solid var(--border); }
.play-notes h3 { font: 800 1.42rem/1.1 var(--heading); }
.play-notes p, .game-access p { margin-top: 6px; color: var(--muted); font-size: 0.94rem; }
.game-access { margin-bottom: clamp(36px, 5vw, 72px); border-left: 3px solid var(--game-accent); background: var(--surface); padding: clamp(22px, 3vw, 35px); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.game-access p { max-width: 64ch; }
.game-access .text-link { flex-shrink: 0; color: var(--game-accent); }
.sr-only { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; white-space: nowrap; }

@media (min-width: 541px) {
  .cockpit-gp .thumbnails { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (max-width: 850px) {
  .detail-body { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .detail-art { width: 100%; height: 64%; object-position: center 42%; }
  .detail-hero::before { background: linear-gradient(0deg, #100e15 29%, #100e15e8 47%, #100e1512 75%), linear-gradient(130deg, #100e1580, transparent 40%); }
  .detail-intro { padding-block: 12px 32px; }
  .back-link { color: #fff; text-shadow: 0 1px 4px #000; }
  .detail-heading { margin-top: clamp(115px, 25vw, 215px); }
  .detail-heading h1 { font-size: clamp(3.7rem, 13vw, 5.5rem); }
  .game-access { align-items: flex-start; flex-direction: column; gap: 8px; }
}
@media (max-width: 540px) {
  .detail-specs dl { grid-template-columns: 1fr; gap: 8px; padding-block: 15px; }
  .detail-specs dl > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
  .detail-specs dl > div + div { padding: 0; border: 0; }
  .detail-specs dd { margin: 0; text-align: right; }
  .gallery-heading { flex-wrap: wrap; }
  .gallery-heading h2 { font-size: 1.9rem; }
  .gallery-controls { gap: 6px; }
  .thumbnails { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .screens { grid-template-columns: 1fr; }
}
