@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;1,300&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --primary-blue: #2563EB;
  --primary-blue-dark: #1D4ED8;
  --primary-blue-light: #3B82F6;
  --secondary-green: #10B981;
  --secondary-green-dark: #059669;
  --secondary-green-light: #34D399;
  --accent-purple: #7C3AED;
  --accent-purple-dark: #6D28D9;
  --accent-purple-light: #8B5CF6;
  --warning-amber: #F59E0B;
  --danger-red: #EF4444;
  --danger-red-dark: #DC2626;
  --success-green: #10B981;
  --info-blue: #3B82F6;
  --bg-primary: #F8FAFC;
  --bg-secondary: #F1F5F9;
  --bg-surface: #FFFFFF;
  --bg-dark: #0F172A;
  --text-primary: #1E293B;
  --text-secondary: #64748B;
  --text-muted: #94A3B8;
  --text-inverse: #FFFFFF;
  --border-light: #E2E8F0;
  --border-medium: #CBD5E1;
  --border-dark: #94A3B8;
  --shadow-sm: 0 1px 2px 0 rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1),0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1),0 4px 6px -2px rgba(0,0,0,0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1),0 10px 10px -5px rgba(0,0,0,0.04);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Space Grotesk', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;
  --transition-fast: 150ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 500ms ease;
  --z-dropdown: 100;
  --z-modal: 1000;
  --z-tooltip: 1100;
  --z-intro: 9999;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-family);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.2;
  font-weight: 600;
}

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

/* ===== INTRO ANIMATION ===== */
.intro-overlay {
  position: fixed;
  inset: 0;
  background: #0F172A;
  z-index: var(--z-intro);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.intro-particle {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: white;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  box-shadow: 0 0 20px rgba(255,255,255,0.8);
}

.intro-mesh {
  position: absolute;
  width: 300px;
  height: 300px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 1;
  transition: opacity 0.5s ease;
}

.mesh-particle {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: particleSplit 0.8s ease forwards;
}

.intro-logo {
  position: relative;
  z-index: 10;
  text-align: center;
}

.intro-title {
  font-family: var(--font-heading);
  font-size: 80px;
  font-weight: 700;
  color: white;
  opacity: 0;
  letter-spacing: 8px;
  text-shadow: 0 0 30px rgba(37,99,235,0.8);
}

.intro-subtitle {
  font-family: var(--font-family);
  font-size: 18px;
  font-weight: 300;
  color: rgba(255,255,255,0.75);
  letter-spacing: 3px;
  opacity: 0;
  margin-top: 12px;
  text-transform: uppercase;
}

/* Curtain reveal uses two halves */
.curtain-left, .curtain-right {
  position: absolute;
  top: 0;
  width: 50%;
  height: 100%;
  background: #0F172A;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 5;
}
.curtain-left { left: 0; }
.curtain-right { right: 0; }
.curtain-left.open { transform: translateX(-100%); }
.curtain-right.open { transform: translateX(100%); }

/* ===== KEYFRAMES ===== */
@keyframes particlePulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  50% { transform: translate(-50%, -50%) scale(1.3); opacity: 0.7; }
}

@keyframes particleSplit {
  0% { transform: translate(-50%, -50%); opacity: 1; }
  100% { transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))); opacity: 0.6; }
}

@keyframes meshRotate {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes fadeInTitle {
  0% { opacity: 0; transform: scale(0.8); letter-spacing: 20px; }
  100% { opacity: 1; transform: scale(1); letter-spacing: 8px; }
}

@keyframes fadeInSubtitle {
  0% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 0.75; transform: translateY(0); }
}

@keyframes slideInToast {
  from { transform: translateX(120%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOutToast {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(120%); opacity: 0; }
}

@keyframes rgbRotate {
  0% { --angle: 0deg; }
  100% { --angle: 360deg; }
}

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

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

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

/* ===== UTILITY ===== */
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--spacing-sm); }
.gap-md { gap: var(--spacing-md); }
.text-center { text-align: center; }
.w-full { width: 100%; }
.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mb-md { margin-bottom: var(--spacing-md); }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--border-medium); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-dark); }
