/* =========================================================================
   IRVISIT — Motion / keyframes & scroll reveal
   ========================================================================= */

/* Scroll reveal (driven by IntersectionObserver adding .is-visible) */
.iv-reveal { opacity: 0; transform: translateY(34px); transition: opacity .8s var(--iv-ease), transform .8s var(--iv-ease); will-change: opacity, transform; }
.iv-reveal.is-visible { opacity: 1; transform: none; }

/* stagger children inside a revealed grid */
.iv-grid .iv-reveal.is-visible:nth-child(2) { transition-delay: .08s; }
.iv-grid .iv-reveal.is-visible:nth-child(3) { transition-delay: .16s; }
.iv-grid .iv-reveal.is-visible:nth-child(4) { transition-delay: .24s; }
.iv-grid .iv-card:nth-child(2) { transition-delay: .06s; }
.iv-grid .iv-card:nth-child(3) { transition-delay: .12s; }

/* Ken Burns for hero scenes */
@keyframes iv-kenburns {
	from { transform: scale(1.01) translate3d(0,0,0); }
	to   { transform: scale(1.045) translate3d(-.45%, -.45%, 0); }
}

/* Hero text rise */
@keyframes iv-rise {
	to { opacity: 1; transform: translateY(0); }
}

/* Dot autoplay fill */
@keyframes iv-dotfill { from { width: 0; } to { width: 100%; } }

/* Scroll indicator */
@keyframes iv-scroll {
	0% { transform: translateY(0); opacity: 1; }
	70% { transform: translateY(14px); opacity: 0; }
	100% { transform: translateY(0); opacity: 0; }
}

/* Floating dust / particles inside SVG scenes */
.iv-dust { animation: iv-float 7s ease-in-out infinite; transform-origin: center; }
@keyframes iv-float {
	0%, 100% { transform: translateY(0); opacity: .8; }
	50%      { transform: translateY(-14px); opacity: 1; }
}

/* Twinkling stars (Yazd) */
.iv-stars circle { animation: iv-twinkle 3.5s ease-in-out infinite; }
.iv-stars circle:nth-child(3n) { animation-delay: .8s; }
.iv-stars circle:nth-child(4n) { animation-delay: 1.6s; }
.iv-stars circle:nth-child(5n) { animation-delay: 2.3s; }
@keyframes iv-twinkle { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }

/* Shooting star (Yazd) */
.iv-shoot { opacity: 0; animation: iv-shoot 6s ease-in infinite; }
@keyframes iv-shoot {
	0%, 82% { opacity: 0; transform: translate(60px, -40px); }
	86%     { opacity: .9; }
	100%    { opacity: 0; transform: translate(-120px, 80px); }
}

/* Light beams shimmer (Pink Mosque) */
.iv-beams polygon { animation: iv-shimmer 5s ease-in-out infinite; transform-origin: top; }
.iv-beams polygon:nth-child(even) { animation-delay: 1.2s; }
@keyframes iv-shimmer { 0%, 100% { opacity: .16; } 50% { opacity: .32; } }

/* Button shine sweep on hover */
.iv-btn { position: relative; overflow: hidden; }
.iv-btn::after {
	content: ""; position: absolute; top: 0; left: -120%; width: 60%; height: 100%;
	background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent);
	transform: skewX(-18deg); transition: left .6s var(--iv-ease);
}
.iv-btn:hover::after { left: 140%; }

/* Card image subtle zoom already handled; add a gentle lift shadow pulse on focus */
.iv-card:focus-within { box-shadow: var(--iv-shadow-lg); transform: translateY(-6px); }

/* Counter pop */
.iv-stat.is-visible .iv-stat__num { animation: iv-pop .6s var(--iv-ease); }
@keyframes iv-pop { 0% { transform: scale(.8); } 60% { transform: scale(1.06); } 100% { transform: scale(1); } }

/* Header slide-down on load */
.iv-header { animation: iv-header-in .6s var(--iv-ease); }
@keyframes iv-header-in { from { transform: translateY(-100%); } to { transform: translateY(0); } }

/* Parallax layers get a tiny idle drift on the active hero slide (in addition to JS pointer parallax) */
.iv-hero__slide.is-active .iv-layer[data-depth] { transition: transform .4s var(--iv-ease); }

@media (prefers-reduced-motion: reduce) {
	.iv-dust, .iv-stars circle, .iv-shoot, .iv-beams polygon, .iv-hero__scroll i, .iv-header { animation: none !important; }
	.iv-hero__slide.is-active .iv-scene, .iv-hero__slide.is-active .iv-hero__img { animation: none !important; transform: scale(1.01) !important; }
}
