/* ============================================================
   DJ RIHYA — ANIMATIONS v2
   Updated for deep purple-black luxury theme
   ============================================================ */

/* ─── REVEAL SYSTEM ─── */
[data-reveal] {
  opacity: 0;
  transition-duration: 0.9s;
  transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  transition-property: opacity, transform;
}

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

[data-reveal="up"]    { transform: translateY(52px); }
[data-reveal="down"]  { transform: translateY(-52px); }
[data-reveal="left"]  { transform: translateX(-64px); }
[data-reveal="right"] { transform: translateX(64px); }
[data-reveal="fade"]  { transform: none; }
[data-reveal="scale"] { transform: scale(0.90); }

/* Delay classes */
[data-delay="0"]   { transition-delay: 0ms; }
[data-delay="80"]  { transition-delay: 80ms; }
[data-delay="100"] { transition-delay: 100ms; }
[data-delay="120"] { transition-delay: 120ms; }
[data-delay="160"] { transition-delay: 160ms; }
[data-delay="200"] { transition-delay: 200ms; }
[data-delay="240"] { transition-delay: 240ms; }
[data-delay="300"] { transition-delay: 300ms; }
[data-delay="320"] { transition-delay: 320ms; }
[data-delay="360"] { transition-delay: 360ms; }
[data-delay="400"] { transition-delay: 400ms; }

/* ─── HERO REVEAL ─── */
.reveal-fade {
  opacity: 0;
  animation: fade-in 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.reveal-fade-up {
  opacity: 0;
  transform: translateY(28px);
  animation: fade-up 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.reveal-text {
  opacity: 0;
  transform: translateY(44px);
  animation: fade-up 0.95s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Hero stagger */
.hero-eyebrow.reveal-fade       { animation-delay: 0.2s; }
.hero-title-line:nth-child(1).reveal-text { animation-delay: 0.4s; }
.hero-title-line:nth-child(2).reveal-text { animation-delay: 0.58s; }
.hero-title-line:nth-child(3).reveal-text { animation-delay: 0.72s; }
.hero-subtitle.reveal-fade-up   { animation-delay: 0.9s; }
.hero-cta.reveal-fade-up        { animation-delay: 1.06s; }
.hero-stats.reveal-fade-up      { animation-delay: 1.22s; }

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── WAVEFORM ─── */
@keyframes waveform-pulse {
  0%, 100% { height: var(--h, 25%); }
  50%       { height: var(--h2, 80%); }
}

.waveform-bar.playing {
  animation: waveform-pulse 0.5s ease-in-out infinite alternate;
  background: linear-gradient(to top, #CC2070, #FF3F95) !important;
  box-shadow: 0 0 6px rgba(255, 63, 149, 0.5) !important;
}

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

.shimmer-text {
  background: linear-gradient(
    90deg,
    #CC2070 0%, #FF3F95 25%, #FF7A45 50%, #FF3F95 75%, #CC2070 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: pink-shimmer 3s linear infinite;
}

/* ─── GLOW PULSE ─── */
@keyframes glow-pulse-pink {
  0%, 100% { box-shadow: 0 0 20px rgba(255, 63, 149, 0.2); }
  50%       { box-shadow: 0 0 40px rgba(255, 63, 149, 0.4); }
}

@keyframes glow-pulse-cyan {
  0%, 100% { box-shadow: 0 0 20px rgba(37, 216, 255, 0.15); }
  50%       { box-shadow: 0 0 40px rgba(37, 216, 255, 0.3); }
}

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

/* ─── BORDER GLOW ANIMATION ─── */
@keyframes border-glow {
  0%, 100% { border-color: var(--border); }
  50%       { border-color: rgba(255, 63, 149, 0.4); }
}

/* ─── SPOTLIGHT (updated for new bg) ─── */
.spotlight {
  background: radial-gradient(
    circle 600px at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(255, 63, 149, 0.05) 0%,
    rgba(255, 122, 69, 0.02) 40%,
    transparent 70%
  );
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

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

.ripple::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 5px; height: 5px;
  background: rgba(255, 63, 149, 0.25);
  opacity: 0;
  border-radius: 50%;
  transform: scale(1);
}

.ripple:active::after {
  animation: ripple-expand 0.4s ease-out;
}

@keyframes ripple-expand {
  to { transform: scale(100); opacity: 0; }
}

/* ─── GLASS CARD ENTRANCE ─── */
@keyframes glass-in {
  from {
    opacity: 0;
    transform: translateY(24px);
    backdrop-filter: blur(0px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    backdrop-filter: blur(12px);
  }
}

/* ─── TRACK PLAYING ─── */
.track-item.playing {
  background: rgba(255, 63, 149, 0.04) !important;
}

.track-item.playing .track-name {
  color: var(--pink) !important;
}

.track-item.playing .track-play-btn {
  border-color: var(--pink) !important;
  color: var(--pink) !important;
  background: rgba(255, 63, 149, 0.1) !important;
  box-shadow: 0 0 16px rgba(255, 63, 149, 0.2) !important;
}

/* ─── GALLERY HOVER ─── */
.gallery-item {
  will-change: transform;
}

/* ─── SKIP LINK ─── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--gradient-cta);
  color: #fff;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  z-index: 99999;
  transition: top 0.2s;
}

.skip-link:focus { top: 0; }

/* ─── ACCESSIBILITY: Focus visible ─── */
:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 3px;
  border-radius: 4px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 3px;
}

/* ─── COUNTER ─── */
.counter { display: inline-block; }

/* ─── TEXT MASK ─── */
.text-mask {
  overflow: hidden;
  display: block;
}

.text-mask > span {
  display: block;
  transform: translateY(110%);
  transition: transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
}

.text-mask.revealed > span {
  transform: translateY(0);
}

/* ─── PREMIUM GLITCH EFFECT ─── */
.hero-name {
  position: relative;
  display: inline-block;
}

.hero-name::before,
.hero-name::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  pointer-events: none;
}

.hero-name::before {
  animation: glitch-anim-1 4s infinite linear;
}

.hero-name::after {
  animation: glitch-anim-2 4s infinite linear;
}

@keyframes glitch-anim-1 {
  0%, 88% { clip-path: inset(100% 0 0 0); transform: translate(0); }
  89% { clip-path: inset(15% 0 45% 0); transform: translate(-3px, -2px); text-shadow: -2px 0 var(--pink); }
  90% { clip-path: inset(65% 0 5% 0); transform: translate(3px, 2px); text-shadow: 2px 0 var(--cyan); }
  91% { clip-path: inset(35% 0 25% 0); transform: translate(-2px, 3px); }
  92% { clip-path: inset(5% 0 80% 0); transform: translate(2px, -3px); text-shadow: -1px -2px var(--orange); }
  93%, 100% { clip-path: inset(100% 0 0 0); transform: translate(0); }
}

@keyframes glitch-anim-2 {
  0%, 88% { clip-path: inset(100% 0 0 0); transform: translate(0); }
  89% { clip-path: inset(80% 0 3% 0); transform: translate(3px, 2px); text-shadow: 2px 0 var(--cyan); }
  90% { clip-path: inset(25% 0 40% 0); transform: translate(-2px, -2px); text-shadow: -2px 0 var(--pink); }
  91% { clip-path: inset(10% 0 70% 0); transform: translate(2px, -2px); }
  92% { clip-path: inset(55% 0 15% 0); transform: translate(-3px, 1px); text-shadow: 1px 2px var(--orange); }
  93%, 100% { clip-path: inset(100% 0 0 0); transform: translate(0); }
}
