/* ==========================================================================
   KOTE Studio - Home Page Elegant Animations
   ========================================================================== */

/* 1. Hero Onload Intro Animations */
@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.97);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideUpFade {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* Hero Image Ken Burns effect (gentle zoom/pan without scroll) */
@keyframes slowPan {
  0% {
    transform: scale(1) translate(0, 0);
  }
  50% {
    transform: scale(1.12) translate(-2%, -1%);
  }
  100% {
    transform: scale(1.08) translate(1%, -2%);
  }
}

.hero-image picture {
  display: block;
  width: 100%;
  height: 100%;
  animation: slowPan 36s ease-in-out infinite alternate;
  will-change: transform;
}

/* Hero Stage elements reveal (only when scrolling down under hero image) */
.hero-stage .home-reveal {
  opacity: 0;
  transition: none !important;
  transform: none !important;
}

.hero-stage .sub-logo.in-view {
  animation: fadeInScale 1.2s cubic-bezier(0.215, 0.610, 0.355, 1.000) both;
}

.hero-stage .hero-caption.in-view {
  animation: fadeInScale 1.2s cubic-bezier(0.215, 0.610, 0.355, 1.000) 0.15s both;
}

.hero-stage .hero-title.in-view {
  animation: slideUpFade 1.4s cubic-bezier(0.215, 0.610, 0.355, 1.000) 0.2s both;
}

.hero-stage .hero-copy.in-view {
  animation: slideUpFade 1.4s cubic-bezier(0.215, 0.610, 0.355, 1.000) 0.35s both;
}

.hero-stage .hero-link.in-view {
  animation: slideUpFade 1.4s cubic-bezier(0.215, 0.610, 0.355, 1.000) 0.5s both;
}


/* 2. Scroll-Driven Reveal (IntersectionObserver Hook) */
.home-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s cubic-bezier(0.215, 0.610, 0.355, 1.000),
              transform 1s cubic-bezier(0.215, 0.610, 0.355, 1.000);
  will-change: transform, opacity;
}

.home-reveal.in-view {
  opacity: 1;
  transform: translateY(0) !important;
}

/* Section titles special reveal */
.section-title.home-reveal,
.why-title.home-reveal,
.services-title.home-reveal,
.portfolio-wave h2.home-reveal,
.refs-title.home-reveal {
  transform: translateY(15px);
  transition: opacity 1.2s cubic-bezier(0.215, 0.610, 0.355, 1.000),
              transform 1.2s cubic-bezier(0.215, 0.610, 0.355, 1.000);
}

/* 3. Stagger Delays for Grid/Column Layouts */
/* Why KOTE points (staggered in 3-column rows) */
.why-point-1 { transition-delay: 0.05s; }
.why-point-2 { transition-delay: 0.15s; }
.why-point-3 { transition-delay: 0.25s; }
.why-point-4 { transition-delay: 0.05s; }
.why-point-5 { transition-delay: 0.15s; }
.why-point-6 { transition-delay: 0.25s; }

/* Services columns */
.services-col-1 { transition-delay: 0.05s; }
.services-col-2 { transition-delay: 0.15s; }
.services-col-3 { transition-delay: 0.25s; }

/* 4. Elegant Hover Micro-Interactions */

/* Why Points */
.why-point {
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              opacity 1s cubic-bezier(0.215, 0.610, 0.355, 1.000) !important;
}

.why-point:hover {
  transform: translateY(-5px) !important;
}

.why-point-number {
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.why-point:hover .why-point-number {
  transform: scale(1.05);
}

/* Services Columns */
.services-col {
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              opacity 1s cubic-bezier(0.215, 0.610, 0.355, 1.000) !important;
}

.services-col:hover {
  transform: translateY(-6px) !important;
}

.services-col img {
  transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              box-shadow 0.7s ease;
}

.services-col:hover img {
  transform: scale(1.03) rotate(0.5deg);
  box-shadow: 0 15px 35px rgba(204, 23, 54, 0.12);
}

/* References Carousel/Quotes */
.refs-quote {
  transition: opacity 1s cubic-bezier(0.215, 0.610, 0.355, 1.000),
              transform 1s cubic-bezier(0.215, 0.610, 0.355, 1.000);
}

/* Why Portrait Parallax setup */
.why-portrait {
  transform: translate3d(0, var(--why-parallax-y, 0px), 0);
  transition: transform 0.1s ease-out;
  will-change: transform;
}

/* Portfolio wave scroll undulation */
.portfolio-wave::after {
  -webkit-mask-position: var(--wave-scroll-x, 0px) 0 !important;
  mask-position: var(--wave-scroll-x, 0px) 0 !important;
  will-change: mask-position, -webkit-mask-position;
}

/* Footer wave scroll undulation */
.site-footer::after {
  background-position: var(--footer-wave-scroll-x, 0px) 0 !important;
  will-change: background-position;
}


@media (prefers-reduced-motion: reduce) {
  .why-portrait,
  .hero-image picture {
    transform: none !important;
    transition: none !important;
    animation: none !important;
  }
  
  .home-reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  
  .sub-logo,
  .hero-caption,
  .hero-title,
  .hero-copy,
  .hero-link {
    animation: none !important;
  }
}
