/* ============================================
   BASE.CSS - Reset, Variables, Typography
   ============================================ */

/* ---------- CSS Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100dvh;
  line-height: 1.6;
  text-rendering: optimizeSpeed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Remove list styles */
ul,
ol {
  list-style: none;
}

/* Make images easier to work with */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Inherit fonts for inputs and buttons */
input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

/* Remove all animations for people who prefer not to see them */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Links */
a {
  color: inherit;
  text-decoration: none;
}

/* Buttons */
button {
  background: none;
  border: none;
  cursor: pointer;
}

/* Focus visible for accessibility */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

:focus:not(:focus-visible) {
  outline: none;
}

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Colors - Ultra-Dark Premium Theme */
  --color-bg-primary: #050608;
  /* Deepest black-blue */
  --color-bg-secondary: #0B0F19;
  /* Slightly lighter for sections */
  --color-bg-tertiary: #111827;
  /* Input backgrounds/subtle highlights */
  --color-bg-card: #131B2E;
  /* Dark Blue-Black Cards */
  --color-bg-card-hover: #1E293B;
  /* Card hover state */

  /* Text Colors */
  --color-text-primary: #F3F4F6;
  /* High contrast white */
  --color-text-secondary: #D1D5DB;
  /* Soft gray */
  --color-text-muted: #9CA3AF;
  /* Muted text */
  --color-text-subtle: #9CA3AF;
  /* Very subtle text - Lightened for accessibility */

  /* Accent Colors - Premium Electric Blue */
  --color-accent: #3B82F6;
  /* Bright Blue for visibility/pop */
  --color-accent-hover: #2563EB;
  /* Darker on hover */
  --color-accent-light: #60A5FA;
  /* Lighter for glowing effects */
  --color-accent-dark: #1D4ED8;
  /* Deep blue for gradients */
  --color-accent-glow: rgba(59, 130, 246, 0.25);
  /* Adjusted opacity for elegance */
  --color-accent-gradient: linear-gradient(135deg, #2563EB 0%, #3B82F6 100%);

  /* Status Colors (Refined) */
  --color-success: #10B981;
  --color-error: #EF4444;
  --color-warning: #F59E0B;
  --color-info: #3B82F6;

  /* Borders & Shadows */
  --color-border: rgba(75, 85, 99, 0.4);
  --color-border-hover: rgba(99, 102, 241, 0.5);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 20px var(--color-accent-glow);

  /* Typography */
  --font-family: 'Inter', -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 */
  --font-size-6xl: 3.75rem;
  /* 60px */

  /* Font Weights */
  --font-weight-light: 300;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;

  /* Line Heights */
  --line-height-tight: 1.2;
  --line-height-normal: 1.6;
  --line-height-relaxed: 1.75;

  /* Spacing */
  --spacing-1: 0.25rem;
  /* 4px */
  --spacing-2: 0.5rem;
  /* 8px */
  --spacing-3: 0.75rem;
  /* 12px */
  --spacing-4: 1rem;
  /* 16px */
  --spacing-5: 1.25rem;
  /* 20px */
  --spacing-6: 1.5rem;
  /* 24px */
  --spacing-8: 2rem;
  /* 32px */
  --spacing-10: 2.5rem;
  /* 40px */
  --spacing-12: 3rem;
  /* 48px */
  --spacing-16: 4rem;
  /* 64px */
  --spacing-20: 5rem;
  /* 80px */
  --spacing-24: 6rem;
  /* 96px */

  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 350ms ease;
  --transition-spring: 400ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Z-Index Scale */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-modal-backdrop: 300;
  --z-modal: 400;
  --z-tooltip: 500;

  /* Layout */
  --navbar-height: 64px;
  --container-max-width: 1200px;
  --section-padding: var(--spacing-20);
}

/* ---------- Base Typography ---------- */
body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  color: var(--color-text-secondary);
  background-color: var(--color-bg-primary);
}

/* Headings */
h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--color-text-primary);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  letter-spacing: -0.02em;
}

h1 {
  font-size: var(--font-size-5xl);
  font-weight: var(--font-weight-extrabold);
}

h2 {
  font-size: var(--font-size-4xl);
}

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);
}

/* Paragraphs */
p {
  margin-bottom: var(--spacing-4);
  color: var(--color-text-secondary);
}

p:last-child {
  margin-bottom: 0;
}

/* Strong & emphasis */
strong,
b {
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
}

em,
i {
  font-style: italic;
}

/* Small text */
small {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

/* Selection */
::selection {
  background-color: var(--color-accent);
  color: var(--color-text-primary);
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--color-bg-tertiary);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-subtle);
}

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-accent);
  color: var(--color-text-primary);
  padding: var(--spacing-3) var(--spacing-6);
  border-radius: var(--radius-md);
  font-weight: var(--font-weight-medium);
  z-index: var(--z-tooltip);
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: var(--spacing-4);
}

/* 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;
}