/* Enhanced Typography System */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@600;700;800&display=swap');

:root{
  /* Refined color system */
  --primary: #4FA690;
  --primary-light: #6FB8A2;
  --primary-dark: #1F3B33;
  --foreground: #0A0A0A;
  --surface: #0F0F10;
  --surface-light: #141415;
  --text-strong: #0E1115;
  --text: #1A1F25;
  --text-secondary: #6B7280;
  --text-subtle: #9CA3AF;
  --border-light: rgba(255,255,255,0.08);
  --border-medium: rgba(255,255,255,0.12);
}

* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html { 
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  background-color: #000;
  color: var(--text);
  overflow-x: hidden;
  font-optical-sizing: auto;
  position: relative;
}

/* Noise texture overlay for depth */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.015;
  z-index: 1;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.5'/%3E%3C/svg%3E");
}

/* Enhanced Typography */
h1, h2, h3, .display {
  font-family: 'Plus Jakarta Sans', 'Inter', ui-sans-serif, system-ui, sans-serif;
  letter-spacing: -0.025em;
  color: inherit;
  line-height: 1.1;
}

.text-primary { color: var(--primary); }
.text-primary-light { color: var(--primary-light); }
.text-textSecondary { color: var(--text-secondary); }

.bg-primary { background-color: var(--primary); }
.bg-foreground { background-color: var(--foreground); }
.bg-surface { background-color: var(--surface); }

/* Premium gradient text */
.gradient-white {
  background: linear-gradient(135deg, #FFFFFF 0%, rgba(255,255,255,0.92) 50%, rgba(255,255,255,0.85) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-fill-color: transparent;
}

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

/* Glass morphism cards */
.glass-card {
  background: rgba(15, 15, 16, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-light);
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}

/* Premium card surface */
.surface-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  box-shadow: 
    0 0 0 1px rgba(255,255,255,0.02) inset,
    0 10px 40px rgba(0,0,0,0.5);
  position: relative;
  overflow: hidden;
}

.surface-card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(79,166,144,0.03) 0%, transparent 70%);
  pointer-events: none;
}

/* Enhanced elevate animation */
.elevate {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateY(0);
}

.elevate:hover {
  transform: translateY(-4px);
  box-shadow: 
    0 0 0 1px rgba(255,255,255,0.05) inset,
    0 20px 60px rgba(0,0,0,0.4);
  border-color: var(--border-medium);
}

/* Premium buttons */
.btn-primary {
  background: linear-gradient(135deg, #ffffff 0%, #f8f8f8 100%);
  color: var(--foreground);
  border: 1px solid rgba(0,0,0,0.08);
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(0,0,0,0.05);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before {
  width: 300px;
  height: 300px;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.btn-outline {
  background: transparent;
  color: #ffffff;
  border: 1px solid rgba(255,255,255,0.2);
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.btn-outline::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
  transition: left 0.5s;
}

.btn-outline:hover::before {
  left: 100%;
}

.btn-outline:hover {
  border-color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.05);
  transform: translateY(-2px);
}

/* Animated background spots */
.bg-spot {
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(79,166,144,0.15) 0%, transparent 65%);
  filter: blur(60px);
  animation: float 20s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.05); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* Section separator */
.section-separator {
  position: relative;
  overflow: hidden;
}

.section-separator::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(79,166,144,0.2), transparent);
}

/* Smooth reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Sticky navigation with scroll effect */
.nav-scrolled {
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
}

/* Enhanced stat numbers */
.stat-number {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  font-weight: 700;
  background: linear-gradient(135deg, #ffffff 0%, rgba(255,255,255,0.8) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Premium focus styles */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 4px;
  border-radius: 2px;
}

/* Improved text balance */
.text-balance {
  text-wrap: balance;
}

/* Loading animation for lazy content */
@keyframes shimmer {
  0% { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}

.shimmer {
  animation: shimmer 2s infinite linear;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
  background-size: 1000px 100%;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--primary-dark);
  border-radius: 5px;
}

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