/* ========================================
   DANCALEM - Animations & Effects
   ======================================== */

/* ---------- Parallax Background ---------- */
.parallax-bg img {
    transition: transform 0.1s linear;
    will-change: transform;
}

/* ---------- Glassmorphism ---------- */
.glass {
    background: var(--color-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--color-border);
}

/* ---------- Glow Effects ---------- */
.glow-accent {
    box-shadow: 0 0 40px rgba(201, 169, 110, 0.15);
}

/* ---------- Image Reveal Animation ---------- */
@keyframes imageReveal {
    0% { clip-path: inset(100% 0 0 0); }
    100% { clip-path: inset(0 0 0 0); }
}

.img-reveal {
    clip-path: inset(100% 0 0 0);
}
.img-reveal.visible {
    animation: imageReveal 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* ---------- Text Shimmer ---------- */
@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

.text-shimmer {
    background: linear-gradient(
        90deg,
        var(--color-text) 0%,
        var(--color-accent) 50%,
        var(--color-text) 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 4s linear infinite;
}

/* ---------- Smooth Scale on Hover ---------- */
.hover-scale {
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.hover-scale:hover {
    transform: scale(1.03);
}

/* ---------- Float Animation ---------- */
@keyframes float {
    0%, 100% { transform: translate(-50%, -50%) translateY(0); }
    50% { transform: translate(-50%, -50%) translateY(-10px); }
}

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

/* ---------- Stagger Children ---------- */
.stagger-children > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.stagger-children.visible > *:nth-child(1) { transition-delay: 0.1s; }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.2s; }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.3s; }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.4s; }
.stagger-children.visible > *:nth-child(5) { transition-delay: 0.5s; }
.stagger-children.visible > *:nth-child(6) { transition-delay: 0.6s; }
.stagger-children.visible > * {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- Gradient Border ---------- */
.gradient-border {
    position: relative;
}
.gradient-border::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, var(--color-accent), transparent, var(--color-accent));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
}
.gradient-border:hover::before { opacity: 1; }

/* ---------- Smooth Scroll Progress ---------- */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: linear-gradient(90deg, var(--color-accent), var(--color-accent-light));
    z-index: 10002;
    transition: width 0.1s linear;
}

/* ---------- Magnetic Button Effect (JS controlled) ---------- */
.magnetic {
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
