/* ============================================================
   ELECTRO-LITE SOLUTIONS — animations.css
   Loader · Droplets · Keyframes · Parallax
   ============================================================ */

/* ===== LOADER SCREEN ===== */
#loader {
  position: fixed;
  inset: 0;
  background: var(--brand-blue);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: opacity 0.8s ease;
}
#loader.fade-out {
  opacity: 0;
  pointer-events: none;
}

/* Loader logo */
#loader-logo {
  width: clamp(180px, 30vw, 260px);
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  z-index: 10;
}
#loader-logo.visible {
  opacity: 1;
  transform: scale(1);
}
#loader-logo.glow {
  animation: logo-neon-pulse 1.5s ease-in-out infinite;
}

@keyframes logo-neon-pulse {
  0%, 100% {
    filter: drop-shadow(0 0 8px rgba(232, 119, 34, 0.6))
            drop-shadow(0 0 20px rgba(232, 119, 34, 0.3));
  }
  50% {
    filter: drop-shadow(0 0 20px rgba(232, 119, 34, 0.9))
            drop-shadow(0 0 40px rgba(232, 119, 34, 0.5))
            drop-shadow(0 0 60px rgba(255, 140, 42, 0.3));
  }
}

/* Skip button */
#loader-skip {
  position: absolute;
  bottom: 28px;
  right: 28px;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.5);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s ease;
  z-index: 10001;
}
#loader-skip:hover {
  color: var(--brand-orange);
}

/* Loader CSS droplets (DOM elements, big + dramatic) */
.loader-drop {
  position: absolute;
  top: -60px;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  animation: drop-fall linear forwards;
  z-index: 2;
}

@keyframes drop-fall {
  0%   { transform: translateY(0) scaleX(0.9); opacity: 0; }
  10%  { opacity: 1; }
  85%  { transform: translateY(calc(var(--drop-travel) - 10px)) scaleX(0.9); opacity: 1; }
  88%  { transform: translateY(var(--drop-travel)) scaleX(1.3) scaleY(0.4); opacity: 0.8; }
  100% { transform: translateY(calc(var(--drop-travel) + 20px)) scaleX(1.3) scaleY(0); opacity: 0; }
}

/* Loader ripple */
.loader-ripple {
  position: absolute;
  border-radius: 50%;
  border: 2px solid var(--brand-orange);
  width: 0;
  height: 0;
  transform: translate(-50%, -50%);
  animation: ripple-expand 0.9s ease-out forwards;
  pointer-events: none;
  z-index: 3;
}

@keyframes ripple-expand {
  0%   { width: 0; height: 0; opacity: 0.8; }
  100% { width: 120px; height: 120px; opacity: 0; }
}

/* ===== MAIN PAGE FADE-IN ===== */
#main-content {
  opacity: 0;
  transition: opacity 0.8s ease;
}
#main-content.visible {
  opacity: 1;
}

/* ===== HERO SECTION STAGGER ANIMATIONS ===== */
.hero-eyebrow,
.hero-headline,
.hero-sub,
.hero-ctas,
.hero-scroll-cue {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.hero-eyebrow.animate    { opacity: 1; transform: translateY(0); transition-delay: 0.1s; }
.hero-headline.animate   { opacity: 1; transform: translateY(0); transition-delay: 0.35s; }
.hero-sub.animate        { opacity: 1; transform: translateY(0); transition-delay: 0.6s; }
.hero-ctas.animate       { opacity: 1; transform: translateY(0); transition-delay: 0.8s; }
.hero-scroll-cue.animate { opacity: 1; transform: translateY(0); transition-delay: 1.0s; }

/* ===== CHEVRON BOB ===== */
@keyframes chevron-bob {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(10px); }
}
.hero-scroll-cue svg {
  animation: chevron-bob 2s ease-in-out infinite;
}

/* ===== IV BAG DRIP ANIMATION ===== */
@keyframes iv-drip {
  0%   { opacity: 0; transform: translateY(0); }
  20%  { opacity: 0.9; }
  80%  { opacity: 0.7; }
  100% { opacity: 0; transform: translateY(36px); }
}
.iv-drip-drop {
  animation: iv-drip 1.6s ease-in infinite;
}
.iv-drip-drop:nth-child(1) { animation-delay: 0s; }
.iv-drip-drop:nth-child(2) { animation-delay: 0.4s; }
.iv-drip-drop:nth-child(3) { animation-delay: 0.8s; }
.iv-drip-drop:nth-child(4) { animation-delay: 1.2s; }

/* ===== AMBIENT RIPPLE ON CANVAS ===== */
/* Handled entirely in JS — no CSS needed */

/* ===== PARALLAX SECTIONS ===== */
.parallax-bg {
  background-attachment: scroll;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
@media (hover: hover) and (pointer: fine) {
  .parallax-bg { background-attachment: fixed; }
}

/* ===== SERVICE CARD HOVER ===== */
.service-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(232, 119, 34, 0.2);
  border-color: rgba(232, 119, 34, 0.8) !important;
}

/* ===== BENEFIT CARD HOVER ===== */
.benefit-card {
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}
.benefit-card:hover {
  background: rgba(232, 119, 34, 0.08) !important;
  border-color: rgba(232, 119, 34, 0.3) !important;
  transform: translateY(-4px);
}

/* ===== NAV TRANSITIONS ===== */
#navbar {
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* ===== MOBILE MENU ===== */
#mobile-overlay {
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1),
              visibility 0s linear 0.4s;
}
#mobile-overlay.open {
  transform: translateX(0);
  visibility: visible;
  transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1),
              visibility 0s linear 0s;
}

/* ===== PARTNERS SECTION ===== */
.gunners-badge {
  transition: transform 0.3s ease, filter 0.3s ease;
}
.gunners-badge:hover {
  transform: scale(1.03);
}

/* ===== CONTACT FORM ===== */
.form-input,
.form-select,
.form-textarea {
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--brand-orange) !important;
  box-shadow: 0 0 0 3px rgba(232, 119, 34, 0.2);
}

/* ===== SUBMIT BUTTON ===== */
.form-submit {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.form-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(232, 119, 34, 0.5) !important;
}
.form-submit:active {
  transform: translateY(0);
}

/* ===== SOCIAL ICON BUTTONS ===== */
.social-btn {
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.social-btn:hover {
  background: var(--brand-orange) !important;
  border-color: var(--brand-orange) !important;
  transform: scale(1.1);
}

/* ===== ABOUT IMAGE TILT ===== */
.about-photo-wrap {
  transform: rotate(-1.5deg);
  transition: transform 0.4s ease;
}
.about-photo-wrap:hover {
  transform: rotate(0deg);
}

/* ===== REDUCED MOTION OVERRIDES ===== */
@media (prefers-reduced-motion: reduce) {
  @keyframes logo-neon-pulse { 0%, 100% { filter: none; } }
  @keyframes chevron-bob     { 0%, 100% { transform: translateY(0); } }
  @keyframes iv-drip         { 0%, 100% { opacity: 0.5; transform: translateY(0); } }
  @keyframes drop-fall       { 0%, 100% { opacity: 0; } }
  .hero-eyebrow, .hero-headline, .hero-sub,
  .hero-ctas, .hero-scroll-cue {
    opacity: 1;
    transform: none;
  }
  .about-photo-wrap { transform: none; }
}
