/* ==========================================================================
   Game Maps IRL — design system
   Direction: night-drive road signage. High-visibility amber and route cyan
   on a deep petrol ink, with cartographic grid and drawn-route motifs.
   ========================================================================== */

:root {
  --ink-900: #040a09;
  --ink-800: #071210;
  --ink-700: #0b1c18;
  --ink-600: #112a23;

  --fg: #e9f2ef;
  --fg-dim: #8ba49d;
  --fg-faint: #566b65;

  --line: rgba(233, 242, 239, 0.09);
  --line-strong: rgba(233, 242, 239, 0.18);

  --amber: #ffb627;
  --cyan: #2fe6c0;

  /* Overridden by the theme switcher */
  --accent: #2fe6c0;
  --accent-2: #ffb627;

  --shell: min(1220px, 100% - 2.5rem);
  --radius: 14px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ink-900);
  color: var(--fg);
  font-family: "Archivo", ui-sans-serif, sans-serif;
  font-variation-settings: "wdth" 100;
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Fixed grain + grid atmosphere, drawn behind everything */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 68px 68px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 20%, transparent 75%);
  opacity: 0.5;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.22;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}

main,
header,
footer {
  position: relative;
  z-index: 2;
}

/* --------------------------------------------------------- typography --- */

h1,
h2,
h3 {
  font-family: "Archivo", sans-serif;
  font-weight: 800;
  font-variation-settings: "wdth" 112;
  line-height: 0.98;
  letter-spacing: -0.028em;
  text-wrap: balance;
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 7.6vw, 6.1rem);
  text-transform: uppercase;
}

h2 {
  font-size: clamp(1.75rem, 5vw, 3.7rem);
  text-transform: uppercase;
}

/* Narrow the display width on small screens so long words still fit */
@media (max-width: 560px) {
  h1,
  h2 {
    font-variation-settings: "wdth" 96;
  }
}

h3 {
  font-size: 1.32rem;
  font-variation-settings: "wdth" 100;
  letter-spacing: -0.015em;
}

p {
  margin: 0;
  text-wrap: pretty;
}

a {
  color: inherit;
}

/* HUD-style label used above each section heading */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: "Martian Mono", ui-monospace, monospace;
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.3rem;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
}

.eyebrow--center {
  justify-content: center;
}

.lede {
  color: var(--fg-dim);
  font-size: clamp(1.02rem, 1.6vw, 1.16rem);
  max-width: 54ch;
}

/* -------------------------------------------------------------- layout --- */

.shell {
  width: var(--shell);
  margin-inline: auto;
}

section {
  padding-block: clamp(5rem, 11vw, 9rem);
  border-top: 1px solid var(--line);
}

.section-head {
  max-width: 60ch;
  margin-bottom: 3.5rem;
}

.section-head .lede {
  margin-top: 1.5rem;
}

/* -------------------------------------------------------------- buttons --- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.95rem 1.5rem;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: rgba(233, 242, 239, 0.04);
  color: var(--fg);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.35s var(--ease), background 0.3s, border-color 0.3s;
}

.btn:hover {
  transform: translateY(-2px);
  background: rgba(233, 242, 239, 0.08);
  border-color: var(--accent);
}

.btn--solid {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--ink-900);
}

.btn--solid:hover {
  background: var(--accent);
  filter: brightness(1.12);
}

.btn svg {
  width: 20px;
  height: 20px;
  flex: none;
}

.btn small {
  display: block;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.7;
  line-height: 1.2;
}

.btn strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
}

.store-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

/* ----------------------------------------------------------------- nav --- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--ink-900) 78%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}

.nav[data-scrolled="true"] {
  border-bottom-color: var(--line);
}

.nav__inner {
  width: var(--shell);
  margin-inline: auto;
  height: 68px;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font-weight: 800;
  font-variation-settings: "wdth" 108;
  letter-spacing: -0.02em;
  font-size: 1.02rem;
  text-transform: uppercase;
  margin-right: auto;
}

.brand svg {
  width: 26px;
  height: 26px;
}

.nav__links {
  display: flex;
  gap: 1.9rem;
}

.nav__links a {
  font-family: "Martian Mono", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-dim);
  text-decoration: none;
  transition: color 0.25s;
}

.nav__links a:hover {
  color: var(--accent);
}

.nav .btn {
  padding: 0.6rem 1.1rem;
  font-size: 0.85rem;
}

@media (max-width: 900px) {
  .nav__links {
    display: none;
  }
}

@media (max-width: 420px) {
  .brand {
    font-size: 0.9rem;
    gap: 0.45rem;
  }
  .brand svg {
    width: 22px;
    height: 22px;
  }
  .nav .btn {
    padding: 0.55rem 0.85rem;
    font-size: 0.78rem;
  }
}

/* ---------------------------------------------------------------- hero --- */

.hero {
  padding-top: clamp(9rem, 16vw, 12rem);
  padding-bottom: clamp(4rem, 8vw, 7rem);
  border-top: 0;
  position: relative;
}

.hero__glow {
  position: absolute;
  top: -10%;
  left: 50%;
  translate: -50% 0;
  width: min(1100px, 120vw);
  aspect-ratio: 1;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(
    circle,
    color-mix(in srgb, var(--accent) 16%, transparent) 0%,
    transparent 62%
  );
  transition: background 0.8s var(--ease);
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

/* Grid children default to min-width:auto, which lets a long headline force
   the whole track wider than the viewport. */
.hero__grid > *,
.themes__layout > * {
  min-width: 0;
}

@media (max-width: 940px) {
  .hero__grid {
    grid-template-columns: 1fr;
  }
}

.hero h1 span {
  display: block;
}

.hero h1 .accent {
  color: var(--accent);
  font-style: italic;
  font-variation-settings: "wdth" 88;
}

.hero .lede {
  margin-block: 1.8rem 2.4rem;
}

/* Animated route line that draws under the headline */
.route-line {
  width: 100%;
  max-width: 420px;
  height: 34px;
  margin-bottom: 2rem;
  overflow: visible;
}

.route-line path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 460;
  stroke-dashoffset: 460;
  animation: draw 2.6s var(--ease) 0.4s forwards;
}

.route-line circle {
  fill: var(--accent);
  opacity: 0;
  animation: pop 0.5s var(--ease) 2.6s forwards;
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes pop {
  to {
    opacity: 1;
  }
}

/* ------------------------------------------------------- phone mockup --- */
/* Placeholder chrome. Drop a real screenshot into .phone__screen as an
   <img> and the CSS map underneath can be deleted. */

.phone {
  position: relative;
  width: min(300px, 78vw);
  margin-inline: auto;
  aspect-ratio: 9 / 19.5;
  border-radius: 42px;
  padding: 10px;
  background: linear-gradient(160deg, #2a3a36, #0a1512 40%, #223330);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.9),
    0 0 0 1px rgba(233, 242, 239, 0.06);
  animation: float 7s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotate(-1.2deg);
  }
  50% {
    transform: translateY(-16px) rotate(-0.3deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .phone {
    animation: none;
  }
  .route-line path {
    animation: none;
    stroke-dashoffset: 0;
  }
  .route-line circle {
    animation: none;
    opacity: 1;
  }
  * {
    scroll-behavior: auto !important;
  }
}

.phone__screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 33px;
  overflow: hidden;
  background: var(--map-bg, #0d1b17);
  transition: background 0.6s var(--ease);
}

.phone__screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.phone__notch {
  position: absolute;
  top: 10px;
  left: 50%;
  translate: -50% 0;
  width: 88px;
  height: 24px;
  border-radius: 14px;
  background: #05100d;
  z-index: 4;
}

/* Stylized CSS/SVG map standing in for a real screenshot */
.map-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.map-svg .roads {
  stroke: var(--map-road, #1e3b33);
  stroke-width: 7;
  fill: none;
  stroke-linecap: round;
  transition: stroke 0.6s var(--ease);
}

.map-svg .roads-thin {
  stroke: var(--map-road, #1e3b33);
  stroke-width: 3;
  fill: none;
  opacity: 0.6;
  transition: stroke 0.6s var(--ease);
}

.map-svg .route {
  stroke: var(--accent);
  stroke-width: 5;
  fill: none;
  stroke-linecap: round;
  filter: drop-shadow(0 0 8px var(--accent));
  transition: stroke 0.6s var(--ease);
}

.map-svg .puck {
  fill: var(--accent);
  transition: fill 0.6s var(--ease);
}

/* In-app HUD overlay on the mockup */
.phone__hud {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 14px;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  background: rgba(4, 10, 9, 0.82);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  z-index: 3;
}

.phone__hud .dist {
  font-family: "Martian Mono", monospace;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--accent);
  transition: color 0.6s var(--ease);
}

.phone__hud .street {
  font-size: 0.86rem;
  color: var(--fg-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* -------------------------------------------------------------- themes --- */

.themes__layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

@media (max-width: 940px) {
  .themes__layout {
    grid-template-columns: 1fr;
  }
}

.theme-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.theme-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.05rem 1.2rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: transparent;
  color: var(--fg);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.3s, border-color 0.3s, transform 0.3s var(--ease);
}

.theme-btn:hover {
  background: rgba(233, 242, 239, 0.04);
  transform: translateX(4px);
}

.theme-btn[aria-pressed="true"] {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 9%, transparent);
}

.theme-btn__dot {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  flex: none;
  background: var(--dot);
  box-shadow: 0 0 12px var(--dot);
}

/* Swatch colours live here so the markup needs no inline styles, which keeps
   the Content-Security-Policy in _headers free of 'unsafe-inline'. */
.theme-btn[data-theme="default"] { --dot: #2fe6c0; }
.theme-btn[data-theme="block"] { --dot: #7bd83a; }
.theme-btn[data-theme="neon"] { --dot: #fcee0a; }
.theme-btn[data-theme="frontier"] { --dot: #e07a3f; }
.theme-btn[data-theme="west"] { --dot: #f2c14e; }
.theme-btn[data-theme="sunset"] { --dot: #ff6b8a; }

.theme-btn__name {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.theme-btn__sub {
  font-family: "Martian Mono", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-faint);
}

.theme-btn__idx {
  margin-left: auto;
  font-family: "Martian Mono", monospace;
  font-size: 0.7rem;
  color: var(--fg-faint);
}

/* ------------------------------------------------------------ features --- */

/* Three columns so the five cards land as wide+1 / 1+1+1 with no ragged row */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
}

@media (max-width: 940px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 620px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }
}

.card {
  padding: 1.9rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(
    165deg,
    rgba(233, 242, 239, 0.045),
    rgba(233, 242, 239, 0.012)
  );
  position: relative;
  overflow: hidden;
  transition: border-color 0.35s, transform 0.4s var(--ease);
}

.card:hover {
  border-color: var(--line-strong);
  transform: translateY(-4px);
}

.card__icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
  margin-bottom: 1.4rem;
  transition: background 0.5s, color 0.5s;
}

.card__icon svg {
  width: 21px;
  height: 21px;
}

.card h3 {
  margin-bottom: 0.7rem;
}

.card p {
  color: var(--fg-dim);
  font-size: 0.96rem;
}

/* Wide card spans two columns on roomy screens */
.card--wide {
  grid-column: span 2;
}

@media (max-width: 720px) {
  .card--wide {
    grid-column: span 1;
  }
}

/* ------------------------------------------------------------- in-car --- */

.dash {
  margin-top: 3.5rem;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--ink-800);
  padding: 12px;
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.9);
}

.dash__screen {
  position: relative;
  aspect-ratio: 16 / 7;
  border-radius: 10px;
  overflow: hidden;
  background: var(--map-bg, #0d1b17);
  transition: background 0.6s var(--ease);
}

.dash__screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dash__badges {
  display: flex;
  gap: 0.6rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.9rem;
  border-radius: 100px;
  border: 1px solid var(--line);
  font-family: "Martian Mono", monospace;
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-dim);
}

.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* ------------------------------------------------------------ reviews --- */

.review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.1rem;
}

.review {
  padding: 1.7rem;
  border-radius: var(--radius);
  border: 1px dashed var(--line-strong);
  background: rgba(233, 242, 239, 0.02);
}

.review__stars {
  color: var(--amber);
  letter-spacing: 0.16em;
  font-size: 0.9rem;
  margin-bottom: 0.9rem;
}

.review__body {
  color: var(--fg-dim);
  font-size: 0.97rem;
  margin-bottom: 1.2rem;
}

.review__meta {
  font-family: "Martian Mono", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-faint);
}

.placeholder-note {
  margin-top: 2rem;
  padding: 1rem 1.2rem;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--amber) 35%, transparent);
  background: color-mix(in srgb, var(--amber) 7%, transparent);
  color: var(--amber);
  font-family: "Martian Mono", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  line-height: 1.7;
}

/* ---------------------------------------------------------------- faq --- */

.faq {
  max-width: 800px;
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  padding: 1.5rem 2.5rem 1.5rem 0;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  font-size: 1.06rem;
  position: relative;
  transition: color 0.25s;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary:hover {
  color: var(--accent);
}

.faq summary::after {
  content: "+";
  position: absolute;
  right: 0.4rem;
  top: 50%;
  translate: 0 -50%;
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--accent);
  transition: rotate 0.35s var(--ease);
}

.faq details[open] summary::after {
  rotate: 45deg;
}

.faq details p {
  padding-bottom: 1.6rem;
  color: var(--fg-dim);
  max-width: 68ch;
  font-size: 0.98rem;
}

/* ------------------------------------------------------------------ cta --- */

.cta {
  text-align: center;
}

.cta .store-row {
  justify-content: center;
  margin-top: 2.4rem;
}

/* --------------------------------------------------------------- footer --- */

.footer {
  border-top: 1px solid var(--line);
  padding-block: 3.5rem 2.5rem;
}

.footer__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  justify-content: space-between;
  align-items: flex-start;
}

.footer__links {
  display: flex;
  gap: 1.8rem;
  flex-wrap: wrap;
}

.footer__links a {
  font-family: "Martian Mono", monospace;
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-dim);
  text-decoration: none;
  transition: color 0.25s;
}

.footer__links a:hover {
  color: var(--accent);
}

.footer__legal {
  width: 100%;
  margin-top: 2.5rem;
  padding-top: 1.8rem;
  border-top: 1px solid var(--line);
  color: var(--fg-faint);
  font-size: 0.8rem;
  line-height: 1.7;
}

/* ------------------------------------------------------- legal / prose --- */

.prose-page {
  padding-top: clamp(8rem, 14vw, 10rem);
  padding-bottom: 6rem;
  border-top: 0;
}

.prose {
  max-width: 74ch;
}

.prose h1 {
  font-size: clamp(2.2rem, 5.5vw, 3.6rem);
  margin-bottom: 1rem;
}

.prose h2 {
  font-size: clamp(1.3rem, 2.6vw, 1.7rem);
  margin-top: 3rem;
  margin-bottom: 0.9rem;
  text-transform: none;
  font-variation-settings: "wdth" 100;
}

.prose h3 {
  font-size: 1.05rem;
  margin-top: 1.8rem;
  margin-bottom: 0.5rem;
}

.prose p,
.prose li {
  color: var(--fg-dim);
  font-size: 1rem;
}

.prose p {
  margin-bottom: 1.1rem;
}

.prose ul {
  padding-left: 1.2rem;
  margin-bottom: 1.1rem;
}

.prose li {
  margin-bottom: 0.5rem;
}

.prose a {
  color: var(--accent);
  text-underline-offset: 3px;
}

.prose strong {
  color: var(--fg);
}

.prose__updated {
  font-family: "Martian Mono", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-faint);
  margin-bottom: 3rem;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.92rem;
}

.prose th,
.prose td {
  text-align: left;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  color: var(--fg-dim);
  vertical-align: top;
}

.prose th {
  color: var(--fg);
  font-weight: 600;
  background: rgba(233, 242, 239, 0.03);
}

/* --------------------------------------------------------- scroll reveal --- */

[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 0.8rem 1.2rem;
  background: var(--accent);
  color: var(--ink-900);
  font-weight: 700;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
