/*
 * Haider Perfumes — Animations (New Design)
 * Soft, feminine reveal animations.
 */

html {
	scroll-behavior: smooth;
}

/* =============================================
   HEADER SCROLL STATE
   ============================================= */
.site-header--transparent {
	background: rgba(10, 10, 10, 0.92);
	transition:
		background 300ms ease,
		box-shadow 300ms ease;
}

.site-header.is-scrolled {
	background: rgba(10, 10, 10, 0.98);
	box-shadow: 0 4px 24px rgba(0,0,0,0.4);
	border-bottom-color: rgba(200, 155, 79, 0.3);
}

body:not(.home) .site-header {
	background: rgba(10, 10, 10, 0.98);
	box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}

/* =============================================
   NAV LINK UNDERLINE
   ============================================= */
.primary-navigation a {
	position: relative;
}

@media (min-width: 861px) {
	.primary-navigation a::after {
		content: "";
		position: absolute;
		bottom: .3rem;
		left: .85rem;
		right: .85rem;
		height: 1.5px;
		background: var(--hp-rose);
		transform: scaleX(0);
		transform-origin: center;
		transition: transform 260ms ease;
	}

	.primary-navigation a:hover::after,
	.primary-navigation .current-menu-item > a::after {
		transform: scaleX(1);
	}
}

/* =============================================
   HERO ENTRANCE
   ============================================= */
[data-split-heading] .hp-word {
	display: inline-block;
	margin-right: 0.22em;
}
[data-split-heading] .hp-word:last-child {
	margin-right: 0;
}

html.hp-js [data-split-heading] .hp-letter {
	display: inline-block;
	opacity: 0;
	transform: translateY(0.5em);
	transform-origin: bottom;
}

html.hp-js .hp-hero-sequence {
	opacity: 0;
	transform: translateY(16px);
}

html.hp-js .hp-hero__bottle-figure,
html.hp-js .hp-hero__oval-frame {
	opacity: 0;
	transform: translateY(40px);
}

/* =============================================
   SCROLL REVEAL
   ============================================= */
.hp-reveal {
	opacity: 1;
	transform: translateY(0);
}

html.hp-js .hp-reveal {
	opacity: 0;
	transform: translateY(28px) scale(0.985);
	filter: blur(6px);
	transition: opacity 800ms ease, transform 800ms cubic-bezier(0.16, 1, 0.3, 1), filter 800ms ease;
}

html.hp-js .hp-reveal.is-visible {
	opacity: 1;
	transform: translateY(0) scale(1);
	filter: blur(0);
}

/* =============================================
   HERO PARALLAX
   ============================================= */
html.hp-js .hp-hero__visual {
	will-change: transform;
}

/* =============================================
   SCROLL PROGRESS BAR
   ============================================= */
.hp-scroll-progress {
	position: fixed;
	top: 0;
	left: 0;
	height: 3px;
	width: 0%;
	background: linear-gradient(90deg, var(--hp-rose) 0%, var(--hp-gold) 100%);
	z-index: 9999;
	transition: width 80ms linear;
}

@media (prefers-reduced-motion: reduce) {
	.hp-scroll-progress { display: none; }
}

.hp-stagger-grid > * {
	transition-delay: calc(var(--hp-stagger-index, 0) * 65ms);
}

/* =============================================
   PRODUCT CARD
   ============================================= */
.hp-product-card,
.woocommerce ul.products li.product {
	will-change: transform;
}

/* =============================================
   OVAL CARD HOVER
   ============================================= */
.hp-oval-card__frame {
	will-change: transform;
}

/* =============================================
   FALLING INGREDIENTS CONTAINER
   ============================================= */
.hp-falling-ingredients {
	position: absolute;
	inset: 0;
	overflow: hidden;
	pointer-events: none;
	z-index: 1;
}

/* =============================================
   RIPPLE
   ============================================= */
.hp-ripple .hp-ripple__circle {
	position: absolute;
	width: 10px;
	height: 10px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.45);
	transform: translate(-50%, -50%) scale(0);
	animation: hp-ripple 640ms ease-out;
	pointer-events: none;
	z-index: -1;
}

@keyframes hp-ripple {
	to {
		transform: translate(-50%, -50%) scale(26);
		opacity: 0;
	}
}

/* =============================================
   TESTIMONIAL SLIDER
   ============================================= */
.hp-testimonial-slider {
	position: relative;
	min-height: 280px;
}

.hp-testimonial-card {
	position: absolute;
	inset: 0;
	opacity: 0;
	transform: translateY(12px);
	transition: opacity 520ms ease, transform 520ms ease;
	pointer-events: none;
}

.hp-testimonial-card.is-active {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}

/* =============================================
   INSTAGRAM GRID
   ============================================= */
.hp-instagram-grid span,
.hp-instagram-grid a {
	will-change: transform;
}

/* =============================================
   SINGLE PRODUCT GALLERY
   ============================================= */
.hp-single-product__gallery .woocommerce-product-gallery__image {
	overflow: hidden;
	border-radius: 12px;
}

.hp-single-product__gallery .woocommerce-product-gallery__image img {
	transition: transform 420ms ease;
}

.hp-single-product__gallery .woocommerce-product-gallery__image:hover img {
	transform: scale(1.04);
}

/* =============================================
   MENU OPEN ANIMATION
   ============================================= */
.primary-navigation.is-open {
	animation: hp-menu-open 240ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes hp-menu-open {
	from { opacity: 0; transform: translateY(-8px) scale(0.98); }
	to   { opacity: 1; transform: translateY(0)    scale(1); }
}

/* =============================================
   BOTTLE FLOAT
   ============================================= */
.hp-hero__bottle-figure--attar img {
	animation: hp-bottle-rise 5.5s ease-in-out infinite;
}

.hp-hero__bottle-figure--perfume img {
	animation: hp-bottle-fall 5.5s ease-in-out infinite;
}

@keyframes hp-bottle-rise {
	0%, 100% { transform: translate3d(0, 0, 0); }
	50%       { transform: translate3d(0, -12px, 0); }
}

@keyframes hp-bottle-fall {
	0%, 100% { transform: translate3d(0, -12px, 0); }
	50%       { transform: translate3d(0, 0, 0); }
}

/* =============================================
   INGREDIENT PARTICLE FALL
   ============================================= */
.hp-ingredient-particle {
	position: absolute;
	top: -40px;
	pointer-events: none;
	animation: hp-ingredient-fall linear forwards;
}

@keyframes hp-ingredient-fall {
	0% {
		transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
		opacity: 0;
	}
	8%  { opacity: 0.5; }
	92% { opacity: 0.3; }
	100% {
		transform:
			translate3d(var(--hp-sway-amount, 60px), 110vh, 0)
			rotate(var(--hp-rotate-amount, 360deg))
			scale(0.8);
		opacity: 0;
	}
}

/* =============================================
   REDUCED MOTION
   ============================================= */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }

	body,
	.hp-page-loader,
	.hp-page-transition,
	.site-header,
	.hp-reveal,
	.hp-product-card,
	.hp-ingredient-particle,
	.hp-oval-card__frame,
	.hp-marquee__track,
	.hp-circular-badge svg,
	.hp-hero__promo-badge,
	.hp-hero__bottle-figure img {
		animation: none !important;
		transition: none !important;
	}

	.hp-reveal,
	.hp-hero-sequence,
	.hp-hero__bottle-figure,
	.hp-hero__oval-frame,
	[data-split-heading] .hp-letter {
		opacity: 1 !important;
		transform: none !important;
		filter: none !important;
	}
}
