@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Poppins:wght@600;700;800&display=swap');

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

/* Bay Area Affiliates Design System - Black and Blue */

@layer base {
  :root {
    /* Base black system */
    --background: 0 0% 3%;           /* #080808 */
    --background-deep: 0 0% 1%;      /* #030303 */
    --foreground: 0 0% 98%;          /* Near white */
    --foreground-muted: 0 0% 80%;    /* Muted white */

    /* Cards and surfaces */
    --card: 0 0% 8%;
    --card-foreground: 0 0% 95%;
    --card-border: 220 20% 15%;

    /* Electric blue accent system */
    --neon: 220 100% 60%;            /* #3366ff */
    --neon-glow: 220 100% 70%;
    --neon-muted: 220 60% 45%;
    --neon-foreground: 0 0% 3%;      /* Dark text on blue */

    /* Interactive states */
    --primary: 220 100% 60%;         /* Electric blue */
    --primary-foreground: 0 0% 98%;
    --primary-hover: 220 100% 70%;

    --secondary: 220 20% 15%;
    --secondary-foreground: 0 0% 95%;
    --secondary-hover: 220 20% 20%;

    /* Muted and accent variants */
    --muted: 220 15% 12%;
    --muted-foreground: 0 0% 65%;

    --accent: 220 20% 15%;
    --accent-foreground: 0 0% 95%;

    /* Status colors */
    --destructive: 0 84% 60%;
    --destructive-foreground: 0 0% 98%;

    --success: 142 76% 36%;
    --success-foreground: 0 0% 98%;

    /* Borders and inputs */
    --border: 220 15% 18%;
    --input: 220 15% 15%;
    --input-border: 220 20% 25%;
    --ring: 220 100% 60%;

    /* Radius system */
    --radius: 1.5rem;
    --radius-sm: 0.75rem;
    --radius-lg: 2rem;

    /* Grid and overlay */
    --grid-color: 220 15% 12%;
    --overlay: 0 0% 3% / 0.8;

    /* Animations and effects */
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    
    /* Shadows and glows */
    --shadow-neon: 0 0 20px hsl(var(--neon) / 0.3);
    --shadow-neon-strong: 0 0 40px hsl(var(--neon) / 0.6);
    --shadow-card: 0 8px 32px hsl(180 75% 7% / 0.4);
  }
}

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

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

  html {
    scroll-behavior: smooth;
  }

  @media (prefers-reduced-motion: reduce) {
    html {
      scroll-behavior: auto;
    }
    
    *,
    *::before,
    *::after {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
    }
  }
}

@layer components {
  /* Grid overlay */
  .grid-overlay {
    background-image: 
      linear-gradient(hsl(var(--grid-color)) 1px, transparent 1px),
      linear-gradient(90deg, hsl(var(--grid-color)) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: 0.4;
  }

  /* Neon glow effects */
  .neon-glow {
    box-shadow: var(--shadow-neon);
    transition: var(--transition-smooth);
  }

  .neon-glow:hover {
    box-shadow: var(--shadow-neon-strong);
  }

  /* Text glow */
  .text-glow {
    text-shadow: 0 0 10px hsl(var(--neon) / 0.5);
  }

  /* Scroll reveal animation */
  .scroll-reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  }

  .scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
  }

  /* Parallax container */
  .parallax {
    transform: translateZ(0);
    will-change: transform;
  }

  /* Section pinning */
  .section-pin {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
  }

  /* Button variants */
  .btn-neon {
    @apply bg-primary text-primary-foreground hover:bg-primary-hover;
    @apply rounded-[var(--radius)] px-8 py-4 font-semibold;
    @apply transition-all duration-300 ease-out;
    @apply shadow-[0_0_0_1px_hsl(var(--neon))] hover:shadow-[0_0_20px_hsl(var(--neon)/0.5)];
  }

  .btn-ghost {
    @apply border border-border hover:border-neon text-foreground hover:text-neon;
    @apply rounded-[var(--radius)] px-8 py-4 font-semibold;
    @apply transition-all duration-300 ease-out;
    @apply hover:shadow-[0_0_15px_hsl(var(--neon)/0.3)];
  }

  /* Card styles */
  .card-dark {
    @apply bg-card border border-card-border rounded-[var(--radius-lg)];
    @apply backdrop-blur-sm shadow-[var(--shadow-card)];
  }

  /* Typography helpers */
  .text-balance {
    text-wrap: balance;
  }
}