/* ============================================
   Beauté Naissante - Animation Styles
   GSAP-powered scroll animations + CSS
   ============================================ */

/* --- Scroll Animation Base States --- */
/* Content is visible by default. GSAP sets initial hidden state via JS.
   This ensures content is always visible even if JS fails to load. */
[data-animate],
[data-animate-stagger] > * {
	will-change: transform, opacity;
}

/* --- CSS Keyframe Animations --- */

/* Floating animation for decorative elements */
@keyframes bn-float {
	0%, 100% { transform: translateY(0px); }
	50% { transform: translateY(-15px); }
}

.bn-float {
	animation: bn-float 4s ease-in-out infinite;
}

/* Gentle pulse */
@keyframes bn-pulse-soft {
	0%, 100% { transform: scale(1); opacity: 1; }
	50% { transform: scale(1.03); opacity: 0.9; }
}

.bn-pulse-soft {
	animation: bn-pulse-soft 3s ease-in-out infinite;
}

/* Shimmer effect for gold elements */
@keyframes bn-shimmer {
	0% { background-position: -200% center; }
	100% { background-position: 200% center; }
}

.bn-shimmer {
	background: linear-gradient(
		90deg,
		var(--wp--preset--color--primary) 0%,
		var(--wp--preset--color--primary-light) 25%,
		var(--wp--preset--color--primary) 50%,
		var(--wp--preset--color--primary-light) 75%,
		var(--wp--preset--color--primary) 100%
	);
	background-size: 200% auto;
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	animation: bn-shimmer 4s linear infinite;
}

/* Reveal line from center */
@keyframes bn-line-reveal {
	0% { width: 0; }
	100% { width: 60px; }
}

.bn-line-reveal::after {
	animation: bn-line-reveal 0.8s ease-out forwards;
}

/* Slow rotate for decorative elements */
@keyframes bn-rotate-slow {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

.bn-rotate-slow {
	animation: bn-rotate-slow 20s linear infinite;
}

/* Fade in from bottom with delay support */
@keyframes bn-fade-up-in {
	0% {
		opacity: 0;
		transform: translateY(30px);
	}
	100% {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Counter animation */
@keyframes bn-count-up {
	from { opacity: 0; transform: translateY(10px); }
	to { opacity: 1; transform: translateY(0); }
}

/* --- Image Reveal Animations --- */
.bn-img-reveal {
	position: relative;
	overflow: hidden;
}

.bn-img-reveal::after {
	content: '';
	position: absolute;
	inset: 0;
	background: var(--wp--preset--color--cream);
	transform-origin: right;
	transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1);
}

.bn-img-reveal.revealed::after {
	transform: scaleX(0);
}

/* --- Parallax Backgrounds --- */
.bn-parallax-bg {
	position: relative;
	overflow: hidden;
}

.bn-parallax-bg > img,
.bn-parallax-bg > .wp-block-cover__image-background {
	transition: transform 0.1s linear;
}

/* --- Decorative Elements --- */
.bn-deco-circle {
	position: absolute;
	width: 300px;
	height: 300px;
	border: 1px solid var(--wp--preset--color--primary-light);
	border-radius: 50%;
	opacity: 0.15;
	pointer-events: none;
}

.bn-deco-dot {
	position: absolute;
	width: 6px;
	height: 6px;
	background: var(--wp--preset--color--primary);
	border-radius: 50%;
	opacity: 0.3;
}

/* --- Text Split Animation (for headings) --- */
.bn-split-text .word {
	display: inline-block;
	overflow: hidden;
}

.bn-split-text .word .char {
	display: inline-block;
	transform: translateY(100%);
	transition: transform 0.5s cubic-bezier(0.77, 0, 0.175, 1);
}

.bn-split-text.animate .word .char {
	transform: translateY(0);
}

/* --- Hover Effects for Interactive Elements --- */

/* Magnetic button effect */
.bn-magnetic {
	transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Underline grow on hover */
.bn-underline-grow {
	position: relative;
	display: inline-block;
}

.bn-underline-grow::after {
	content: '';
	position: absolute;
	bottom: -2px;
	left: 50%;
	width: 0;
	height: 1.5px;
	background: var(--wp--preset--color--primary);
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	transform: translateX(-50%);
}

.bn-underline-grow:hover::after {
	width: 100%;
}

/* Card tilt effect */
.bn-tilt {
	transition: transform 0.3s ease;
	transform-style: preserve-3d;
	perspective: 1000px;
}

/* --- Scroll Progress Bar --- */
.bn-scroll-progress {
	position: fixed;
	top: 0;
	left: 0;
	width: 0%;
	height: 2px;
	background: linear-gradient(90deg, var(--wp--preset--color--primary), var(--wp--preset--color--primary-light));
	z-index: 10002;
	transition: width 0.1s linear;
}

/* --- Smooth page transitions --- */
.bn-page-enter {
	animation: bn-fade-up-in 0.6s ease-out forwards;
}

/* --- Cursor follower (desktop only) --- */
@media (hover: hover) and (pointer: fine) {
	.bn-cursor {
		position: fixed;
		width: 8px;
		height: 8px;
		background: var(--wp--preset--color--primary);
		border-radius: 50%;
		pointer-events: none;
		z-index: 99999;
		mix-blend-mode: difference;
		transition: width 0.3s, height 0.3s, background 0.3s;
	}

	.bn-cursor.hover {
		width: 40px;
		height: 40px;
		background: rgba(196, 149, 106, 0.15);
		mix-blend-mode: normal;
	}
}

/* --- Marquee / infinite scroll text --- */
.bn-marquee {
	overflow: hidden;
	white-space: nowrap;
}

.bn-marquee-inner {
	display: inline-flex;
	gap: 3rem;
	animation: bn-marquee 30s linear infinite;
}

@keyframes bn-marquee {
	0% { transform: translateX(0); }
	100% { transform: translateX(-50%); }
}

.bn-marquee-item {
	font-family: var(--wp--preset--font-family--heading);
	font-size: clamp(1.5rem, 3vw, 2.5rem);
	font-weight: 300;
	color: var(--wp--preset--color--border);
	white-space: nowrap;
	display: flex;
	align-items: center;
	gap: 3rem;
}

.bn-marquee-item::after {
	content: '✦';
	color: var(--wp--preset--color--primary-light);
	font-size: 0.75em;
}

/* Brand logo links in marquee */
a.bn-brand-logo-link {
	display: flex;
	align-items: center;
	padding: 0.5rem 1rem;
	opacity: 0.55;
	transition: opacity 0.3s ease, transform 0.3s ease;
	text-decoration: none;
	flex-shrink: 0;
}

a.bn-brand-logo-link:hover {
	opacity: 1;
	transform: scale(1.08);
}

a.bn-brand-logo-link::after {
	content: '✦';
	color: var(--wp--preset--color--primary-light);
	font-size: 0.6rem;
	margin-left: 3rem;
}

.bn-brand-logo {
	height: 32px;
	width: auto;
	max-width: 140px;
	object-fit: contain;
	filter: grayscale(100%);
	transition: filter 0.3s ease;
}

a.bn-brand-logo-link:hover .bn-brand-logo {
	filter: grayscale(0%);
}

/* --- Reduce motion for accessibility --- */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}

	[data-animate] {
		opacity: 1;
		transform: none;
	}

	[data-animate-stagger] > * {
		opacity: 1;
		transform: none;
	}

	.bn-marquee-inner {
		animation: none;
	}
}
