/* =========================================
   INTUITION WEB STUDIO - ANIMATIONS
   Dynamic, alive motion system
   ========================================= */

/* =========================================
   HERO ENTRANCE SEQUENCE
   ========================================= */
.hero .max-w-md {
  opacity: 0;
  transform: translateY(30px);
  animation: heroContentIn 1.2s var(--ease-out-expo) 0.2s forwards;
}

.hero-subtitle {
  opacity: 0;
  transform: translateY(20px);
  animation: heroContentIn 1s var(--ease-out-expo) 0.5s forwards;
}

.hero-image-wrapper {
  opacity: 0;
  animation: heroImageReveal 1.8s var(--ease-out-expo) 0s forwards;
}

.hero-image-wrapper .hero-image {
  animation: heroImageKen 20s ease-in-out infinite alternate;
}

.hero-scroll-indicator {
  opacity: 0;
  animation: heroContentIn 0.8s var(--ease-out-expo) 1s forwards;
}

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

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

/* Ken Burns — slow cinematic zoom on hero image */
@keyframes heroImageKen {
  0%   { transform: scale(1.05) translate(0, 0); }
  100% { transform: scale(1.12) translate(-1%, -0.5%); }
}

/* =========================================
   SCROLL REVEAL — FADE UP
   ========================================= */
.fade-up {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
  will-change: opacity, transform;
}

.fade-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================
   SCROLL REVEAL — FADE LEFT
   ========================================= */
.fade-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
  will-change: opacity, transform;
}

.fade-left.is-visible {
  opacity: 1;
  transform: translateX(0);
}

/* =========================================
   SCROLL REVEAL — FADE RIGHT
   ========================================= */
.fade-right {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
  will-change: opacity, transform;
}

.fade-right.is-visible {
  opacity: 1;
  transform: translateX(0);
}

/* =========================================
   SCROLL REVEAL — SCALE IN
   ========================================= */
.scale-in {
  opacity: 0;
  transform: scale(0.88);
  transition: opacity 0.8s var(--ease-out-expo), transform 1s var(--ease-out-expo);
  will-change: opacity, transform;
}

.scale-in.is-visible {
  opacity: 1;
  transform: scale(1);
}

/* =========================================
   STAGGERED DELAYS
   ========================================= */
.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }
.delay-500 { transition-delay: 500ms; }
.delay-600 { transition-delay: 600ms; }

/* =========================================
   REVEAL MASK (Cinematic wipe)
   ========================================= */
.reveal-mask {
  position: relative;
  overflow: hidden;
}

.reveal-mask::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--bg-color);
  transform-origin: top;
  z-index: 10;
  transition: transform 1.2s cubic-bezier(0.77, 0, 0.175, 1);
}

.reveal-mask.is-visible::after {
  transform: scaleY(0);
}

.reveal-mask img {
  opacity: 0;
  transform: scale(1.1);
  transition: opacity 0s 0.2s, transform 1.8s var(--ease-out-expo);
  will-change: transform, opacity;
}

.reveal-mask.is-visible img {
  opacity: 1;
  transform: scale(1);
}

/* =========================================
   LINE DRAW
   ========================================= */
.line-draw {
  position: relative;
}

.line-draw::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--accent-gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1s var(--ease-out-expo);
}

.line-draw.is-visible::after {
  transform: scaleX(1);
}

/* =========================================
   STAGGER CHILDREN
   ========================================= */
.stagger-children > * {
  opacity: 0;
  transform: translateY(25px);
  transition: opacity 0.6s var(--ease-out-expo), transform 0.6s var(--ease-out-expo);
}

.stagger-children.is-visible > *:nth-child(1) { transition-delay: 0ms;   opacity: 1; transform: translateY(0); }
.stagger-children.is-visible > *:nth-child(2) { transition-delay: 80ms;  opacity: 1; transform: translateY(0); }
.stagger-children.is-visible > *:nth-child(3) { transition-delay: 160ms; opacity: 1; transform: translateY(0); }
.stagger-children.is-visible > *:nth-child(4) { transition-delay: 240ms; opacity: 1; transform: translateY(0); }
.stagger-children.is-visible > *:nth-child(5) { transition-delay: 320ms; opacity: 1; transform: translateY(0); }
.stagger-children.is-visible > *:nth-child(6) { transition-delay: 400ms; opacity: 1; transform: translateY(0); }

/* =========================================
   GOLD ACCENT LINE — Living shimmer
   ========================================= */
.gold-line {
  width: 60px;
  height: 1px;
  background: var(--accent-gradient);
  background-size: 200% 100%;
  animation: goldShimmer 3s linear infinite;
}

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

/* =========================================
   IMAGE HOVER — Parallax tilt + lift
   ========================================= */
.img-parallax-wrapper {
  overflow: hidden;
  position: relative;
  transition: transform 0.5s var(--ease-out-expo), box-shadow 0.5s var(--ease-out-expo);
}

.img-parallax-wrapper img {
  transition: transform 0.7s var(--ease-out-expo);
  will-change: transform;
}

.img-parallax-wrapper:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
}

.img-parallax-wrapper:hover img {
  transform: scale(1.04);
}

/* =========================================
   PORTFOLIO CARD — Alive hover
   ========================================= */
.portfolio-card .portfolio-image-wrapper {
  transition: transform 0.6s var(--ease-out-expo), box-shadow 0.6s var(--ease-out-expo);
}

.portfolio-card:hover .portfolio-image-wrapper {
  transform: translateY(-6px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.10);
}

.process-item:hover .process-num {
  transform: translateY(-4px);
}

.process-num {
  transition: opacity 0.5s ease, transform 0.5s var(--ease-out-expo);
}

/* =========================================
   VALUE ITEM — Alive hover
   ========================================= */
.value-item {
  transition: background-color 0.5s var(--ease-out-expo), padding-left 0.5s var(--ease-out-expo);
}

.value-item:hover {
  padding-left: 2rem;
}

.value-num {
  transition: opacity 0.5s ease, transform 0.5s var(--ease-out-expo);
}

.value-item:hover .value-num {
  transform: scale(1.08);
}

/* =========================================
   BUTTON — Alive press + breathe
   ========================================= */
.btn {
  transition: all 0.4s var(--ease-out-expo), transform 0.3s var(--ease-out-expo);
}

.btn:active {
  transform: scale(0.96) !important;
}

/* =========================================
   OVERLAY LINK — Slide in with underline
   ========================================= */
.overlay-link {
  position: relative;
}

.overlay-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-color);
  transition: width 0.5s var(--ease-out-expo);
}

.overlay-link:hover::after {
  width: 100%;
}

/* =========================================
   PRICING CARD — Hover lift
   ========================================= */
.pricing-card {
  transition: transform 0.5s var(--ease-out-expo);
}

.pricing-card:hover {
  transform: translateY(-4px);
}

/* =========================================
   SCROLL INDICATOR — Continuous pulse
   ========================================= */
.hero-scroll-indicator .scroll-text {
  animation: pulseText 2.5s ease-in-out infinite;
}

@keyframes pulseText {
  0%, 100% { opacity: 0.5; }
  50%      { opacity: 1; }
}

/* =========================================
   MARQUEE — Living speed shift on hover
   ========================================= */
.marquee-item {
  transition: opacity 0.4s ease, transform 0.4s var(--ease-out-expo);
}

.marquee-item:hover {
  opacity: 0.6 !important;
  transform: scale(1.03);
}

/* =========================================
   FOOTER LINKS — Animated underline
   ========================================= */
.footer-nav a {
  position: relative;
}

.footer-nav a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent-color);
  transition: width 0.4s var(--ease-out-expo);
}

.footer-nav a:hover::after {
  width: 100%;
}

/* =========================================
   FORM CONTROL — Focus alive glow
   ========================================= */
.form-control {
  transition: border-color 0.4s var(--ease-out-expo), box-shadow 0.4s var(--ease-out-expo);
}

.form-control:focus {
  box-shadow: 0 4px 20px rgba(166, 138, 100, 0.06);
}

/* =========================================
   SCREENSHOT — Hover lift
   ========================================= */
.screenshot-img {
  transition: transform 0.6s var(--ease-out-expo), box-shadow 0.6s var(--ease-out-expo);
}

.screenshot-img:hover {
  transform: scale(1.02) translateY(-4px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
}

/* =========================================
   SUBTLE FLOAT
   ========================================= */
@keyframes subtleFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

.float-animation {
  animation: subtleFloat 6s ease-in-out infinite;
}

/* =========================================
   COUNTER PULSE
   ========================================= */
@keyframes countPulse {
  0%, 100% { opacity: 0.4; }
  50%      { opacity: 0.8; }
}

/* =========================================
   SPLIT TEXT CHARACTERS
   ========================================= */
.split-text .char {
  display: inline-block;
  opacity: 0;
  transform: translateY(60px) rotate(5deg);
  transition: opacity 0.5s var(--ease-out-expo), transform 0.5s var(--ease-out-expo);
}

.split-text.is-visible .char {
  opacity: 1;
  transform: translateY(0) rotate(0);
}

/* =========================================
   REDUCED MOTION — Respect user preference
   ========================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .marquee-track {
    animation: none !important;
    transform: none !important;
  }

  .hero-image-wrapper .hero-image {
    animation: none !important;
  }
}
