/* ==================================================================
   Variables
   ================================================================== */
:root {
  /* Color Palette - Automotive / Dark Theme */
  --color-background: #05060a;
  --color-surface: #0b0e16;
  --color-surface-elevated: #111624;
  --color-text: #f5f7ff;
  --color-text-muted: #a0a4b8;

  /* Brand / Accent */
  --color-primary: #ff4b3a; /* energetic brake-light red */
  --color-primary-soft: rgba(255, 75, 58, 0.12);
  --color-primary-strong: #ff6b55;

  /* Status */
  --color-success: #37d176;
  --color-warning: #ffb648;
  --color-danger: #ff3b5c;

  /* Neutral Grays */
  --color-gray-50: #f8fafc;
  --color-gray-100: #eef1f7;
  --color-gray-200: #dde2f0;
  --color-gray-300: #c3cadc;
  --color-gray-400: #9aa2bf;
  --color-gray-500: #727a98;
  --color-gray-600: #565e79;
  --color-gray-700: #3b4156;
  --color-gray-800: #272b3a;
  --color-gray-900: #141725;

  /* Borders / Dividers */
  --color-border-subtle: rgba(255, 255, 255, 0.06);
  --color-border-strong: rgba(255, 255, 255, 0.16);

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

  --font-size-xs: 0.75rem;   /* 12px */
  --font-size-sm: 0.875rem;  /* 14px */
  --font-size-md: 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-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 20px;
  --radius-pill: 999px;

  /* Shadows - subtle neon / glow style */
  --shadow-sm: 0 4px 10px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 12px 30px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.7);
  --shadow-glow-primary: 0 0 0 1px rgba(255, 75, 58, 0.6),
    0 0 30px rgba(255, 75, 58, 0.4);

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

  /* Layout */
  --container-max-width: 1120px;
  --header-height: 64px;
}

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

html {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  overflow-x: hidden;
}

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

ul[role='list'],
ol[role='list'] {
  list-style: none;
  margin: 0;
  padding: 0;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
}

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

a {
  color: inherit;
}

/* Improve text rendering */
body,
button,
input,
textarea,
select {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* ==================================================================
   Base Styles
   ================================================================== */
body {
  min-height: 100vh;
  background-color: var(--color-background);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--font-size-md);
  line-height: var(--line-height-normal);
}

main {
  display: block;
}

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

h1 { font-size: clamp(2.25rem, 3vw, var(--font-size-5xl)); }
h2 { font-size: clamp(1.875rem, 2.4vw, var(--font-size-4xl)); }
h3 { font-size: clamp(1.5rem, 2vw, var(--font-size-3xl)); }
h4 { font-size: var(--font-size-2xl); }
h5 { font-size: var(--font-size-xl); }
h6 { font-size: var(--font-size-lg); }

h1, h2, h3 {
  margin-bottom: var(--space-4);
}

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

strong, b {
  font-weight: 600;
}

small {
  font-size: var(--font-size-xs);
}

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

a:hover {
  color: var(--color-primary-strong);
}

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

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

hr {
  border: none;
  border-top: 1px solid var(--color-border-subtle);
  margin: var(--space-8) 0;
}

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

[tabindex='-1']:focus {
  outline: none !important;
}

.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;
}

.sr-only-focusable:active,
.sr-only-focusable:focus {
  position: static;
  width: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

/* ==================================================================
   Layout 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);
}

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

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

@media (max-width: 640px) {
  .section {
    padding-top: var(--space-6);
    padding-bottom: var(--space-6);
  }

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

@media (min-width: 768px) {
  .section {
    padding-top: var(--space-16);
    padding-bottom: var(--space-16);
  }
}

/* Flex helpers */
.flex {
  display: flex;
}

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

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

.flex-row {
  flex-direction: row;
}

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

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

.items-start {
  align-items: flex-start;
}

.items-end {
  align-items: flex-end;
}

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

.justify-between {
  justify-content: space-between;
}

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

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

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

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

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

/* Grid helpers */
.grid {
  display: grid;
}

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

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

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

/* Simple width helpers for hero layout */
.w-full {
  width: 100%;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

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

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

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

/* Spacing utilities (margin / padding) - minimal set for layout tuning */
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }

.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

.pt-4 { padding-top: var(--space-4); }
.pt-6 { padding-top: var(--space-6); }
.pt-8 { padding-top: var(--space-8); }

.pb-4 { padding-bottom: var(--space-4); }
.pb-6 { padding-bottom: var(--space-6); }
.pb-8 { padding-bottom: var(--space-8); }

/* ==================================================================
   Components - Buttons
   ================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: var(--font-size-sm);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  border: 1px solid transparent;
  transition:
    background-color var(--transition-normal),
    color var(--transition-normal),
    border-color var(--transition-normal),
    box-shadow var(--transition-normal),
    transform var(--transition-fast);
}

.btn:disabled,
.btn[aria-disabled='true'] {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-strong));
  color: #ffffff;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover:not(:disabled):not([aria-disabled='true']) {
  box-shadow: var(--shadow-glow-primary);
  transform: translateY(-1px);
  color: #ffffff;
}

.btn-outline {
  background-color: transparent;
  color: var(--color-text);
  border-color: var(--color-border-strong);
}

.btn-outline:hover:not(:disabled):not([aria-disabled='true']) {
  border-color: var(--color-primary);
  color: var(--color-primary-strong);
  box-shadow: 0 0 0 1px rgba(255, 75, 58, 0.4);
}

.btn-ghost {
  background-color: rgba(15, 23, 42, 0.8);
  color: var(--color-text);
}

.btn-ghost:hover:not(:disabled):not([aria-disabled='true']) {
  background-color: rgba(15, 23, 42, 1);
}

.btn-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  padding: 0;
}

/* Store-specific buttons (Google Play / App Store) */
.btn-store {
  padding: 0;
  background-color: #000000;
  color: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 2.5rem;
  min-width: 2.5rem;
  overflow: hidden;
}

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

.btn-store:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

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

/* ==================================================================
   Components - Form Elements
   ================================================================== */
label {
  display: inline-block;
  margin-bottom: var(--space-1);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.input,
textarea,
select {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-subtle);
  background-color: var(--color-surface);
  color: var(--color-text);
  transition:
    border-color var(--transition-normal),
    background-color var(--transition-normal),
    box-shadow var(--transition-normal);
}

.input::placeholder,
textarea::placeholder {
  color: var(--color-gray-500);
}

.input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: none;
  border-color: var(--color-primary-strong);
  box-shadow: 0 0 0 1px rgba(255, 75, 58, 0.4);
}

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

input[disabled],
textarea[disabled],
select[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ==================================================================
   Components - Card / Panels
   ================================================================== */
.card {
  background: radial-gradient(circle at top left, rgba(255, 75, 58, 0.06), transparent 55%),
    var(--color-surface-elevated);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-subtle);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
}

.card--interactive {
  transition:
    transform var(--transition-normal),
    box-shadow var(--transition-normal),
    border-color var(--transition-normal);
  display: flex;
  flex-direction: column;
  min-height: auto;
}

.card--interactive:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(255, 255, 255, 0.16);
}

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

.card-title {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-1);
}

.card-meta {
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-gray-400);
}

/* ==================================================================
   Site-Specific Base (Automotive Hero / Nav scaffolding)
   ================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--header-height);
  background: linear-gradient(to bottom, rgba(5, 6, 10, 0.96), rgba(5, 6, 10, 0.85));
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.site-header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-size: var(--font-size-md);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: conic-gradient(from 210deg, #ff4b3a, #ffb648, #37d176, #ff4b3a);
  box-shadow: 0 0 22px rgba(255, 75, 58, 0.7);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.site-nav a {
  font-size: var(--font-size-sm);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--color-gray-300);
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover,
.site-nav a[aria-current='page'] {
  color: var(--color-text);
  border-bottom-color: var(--color-primary);
}

.site-nav-toggle {
  display: none;
}

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

  .site-nav-toggle {
    display: inline-flex;
    flex-direction: column;
  }
}

/* HERO section specific base (for the long Hungarian tagline) */
.hero {
  position: relative;
  overflow: hidden;
  padding-top: calc(var(--space-16) + var(--header-height));
  padding-bottom: var(--space-16);
  background:
    radial-gradient(circle at top left, rgba(255, 75, 58, 0.25), transparent 60%),
    radial-gradient(circle at bottom right, rgba(56, 189, 248, 0.18), transparent 55%),
    linear-gradient(145deg, #020617 0%, #020617 40%, #050816 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
      135deg,
      rgba(148, 163, 184, 0.3) 1px,
      transparent 1px
    );
  background-size: 18px 18px;
  opacity: 0.12;
  mix-blend-mode: screen;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: var(--space-10);
  align-items: center;
}

.hero-title {
  font-size: clamp(2.4rem, 3.8vw, 3.2rem);
  line-height: 1.15;
  margin-bottom: var(--space-4);
}

.hero-lead {
  font-size: var(--font-size-lg);
  color: var(--color-gray-200);
  margin-bottom: var(--space-6);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
  margin-bottom: var(--space-3);
}

.hero-stores {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: flex-end;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
  background-color: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.55);
  color: var(--color-gray-100);
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.hero-media {
  position: relative;
}

.hero-car-frame {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: radial-gradient(circle at top, rgba(15, 23, 42, 0.9), #020617);
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.9);
}

.hero-car-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: var(--space-4);
  background: linear-gradient(to top, rgba(2, 6, 23, 0.96), transparent);
}

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

  .hero {
    padding-top: calc(var(--space-12) + var(--header-height));
  }
}

@media (max-width: 640px) {
  .hero {
    padding-top: calc(var(--space-6) + var(--header-height));
    padding-bottom: var(--space-6);
  }

  .hero-cta {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-stores {
    flex-direction: row;
    align-items: flex-end;
    width: 100%;
    gap: var(--space-3);
  }

  .hero-stores .btn-store {
    flex: 1;
  }
}

/* ==================================================================
   Misc Utilities for Automotive Theming
   ================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.18rem 0.6rem;
  border-radius: var(--radius-pill);
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  background-color: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.5);
  color: var(--color-gray-100);
}

.badge--success {
  border-color: rgba(34, 197, 94, 0.7);
  color: var(--color-success);
}

.badge--warning {
  border-color: rgba(234, 179, 8, 0.7);
  color: var(--color-warning);
}

.badge--danger {
  border-color: rgba(248, 113, 113, 0.7);
  color: var(--color-danger);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

/* Text utilities */
.text-muted {
  color: var(--color-text-muted);
}

.text-accent {
  color: var(--color-primary);
}

.text-xs { font-size: var(--font-size-xs); }
.text-sm { font-size: var(--font-size-sm); }
.text-lg { font-size: var(--font-size-lg); }
.text-xl { font-size: var(--font-size-xl); }

.uppercase {
  text-transform: uppercase;
}

/* List styling for guides / tips */
ul.default-list,
ol.default-list {
  margin-left: 1.25rem;
  margin-bottom: var(--space-4);
  color: var(--color-text-muted);
}

ul.default-list li,
ol.default-list li {
  margin-bottom: var(--space-2);
}

/* Tables - for mechanic / mission breakdowns */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-sm);
}

.table th,
.table td {
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--color-border-subtle);
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
}

.table th {
  text-align: left;
  font-weight: 600;
  color: var(--color-gray-200);
  background: rgba(15, 23, 42, 0.7);
  white-space: normal;
}

.table-striped tr:nth-child(even) td {
  background: rgba(15, 23, 42, 0.55);
}

@media (max-width: 640px) {
  .table {
    font-size: var(--font-size-xs);
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table th,
  .table td {
    padding: 0.5rem 0.6rem;
  }
}

/* Callout / Hint blocks (for tips and guides) */
.callout {
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.98));
}

.callout--info {
  border-color: rgba(56, 189, 248, 0.7);
}

.callout--success {
  border-color: rgba(34, 197, 94, 0.7);
}

.callout--warning {
  border-color: rgba(234, 179, 8, 0.7);
}

.callout-title {
  font-size: var(--font-size-sm);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-bottom: var(--space-2);
  color: var(--color-gray-200);
}

.callout-body {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}
