@import "tailwindcss";
@import "tw-animate-css";
@import "shadcn/tailwind.css";

@custom-variant dark (&:is(.dark *));

@theme inline {
  --color-background: var(--background);
  --color-foreground: var(--foreground);
  --font-sans: var(--font-geist-sans);
  --font-mono: var(--font-geist-mono);
  --font-heading: var(--font-geist-sans);
  --color-sidebar-ring: var(--sidebar-ring);
  --color-sidebar-border: var(--sidebar-border);
  --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
  --color-sidebar-accent: var(--sidebar-accent);
  --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
  --color-sidebar-primary: var(--sidebar-primary);
  --color-sidebar-foreground: var(--sidebar-foreground);
  --color-sidebar: var(--sidebar);
  --color-chart-5: var(--chart-5);
  --color-chart-4: var(--chart-4);
  --color-chart-3: var(--chart-3);
  --color-chart-2: var(--chart-2);
  --color-chart-1: var(--chart-1);
  --color-ring: var(--ring);
  --color-input: var(--input);
  --color-border: var(--border);
  --color-destructive: var(--destructive);
  --color-accent-foreground: var(--accent-foreground);
  --color-accent: var(--accent);
  --color-muted-foreground: var(--muted-foreground);
  --color-muted: var(--muted);
  --color-secondary-foreground: var(--secondary-foreground);
  --color-secondary: var(--secondary);
  --color-primary-foreground: var(--primary-foreground);
  --color-primary: var(--primary);
  --color-popover-foreground: var(--popover-foreground);
  --color-popover: var(--popover);
  --color-card-foreground: var(--card-foreground);
  --color-card: var(--card);
  --radius-sm: calc(var(--radius) * 0.6);
  --radius-md: calc(var(--radius) * 0.8);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) * 1.4);
  --radius-2xl: calc(var(--radius) * 1.8);
  --radius-3xl: calc(var(--radius) * 2.2);
  --radius-4xl: calc(var(--radius) * 2.6);
}

:root {
  --background: #ffffff;
  --foreground: #000000;
  --card: #ffffff;
  --card-foreground: #000000;
  --popover: #ffffff;
  --popover-foreground: #000000;
  --primary: #000000;
  --primary-foreground: #ffffff;
  --secondary: #f4f4f5;
  --secondary-foreground: #000000;
  --muted: #f4f4f5;
  --muted-foreground: #52525b;
  --accent: #f4f4f5;
  --accent-foreground: #000000;
  --destructive: #ef4444;
  --border: #e5e5e7;
  --input: #e5e5e7;
  --ring: #000000;
  --radius: 0.5rem;
  --sidebar: #ffffff;
  --sidebar-foreground: #000000;
  --sidebar-primary: #000000;
  --sidebar-primary-foreground: #ffffff;
  --sidebar-accent: #f4f4f5;
  --sidebar-accent-foreground: #000000;
  --sidebar-border: #e5e5e7;
  --sidebar-ring: #000000;

  --grid-line: rgba(0, 0, 0, 0.03);
}

.dark {
  --background: #000000;
  --foreground: #ffffff;
  --card: #000000;
  --card-foreground: #ffffff;
  --popover: #000000;
  --popover-foreground: #ffffff;
  --primary: #ffffff;
  --primary-foreground: #000000;
  --secondary: #09090b;
  --secondary-foreground: #ffffff;
  --muted: #09090b;
  --muted-foreground: #a1a1aa;
  --accent: #09090b;
  --accent-foreground: #ffffff;
  --destructive: #ef4444;
  --border: #262626;
  --input: #262626;
  --ring: #ffffff;
  --sidebar: #000000;
  --sidebar-foreground: #ffffff;
  --sidebar-primary: #ffffff;
  --sidebar-primary-foreground: #000000;
  --sidebar-accent: #09090b;
  --sidebar-accent-foreground: #ffffff;
  --sidebar-border: #262626;
  --sidebar-ring: #ffffff;

  --grid-line: rgba(255, 255, 255, 0.04);
}

@layer base {
  * {
    @apply border-border outline-ring/50 transition-colors duration-150;
  }
  body {
    @apply bg-background text-foreground antialiased selection:bg-neutral-800 selection:text-white dark:selection:bg-neutral-200 dark:selection:text-black;
  }
  html {
    @apply font-sans;
    scroll-behavior: smooth;
  }
}

/* Thin geometric grid lines */
.clean-grid {
  background-image: 
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 60px 60px;
  background-position: center top;
  mask-image: radial-gradient(ellipse at 50% 50%, #000 80%, transparent 100%);
}

/* Infinite horizontal marquee */
@keyframes marquee-left {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@keyframes marquee-right {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}

.animate-marquee-left {
  display: flex;
  width: max-content;
  animation: marquee-left 60s linear infinite;
}
.animate-marquee-right {
  display: flex;
  width: max-content;
  animation: marquee-right 60s linear infinite;
}
.animate-marquee-left:hover,
.animate-marquee-right:hover {
  animation-play-state: paused;
}

/* Provider rail marquee — faster, tighter */
@keyframes provider-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.animate-provider-marquee {
  display: flex;
  width: max-content;
  animation: provider-scroll 30s linear infinite;
}
.animate-provider-marquee:hover {
  animation-play-state: paused;
}

/* RGB ambient glow blobs */
.glow-red {
  position: absolute;
  width: 600px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255,60,60,0.12) 0%, transparent 70%);
  filter: blur(40px);
  pointer-events: none;
}
.glow-green {
  position: absolute;
  width: 600px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(0,220,100,0.10) 0%, transparent 70%);
  filter: blur(40px);
  pointer-events: none;
}
.glow-blue {
  position: absolute;
  width: 600px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(60,100,255,0.12) 0%, transparent 70%);
  filter: blur(40px);
  pointer-events: none;
}

/* Animated number counter */
@keyframes count-up {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.stat-counter {
  animation: count-up 0.6s ease-out both;
}

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

/* Custom scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  @apply rounded-full bg-neutral-200 dark:bg-neutral-800 transition-colors;
}
::-webkit-scrollbar-thumb:hover {
  @apply bg-neutral-300 dark:bg-neutral-700;
}
