@import "tailwindcss";
@import "tw-animate-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);
  --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) - 4px);
  --radius-md: calc(var(--radius) - 2px);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) + 4px);
  /* Custom Hub Colors */
  --color-hub-navy: #0a0e27;
  --color-hub-navy-light: #1a1f4e;
  --color-hub-teal: #00d4aa;
  --color-hub-teal-bright: #00b4d8;
  --color-hub-amber: #f0a500;
  --color-hub-green: #00cc88;
  --color-hub-text: #e8e8f0;
  --color-hub-card: #0f1435;
  --color-hub-card-hover: #161c4a;
  --color-hub-border: #00d4aa;
}

:root {
  --radius: 0.625rem;
  --background: #0a0e27;
  --foreground: #e8e8f0;
  --card: #0f1435;
  --card-foreground: #e8e8f0;
  --popover: #0f1435;
  --popover-foreground: #e8e8f0;
  --primary: #00d4aa;
  --primary-foreground: #0a0e27;
  --secondary: #1a1f4e;
  --secondary-foreground: #e8e8f0;
  --muted: #1a1f4e;
  --muted-foreground: #8888aa;
  --accent: #f0a500;
  --accent-foreground: #0a0e27;
  --destructive: #ff4444;
  --border: rgba(0, 212, 170, 0.15);
  --input: rgba(0, 212, 170, 0.15);
  --ring: #00d4aa;
  --chart-1: #00d4aa;
  --chart-2: #00b4d8;
  --chart-3: #f0a500;
  --chart-4: #00cc88;
  --chart-5: #8b5cf6;
  --sidebar: #0a0e27;
  --sidebar-foreground: #e8e8f0;
  --sidebar-primary: #00d4aa;
  --sidebar-primary-foreground: #0a0e27;
  --sidebar-accent: #1a1f4e;
  --sidebar-accent-foreground: #e8e8f0;
  --sidebar-border: rgba(0, 212, 170, 0.15);
  --sidebar-ring: #00d4aa;
}

@layer base {
  * {
    @apply border-border outline-ring/50;
  }
  body {
    @apply bg-background text-foreground;
  }
}

/* ===== Custom Animations ===== */

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

@keyframes pulse-green {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 204, 136, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(0, 204, 136, 0); }
}

@keyframes float-up {
  0% { opacity: 0; transform: translateY(30px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes bounce-arrow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes flow-line {
  0% { stroke-dashoffset: 1000; }
  100% { stroke-dashoffset: 0; }
}

@keyframes glow-pulse {
  0%, 100% { filter: drop-shadow(0 0 2px rgba(0, 212, 170, 0.3)); }
  50% { filter: drop-shadow(0 0 8px rgba(0, 212, 170, 0.6)); }
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: #0a0e27;
}
::-webkit-scrollbar-thumb {
  background: rgba(0, 212, 170, 0.3);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 212, 170, 0.5);
}

/* Service Card Styles */
.service-card {
  background: linear-gradient(135deg, rgba(15, 20, 53, 0.9) 0%, rgba(26, 31, 78, 0.6) 100%);
  border: 1px solid rgba(0, 212, 170, 0.12);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
}
.service-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 212, 170, 0.35);
  box-shadow: 0 12px 40px rgba(0, 212, 170, 0.1), 0 0 0 1px rgba(0, 212, 170, 0.1);
  background: linear-gradient(135deg, rgba(15, 20, 53, 1) 0%, rgba(26, 31, 78, 0.8) 100%);
}

/* Category Header */
.category-header {
  position: relative;
  padding-left: 1rem;
}
.category-header::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, #00d4aa, #00b4d8);
  border-radius: 2px;
}

/* Status Badge */
.status-badge {
  background: rgba(0, 204, 136, 0.1);
  border: 1px solid rgba(0, 204, 136, 0.3);
  color: #00cc88;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 9999px;
}

/* Architecture Node */
.arch-node {
  background: linear-gradient(135deg, rgba(15, 20, 53, 0.95), rgba(26, 31, 78, 0.7));
  border: 1px solid rgba(0, 212, 170, 0.2);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  text-align: center;
  transition: all 0.3s ease;
}
.arch-node:hover {
  border-color: rgba(0, 212, 170, 0.5);
  box-shadow: 0 0 20px rgba(0, 212, 170, 0.15);
}

/* Tech Badge */
.tech-badge {
  background: rgba(0, 212, 170, 0.08);
  border: 1px solid rgba(0, 212, 170, 0.15);
  color: #e8e8f0;
  padding: 0.375rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8rem;
  transition: all 0.2s ease;
}
.tech-badge:hover {
  background: rgba(0, 212, 170, 0.15);
  border-color: rgba(0, 212, 170, 0.3);
}

/* Security Icon Card */
.security-card {
  background: rgba(15, 20, 53, 0.6);
  border: 1px solid rgba(0, 212, 170, 0.08);
  border-radius: 12px;
  padding: 1.25rem;
  text-align: center;
  transition: all 0.3s ease;
}
.security-card:hover {
  background: rgba(15, 20, 53, 0.9);
  border-color: rgba(0, 212, 170, 0.25);
  transform: translateY(-2px);
}

/* Animated counter */
.counter-value {
  font-variant-numeric: tabular-nums;
}

/* Section fade-in */
.section-fade {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.section-fade.visible {
  opacity: 1;
  transform: translateY(0);
}
