@import "tailwindcss";

:root {
  --background: #f7f8fa;
  --foreground: #0a0d12;
  --surface: #ffffff;
  --border: rgba(10, 13, 18, 0.08);
  --muted: #64748b;
  --accent: #2563eb;
  --accent-foreground: #ffffff;
  --accent-soft: rgba(37, 99, 235, 0.12);
  --glow: rgba(37, 99, 235, 0.4);
}

.dark {
  --background: #05070a;
  --foreground: #f1f5f9;
  --surface: #0c1017;
  --border: rgba(255, 255, 255, 0.08);
  --muted: #94a3b8;
  --accent: #3b82f6;
  --accent-foreground: #ffffff;
  --accent-soft: rgba(59, 130, 246, 0.18);
  --glow: rgba(59, 130, 246, 0.45);
}

@theme inline {
  --color-background: var(--background);
  --color-foreground: var(--foreground);
  --color-surface: var(--surface);
  --color-border: var(--border);
  --color-muted: var(--muted);
  --color-accent: var(--accent);
  --color-accent-foreground: var(--accent-foreground);
  --font-sans: var(--font-body);
  --font-display: var(--font-display);
  --font-mono: var(--font-mono);
}

@layer base {
  * {
    @apply border-border;
  }

  html {
    scroll-behavior: auto;
  }

  html.lenis,
  html.lenis body {
    height: auto;
  }

  .lenis.lenis-smooth {
    scroll-behavior: auto !important;
  }

  body {
    @apply bg-background text-foreground font-sans antialiased;
  }

  ::selection {
    background: color-mix(in srgb, var(--accent) 35%, transparent);
    color: var(--foreground);
  }

  :focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
  }
}

@layer utilities {
  .text-balance {
    text-wrap: balance;
  }

  .glass {
    @apply bg-surface/80 backdrop-blur-xl border border-border;
  }

  .gradient-mesh {
    background:
      radial-gradient(ellipse 80% 50% at 20% -10%, color-mix(in srgb, var(--accent) 18%, transparent), transparent),
      radial-gradient(ellipse 60% 40% at 90% 10%, color-mix(in srgb, #3b82f6 12%, transparent), transparent),
      radial-gradient(ellipse 50% 30% at 50% 100%, color-mix(in srgb, var(--accent) 8%, transparent), transparent);
  }

  .noise-overlay {
    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)' opacity='0.04'/%3E%3C/svg%3E");
  }

  .grid-pattern {
    background-image:
      linear-gradient(to right, color-mix(in srgb, var(--foreground) 4%, transparent) 1px, transparent 1px),
      linear-gradient(to bottom, color-mix(in srgb, var(--foreground) 4%, transparent) 1px, transparent 1px);
    background-size: 64px 64px;
  }

  .text-gradient {
    background: linear-gradient(135deg, var(--foreground) 0%, color-mix(in srgb, var(--accent) 70%, var(--foreground)) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(2deg); }
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}

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

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

.animate-float {
  animation: float 8s ease-in-out infinite;
}

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

.animate-gradient {
  background-size: 200% 200%;
  animation: gradient-shift 12s ease infinite;
}

.animate-marquee {
  animation: marquee 40s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .animate-float,
  .animate-pulse-glow,
  .animate-gradient,
  .animate-marquee {
    animation: none;
  }
}
