/* ==========================================================================
   Variables
   ========================================================================== */

:root {
  /* Colors - Core */
  --color-bg: #050716; /* deep, near-black navy */
  --color-bg-elevated: #0b0f26;
  --color-bg-soft: #11152b;

  --color-text: #f5f6ff;
  --color-text-muted: #a4a7d1;
  --color-text-soft: #7b7fb1;

  /* Brand / Fantasy Palette */
  --color-primary: #5a4bff; /* arcane violet */
  --color-primary-soft: rgba(90, 75, 255, 0.18);
  --color-primary-strong: #8a7aff;

  --color-accent-cyan: #1ef2ff; /* glowing cyan */
  --color-accent-cyan-soft: rgba(30, 242, 255, 0.16);

  --color-accent-orange: #ff7a2f; /* fiery orange */
  --color-accent-orange-soft: rgba(255, 122, 47, 0.18);

  --color-accent-emerald: #28f29b; /* emerald green */
  --color-accent-emerald-soft: rgba(40, 242, 155, 0.18);

  --color-accent-gold: #ffd64a; /* golden yellow */
  --color-accent-gold-soft: rgba(255, 214, 74, 0.18);

  /* Semantic */
  --color-success: #2ddf89;
  --color-warning: #ffb648;
  --color-danger: #ff4b6b;

  /* Neutral grays (cool, for UI chrome) */
  --gray-50: #fafbff;
  --gray-100: #ecefff;
  --gray-200: #c5c9f2;
  --gray-300: #a1a6dd;
  --gray-400: #7b81c5;
  --gray-500: #5c629f;
  --gray-600: #484b7c;
  --gray-700: #34365a;
  --gray-800: #191a33;
  --gray-900: #0b0c1a;

  /* Gradients for fantasy/arcade vibe */
  --gradient-primary: linear-gradient(135deg, #5a4bff 0%, #1ef2ff 45%, #ff7a2f 100%);
  --gradient-hero: radial-gradient(circle at 0% 0%, rgba(94, 69, 255, 0.8) 0%, transparent 55%),
    radial-gradient(circle at 100% 0%, rgba(30, 242, 255, 0.8) 0%, transparent 55%),
    radial-gradient(circle at 50% 100%, rgba(255, 122, 47, 0.75) 0%, transparent 60%),
    #050716;
  --gradient-card: linear-gradient(145deg, rgba(90, 75, 255, 0.18), rgba(30, 242, 255, 0.08));

  /* 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", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  --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.375rem; /* 22px */
  --font-size-2xl: 1.75rem; /* 28px */
  --font-size-3xl: 2.25rem; /* 36px */
  --font-size-4xl: 3rem;    /* 48px */
  --font-size-5xl: 3.75rem; /* 60px */

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

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

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

  /* Shadows / Glows */
  --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-strong: 0 20px 50px rgba(0, 0, 0, 0.75);
  --shadow-glow-primary: 0 0 30px rgba(90, 75, 255, 0.7);
  --shadow-glow-cyan: 0 0 36px rgba(30, 242, 255, 0.72);
  --shadow-glow-orange: 0 0 32px rgba(255, 122, 47, 0.7);

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

  /* Layout */
  --layout-max-width: 1120px;
  --layout-section-padding-y: var(--space-32);
  --layout-section-padding-y-lg: var(--space-40);
}

/* Respect prefers-reduced-motion */

@media (prefers-reduced-motion: reduce) {
  :root {
    --transition-fast: 0ms;
    --transition-normal: 0ms;
    --transition-slow: 0ms;
  }

  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================================================
   Reset / Normalize
   ========================================================================== */

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

* {
  margin: 0;
}

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

body {
  min-height: 100vh;
}

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

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

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

ul[role="list"], ol[role="list"] {
  list-style: none;
}

/* Remove default link underlines (reapplied in base styles) */

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

/* Improve text rendering */

body, input, button, textarea, select {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   Base Styles
   ========================================================================== */

body {
  font-family: var(--font-sans);
  font-size: var(--font-size-md);
  line-height: var(--line-height-normal);
  background: var(--color-bg);
  color: var(--color-text);
}

main {
  display: block;
}

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

p:last-child {
  margin-bottom: 0;
}

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

h1 {
  font-size: clamp(var(--font-size-3xl), 3vw + 1rem, var(--font-size-5xl));
}

h2 {
  font-size: clamp(var(--font-size-2xl), 2vw + 1rem, var(--font-size-4xl));
}

h3 {
  font-size: clamp(var(--font-size-xl), 1.2vw + 1rem, var(--font-size-3xl));
}

h4 {
  font-size: var(--font-size-lg);
}

h5 {
  font-size: var(--font-size-md);
}

h6 {
  font-size: var(--font-size-sm);
}

section {
  padding-block: var(--layout-section-padding-y);
}

@media (min-width: 960px) {
  section {
    padding-block: var(--layout-section-padding-y-lg);
  }
}

/* Links */

a {
  color: var(--color-accent-cyan);
  text-decoration: none;
  transition: color var(--transition-normal), text-shadow var(--transition-normal), filter var(--transition-normal);
}

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

a:active {
  filter: brightness(0.9);
}

/* Typography helpers specific to Polish marketing copy */

.small-copy {
  font-size: var(--font-size-sm);
  color: var(--color-text-soft);
}

.lead {
  font-size: var(--font-size-lg);
  line-height: var(--line-height-relaxed);
  color: var(--color-text);
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

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

:focus:not(:focus-visible) {
  outline: none;
}

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

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

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

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

/* Layout Containers */

.container {
  width: 100%;
  max-width: var(--layout-max-width);
  margin-inline: auto;
  padding-inline: var(--space-8);
}

@media (min-width: 960px) {
  .container {
    padding-inline: var(--space-12);
  }
}

.container-wide {
  width: 100%;
  max-width: 1320px;
  margin-inline: auto;
  padding-inline: var(--space-8);
}

/* Flex utilities */

.flex {
  display: flex;
}

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

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

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

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

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

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

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

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

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

/* Grid utilities */

.grid {
  display: grid;
}

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

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

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

/* Alignment & text */

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

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

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

.text-uppercase {
  text-transform: uppercase;
}

.text-muted {
  color: var(--color-text-muted);
}

/* Spacing utilities */

.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); }
.mt-12 { margin-top: var(--space-12); }
.mt-16 { margin-top: var(--space-16); }

.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); }
.mb-12 { margin-bottom: var(--space-12); }
.mb-16 { margin-bottom: var(--space-16); }

.pt-8 { padding-top: var(--space-8); }
.pb-8 { padding-bottom: var(--space-8); }
.pt-16 { padding-top: var(--space-16); }
.pb-16 { padding-bottom: var(--space-16); }

/* Visual utilities */

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-inline: var(--space-6);
  padding-block: var(--space-2);
  border-radius: var(--radius-pill);
  font-size: var(--font-size-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(11, 15, 38, 0.9);
  border: 1px solid rgba(142, 153, 255, 0.6);
  color: var(--color-accent-cyan);
}

.tag-soft {
  border-radius: var(--radius-pill);
  padding-inline: var(--space-4);
  padding-block: var(--space-1);
  font-size: var(--font-size-xs);
  background: rgba(255, 255, 255, 0.03);
  color: var(--color-text-soft);
}

/* Simple glow utility for magical elements */

.glow-cyan {
  box-shadow: var(--shadow-glow-cyan);
}

.glow-primary {
  box-shadow: var(--shadow-glow-primary);
}

.glow-orange {
  box-shadow: var(--shadow-glow-orange);
}

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

/* Buttons */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  padding-inline: var(--space-16);
  padding-block: var(--space-4);
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.25);
  background-image: linear-gradient(135deg, #5a4bff 0%, #1ef2ff 40%, #ff7a2f 100%);
  background-size: 180% 180%;
  color: #050716;
  font-family: var(--font-display);
  font-size: var(--font-size-sm);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), var(--shadow-soft);
  transition:
    background-position var(--transition-slow),
    box-shadow var(--transition-normal),
    transform var(--transition-fast),
    filter var(--transition-fast);
}

.btn::after {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: inherit;
  background: radial-gradient(circle at 0% 0%, rgba(255, 255, 255, 0.22) 0%, transparent 55%);
  mix-blend-mode: screen;
  opacity: 0.7;
  pointer-events: none;
}

.btn:hover {
  background-position: 100% 0;
  box-shadow: var(--shadow-glow-cyan);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(1px) scale(0.99);
  filter: brightness(0.95);
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: var(--shadow-soft);
}

.btn--outline {
  background: rgba(5, 7, 22, 0.9);
  border: 1px solid rgba(30, 242, 255, 0.7);
  color: var(--color-accent-cyan);
  box-shadow: 0 0 0 1px rgba(5, 7, 22, 0.8), 0 10px 25px rgba(0, 0, 0, 0.7);
}

.btn--outline::after {
  background: radial-gradient(circle at 0% 0%, rgba(30, 242, 255, 0.3) 0%, transparent 55%);
}

.btn--outline:hover {
  background: radial-gradient(circle at 0% 0%, rgba(30, 242, 255, 0.08) 0%, rgba(5, 7, 22, 0.94) 40%);
  box-shadow: var(--shadow-glow-cyan);
}

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

.btn--ghost::after {
  display: none;
}

/* Inputs */

.input,
textarea,
select {
  width: 100%;
  padding-inline: var(--space-8);
  padding-block: var(--space-4);
  border-radius: var(--radius-md);
  border: 1px solid rgba(116, 124, 192, 0.7);
  background-color: rgba(5, 7, 22, 0.9);
  color: var(--color-text);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-normal);
  outline: none;
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    background-color var(--transition-fast);
}

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

.input:focus,
textarea:focus,
select:focus {
  border-color: var(--color-accent-cyan);
  box-shadow: 0 0 0 1px rgba(30, 242, 255, 0.7), 0 0 24px rgba(30, 242, 255, 0.4);
  background-color: rgba(5, 7, 22, 0.96);
}

.input[aria-invalid="true"],
.input--error {
  border-color: var(--color-danger);
}

.field-label {
  display: block;
  margin-bottom: var(--space-2);
  font-size: var(--font-size-sm);
  color: var(--color-text-soft);
}

.field-help {
  margin-top: var(--space-2);
  font-size: var(--font-size-xs);
  color: var(--color-text-soft);
}

/* Cards */

.card {
  position: relative;
  border-radius: var(--radius-lg);
  padding: var(--space-10);
  background: radial-gradient(circle at 0% 0%, rgba(255, 255, 255, 0.05) 0%, transparent 45%),
    var(--gradient-card);
  border: 1px solid rgba(134, 143, 255, 0.35);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 110% -10%, rgba(255, 122, 47, 0.4) 0%, transparent 55%),
    radial-gradient(circle at -10% 120%, rgba(30, 242, 255, 0.35) 0%, transparent 55%);
  opacity: 0.4;
  mix-blend-mode: screen;
  pointer-events: none;
}

.card-content {
  position: relative;
  z-index: 1;
}

.card--soft {
  background: rgba(11, 15, 38, 0.9);
  border-color: rgba(116, 124, 192, 0.7);
}

.card--interactive {
  cursor: pointer;
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-normal),
    border-color var(--transition-normal);
}

.card--interactive:hover {
  transform: translateY(-3px);
  border-color: rgba(30, 242, 255, 0.9);
  box-shadow: var(--shadow-glow-cyan);
}

/* Hero & showcase specific helpers for magical projectiles / roguelite feel */

.hero-section {
  position: relative;
  background: var(--gradient-hero);
  overflow: hidden;
}

.hero-section::before,
.hero-section::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(18px);
  opacity: 0.65;
  pointer-events: none;
}

.hero-section::before {
  width: 380px;
  height: 380px;
  left: -120px;
  top: -80px;
  background: radial-gradient(circle, rgba(30, 242, 255, 0.7) 0%, transparent 70%);
}

.hero-section::after {
  width: 420px;
  height: 420px;
  right: -160px;
  bottom: -80px;
  background: radial-gradient(circle, rgba(255, 122, 47, 0.7) 0%, transparent 70%);
}

.showcase-panel {
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  background: rgba(5, 7, 22, 0.9);
  border: 1px solid rgba(30, 242, 255, 0.7);
  box-shadow: var(--shadow-glow-cyan);
}

/* Interactive slots for recruitment / upgrades / fusion */

.slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: var(--space-6);
}

.slot {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-md);
  background: radial-gradient(circle at 30% 20%, rgba(255, 214, 74, 0.22) 0%, transparent 60%),
    radial-gradient(circle at 80% 90%, rgba(30, 242, 255, 0.28) 0%, transparent 55%),
    rgba(11, 15, 38, 0.95);
  border: 1px dashed rgba(134, 143, 255, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-200);
  font-size: var(--font-size-xs);
  text-align: center;
  padding: var(--space-4);
  cursor: pointer;
  overflow: hidden;
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    transform var(--transition-fast),
    background var(--transition-slow);
}

.slot:hover {
  border-style: solid;
  border-color: var(--color-accent-cyan);
  box-shadow: var(--shadow-glow-cyan);
  transform: translateY(-2px);
}

.slot--hero {
  border-color: rgba(255, 214, 74, 0.85);
}

.slot--fusion {
  border-color: rgba(255, 75, 107, 0.85);
}

/* Tag-like label for Polish section captions (e.g., "Rekrutuj Bohaterów") */

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  font-size: var(--font-size-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-text-soft);
}

.section-kicker::before {
  content: "";
  width: 32px;
  height: 1px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent 0%, rgba(30, 242, 255, 0.85) 50%, transparent 100%);
}

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