@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Instrument+Serif:ital@0;1&family=Space+Mono:wght@400;700&display=swap');

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

@layer base {
  html {
    font-family: 'Inter', system-ui, sans-serif;
  }
  
  h1, h2, h3, h4, h5, h6 {
    font-family: 'Instrument Serif', Georgia, serif;
  }
  
  body {
    @apply text-ink bg-white;
  }
  
  /* Focus styles for accessibility */
  *:focus {
    @apply outline-none ring-2 ring-primary ring-offset-2;
  }
  
  /* Skip to content link */
  .skip-to-content {
    @apply sr-only focus:not-sr-only focus:absolute focus:top-4 focus:left-4 focus:z-50 focus:px-4 focus:py-2 focus:bg-primary focus:text-white focus:rounded;
  }
}

@layer components {
  .btn-primary {
    @apply bg-primary text-white px-6 py-3 rounded-2xl font-medium transition-all duration-200 hover:bg-primary-600 hover:scale-[1.01] focus:ring-2 focus:ring-primary focus:ring-offset-2;
  }
  
  .btn-secondary {
    @apply bg-white text-primary border-2 border-primary px-6 py-3 rounded-2xl font-medium transition-all duration-200 hover:bg-primary hover:text-white hover:scale-[1.01] focus:ring-2 focus:ring-primary focus:ring-offset-2;
  }
  
  .card {
    @apply bg-white rounded-2xl shadow-lg p-6 transition-all duration-200 hover:shadow-xl hover:scale-[1.01];
  }
  
  .badge {
    @apply inline-flex items-center px-3 py-1 rounded-full text-sm font-medium;
  }
  
  .badge-primary {
    @apply bg-primary text-white;
  }
  
  .badge-accent {
    @apply bg-accent text-white;
  }
  
  .badge-gray {
    @apply bg-slate-100 text-slate-700;
  }
}

@layer utilities {
  .text-balance {
    text-wrap: balance;
  }
  
  .section-padding {
    @apply py-16 sm:py-24;
  }
  
  .container-padding {
    @apply px-4 sm:px-6 lg:px-8;
  }
}

/* Animated Background */
@keyframes psychedelic {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
}

.animated-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: linear-gradient(
    45deg,
    #7B2CBF,
    #994DFF,
    #B05FFF,
    #994DFF,
    #7B2CBF,
    #5A189A
  );
  background-size: 400% 400%;
  animation: psychedelic 5s ease infinite;
}

.animated-background::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle at 30% 50%,
    rgba(255, 255, 255, 0.1) 0%,
    transparent 50%
  ),
  radial-gradient(
    circle at 70% 50%,
    rgba(153, 77, 255, 0.3) 0%,
    transparent 50%
  ),
  radial-gradient(
    circle at 50% 80%,
    rgba(176, 95, 255, 0.2) 0%,
    transparent 50%
  );
  animation: pulse 8s ease-in-out infinite;
}

.animated-background::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    repeating-radial-gradient(circle at 20% 30%, transparent 0, rgba(255,255,255,0.05) 10px, transparent 20px),
    repeating-radial-gradient(circle at 80% 70%, transparent 0, rgba(153,77,255,0.1) 15px, transparent 30px);
  animation: pulse 10s ease-in-out infinite reverse;
}

/* Jagged Border Effect - 5 teeth */
.jagged-top {
  position: relative;
  padding-top: 60px;
}

.jagged-top::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: 
    linear-gradient(135deg, #994DFF 50%, transparent 50%),
    linear-gradient(45deg, transparent 50%, #994DFF 50%);
  background-size: 20% 100%;
  background-position: 0% 0%, 10% 0%;
  background-repeat: repeat-x;
}

/* Marquee */
@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.marquee {
  display: flex;
  overflow: hidden;
  white-space: nowrap;
  background: #99FF69;
  border-top: 2px solid #000;
  border-bottom: 2px solid #000;
  padding: 12px 0;
}

.marquee-content {
  display: flex;
  animation: marquee 10s linear infinite;
  will-change: transform;
}

.marquee-item {
  display: inline-flex;
  align-items: center;
  padding: 0 2rem;
  font-family: 'Space Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', monospace;
  font-weight: 400;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #000;
}

.marquee-item::before {
  content: '✶';
  margin-right: 2rem;
  font-size: 1rem;
}
