/* ============================================================
   HOME PAGE ENHANCEMENTS
   Supplementary styles — does NOT modify agency.css
   ============================================================ */

/* ----------------------------------------------------------
   1. SCROLL-TRIGGERED ANIMATIONS
   ---------------------------------------------------------- */
.animate-on-scroll {
  opacity: 0;
  transition: opacity 0.8s ease, transform 0.8s ease;
}

/* Fade up (default) */
.animate-on-scroll.fade-up {
  transform: translateY(40px);
}
.animate-on-scroll.fade-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Slide from left */
.animate-on-scroll.slide-left {
  transform: translateX(-60px);
}
.animate-on-scroll.slide-left.is-visible {
  opacity: 1;
  transform: translateX(0);
}

/* Slide from right */
.animate-on-scroll.slide-right {
  transform: translateX(60px);
}
.animate-on-scroll.slide-right.is-visible {
  opacity: 1;
  transform: translateX(0);
}

/* Scale up */
.animate-on-scroll.scale-up {
  transform: scale(0.85);
}
.animate-on-scroll.scale-up.is-visible {
  opacity: 1;
  transform: scale(1);
}

/* Stagger delays for children */
.stagger-1 { transition-delay: 0.1s !important; }
.stagger-2 { transition-delay: 0.25s !important; }
.stagger-3 { transition-delay: 0.4s !important; }
.stagger-4 { transition-delay: 0.55s !important; }
.stagger-5 { transition-delay: 0.7s !important; }
.stagger-6 { transition-delay: 0.85s !important; }

/* ----------------------------------------------------------
   2. HERO LAYOUT (parallax removed — contain looks better static)
   ---------------------------------------------------------- */
header.masthead {
  overflow: hidden;
  position: relative;
}
header.masthead .container {
  position: relative;
  z-index: 1;
}

/* ----------------------------------------------------------
   3. TYPING EFFECT
   ---------------------------------------------------------- */
.typing-cursor {
  display: inline-block;
  width: 3px;
  margin-left: 2px;
  background-color: #fed136;
  animation: blink-cursor 0.75s step-end infinite;
}
@keyframes blink-cursor {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0; }
}

/* ----------------------------------------------------------
   4a. SERVICE ICON HOVER EFFECTS
   ---------------------------------------------------------- */
#services .col-md-4 {
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  padding: 30px 15px;
  border-radius: 8px;
}
#services .col-md-4:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}
#services .fa-stack {
  transition: transform 0.4s ease;
}
#services .col-md-4:hover .fa-stack {
  transform: rotate(360deg) scale(1.1);
}

/* 4b. PORTFOLIO CARD HOVER EFFECTS */
#portfolio .portfolio-item .portfolio-link img {
  transition: transform 0.5s ease;
}
#portfolio .portfolio-item .portfolio-link:hover img {
  transform: scale(1.08);
}
#portfolio .portfolio-item .portfolio-link {
  overflow: hidden;
}
#portfolio .portfolio-item .portfolio-caption {
  transition: background-color 0.3s ease;
}
#portfolio .portfolio-item:hover .portfolio-caption {
  background-color: #fdf5d6;
}

/* 4c. TIMELINE IMAGE HOVER */
.timeline > li .timeline-image {
  transition: box-shadow 0.4s ease, transform 0.4s ease, border-color 0.4s ease;
}
.timeline > li .timeline-image:hover {
  transform: scale(1.1);
  border-color: #fed136;
  box-shadow: 0 0 20px rgba(254, 209, 54, 0.6);
}

/* 4d. NAV LINK UNDERLINE SLIDE */
#mainNav .navbar-nav .nav-item .nav-link {
  position: relative;
}
#mainNav .navbar-nav .nav-item .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: #fed136;
  transition: width 0.3s ease, left 0.3s ease;
}
#mainNav .navbar-nav .nav-item .nav-link:hover::after,
#mainNav .navbar-nav .nav-item .nav-link.active::after {
  width: 100%;
  left: 0;
}

/* 4e. SOCIAL BUTTON BOUNCE */
ul.social-buttons li a:hover {
  transform: scale(1.25);
  box-shadow: 0 4px 15px rgba(254, 209, 54, 0.5);
}

/* ----------------------------------------------------------
   5. SCROLL-DOWN BOUNCE ARROW
   ---------------------------------------------------------- */
.scroll-down-arrow {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  cursor: pointer;
}
.scroll-down-arrow i {
  font-size: 28px;
  color: rgba(255, 255, 255, 0.85);
  animation: bounce-arrow 2s infinite;
}
@keyframes bounce-arrow {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40%  { transform: translateY(-14px); }
  60%  { transform: translateY(-7px); }
}

/* ----------------------------------------------------------
   6. TILT EFFECT (handled by JS; just ensure perspective)
   ---------------------------------------------------------- */
#portfolio .portfolio-item .portfolio-link {
  transform-style: preserve-3d;
  perspective: 800px;
}

/* ----------------------------------------------------------
   7. MOUSE RIPPLE CLICK EFFECT
   ---------------------------------------------------------- */
.click-ripple {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  background: rgba(254, 209, 54, 0.35);
  transform: scale(0);
  animation: ripple-expand 0.6s ease-out forwards;
  z-index: 99999;
}
@keyframes ripple-expand {
  to {
    transform: scale(1);
    opacity: 0;
  }
}

/* ----------------------------------------------------------
   8. PARTICLES CANVAS (hero background)
   ---------------------------------------------------------- */
#particles-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}
header.masthead .container {
  z-index: 2;
}

/* ----------------------------------------------------------
   SECTION DIVIDERS (bonus visual polish)
   ---------------------------------------------------------- */
.section-divider {
  position: relative;
}
.section-divider::after {
  content: '';
  display: block;
  width: 80px;
  height: 3px;
  margin: 20px auto 0;
  background: linear-gradient(90deg, transparent, #fed136, transparent);
  border-radius: 2px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  .animate-on-scroll,
  .typing-cursor,
  .scroll-down-arrow i,
  .click-ripple,
  #services .fa-stack,
  #services .col-md-4,
  .timeline > li .timeline-image,
  #portfolio .portfolio-item .portfolio-link img {
    animation: none !important;
    transition: none !important;
  }
  .animate-on-scroll {
    opacity: 1 !important;
    transform: none !important;
  }
}
