/* ==========================================
   Variables
   ========================================== */
:root {
  /* Color Palette - racing inspired */
  --color-background: #05060a;
  --color-surface: #0c0f18;
  --color-surface-alt: #151a25;

  --color-text: #f5f7ff;
  --color-text-muted: #9aa0b5;

  --color-primary: #ff003c; /* neon racing red */
  --color-primary-soft: rgba(255, 0, 60, 0.1);

  --color-success: #00c48c;
  --color-success-soft: rgba(0, 196, 140, 0.1);

  --color-warning: #ffb800;
  --color-warning-soft: rgba(255, 184, 0, 0.12);

  --color-danger: #ff3366;
  --color-danger-soft: rgba(255, 51, 102, 0.12);

  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2933;
  --gray-900: #111827;

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-display: "Oswald", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --font-size-xs: 0.75rem;   /* 12px */
  --font-size-sm: 0.875rem;  /* 14px */
  --font-size-base: 1rem;    /* 16px */
  --font-size-lg: 1.125rem;  /* 18px */
  --font-size-xl: 1.25rem;   /* 20px */
  --font-size-2xl: 1.5rem;   /* 24px */
  --font-size-3xl: 1.875rem; /* 30px */
  --font-size-4xl: 2.25rem;  /* 36px */
  --font-size-5xl: 3rem;     /* 48px */

  --line-height-tight: 1.1;
  --line-height-snug: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.7;

  /* Spacing scale (0–96px) */
  --space-0: 0;
  --space-1: 0.25rem;   /* 4px */
  --space-2: 0.5rem;    /* 8px */
  --space-3: 0.75rem;   /* 12px */
  --space-4: 1rem;      /* 16px */
  --space-5: 1.25rem;   /* 20px */
  --space-6: 1.5rem;    /* 24px */
  --space-8: 2rem;      /* 32px */
  --space-10: 2.5rem;   /* 40px */
  --space-12: 3rem;     /* 48px */
  --space-16: 4rem;     /* 64px */
  --space-20: 5rem;     /* 80px */
  --space-24: 6rem;     /* 96px */

  /* Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  /* Shadows - energetic, glowing */
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 18px 45px rgba(0, 0, 0, 0.65);
  --shadow-glow-primary: 0 0 25px rgba(255, 0, 60, 0.7);

  /* Transitions */
  --transition-fast: 120ms ease-out;
  --transition-normal: 200ms ease-out;
  --transition-slow: 320ms ease-out;

  /* Layout */
  --container-max-width: 1120px;
  --nav-height: 72px;
}

/* ==========================================
   Reset / Normalize
   ========================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

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

body {
  min-height: 100vh;
}

img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
  display: block;
  max-width: 100%;
}

img,
video {
  height: auto;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
  margin: 0;
}

button {
  border: none;
  padding: 0;
  background: none;
  cursor: pointer;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
figure {
  margin: 0;
}

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

legend {
  padding: 0;
}

a {
  text-decoration: none;
  color: inherit;
}

[hidden] {
  display: none !important;
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================
   Base Styles
   ========================================== */
body {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  background: radial-gradient(circle at top, #141b2f 0, #05060a 55%, #020309 100%);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
}

main {
  display: block;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--line-height-tight);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #ffffff;
}

h1 {
  font-size: clamp(2.4rem, 4vw, var(--font-size-5xl));
  margin-bottom: var(--space-4);
}

h2 {
  font-size: clamp(1.8rem, 3vw, var(--font-size-4xl));
  margin-bottom: var(--space-3);
}

h3 {
  font-size: clamp(1.4rem, 2.4vw, var(--font-size-3xl));
  margin-bottom: var(--space-2);
}

h4 {
  font-size: var(--font-size-2xl);
  margin-bottom: var(--space-2);
}

p {
  margin-bottom: var(--space-3);
  color: var(--color-text-muted);
}

strong {
  font-weight: 600;
}

code,
pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
}

a {
  color: var(--color-primary);
  transition: color var(--transition-normal);
}

a:hover {
  color: #ff4b72;
}

/* ==========================================
   Accessibility / Focus
   ========================================== */
:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

/* High contrast focus ring on dark racing background */
.button:focus-visible,
.btn:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  box-shadow: 0 0 0 2px #05060a, 0 0 0 4px var(--color-primary);
}

/* ==========================================
   Utilities
   ========================================== */
.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-4);
  padding-right: var(--space-4);
}

@media (min-width: 1200px) {
  .container {
    padding-left: var(--space-6);
    padding-right: var(--space-6);
  }
}

.section {
  padding-top: var(--space-12);
  padding-bottom: var(--space-12);
}

.section--contrast {
  background: radial-gradient(circle at top left, #1c2337 0, #05060a 60%);
}

.flex {
  display: flex;
}

.inline-flex {
  display: inline-flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-col {
  display: flex;
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.gap-2 {
  gap: var(--space-2);
}

.gap-3 {
  gap: var(--space-3);
}

.gap-4 {
  gap: var(--space-4);
}

.grid {
  display: grid;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-6);
}

@media (max-width: 768px) {
  .grid-2 {
    grid-template-columns: minmax(0, 1fr);
  }
}

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.m-auto {
  margin: auto;
}

.mt-4 {
  margin-top: var(--space-4);
}

.mt-6 {
  margin-top: var(--space-6);
}

.mb-0 {
  margin-bottom: 0;
}

.mb-4 {
  margin-bottom: var(--space-4);
}

.p-4 {
  padding: var(--space-4);
}

.px-4 {
  padding-left: var(--space-4);
  padding-right: var(--space-4);
}

.py-4 {
  padding-top: var(--space-4);
  padding-bottom: var(--space-4);
}

.w-full {
  width: 100%;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================
   Components
   ========================================== */
/* --- Buttons --- */
.button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.72rem 1.6rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-size: var(--font-size-sm);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  background: linear-gradient(135deg, #ff003c 0%, #ff4b72 50%, #ff8a00 100%);
  color: #ffffff;
  box-shadow: var(--shadow-md), var(--shadow-glow-primary);
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    background var(--transition-normal),
    border-color var(--transition-fast),
    color var(--transition-fast);
  will-change: transform, box-shadow;
}

.button:hover,
.btn:hover {
  transform: translateY(-1px) translateZ(0);
  box-shadow: var(--shadow-lg), 0 0 40px rgba(255, 0, 60, 0.9);
}

.button:active,
.btn:active {
  transform: translateY(0) scale(0.98);
  box-shadow: var(--shadow-sm);
}

.button--ghost,
.btn--ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: none;
}

.button--ghost:hover,
.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.04);
  box-shadow: var(--shadow-sm);
}

.button--secondary,
.btn--secondary {
  background: linear-gradient(135deg, #262c3f 0%, #151823 100%);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-sm);
}

.button--secondary:hover,
.btn--secondary:hover {
  border-color: var(--color-primary);
}

.button--muted,
.btn--muted {
  background: #1b2232;
  color: var(--color-text-muted);
  box-shadow: none;
}

.button--icon-only,
.btn--icon-only {
  padding: 0.5rem;
  border-radius: 999px;
}

.button[disabled],
.btn[disabled],
.button.is-disabled,
.btn.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* Platform store buttons (Google Play / App Store) */
.btn-store {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius-md);
  background: #05060a;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.02), var(--shadow-sm);
  color: #ffffff;
}

.btn-store__icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.btn-store__label {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.btn-store__label span:first-child {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  opacity: 0.75;
}

.btn-store__label span:last-child {
  font-size: 0.98rem;
  font-weight: 600;
}

.btn-store:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md), 0 0 22px rgba(255, 0, 60, 0.6);
}

/* --- Inputs & Forms --- */
.input,
select,
textarea,
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="search"],
input[type="url"] {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(7, 10, 18, 0.98);
  color: var(--color-text);
  font-size: var(--font-size-sm);
  line-height: 1.4;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.5);
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    background var(--transition-fast);
}

.input::placeholder,
textarea::placeholder,
input::placeholder {
  color: rgba(154, 160, 181, 0.7);
}

.input:focus,
textarea:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="search"]:focus,
input[type="url"]:focus,
select:focus {
  border-color: var(--color-primary);
  background: #060814;
  box-shadow: 0 0 0 1px var(--color-primary-soft), 0 0 18px rgba(255, 0, 60, 0.4);
}

textarea {
  min-height: 140px;
  resize: vertical;
}

label {
  display: inline-block;
  margin-bottom: var(--space-2);
  font-size: var(--font-size-sm);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-text-muted);
}

.form-group {
  margin-bottom: var(--space-4);
}

.form-hint {
  margin-top: var(--space-1);
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.form-error {
  margin-top: var(--space-1);
  font-size: var(--font-size-xs);
  color: var(--color-danger);
}

/* --- Card --- */
.card {
  position: relative;
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at top left, rgba(255, 0, 60, 0.18) 0,
        rgba(16, 20, 32, 0.98) 36%, #070a12 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
      120deg,
      rgba(255, 255, 255, 0.08),
      transparent 22%,
      transparent 78%,
      rgba(255, 0, 60, 0.16)
    );
  opacity: 0.18;
  mix-blend-mode: screen;
}

.card__header {
  margin-bottom: var(--space-3);
}

.card__title {
  font-size: var(--font-size-xl);
}

.card__meta {
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--color-text-muted);
}

.card--inline {
  padding: var(--space-4);
}

/* --- Hero-specific helpers --- */
.hero {
  position: relative;
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  align-items: center;
  padding-top: var(--space-12);
  padding-bottom: var(--space-12);
  color: #ffffff;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top left, rgba(255, 0, 60, 0.3) 0, transparent 55%),
    radial-gradient(circle at bottom right, rgba(60, 130, 255, 0.25) 0, transparent 55%),
    repeating-linear-gradient(
      -60deg,
      rgba(255, 255, 255, 0.08) 0,
      rgba(255, 255, 255, 0.08) 1px,
      transparent 1px,
      transparent 4px
    );
  opacity: 0.18;
  mix-blend-mode: screen;
  pointer-events: none;
}

.hero__content {
  position: relative;
  max-width: 640px;
  z-index: 1;
}

.hero__kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.9rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: linear-gradient(90deg, rgba(255, 0, 60, 0.16), transparent);
  font-size: var(--font-size-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
}

.hero__title {
  font-size: clamp(2.6rem, 4.6vw, 3.4rem);
  line-height: var(--line-height-tight);
  text-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
}

.hero__body {
  margin-top: var(--space-3);
  max-height: 360px;
  overflow-y: auto;
  padding-right: var(--space-2);
}

.hero__body p {
  color: rgba(235, 238, 255, 0.9);
  font-size: var(--font-size-sm);
}

.hero__actions {
  position: relative;
  margin-top: var(--space-4);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
}

.hero__actions-primary {
  font-weight: 700;
}

.hero__visual {
  position: relative;
  z-index: 1;
}

.hero__visual-frame {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  background: radial-gradient(circle at top, #3c425a 0, #05060a 50%);
  box-shadow: var(--shadow-lg), 0 0 80px rgba(255, 0, 60, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.hero__visual-overlay-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7), transparent);
  opacity: 0.35;
}

@media (max-width: 960px) {
  .hero {
    padding-top: var(--space-10);
    padding-bottom: var(--space-10);
  }

  .hero__body {
    max-height: none;
  }
}

/* --- Navigation (basic) --- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(18px);
  background: linear-gradient(90deg, rgba(5, 6, 10, 0.94), rgba(5, 6, 10, 0.88));
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.navbar__inner {
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.navbar__brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.navbar__logo-mark {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: conic-gradient(from 220deg, #ff003c, #ffb800, #ff003c);
  box-shadow: 0 0 18px rgba(255, 0, 60, 0.8);
}

.navbar__links {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  font-size: var(--font-size-sm);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.navbar__link {
  position: relative;
  padding: 0.2rem 0;
  color: var(--color-text-muted);
}

.navbar__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.1rem;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-primary), #ffb800);
  transition: width var(--transition-normal);
}

.navbar__link:hover {
  color: #ffffff;
}

.navbar__link:hover::after {
  width: 100%;
}

@media (max-width: 768px) {
  .navbar__links {
    display: none;
  }
}

/* --- Tag / Pill labels for mechanics, tips, etc. --- */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.7rem;
  border-radius: var(--radius-pill);
  background: rgba(21, 27, 44, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-text-muted);
}

.tag--primary {
  border-color: rgba(255, 0, 60, 0.7);
  background: rgba(255, 0, 60, 0.08);
  color: #ff889f;
}

.tag--success {
  border-color: rgba(0, 196, 140, 0.7);
  background: rgba(0, 196, 140, 0.08);
  color: #6df4c9;
}

/* --- Timeline stripes for progression / tuning sections --- */
.timeline-stripe {
  position: relative;
  padding-left: var(--space-4);
  border-left: 2px dashed rgba(255, 255, 255, 0.12);
}

.timeline-stripe::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 0.2rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #05060a;
  border: 2px solid var(--color-primary);
  box-shadow: 0 0 12px rgba(255, 0, 60, 0.7);
}

/* --- Tables for car lists / track overviews --- */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-sm);
}

.table thead {
  background: rgba(10, 13, 24, 0.98);
}

.table th,
.table td {
  padding: 0.7rem 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.table th {
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.table tbody tr:nth-child(even) {
  background: rgba(10, 13, 24, 0.7);
}

/* --- FAQ Accordion basics --- */
.faq-item {
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(7, 9, 16, 0.9);
  padding: var(--space-4);
}

.faq-item + .faq-item {
  margin-top: var(--space-3);
}

.faq-item__question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  cursor: pointer;
}

.faq-item__icon {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}

.faq-item__answer {
  margin-top: var(--space-3);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

/* --- Alerts (for legal / privacy notes) --- */
.alert {
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  font-size: var(--font-size-sm);
  border: 1px solid transparent;
}

.alert--info {
  background: rgba(32, 86, 212, 0.1);
  border-color: rgba(130, 176, 255, 0.5);
  color: #d1ddff;
}

.alert--warning {
  background: var(--color-warning-soft);
  border-color: rgba(255, 184, 0, 0.8);
  color: #ffe7a6;
}

.alert--danger {
  background: var(--color-danger-soft);
  border-color: rgba(255, 65, 108, 0.9);
  color: #ffd1df;
}

/* --- Footer --- */
.footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: radial-gradient(circle at top, #161a26 0, #05060a 55%);
  padding-top: var(--space-6);
  padding-bottom: var(--space-6);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.footer__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
  justify-content: space-between;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.footer a:hover {
  color: #ffffff;
}

/* ==========================================
   End base.css
   ========================================== */
