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

@import './typography.css';
@import './gradients.css';
@import './glass.css';

body {
  overflow-x: hidden;
  background-color: #050505;
}

.noise-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='1'/%3E%3C/svg%3E");
}

.grid-background {
  background-size: 50px 50px;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
}

::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #050505; 
}
::-webkit-scrollbar-thumb {
  background: #333; 
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #CCFF33; 
}

[x-cloak] {
    display: none !important;
}

/* ========================================
   BUTTON DESIGN SYSTEM
   Unified button styles for consistency
   ======================================== */

/* Design Tokens */
:root {
  --btn-radius: 9999px;           /* rounded-full */
  --btn-transition: all 200ms ease;
  --color-primary: #CCFF33;        /* mistrz-lime */
  --color-primary-hover: #fff;
  --color-black: #050505;
}

/* Base Button - Shared properties */
.btn {
  @apply inline-flex items-center justify-center gap-2;
  @apply font-semibold transition-all cursor-pointer;
  @apply focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-mistrz-lime focus-visible:ring-offset-2 focus-visible:ring-offset-black;
  border-radius: var(--btn-radius);
  transition: var(--btn-transition);
}

/* Primary CTA Button - Main actions (Umów Konsultację, Submit forms) */
.btn-primary {
  @apply btn;
  @apply px-8 py-4 bg-mistrz-lime text-black;
}

.btn-primary:hover:not(:disabled) {
  @apply bg-white scale-[1.02];
  box-shadow: 0 0 20px rgba(204, 255, 51, 0.4);
}

.btn-primary:active:not(:disabled) {
  @apply scale-[0.98];
}

.btn-primary:disabled {
  @apply opacity-50 cursor-not-allowed;
}

/* Secondary Ghost Button - Navbar, cards (subtle actions) */
.btn-secondary {
  @apply btn;
  @apply px-6 py-2.5 bg-white/5 text-white;
  @apply border border-white/10;
}

.btn-secondary:hover:not(:disabled) {
  @apply bg-white/10 border-mistrz-lime/50 text-mistrz-lime;
}

/* Tertiary Outline Button - Pricing cards, less important actions */
.btn-tertiary {
  @apply btn;
  @apply px-6 py-3 bg-transparent text-white;
  @apply border border-white/20;
}

.btn-tertiary:hover:not(:disabled) {
  @apply bg-white/5;
}

/* Button Sizes */
.btn-sm {
  @apply px-4 py-2 text-sm;
}

.btn-lg {
  @apply px-10 py-5 text-xl;
}

/* Mobile Menu CTA - Large version for mobile overlays */
.btn-mobile-cta {
  @apply btn-primary btn-lg;
}

/* Skip Link - Accessibility (Native CSS for Tailwind CDN compatibility) */
.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.skip-link:focus {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 100000;
  width: auto;
  height: auto;
  padding: 0.75rem 1.5rem;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
  background-color: #CCFF33;
  color: #050505;
  font-weight: 700;
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}

/* ========================================
   HERO ANIMATIONS
   Floating cards and visual effects
   ======================================== */

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

@keyframes float-delay {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-15px);
  }
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

.animate-float-delay {
  animation: float-delay 3s ease-in-out infinite 1.5s;
}
