/* ===== PREMIUM DARK ELEGANT DESIGN SYSTEM ===== */

/* ===== CSS RESET & BASE ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-family-primary);
  font-weight: var(--font-normal);
  line-height: var(--leading-relaxed);
  color: var(--text-primary);
  background-color: var(--bg-900);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Fallback for black screen issue */
  min-height: 100vh;
}

/* Ensure main content is visible */
main {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* When loaded, ensure everything is visible */
body.loaded main {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* ===== CSS CUSTOM PROPERTIES ===== */
:root {
  /* === DARK ELEGANT COLOR PALETTE === */
  --bg-900: #000000;
  --surface-800: #0f172a;
  --surface-700: #1e4976;
  --surface-600: #2563eb;
  
  --primary: #0f172a;
  --primary-dark: #0a0f1a;
  --primary-light: #1e4976;
  --secondary: #1e4976;
  --secondary-dark: #0f172a;
  --secondary-light: #2563eb;
  
  --accent: #2563eb;
  --accent-light: #3b82f6;
  
  /* === GOLDEN ACCENT COLORS === */
  --primary-gold: #f0a500;
  --gold-gradient: linear-gradient(135deg, #f59e0b, #d97706);
  
  /* === TEXT COLORS === */
  --text-primary: #FFFFFF;
  --text-secondary: #E5E5E5;
  --text-muted: #A7A7B3;
  --text-subtle: #8B8B95;
  
  /* === GLASSMORPHISM === */
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  --glass-blur: blur(12px);
  
  /* === GRADIENTS === */
  --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  --gradient-dynamic: linear-gradient(120deg, var(--primary) 0%, var(--secondary) 50%, var(--surface-800) 100%);
  --gradient-hero: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 50%, var(--bg-900) 100%);
  
  /* === TYPOGRAPHY === */
  --font-family-primary: 'Heebo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-family-heading: 'Assistant', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  /* Font Sizes */
  --text-xs: 0.75rem;      /* 12px */
  --text-sm: 0.875rem;     /* 14px */
  --text-base: 1rem;       /* 16px */
  --text-lg: 1.125rem;     /* 18px */
  --text-xl: 1.25rem;      /* 20px */
  --text-2xl: 1.5rem;      /* 24px */
  --text-3xl: 1.875rem;    /* 30px */
  --text-4xl: 2.25rem;     /* 36px */
  --text-5xl: 3rem;        /* 48px */
  --text-6xl: 3.75rem;     /* 60px */
  --text-7xl: 4.5rem;      /* 72px */
  
  /* Font Weights */
  --font-light: 300;
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-extrabold: 800;
  
  /* Line Heights */
  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;
  --leading-loose: 1.8;
  
  /* === SPACING === */
  --space-1: 0.25rem;      /* 4px */
  --space-2: 0.5rem;       /* 8px */
  --space-3: 0.75rem;      /* 12px */
  --space-4: 1rem;         /* 16px */
  --space-5: 1.25rem;      /* 20px */
  --space-6: 1.5rem;       /* 24px */
  --space-8: 2rem;         /* 32px */
  --space-10: 2.5rem;      /* 40px */
  --space-12: 3rem;        /* 48px */
  --space-16: 4rem;        /* 64px */
  --space-20: 5rem;        /* 80px */
  --space-24: 6rem;        /* 96px */
  --space-32: 8rem;        /* 128px */
  
  /* === BORDERS & RADIUS === */
  --border-width: 1px;
  --border-width-2: 2px;
  
  --radius-sm: 0.375rem;   /* 6px */
  --radius: 0.5rem;        /* 8px */
  --radius-md: 0.75rem;    /* 12px */
  --radius-lg: 1rem;       /* 16px */
  --radius-xl: 1.5rem;     /* 24px */
  --radius-2xl: 2rem;      /* 32px */
  
  /* === SHADOWS === */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.1);
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 10px 15px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 20px 25px rgba(0, 0, 0, 0.15);
  --shadow-xl: 0 25px 50px rgba(0, 0, 0, 0.25);
  --shadow-glow: 0 0 20px rgba(15, 23, 42, 0.3);
  
  /* === TRANSITIONS === */
  --transition-fast: 0.15s ease-out;
  --transition-normal: 0.3s ease-out;
  --transition-slow: 0.5s ease-out;
  
  /* === Z-INDEX === */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
  --z-toast: 1080;
}

/* ===== RTL SUPPORT ===== */
[dir="rtl"] {
  text-align: right;
}

[dir="rtl"] .text-left {
  text-align: right;
}

[dir="rtl"] .text-right {
  text-align: left;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-heading);
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  color: var(--text-primary);
  margin-bottom: var(--space-4);
}

h1 {
  font-size: var(--text-5xl);
  font-weight: var(--font-extrabold);
  letter-spacing: -0.025em;
}

h2 {
  font-size: var(--text-4xl);
  font-weight: var(--font-bold);
}

h3 {
  font-size: var(--text-3xl);
  font-weight: var(--font-semibold);
}

h4 {
  font-size: var(--text-2xl);
  font-weight: var(--font-semibold);
}

h5 {
  font-size: var(--text-xl);
  font-weight: var(--font-medium);
}

h6 {
  font-size: var(--text-lg);
  font-weight: var(--font-medium);
}

p {
  margin-bottom: var(--space-4);
  color: var(--text-secondary);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-light);
}

/* ===== UTILITY CLASSES ===== */

/* Display */
.block { display: block; }
.inline-block { display: inline-block; }
.inline { display: inline; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.hidden { display: none; }

/* Flexbox */
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.flex-nowrap { flex-wrap: nowrap; }
.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.justify-start { justify-content: flex-start; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.justify-between { justify-content: space-between; }
.justify-around { justify-content: space-around; }

/* Grid */
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

/* Spacing */
.m-0 { margin: 0; }
.m-1 { margin: var(--space-1); }
.m-2 { margin: var(--space-2); }
.m-4 { margin: var(--space-4); }
.m-6 { margin: var(--space-6); }
.m-8 { margin: var(--space-8); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-1); }
.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); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-1); }
.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); }

.p-0 { padding: 0; }
.p-1 { padding: var(--space-1); }
.p-2 { padding: var(--space-2); }
.p-4 { padding: var(--space-4); }
.p-6 { padding: var(--space-6); }
.p-8 { padding: var(--space-8); }

/* Text */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }

.text-xs { font-size: var(--text-xs); }
.text-sm { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-lg { font-size: var(--text-lg); }
.text-xl { font-size: var(--text-xl); }
.text-2xl { font-size: var(--text-2xl); }
.text-3xl { font-size: var(--text-3xl); }
.text-4xl { font-size: var(--text-4xl); }
.text-5xl { font-size: var(--text-5xl); }

.font-light { font-weight: var(--font-light); }
.font-normal { font-weight: var(--font-normal); }
.font-medium { font-weight: var(--font-medium); }
.font-semibold { font-weight: var(--font-semibold); }
.font-bold { font-weight: var(--font-bold); }
.font-extrabold { font-weight: var(--font-extrabold); }

.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-subtle { color: var(--text-subtle); }

/* Width & Height */
.w-full { width: 100%; }
.h-full { height: 100%; }
.min-h-screen { min-height: 100vh; }

/* Position */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }

/* Overflow */
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }

/* Border Radius */
.rounded { border-radius: var(--radius); }
.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-2xl { border-radius: var(--radius-2xl); }
.rounded-full { border-radius: 9999px; }

/* Opacity */
.opacity-0 { opacity: 0; }
.opacity-25 { opacity: 0.25; }
.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }
.opacity-100 { opacity: 1; }

/* ===== ACCESSIBILITY ===== */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--primary);
  color: white;
  padding: 8px;
  text-decoration: none;
  border-radius: var(--radius);
  z-index: var(--z-tooltip);
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: 6px;
}

/* Focus states */
*:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Keyboard navigation */
.keyboard-navigation *:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  :root {
    --text-5xl: 2.5rem;
    --text-4xl: 2rem;
    --text-3xl: 1.75rem;
    --text-2xl: 1.5rem;
    --text-xl: 1.25rem;
  }
  
  .grid-cols-2 {
    grid-template-columns: 1fr;
  }
  
  .grid-cols-3 {
    grid-template-columns: 1fr;
  }
  
  .grid-cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  
  /* Mobile-specific spacing */
  .gap-8 {
    gap: var(--space-4);
  }
  
  .gap-6 {
    gap: var(--space-3);
  }
  
  .gap-4 {
    gap: var(--space-2);
  }
}

@media (max-width: 480px) {
  :root {
    --text-5xl: 2rem;
    --text-4xl: 1.75rem;
    --text-3xl: 1.5rem;
    --text-2xl: 1.25rem;
    --text-xl: 1.125rem;
  }
  
  .grid-cols-4 {
    grid-template-columns: 1fr;
  }
  
  .gap-8 {
    gap: var(--space-3);
  }
  
  .gap-6 {
    gap: var(--space-2);
  }
}

@media (min-width: 769px) {
  .md\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  
  .md\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  
  .md\:flex-row {
    flex-direction: row;
  }
  
  .md\:text-left {
    text-align: left;
  }
  
  .md\:text-right {
    text-align: right;
  }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  
  .lg\:grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  
  .lg\:text-left {
    text-align: left;
  }
  
  .lg\:text-right {
    text-align: right;
  }
}

/* ===== LOADING STATES ===== */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.loaded {
  opacity: 1;
}

/* ===== SELECTION ===== */
::selection {
  background-color: var(--primary);
  color: white;
}

::-moz-selection {
  background-color: var(--primary);
  color: white;
}

/* Mobile Typography */
@media (max-width: 768px) {
  h1 {
    font-size: var(--text-4xl);
    line-height: 1.2;
  }
  
  h2 {
    font-size: var(--text-3xl);
    line-height: 1.3;
  }
  
  h3 {
    font-size: var(--text-2xl);
    line-height: 1.3;
  }
  
  h4 {
    font-size: var(--text-xl);
    line-height: 1.4;
  }
  
  h5 {
    font-size: var(--text-lg);
    line-height: 1.4;
  }
  
  h6 {
    font-size: var(--text-base);
    line-height: 1.4;
  }
  
  p {
    font-size: var(--text-base);
    line-height: 1.6;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: var(--text-3xl);
    line-height: 1.2;
  }
  
  h2 {
    font-size: var(--text-2xl);
    line-height: 1.3;
  }
  
  h3 {
    font-size: var(--text-xl);
    line-height: 1.3;
  }
  
  h4 {
    font-size: var(--text-lg);
    line-height: 1.4;
  }
  
  h5 {
    font-size: var(--text-base);
    line-height: 1.4;
  }
  
  h6 {
    font-size: var(--text-sm);
    line-height: 1.4;
  }
  
  p {
    font-size: var(--text-sm);
    line-height: 1.6;
  }
}

/* Mobile Responsive Base */
@media (max-width: 768px) {
  body {
    font-size: var(--text-base);
    line-height: 1.6;
  }
  
  .container {
    padding: 0 var(--space-4);
  }
  
  .section {
    padding: var(--space-16) 0;
  }
  
  .section-sm {
    padding: var(--space-8) 0;
  }
  
  .section-lg {
    padding: var(--space-20) 0;
  }
  
  /* Mobile-specific spacing */
  .gap-8 {
    gap: var(--space-4);
  }
  
  .gap-6 {
    gap: var(--space-3);
  }
  
  .gap-4 {
    gap: var(--space-2);
  }
  
  /* Mobile-specific text alignment */
  .text-left {
    text-align: center;
  }
  
  .text-right {
    text-align: center;
  }
  
  /* Mobile-specific flexbox */
  .flex {
    flex-direction: column;
  }
  
  .flex-row {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  body {
    font-size: var(--text-sm);
    line-height: 1.6;
  }
  
  .container {
    padding: 0 var(--space-3);
  }
  
  .section {
    padding: var(--space-12) 0;
  }
  
  .section-sm {
    padding: var(--space-6) 0;
  }
  
  .section-lg {
    padding: var(--space-16) 0;
  }
  
  /* Mobile-specific spacing */
  .gap-8 {
    gap: var(--space-3);
  }
  
  .gap-6 {
    gap: var(--space-2);
  }
  
  .gap-4 {
    gap: var(--space-1);
  }
  
  /* Mobile-specific text alignment */
  .text-left {
    text-align: center;
  }
  
  .text-right {
    text-align: center;
  }
}
