/**
 * Animations & Transitions
 *
 * Keyframes, scroll animations, and motion effects
 */

/* ========================================
   KEYFRAME ANIMATIONS
   ======================================== */

/* Fade in from bottom */
@keyframes fadeInUp {
	from {
		opacity: 0;
		transform: translateY(30px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Fade in simple */
@keyframes fadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

/* Slide in from left */
@keyframes slideInLeft {
	from {
		opacity: 0;
		transform: translateX(-50px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

/* Slide in from right */
@keyframes slideInRight {
	from {
		opacity: 0;
		transform: translateX(50px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

/* Scale in */
@keyframes scaleIn {
	from {
		opacity: 0;
		transform: scale(0.8);
	}
	to {
		opacity: 1;
		transform: scale(1);
	}
}

/* Floating animation (subtle) */
@keyframes float {
	0%, 100% {
		transform: translateY(0);
	}
	50% {
		transform: translateY(-10px);
	}
}

/* Shimmer effect for gradients */
@keyframes shimmer {
	0% {
		background-position: 0% center;
	}
	50% {
		background-position: 100% center;
	}
	100% {
		background-position: 0% center;
	}
}

/* Gradient move */
@keyframes gradientMove {
	0%, 100% {
		background-position: 0% 50%;
	}
	50% {
		background-position: 100% 50%;
	}
}

/* Pulse effect */
@keyframes pulse {
	0%, 100% {
		opacity: 1;
		transform: scale(1);
	}
	50% {
		opacity: 0.8;
		transform: scale(1.05);
	}
}

/* Bounce */
@keyframes bounce {
	0%, 100% {
		transform: translateY(0);
	}
	50% {
		transform: translateY(-15px);
	}
}

/* Rotate */
@keyframes rotate {
	from {
		transform: rotate(0deg);
	}
	to {
		transform: rotate(360deg);
	}
}

/* ========================================
   SCROLL ANIMATIONS
   ======================================== */
.animate-on-scroll {
	opacity: 0;
	transform: translateY(30px);
	transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.animated {
	opacity: 1;
	transform: translateY(0);
}

/* Stagger delay for multiple elements */
.animate-on-scroll:nth-child(1) {
	transition-delay: 0ms;
}

.animate-on-scroll:nth-child(2) {
	transition-delay: 100ms;
}

.animate-on-scroll:nth-child(3) {
	transition-delay: 200ms;
}

.animate-on-scroll:nth-child(4) {
	transition-delay: 300ms;
}

.animate-on-scroll:nth-child(5) {
	transition-delay: 400ms;
}

.animate-on-scroll:nth-child(6) {
	transition-delay: 500ms;
}

/* ========================================
   HOVER EFFECTS
   ======================================== */
.hover-lift {
	transition: transform var(--transition-speed) var(--transition-easing),
				box-shadow var(--transition-speed) var(--transition-easing);
}

.hover-lift:hover {
	transform: translateY(-8px);
	box-shadow: var(--shadow-hover);
}

.hover-scale {
	transition: transform var(--transition-speed) var(--transition-easing);
}

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

.hover-glow {
	transition: box-shadow var(--transition-speed) var(--transition-easing);
}

.hover-glow:hover {
	box-shadow: 0 0 20px rgba(255, 107, 157, 0.3);
}

/* ========================================
   ANIMATED GRADIENTS
   ======================================== */
.gradient-animated {
	background-size: 200% 200%;
	animation: gradientMove 8s ease infinite;
}

/* Hero gradient animation */
.bp-hero-section.bp-section-gradient {
	background: var(--gradient-bg);
	background-size: 200% 200%;
	animation: gradientMove 15s ease infinite;
}

/* ========================================
   LOADING ANIMATIONS
   ======================================== */
.bp-loading {
	display: inline-block;
	width: 40px;
	height: 40px;
	border: 4px solid var(--color-cream);
	border-top-color: var(--color-pink-primary);
	border-radius: 50%;
	animation: rotate 0.8s linear infinite;
}

/* Skeleton loading */
.skeleton {
	background: linear-gradient(
		90deg,
		var(--color-cream) 0%,
		var(--color-peach-light) 50%,
		var(--color-cream) 100%
	);
	background-size: 200% 100%;
	animation: shimmer 1.5s ease-in-out infinite;
	border-radius: var(--radius-sm);
}

/* ========================================
   PAGE TRANSITIONS
   ======================================== */
body {
	animation: fadeIn 0.3s ease-out;
}

/* ========================================
   HERO DECORATIONS
   ======================================== */
.bp-hero-decoration {
	animation: float 3s ease-in-out infinite;
}

/* ========================================
   BUTTON ANIMATIONS
   ======================================== */
.bp-btn {
	position: relative;
	overflow: hidden;
}

.bp-btn::before {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 0;
	height: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.3);
	transform: translate(-50%, -50%);
	transition: width 0.6s, height 0.6s;
}

.bp-btn:active::before {
	width: 300px;
	height: 300px;
}

/* ========================================
   ENTRANCE ANIMATIONS
   ======================================== */
.entrance-fade-in {
	animation: fadeIn 0.6s ease-out;
}

.entrance-fade-up {
	animation: fadeInUp 0.6s ease-out;
}

.entrance-slide-left {
	animation: slideInLeft 0.6s ease-out;
}

.entrance-slide-right {
	animation: slideInRight 0.6s ease-out;
}

.entrance-scale {
	animation: scaleIn 0.6s ease-out;
}

/* ========================================
   MOBILE MENU ANIMATION
   ======================================== */
@media (max-width: 768px) {
	.primary-nav {
		transition: right var(--transition-speed) var(--transition-easing);
	}

	.primary-nav.active {
		animation: slideInRight 0.3s ease-out;
	}
}

/* ========================================
   LIGHTBOX ANIMATIONS
   ======================================== */
.bp-lightbox.active .bp-lightbox-overlay {
	animation: fadeIn 0.3s ease-out;
}

.bp-lightbox.active .bp-lightbox-image-wrapper {
	animation: scaleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

	/* Disable floating animations */
	.bp-hero-decoration,
	.hover-lift:hover,
	.hover-scale:hover {
		animation: none;
		transform: none;
	}

	/* Disable gradient animations */
	.gradient-animated,
	.bp-hero-section.bp-section-gradient {
		animation: none;
	}

	/* Keep essential transitions but make them instant */
	.animate-on-scroll {
		opacity: 1;
		transform: none;
		transition: none;
	}
}

/* ========================================
   UTILITY CLASSES
   ======================================== */
.no-animation {
	animation: none !important;
	transition: none !important;
}

.delay-100 {
	animation-delay: 100ms;
}

.delay-200 {
	animation-delay: 200ms;
}

.delay-300 {
	animation-delay: 300ms;
}

.delay-400 {
	animation-delay: 400ms;
}

.delay-500 {
	animation-delay: 500ms;
}
