/* Apple-Inspired Design System - Complete Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Apple's Signature Dark Theme */
  --bg-primary: #000000;
  --bg-secondary: #1c1c1e;
  --bg-tertiary: #2c2c2e;
  --bg-glass: rgba(255, 255, 255, 0.08);
  --bg-glass-dark: rgba(0, 0, 0, 0.8);
  
  /* Text Colors - Apple Style */
  --text-primary: #ffffff;
  --text-secondary: #f2f2f7;
  --text-tertiary: #8e8e93;
  --text-inverse: #000000;
  
  /* Apple's Signature Colors */
  --primary-blue: #007AFF;
  --primary-blue-dark: #0056CC;
  --secondary-blue: #5856D6;
  --accent-green: #34C759;
  --accent-orange: #FF9500;
  --accent-red: #FF3B30;
  --accent-purple: #AF52DE;
  --accent-pink: #FF2D92;
  
  /* Apple's Signature Gradients */
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #8B5CF6 100%);
  --gradient-secondary: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --gradient-accent: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
  --gradient-dark: linear-gradient(135deg, #000000 0%, #1c1c1e 50%, #2c2c2e 100%);
  
  /* Typography - Apple System Fonts */
  --font-primary: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
  --font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', monospace;
  
  /* Font Sizes - Apple Scale */
  --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-8xl: 6rem;      /* 96px */
  --text-9xl: 8rem;      /* 128px */
  
  /* Font Weights */
  --font-light: 300;
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-extrabold: 800;
  
  /* Spacing - Apple Scale */
  --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 */
  --space-40: 10rem;    /* 160px */
  --space-48: 12rem;    /* 192px */
  --space-56: 14rem;    /* 224px */
  --space-64: 16rem;    /* 256px */
  
  /* Border Radius */
  --radius-sm: 0.375rem;   /* 6px */
  --radius-md: 0.5rem;     /* 8px */
  --radius-lg: 0.75rem;    /* 12px */
  --radius-xl: 1rem;       /* 16px */
  --radius-2xl: 1.5rem;    /* 24px */
  --radius-3xl: 2rem;      /* 32px */
  --radius-full: 9999px;
  
  /* Shadows - Apple Style */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 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.4);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 10px 10px -5px rgba(0, 0, 0, 0.5);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
  --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.3);
  
  /* Transitions */
  --transition-fast: 150ms ease-out;
  --transition-normal: 300ms ease-out;
  --transition-slow: 500ms ease-out;
  --transition-bounce: 300ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
  
  /* Z-Index Scale */
  --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;
  
  /* Layout */
  --container-max-width: 1200px;
  --container-padding: var(--space-4);
  
  /* Enhanced Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.6);
}



/* ===== GLOBAL STYLES ===== */
html, body {
  scroll-behavior: smooth;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-primary);
  line-height: 1.6;
}

/* ===== UTILITY CLASSES ===== */
.apple-container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

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

.apple-section-large {
  padding: var(--space-48) 0;
}

.apple-section-small {
  padding: var(--space-20) 0;
}

/* ===== TYPOGRAPHY ===== */
.apple-text-display {
  font-family: var(--font-display);
  font-weight: var(--font-extrabold);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.apple-text-body {
  font-family: var(--font-primary);
  font-weight: var(--font-normal);
  line-height: 1.6;
}

.apple-text-caption {
  font-family: var(--font-primary);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--text-secondary);
}

/* ===== GLASSMORPHISM ===== */
.apple-glass {
  background: var(--glass-bg);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

/* ===== BUTTONS ===== */
.apple-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4) var(--space-8);
  font-family: var(--font-primary);
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  line-height: 1.5;
  border-radius: var(--radius-xl);
  border: none;
  cursor: pointer;
  transition: all var(--transition-normal);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  min-width: 140px;
}

.apple-btn-primary {
  background: var(--gradient-primary);
  color: var(--text-primary);
  box-shadow: var(--shadow-lg);
}

.apple-btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-xl);
}

.apple-btn-secondary {
  background: var(--glass-bg);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
}

.apple-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

/* ===== CARDS ===== */
.apple-card {
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-2xl);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  box-shadow: var(--glass-shadow);
  overflow: hidden;
  transition: all var(--transition-normal);
}

.apple-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
  border-color: rgba(255, 255, 255, 0.2);
}

/* ===== APPLE SCROLL ANIMATIONS ===== */
/* These classes are driven by apple-animations.js IntersectionObserver */

/* Scroll-triggered reveal classes (initial state set by JS) */
.apple-fade-in,
.apple-slide-up,
.apple-scale-in,
.apple-blur-in,
.apple-slide-left,
.apple-slide-right {
  will-change: opacity, transform, filter;
}

/* Text reveal words */
.apple-word {
  display: inline-block;
  will-change: opacity, transform;
}

/* Hero page-load animation elements */
.apple-hero-anim {
  will-change: opacity, transform;
}

/* Floating animation for decorative elements */
@keyframes appleFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.apple-float {
  animation: appleFloat 4s cubic-bezier(0.37, 0, 0.63, 1) infinite;
}

.apple-float-slow {
  animation: appleFloat 6s cubic-bezier(0.37, 0, 0.63, 1) infinite;
}

.apple-float-delay {
  animation: appleFloat 4s cubic-bezier(0.37, 0, 0.63, 1) infinite;
  animation-delay: -2s;
}

/* Subtle pulse glow — Apple product highlight style */
@keyframes appleGlow {
  0%, 100% { box-shadow: 0 0 20px rgba(102, 126, 234, 0.0); }
  50% { box-shadow: 0 0 40px rgba(102, 126, 234, 0.15); }
}

.apple-glow {
  animation: appleGlow 3s ease-in-out infinite;
}

/* Gradient text shimmer — like Apple's "Pro" text */
@keyframes appleShimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.apple-shimmer-text {
  background: linear-gradient(
    90deg,
    var(--text-primary) 0%,
    #667eea 25%,
    #764ba2 50%,
    #667eea 75%,
    var(--text-primary) 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: appleShimmer 4s linear infinite;
}

/* Smooth section divider line */
.apple-divider {
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.15) 50%,
    transparent
  );
  margin: var(--space-16) 0;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  .apple-fade-in,
  .apple-slide-up,
  .apple-scale-in,
  .apple-blur-in,
  .apple-slide-left,
  .apple-slide-right,
  .apple-word,
  .apple-hero-anim {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
    animation: none !important;
  }
  
  .apple-float,
  .apple-float-slow,
  .apple-float-delay,
  .apple-glow,
  .apple-shimmer-text {
    animation: none !important;
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .apple-section {
    padding: var(--space-20) 0;
  }
  
  .apple-section-large {
    padding: var(--space-32) 0;
  }
  
  .apple-container {
    padding: 0 var(--space-4);
  }
}

/* ===== SELECTION ===== */
::selection {
  background: var(--primary-blue);
  color: var(--text-primary);
}

::-moz-selection {
  background: var(--primary-blue);
  color: var(--text-primary);
}
