/* The Car Game website. Brand from the Steam art (Pictures/TheCarGame-Previews/steam-v1/src/brand.css): the game's own
   fonts, the tachometer orange and the speedometer blue, and the slanted livery stripes. */
@font-face {
  font-family: "Baloo 2";
  src: url("fonts/Baloo2-ExtraBold.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: "Audiowide";
  src: url("fonts/Audiowide-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  --bg: #0d0d12;
  --bg-2: #13131b;
  --surface: #191923;
  --surface-2: #22222e;
  --line: rgba(255, 255, 255, 0.09);
  --text: #ececf1;
  --muted: #a3a3b1;
  --orange: #ff7c2e;
  --orange-hover: #ff9452;
  --blue: #2e69ff;
  --kofi: #ff5e5b;
  --radius: 14px;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Baloo 2", var(--font-body);
  --font-tech: "Audiowide", var(--font-body);
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; }

a { color: var(--orange); }

:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--orange);
  color: #14100c;
  font-weight: 700;
  border-radius: 8px;
}
.skip:focus { top: 12px; }

/* ---------- The wordmark: Audiowide "the" over Baloo 2 "car game", livery stripes under, slanted ---------- */
.wordmark {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
  margin: 0;
  color: #fff;
  font-weight: inherit;
  white-space: nowrap;
  transform: skewX(-8deg);
}
.wordmark .the {
  font-family: var(--font-tech);
  font-size: 0.3em;
  letter-spacing: 0.55em;
  margin-right: -0.55em; /* the tracking after the last letter would push the word off centre */
  margin-bottom: -0.02em;
  color: var(--orange);
}
.wordmark .word {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.005em;
}
.wordmark .stripes {
  display: flex;
  align-self: stretch;
  justify-content: center;
  gap: 0.07em;
  margin-top: 0.07em;
}
.wordmark .stripes i {
  display: block;
  width: 44%;
  height: 0.085em;
  transform: skewX(-30deg);
}
.wordmark .stripes i:first-child,
.rule i:first-child { background: var(--orange); }
.wordmark .stripes i:last-child,
.rule i:last-child { background: var(--blue); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 17px;
  line-height: 1.2;
  text-decoration: none;
  transition: transform 0.15s, background-color 0.15s, box-shadow 0.15s;
}
.btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  flex: none;
}
.btn img {
  width: auto;
  height: 22px;
  flex: none;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--orange);
  color: #14100c;
  box-shadow: 0 10px 30px -12px rgba(255, 124, 46, 0.7);
}
.btn-primary:hover { background: var(--orange-hover); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(6px);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.15); }
.btn-kofi {
  background: var(--kofi);
  color: #1c0b0b;
  box-shadow: 0 10px 30px -12px rgba(255, 94, 91, 0.7);
}
.btn-kofi:hover { background: #ff7774; }
/* Not a link yet: the Steam store page isn't public (data-steam-soon in the HTML). */
.btn-soon {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(236, 236, 241, 0.62);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(6px);
  cursor: default;
}
.btn-soon:hover { transform: none; }
.btn-small {
  padding: 9px 16px;
  font-size: 15px;
  border-radius: 10px;
}
.btn-small svg { width: 18px; height: 18px; }

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

/* ---------- Navigation: clear over the hero, solid once the page scrolls ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  transition: background-color 0.25s, box-shadow 0.25s;
}
.nav.solid {
  background: rgba(13, 13, 18, 0.88);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--line);
}
.nav .wrap {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 68px;
}
.nav-brand {
  display: inline-flex;
  text-decoration: none;
  font-size: 34px;
}
.nav-tag {
  margin: 0;
  padding-left: 20px;
  border-left: 1px solid rgba(255, 255, 255, 0.28);
  font-family: var(--font-tech);
  font-size: 12px;
  line-height: 26px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--orange);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}
.nav-links {
  display: flex;
  gap: 26px;
  margin-left: auto;
}
.nav-links a {
  color: rgba(236, 236, 241, 0.82);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
}
.nav-links a:hover { color: #fff; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: min(100svh, 960px);
  overflow: hidden;
}
.hero-art img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 23% 55%; /* the wide art's cars (39–60 % across) land right of the words */
}
/* A pool of shade under the words, not a curtain (as on the Steam capsules), and a fade into the page. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 62% 78% at 16% 48%, rgba(8, 8, 14, 0.8) 0%, rgba(8, 8, 14, 0.42) 52%, rgba(8, 8, 14, 0) 82%),
    linear-gradient(0deg, var(--bg) 0%, rgba(13, 13, 18, 0) 26%),
    linear-gradient(180deg, rgba(8, 8, 14, 0.6) 0%, rgba(8, 8, 14, 0) 16%);
}
.hero .wrap { width: 100%; }
.hero-content {
  max-width: 600px;
  padding-block: 110px 80px;
}
.wordmark-hero {
  font-size: clamp(70px, 10.5vw, 148px);
  margin: 0;
  filter: drop-shadow(0 6px 24px rgba(0, 0, 0, 0.45));
}
.tagline {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.12;
  margin: 26px 0 12px;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.5);
}
.lede {
  max-width: 30em;
  margin: 0;
  color: rgba(236, 236, 241, 0.88);
  font-size: 18px;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.6);
}

/* Phones and tall windows: the portrait art on top with the cars in view, the words below it. */
@media (max-aspect-ratio: 5/4) {
  .hero {
    display: block;
    min-height: 0;
  }
  .hero-art img {
    position: relative;
    display: block;
    height: min(64svh, 620px);
    object-position: 50% 72%;
  }
  .hero::before {
    bottom: auto;
    height: min(64svh, 620px);
    background:
      linear-gradient(0deg, var(--bg) 0%, rgba(13, 13, 18, 0) 38%),
      linear-gradient(180deg, rgba(8, 8, 14, 0.6) 0%, rgba(8, 8, 14, 0) 18%);
  }
  .hero-content {
    position: relative;
    margin-top: -64px;
    padding-block: 0 56px;
  }
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(72px, 10vw, 128px); }
.section-alt { background: var(--bg-2); }

.eyebrow {
  margin: 0;
  font-family: var(--font-tech);
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--orange);
}
h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(34px, 4.6vw, 54px);
  line-height: 1.04;
  letter-spacing: -0.01em;
  margin: 10px 0 18px;
}
h3 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.1;
}
.rule {
  display: flex;
  gap: 7px;
  margin-left: 4px;
}
.rule i {
  display: block;
  width: 58px;
  height: 6px;
  transform: skewX(-30deg);
}
.section-lede {
  max-width: 40em;
  color: var(--muted);
  margin: 24px 0 0;
}

/* ---------- Trailer ---------- */
.video {
  position: relative;
  aspect-ratio: 16 / 9;
  margin-top: 40px;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.9), 0 0 0 1px var(--line);
}
.video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.facade {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: #fff;
  font: inherit;
  cursor: pointer;
}
.facade:focus-visible { outline-offset: -4px; border-radius: var(--radius); }
.facade img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.66) saturate(1.05);
  transition: transform 0.5s, filter 0.3s;
}
.facade:hover img {
  transform: scale(1.03);
  filter: brightness(0.78) saturate(1.05);
}
.play {
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(76px, 9vw, 108px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 12px rgba(255, 124, 46, 0.22), 0 20px 50px -10px rgba(0, 0, 0, 0.7);
  transition: transform 0.2s;
}
.facade:hover .play { transform: scale(1.06); }
.play svg {
  width: 42%;
  height: 42%;
  fill: #14100c;
  margin-left: 6%;
}
.facade-label {
  position: absolute;
  left: clamp(16px, 3vw, 28px);
  bottom: clamp(14px, 2.5vw, 24px);
  font-weight: 700;
  font-size: 17px;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.7);
}
.facade-label span { color: rgba(236, 236, 241, 0.7); font-weight: 600; }
.facade-noscript {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
}

/* ---------- Features ---------- */
.shot {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: zoom-in;
  box-shadow: 0 30px 70px -36px rgba(0, 0, 0, 0.95), 0 0 0 1px var(--line);
}
.shot img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 0.5s;
}
.shot:hover img { transform: scale(1.03); }

.feature {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  margin-top: clamp(56px, 8vw, 96px);
}
.feature.flip .shot { order: 2; }
.feature h3 {
  font-size: clamp(27px, 3vw, 38px);
  margin: 10px 0 14px;
}
.feature p:not(.eyebrow) { color: var(--muted); margin: 0; }
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}
.chips li {
  padding: 6px 13px;
  border-radius: 999px;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 14px;
  font-weight: 600;
}

.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: clamp(64px, 9vw, 112px);
}
.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--line);
}
.card .shot {
  border-radius: 0;
  box-shadow: none;
}
.card-body { padding: 22px 26px 28px; }
.card h3 {
  font-size: 25px;
  margin: 0 0 8px;
}
.card p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px;
  margin: clamp(56px, 8vw, 88px) 0 0;
  background: var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--line);
}
.fact {
  padding: 20px 22px;
  background: var(--bg-2);
}
.fact dt {
  font-family: var(--font-tech);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.fact dd {
  margin: 6px 0 0;
  font-weight: 700;
}

/* ---------- Press kit ---------- */
.press-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
  margin-top: 32px;
}
.press-item {
  display: block;
  color: var(--text);
  text-decoration: none;
  background: var(--surface);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--line);
  transition: transform 0.15s, box-shadow 0.15s;
}
.press-item:hover {
  transform: translateY(-2px);
  box-shadow: inset 0 0 0 1px var(--line), 0 0 0 2px var(--orange);
}
.thumb {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #08080c;
}
.thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.thumb-logo {
  background: repeating-conic-gradient(#1d1d27 0% 25%, #16161e 0% 50%) 0 0 / 18px 18px;
}
.thumb-logo img {
  object-fit: contain;
  padding: 16px 20px;
}
.press-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  padding: 10px 14px 12px;
  font-size: 14px;
}
.press-meta span { color: var(--muted); font-size: 13px; }

/* ---------- Support ---------- */
.support {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.support-art {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 60%;
}
.support::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, var(--bg) 0%, rgba(13, 13, 18, 0.55) 22%, rgba(13, 13, 18, 0.55) 78%, var(--bg) 100%),
    rgba(13, 13, 18, 0.35);
}
.support-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 24px;
  align-items: stretch;
}
.panel {
  padding: clamp(26px, 4vw, 44px);
  background: rgba(19, 19, 27, 0.8);
  backdrop-filter: blur(14px);
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1), 0 40px 80px -40px rgba(0, 0, 0, 0.9);
}
.panel > p:not(.eyebrow) { color: rgba(236, 236, 241, 0.86); margin: 0; }
.panel h3 {
  font-size: 28px;
  margin: 10px 0 14px;
}
.social {
  display: grid;
  gap: 4px;
  margin: 0 -12px;
  padding: 0;
  list-style: none;
}
.social a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--text);
  text-decoration: none;
  transition: background-color 0.15s;
}
.social a:hover { background: rgba(255, 255, 255, 0.07); }
.social-soon {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  opacity: 0.6;
}
.social b { display: block; font-size: 16px; }
.social small { display: block; color: var(--muted); font-size: 14px; }
.ic {
  display: grid;
  place-items: center;
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 11px;
}
.ic svg { width: 22px; height: 22px; fill: #fff; }
.ic-steam { background: #171a21; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18); }
.ic-youtube { background: #ff0000; }
.ic-facebook { background: #0866ff; }
.ic-linkedin { background: #0a66c2; }

/* ---------- Footer ---------- */
.footer {
  padding-block: 40px 48px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}
.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.footer-brands {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
}
.footer-dev {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  padding-left: 28px;
  border-left: 1px solid var(--line);
  font-size: 13px;
}
.footer-dev img {
  width: auto;
  height: 64px;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}
.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}
.footer-links a:hover { color: var(--text); }
.legal {
  margin: 24px 0 0;
  font-size: 13px;
  color: #7d7d8a;
}

/* ---------- Lightbox ---------- */
.lightbox {
  max-width: 96vw;
  max-height: 96vh;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  overflow: visible;
}
.lightbox::backdrop {
  background: rgba(5, 5, 8, 0.92);
  backdrop-filter: blur(4px);
}
.lightbox figure {
  display: grid;
  justify-items: center;
  margin: 0;
}
.lightbox img {
  display: block;
  width: auto;
  height: auto;
  max-width: 96vw;
  max-height: calc(96vh - 56px);
  border-radius: 10px;
  background: #000;
}
.lightbox figcaption {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 12px 4px 0;
  color: var(--muted);
  font-size: 15px;
}
.lb-count { flex: none; font-variant-numeric: tabular-nums; }
.lb-btn {
  position: fixed;
  top: 50%;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-top: -26px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(10, 10, 14, 0.62);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  color: #fff;
  cursor: pointer;
  transition: background-color 0.15s;
}
.lb-btn:hover { background: rgba(10, 10, 14, 0.85); }
.lb-btn svg { width: 26px; height: 26px; fill: currentColor; }
.lb-prev { left: 16px; }
.lb-next { right: 16px; }
.lb-close {
  top: 16px;
  right: 16px;
  margin-top: 0;
}

/* ---------- Narrow screens ---------- */
@media (max-width: 1100px) {
  .nav-tag { display: none; }
}
@media (max-width: 860px) {
  .feature { grid-template-columns: 1fr; }
  .feature.flip .shot { order: 0; }
  .support-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav .btn { margin-left: auto; }
  .nav-brand { font-size: 30px; }
  .cards { grid-template-columns: 1fr; }
  .press-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .press-meta { flex-direction: column; gap: 0; }
  .footer-dev { padding-left: 0; border-left: 0; }
  .lb-btn { top: auto; bottom: 16px; margin-top: 0; }
  .lb-close { top: 16px; bottom: auto; }
  .lightbox img { max-height: calc(96vh - 140px); }
}
@media (max-width: 480px) {
  .eyebrow {
    font-size: 12px;
    letter-spacing: 0.12em;
  }
}

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