/*
 * CarSpotter landing page — mobile-first, no framework.
 *
 * Everything above the `@media (min-width: 820px)` block at the bottom is the phone
 * layout, which is what most visitors will see. The page is dark only: the badge is a
 * neon sign, and neon needs the night. Colours are lifted from the badge itself — the
 * lime of "CAR", the magenta of "SPOTTER", the cyan outline, the violet shield.
 */

@font-face {
  font-family: 'Russo One';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/russo-one-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308,
    U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Russo One';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/russo-one-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #0c0521;
  /* The sky's colour at its top and bottom edges, and the canvas colour behind the page. */
  --horizon: #2b0d5e;
  --bg-glow: #6e1ec8;
  --panel: rgba(255, 255, 255, 0.045);
  --line: rgba(255, 255, 255, 0.12);
  --ink: #f6f0ff;
  --muted: #c3b4e6;
  --lime: #c8ff3a;
  --lime-deep: #5d8f00;
  --pink: #ff3bd4;
  --cyan: #2fe6ff;
  --violet: #9b30ff;
  --display: 'Russo One', 'Arial Black', 'Segoe UI Black', system-ui, sans-serif;
  --radius: 22px;
  --maxw: 1040px;
  --gutter: 20px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  color-scheme: dark;
  /* The canvas colour: what browsers paint beyond the page when it is pulled past its ends. */
  background-color: var(--horizon);
}

body {
  margin: 0;
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  /* No background here: it would paint over the sky below, which sits at z-index -1. */
  /* The page must never scroll sideways on a phone. */
  overflow-x: hidden;
}

/*
 * The night sky. It stays put while the content scrolls over it.
 *
 * A fixed element rather than `background-attachment: fixed`, which iOS Safari ignores.
 * Three soft glows and a handful of sparkles, placed relative to the screen, so the big
 * violet glow is always behind the top of the page.
 *
 * When Safari rubber-bands (pull past the top or the bottom) it drags the page, clips
 * fixed layers to the screen, and paints the bare canvas colour in the gap. Nothing can
 * be drawn there, so the sky is made to *end* in that colour instead: the first two
 * layers bring its top and bottom edges to `--horizon`, which is also the canvas colour,
 * and the violet glows rise out of those edges. The gap then continues the page.
 */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-color: var(--bg);
  background-image:
    linear-gradient(to bottom, var(--horizon) 0, rgba(43, 13, 94, 0) 220px),
    linear-gradient(to top, var(--horizon) 0, rgba(43, 13, 94, 0) 220px),
    radial-gradient(1.5px 1.5px at 12% 18%, rgba(255, 255, 255, 0.7), transparent),
    radial-gradient(1.5px 1.5px at 78% 9%, rgba(200, 255, 58, 0.8), transparent),
    radial-gradient(2px 2px at 88% 42%, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(1.5px 1.5px at 22% 64%, rgba(47, 230, 255, 0.8), transparent),
    radial-gradient(2px 2px at 64% 78%, rgba(255, 59, 212, 0.7), transparent),
    radial-gradient(1.5px 1.5px at 40% 92%, rgba(255, 255, 255, 0.55), transparent),
    radial-gradient(70rem 44rem at 50% 0, rgba(155, 48, 255, 0.5), transparent 62%),
    radial-gradient(40rem 32rem at 105% 62%, rgba(255, 59, 212, 0.16), transparent 60%),
    radial-gradient(70rem 30rem at 50% 100%, rgba(155, 48, 255, 0.35), transparent 62%),
    radial-gradient(40rem 32rem at -5% 100%, rgba(47, 230, 255, 0.14), transparent 60%);
  background-repeat: no-repeat;
}

img,
svg {
  max-width: 100%;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.1;
  font-family: var(--display);
  font-weight: 400;
  text-wrap: balance;
}

p {
  margin: 0;
}

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

:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
}

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

/*
 * The rays behind the badge are boxed far wider than their visible glow, and on a phone
 * that box pokes past the screen edge. Clipping here (at the viewport's own width)
 * removes the sideways scroll without cutting anything a visitor can see. `clip` rather
 * than `hidden` so <main> does not become a scroll container.
 */
main {
  overflow: hidden;
  overflow: clip;
}

.hero,
.section,
.final-cta,
.site-header,
.site-footer {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: 40px;
}

.section > h2,
.final-cta > h2 {
  font-size: clamp(26px, 6.5vw, 40px);
  margin-bottom: 28px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/*
 * A frosted glass slab with a faint neon bevel, the way the shield has one. Translucent
 * and blurred so the sky shows through as the panel floats over it; the drop shadow is
 * what lifts it off the page.
 */
.panel {
  border: 1px solid transparent;
  border-radius: var(--radius);
  background-image:
    linear-gradient(rgba(12, 5, 33, 0.62), rgba(12, 5, 33, 0.62)),
    linear-gradient(135deg, rgba(47, 230, 255, 0.55), rgba(255, 59, 212, 0.35), rgba(200, 255, 58, 0.45));
  background-origin: border-box;
  background-clip: padding-box, border-box;
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow:
    inset 0 0 0 100vmax var(--panel),
    0 24px 48px -16px rgba(0, 0, 0, 0.55);
}

.icon {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: var(--cyan);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

/* ---------- header ---------- */

.site-header {
  display: flex;
  justify-content: flex-end;
  padding-block: 14px;
}

.lang-toggle {
  /* 44px square keeps it a comfortable thumb target. */
  min-width: 48px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  font-family: var(--display);
  font-size: 14px;
  letter-spacing: 0.06em;
  cursor: pointer;
}

.lang-toggle:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

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

.hero {
  padding-block: 8px 48px;
  text-align: center;
}

.hero-badge {
  position: relative;
  width: min(78vw, 340px);
  margin-inline: auto;
}

.hero-badge img {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  animation: float 6s ease-in-out infinite;
}

/*
 * Light rays: a striped conic gradient in the neon colours, faded out at the rim so it
 * has no hard edge, turning slowly behind the badge.
 */
.rays {
  position: absolute;
  inset: -30%;
  border-radius: 50%;
  background: repeating-conic-gradient(
    from 0deg,
    transparent 0deg 9deg,
    rgba(255, 59, 212, 0.22) 9deg 11deg,
    transparent 11deg 21deg,
    rgba(47, 230, 255, 0.2) 21deg 23deg,
    transparent 23deg 33deg,
    rgba(200, 255, 58, 0.16) 33deg 35deg,
    transparent 35deg 45deg
  );
  -webkit-mask-image: radial-gradient(circle, #000 18%, transparent 66%);
  mask-image: radial-gradient(circle, #000 18%, transparent 66%);
  animation: spin 80s linear infinite;
}

.hero h1 {
  margin-top: 20px;
  font-size: clamp(42px, 13vw, 64px);
  line-height: 1.04;
  text-transform: uppercase;
}

/* Each word on its own line, in its own neon colour. */
.hero h1 span {
  display: block;
}

/*
 * Neon lettering: the face in one colour, a thin outline in the complementary one, a
 * glow of the outline colour, and a short dark extrusion so the letters stand off the
 * page the way the badge's do.
 */
.neon-lime {
  color: #dcff5a;
  text-shadow:
    0 0 1px var(--cyan),
    0 0 16px rgba(47, 230, 255, 0.75),
    0 4px 0 #0a3f5c;
}

.neon-pink {
  color: #ff4fdb;
  text-shadow:
    0 0 1px var(--lime),
    0 0 16px rgba(200, 255, 58, 0.55),
    0 4px 0 #4d0a5c;
}

.neon-cyan {
  color: #4feeff;
  text-shadow:
    0 0 1px var(--pink),
    0 0 16px rgba(255, 59, 212, 0.65),
    0 4px 0 #0a3f5c;
}

.lede {
  max-width: 34em;
  margin: 20px auto 0;
  font-size: clamp(17px, 4.4vw, 20px);
  color: var(--muted);
}

/* A chunky game button: lime face, a dark lip underneath, and a glow. */
.cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 60px;
  margin: 28px auto 0;
  padding: 14px 36px;
  border-radius: 18px;
  background: linear-gradient(180deg, #e9ff70, #b7f52c);
  color: #15260a;
  font-family: var(--display);
  font-size: 20px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow:
    0 6px 0 var(--lime-deep),
    0 16px 44px rgba(200, 255, 58, 0.3);
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease;
}

.cta:hover {
  transform: translateY(-2px);
  box-shadow:
    0 8px 0 var(--lime-deep),
    0 20px 52px rgba(200, 255, 58, 0.45);
}

.cta:active {
  transform: translateY(4px);
  box-shadow:
    0 2px 0 var(--lime-deep),
    0 8px 24px rgba(200, 255, 58, 0.3);
}

.workshop {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  padding: 10px 16px 10px 12px;
  border: 1px dashed var(--line);
  border-radius: 999px;
  font-size: 14px;
  line-height: 1.35;
  color: var(--muted);
  text-align: left;
}

.workshop .icon {
  width: 20px;
  height: 20px;
  stroke: var(--lime);
}

/* ---------- steps ---------- */

.steps {
  counter-reset: step;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding: 24px 24px 24px 76px;
}

/* The step number, big and outlined like a race number. */
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 22px;
  top: 18px;
  font-family: var(--display);
  font-size: 40px;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--pink);
  text-shadow: 0 0 14px rgba(255, 59, 212, 0.55);
}

.steps h3 {
  font-size: 19px;
}

.steps .icon {
  margin-bottom: 12px;
}

.steps p {
  margin-top: 8px;
  font-size: 16px;
  color: var(--muted);
}

/* ---------- what's inside ---------- */

.inside {
  display: grid;
  gap: 32px;
  align-items: center;
}

.spot {
  margin: 0 auto;
  width: min(100%, 360px);
  overflow: hidden;
}

.spot-photo {
  position: relative;
  line-height: 0;
}

.spot-photo svg {
  display: block;
  width: 100%;
  height: auto;
}

.pill {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(12, 5, 33, 0.75);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.spot-body {
  padding: 18px 20px 20px;
}

.spot-make {
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.spot-model {
  font-family: var(--display);
  font-size: 28px;
  line-height: 1.1;
  color: var(--lime);
}

.spot-when {
  margin-top: 4px;
  font-size: 14px;
  color: var(--muted);
}

.specs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 16px 0 0;
}

.specs div {
  padding: 10px 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  text-align: center;
}

.specs dt {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.specs dd {
  margin: 2px 0 0;
  font-family: var(--display);
  font-size: 15px;
  color: var(--cyan);
  white-space: nowrap;
}

.spot-value {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
}

.spot-value strong {
  font-family: var(--display);
  font-weight: 400;
  font-size: 17px;
  color: var(--pink);
  white-space: nowrap;
}

.ticks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.ticks li {
  padding: 6px 12px 6px 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  position: relative;
  font-size: 13px;
  color: var(--muted);
}

/* A tick mark drawn with borders: rotated box, two visible sides. */
.ticks li::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 8px;
  width: 6px;
  height: 10px;
  border: solid transparent;
  border-width: 0 2px 2px 0;
  border-color: rgba(255, 255, 255, 0.18);
  transform: rotate(45deg);
}

.ticks li.on {
  border-color: rgba(200, 255, 58, 0.5);
  background: rgba(200, 255, 58, 0.08);
  color: var(--ink);
}

.ticks li.on::before {
  border-color: var(--lime);
}

.features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 22px;
}

.features li {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.features .icon {
  width: 48px;
  height: 48px;
  padding: 11px;
  border-radius: 14px;
  background: rgba(47, 230, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(47, 230, 255, 0.25);
}

.features h3 {
  font-size: 19px;
}

.features p {
  margin-top: 6px;
  font-size: 16px;
  color: var(--muted);
}

/* ---------- parents ---------- */

.parents {
  padding: 28px 24px;
}

.parents h2 {
  font-size: clamp(22px, 5.5vw, 30px);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.parents-intro {
  margin-top: 10px;
  font-size: 18px;
}

.checks {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.checks li {
  position: relative;
  padding-left: 32px;
  font-size: 16px;
  color: var(--muted);
}

.checks li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 5px;
  width: 7px;
  height: 13px;
  border: solid var(--cyan);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

/* ---------- final CTA ---------- */

.final-cta {
  padding-block: 40px 56px;
  text-align: center;
}

.final-cta p {
  margin-top: 12px;
  color: var(--muted);
}

.final-cta .cta {
  margin-top: 24px;
}

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

.site-footer {
  padding-block: 28px 40px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.fine-print {
  font-size: 13px;
  color: var(--muted);
}

/* ---------- motion ---------- */

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-badge img,
  .rays {
    animation: none;
  }
}

/* ---------- tablet and up ---------- */

@media (min-width: 820px) {
  :root {
    --gutter: 32px;
  }

  .hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 40px;
    padding-block: 24px 72px;
    text-align: left;
  }

  /* Words on the left, badge on the right. */
  .hero-badge {
    order: 2;
    width: min(100%, 440px);
  }

  .hero h1 {
    margin-top: 0;
    font-size: clamp(56px, 7vw, 76px);
  }

  .lede {
    margin-inline: 0;
  }

  /* Once there's room, the button shrinks to its content instead of spanning the column. */
  .cta {
    display: inline-flex;
    width: auto;
    margin-inline: 0;
  }

  .final-cta .cta {
    margin-inline: auto;
  }

  .section {
    padding-block: 52px;
  }

  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  .steps li {
    padding: 28px 24px 28px 24px;
  }

  .steps li::before {
    left: auto;
    right: 20px;
    top: 20px;
  }

  .inside {
    grid-template-columns: 380px 1fr;
    gap: 56px;
  }

  /* A little tilt, like a card dropped on a table. */
  .spot {
    transform: rotate(-2deg);
  }

  .parents {
    padding: 36px 40px;
  }

  .checks {
    grid-template-columns: 1fr 1fr;
    gap: 16px 32px;
  }
}
