@tailwind base;
@tailwind components;
@tailwind utilities;

/* PixelOne Design System - Navy-First Dark Theme */

@layer base {
  :root {
    /* PixelOne Navy Palette - Dark First */
    --navy-primary: #003049;
    --navy-deep: #082F49;
    --navy-secondary: #0B3A5A;
    --navy-surface: #0E3B59;
    
    /* Accent Colors */
    --green-growth: #2DAA6E;
    --green-light: #3DC77E;
    --orange-cta: #E87A2D;
    --orange-light: #F5923C;
    
    /* Text Colors */
    --text-primary: #FFFFFF;
    --text-secondary: #D7DEE8;
    --text-muted: #94A3B8;
    
    /* Borders & Dividers */
    --border-subtle: rgba(255, 255, 255, 0.10);
    --border-green: rgba(45, 170, 110, 0.4);
    --border-orange: rgba(232, 122, 45, 0.4);
    
    /* Light section colors */
    --light-bg: #F8FAFB;
    --light-card: #FFFFFF;
    
    /* Base theme variables (for shadcn compatibility) */
    --background: 201 100% 14%;
    --foreground: 220 20% 95%;
    
    --card: 202 75% 21%;
    --card-foreground: 220 20% 95%;
    
    --popover: 202 75% 21%;
    --popover-foreground: 220 20% 95%;
    
    --primary: 152 57% 42%;
    --primary-foreground: 0 0% 100%;
    
    --secondary: 201 100% 18%;
    --secondary-foreground: 220 20% 95%;
    
    --muted: 201 80% 22%;
    --muted-foreground: 215 16% 60%;
    
    --accent: 24 82% 55%;
    --accent-foreground: 0 0% 100%;
    
    --destructive: 0 84% 60%;
    --destructive-foreground: 210 40% 98%;
    
    --border: 215 28% 18%;
    --input: 215 28% 18%;
    --ring: 152 57% 42%;
    
    --radius: 0.5rem;

    /* Sidebar variables */
    --sidebar-background: 201 100% 14%;
    --sidebar-foreground: 220 20% 90%;
    --sidebar-primary: 152 57% 42%;
    --sidebar-primary-foreground: 0 0% 100%;
    --sidebar-accent: 201 100% 18%;
    --sidebar-accent-foreground: 220 20% 95%;
    --sidebar-border: 215 28% 18%;
    --sidebar-ring: 152 57% 42%;
  }
}

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

  body {
    @apply bg-[var(--navy-primary)] text-[var(--text-primary)] antialiased;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  }

  h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -0.02em;
  }
}

/* Custom utility classes for PixelOne brand */
@layer utilities {
  .bg-navy {
    background-color: var(--navy-primary);
  }
  
  .bg-navy-deep {
    background-color: var(--navy-deep);
  }
  
  .bg-navy-secondary {
    background-color: var(--navy-secondary);
  }
  
  .bg-navy-surface {
    background-color: var(--navy-surface);
  }
  
  .bg-navy-card {
    background-color: rgba(14, 59, 89, 0.5);
  }
  
  .text-navy {
    color: var(--navy-primary);
  }
  
  .text-green {
    color: var(--green-growth);
  }
  
  .text-orange {
    color: var(--orange-cta);
  }
  
  .text-secondary {
    color: var(--text-secondary);
  }
  
  .text-muted-custom {
    color: var(--text-muted);
  }
  
  .border-subtle {
    border-color: var(--border-subtle);
  }
  
  .border-green {
    border-color: var(--green-growth);
  }
  
  .border-orange {
    border-color: var(--orange-cta);
  }
  
  .gradient-navy {
    background: linear-gradient(135deg, var(--navy-primary) 0%, var(--navy-deep) 50%, var(--navy-secondary) 100%);
  }
  
  .gradient-navy-subtle {
    background: linear-gradient(180deg, var(--navy-primary) 0%, var(--navy-deep) 100%);
  }

  /* Glow effects - very subtle */
  .glow-green {
    box-shadow: 0 0 30px rgba(45, 170, 110, 0.15);
  }
  
  .glow-orange {
    box-shadow: 0 0 30px rgba(232, 122, 45, 0.15);
  }

  /* Neon glow for icon tiles - base state (no glow), hover triggers glow */
  .icon-neon-green {
    background: radial-gradient(circle, rgba(45, 170, 110, 0.15) 0%, transparent 70%);
    border: 2px solid rgba(45, 170, 110, 0.5);
    transition: all 0.3s ease;
  }

  .icon-neon-orange {
    background: radial-gradient(circle, rgba(232, 122, 45, 0.15) 0%, transparent 70%);
    border: 2px solid rgba(232, 122, 45, 0.5);
    transition: all 0.3s ease;
  }

  /* Glow triggers on card hover (group) or direct hover */
  .group:hover .icon-neon-green,
  .icon-neon-green:hover {
    background: radial-gradient(circle, rgba(45, 170, 110, 0.5) 0%, transparent 70%);
    border-color: var(--green-growth);
    box-shadow: 0 0 20px rgba(45, 170, 110, 0.4), 0 0 40px rgba(45, 170, 110, 0.2);
    animation: icon-neon-pulse 3s ease-in-out infinite;
  }

  .group:hover .icon-neon-orange,
  .icon-neon-orange:hover {
    background: radial-gradient(circle, rgba(232, 122, 45, 0.5) 0%, transparent 70%);
    border-color: var(--orange-cta);
    box-shadow: 0 0 20px rgba(232, 122, 45, 0.4), 0 0 40px rgba(232, 122, 45, 0.2);
    animation: icon-neon-pulse 3s ease-in-out infinite;
  }

  @keyframes icon-neon-pulse {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.3); }
  }

  /* Badge hover glow */
  .badge-glow-green {
    transition: all 0.3s ease;
  }
  .badge-glow-green:hover {
    box-shadow: 0 0 20px rgba(45, 170, 110, 0.4), 0 0 40px rgba(45, 170, 110, 0.15);
    border-color: var(--green-growth);
  }
  .badge-glow-orange {
    transition: all 0.3s ease;
  }
  .badge-glow-orange:hover {
    box-shadow: 0 0 20px rgba(232, 122, 45, 0.4), 0 0 40px rgba(232, 122, 45, 0.15);
    border-color: var(--orange-cta);
  }
  .badge-glow-navy {
    transition: all 0.3s ease;
  }
  .badge-glow-navy:hover {
    box-shadow: 0 0 20px rgba(0, 48, 73, 0.25), 0 0 40px rgba(0, 48, 73, 0.1);
    border-color: var(--navy-primary);
  }

  /* Grid pattern overlay */
  .grid-pattern {
    background-image: 
      linear-gradient(var(--border-subtle) 1px, transparent 1px),
      linear-gradient(90deg, var(--border-subtle) 1px, transparent 1px);
    background-size: 50px 50px;
  }

  /* Dot pattern */
  .dot-pattern {
    background-image: radial-gradient(circle, var(--border-subtle) 1px, transparent 1px);
    background-size: 24px 24px;
  }
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

/* Custom scrollbar for dark theme */
::-webkit-scrollbar {
  width: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--navy-surface);
  border-radius: 4px;
}

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

/* Hide default cursor on desktop devices (custom cursor enabled) */
@media (pointer: fine) {
  * {
    cursor: none !important;
  }
}

/* PageLoader animations */
@keyframes px-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes px-spin-reverse {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}

@keyframes px-ring-pulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.15); opacity: 1; }
}

@keyframes px-logo-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

@keyframes px-fade-pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

@keyframes px-dot {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 1; }
}

@keyframes px-pulse-dot {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.4); opacity: 1; }
}

/* Marquee animation - two identical groups, translate -50% for seamless loop */
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

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

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

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

@media (max-width: 768px) {
  .animate-marquee {
    animation-duration: 20s;
  }
  .animate-marquee-reverse {
    animation-duration: 20s;
  }
}

.animate-marquee:hover,
.animate-marquee-reverse:hover {
  animation-play-state: paused;
}
