:root {
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --background: 222 45% 96%;
  --foreground: 224 42% 8%;
  --card: 0 0% 100%;
  --card-foreground: 224 42% 8%;
  --popover: 0 0% 100%;
  --popover-foreground: 224 42% 8%;
  --primary: 221 83% 53%;
  --primary-foreground: 210 40% 98%;
  --secondary: 238 38% 92%;
  --secondary-foreground: 224 42% 12%;
  --muted: 225 25% 90%;
  --muted-foreground: 224 18% 38%;
  --accent: 275 90% 62%;
  --accent-foreground: 210 40% 98%;
  --destructive: 0 84% 60%;
  --destructive-foreground: 210 40% 98%;
  --success: 156 72% 40%;
  --success-foreground: 160 84% 96%;
  --warning: 38 92% 50%;
  --warning-foreground: 35 92% 12%;
  --info: 190 95% 45%;
  --info-foreground: 190 95% 96%;
  --border: 224 20% 82%;
  --input: 224 20% 82%;
  --ring: 190 95% 45%;
  --radius: 0.625rem;
  --shadow-sm: 0 1px 2px hsl(var(--foreground) / 0.05);
  --shadow-md: 0 4px 12px hsl(var(--foreground) / 0.08);
  --shadow-lg: 0 12px 32px hsl(var(--foreground) / 0.12);
  --shadow-elegant: 0 20px 60px hsl(var(--primary) / 0.22);
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.dark {
  --background: 230 48% 5%;
  --foreground: 210 40% 96%;
  --card: 229 43% 8%;
  --card-foreground: 210 40% 96%;
  --popover: 229 43% 9%;
  --popover-foreground: 210 40% 96%;
  --primary: 214 100% 62%;
  --primary-foreground: 222 47% 7%;
  --secondary: 229 32% 14%;
  --secondary-foreground: 210 40% 96%;
  --muted: 228 28% 16%;
  --muted-foreground: 218 18% 70%;
  --accent: 276 92% 68%;
  --accent-foreground: 222 47% 7%;
  --destructive: 0 76% 58%;
  --destructive-foreground: 210 40% 98%;
  --success: 158 76% 46%;
  --success-foreground: 160 84% 8%;
  --warning: 42 96% 56%;
  --warning-foreground: 35 92% 10%;
  --info: 188 95% 52%;
  --info-foreground: 192 90% 7%;
  --border: 226 25% 20%;
  --input: 226 25% 22%;
  --ring: 188 95% 52%;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 15% 10%, hsl(var(--primary) / 0.22), transparent 28%),
    radial-gradient(circle at 85% 8%, hsl(var(--accent) / 0.18), transparent 30%),
    radial-gradient(circle at 50% 90%, hsl(var(--info) / 0.12), transparent 34%);
  z-index: -2;
}

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

button, input, textarea, select {
  font: inherit;
}

input, textarea, select {
  font-size: max(16px, 1rem);
}

.safe-bottom {
  padding-bottom: calc(0.75rem + env(safe-area-inset-bottom));
}

.glass-panel {
  border: 1px solid hsl(var(--border));
  background: linear-gradient(135deg, hsl(var(--card) / 0.82), hsl(var(--card) / 0.54));
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(20px);
}

.gradient-text {
  background: linear-gradient(90deg, hsl(var(--info)), hsl(var(--primary)), hsl(var(--accent)));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.gradient-border {
  position: relative;
}

.gradient-border::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, hsl(var(--info) / 0.7), hsl(var(--primary) / 0.6), hsl(var(--accent) / 0.7));
  -webkit-mask: linear-gradient(hsl(var(--foreground)) 0 0) content-box, linear-gradient(hsl(var(--foreground)) 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.hero-orb {
  background:
    radial-gradient(circle at 30% 20%, hsl(var(--info) / 0.72), transparent 28%),
    radial-gradient(circle at 72% 24%, hsl(var(--accent) / 0.58), transparent 26%),
    linear-gradient(135deg, hsl(var(--primary) / 0.34), hsl(var(--card) / 0.8));
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--transition-smooth), transform var(--transition-smooth);
}

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

.float-slow {
  animation: floatSlow 7s ease-in-out infinite;
}

.pulse-glow {
  animation: pulseGlow 4s ease-in-out infinite;
}

.chart-line {
  background: linear-gradient(90deg, hsl(var(--info)), hsl(var(--primary)), hsl(var(--accent)));
  transform-origin: left center;
  animation: lineGrow 1.4s ease-out both;
}

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

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 hsl(var(--primary) / 0); }
  50% { box-shadow: 0 0 48px hsl(var(--primary) / 0.22); }
}

@keyframes lineGrow {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal.is-visible, .float-slow, .pulse-glow, .chart-line {
    animation: none;
    transition: none;
    transform: none;
    opacity: 1;
  }
}