/* ═══════════════════════════════════════════════════════════════
   PEACEKEEPERS' PARK — ANIMATIONS & EFFECTS
   Smooth, professional animations and hover effects
   ═══════════════════════════════════════════════════════════════ */

/* ── SMOOTH SCROLLING ENGINE ── */
html.lenis {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

/* ── PAGE TRANSITIONS ── */
.page-enter {
  opacity: 0;
  transform: translateY(20px);
}

.page-enter-active {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.page-exit {
  opacity: 1;
  transform: translateY(0);
}

.page-exit-active {
  opacity: 0;
  transform: translateY(-20px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

/* ── HOVER EFFECTS ── */
.hover-lift {
  transition: transform var(--transition-fast) var(--ease), box-shadow var(--transition-fast);
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.12);
}

.hover-scale {
  transition: transform var(--transition-fast) var(--ease);
}

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

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

.hover-glow:hover {
  box-shadow: 0 0 30px rgba(196, 154, 34, 0.2);
}

.hover-underline {
  position: relative;
}

.hover-underline::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width var(--transition-medium) var(--ease);
}

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

/* ── MAGNETIC BUTTON EFFECT ── */
.magnetic-btn {
  transition: transform 0.3s var(--ease-out);
}

/* ── PARALLAX LAYERS ── */
.parallax-slow {
  will-change: transform;
}

.parallax-medium {
  will-change: transform;
}

.parallax-fast {
  will-change: transform;
}

/* ── STAGGER ANIMATIONS ── */
.stagger-children > * {
  opacity: 0;
  transform: translateY(30px);
}

.stagger-children.active > * {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.stagger-children.active > *:nth-child(1) { transition-delay: 0.05s; }
.stagger-children.active > *:nth-child(2) { transition-delay: 0.1s; }
.stagger-children.active > *:nth-child(3) { transition-delay: 0.15s; }
.stagger-children.active > *:nth-child(4) { transition-delay: 0.2s; }
.stagger-children.active > *:nth-child(5) { transition-delay: 0.25s; }
.stagger-children.active > *:nth-child(6) { transition-delay: 0.3s; }

/* ── FLOATING ANIMATION ── */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

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

/* ── PULSE ANIMATION ── */
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.05); }
}

.pulse-animation {
  animation: pulse 2s ease-in-out infinite;
}

/* ── SHIMMER EFFECT ── */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.shimmer {
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

/* ── GRADIENT TEXT ── */
.gradient-text {
  background: linear-gradient(135deg, var(--gold), var(--red-soft));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── GLASS MORPHISM ── */
.glass {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.3);
}

.glass-dark {
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.1);
}

/* ── IMAGE REVEAL ── */
.img-reveal {
  position: relative;
  overflow: hidden;
}

.img-reveal::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--paper);
  transform: translateY(0);
  transition: transform 1s var(--ease);
}

.img-reveal.revealed::after {
  transform: translateY(-100%);
}

/* ── TEXT REVEAL ── */
.text-reveal {
  overflow: hidden;
}

.text-reveal span {
  display: inline-block;
  transform: translateY(100%);
  transition: transform 0.6s var(--ease);
}

.text-reveal.active span {
  transform: translateY(0);
}

/* ── CURSOR EFFECTS ── */
.custom-cursor {
  cursor: auto;
}

.cursor-dot {
  width: 8px;
  height: 8px;
  background: var(--ink);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  transition: transform 0.1s ease;
}

.cursor-outline {
  width: 40px;
  height: 40px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9998;
  transition: transform 0.15s ease, width 0.2s ease, height 0.2s ease;
}

.cursor-outline.hover {
  width: 60px;
  height: 60px;
  border-color: var(--gold);
}

/* ── LOADING STATES ── */
.skeleton {
  background: linear-gradient(90deg, var(--paper-mid) 25%, var(--paper-warm) 50%, var(--paper-mid) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

/* ── SCROLL INDICATOR ── */
.scroll-indicator {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  animation: fadeInOut 3s ease-in-out infinite;
}

@keyframes fadeInOut {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.scroll-indicator-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--ink-muted), transparent);
}

/* ── PROGRESS BAR ── */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--gold);
  z-index: 1001;
  transition: width 0.1s linear;
}

/* ── TOOLTIP ── */
.tooltip {
  position: relative;
}

.tooltip::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  padding: 6px 12px;
  background: var(--dark);
  color: white;
  font-size: 12px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.tooltip:hover::before {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── RIPPLE EFFECT ── */
.ripple {
  position: relative;
  overflow: hidden;
}

.ripple::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(255,255,255,0.3) 10%, transparent 10.01%);
  background-repeat: no-repeat;
  background-position: 50%;
  transform: scale(10, 10);
  opacity: 0;
  transition: transform 0.5s, opacity 1s;
}

.ripple:active::after {
  transform: scale(0, 0);
  opacity: 0.3;
  transition: 0s;
}

/* ── FOCUS STYLES ── */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* ── SELECTION ── */
::selection {
  background: var(--gold);
  color: white;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--paper-warm);
}

::-webkit-scrollbar-thumb {
  background: var(--ink-muted);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--ink-soft);
}

/* ── LOADING SPINNER ── */
@keyframes spin {
  to { transform: rotate(360deg); }
}

.spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ── BOUNCE IN ── */
@keyframes bounceIn {
  0% { opacity: 0; transform: scale(0.3); }
  50% { transform: scale(1.05); }
  70% { transform: scale(0.9); }
  100% { opacity: 1; transform: scale(1); }
}

.bounce-in {
  animation: bounceIn 0.6s var(--ease);
}

/* ── SLIDE IN ── */
@keyframes slideInUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

.slide-up {
  animation: slideInUp 0.6s var(--ease) forwards;
}

.slide-left {
  animation: slideInLeft 0.6s var(--ease) forwards;
}

.slide-right {
  animation: slideInRight 0.6s var(--ease) forwards;
}

/* ── FADE IN ── */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fade-in {
  animation: fadeIn 0.5s var(--ease) forwards;
}

/* ── SCALE IN ── */
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.scale-in {
  animation: scaleIn 0.5s var(--ease) forwards;
}

/* ── ROTATE IN ── */
@keyframes rotateIn {
  from { opacity: 0; transform: rotate(-10deg) scale(0.9); }
  to { opacity: 1; transform: rotate(0) scale(1); }
}

.rotate-in {
  animation: rotateIn 0.6s var(--ease) forwards;
}
