/* Black and Heale Construction Ltd - Dynamic Animations & Visual Effects */

/* Hero Entrance & Ambient Keyframes */
@keyframes heroFadeDown {
  from {
    opacity: 0;
    transform: translateY(-25px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

@keyframes heroScaleUp {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes heroCardFloatIn {
  from {
    opacity: 0;
    transform: translateX(40px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes orbPulseFloat {
  0%, 100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.35;
  }
  50% {
    transform: translate(35px, -30px) scale(1.2);
    opacity: 0.65;
  }
}

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

/* CHARACTER BLUR STAGGER / TYPING REVEAL ANIMATION */
@keyframes charBlurIn {
  0% {
    opacity: 0;
    filter: blur(8px);
    transform: translateY(4px);
  }
  100% {
    opacity: 1;
    filter: blur(0px);
    transform: translateY(0);
  }
}

.faq-answer p {
  opacity: 1 !important;
  visibility: visible !important;
}

.faq-answer p .char-span {
  display: inline-block;
  opacity: 0;
  animation: charBlurIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  will-change: opacity, filter, transform;
}

/* EDITORIAL REVEAL IMAGE MASK (RECTANGULAR EXPANSION) */
.service-circle-img-wrap,
.editorial-mask-reveal {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  transform: none;
  opacity: 1;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.service-circle-card.is-visible .service-circle-img-wrap,
.editorial-mask-reveal.is-visible {
  opacity: 1;
}

.service-circle-img-wrap img,
.editorial-mask-reveal img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.service-circle-card.is-visible .service-circle-img-wrap img,
.editorial-mask-reveal.is-visible img {
  transform: scale(1);
}

.service-circle-card:hover .service-circle-img-wrap img,
.editorial-mask-reveal:hover img {
  transform: scale(1.05);
}

@keyframes pulseGold {
  0% {
    box-shadow: 0 0 0 0 rgba(197, 160, 89, 0.5);
  }
  70% {
    box-shadow: 0 0 0 16px rgba(197, 160, 89, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(197, 160, 89, 0);
  }
}

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

/* HERO SECTION ENTRANCE ANIMATIONS */
.hero-section .hero-badge-strip {
  animation: heroFadeDown 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s backwards;
}

.hero-section .hero-title {
  animation: heroSlideLeft 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.2s backwards;
}

.hero-section .text-gold {
  background: linear-gradient(135deg, #5c701b 0%, #7e9927 30%, #4a5c13 60%, #8ea832 85%, #5c701b 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: goldTextShimmer 4s ease infinite;
}

.hero-section .hero-description {
  animation: heroFadeUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.35s backwards;
}

.hero-section .hero-cta-group {
  animation: heroScaleUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.5s backwards;
}

.hero-section .hero-reassurance {
  animation: heroFadeUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.65s backwards;
}

.hero-section .hero-form-card {
  animation: heroCardFloatIn 1.1s cubic-bezier(0.16, 1, 0.3, 1) 0.3s backwards;
}

/* AMBIENT BACKGROUND GLOW ORBS */
.hero-bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

.hero-bg-orb-1 {
  top: -10%;
  right: 15%;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(197, 160, 89, 0.18) 0%, rgba(197, 160, 89, 0) 70%);
  animation: orbPulseFloat 8s ease-in-out infinite;
}

.hero-bg-orb-2 {
  bottom: 5%;
  left: -5%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.05) 0%, rgba(15, 23, 42, 0) 70%);
  animation: orbPulseFloat 10s ease-in-out infinite reverse;
}

/* IntersectionObserver Scroll Reveal Base (Fail-safe Visibility) */
.reveal-on-scroll,
.section-header,
.service-card,
.service-circle-card,
.gallery-item,
.faq-item {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1), transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

body.js-reveal-active .reveal-on-scroll:not(.is-visible),
body.js-reveal-active .section-header:not(.is-visible),
body.js-reveal-active .service-card:not(.is-visible),
body.js-reveal-active .service-circle-card:not(.is-visible),
body.js-reveal-active .gallery-item:not(.is-visible),
body.js-reveal-active .faq-item:not(.is-visible) {
  opacity: 0;
  transform: translateY(24px);
}

.reveal-on-scroll.is-visible,
.section-header.is-visible,
.service-card.is-visible,
.service-circle-card.is-visible,
.gallery-item.is-visible,
.faq-item.is-visible {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* Stagger Delays for Cascade Grid Animations */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }

/* Interactive Hover Lift on Cards */
.service-card,
.service-circle-card,
.gallery-item,
.hero-form-card {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s ease;
}

.service-card:hover,
.service-circle-card:hover,
.gallery-item:hover {
  transform: translateY(-8px) scale(1.015);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
  border-color: var(--gold-primary) !important;
}

.service-circle-card:hover .service-circle-img,
.service-card:hover .service-card-img,
.gallery-item:hover img {
  transform: scale(1.08);
}

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

/* Pulse Button Effect */
.btn-pulse {
  animation: pulseGold 2.5s infinite;
}

/* Continuous Marquee Ticker */
.marquee-container {
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  width: 100%;
}

.marquee-track {
  display: inline-flex;
  gap: 3rem;
  animation: marqueeScroll 25s linear infinite;
  will-change: transform;
}

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

/* SUBTLE HIGH-END MICRO-ANIMATIONS */

/* 1. Subtle Button Light Shimmer */
@keyframes btnShimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.28) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-20deg);
  animation: btnShimmer 4.5s infinite linear;
  pointer-events: none;
}

/* 2. Gentle Vertical Floating on Reassurance Badges */
@keyframes gentleFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}

.hero-reassurance-item {
  animation: gentleFloat 3.5s ease-in-out infinite;
}

.hero-reassurance-item:nth-child(2) {
  animation-delay: 0.6s;
}

.hero-reassurance-item:nth-child(3) {
  animation-delay: 1.2s;
}

/* 3. Subtle Section Tag Ambient Glow */
@keyframes tagGlow {
  0%, 100% {
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.15);
  }
  50% {
    box-shadow: 0 4px 14px rgba(56, 189, 248, 0.35);
  }
}

.section-tag {
  animation: tagGlow 3s ease-in-out infinite;
}

/* 4. Suburb Pill Micro Hover Lift */
.suburbs-grid a {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}

.suburbs-grid a:hover {
  transform: translateY(-3px) scale(1.015);
  border-color: #0284c7 !important;
  box-shadow: 0 6px 18px rgba(2, 132, 199, 0.12) !important;
}

/* 5. Before/After Slider Handle Pulse Ring (Invites Touch Interaction) */
@keyframes handlePulseRing {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(2, 132, 199, 0.45);
  }
  50% {
    box-shadow: 0 0 0 12px rgba(2, 132, 199, 0);
  }
}

.slider-handle-button {
  animation: handlePulseRing 2.8s ease-in-out infinite;
}

/* 6. Form Input Focus Subtle Border Glow */
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: #0284c7 !important;
  box-shadow: 0 0 0 3.5px rgba(2, 132, 199, 0.18) !important;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

/* 7. Card Arrow Icon Micro-Slide on Hover */
.service-card .btn svg,
.service-circle-card .btn svg,
.service-editorial-card .btn svg,
.hero-cta-group .btn svg {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-card:hover .btn svg,
.service-circle-card:hover .btn svg,
.service-editorial-card:hover .btn svg,
.hero-cta-group .btn:hover svg {
  transform: translateX(4px);
}

/* 8. Process Step Number & Wizard Step Glow */
@keyframes stepNumberGlow {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(2, 132, 199, 0.25);
  }
  50% {
    transform: scale(1.04);
    box-shadow: 0 0 0 8px rgba(2, 132, 199, 0);
  }
}

.process-step-number,
.wizard-step-num {
  animation: stepNumberGlow 3.2s ease-in-out infinite;
}

/* 9. Header Phone Call Button Pulse Icon */
@keyframes phoneIconBounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-2px);
  }
}

.btn-phone svg,
.header-phone svg {
  animation: phoneIconBounce 2.5s ease-in-out infinite;
}

/* 10. Footer Link Hover Micro Shift */
.footer-links a {
  display: inline-block;
  transition: transform 0.25s ease, color 0.25s ease;
}

.footer-links a:hover {
  transform: translateX(4px);
  color: #38bdf8 !important;
}


