/* ===================================
   INNOVA3.CL - Custom Styles
   =================================== */

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
}

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

::-webkit-scrollbar-track {
  background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #f0701f, #e15515);
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #e15515, #bb3f13);
}

/* ===================================
   Animations
   =================================== */

@keyframes blob {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(20px, -50px) scale(1.1);
  }
  50% {
    transform: translate(-20px, 20px) scale(0.9);
  }
  75% {
    transform: translate(50px, 50px) scale(1.05);
  }
}

.animate-blob {
  animation: blob 7s infinite;
}

.animation-delay-2000 {
  animation-delay: 2s;
}

.animation-delay-4000 {
  animation-delay: 4s;
}

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

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

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

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

@keyframes pulse-glow {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(240, 112, 31, 0.4);
  }
  50% {
    box-shadow: 0 0 40px rgba(240, 112, 31, 0.8);
  }
}

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

/* ===================================
   Grid Pattern Background
   =================================== */

.bg-grid-pattern {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 50px 50px;
}

/* ===================================
   Navigation
   =================================== */

#navbar {
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#navbar.scrolled {
  background: rgba(10, 10, 10, 0.95);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #f0701f, #e15515);
  transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* ===================================
   Buttons
   =================================== */

.btn-primary {
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-primary::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
  z-index: -1;
}

.btn-primary:hover::before {
  left: 100%;
}

/* ===================================
   Service Cards
   =================================== */

.service-card {
  position: relative;
}

.service-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 1rem;
  padding: 2px;
  background: linear-gradient(135deg, #f0701f, #e15515, #bb3f13);
  -webkit-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:hover::before {
  opacity: 1;
}

/* ===================================
   Portfolio
   =================================== */

.filter-btn {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 2px solid transparent;
}

.filter-btn:hover {
  background: rgba(240, 112, 31, 0.2);
  border-color: rgba(240, 112, 31, 0.5);
}

.filter-btn.active {
  background: linear-gradient(135deg, #f0701f, #e15515);
  border-color: #f0701f;
  box-shadow: 0 10px 30px rgba(240, 112, 31, 0.3);
}

.portfolio-item {
  transition: all 0.5s ease;
}

.portfolio-item.hidden {
  opacity: 0;
  transform: scale(0.8);
  height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

/* ===================================
   Form Styles
   =================================== */

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(240, 112, 31, 0.2);
}

.form-group input,
.form-group textarea,
.form-group select {
  transition: all 0.3s ease;
}

/* ===================================
   Parallax Effect
   =================================== */

.parallax {
  transform: translateZ(0);
  will-change: transform;
}

/* ===================================
   Glassmorphism
   =================================== */

.glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.glass-dark {
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ===================================
   Hover Effects
   =================================== */

.hover-lift {
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* ===================================
   Text Gradient
   =================================== */

.text-gradient {
  background: linear-gradient(135deg, #f0701f, #e15515);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===================================
   Loading Animation
   =================================== */

@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

.shimmer {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.2) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  background-size: 1000px 100%;
  animation: shimmer 2s infinite;
}

/* ===================================
   Stat Counter
   =================================== */

.stat-card {
  position: relative;
  padding: 1.5rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.stat-card:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(240, 112, 31, 0.2);
}

/* ===================================
   Responsive Design
   =================================== */

@media (max-width: 768px) {
  .text-5xl {
    font-size: 2.5rem;
  }

  .text-6xl {
    font-size: 3rem;
  }

  .text-7xl {
    font-size: 3.5rem;
  }

  .text-8xl {
    font-size: 4rem;
  }
}

/* ===================================
   Custom Utilities
   =================================== */

.shadow-glow {
  box-shadow: 0 0 30px rgba(240, 112, 31, 0.3);
}

.shadow-glow-lg {
  box-shadow: 0 0 50px rgba(240, 112, 31, 0.5);
}

.border-gradient {
  border: 2px solid transparent;
  background-image:
    linear-gradient(white, white), linear-gradient(135deg, #f0701f, #e15515);
  background-origin: border-box;
  background-clip: padding-box, border-box;
}

/* ===================================
   Smooth Transitions
   =================================== */

.transition-smooth {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===================================
   Image Overlay Effects
   =================================== */

.image-overlay {
  position: relative;
  overflow: hidden;
}

.image-overlay::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(240, 112, 31, 0.8),
    rgba(225, 85, 21, 0.8)
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.image-overlay:hover::after {
  opacity: 1;
}

.image-overlay img {
  transition: transform 0.5s ease;
}

.image-overlay:hover img {
  transform: scale(1.1);
}

/* ===================================
   Scroll Reveal Animations
   =================================== */

.reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.6s ease;
}

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

/* ===================================
   Custom Cursor Effect (Optional)
   =================================== */

.cursor-pointer {
  cursor: pointer;
}

/* ===================================
   Preloader (Optional)
   =================================== */

#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #0a0a0a;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loader {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(240, 112, 31, 0.3);
  border-top-color: #f0701f;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ===================================
   Print Styles
   =================================== */

@media print {
  .no-print {
    display: none !important;
  }
}

/* ===================================
   Accessibility
   =================================== */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Focus visible for keyboard navigation */
*:focus-visible {
  outline: 2px solid #f0701f;
  outline-offset: 2px;
}

/* ===================================
   Dark Mode Support (Future)
   =================================== */

@media (prefers-color-scheme: dark) {
  /* Already dark by default */
}

/* ===================================
   Performance Optimizations
   =================================== */

.gpu-accelerated {
  transform: translateZ(0);
  will-change: transform;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
