/**
 * The Outer Worlds 2 Guide - Main Stylesheet
 * 
 * Purpose: Global styles, CSS variables, resets
 * Design: Light, clean, bright theme
 * 
 * Last Updated: October 27, 2025
 */

/* ==========================================================================
   CSS Variables - Color Palette & Design Tokens
   ========================================================================== */

:root {
  /* Primary Colors - Sci-fi theme */
  --primary: #00D9FF;          /* Neon Blue - Main accent */
  --primary-hover: #00B8DB;    /* Darker blue for hover states */
  --secondary: #6C63FF;        /* Purple - High-tech feel */
  --secondary-hover: #5750DB;  /* Darker purple for hover */
  --accent: #FFD700;           /* Gold - Highlights and emphasis */
  
  /* Background Colors - Light theme */
  --bg-primary: #FFFFFF;       /* Pure white backgrounds */
  --bg-secondary: #F8F9FA;     /* Light gray sections */
  --bg-card: #FFFFFF;          /* Card backgrounds */
  --bg-hover: #F1F3F5;         /* Hover state background */
  
  /* Text Colors - High contrast */
  --text-primary: #1A1A1A;     /* Main text - dark gray */
  --text-secondary: #6B7280;   /* Secondary text - medium gray */
  --text-muted: #9CA3AF;       /* Muted text - light gray */
  --text-inverse: #FFFFFF;     /* White text on dark backgrounds */
  
  /* Border & Shadow */
  --border: #E5E7EB;           /* Border color */
  --border-hover: #D1D5DB;     /* Border hover state */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  
  /* Typography */
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-family-mono: "SF Mono", Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  
  --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 */
  
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  
  --line-height-tight: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;
  
  /* Spacing Scale */
  --space-xs: 0.5rem;          /* 8px */
  --space-sm: 1rem;            /* 16px */
  --space-md: 1.5rem;          /* 24px */
  --space-lg: 2rem;            /* 32px */
  --space-xl: 3rem;            /* 48px */
  --space-2xl: 4rem;           /* 64px */
  --space-3xl: 6rem;           /* 96px */
  
  /* Border Radius */
  --radius-sm: 0.5rem;         /* 8px */
  --radius-md: 0.75rem;        /* 12px */
  --radius-lg: 1rem;           /* 16px */
  --radius-full: 9999px;       /* Fully rounded */
  
  /* Container Widths */
  --container-xs: 640px;
  --container-sm: 768px;
  --container-md: 1024px;
  --container-lg: 1280px;
  --container-xl: 1536px;
  
  /* Transitions */
  --transition-fast: 150ms ease-in-out;
  --transition-base: 200ms ease-in-out;
  --transition-slow: 300ms ease-in-out;
  
  /* Z-index Scale */
  --z-base: 0;
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
}


/* ==========================================================================
   CSS Reset & Base Styles
   ========================================================================== */

/* Box sizing reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* HTML & Body */
html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-normal);
  color: var(--text-primary);
  background-color: var(--bg-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Main content should grow to push footer down */
main {
  flex: 1;
}

/* Remove default list styles */
ul, ol {
  list-style: none;
}

/* Remove default link styles */
a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-base);
}

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

/* Image defaults */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Button reset */
button {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

/* Form elements */
input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

/* Code elements */
code,
kbd,
pre,
samp {
  font-family: var(--font-family-mono);
}


/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  color: var(--text-primary);
  margin-bottom: var(--space-md);
}

h1 {
  font-size: var(--font-size-4xl);
  letter-spacing: -0.025em;
}

h2 {
  font-size: var(--font-size-3xl);
  letter-spacing: -0.025em;
}

h3 {
  font-size: var(--font-size-2xl);
}

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

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

h6 {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
}

p {
  margin-bottom: var(--space-sm);
  line-height: var(--line-height-relaxed);
}

/* Lead text */
.lead {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-normal);
  color: var(--text-secondary);
}

/* Small text */
small, .text-sm {
  font-size: var(--font-size-sm);
}

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

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

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

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

.text-bold {
  font-weight: var(--font-weight-bold);
}


/* ==========================================================================
   Layout & Container
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--container-lg);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-md);
  padding-right: var(--space-md);
}

.container-sm {
  max-width: var(--container-sm);
}

.container-md {
  max-width: var(--container-md);
}

.container-xl {
  max-width: var(--container-xl);
}

/* Section spacing */
section {
  padding-top: var(--space-2xl);
  padding-bottom: var(--space-2xl);
}

section.hero {
  padding-top: var(--space-3xl);
  padding-bottom: var(--space-2xl);
}

/* Background variants */
.bg-white {
  background-color: var(--bg-primary);
}

.bg-gray {
  background-color: var(--bg-secondary);
}


/* ==========================================================================
   Grid System
   ========================================================================== */

.grid {
  display: grid;
  gap: var(--space-lg);
}

.grid-cols-1 {
  grid-template-columns: repeat(1, 1fr);
}

.grid-cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* Responsive grid helpers */
@media (max-width: 767px) {
  .grid-cols-2,
  .grid-cols-3,
  .grid-cols-4 {
    grid-template-columns: repeat(1, 1fr);
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .grid-cols-3,
  .grid-cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}


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

.flex {
  display: flex;
}

.flex-col {
  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-start {
  justify-content: flex-start;
}

.justify-end {
  justify-content: flex-end;
}

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

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

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

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


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

.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

.pt-sm { padding-top: var(--space-sm); }
.pt-md { padding-top: var(--space-md); }
.pt-lg { padding-top: var(--space-lg); }
.pt-xl { padding-top: var(--space-xl); }

.pb-sm { padding-bottom: var(--space-sm); }
.pb-md { padding-bottom: var(--space-md); }
.pb-lg { padding-bottom: var(--space-lg); }
.pb-xl { padding-bottom: var(--space-xl); }


/* ==========================================================================
   Code Blocks
   ========================================================================== */

code {
  background-color: var(--bg-secondary);
  color: var(--secondary);
  padding: 0.125rem 0.375rem;
  border-radius: var(--radius-sm);
  font-size: 0.875em;
}

pre {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  overflow-x: auto;
  margin-bottom: var(--space-md);
}

pre code {
  background-color: transparent;
  padding: 0;
  border-radius: 0;
  font-size: var(--font-size-sm);
  color: var(--text-primary);
}


/* ==========================================================================
   Tables
   ========================================================================== */

.table-wrapper {
  overflow-x: auto;
  margin-bottom: var(--space-lg);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  text-align: left;
  padding: var(--space-sm);
  border-bottom: 1px solid var(--border);
}

th {
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
  background-color: var(--bg-secondary);
}

tr:hover {
  background-color: var(--bg-hover);
}


/* ==========================================================================
   Utility Classes
   ========================================================================== */

.hidden {
  display: 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-width: 0;
}

.rounded {
  border-radius: var(--radius-md);
}

.rounded-sm {
  border-radius: var(--radius-sm);
}

.rounded-lg {
  border-radius: var(--radius-lg);
}

.rounded-full {
  border-radius: var(--radius-full);
}

.shadow-sm {
  box-shadow: var(--shadow-sm);
}

.shadow-md {
  box-shadow: var(--shadow-md);
}

.shadow-lg {
  box-shadow: var(--shadow-lg);
}


/* ==========================================================================
   Animations
   ========================================================================== */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn var(--transition-slow) ease-out;
}

/* Smooth transitions for interactive elements */
.transition {
  transition: all var(--transition-base);
}


/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
  * {
    background: transparent !important;
    color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }
  
  a,
  a:visited {
    text-decoration: underline;
  }
  
  a[href]::after {
    content: " (" attr(href) ")";
  }
  
  img {
    page-break-inside: avoid;
  }
  
  p, h2, h3 {
    orphans: 3;
    widows: 3;
  }
  
  h2, h3 {
    page-break-after: avoid;
  }
}

