/* =========================================
   ClearCode Lab — Design Tokens
   ========================================= */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ---------- Root Variables ---------- */
:root {
  /* --- Brand Colors (from logo: blue → purple → pink) --- */
  --color-primary:        #4F46E5;
  --color-primary-light:  #6366F1;
  --color-primary-dark:   #3730A3;
  --color-secondary:      #7C3AED;
  --color-secondary-light:#8B5CF6;
  --color-accent:         #C026D3;
  --color-accent-light:   #D946EF;
  --color-pink:           #EC4899;

  /* --- Neutral Colors --- */
  --color-dark:           #0A0A1B;
  --color-dark-2:         #0D0D24;
  --color-surface:        #12122E;
  --color-surface-2:      #1A1A3E;
  --color-surface-3:      #222254;
  --color-border:         rgba(255, 255, 255, 0.08);
  --color-border-light:   rgba(255, 255, 255, 0.12);

  /* --- Text Colors --- */
  --color-text-primary:   #F1F5F9;
  --color-text-secondary: #94A3B8;
  --color-text-muted:     #64748B;
  --color-text-inverse:   #0A0A1B;

  /* --- Semantic Colors --- */
  --color-success:        #10B981;
  --color-success-bg:     rgba(16, 185, 129, 0.12);
  --color-warning:        #F59E0B;
  --color-warning-bg:     rgba(245, 158, 11, 0.12);
  --color-error:          #EF4444;
  --color-error-bg:       rgba(239, 68, 68, 0.12);
  --color-info:           #3B82F6;
  --color-info-bg:        rgba(59, 130, 246, 0.12);

  /* --- Gradients --- */
  --gradient-primary:     linear-gradient(135deg, #3B82F6 0%, #7C3AED 50%, #EC4899 100%);
  --gradient-primary-r:   linear-gradient(135deg, #EC4899 0%, #7C3AED 50%, #3B82F6 100%);
  --gradient-surface:     linear-gradient(180deg, var(--color-surface) 0%, var(--color-dark) 100%);
  --gradient-card:        linear-gradient(145deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.01) 100%);
  --gradient-glass:       linear-gradient(135deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.02) 100%);
  --gradient-text:        linear-gradient(135deg, #60A5FA 0%, #A78BFA 50%, #F472B6 100%);

  /* --- Glassmorphism --- */
  --glass-bg:             rgba(255, 255, 255, 0.04);
  --glass-bg-hover:       rgba(255, 255, 255, 0.07);
  --glass-border:         rgba(255, 255, 255, 0.08);
  --glass-blur:           blur(20px);

  /* --- Typography --- */
  --font-family:          'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 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-size-7xl:        4.5rem;     /* 72px */
  --line-height-tight:    1.2;
  --line-height-normal:   1.5;
  --line-height-relaxed:  1.75;
  --letter-spacing-tight: -0.02em;
  --letter-spacing-normal: 0;
  --letter-spacing-wide:  0.05em;

  /* --- 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.5rem;
  --radius-lg:   0.75rem;
  --radius-xl:   1rem;
  --radius-2xl:  1.5rem;
  --radius-full: 9999px;

  /* --- Shadows --- */
  --shadow-sm:    0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md:    0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.2);
  --shadow-lg:    0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -4px rgba(0, 0, 0, 0.2);
  --shadow-xl:    0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.2);
  --shadow-glow:  0 0 20px rgba(124, 58, 237, 0.3);
  --shadow-glow-lg: 0 0 40px rgba(124, 58, 237, 0.2), 0 0 80px rgba(79, 70, 229, 0.1);

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

  /* --- Z-Index Scale --- */
  --z-base:     1;
  --z-dropdown: 100;
  --z-sticky:   200;
  --z-overlay:  300;
  --z-modal:    400;
  --z-toast:    500;
  --z-max:      9999;

  /* --- Container --- */
  --container-max: 1280px;
  --container-padding: var(--space-6);
}

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

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

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

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

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

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

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

ul, ol {
  list-style: none;
}

/* ---------- Utilities ---------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

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

.section-title {
  font-size: var(--font-size-4xl);
  font-weight: 800;
  letter-spacing: var(--letter-spacing-tight);
  text-align: center;
  margin-bottom: var(--space-3);
}

.section-subtitle {
  font-size: var(--font-size-lg);
  color: var(--color-text-secondary);
  text-align: center;
  max-width: 600px;
  margin: 0 auto var(--space-16);
}

.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ---------- Keyframe Animations ---------- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(124, 58, 237, 0.3); }
  50%      { box-shadow: 0 0 40px rgba(124, 58, 237, 0.5), 0 0 80px rgba(79, 70, 229, 0.2); }
}

@keyframes gradient-shift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes count-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Animation utility classes */
.animate-fade-in-up {
  animation: fadeInUp 0.6s var(--transition-normal) forwards;
  opacity: 0;
}

.animate-fade-in {
  animation: fadeIn 0.6s var(--transition-normal) forwards;
  opacity: 0;
}

.animate-scale-in {
  animation: scaleIn 0.5s var(--transition-spring) forwards;
  opacity: 0;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

/* Stagger delays */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }
.delay-6 { animation-delay: 0.6s; }
.delay-7 { animation-delay: 0.7s; }
.delay-8 { animation-delay: 0.8s; }

/* Scroll-triggered animation (add via JS IntersectionObserver) */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--color-surface-3);
  border-radius: var(--radius-full);
}

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

/* ---------- Selection ---------- */
::selection {
  background: rgba(124, 58, 237, 0.3);
  color: var(--color-text-primary);
}
