/* ============================================
   ANIMATIONS — Scroll Reveal, Parallax, Cursor
   ============================================ */

/* ---- Custom Cursor ---- */
.cursor {
  position: fixed;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid #e81a6b;
  pointer-events: none;
  z-index: var(--z-cursor);
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              height 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s,
              background 0.3s;
}
.cursor--hover {
  width: 56px;
  height: 56px;
  background: rgba(232, 26, 107, 0.1);
  border-color: #ff2d7f;
}
.cursor-dot {
  position: fixed;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ffffff;
  pointer-events: none;
  z-index: var(--z-cursor);
  transform: translate(-50%, -50%);
}

/* Hide custom cursor on touch devices */
@media (hover: none) {
  .cursor, .cursor-dot { display: none; }
}

/* ---- Scroll Reveal System ---- */
[data-reveal] {
  opacity: 0;
  transition: opacity var(--duration-slower) var(--ease-out),
              transform var(--duration-slower) var(--ease-out);
}
[data-reveal].revealed { opacity: 1; transform: none !important; }

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

/* Stagger children */
[data-reveal-stagger] > * {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--duration-slower) var(--ease-out),
              transform var(--duration-slower) var(--ease-out);
}
[data-reveal-stagger].revealed > *:nth-child(1) { transition-delay: 0ms; }
[data-reveal-stagger].revealed > *:nth-child(2) { transition-delay: 100ms; }
[data-reveal-stagger].revealed > *:nth-child(3) { transition-delay: 200ms; }
[data-reveal-stagger].revealed > *:nth-child(4) { transition-delay: 300ms; }
[data-reveal-stagger].revealed > *:nth-child(5) { transition-delay: 400ms; }
[data-reveal-stagger].revealed > *:nth-child(6) { transition-delay: 500ms; }
[data-reveal-stagger].revealed > *:nth-child(7) { transition-delay: 600ms; }
[data-reveal-stagger].revealed > *:nth-child(8) { transition-delay: 700ms; }
[data-reveal-stagger].revealed > * { opacity: 1; transform: none; }

/* ---- Parallax ---- */
[data-parallax] {
  will-change: transform;
  transition: transform 0.1s linear;
}
.parallax-bg {
  position: absolute;
  inset: -20%;
  background-size: cover;
  background-position: center;
  will-change: transform;
}
.parallax-float {
  will-change: transform;
  animation: float 6s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

/* ---- Decorative Shapes (Floating — Red Shades) ---- */
.deco-shape {
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
}
.deco-shape--coral {
  background: #e81a6b;
  opacity: 0.08;
}
.deco-shape--gradient {
  background: radial-gradient(circle, #e81a6b 0%, #a01048 60%, transparent 100%);
  opacity: 0.09;
}
.deco-shape--deep {
  background: #6b0f38;
  opacity: 0.14;
}
.deco-shape--glow {
  background: radial-gradient(circle, rgba(232,26,107,0.3) 0%, rgba(255,45,127,0.1) 40%, transparent 70%);
  opacity: 1;
}
.deco-shape--muted {
  background: #c4155a;
  opacity: 0.06;
}
.deco-shape--1 {
  width: 350px;
  height: 350px;
  top: 8%;
  right: -120px;
  animation: float 8s ease-in-out infinite;
}
.deco-shape--2 {
  width: 250px;
  height: 250px;
  bottom: 12%;
  left: -100px;
  animation: float 10s ease-in-out infinite reverse;
}
.deco-shape--3 {
  width: 180px;
  height: 180px;
  top: 45%;
  right: 12%;
  animation: float 7s ease-in-out infinite 1s;
}
.deco-shape--4 {
  width: 120px;
  height: 120px;
  top: 25%;
  left: 8%;
  animation: float 9s ease-in-out infinite 0.5s;
}
.deco-shape--5 {
  width: 200px;
  height: 200px;
  bottom: 30%;
  right: 5%;
  animation: float 11s ease-in-out infinite 2s;
}

/* ---- Text Reveal (word-by-word / line-by-line) ---- */
.text-reveal {
  overflow: hidden;
}
.text-reveal__line {
  display: block;
  transform: translateY(100%);
  transition: transform 0.8s var(--ease-out);
}
.text-reveal.revealed .text-reveal__line {
  transform: translateY(0);
}
.text-reveal.revealed .text-reveal__line:nth-child(2) { transition-delay: 0.1s; }
.text-reveal.revealed .text-reveal__line:nth-child(3) { transition-delay: 0.2s; }

/* ---- Counter Animation ---- */
.counter { display: inline-block; }

/* ---- Image Reveal ---- */
.image-reveal {
  position: relative;
  overflow: hidden;
}
.image-reveal::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--color-bg-primary);
  transform-origin: left;
  transition: transform 1s var(--ease-out);
}
.image-reveal.revealed::after {
  transform: scaleX(0);
  transform-origin: right;
}

/* ---- Magnetic Button ---- */
.magnetic {
  position: relative;
  display: inline-block;
  transition: transform 0.3s var(--ease-out);
}

/* ---- Smooth Page Transitions ---- */
.page-transition {
  animation: pageIn 0.6s var(--ease-out);
}
@keyframes pageIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---- Loading Screen ---- */
.loader {
  position: fixed;
  inset: 0;
  background: var(--color-bg-primary);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s var(--ease-out), visibility 0.6s;
}
.loader--hidden {
  opacity: 0;
  visibility: hidden;
}
.loader__logo {
  width: 120px;
  animation: pulse 1.5s ease-in-out infinite;
  filter: brightness(0) invert(1);
}
@keyframes pulse {
  0%, 100% { opacity: 0.5; transform: scale(0.95); }
  50% { opacity: 1; transform: scale(1); }
}

/* ---- Horizontal Scroll Progress ---- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--gradient-accent);
  z-index: calc(var(--z-sticky) + 1);
  width: 0%;
  transition: width 0.1s linear;
}
