/* ===== Custom Styles for Zero Tolerance Plasma Cutting & Machining ===== */

/* Base */
html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
}

/* ===== Scroll Reveal Animations ===== */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
  }
  
  .reveal.revealed {
    opacity: 1;
    transform: translateY(0);
  }
}

/* For browsers that don't support prefers-reduced-motion, ensure content is visible */
@supports not (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ===== Hero Spark Particles ===== */
@keyframes sparkFloat {
  0%, 100% {
    opacity: 0;
    transform: translateY(0) scale(0);
  }
  10% {
    opacity: 1;
    transform: translateY(-10px) scale(1);
  }
  90% {
    opacity: 0.5;
    transform: translateY(-80px) scale(0.5);
  }
}

.spark-particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: radial-gradient(circle, #5eead4, transparent);
  border-radius: 50%;
  animation: sparkFloat var(--duration) ease-in-out var(--delay) infinite;
  box-shadow: 0 0 6px 2px rgba(94, 234, 212, 0.4);
}

/* ===== Hero Orb Pulse ===== */
.hero-orb {
  animation: orbPulse 6s ease-in-out infinite;
}

@keyframes orbPulse {
  0%, 100% {
    opacity: 0.5;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.1);
  }
}

/* ===== Navbar Scroll State ===== */
.nav-scrolled {
  background: rgba(4, 8, 20, 0.95) !important;
  backdrop-filter: blur(20px) !important;
  border-bottom: 1px solid rgba(52, 211, 153, 0.1) !important;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3) !important;
}

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

::-webkit-scrollbar-track {
  background: #040814;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, #34d399, #10b981);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(to bottom, #5eead4, #34d399);
}

/* ===== Selection Color ===== */
::selection {
  background: rgba(52, 211, 153, 0.3);
  color: #5eead4;
}

/* ===== Focus Styles ===== */
input:focus,
textarea:focus,
button:focus {
  outline: none;
}

/* ===== Mobile Menu Transitions ===== */
#mobile-menu {
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Card Hover Glow ===== */
.group:hover .group-hover\:shadow-mint-500\/20 {
  box-shadow: 0 0 30px rgba(52, 211, 153, 0.2);
}

/* ===== Gradient Text Fallback ===== */
.text-transparent.bg-clip-text.bg-gradient-to-r {
  background-clip: text;
  -webkit-background-clip: text;
}

/* ===== Gallery Image Hover ===== */
.relative.rounded-xl.overflow-hidden.group img {
  will-change: transform;
}

/* ===== Responsive Adjustments ===== */
@media (max-width: 768px) {
  .hero-orb {
    display: none;
  }
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
  
  .spark-particle {
    display: none;
  }
  
  .hero-orb {
    animation: none;
    opacity: 0.5;
  }
}
