/* ==============================================
   ARASAN ARENA - Animations CSS
   Scroll Reveal, Page Transitions, Parallax
   ============================================== */

/* ==================== SCROLL REVEAL ==================== */
[data-reveal] {
  opacity: 0;
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
[data-reveal="up"]     { transform: translateY(40px); }
[data-reveal="down"]   { transform: translateY(-40px); }
[data-reveal="left"]   { transform: translateX(-40px); }
[data-reveal="right"]  { transform: translateX(40px); }
[data-reveal="scale"]  { transform: scale(0.9); }
[data-reveal="fade"]   { transform: none; }

[data-reveal].revealed {
  opacity: 1;
  transform: none;
}

/* Staggered children */
[data-reveal-group] > * {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
[data-reveal-group].revealed > *:nth-child(1) { transition-delay: 0.05s; }
[data-reveal-group].revealed > *:nth-child(2) { transition-delay: 0.15s; }
[data-reveal-group].revealed > *:nth-child(3) { transition-delay: 0.25s; }
[data-reveal-group].revealed > *:nth-child(4) { transition-delay: 0.35s; }
[data-reveal-group].revealed > *:nth-child(5) { transition-delay: 0.45s; }
[data-reveal-group].revealed > * { opacity: 1; transform: none; }

/* ==================== PAGE TRANSITION ==================== */
.page-transition {
  position: fixed; inset: 0; z-index: 9998;
  background: var(--gold);
  transform: scaleY(0); transform-origin: bottom;
  transition: transform 0.5s var(--ease);
  pointer-events: none;
}
.page-transition.entering { transform: scaleY(1); transform-origin: bottom; }
.page-transition.leaving  { transform: scaleY(0); transform-origin: top; }

/* ==================== PARALLAX ==================== */
.parallax-bg {
  will-change: transform;
  transition: transform 0.1s linear;
}

/* ==================== FLOATING ELEMENTS ==================== */
@keyframes float-y {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-12px); }
}
@keyframes float-x {
  0%, 100% { transform: translateX(0); }
  50%       { transform: translateX(10px); }
}
@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes scale-pulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.06); }
}
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.anim-float    { animation: float-y 4s ease-in-out infinite; }
.anim-float-x  { animation: float-x 5s ease-in-out infinite; }
.anim-spin     { animation: spin-slow 20s linear infinite; }
.anim-pulse    { animation: scale-pulse 2.5s ease-in-out infinite; }

/* ==================== HERO ANIMATIONS ==================== */
@keyframes hero-text-in {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-tag    { animation: hero-text-in 0.7s var(--ease) 0.2s both; }
.hero-title  { animation: hero-text-in 0.7s var(--ease) 0.4s both; }
.hero-desc   { animation: hero-text-in 0.7s var(--ease) 0.6s both; }
.hero-buttons { animation: hero-text-in 0.7s var(--ease) 0.8s both; }

/* ==================== GRADIENT ANIMATION ==================== */
@keyframes gradient-shift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.animated-gradient {
  background: linear-gradient(270deg, var(--gold), #ff8c00, var(--red), var(--gold));
  background-size: 400% 400%;
  animation: gradient-shift 8s ease infinite;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ==================== COUNTER ANIMATION ==================== */
.counter-number { font-variant-numeric: tabular-nums; }

/* ==================== HOVER DEPTH EFFECTS ==================== */
.hover-depth {
  transition: transform var(--t-base), box-shadow var(--t-base);
  transform-style: preserve-3d;
}
.hover-depth:hover {
  transform: translateY(-8px) rotateX(2deg) rotateY(1deg);
  box-shadow: var(--shadow-xl);
}

/* ==================== GLOW EFFECTS ==================== */
.glow-gold   { box-shadow: 0 0 30px rgba(244,195,0,0.3); }
.glow-green  { box-shadow: 0 0 30px rgba(31,122,61,0.3); }
.glow-teal   { box-shadow: 0 0 30px rgba(0,140,140,0.3); }
.glow-maroon { box-shadow: 0 0 30px rgba(106,27,46,0.4); }

/* Ambient blobs */
.blob {
  position: absolute; border-radius: 50%;
  filter: blur(60px); pointer-events: none; z-index: 0;
  animation: float-y 8s ease-in-out infinite;
}
.blob-gold   { background: rgba(244,195,0,0.15); }
.blob-green  { background: rgba(31,122,61,0.15); }
.blob-teal   { background: rgba(0,140,140,0.15); }
.blob-maroon { background: rgba(106,27,46,0.2); }

/* ==================== SKELETON LOADER ==================== */
.skeleton {
  background: linear-gradient(90deg, #eee 25%, #f5f5f5 50%, #eee 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--r-md);
}

/* ==================== TOAST NOTIFICATIONS ==================== */
.toast-container {
  position: fixed; top: calc(var(--nav-h) + 16px); right: 16px;
  z-index: 9000; display: flex; flex-direction: column; gap: 10px;
  max-width: 360px; width: calc(100% - 32px);
}
.toast {
  padding: 14px 20px; border-radius: var(--r-md);
  background: var(--dark); color: var(--white);
  font-size: var(--fs-sm); font-weight: 500;
  box-shadow: var(--shadow-xl); display: flex; align-items: center; gap: 12px;
  transform: translateX(110%);
  transition: transform 0.4s var(--ease-spring);
}
.toast.show      { transform: translateX(0); }
.toast.toast-success { border-left: 4px solid var(--turf-green); }
.toast.toast-error   { border-left: 4px solid var(--red); }
.toast.toast-info    { border-left: 4px solid var(--gold); }

/* ==================== LIVE INDICATOR ==================== */
.live-dot {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em;
}
.live-dot::before {
  content: ''; width: 10px; height: 10px; border-radius: 50%;
  background: var(--turf-green);
  box-shadow: 0 0 0 0 rgba(31,122,61,0.5);
  animation: live-ping 1.5s ease-in-out infinite;
}
@keyframes live-ping {
  0%   { box-shadow: 0 0 0 0 rgba(31,122,61,0.5); }
  70%  { box-shadow: 0 0 0 8px rgba(31,122,61,0); }
  100% { box-shadow: 0 0 0 0 rgba(31,122,61,0); }
}

/* ==================== LIGHTBOX ==================== */
.lightbox {
  position: fixed; inset: 0; z-index: 9500;
  background: rgba(0,0,0,0.92);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s var(--ease);
}
.lightbox.open { opacity: 1; pointer-events: all; }
.lightbox img  { max-width: 90vw; max-height: 85vh; object-fit: contain; border-radius: var(--r-md); box-shadow: var(--shadow-xl); transform: scale(0.9); transition: transform 0.3s var(--ease); }
.lightbox.open img { transform: scale(1); }
.lightbox-close {
  position: absolute; top: 24px; right: 24px;
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255,255,255,0.1); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 24px; transition: background var(--t-fast);
}
.lightbox-close:hover { background: var(--red); }
