/* Ghost Racer landing page. Plain CSS, mobile first. */

@font-face {
  font-family: "Russo One";
  src: url("../fonts/RussoOne-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Rajdhani";
  src: url("../fonts/Rajdhani-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Rajdhani";
  src: url("../fonts/Rajdhani-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0b0a24;
  --bg-2: #141039;
  --panel: rgba(30, 24, 82, 0.55);
  --panel-solid: #1a1548;
  --line: rgba(77, 232, 255, 0.18);
  --cyan: #4de8ff;
  --cyan-soft: rgba(77, 232, 255, 0.35);
  --violet: #8a5cff;
  --gold: #ffc83d;
  --text: #eef1ff;
  --muted: #b9bfe8;
  --radius: 18px;
  --wrap: 1120px;
  --head: "Russo One", "Arial Black", system-ui, sans-serif;
  --body: "Rajdhani", "Segoe UI", system-ui, sans-serif;
}

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

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

body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 85% 55%, rgba(138, 92, 255, 0.12), transparent 60%),
    radial-gradient(900px 500px at 10% 70%, rgba(77, 232, 255, 0.07), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-weight: 600;
  font-size: 1.1875rem; /* 19px: Rajdhani runs small */
  line-height: 1.5;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--cyan); text-underline-offset: 3px; }
a:hover { color: #9ff3ff; }

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

h1, h2, h3 {
  font-family: var(--head);
  font-weight: 400;
  line-height: 1.12;
  margin: 0;
  letter-spacing: 0.01em;
}

p { margin: 0; }
h1, h2, h3, .lead { text-wrap: balance; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 20px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--gold);
  color: #1a1200;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ---------- Top bar ---------- */
.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background: linear-gradient(180deg, rgba(11, 10, 36, 0.85), rgba(11, 10, 36, 0));
  padding-top: env(safe-area-inset-top);
  transition: background-color 0.3s;
}
.topbar.is-scrolled {
  background: rgba(11, 10, 36, 0.88);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--line);
}
.topbar-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  height: 60px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-family: var(--head);
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}
.brand img { width: 36px; height: 36px; border-radius: 9px; box-shadow: 0 0 0 1px var(--line), 0 0 14px rgba(77, 232, 255, 0.35); }
.brand span { display: none; }

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 4px;
}
.nav-list a {
  display: inline-block;
  white-space: nowrap;
  padding: 8px 8px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 8px;
}
@media (min-width: 640px) {
  .nav-list a { padding: 8px 12px; font-size: 1rem; letter-spacing: 0.06em; }
}
.nav-list a:hover { color: var(--cyan); background: rgba(77, 232, 255, 0.08); }
/* "How it works" is the longest label; drop it on the narrowest phones */
@media (max-width: 359px) {
  .nav-list li:first-child { display: none; }
}

/* ---------- Hero (mobile: full-bleed art with text over it) ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  isolation: isolate;
  overflow: hidden;
}
.hero-backdrop { display: none; }
.hero-art {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.hero-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 45%;
}
/* scrims keep the copy readable whatever the art looks like */
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  z-index: -1;
  pointer-events: none;
}
.hero::before {
  top: 0;
  height: 54%;
  background: linear-gradient(180deg, rgba(11, 10, 36, 0.88) 0%, rgba(11, 10, 36, 0.62) 60%, rgba(11, 10, 36, 0) 100%);
}
.hero::after {
  bottom: 0;
  height: 42%;
  background: linear-gradient(0deg, var(--bg) 0%, rgba(11, 10, 36, 0.92) 35%, rgba(11, 10, 36, 0) 100%);
}

.hero-copy {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  padding: calc(76px + env(safe-area-inset-top)) 20px 28px;
  text-align: center;
}
.logo { margin: 0 auto; width: min(86%, 420px); }
.logo img { width: 100%; filter: drop-shadow(0 4px 18px rgba(0, 0, 0, 0.55)); }

.lead {
  margin-top: 10px;
  font-family: var(--head);
  font-size: clamp(1.2rem, 5.4vw, 1.6rem);
  line-height: 1.22;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
  max-width: 22ch;
  margin-left: auto;
  margin-right: auto;
}
.sub {
  margin-top: 8px;
  color: #eef1ff;
  font-size: 1.1rem;
  line-height: 1.3;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95), 0 0 14px rgba(11, 10, 36, 0.9);
}

.stores {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  max-width: 440px;
  margin-inline: auto;
}
.store {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: 60px;
  padding: 9px 14px 10px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(77, 232, 255, 0.2), rgba(77, 232, 255, 0.06));
  border: 1.5px solid var(--cyan);
  box-shadow: 0 0 22px rgba(77, 232, 255, 0.25), inset 0 0 18px rgba(77, 232, 255, 0.08);
  text-align: left;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.store-kicker {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #c8f7ff;
  line-height: 1.2;
}
.store-name {
  font-family: var(--head);
  font-size: 1.12rem;
  line-height: 1.2;
  color: #fff;
}
.store--later {
  border-color: rgba(238, 241, 255, 0.45);
  background: rgba(20, 16, 57, 0.6);
  box-shadow: none;
}
.store--later .store-kicker { color: var(--muted); }

.hero-note {
  margin-top: 14px;
  font-size: 1rem;
  line-height: 1.35;
  color: #d7dbf7;
}
.dot {
  display: inline-block;
  vertical-align: 0.1em;
  margin-right: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold);
}

/* ---------- Sections ---------- */
.section { padding: 72px 0; position: relative; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--cyan);
  font-weight: 700;
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-bottom: 10px;
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--cyan), transparent);
  box-shadow: 0 0 8px var(--cyan);
}
h2 { font-size: clamp(1.75rem, 7vw, 2.6rem); }
.section-sub { margin-top: 10px; color: var(--muted); }

/* lane-marking divider between sections */
.section + .section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: min(220px, 50%);
  height: 3px;
  transform: translateX(-50%);
  background: repeating-linear-gradient(90deg, rgba(238, 241, 255, 0.35) 0 22px, transparent 22px 40px);
}

/* How it works */
.steps {
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
  display: grid;
  gap: 16px;
  counter-reset: step;
}
.step {
  position: relative;
  padding: 22px 20px 22px 20px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line);
  counter-increment: step;
}
.step::after {
  content: "0" counter(step);
  position: absolute;
  top: 14px;
  right: 18px;
  font-family: var(--head);
  font-size: 2.2rem;
  line-height: 1;
  color: rgba(77, 232, 255, 0.16);
}
.step-icon, .card-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(77, 232, 255, 0.1);
  border: 1px solid var(--cyan-soft);
  margin-bottom: 14px;
}
.step-icon svg, .card-icon svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: var(--cyan);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 4px rgba(77, 232, 255, 0.6));
}
.step h3, .card h3 { font-size: 1.3rem; margin-bottom: 6px; }
.how { padding-top: 44px; }
@media (max-width: 639px) {
  /* phones: icon beside the text to keep cards short */
  .step, .card {
    display: grid;
    grid-template-columns: 52px 1fr;
    column-gap: 16px;
    align-items: start;
    padding: 20px 18px;
  }
  .step-icon, .card-icon { grid-row: 1 / span 2; margin-bottom: 0; }
  .step h3, .card h3 { align-self: end; margin-top: 2px; }
  .step::after { top: 12px; right: 14px; font-size: 1.7rem; }
  .step h3 { padding-right: 40px; }
}
.step p, .card p { color: var(--muted); }

/* Features */
.cards {
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
.card {
  padding: 22px 20px;
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(40, 30, 110, 0.55), rgba(20, 16, 57, 0.55));
  border: 1px solid var(--line);
  transition: border-color 0.25s, transform 0.25s;
}
.card:hover { border-color: var(--cyan-soft); }
.card--gold { border-color: rgba(255, 200, 61, 0.45); background: linear-gradient(160deg, rgba(80, 60, 20, 0.35), rgba(20, 16, 57, 0.6)); }
.card--gold .card-icon { background: rgba(255, 200, 61, 0.1); border-color: rgba(255, 200, 61, 0.5); }
.card--gold .card-icon svg { stroke: var(--gold); filter: drop-shadow(0 0 4px rgba(255, 200, 61, 0.6)); }
.card--gold h3 { color: var(--gold); }

/* Screens: sideways scroller on phones, grid on desktop */
.shots {
  margin-top: 28px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--cyan-soft) transparent;
  padding: 10px 0 18px;
}
.shots:focus-visible { outline-offset: -3px; }
.shots-list {
  list-style: none;
  margin: 0;
  padding: 0 20px;
  display: flex;
  gap: 16px;
  width: max-content;
}
.shot {
  width: min(62vw, 260px);
  scroll-snap-align: center;
}
.shot figure { margin: 0; }
.shot img {
  width: 100%;
  border-radius: 22px;
  border: 3px solid #252055;
  box-shadow: 0 0 0 1px var(--line), 0 14px 40px rgba(0, 0, 0, 0.55), 0 0 30px rgba(77, 232, 255, 0.12);
  background: var(--panel-solid);
}
.shot figcaption {
  margin-top: 12px;
  text-align: center;
  font-weight: 700;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Closing call to action */
.cta-inner {
  display: grid;
  gap: 20px;
  justify-items: center;
  text-align: center;
  padding: 32px 20px;
  border-radius: 24px;
  border: 1px solid var(--cyan-soft);
  background:
    radial-gradient(120% 120% at 50% 0%, rgba(77, 232, 255, 0.16), transparent 60%),
    linear-gradient(180deg, rgba(40, 30, 110, 0.6), rgba(20, 16, 57, 0.7));
  box-shadow: 0 0 50px rgba(77, 232, 255, 0.1);
  width: calc(100% - 32px);
}
@media (max-width: 639px) {
  .cta-inner { padding: 28px 14px; }
  .cta-inner > div { width: 100%; }
}
.cta-icon {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  box-shadow: 0 0 0 1px var(--line), 0 0 26px rgba(77, 232, 255, 0.35);
}
.cta h2 { font-size: clamp(1.6rem, 6.5vw, 2.3rem); }
.cta p { color: var(--muted); margin-top: 8px; }
.stores--inline { margin-top: 20px; }
@media (max-width: 379px) {
  .stores--inline { grid-template-columns: 1fr; max-width: 260px; }
}
@media (max-width: 339px) {
  .stores { grid-template-columns: 1fr; max-width: 260px; }
}

/* Footer */
.footer {
  padding: 40px 0 calc(40px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(6, 5, 22, 0.6);
  font-size: 1.02rem;
}
.footer-inner { display: grid; gap: 14px; text-align: center; }
.footer-brand { font-family: var(--head); font-size: 1.15rem; }
.footer-brand span { font-family: var(--body); font-weight: 600; color: var(--muted); font-size: 1rem; }
.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
  color: var(--muted);
}
.footer-legal { color: #9aa0cf; font-size: 0.95rem; }
.placeholder {
  color: var(--gold);
  font-weight: 700;
}

/* ---------- Scroll reveal (only when JS is on and motion is OK) ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Tablet ---------- */
@media (min-width: 640px) {
  .brand span { display: inline; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .cta .cta-inner { grid-template-columns: auto 1fr; align-items: center; column-gap: 32px; text-align: left; justify-items: start; padding: 36px; }
  .cta-inner .stores { margin-inline: 0; }
}

/* ---------- Desktop: copy left, key art as a glowing card right ---------- */
@media (min-width: 960px) {
  body { font-size: 1.25rem; }
  .topbar-inner { padding: 0 32px; height: 68px; }
  .wrap { padding: 0 32px; }
  .section { padding: 104px 0; }
  .cards { grid-template-columns: repeat(3, 1fr); gap: 18px; }

  .hero {
    min-height: max(760px, 100vh);
    align-items: center;
    justify-content: center;
    padding: 96px 32px 64px;
  }
  .hero::before { display: none; }
  .hero::after { height: 200px; background: linear-gradient(0deg, var(--bg) 0%, rgba(11, 10, 36, 0) 100%); }
  .how { padding-top: 56px; }
  .cta .cta-inner { max-width: calc(var(--wrap) - 64px); padding: 44px 48px; }
  .cta-icon { width: 128px; height: 128px; border-radius: 28px; }
  .hero-backdrop {
    display: block;
    position: absolute;
    inset: -60px;
    z-index: -2;
    background: url("../key-art.jpg") center 40% / cover no-repeat;
    filter: blur(36px) saturate(1.15);
    opacity: 0.4;
  }
  .hero-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, var(--bg) 8%, rgba(11, 10, 36, 0.55) 55%, rgba(11, 10, 36, 0.35) 100%);
  }
  .hero-copy {
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas: "top art" "bottom art";
    align-content: center;
    column-gap: 64px;
    row-gap: 36px;
    text-align: left;
  }
  .hero-top { grid-area: top; align-self: end; }
  .hero-bottom { grid-area: bottom; align-self: start; }
  .hero-art {
    position: relative;
    inset: auto;
    z-index: 1;
    grid-area: art;
    height: min(78vh, 760px);
    min-height: 600px;
    aspect-ratio: 9 / 16;
    border-radius: 30px;
    overflow: hidden;
    border: 2px solid rgba(77, 232, 255, 0.55);
    box-shadow: 0 0 0 6px rgba(77, 232, 255, 0.08), 0 0 60px rgba(77, 232, 255, 0.3), 0 30px 80px rgba(0, 0, 0, 0.6);
  }

  .logo { margin: 0 0 0 -12px; width: min(100%, 560px); }
  .lead { max-width: 24ch; margin: 18px 0 0; font-size: 2.3rem; }
  .sub { font-size: 1.4rem; margin-top: 12px; }
  .stores { margin-inline: 0; gap: 14px; }
  .store { min-height: 68px; padding: 10px 18px 12px; }
  .store-name { font-size: 1.3rem; }
  .hero-note { font-size: 1.1rem; }

  .shots { overflow: visible; padding: 0; }
  .shots-list {
    width: auto;
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 32px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
  }
  .shot { width: auto; }
  .shot:nth-child(even) { transform: translateY(36px); }
  .screens { padding-bottom: 140px; }

  .footer-inner { grid-template-columns: auto 1fr; align-items: center; text-align: left; }
  .footer-links { justify-content: flex-end; }
  .footer-legal { grid-column: 1 / -1; }
}

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  @media (min-width: 960px) {
    .hero-copy .hero-art { animation: ghost-glow 4.5s ease-in-out infinite; }
  }
  .dot { animation: blink 2.4s ease-in-out infinite; }
}
@keyframes ghost-glow {
  0%, 100% { box-shadow: 0 0 0 6px rgba(77, 232, 255, 0.08), 0 0 50px rgba(77, 232, 255, 0.25), 0 30px 80px rgba(0, 0, 0, 0.6); }
  50% { box-shadow: 0 0 0 6px rgba(77, 232, 255, 0.14), 0 0 80px rgba(77, 232, 255, 0.45), 0 30px 80px rgba(0, 0, 0, 0.6); }
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Privacy / document pages ---------- */
.doc-page { padding: calc(96px + env(safe-area-inset-top)) 0 72px; }
.doc { max-width: 760px; }
.doc h1 { font-size: clamp(1.9rem, 7vw, 2.8rem); margin-bottom: 8px; }
.doc h2 { font-size: clamp(1.3rem, 5vw, 1.6rem); margin: 40px 0 12px; color: #fff; }
.doc h3 { font-size: 1.1rem; margin: 22px 0 8px; color: var(--cyan); }
.doc p, .doc li { color: #d7dbf7; }
.doc p + p { margin-top: 12px; }
.doc ul { padding-left: 1.2em; margin: 10px 0 0; }
.doc li + li { margin-top: 6px; }
.doc strong { color: #fff; }
.doc .meta { color: var(--muted); }
.draft-banner {
  margin: 20px 0 28px;
  padding: 14px 18px;
  border-radius: 14px;
  border: 2px dashed var(--gold);
  background: rgba(255, 200, 61, 0.1);
  color: #ffe6a6;
  font-weight: 700;
}
.draft-banner strong { color: var(--gold); text-transform: uppercase; letter-spacing: 0.06em; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 14px;
  font-size: 1.02rem;
}
.data-table th, .data-table td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.data-table th { color: var(--cyan); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.92rem; }
.data-table td { color: #d7dbf7; }
.table-scroll { overflow-x: auto; }
@media (max-width: 639px) {
  /* stack the table into cards on phones */
  .data-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .data-table, .data-table tbody, .data-table tr, .data-table td { display: block; width: 100%; }
  .data-table tr { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .data-table td { border: 0; padding: 3px 0; }
  .data-table td::before {
    content: attr(data-label);
    display: block;
    color: var(--cyan);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }
}
.back-link { display: inline-block; margin-top: 40px; font-weight: 700; }
