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

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

:root {
  --avanzato-green: #cbf400;
  --avanzato-black: #0e0e0e;
  --avanzato-white: #ffffff;
  --avanzato-gray: #1a1a1a;
  --avanzato-gray-light: #2a2a2a;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Urbanist', sans-serif;
  background-color: var(--avanzato-black);
  color: var(--avanzato-white);
  overflow-x: hidden;
  font-weight: 400;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Urbanist', sans-serif;
  font-weight: 900;
}

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

::-webkit-scrollbar-track {
  background: var(--avanzato-black);
}

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

::-webkit-scrollbar-thumb:hover {
  background: #b8e000;
}

/* Animation utilities */
@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(203, 244, 0, 0.3);
  }
  50% {
    box-shadow: 0 0 40px rgba(203, 244, 0, 0.6);
  }
}

@keyframes gradient-shift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

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

@keyframes draw-line {
  0% {
    stroke-dashoffset: 1000;
  }
  100% {
    stroke-dashoffset: 0;
  }
}

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

.animate-pulse-glow {
  animation: pulse-glow 2s ease-in-out infinite;
}

.animate-gradient {
  background-size: 200% 200%;
  animation: gradient-shift 8s ease infinite;
}

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

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

/* Glassmorphism */
.glass {
  background: rgba(14, 14, 14, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(203, 244, 0, 0.1);
}

.glass-dark {
  background: rgba(26, 26, 26, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Text gradient */
.text-gradient {
  background: linear-gradient(135deg, var(--avanzato-green), #d4ff1a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Button styles */
.btn-primary {
  background: var(--avanzato-green);
  color: var(--avanzato-black);
  padding: 14px 32px;
  border-radius: 8px;
  font-weight: 700;
  font-family: 'Urbanist', sans-serif;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 15px rgba(203, 244, 0, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(203, 244, 0, 0.5);
  background: #d4ff1a;
}

.btn-secondary {
  background: transparent;
  color: var(--avanzato-green);
  padding: 14px 32px;
  border-radius: 8px;
  font-weight: 700;
  font-family: 'Urbanist', sans-serif;
  border: 2px solid var(--avanzato-green);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-secondary:hover {
  background: var(--avanzato-green);
  color: var(--avanzato-black);
  transform: translateY(-2px);
}

/* Card hover effect */
.card-3d {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transform-style: preserve-3d;
}

.card-3d:hover {
  transform: perspective(1000px) rotateX(5deg) rotateY(-5deg) translateZ(20px);
}

/* Input focus effect */
.input-focus {
  position: relative;
}

.input-focus::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--avanzato-green);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transform: translateX(-50%);
}

.input-focus:focus-within::after {
  width: 100%;
}

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

/* Section padding */
.section-padding {
  padding: 100px 0;
}

@media (max-width: 768px) {
  .section-padding {
    padding: 60px 0;
  }
}

/* Container */
.container-custom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

@media (min-width: 1024px) {
  .container-custom {
    padding: 0 48px;
  }
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
}

.stagger-children.active > *:nth-child(1) { animation: fadeInUp 0.6s 0.1s forwards; }
.stagger-children.active > *:nth-child(2) { animation: fadeInUp 0.6s 0.2s forwards; }
.stagger-children.active > *:nth-child(3) { animation: fadeInUp 0.6s 0.3s forwards; }
.stagger-children.active > *:nth-child(4) { animation: fadeInUp 0.6s 0.4s forwards; }

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Particle canvas */
.particle-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Progress bar */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--avanzato-green);
  z-index: 9999;
  transition: width 0.1s linear;
}

/* Navigation */
.nav-sticky {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-sticky.scrolled {
  background: rgba(14, 14, 14, 0.95);
  backdrop-filter: blur(20px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

/* Service card border animation */
.service-card-border {
  position: relative;
}

.service-card-border::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  padding: 2px;
  background: linear-gradient(135deg, transparent, var(--avanzato-green), transparent);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.service-card-border:hover::before {
  opacity: 1;
}

/* Counter animation */
.counter {
  font-variant-numeric: tabular-nums;
}

/* Quote mark */
.quote-mark {
  font-size: 120px;
  line-height: 1;
  color: var(--avanzato-green);
  opacity: 0.1;
  font-family: Georgia, serif;
}

/* Responsive typography */
@media (max-width: 768px) {
  h1 {
    font-size: 2.5rem !important;
  }
  h2 {
    font-size: 2rem !important;
  }
}
