
/* ═══════════════════════════════════════════════════════════════════════════════
   CSS RESET & BASE
   ═══════════════════════════════════════════════════════════════════════════════ */
*, *::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;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   DESIGN TOKENS
   ═══════════════════════════════════════════════════════════════════════════════ */
:root {
  /* === Brand Colors === */
  --brand-primary: #6366F1;
  --brand-primary-hover: #818CF8;
  --brand-primary-active: #4F46E5;
  --brand-secondary: #8B5CF6;
  --brand-gradient: linear-gradient(135deg, #6366F1 0%, #8B5CF6 50%, #A855F7 100%);
  --brand-gradient-subtle: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);

  /* === Neutral Palette (Sophisticated Dark) === */
  --gray-950: #09090B;
  --gray-900: #0F0F12;
  --gray-850: #141418;
  --gray-800: #1A1A1F;
  --gray-700: #27272A;
  --gray-600: #3F3F46;
  --gray-500: #52525B;
  --gray-400: #71717A;
  --gray-300: #A1A1AA;
  --gray-200: #D4D4D8;
  --gray-100: #E4E4E7;
  --gray-50: #FAFAFA;

  /* === Semantic Colors === */
  --success: #22C55E;
  --success-muted: rgba(34, 197, 94, 0.15);
  --warning: #F59E0B;
  --warning-muted: rgba(245, 158, 11, 0.15);
  --error: #EF4444;
  --error-muted: rgba(239, 68, 68, 0.15);
  --info: #3B82F6;
  --info-muted: rgba(59, 130, 246, 0.15);

  /* === Surface Colors === */
  --surface-0: var(--gray-950);
  --surface-1: var(--gray-900);
  --surface-2: var(--gray-850);
  --surface-3: var(--gray-800);
  --surface-elevated: rgba(255, 255, 255, 0.03);
  --surface-overlay: rgba(0, 0, 0, 0.8);

  /* === Border Colors === */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-default: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.15);
  --border-focus: var(--brand-primary);

  /* === Text Colors === */
  --text-primary: rgba(255, 255, 255, 0.92);
  --text-secondary: rgba(255, 255, 255, 0.56);  /* Apple-grade secondary opacity */
  --text-tertiary: rgba(255, 255, 255, 0.40);   /* Muted tertiary for labels */
  --text-quaternary: rgba(255, 255, 255, 0.32); /* Ultra-muted for placeholders */
  --text-inverse: var(--gray-950);
  --text-brand: var(--brand-primary);

  /* === Typography === */
  --font-sans: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display', 'Inter', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'SF Mono', 'JetBrains Mono', 'Fira Code', monospace;
  --font-display: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', var(--font-sans);

  /* Font Sizes - Apple-Grade Fluid Scale (320px to 1536px viewport) */
  --text-xs: clamp(0.6875rem, 0.6711rem + 0.0822vw, 0.75rem);      /* 11px -> 12px */
  --text-sm: clamp(0.8125rem, 0.7961rem + 0.0822vw, 0.875rem);     /* 13px -> 14px */
  --text-base: 1.0625rem;                                           /* 17px — Apple's body text */
  --text-lg: clamp(1.125rem, 1.0921rem + 0.1645vw, 1.25rem);       /* 18px -> 20px */
  --text-xl: clamp(1.25rem, 1.2171rem + 0.1645vw, 1.375rem);       /* 20px -> 22px */
  --text-2xl: clamp(1.375rem, 1.2763rem + 0.4934vw, 1.75rem);      /* 22px -> 28px */
  --text-3xl: clamp(1.75rem, 1.6184rem + 0.6579vw, 2.25rem);       /* 28px -> 36px */
  --text-4xl: clamp(2rem, 1.8026rem + 0.9868vw, 2.75rem);          /* 32px -> 44px */
  --text-5xl: clamp(2.5rem, 2.1711rem + 1.6447vw, 3.75rem);        /* 40px -> 60px */
  --text-6xl: clamp(3rem, 2.6053rem + 1.9737vw, 4.5rem);           /* 48px -> 72px */
  --text-7xl: clamp(3.5rem, 2.9737rem + 2.6316vw, 5.5rem);         /* 56px -> 88px */
  --text-8xl: clamp(4.5rem, 3.8421rem + 3.2895vw, 7rem);           /* 72px -> 112px */
}

/* === Light Theme Overrides === */
:root.light-mode {
  /* Neutral Palette Inverted */
  --gray-950: #FAFAFA;
  --gray-900: #F4F4F5;
  --gray-850: #E4E4E7;
  --gray-800: #D4D4D8;
  --gray-700: #A1A1AA;
  --gray-600: #71717A;
  --gray-500: #52525B;
  --gray-400: #3F3F46;
  --gray-300: #27272A;
  --gray-200: #18181B;
  --gray-100: #09090B;
  --gray-50: #000000;

  /* Surface Colors */
  --surface-0: #FAFAFA;
  --surface-1: #F4F4F5;
  --surface-2: #E4E4E7;
  --surface-3: #D4D4D8;
  --surface-elevated: rgba(0, 0, 0, 0.04);
  --surface-overlay: rgba(255, 255, 255, 0.85);

  /* Border Colors */
  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-default: rgba(0, 0, 0, 0.15);
  --border-strong: rgba(0, 0, 0, 0.25);

  /* Text Colors — Apple-grade */
  --text-primary: #1d1d1f;                                /* Apple's near-black */
  --text-secondary: rgba(0, 0, 0, 0.56);                  /* Apple secondary opacity */
  --text-tertiary: rgba(0, 0, 0, 0.44);                   /* Apple tertiary */
  --text-quaternary: rgba(0, 0, 0, 0.32);                  /* Placeholder text */
  --text-inverse: #FFFFFF;
}

:root {
  /* Font Weights */
  --font-light: 300;
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-extrabold: 800;

  /* Line Heights — Apple-grade precision */
  --leading-none: 1;
  --leading-tight: 1.07;  /* Display/hero headings */
  --leading-snug: 1.2;   /* Section headings */
  --leading-normal: 1.47; /* Apple's body text: 25px/17px */
  --leading-relaxed: 1.58; /* Long-form body text */

  /* Letter Spacing — Apple's negative tracking */
  --tracking-tighter: -0.05em;
  --tracking-tight: -0.022em;   /* Apple body tracking */
  --tracking-display: -0.015em; /* Display headings */
  --tracking-normal: 0;
  --tracking-wide: 0.025em;
  --tracking-wider: 0.05em;

  /* === Spacing (4px base) === */
  /* Static micro-spacing */
  --space-0: 0;
  --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 */

  /* Fluid macro-spacing */
  --space-8: clamp(1.5rem, 1.3684rem + 0.6579vw, 2rem);      /* 24px -> 32px */
  --space-10: clamp(1.75rem, 1.5526rem + 0.9868vw, 2.5rem);  /* 28px -> 40px */
  --space-12: clamp(2rem, 1.7368rem + 1.3158vw, 3rem);       /* 32px -> 48px */
  --space-16: clamp(2.5rem, 2.1053rem + 1.9737vw, 4rem);     /* 40px -> 64px */
  --space-20: clamp(3rem, 2.4737rem + 2.6316vw, 5rem);       /* 48px -> 80px */
  --space-24: clamp(3.5rem, 2.8421rem + 3.2895vw, 6rem);     /* 56px -> 96px */
  --space-32: clamp(4.5rem, 3.5789rem + 4.6053vw, 8rem);     /* 72px -> 128px */
  --space-40: clamp(5.5rem, 4.3158rem + 5.9211vw, 10rem);    /* 88px -> 160px */

  /* === Border Radius === */
  --radius-none: 0;
  --radius-sm: 0.25rem;   /* 4px */
  --radius-md: 0.375rem;  /* 6px */
  --radius-lg: 0.5rem;    /* 8px */
  --radius-xl: 0.75rem;   /* 12px */
  --radius-2xl: 1rem;     /* 16px */
  --radius-3xl: 1.5rem;   /* 24px */
  --radius-full: 9999px;

  /* === Shadows === */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.24), 0 2px 4px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.32), 0 4px 8px rgba(0, 0, 0, 0.16);
  --shadow-xl: 0 16px 32px rgba(0, 0, 0, 0.4), 0 8px 16px rgba(0, 0, 0, 0.24);
  --shadow-2xl: 0 24px 48px rgba(0, 0, 0, 0.5);
  --shadow-glow-sm: 0 0 16px rgba(99, 102, 241, 0.2);
  --shadow-glow-md: 0 0 32px rgba(99, 102, 241, 0.3);
  --shadow-glow-lg: 0 0 64px rgba(99, 102, 241, 0.4);

  /* === Transitions — Apple-grade === */
  --duration-instant: 0ms;
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 350ms;
  --duration-slower: 500ms;
  --duration-reveal: 800ms;
  --ease-default: cubic-bezier(0.25, 0.1, 0.25, 1); /* Apple standard */
  --ease-in: cubic-bezier(0.42, 0, 1, 1);
  --ease-out: cubic-bezier(0, 0, 0.58, 1);
  --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --ease-spring: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-expressive: cubic-bezier(0.87, 0, 0.13, 1);

  /* === Z-Index Scale === */
  --z-base: 0;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 300;
  --z-modal-backdrop: 400;
  --z-modal: 500;
  --z-popover: 600;
  --z-tooltip: 700;
  --z-notification: 800;

  /* === Layout === */
  --max-width-xs: 320px;
  --max-width-sm: 640px;
  --max-width-md: 768px;
  --max-width-lg: 1024px;
  --max-width-xl: 1280px;
  --max-width-2xl: 1440px;
  --max-width-content: 720px;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   LIGHT MODE
   ═══════════════════════════════════════════════════════════════════════════════ */
html.light-mode {
  /* === Surface Colors — Apple Palette === */
  --surface-0: #ffffff;     /* Pure white — Apple's primary */
  --surface-1: #f5f5f7;     /* Apple's signature gray */
  --surface-2: #e8e8ed;     /* Slightly deeper */
  --surface-3: #d2d2d7;
  --surface-elevated: rgba(0, 0, 0, 0.02);
  --surface-overlay: rgba(255, 255, 255, 0.92);

  /* === Border Colors — Apple ultra-subtle === */
  --border-subtle: rgba(0, 0, 0, 0.04);
  --border-default: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.12);

  /* === Text Colors — Apple-grade === */
  --text-primary: #1d1d1f;                                /* Apple's near-black */
  --text-secondary: rgba(0, 0, 0, 0.56);                  /* Apple secondary */
  --text-tertiary: rgba(0, 0, 0, 0.44);                   /* Apple tertiary */
  --text-quaternary: rgba(0, 0, 0, 0.32);                  /* Placeholder */
  --text-inverse: #ffffff;

  /* === Shadows (Apple-subtle for light mode) === */
  --shadow-xs: 0 1px 1px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 16px 32px rgba(0, 0, 0, 0.1), 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-2xl: 0 24px 48px rgba(0, 0, 0, 0.14);
}

/* Theme transition for smooth switching */
html, body,
.enterprise-header::before,
.btn, .card, .nav-link, .dropdown-item,
.mobile-nav, input, select, textarea,
.toast, .badge {
  transition: background-color var(--duration-normal),
              color var(--duration-normal),
              border-color var(--duration-normal),
              box-shadow var(--duration-normal);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   BASE STYLES
   ═══════════════════════════════════════════════════════════════════════════════ */
body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  letter-spacing: var(--tracking-tight);
  color: var(--text-primary);
  background: var(--surface-0);
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
  font-optical-sizing: auto;
}

/* === Typography Base === */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--font-semibold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-display);
}

h1 { font-size: var(--text-5xl); font-weight: var(--font-bold); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

p {
  color: var(--text-secondary);
  line-height: var(--leading-normal);
  letter-spacing: var(--tracking-tight);
  font-weight: var(--font-normal);
}

/* === Shared Section Typography === */
.section-subtitle {
  font-size: var(--text-lg);
  font-weight: var(--font-normal);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
  letter-spacing: -0.011em;
  max-width: 640px;
}

.section-desc {
  font-size: var(--text-lg);
  font-weight: var(--font-normal);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
  letter-spacing: -0.011em;
}

a {
  color: var(--text-brand);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-default);
}

a:hover {
  color: var(--brand-primary-hover);
}

/* === Focus States === */
:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
}

/* === Selection === */
::selection {
  background: rgba(99, 102, 241, 0.3);
  color: var(--text-primary);
}

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

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

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

.section {
  padding: var(--space-24) 0;
  content-visibility: auto;
  contain-intrinsic-size: auto 600px;
}

@media (min-width: 768px) {
  .section { padding: var(--space-32) 0; }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  line-height: 1;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-default);
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Primary Button */
.btn-primary {
  background: var(--brand-gradient);
  color: white;
  border-color: transparent;
  box-shadow: var(--shadow-sm), var(--shadow-glow-sm);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md), var(--shadow-glow-md);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

/* Secondary Button */
.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

html.light-mode .btn-secondary {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.15);
}

html.light-mode .btn-secondary:hover:not(:disabled) {
  background: rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 0, 0, 0.25);
}

/* Ghost Button */
.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-ghost:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  color: var(--text-primary);
  transform: translateY(-1px);
}

html.light-mode .btn-ghost {
  background: rgba(0, 0, 0, 0.03);
  color: var(--text-primary);
  border-color: rgba(0, 0, 0, 0.1);
}

html.light-mode .btn-ghost:hover:not(:disabled) {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.2);
}

/* Size Variants */
.btn-sm {
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-xs);
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-base);
  border-radius: var(--radius-xl);
}

.btn-xl {
  padding: var(--space-5) var(--space-10);
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  border-radius: var(--radius-xl);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   CARDS
   ═══════════════════════════════════════════════════════════════════════════════ */
.card {
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-2xl);
  padding: var(--space-6);
  transition: all var(--duration-normal) var(--ease-default);
  contain: layout style;
}

.card:hover {
  border-color: var(--border-default);
  box-shadow: var(--shadow-lg);
}

.card-elevated {
  background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface-1) 100%);
  box-shadow: var(--shadow-md);
}

.card-interactive {
  cursor: pointer;
}

.card-interactive:hover {
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: var(--shadow-xl), var(--shadow-glow-sm);
}

.card-interactive:active {
  transform: translateY(-2px);
}


/* ═══════════════════════════════════════════════════════════════════════════════
   FOCUS STATES (Accessibility)
   ═══════════════════════════════════════════════════════════════════════════════ */

/* Modern focus-visible ring */
:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
}

/* Remove default outline for mouse users */
:focus:not(:focus-visible) {
  outline: none;
}

/* Button-specific focus */
.btn:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
}

/* Input focus enhancements */
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   BUTTON RIPPLE EFFECT
   ═══════════════════════════════════════════════════════════════════════════════ */
.btn {
  position: relative;
  overflow: hidden;
}

.btn .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: scale(0);
  animation: rippleEffect 0.6s ease-out;
  pointer-events: none;
}

@keyframes rippleEffect {
  to {
    transform: scale(4);
    opacity: 0;
  }
}


/* ═══════════════════════════════════════════════════════════════════════════════
   FORM INPUTS
   ═══════════════════════════════════════════════════════════════════════════════ */
.input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  color: var(--text-primary);
  background: var(--surface-2);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  transition: all var(--duration-fast) var(--ease-default);
}

.input::placeholder {
  color: var(--text-quaternary);
}

.input:hover {
  border-color: var(--border-strong);
}

.input:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* Input Error State */
.input-error {
  border-color: var(--error);
}

.input-error:focus {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

/* Input Success State */
.input-success {
  border-color: var(--success);
}

.input-success:focus {
  border-color: var(--success);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}

/* Form Field Error Message */
.field-error {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  color: var(--error);
}

.field-error::before {
  content: '';
  width: 16px;
  height: 16px;
  background: var(--error);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' y1='8' x2='12' y2='12'/%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* Form Field Hint */
.field-hint {
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  color: var(--text-quaternary);
}

.label {
  display: block;
  margin-bottom: var(--space-2);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--text-secondary);
}

/* Required Field Indicator */
.label-required::after {
  content: ' *';
  color: var(--error);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   BADGES
   ═══════════════════════════════════════════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  border-radius: var(--radius-full);
  background: var(--surface-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.badge-primary {
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border-color: rgba(99, 102, 241, 0.3);
}

.badge-success {
  background: var(--success-muted);
  color: #4ade80;
  border-color: rgba(34, 197, 94, 0.3);
}

.badge-warning {
  background: var(--warning-muted);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.3);
}

.badge-error {
  background: var(--error-muted);
  color: var(--error);
  border-color: rgba(239, 68, 68, 0.3);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════════════════════════ */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translate3d(0, 20px, 0);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    filter: blur(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translate3d(0, -16px, 0);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    filter: blur(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.96);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translate3d(20px, 0, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes blurFadeIn {
  from {
    opacity: 0;
    filter: blur(12px);
    transform: scale(0.98);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: scale(1);
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translate3d(0, 40px, 0);
  }
  60% {
    transform: translate3d(0, -4px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes elasticScale {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  60% {
    transform: scale(1.02);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes gradientShift {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

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

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

@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
  }
  50% {
    box-shadow: 0 0 40px rgba(99, 102, 241, 0.5);
  }
}

.animate-fade-in { animation: fadeIn var(--duration-slower) var(--ease-smooth) both; }
.animate-fade-in-up { animation: fadeInUp var(--duration-reveal) var(--ease-spring) both; }
.animate-fade-in-down { animation: fadeInDown var(--duration-reveal) var(--ease-spring) both; }
.animate-scale-in { animation: scaleIn var(--duration-slower) var(--ease-spring) both; }
.animate-slide-in-right { animation: slideInRight var(--duration-slower) var(--ease-spring) both; }
.animate-blur-in { animation: blurFadeIn var(--duration-reveal) var(--ease-smooth) both; }
.animate-slide-up { animation: slideUp 0.8s var(--ease-spring) both; }
.animate-elastic { animation: elasticScale 0.6s var(--ease-spring) both; }
.animate-pulse { animation: pulse 2s var(--ease-default) infinite; }
.animate-float { animation: float 4s var(--ease-smooth) infinite; }
.animate-glow { animation: glow 3s var(--ease-smooth) infinite; }

/* Staggered animations */
.stagger-1 { animation-delay: 50ms; }
.stagger-2 { animation-delay: 100ms; }
.stagger-3 { animation-delay: 150ms; }
.stagger-4 { animation-delay: 200ms; }
.stagger-5 { animation-delay: 250ms; }
.stagger-6 { animation-delay: 300ms; }


/* ═══════════════════════════════════════════════════════════════════════════════
   PAGE TRANSITIONS
   ═══════════════════════════════════════════════════════════════════════════════ */

/* Page enter animation */
.page-enter {
  animation: pageEnter 0.4s var(--ease-out);
}

@keyframes pageEnter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scroll reveal - initially hidden, GPU-accelerated */
.reveal {
  opacity: 0;
  transform: translate3d(0, 24px, 0);
  filter: blur(4px);
  transition: opacity 0.8s var(--ease-spring),
              transform 0.8s var(--ease-spring),
              filter 0.8s var(--ease-spring);
  will-change: opacity, transform, filter;
}

.reveal.visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  filter: blur(0);
}

.reveal-left {
  opacity: 0;
  transform: translate3d(-24px, 0, 0);
  filter: blur(4px);
  transition: opacity 0.8s var(--ease-spring),
              transform 0.8s var(--ease-spring),
              filter 0.8s var(--ease-spring);
  will-change: opacity, transform, filter;
}

.reveal-left.visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  filter: blur(0);
}

.reveal-right {
  opacity: 0;
  transform: translate3d(24px, 0, 0);
  filter: blur(4px);
  transition: opacity 0.8s var(--ease-spring),
              transform 0.8s var(--ease-spring),
              filter 0.8s var(--ease-spring);
  will-change: opacity, transform, filter;
}

.reveal-right.visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  filter: blur(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.96);
  filter: blur(4px);
  transition: opacity 0.8s var(--ease-spring),
              transform 0.8s var(--ease-spring),
              filter 0.8s var(--ease-spring);
  will-change: opacity, transform, filter;
}

.reveal-scale.visible {
  opacity: 1;
  transform: scale(1);
  filter: blur(0);
}

/* Staggered reveal delays */
.reveal-delay-1 { transition-delay: 80ms; }
.reveal-delay-2 { transition-delay: 160ms; }
.reveal-delay-3 { transition-delay: 240ms; }
.reveal-delay-4 { transition-delay: 320ms; }
.reveal-delay-5 { transition-delay: 400ms; }
.reveal-delay-6 { transition-delay: 480ms; }
.reveal-delay-7 { transition-delay: 560ms; }
.reveal-delay-8 { transition-delay: 640ms; }

/* Parallax effect */
.parallax {
  transform: translateY(calc(var(--scroll-y, 0) * 0.3));
  transition: transform 0.1s linear;
}

/* Counter animation */
.counter {
  display: inline-block;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   LOADING STATES & SKELETONS
   ═══════════════════════════════════════════════════════════════════════════════ */

/* Spinner */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-default);
  border-top-color: var(--brand-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.spinner-lg {
  width: 32px;
  height: 32px;
  border-width: 3px;
}

.spinner-xl {
  width: 48px;
  height: 48px;
  border-width: 4px;
}

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

/* Skeleton Loading */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--surface-2) 0%,
    var(--surface-3) 50%,
    var(--surface-2) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-md);
}

.skeleton-text {
  height: 1em;
  margin-bottom: var(--space-2);
}

.skeleton-title {
  height: 1.5em;
  width: 60%;
  margin-bottom: var(--space-3);
}

.skeleton-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.skeleton-button {
  height: 40px;
  width: 120px;
  border-radius: var(--radius-lg);
}

.skeleton-card {
  height: 200px;
  border-radius: var(--radius-xl);
}

/* Loading Overlay */
.loading-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(9, 9, 11, 0.8);
  backdrop-filter: blur(4px);
  border-radius: inherit;
  z-index: 10;
}

/* Button Loading State */
.btn-loading {
  position: relative;
  color: transparent;
  pointer-events: none;
}

.btn-loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   TOAST NOTIFICATIONS
   ═══════════════════════════════════════════════════════════════════════════════ */

/* Toast Container */
.toast-container {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  z-index: var(--z-notification);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  pointer-events: none;
}

@media (max-width: 640px) {
  .toast-container {
    left: var(--space-4);
    right: var(--space-4);
    bottom: var(--space-4);
  }
}

/* Individual Toast */
.toast {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--surface-2);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  pointer-events: auto;
  animation: toastIn 0.3s var(--ease-out);
  max-width: 400px;
}

.toast.hide {
  animation: toastOut 0.2s var(--ease-in) forwards;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toastOut {
  to {
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
  }
}

/* Toast Icon */
.toast-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.toast-success .toast-icon {
  background: var(--success-muted);
  color: var(--success);
}

.toast-error .toast-icon {
  background: var(--error-muted);
  color: var(--error);
}

.toast-warning .toast-icon {
  background: var(--warning-muted);
  color: var(--warning);
}

.toast-info .toast-icon {
  background: var(--info-muted);
  color: var(--info);
}

/* Toast Content */
.toast-content {
  flex: 1;
  min-width: 0;
}

.toast-title {
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}

.toast-message {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: var(--leading-snug);
}

/* Toast Close */
.toast-close {
  flex-shrink: 0;
  padding: var(--space-1);
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--duration-fast);
}

.toast-close:hover {
  background: var(--surface-elevated);
  color: var(--text-primary);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   UTILITY CLASSES
   ═══════════════════════════════════════════════════════════════════════════════ */

/* Text Utilities */
.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-tertiary { color: var(--text-tertiary); }
.text-brand { color: var(--brand-primary); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-error { color: var(--error); }

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

/* Background Utilities */
.bg-surface-0 { background: var(--surface-0); }
.bg-surface-1 { background: var(--surface-1); }
.bg-surface-2 { background: var(--surface-2); }
.bg-gradient { background: var(--brand-gradient); }

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

/* Grid Utilities */
.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
  .lg\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
}

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

/* Spacing Utilities */
.m-0 { margin: 0; }
.mt-4 { margin-top: var(--space-4); }
.mt-8 { margin-top: var(--space-8); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-8 { margin-bottom: var(--space-8); }

.p-4 { padding: var(--space-4); }
.p-6 { padding: var(--space-6); }
.p-8 { padding: var(--space-8); }

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

/* Width/Height */
.w-full { width: 100%; }
.max-w-content { max-width: var(--max-width-content); }
.mx-auto { margin-left: auto; margin-right: auto; }

/* Visibility */
.hidden { display: none; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   BACKGROUND EFFECTS
   ═══════════════════════════════════════════════════════════════════════════════ */
.bg-pattern {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.bg-pattern::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99, 102, 241, 0.15), transparent),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(139, 92, 246, 0.1), transparent),
    radial-gradient(ellipse 40% 40% at 0% 100%, rgba(99, 102, 241, 0.08), transparent);
}

.bg-pattern::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 50% at 50% 0%, black, transparent);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   PREMIUM VISUAL EFFECTS v2.0
   ═══════════════════════════════════════════════════════════════════════════════ */

/* --- Animated Gradient Border --- */
.gradient-border {
  position: relative;
  background: var(--surface-1);
  z-index: 0;
}

.gradient-border::before {
  content: '';
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(135deg, #6366f1, #8b5cf6, #ec4899, #6366f1);
  background-size: 300% 300%;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-default);
  animation: gradientRotate 4s linear infinite;
  z-index: -1;
}

.gradient-border:hover::before {
  opacity: 1;
}

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

/* --- Text Shimmer Effect --- */
.text-shimmer {
  background: linear-gradient(
    120deg,
    var(--text-primary) 0%,
    var(--text-primary) 40%,
    rgba(99, 102, 241, 0.9) 50%,
    var(--text-primary) 60%,
    var(--text-primary) 100%
  );
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: textShimmer 12s ease-in-out infinite;
}

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

/* --- Aurora Glow Background --- */
.aurora-glow {
  position: relative;
  overflow: hidden;
}

.aurora-glow::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(
    from 0deg at 50% 50%,
    rgba(99, 102, 241, 0.08) 0deg,
    rgba(139, 92, 246, 0.12) 60deg,
    rgba(236, 72, 153, 0.06) 120deg,
    rgba(59, 130, 246, 0.08) 180deg,
    rgba(99, 102, 241, 0.12) 240deg,
    rgba(168, 85, 247, 0.06) 300deg,
    rgba(99, 102, 241, 0.08) 360deg
  );
  animation: auroraRotate 20s linear infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes auroraRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* --- Premium Glass Card --- */
.card-glass-premium {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.06) 0%,
    rgba(255, 255, 255, 0.02) 100%
  );
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
}

.card-glass-premium::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle at var(--mouse-x, 50%) var(--mouse-y, 0%),
    rgba(99, 102, 241, 0.08) 0%,
    transparent 50%
  );
  pointer-events: none;
  transition: opacity 0.4s;
  opacity: 0;
}

.card-glass-premium:hover::after {
  opacity: 1;
}

/* --- Inner Shine on Hover --- */
.inner-shine {
  position: relative;
  overflow: hidden;
}

.inner-shine::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.04),
    transparent
  );
  transition: none;
  pointer-events: none;
}

.inner-shine:hover::after {
  animation: innerShinePass 0.6s ease-out;
}

@keyframes innerShinePass {
  from { left: -50%; }
  to { left: 150%; }
}

/* --- Marquee / Auto-scroll --- */
.marquee-container {
  overflow: hidden;
  position: relative;
}

.marquee-container::before,
.marquee-container::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 80px;
  z-index: 2;
  pointer-events: none;
}

.marquee-container::before {
  left: 0;
  background: linear-gradient(90deg, var(--surface-0), transparent);
}

.marquee-container::after {
  right: 0;
  background: linear-gradient(270deg, var(--surface-0), transparent);
}

.marquee-track {
  display: flex;
  gap: var(--space-8);
  animation: marqueeScroll 30s linear infinite;
  width: max-content;
}

@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* --- Noise Texture Overlay --- */
.noise-overlay {
  position: relative;
}

.noise-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 128px;
  pointer-events: none;
  z-index: 0;
  border-radius: inherit;
}

/* --- Glitch Text Effect --- */
.glitch-text {
  position: relative;
  animation: glitchShift 3s ease-in-out infinite;
}

.glitch-text::before,
.glitch-text::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.glitch-text::before {
  color: #ff6b6b;
  animation: glitchLeft 2s ease-in-out infinite;
  clip-path: polygon(0 0, 100% 0, 100% 33%, 0 33%);
}

.glitch-text::after {
  color: #4ecdc4;
  animation: glitchRight 2s ease-in-out infinite;
  clip-path: polygon(0 66%, 100% 66%, 100% 100%, 0 100%);
}

@keyframes glitchShift {
  0%, 100% { transform: translate(0); }
  5% { transform: translate(-2px, 1px); }
  10% { transform: translate(2px, -1px); }
  15% { transform: translate(0); }
}

@keyframes glitchLeft {
  0%, 100% { transform: translate(0); }
  5% { transform: translate(-3px, 0); }
  10% { transform: translate(3px, 0); }
  15% { transform: translate(0); }
}

@keyframes glitchRight {
  0%, 100% { transform: translate(0); }
  5% { transform: translate(3px, 0); }
  10% { transform: translate(-3px, 0); }
  15% { transform: translate(0); }
}

/* --- Floating Particles (CSS-only) --- */
.particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.particle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: rgba(99, 102, 241, 0.4);
  border-radius: 50%;
  animation: particleFloat linear infinite;
}

.particle:nth-child(1) { left: 10%; animation-duration: 18s; animation-delay: 0s; width: 2px; height: 2px; }
.particle:nth-child(2) { left: 25%; animation-duration: 22s; animation-delay: -4s; }
.particle:nth-child(3) { left: 40%; animation-duration: 16s; animation-delay: -8s; width: 4px; height: 4px; opacity: 0.6; }
.particle:nth-child(4) { left: 55%; animation-duration: 24s; animation-delay: -2s; width: 2px; height: 2px; }
.particle:nth-child(5) { left: 70%; animation-duration: 20s; animation-delay: -6s; }
.particle:nth-child(6) { left: 85%; animation-duration: 19s; animation-delay: -10s; width: 4px; height: 4px; opacity: 0.5; }
.particle:nth-child(7) { left: 15%; animation-duration: 25s; animation-delay: -12s; width: 2px; height: 2px; }
.particle:nth-child(8) { left: 60%; animation-duration: 21s; animation-delay: -3s; }
.particle:nth-child(9) { left: 35%; animation-duration: 17s; animation-delay: -7s; width: 3px; height: 3px; }
.particle:nth-child(10) { left: 80%; animation-duration: 23s; animation-delay: -5s; width: 2px; height: 2px; }

@keyframes particleFloat {
  0% {
    transform: translateY(100vh) translateX(0) scale(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
    transform: translateY(80vh) translateX(10px) scale(1);
  }
  90% {
    opacity: 0.6;
    transform: translateY(10vh) translateX(-10px) scale(0.8);
  }
  100% {
    opacity: 0;
    transform: translateY(-10vh) translateX(0) scale(0);
  }
}

/* --- Animated Dashed Connector --- */
.connector-animated {
  stroke-dasharray: 6 4;
  stroke-dashoffset: 20;
  animation: connectorDash 1.5s linear infinite;
}

@keyframes connectorDash {
  to { stroke-dashoffset: 0; }
}



/* --- Pulsing Border --- */
.pulse-border {
  position: relative;
  animation: pulseBorder 3s ease-in-out infinite;
}

@keyframes pulseBorder {
  0%, 100% {
    border-color: rgba(99, 102, 241, 0.2);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.1), inset 0 0 10px rgba(99, 102, 241, 0.05);
  }
  50% {
    border-color: rgba(99, 102, 241, 0.6);
    box-shadow: 0 0 40px rgba(99, 102, 241, 0.3), inset 0 0 20px rgba(99, 102, 241, 0.15);
  }
}



/* --- Cursor Glow --- */
.cursor-glow {
  position: fixed;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s;
  will-change: transform;
}

/* --- Hover Tilt 3D --- */
.hover-tilt {
  transition: transform var(--duration-normal) var(--ease-spring);
  transform-style: preserve-3d;
  perspective: 800px;
}

.hover-tilt:hover {
  transform: perspective(800px) rotateX(2deg) rotateY(-2deg) translateZ(10px);
}

/* --- Gradient Sweep Divider --- */
.gradient-sweep-divider {
  position: relative;
  height: 1px;
  background: var(--border-subtle);
  overflow: hidden;
}

.gradient-sweep-divider::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 80px;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--brand-primary), transparent);
  animation: sweepDivider 4s ease-in-out infinite;
}

@keyframes sweepDivider {
  0% { left: -10%; }
  100% { left: 110%; }
}

/* --- Social Hover Glow --- */
.social-glow:hover {
  box-shadow: 0 0 20px var(--social-color, rgba(99, 102, 241, 0.4));
  border-color: var(--social-color, var(--brand-primary));
}

/* --- Floating Label Input --- */
.floating-field {
  position: relative;
}

.floating-field input,
.floating-field textarea {
  width: 100%;
  padding: var(--space-5) var(--space-4) var(--space-2);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  color: var(--text-primary);
  background: var(--surface-2);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  transition: all var(--duration-fast) var(--ease-default);
  outline: none;
}

.floating-field label {
  position: absolute;
  top: 50%;
  left: var(--space-4);
  transform: translateY(-50%);
  font-size: var(--text-sm);
  color: var(--text-quaternary);
  pointer-events: none;
  transition: all var(--duration-fast) var(--ease-default);
}

.floating-field textarea ~ label {
  top: var(--space-4);
  transform: none;
}

.floating-field input:focus,
.floating-field textarea:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.floating-field input:focus ~ label,
.floating-field input:not(:placeholder-shown) ~ label,
.floating-field textarea:focus ~ label,
.floating-field textarea:not(:placeholder-shown) ~ label {
  top: var(--space-2);
  transform: none;
  font-size: var(--text-xs);
  color: var(--brand-primary);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   RESPONSIVE BREAKPOINTS REFERENCE
   ═══════════════════════════════════════════════════════════════════════════════
   sm: 640px   - Small tablets
   md: 768px   - Tablets
   lg: 1024px  - Laptops
   xl: 1280px  - Desktops
   2xl: 1440px - Large screens
   ═══════════════════════════════════════════════════════════════════════════════ */
/* ═══════════════════════════════════════════════════════════════════════════════
   SCROLL REVEAL ANIMATIONS
   ═══════════════════════════════════════════════════════════════════════════════ */

/* Base reveal – fade up */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--duration-reveal, 700ms) var(--ease-out, cubic-bezier(0, 0, 0.2, 1)),
              transform var(--duration-reveal, 700ms) var(--ease-out, cubic-bezier(0, 0, 0.2, 1));
  will-change: opacity, transform;
}

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

/* Reveal from left */
.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity var(--duration-reveal, 700ms) var(--ease-out, cubic-bezier(0, 0, 0.2, 1)),
              transform var(--duration-reveal, 700ms) var(--ease-out, cubic-bezier(0, 0, 0.2, 1));
  will-change: opacity, transform;
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Reveal from right */
.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity var(--duration-reveal, 700ms) var(--ease-out, cubic-bezier(0, 0, 0.2, 1)),
              transform var(--duration-reveal, 700ms) var(--ease-out, cubic-bezier(0, 0, 0.2, 1));
  will-change: opacity, transform;
}

.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Reveal scale */
.reveal-scale {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity var(--duration-reveal, 700ms) var(--ease-out, cubic-bezier(0, 0, 0.2, 1)),
              transform var(--duration-reveal, 700ms) var(--ease-out, cubic-bezier(0, 0, 0.2, 1));
  will-change: opacity, transform;
}

.reveal-scale.visible {
  opacity: 1;
  transform: scale(1);
}

/* Staggered delay classes */
.reveal-delay-1 { transition-delay: 80ms; }
.reveal-delay-2 { transition-delay: 160ms; }
.reveal-delay-3 { transition-delay: 240ms; }
.reveal-delay-4 { transition-delay: 320ms; }
.reveal-delay-5 { transition-delay: 400ms; }
.reveal-delay-6 { transition-delay: 480ms; }
.reveal-delay-7 { transition-delay: 560ms; }
.reveal-delay-8 { transition-delay: 640ms; }

/* CSS-only fallback: auto-reveal after 1.5s if JS never fires */
@keyframes autoReveal {
  to {
    opacity: 1;
    transform: none;
  }
}

.reveal, .reveal-left, .reveal-right, .reveal-scale {
  animation: autoReveal 0s 1.5s forwards;
}

.reveal.visible, .reveal-left.visible, .reveal-right.visible, .reveal-scale.visible {
  animation: none;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-left, .reveal-right, .reveal-scale {
    opacity: 1;
    transform: none;
    transition: none;
    animation: none;
  }
}

/* Page enter animation */
.page-enter {
  animation: pageEnter 0.4s ease-out both;
}

@keyframes pageEnter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* ═══════════════════════════════════════════════════════════════════════════════
   MAGNETIC BUTTONS
   ═══════════════════════════════════════════════════════════════════════════════ */

.magnetic {
  display: inline-flex;
  position: relative;
  /* Faster snap when moving, springy when letting go */
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  will-change: transform;
}

.magnetic.is-magnetized {
  transition: transform 0.1s linear;
}

.magnetic-content {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: inherit;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  will-change: transform;
  pointer-events: none; /* Let the parent handle the hover */
}

.magnetic.is-magnetized .magnetic-content {
  transition: transform 0.1s linear;
}


/* ═══════════════════════════════════════════════════════════════════════════════
   PREMIUM TOOLTIP
   ═══════════════════════════════════════════════════════════════════════════════ */

.premium-tooltip {
  position: fixed;
  z-index: 100000;
  pointer-events: none;
  padding: 6px 12px;
  background: rgba(24, 24, 27, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  opacity: 0;
  transform: scale(0.9) translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  will-change: transform, opacity;
}

.premium-tooltip.visible {
  opacity: 1;
  transform: scale(1) translateY(0);
}

