/* ═══════════════════════════════════════════════════════════
   QUANTUM DIGITIZING — PREMIUM ANIMATIONS SYSTEM
   Performance-optimized, mobile-friendly animations
   ═══════════════════════════════════════════════════════════ */

/* ── HERO SECTION ── */

/* Logo scale-in */
@keyframes qd-logoReveal {
  from { opacity: 0; transform: scale(0.85); filter: blur(8px); }
  to   { opacity: 1; transform: scale(1);    filter: blur(0); }
}

.hero-premium-content > div:first-child {
  animation: qd-logoReveal 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
  opacity: 0;
}

/* Staggered slide-up for hero text */
@keyframes qd-slideUp {
  from { opacity: 0; transform: translateY(40px); filter: blur(4px); }
  to   { opacity: 1; transform: translateY(0);    filter: blur(0); }
}

.hero-premium-content h1 {
  animation: qd-slideUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.4s forwards !important;
  opacity: 0;
}

.hero-premium-content p {
  animation: qd-slideUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.65s forwards !important;
  opacity: 0;
}

/* CTA button pulse glow */
@keyframes qd-ctaPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(244, 168, 80, 0.4); }
  50%      { box-shadow: 0 0 20px 4px rgba(244, 168, 80, 0.15); }
}

.hero-btns {
  animation: qd-slideUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.85s forwards !important;
  opacity: 0;
}

.hero-btns .btn-primary {
  animation: qd-ctaPulse 3s ease-in-out 2s infinite;
}

  .hero-btns .btn-primary:hover {
    transform: scale(1.03) translateY(-2px);
    box-shadow: 0 20px 60px rgba(244, 168, 80, 0.26);
  }

  .stitch-underline {
    width: 120px;
    margin: 18px auto 0;
    display: block;
    overflow: hidden;
  }

  .stitch-line-svg {
    width: 100%;
    height: 10px;
    display: block;
  }

  .stitch-line-svg path {
    stroke: var(--gold);
    stroke-width: 2.5;
    stroke-linecap: round;
    fill: none;
    stroke-dasharray: 120;
    stroke-dashoffset: 120;
    transition: stroke-dashoffset 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .stitch-line-svg.in-view path {
    stroke-dashoffset: 0;
  }

  .sec-header .stitch-underline,
  .label-row .stitch-underline {
    max-width: 160px;
  }

              box-shadow 0.45s ease;
}

.service-card-lg:hover {
  transform: translateY(-8px) !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4),
              0 0 40px rgba(244, 168, 80, 0.08) !important;
}

.service-card-lg:hover img {
  transform: scale(1.05);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-card-lg img {
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Icon micro-animation on card hover */
.service-card-lg:hover .service-content-lg h3 {
  color: var(--gold);
  transition: color 0.3s ease;
}

/* ── APPAREL / PATCH CARDS ── */

.apparel-card {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.4s ease,
              border-color 0.4s ease;
}

.apparel-card:hover {
  transform: translateY(-6px) !important;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35),
              0 0 30px rgba(244, 168, 80, 0.06) !important;
  border-color: rgba(244, 168, 80, 0.25) !important;
}

/* Icon bounce on hover */
@keyframes qd-iconBounce {
  0%, 100% { transform: translateY(0); }
  30%      { transform: translateY(-6px); }
  60%      { transform: translateY(-2px); }
}

.apparel-card:hover .apparel-icon {
  animation: qd-iconBounce 0.6s ease;
  color: var(--gold);
}

.apparel-icon {
  transition: color 0.3s ease;
}

/* ── SKILL BARS — ANIMATED FILL ── */

.skill-progress,
.skill-bar-fill {
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.skill-progress.animated,
.skill-bar-fill.animated {
  transform: scaleX(1);
}

/* ── STAT COUNTERS — Smooth pulse on complete ── */

@keyframes qd-statPop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.08); }
  100% { transform: scale(1); }
}

.about-stat-num.counted {
  animation: qd-statPop 0.4s ease;
}

/* ── COMPARISON SECTION ── */

.comp-item {
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.comp-item:hover {
  transform: scale(1.03);
}

.comp-item:hover img {
  filter: none !important;
  transition: filter 0.6s ease;
}

.comp-item img {
  transition: filter 0.6s ease, transform 0.6s ease;
}

/* ── FEATURE IMAGES — Parallax-ready ── */

.big-feature-img {
  overflow: hidden;
}

.big-feature-img img {
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.big-feature-img:hover img {
  transform: scale(1.04);
}

/* ── PRICING CARDS — Enhanced hover ── */

.pricing-card-premium {
  transition: opacity 0.7s ease,
              transform 0.7s ease,
              border-color 0.4s ease,
              box-shadow 0.4s ease !important;
}

.pricing-card-premium:hover {
  border-color: rgba(244, 168, 80, 0.4) !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5),
              0 0 40px rgba(244, 168, 80, 0.06) !important;
}

/* ── CTA SECTIONS — Animated gradient ── */

@keyframes qd-gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.cta-section,
section[style*="background:var(--bg2)"] .btn-primary {
  background-size: 200% 200%;
}

/* ── BUTTONS — Magnetic lift effect ── */

.btn-primary {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.3s ease;
  position: relative;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(244, 168, 80, 0.25);
}

.btn-primary:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(244, 168, 80, 0.2);
}

.btn-secondary {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s ease,
              color 0.3s ease;
}

.btn-secondary:hover {
  transform: translateY(-3px);
  border-color: var(--gold) !important;
  color: var(--gold) !important;
}

/* ── TICKER — Smooth infinite scroll ── */

.ticker-track {
  animation: ticker-scroll 25s linear infinite;
}

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

.ticker:hover .ticker-track {
  animation-play-state: paused;
}

/* ── GLOBAL SCROLL REVEALS (CSS fallback) ── */

.qd-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.qd-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.qd-stagger > * {
  opacity: 0;
  transform: translateY(25px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.qd-stagger.visible > *:nth-child(1) { transition-delay: 0.05s; }
.qd-stagger.visible > *:nth-child(2) { transition-delay: 0.12s; }
.qd-stagger.visible > *:nth-child(3) { transition-delay: 0.19s; }
.qd-stagger.visible > *:nth-child(4) { transition-delay: 0.26s; }
.qd-stagger.visible > *:nth-child(5) { transition-delay: 0.33s; }
.qd-stagger.visible > *:nth-child(6) { transition-delay: 0.40s; }

.qd-stagger.visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* ── NAV — Glass effect on scroll ── */

nav.scrolled {
  background: rgba(11, 15, 20, 0.92) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* ── SECTION LABELS — Subtle entrance ── */

.sec-label {
  transition: letter-spacing 0.4s ease;
}

.sec-label:hover {
  letter-spacing: 6px;
}

/* ── MOBILE OPTIMIZATIONS ── */

@media (max-width: 768px) {
  /* Reduce animation intensity for mobile perf */
  .service-card-lg:hover {
    transform: translateY(-4px) !important;
  }
  
  .apparel-card:hover {
    transform: translateY(-3px) !important;
  }
  
  .pricing-card-premium.card-visible:hover {
    transform: translateY(-3px) !important;
  }
  
  .big-feature-img:hover img {
    transform: scale(1.02);
  }

  /* Disable cursor ring on mobile */
  #cur, #cur-ring {
    display: none !important;
  }
}

/* ── REDUCED MOTION PREFERENCE ── */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .ticker-track {
    animation: none !important;
  }
}
