@import '@fontsource/raleway/400.css';
@import '@fontsource/nunito/400.css';
@import '@fontsource/nunito/700.css';
@import '@fontsource/nunito/800.css';
@import '@fontsource/nunito/900.css';
@tailwind base;
@tailwind components;
@tailwind utilities;
 
@layer base {
  :root {
    --background: 0 0% 100%;
    --foreground: 0 0% 3%;
    --card: 0 0% 100%;
    --card-foreground: 0 0% 3%;
    --popover: 0 0% 100%;
    --popover-foreground: 0 0% 3%;
    --primary: 0 0% 3%;
    --primary-foreground: 0 0% 100%;
    --secondary: 50 6% 90%;
    --secondary-foreground: 0 0% 3%;
    --muted: 50 6% 90%;
    --muted-foreground: 0 0% 33%;
    --accent: 0 0% 3%;
    --accent-foreground: 0 0% 100%;
    --accent-purple: 263 70% 58%;
    --accent-green: 179 55% 43%;
    --accent-yellow: 44 97% 53%;
    --destructive: 0 84% 60%;
    --destructive-foreground: 0 0% 100%;
    --border: 0 0% 33% / 0.1;
    --input: 50 6% 90%;
    --ring: 263 70% 58%;
    --radius: 0.5rem;
    
    /* Brand colors for V2 */
    --brand-black: 0 0% 3%;
    --brand-light: 50 6% 90%;
    --brand-grey: 0 0% 33%;
    --brand-purple: 263 70% 58%;
    --brand-green: 179 55% 43%;
    --brand-yellow: 44 97% 53%;
  }
}

@layer base {
  * {
    @apply border-border;
  }
  body {
    @apply bg-background text-foreground antialiased font-body;
    font-feature-settings: "rlig" 1, "calt" 1;
  }

  /* Custom selection */
  ::selection {
    background: hsl(var(--accent-purple));
    color: white;
  }
}

@layer components {
  .text-gradient {
    @apply bg-clip-text text-transparent bg-gradient-to-r from-primary via-accent-purple to-accent-green;
  }

  .card-hover {
    @apply transition-all duration-300 hover:shadow-lg hover:-translate-y-1;
  }

  .section-spacing {
    @apply py-16 md:py-24 lg:py-32;
  }
  
  /* Glass panel effects */
  .glass-panel {
    background: hsl(var(--brand-light) / 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid hsl(0 0% 100% / 0.4);
  }

  /* Header glass (reduce halo + keep crisp grid behind) */
  .glass-panel-header {
    background: hsl(var(--brand-light) / 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid hsl(var(--brand-grey) / 0.12);
  }
  
  .glass-panel-card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid hsla(var(--brand-grey), 0.1);
  }
  
  /* V2 Container */
  .v2-container {
    @apply max-w-[1600px] mx-auto px-6 lg:px-12;
  }
  
  /* V2 Section */
  .v2-section {
    @apply py-12 lg:py-20;
  }
  
  /* Primary button with shine */
  .btn-primary-shine {
    @apply relative overflow-hidden bg-accent-purple text-white font-semibold px-8 py-4 rounded-full transition-all duration-300;
    box-shadow: 0 4px 20px hsla(var(--accent-purple), 0.3);
  }
  
  .btn-primary-shine:hover {
    @apply scale-[0.98];
    background: hsl(263 70% 50%);
  }
  
  .btn-primary-shine::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: linear-gradient(-45deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.3) 40% 50%, rgba(255, 255, 255, 0) 55%);
    mix-blend-mode: overlay;
    pointer-events: none;
    background-size: 200% 200%;
    background-position: 0% 50%;
    transition: background-position 500ms;
  }
  
  .btn-primary-shine:hover::after {
    background-position: 25% 50%;
  }
}

@layer utilities {
  /* Grid lines background - visible throughout */
  .grid-lines {
    background-size: 60px 60px;
    background-image:
      linear-gradient(to right, hsl(var(--brand-grey) / 0.08) 1px, transparent 1px),
      linear-gradient(to bottom, hsl(var(--brand-grey) / 0.08) 1px, transparent 1px);
  }
  
  .bg-grid-large {
    background-size: 80px 80px;
    background-image: 
      linear-gradient(to right, rgb(229 231 235 / 0.3) 1px, transparent 1px),
      linear-gradient(to bottom, rgb(229 231 235 / 0.3) 1px, transparent 1px);
  }

  .bg-grid-subtle {
    background-size: 80px 80px;
    background-image: 
      linear-gradient(to right, rgb(229 231 235 / 0.15) 1px, transparent 1px),
      linear-gradient(to bottom, rgb(229 231 235 / 0.15) 1px, transparent 1px);
  }

  .bg-fade-right {
    mask-image: linear-gradient(to right, black 30%, transparent 100%);
  }

  .bg-fade-left {
    mask-image: linear-gradient(to left, black 30%, transparent 100%);
  }

  .bg-fade-y {
    mask-image: linear-gradient(to bottom, transparent 0%, black 20%, black 80%, transparent 100%);
  }

  .bg-grid-mask {
    mask-image: radial-gradient(circle at center, black 30%, transparent 80%);
  }

  .bg-grid-empty {
    background-image: radial-gradient(
      circle at center,
      rgba(255, 255, 255, 0.8) 0%,
      rgba(255, 255, 255, 0) 70%
    );
  }
  
  /* No scrollbar */
  .no-scrollbar::-webkit-scrollbar { 
    display: none; 
  }
  .no-scrollbar { 
    -ms-overflow-style: none; 
    scrollbar-width: none; 
  }
  
  /* Pause animation on hover */
  .hover\:pause-animation:hover {
    animation-play-state: paused;
  }
  
  /* Vertical line icon animations */
  @keyframes linePulse {
    0%, 100% { opacity: 1; transform: scaleY(1); }
    50% { opacity: 0.7; transform: scaleY(0.9); }
  }
  
  @keyframes lineGlitch {
    0%, 100% { opacity: 1; transform: translateX(0); }
    25% { opacity: 0.5; transform: translateX(-1px); }
    75% { opacity: 0.5; transform: translateX(1px); }
  }
  
  @keyframes lineBrighten {
    0% { opacity: 0.3; filter: brightness(0.8); }
    100% { opacity: 1; filter: brightness(1.2); }
  }
  
  .icon-chaos rect {
    animation: linePulse 1.5s ease-in-out infinite;
  }
  
  .icon-broken rect {
    animation: lineGlitch 2s ease-in-out infinite;
  }
  
  .icon-discovery rect {
    transition: opacity 0.5s ease-out, filter 0.5s ease-out;
  }
  
  .icon-discovery:hover rect {
    animation: lineBrighten 0.8s ease-out forwards;
  }
  
  /* Problem Card Pattern Animations - DRAMATIC */
  @keyframes chaosWave {
    0% { transform: translateX(0) translateY(0); opacity: 0.4; }
    25% { transform: translateX(3px) translateY(-2px); opacity: 0.6; }
    50% { transform: translateX(0) translateY(0); opacity: 0.4; }
    75% { transform: translateX(-3px) translateY(2px); opacity: 0.6; }
    100% { transform: translateX(0) translateY(0); opacity: 0.4; }
  }
  
  @keyframes brokenGlitch {
    0%, 100% { opacity: 0.3; transform: translateX(0); }
    10% { opacity: 0.1; transform: translateX(-3px); }
    20% { opacity: 0.3; transform: translateX(0); }
    30% { opacity: 0.1; transform: translateX(3px); }
    40% { opacity: 0.3; transform: translateX(0); }
  }
  
  @keyframes discoveryPulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.08); }
  }
  
  /* Vertical line patterns as full backgrounds */
  .chaos-lines {
    background-image: repeating-linear-gradient(
      90deg,
      transparent,
      transparent 4px,
      rgba(251, 191, 36, 0.4) 4px,
      rgba(251, 191, 36, 0.4) 6px
    );
    animation: chaosWave 2s ease-in-out infinite;
  }
  
  .broken-lines {
    background-image: repeating-linear-gradient(
      90deg,
      transparent 0px,
      transparent 47%,
      rgba(107, 114, 128, 0.4) 48%,
      rgba(107, 114, 128, 0.4) 52%,
      transparent 53%,
      transparent 100%
    );
    animation: brokenGlitch 2.5s ease-in-out infinite;
  }
  
  .discovery-lines {
    background-image: radial-gradient(
      circle at 50% 50%,
      rgba(16, 185, 129, 0.3) 0%,
      transparent 50%
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 3px,
      rgba(16, 185, 129, 0.2) 3px,
      rgba(16, 185, 129, 0.2) 5px
    );
    animation: discoveryPulse 3s ease-in-out infinite;
  }
}
