/* ==========================================================================
   CRE-AR: Global Design System & Variables
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600&display=swap');

:root {
  /* Colors - Core Brand */
  --c-purple: #6366F1;
  --c-teal: #00B8D4;
  --c-gradient-primary: linear-gradient(135deg, #6366F1 0%, var(--c-teal) 100%);
  --c-gradient-hover: linear-gradient(135deg, #7C7FF5 0%, #15D2EF 100%);
  
  /* Colors - Dark Theme Fundamentals */
  --c-bg-base: #0B0E14; /* Deep, pure dark for the main background */
  --c-bg-surface: #131722; /* Slightly lighter for cards/surfaces */
  --c-bg-surface-elevated: #1D2333; /* For modals or popovers */
  --c-bg-glass: rgba(19, 23, 34, 0.7); /* Glassmorphism background */
  
  /* Colors - Text */
  --c-text-primary: #FFFFFF;
  --c-text-secondary: #94A3B8; /* Slate 400 */
  --c-text-muted: #64748B; /* Slate 500 */
  
  /* Colors - Semantic / States */
  --c-success: #10B981;
  --c-warning: #F59E0B;
  --c-danger: #EF4444;
  --c-border: rgba(255, 255, 255, 0.1);
  --c-border-hover: rgba(255, 255, 255, 0.2);

  /* Typography */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  
  /* Spacing System (Base 4px/8px) */
  --s-1: 0.25rem;  /* 4px */
  --s-2: 0.5rem;   /* 8px */
  --s-3: 0.75rem;  /* 12px */
  --s-4: 1rem;     /* 16px */
  --s-5: 1.25rem;  /* 20px */
  --s-6: 1.5rem;   /* 24px */
  --s-8: 2rem;     /* 32px */
  --s-10: 2.5rem;  /* 40px */
  --s-12: 3rem;    /* 48px */
  --s-16: 4rem;    /* 64px */
  --s-20: 5rem;    /* 80px */
  --s-24: 6rem;    /* 96px */
  
  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 32px;
  --radius-full: 9999px;
  
  /* Shadows & Effects */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.5);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.5), 0 2px 4px -1px rgba(0,0,0,0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.5), 0 4px 6px -2px rgba(0,0,0,0.3);
  --shadow-glow: 0 0 20px rgba(0, 184, 212, 0.35);
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow: 400ms cubic-bezier(0.16, 1, 0.3, 1);
  
  /* Layout */
  --max-width: 1240px;
  --header-height: 80px;
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background-color: var(--c-bg-base);
  color: var(--c-text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  max-width: 100vw;
}

/* Base Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--s-4);
  color: var(--c-text-primary);
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.01em; }
h3 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h4 { font-size: clamp(1.25rem, 2vw, 1.5rem); }

p {
  color: var(--c-text-secondary);
  margin-bottom: var(--s-4);
}

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

a:hover {
  color: #15D2EF;
}

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

/* ==========================================================================
   Utility Classes
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--s-6);
}

.text-gradient {
  background: var(--c-gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  display: inline-block;
}

.text-center { text-align: center; }
.mt-1 { margin-top: var(--s-4); }
.mt-2 { margin-top: var(--s-8); }
.mt-3 { margin-top: var(--s-12); }
.mb-1 { margin-bottom: var(--s-4); }
.mb-2 { margin-bottom: var(--s-8); }
.mb-3 { margin-bottom: var(--s-12); }


/* ========== Mobile Overflow Fix ========== */
html, body {
  overflow-x: hidden;
  max-width: 100%;
}
*, *::before, *::after {
  max-width: 100%;
}
.container {
  overflow-x: hidden;
}
@media (max-width: 768px) {
  section {
    overflow-x: hidden;
  }
  [style*="min-width: 280px"],
  [style*="min-width:280px"] {
    min-width: 0 !important;
    width: 100%;
  }
  [style*="min-width: 300px"],
  [style*="min-width:300px"] {
    min-width: 0 !important;
    width: 100%;
  }
}

/* ===== MOBILE HERO FIX ===== */
@media (max-width: 768px) {
  .carousel-slide {
    align-items: flex-start !important;
    padding-top: 60px;
  }
  .carousel-overlay {
    background: linear-gradient(180deg, rgba(11,14,20,0.85) 0%, rgba(11,14,20,0.5) 50%, rgba(11,14,20,0.2) 100%) !important;
  }
  .carousel-content {
    padding: var(--s-6) var(--s-5) !important;
    max-width: 100% !important;
  }
  .carousel-content h3 {
    font-size: clamp(2rem, 7vw, 3rem) !important;
    margin-bottom: var(--s-3) !important;
  }
  .carousel-content p {
    font-size: 1rem !important;
    margin-bottom: var(--s-4) !important;
  }
  .carousel-container { min-height: 75vh !important; }
}
