/* ============================================================
   WiringCrew — Animations & Keyframes
   ============================================================ */

/* ── Keyframes ── */

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

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

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-48px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(48px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.82);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes scaleInFast {
  from {
    opacity: 0;
    transform: scale(0.6);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-64px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(64px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes bounce-arrow {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(7px);
  }
}

@keyframes pulse-dot {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.4);
    opacity: 0.6;
  }
}

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

@keyframes cardLift {
  from { transform: translateY(0); box-shadow: var(--shadow-sm); }
  to   { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
}

@keyframes countUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes rotateSlow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes ripple {
  0% {
    transform: scale(1);
    opacity: 0.6;
  }
  100% {
    transform: scale(2.4);
    opacity: 0;
  }
}

@keyframes drawCheck {
  from { stroke-dashoffset: 100; }
  to   { stroke-dashoffset: 0; }
}

@keyframes lightboxOpen {
  from {
    opacity: 0;
    transform: scale(0.88);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes lightboxClose {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.88);
  }
}

@keyframes progressFill {
  from { width: 0; }
}

@keyframes heroPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(232,93,38,0.4);
  }
  50% {
    box-shadow: 0 0 0 16px rgba(232,93,38,0);
  }
}

/* ── Data-animate base state ── */
[data-animate] {
  opacity: 0;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-animate="fade-up"] {
  transform: translateY(36px);
}

[data-animate="fade-left"] {
  transform: translateX(-48px);
}

[data-animate="fade-right"] {
  transform: translateX(48px);
}

[data-animate="fade-in"] {
  transform: none;
}

[data-animate="scale-in"] {
  transform: scale(0.88);
}

[data-animate].is-visible {
  opacity: 1;
  transform: none;
}

/* ── Animation utility classes ── */
.animate-fade-up {
  animation: fadeInUp 0.65s ease both;
}

.animate-fade-down {
  animation: fadeInDown 0.65s ease both;
}

.animate-fade-left {
  animation: fadeInLeft 0.65s ease both;
}

.animate-fade-right {
  animation: fadeInRight 0.65s ease both;
}

.animate-fade-in {
  animation: fadeIn 0.5s ease both;
}

.animate-scale-in {
  animation: scaleIn 0.5s ease both;
}

/* ── Hero stagger delays ── */
.hero-badge {
  animation: fadeInUp 0.6s ease 0.1s both;
}

.hero h1 {
  animation: fadeInUp 0.6s ease 0.3s both;
}

.hero-sub {
  animation: fadeInUp 0.6s ease 0.5s both;
}

.hero-btns {
  animation: fadeInUp 0.6s ease 0.7s both;
}

.hero-scroll {
  animation: fadeIn 0.8s ease 1.1s both;
}

/* ── Hero scroll arrow ── */
.hero-scroll-arrow {
  animation: bounce-arrow 2s ease 1.5s infinite;
}

/* ── Pulse dot for badge ── */
@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.5); opacity: 0.6; }
}

/* ── Scroll-triggered stagger delays (applied via JS) ── */
.stagger-1 { transition-delay: 0s !important; }
.stagger-2 { transition-delay: 0.1s !important; }
.stagger-3 { transition-delay: 0.2s !important; }
.stagger-4 { transition-delay: 0.3s !important; }
.stagger-5 { transition-delay: 0.4s !important; }
.stagger-6 { transition-delay: 0.5s !important; }

/* ── Shimmer loading for images ── */
.img-shimmer {
  background: linear-gradient(
    90deg,
    #e8ecf2 25%,
    #f4f6fa 50%,
    #e8ecf2 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

/* ── Counter number animation ── */
.trust-number {
  animation: countUp 0.4s ease both;
}

/* ── Card hover lift (utility) ── */
.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(10,22,40,0.16);
}

/* ── Lightbox transitions ── */
.lightbox {
  transition: opacity 0.3s ease;
}

.lightbox-inner {
  animation: none;
}

.lightbox.open .lightbox-inner {
  animation: lightboxOpen 0.3s ease both;
}

/* ── Success checkmark animation ── */
.success-check-path {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: drawCheck 0.6s ease 0.3s both;
}

/* ── scale-in for success icon ── */
@keyframes scale-in {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

/* ── Ring pulse for floating call button icon ── */
@keyframes ring-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(232,93,38,0.5); }
  60%  { box-shadow: 0 0 0 10px rgba(232,93,38,0); }
  100% { box-shadow: 0 0 0 0 rgba(232,93,38,0); }
}

/* ── Ripple spread for button click effect ── */
@keyframes ripple-spread {
  to {
    transform: scale(60);
    opacity: 0;
  }
}

/* ── Gallery pop-in after filter ── */
@keyframes gallery-popin {
  from {
    opacity: 0;
    transform: scale(0.88) translateY(16px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.booking-success.show .success-check {
  animation: scale-in 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.booking-success.show h2 {
  animation: fadeInUp 0.5s ease 0.25s both;
}

.booking-success.show p {
  animation: fadeInUp 0.5s ease 0.4s both;
}

/* ── FAQ chevron ── */
.faq-chevron {
  transition: transform 0.3s ease;
}

.faq-item.open .faq-chevron {
  transform: rotate(180deg);
}

/* ── Filter gallery transition ── */
.gallery-item {
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.gallery-item.hiding {
  opacity: 0;
  transform: scale(0.9);
}

/* ── Progress bar fill ── */
.progress-track {
  height: 4px;
  background: var(--grey-100);
  border-radius: 4px;
  overflow: hidden;
  max-width: 500px;
  margin: 12px auto 0;
}

.progress-fill {
  height: 100%;
  background: var(--orange);
  border-radius: 4px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Orange line underline for active filter btn ── */
.filter-btn.active {
  position: relative;
}

.filter-btn.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 2px;
  background: var(--orange);
  border-radius: 2px;
}

/* ── Page entrance ── */
main {
  animation: fadeIn 0.4s ease both;
}

/* ── Testimonial slide-in ── */
.testimonial-card[data-animate] {
  transform: translateY(32px);
}

/* ── Orange accent line for section titles ── */
.title-accent {
  display: inline-block;
  position: relative;
}

.title-accent::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 56px;
  height: 3px;
  background: var(--orange);
  border-radius: 2px;
}

/* ── Ripple on CTA button click ── */
.btn-primary {
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.18);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.btn-primary:active::after {
  opacity: 1;
}
