/* ==================================================================
   Variables
   ================================================================== */
:root {
  /* Colors */
  --color-bg: #05060a; /* deep cinematic black */
  --color-bg-alt: #10131b; /* subtle steel-dark */
  --color-surface: #141824; /* metallic card background */
  --color-surface-elevated: #1b2130;

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

  --color-primary: #e0243b; /* crimson red */
  --color-primary-soft: rgba(224, 36, 59, 0.12);

  --color-accent: #1ea4ff; /* electric blue */
  --color-accent-soft: rgba(30, 164, 255, 0.12);

  --color-success: #2ecc71;
  --color-warning: #f1c40f;
  --color-danger: #e74c3c;

  --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, "Noto Sans", sans-serif;
  --font-display: "Orbitron", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, 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 (px) */
  --space-0: 0;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 28px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;

  /* Radius */
  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 18px;
  --radius-pill: 999px;

  /* Shadows – metallic / glow */
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.45);
  --shadow-strong: 0 22px 60px rgba(0, 0, 0, 0.8);
  --shadow-accent-red: 0 0 28px rgba(224, 36, 59, 0.45);
  --shadow-accent-blue: 0 0 32px rgba(30, 164, 255, 0.4);

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

  /* Layout */
  --container-max-width: 1120px;
  --container-padding-x: 20px;
}

@media (min-width: 1200px) {
  :root {
    --container-max-width: 1200px;
  }
}

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

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

body {
  margin: 0;
}

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

ul, ol {
  margin: 0;
  padding: 0;
}

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

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

img {
  height: auto;
}

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

table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* Remove list bullets by default in layout components;
   re-enable where needed */
ul, ol {
  list-style: none;
}

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

main {
  display: block;
}

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

h1 {
  font-size: clamp(2.25rem, 4vw, 3.25rem);
  margin-bottom: var(--space-4);
}

h2 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  margin-bottom: var(--space-3);
}

h3 {
  font-size: clamp(1.3rem, 2.3vw, 1.75rem);
  margin-bottom: var(--space-2);
}

h4, h5, h6 {
  font-size: var(--font-size-lg);
  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;
}

::selection {
  background: rgba(224, 36, 59, 0.8);
  color: #ffffff;
}

/* Links */
a {
  position: relative;
  transition: color var(--transition-normal),
              text-shadow var(--transition-normal);
}

a:hover {
  color: var(--color-accent);
  text-shadow: 0 0 12px rgba(30, 164, 255, 0.65);
}

/* ==================================================================
   Utilities
   ================================================================== */

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding-x);
  padding-right: var(--container-padding-x);
}

/* Layout helpers */
.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-column {
  display: flex;
  flex-direction: column;
}

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

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

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

.mt-0 { margin-top: 0; }
.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-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

.pt-section {
  padding-top: var(--space-16);
}

.pb-section {
  padding-bottom: var(--space-16);
}

@media (max-width: 768px) {
  .pt-section {
    padding-top: var(--space-12);
  }
  .pb-section {
    padding-bottom: var(--space-12);
  }
}

/* Screen-reader only */
.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;
}

/* Cinematic section background helpers */
.section-dark {
  background: radial-gradient(circle at top left, rgba(224, 36, 59, 0.22) 0, transparent 55%),
              radial-gradient(circle at top right, rgba(30, 164, 255, 0.22) 0, transparent 55%),
              var(--color-bg);
}

.section-metallic {
  background: linear-gradient(135deg, #1b1f2b 0%, #11141e 45%, #090b10 100%);
}

/* ==================================================================
   Components
   ================================================================== */

/* Button base */
.btn {
  --btn-bg: var(--color-primary);
  --btn-bg-hover: #ff304a;
  --btn-color: #ffffff;
  --btn-border: transparent;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--btn-border);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0)) border-box,
              linear-gradient(135deg, var(--btn-bg), var(--color-accent)) padding-box;
  color: var(--btn-color) !important;
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.8);
  transition: transform var(--transition-fast),
              box-shadow var(--transition-fast),
              filter var(--transition-fast),
              background var(--transition-slow);
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, rgba(255, 255, 255, 0.16), transparent 55%);
  opacity: 0;
  transition: opacity var(--transition-normal);
  pointer-events: none;
}

.btn:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: var(--shadow-strong), var(--shadow-accent-red);
  filter: brightness(1.03);
}

.btn:hover::before {
  opacity: 1;
}

.btn:active {
  transform: translateY(0) scale(0.99);
  box-shadow: var(--shadow-soft);
}

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

.btn-primary {
  --btn-bg: var(--color-primary);
}

.btn-accent {
  --btn-bg: var(--color-accent);
}

.btn-ghost {
  --btn-bg: transparent;
  --btn-bg-hover: rgba(255, 255, 255, 0.08);
  --btn-border: rgba(255, 255, 255, 0.16);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0)) border-box;
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
}

.btn-ghost:hover {
  background-color: var(--btn-bg-hover);
  box-shadow: var(--shadow-soft);
}

/* Inputs */
.input,
textarea,
select {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(5, 6, 10, 0.9);
  color: var(--color-text);
  font-size: var(--font-size-sm);
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  transition: border-color var(--transition-normal),
              box-shadow var(--transition-normal),
              background var(--transition-normal);
}

.input::placeholder,
textarea::placeholder {
  color: var(--color-text-muted);
}

.input:focus,
textarea:focus,
select:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 1px rgba(30, 164, 255, 0.7), var(--shadow-soft);
  background: rgba(12, 16, 28, 0.98);
}

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

label {
  display: block;
  margin-bottom: 6px;
  font-size: var(--font-size-sm);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* Card – metallic arena / feature block */
.card {
  position: relative;
  padding: var(--space-6);
  border-radius: var(--radius-xl);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01)) border-box,
              linear-gradient(145deg, #141824, #0a0c12) padding-box;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  backdrop-filter: blur(10px);
  transition: transform var(--transition-normal),
              box-shadow var(--transition-normal),
              border-color var(--transition-normal);
}

.card::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle at top left, rgba(224, 36, 59, 0.18), transparent 55%),
              radial-gradient(circle at bottom right, rgba(30, 164, 255, 0.18), transparent 55%);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-slow);
}

.card > * {
  position: relative;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-strong), var(--shadow-accent-blue);
  border-color: rgba(30, 164, 255, 0.6);
}

.card:hover::before {
  opacity: 1;
}

/* Hero CTA-specific helper */
.btn-cta-glow {
  box-shadow: var(--shadow-strong), var(--shadow-accent-blue), var(--shadow-accent-red);
}

/* Gameplay / gallery image frame */
.frame-metallic {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 2px;
  background: linear-gradient(135deg, rgba(224, 36, 59, 0.8), rgba(30, 164, 255, 0.8));
  box-shadow: var(--shadow-strong);
}

.frame-metallic-inner {
  border-radius: inherit;
  overflow: hidden;
  background: #05060a;
}

/* ==================================================================
   Accessibility & Focus
   ================================================================== */

:focus {
  outline: none;
}

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

button:focus-visible,
.btn:focus-visible,
.input:focus-visible,
textarea:focus-visible,
select:focus-visible,
a:focus-visible {
  box-shadow: 0 0 0 2px rgba(5, 6, 10, 0.9), 0 0 0 4px rgba(30, 164, 255, 0.9);
}

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

