/* ============================================
   STAR WARS CHARACTER GUIDE - DESIGN SYSTEM
   Single source of truth for all styling
   ============================================ */

/* === COLOR SYSTEM === */
:root {
  /* Brand Colors */
  --movie-color: #00d9ff;
  --gold: #ffe81f;

  /* Background */
  --bg1: #0a1621;
  --bg2: #0f1f2e;
  --bg3: #152839;

  /* Text */
  --text: #ffffff;
  --text-dim: rgba(255, 255, 255, 0.6);
  --text-dimmer: rgba(255, 255, 255, 0.4);

  /* Borders */
  --border: rgba(255, 255, 255, 0.2);
  --border-hover: rgba(0, 217, 255, 0.4);

  /* Shadows */
  --shadow-base: 0 4px 24px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.5);

  /* Animation */
  --duration-fast: 150ms;
  --duration-base: 300ms;
  --duration-slow: 500ms;
  --duration-slower: 800ms;
  --ease-premium: cubic-bezier(0.14, 1, 0.34, 1);
}

/* === SPACING SCALE === */
/* Based on 8px base unit. Use 2px/4px only for tight gaps and alignment. */
:root {
  --space-0-25: 2px;   /* Extra tight - minor alignment adjustments */
  --space-0-5: 4px;    /* Tight gaps - compact elements */
  --space-1: 8px;      /* Base unit - related elements (icon + text) */
  --space-2: 16px;     /* Default padding - containers, cards */
  --space-3: 24px;     /* Medium - sectioning within containers */
  --space-4: 32px;     /* Medium - sectioning within containers */
  --space-5: 40px;     /* Medium-large gaps */
  --space-6: 48px;     /* Large - vertical section separation */
  --space-8: 64px;     /* Large - vertical section separation */
  --space-10: 80px;    /* XL - major section separation */
  --space-12: 96px;    /* XL - major section separation */
  --space-15: 120px;   /* XXL - hero spacing */
  --space-16: 128px;   /* Max - largest section spacing */
}

/* === ICON SCALE === */
/* Industry-standard icon sizes for UI consistency */
:root {
  --icon-sm: 16px;     /* Small - status indicators, menu items, dense lists */
  --icon-md: 24px;     /* Medium - navigation bars, toolbars, primary buttons (industry standard) */
  --icon-lg: 32px;     /* Large - prominent UI elements, desktop toolbars */
  --icon-xl: 48px;     /* XL - illustrations, display-sized icons, touch targets */
}

/* === TYPOGRAPHY SCALE === */
/* Based on 8px multiples, with 4px exceptions for special cases */
/* See TYPE-SCALE.md for full usage guidelines */
:root {
  --font-display: 'Orbitron', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Type Scale - 12 sizes total */
  --text-xs: 12px;      /* Legal, fine print - 4×3 */
  --text-base: 16px;    /* Body text, buttons, labels, footer - 8×2 */
  --text-xl: 20px;      /* Large body, lead paragraphs - 4×5 */
  --text-2xl: 24px;     /* Card titles, H5 - 8×3 */
  --text-3xl: 28px;     /* H4, subsection headers - 4×7 */
  --text-4xl: 32px;     /* H3 - 8×4 */
  --text-5xl: 40px;     /* H2 - 8×5 */
  --text-6xl: 48px;     /* H1 - 8×6 */
  --text-7xl: 56px;     /* Large H1 - 8×7 */
  --text-8xl: 64px;     /* Section heroes - 8×8 */
  --text-9xl: 72px;     /* Page heroes - 8×9 */
  --text-10xl: 80px;    /* XL hero displays - 8×10 */
}

/* === 12 COLUMN GRID SYSTEM === */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.container-narrow {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.container-full {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-4);
}

.grid-gap-2 { gap: var(--space-2); }
.grid-gap-3 { gap: var(--space-3); }
.grid-gap-4 { gap: var(--space-4); }
.grid-gap-6 { gap: var(--space-6); }
.grid-gap-8 { gap: var(--space-8); }

/* Column Spans */
.col-1 { grid-column: span 1; }
.col-2 { grid-column: span 2; }
.col-3 { grid-column: span 3; }
.col-4 { grid-column: span 4; }
.col-5 { grid-column: span 5; }
.col-6 { grid-column: span 6; }
.col-7 { grid-column: span 7; }
.col-8 { grid-column: span 8; }
.col-9 { grid-column: span 9; }
.col-10 { grid-column: span 10; }
.col-11 { grid-column: span 11; }
.col-12 { grid-column: span 12; }

/* === SECTION SPACING === */
section {
  padding: var(--space-16) 0;
}

section.section-sm {
  padding: var(--space-12) 0;
}

section.section-lg {
  padding: var(--space-16) 0;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-12);
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 48px); /* H3 → H1 fluid */
  font-weight: 700;
  color: var(--text);
  margin: 0 0 var(--space-3);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.section-header p {
  font-size: 20px; /* --text-xl */
  color: var(--text-dim);
  margin: 0;
  line-height: 1.5;
}

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  padding: 16px 24px;
  min-height: 44px;
  border-radius: 50px;
  font-size: 16px; /* --text-base */
  font-weight: 500;
  font-family: var(--font-body);
  text-decoration: none;
  border: 1px solid;
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-premium);
  white-space: nowrap;
}

.btn-primary {
  background: rgba(0, 217, 255, 0.12);
  color: var(--movie-color);
  border-color: rgba(0, 217, 255, 0.3);
}

.btn-primary:hover {
  background: rgba(0, 217, 255, 0.2);
  border-color: var(--movie-color);
  transform: translateY(-2px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

/* === CARDS === */
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: var(--space-6);
  transition: all var(--duration-base) var(--ease-premium);
}

.card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-title {
  font-family: var(--font-display);
  font-size: 24px; /* --text-2xl */
  font-weight: 600;
  color: var(--text);
  margin: 0 0 var(--space-2);
  line-height: 1.2;
}

.card-text {
  font-size: 16px; /* --text-base */
  color: var(--text-dim);
  margin: 0;
  line-height: 1.6;
}

/* === DIVIDER === */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: var(--space-8) 0;
}

.divider-sm {
  margin: var(--space-4) 0;
}

.divider-lg {
  margin: var(--space-12) 0;
}

/* === RESPONSIVE GRID === */
@media (max-width: 900px) {
  .grid {
    grid-template-columns: repeat(6, 1fr);
  }

  .col-md-1 { grid-column: span 1; }
  .col-md-2 { grid-column: span 2; }
  .col-md-3 { grid-column: span 3; }
  .col-md-4 { grid-column: span 4; }
  .col-md-5 { grid-column: span 5; }
  .col-md-6 { grid-column: span 6; }
  .col-md-12 { grid-column: span 6; }

  section {
    padding: var(--space-15) 0;
  }

  .section-header {
    margin-bottom: var(--space-8);
  }
}

@media (max-width: 480px) {
  :root {
    --space-6: 24px;
  }

  .grid {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }

  .col-sm-12,
  .col-1, .col-2, .col-3, .col-4, .col-5, .col-6,
  .col-7, .col-8, .col-9, .col-10, .col-11, .col-12 {
    grid-column: span 1;
  }

  section {
    padding: var(--space-12) 0;
  }

  .section-header {
    margin-bottom: var(--space-6);
  }

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

  .btn {
    width: 100%;
  }
}

/* === UTILITY CLASSES === */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

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

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

.opacity-60 { opacity: 0.6; }
.opacity-80 { opacity: 0.8; }

/* === ANIMATIONS === */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp var(--duration-slow) var(--ease-premium) both;
}

/* === PRINT STYLES === */
@media print {
  .no-print {
    display: none !important;
  }
}
