/* ============================================================
   STRATUM.EARTH – DESIGN SYSTEM
   Premium Enterprise Environmental Technology
   ============================================================ */

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600;700&family=IBM+Plex+Sans:wght@300;400;500;600;700&display=swap');

/* ============================================================
   CSS CUSTOM PROPERTIES (DESIGN TOKENS)
   ============================================================ */
:root {
  /* Brand Colors */
  --primary:          #4F57F5;
  --primary-dark:     #3744E8;
  --primary-light:    #6B72FF;
  --secondary:        #3744E8;
  --accent:           #A9AEFF;
  --accent-light:     #E8EBFF;

  /* Background Palette */
  --bg:               #FFFFFF;
  --bg-secondary:     #F7F9FF;
  --bg-section:       #EEF2FF;
  --bg-dark:          #050814;
  --bg-dark-secondary:#0A0F1E;
  --bg-card:          rgba(255, 255, 255, 0.7);
  --bg-glass:         rgba(255, 255, 255, 0.08);
  --bg-glass-dark:    rgba(10, 15, 30, 0.6);

  /* Text Colors */
  --text-primary:     #111827;
  --text-secondary:   #6B7280;
  --text-muted:       #9CA3AF;
  --text-white:       #FFFFFF;
  --text-light:       #E5E7EB;

  /* Border Colors */
  --border:           #DCE4FF;
  --border-light:     #EEF2FF;
  --border-dark:      rgba(79, 87, 245, 0.3);
  --border-glow:      rgba(79, 87, 245, 0.5);

  /* Gradients */
  --grad-primary:     linear-gradient(135deg, #4F57F5 0%, #3744E8 50%, #7A7EFF 100%);
  --grad-primary-v:   linear-gradient(180deg, #4F57F5 0%, #3744E8 100%);
  --grad-blue-dark:   linear-gradient(135deg, #0A0F1E 0%, #1a2040 50%, #0d1635 100%);
  --grad-hero:        linear-gradient(135deg, #050814 0%, #0d1040 40%, #1a1f5e 100%);
  --grad-card:        linear-gradient(135deg, rgba(79,87,245,0.1) 0%, rgba(55,68,232,0.05) 100%);
  --grad-glow:        radial-gradient(ellipse at center, rgba(79,87,245,0.3) 0%, transparent 70%);
  --grad-text:        linear-gradient(135deg, #4F57F5, #7A7EFF);
  --grad-overlay:     linear-gradient(to bottom, rgba(5,8,20,0.3) 0%, rgba(5,8,20,0.85) 100%);

  /* Typography */
  --font-heading:     'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body:        'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-numbers:     'IBM Plex Sans', 'Inter', monospace;

  /* Font Sizes (clamp for fluid type) */
  --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 */
  --text-hero:        clamp(2.5rem, 6vw, 5rem);

  /* Font Weights */
  --fw-light:         300;
  --fw-regular:       400;
  --fw-medium:        500;
  --fw-semibold:      600;
  --fw-bold:          700;

  /* Line Heights */
  --lh-tight:         1.1;
  --lh-snug:          1.3;
  --lh-normal:        1.5;
  --lh-relaxed:       1.7;
  --lh-loose:         2;

  /* Letter Spacing */
  --ls-tight:         -0.025em;
  --ls-normal:        0;
  --ls-wide:          0.05em;
  --ls-wider:         0.1em;
  --ls-widest:        0.2em;

  /* Spacing */
  --space-1:          0.25rem;
  --space-2:          0.5rem;
  --space-3:          0.75rem;
  --space-4:          1rem;
  --space-5:          1.25rem;
  --space-6:          1.5rem;
  --space-8:          2rem;
  --space-10:         2.5rem;
  --space-12:         3rem;
  --space-16:         4rem;
  --space-20:         5rem;
  --space-24:         6rem;
  --space-32:         8rem;

  /* Border Radius */
  --radius-sm:        0.375rem;
  --radius-md:        0.75rem;
  --radius-lg:        1rem;
  --radius-xl:        1.25rem;
  --radius-2xl:       1.5rem;
  --radius-3xl:       2rem;
  --radius-full:      9999px;

  /* Shadows */
  --shadow-sm:        0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:        0 4px 16px rgba(79,87,245,0.08), 0 2px 8px rgba(0,0,0,0.06);
  --shadow-lg:        0 10px 40px rgba(79,87,245,0.12), 0 4px 16px rgba(0,0,0,0.08);
  --shadow-xl:        0 20px 60px rgba(79,87,245,0.15), 0 8px 32px rgba(0,0,0,0.1);
  --shadow-glow:      0 0 30px rgba(79,87,245,0.4), 0 0 60px rgba(79,87,245,0.2);
  --shadow-glow-sm:   0 0 15px rgba(79,87,245,0.3);
  --shadow-card:      0 8px 32px rgba(79,87,245,0.1), 0 2px 8px rgba(0,0,0,0.06);

  /* Transitions */
  --transition-fast:  150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base:  300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow:  500ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 400ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Z-Index Scale */
  --z-below:          -1;
  --z-base:           0;
  --z-raised:         10;
  --z-dropdown:       100;
  --z-sticky:         500;
  --z-overlay:        800;
  --z-modal:          900;
  --z-toast:          1000;

  /* Container Widths */
  --container-sm:     640px;
  --container-md:     768px;
  --container-lg:     1024px;
  --container-xl:     1280px;
  --container-2xl:    1440px;

  /* Section Padding */
  --section-py:       clamp(4rem, 8vw, 8rem);
  --section-px:       clamp(1.5rem, 5vw, 4rem);
}

/* ============================================================
   CSS RESET & NORMALIZATION
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--lh-normal);
  color: var(--text-primary);
  background-color: var(--bg);
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

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

input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  color: var(--text-primary);
}

h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

p {
  color: var(--text-secondary);
  line-height: var(--lh-relaxed);
}

/* Gradient Text */
.text-gradient {
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-white {
  background: linear-gradient(135deg, #ffffff 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Tag / eyebrow text */
.eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--primary);
}

.eyebrow-white {
  color: var(--accent);
}

/* Numbers styling */
.num {
  font-family: var(--font-numbers);
  font-weight: var(--fw-bold);
}

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: 0 var(--section-px);
}

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

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

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

.section-light {
  background: var(--bg);
}

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

.section-accent {
  background: var(--bg-section);
}

.section-dark {
  background: var(--bg-dark);
}

/* Grid System */
.grid {
  display: grid;
  gap: var(--space-8);
}

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

/* Flex utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-center { align-items: center; justify-content: center; }
.flex-between { align-items: center; justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

/* Alignment */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* Section Header */
.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto var(--space-16);
}

.section-header p {
  margin-top: var(--space-4);
  font-size: var(--text-lg);
  color: var(--text-secondary);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

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

  .section-header {
    margin-bottom: var(--space-12);
  }
}

/* ============================================================
   SCROLLBAR STYLING
   ============================================================ */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

/* ============================================================
   SELECTION
   ============================================================ */
::selection {
  background: var(--accent-light);
  color: var(--primary-dark);
}

/* ============================================================
   FOCUS STYLES (ACCESSIBILITY)
   ============================================================ */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}
