/* ==========================================================================
   CERRO MARTIAL 2026 - DESIGN SYSTEM & BASE STYLES
   ========================================================================== */

/* --- 1. CSS VARIABLES - DARK THEME (DEFAULT) --- */
:root {
  /* Colors - Premium Alpine Palette - Dark Mode */
  --color-primary: #0F172A; /* Deep Slate - Modern Black alternative */
  --color-secondary: #F8FAFC; /* Glacier White */
  --color-accent-1: #3EA1F0; /* Logo Light Blue */
  --color-accent-2: #2482CC; /* Logo Darker Blue for Buttons/CTAs */
  --color-text-primary: var(--color-secondary);
  --color-text-muted: rgba(248, 250, 252, 0.8);
  --color-text-inverse: rgba(15, 23, 42, 0.8);
  
  /* Background colors */
  --color-bg-card: rgba(255, 255, 255, 0.03);
  --color-bg-card-hover: rgba(255, 255, 255, 0.05);
  --color-section-alt: rgba(255, 255, 255, 0.02);
  
  /* Border */
  --color-border: rgba(255, 255, 255, 0.05);
  
  /* Background gradients for depth */
  --bg-gradient-dark: linear-gradient(180deg, rgba(15,23,42,0) 0%, rgba(15,23,42,0.8) 50%, rgba(15,23,42,1) 100%);
  --bg-gradient-overlay: rgba(15, 23, 42, 0.4);
  
  /* Card shadow for dark mode */
  --shadow-card: none;
  
  /* Glass effect for dark mode */
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-blur: blur(12px);

  /* Typography */
  --font-primary: 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Montserrat', system-ui, -apple-system, sans-serif; /* Geometric, bold */
  
  /* Font Sizes */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;
  --text-4xl: 3rem;
  --text-5xl: 4.5rem; /* Hero titles */

  /* Spacing System */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Effects - Shadows */
  --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);
  --shadow-glow: 0 0 20px rgba(62, 161, 240, 0.3); /* Blue glow for CTAs */
  
  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* --- Global Scroll Behavior --- */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px; /* Account for fixed navbar height */
}

/* --- 1.1 LIGHT THEME VARIABLES --- */
/* Only override colors - keep fonts, spacing, shadows the same */
[data-theme="light"] {
  /* Colors - Inverted for light mode */
  --color-primary: #F8FAFC; /* Glacier White background */
  --color-secondary: #0F172A; /* Deep Slate text */
  --color-accent-1: #2482CC; /* Logo Darker Blue (better contrast on light) */
  --color-accent-2: #3EA1F0; /* Logo Light Blue */
  
  /* Text colors for light mode */
  --color-text-primary: var(--color-secondary);
  --color-text-muted: rgba(15, 23, 42, 0.7);
  --color-text-inverse: rgba(248, 250, 252, 0.9);
  
  /* Background colors for light mode */
  --color-bg-card: #ffffff;
  --color-bg-card-hover: #f1f5f9;
  --color-section-alt: #f1f5f9;
  
  /* Border for light mode */
  --color-border: rgba(0, 0, 0, 0.1);
  
  /* Background gradients for light mode */
  --bg-gradient-dark: linear-gradient(180deg, rgba(248,250,252,0) 0%, rgba(248,250,252,0.5) 50%, rgba(248,250,252,0.85) 100%);
  --bg-gradient-overlay: rgba(248, 250, 252, 0.2);

  /* Card shadow for light mode */
  --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  
  /* Glass effect for light mode */
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(0, 0, 0, 0.08);
}

/* --- 2. RESET & BASE --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font-primary);
  color: var(--color-text-primary);
  background-color: var(--color-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

ul {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

/* --- 3. TYPOGRAPHY --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: var(--space-4);
  letter-spacing: -0.02em;
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }

@media (min-width: 768px) {
  h1 { font-size: var(--text-5xl); }
  h2 { font-size: var(--text-4xl); }
}

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

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

.subtitle {
  font-family: var(--font-primary);
  font-size: var(--text-lg);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent-1);
  margin-bottom: var(--space-2);
  display: block;
}

/* --- 4. LAYOUT UTILITIES --- */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

@media (min-width: 1024px) {
  .container {
    padding: 0 var(--space-8);
  }
}

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

.section.no-top {
  padding-top: 0;
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }

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

/* Grid systems */
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }

@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@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)); }
}

/* --- 5. ANIMATIONS (Scroll Reveal) --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all var(--transition-slow);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
