/* ============================================================
   KNIPS DER FRISEUR – ANIMATIONS STYLESHEET
   Scroll reveals, hover effects, micro-interactions
   ============================================================ */

/* ======================== SCROLL REVEAL ANIMATIONS ======================== */
[data-animate] {
    opacity: 0;
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

[data-animate="fade-up"] {
    transform: translateY(40px);
}

[data-animate="fade-down"] {
    transform: translateY(-40px);
}

[data-animate="fade-left"] {
    transform: translateX(40px);
}

[data-animate="fade-right"] {
    transform: translateX(-40px);
}

[data-animate="fade-in"] {
    transform: scale(0.95);
}

[data-animate].animated {
    opacity: 1;
    transform: translateY(0) translateX(0) scale(1);
}

/* ======================== SPARKLE / GOLD PARTICLE EFFECT ======================== */
.gold-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--color-primary);
    border-radius: 50%;
    pointer-events: none;
    animation: sparkle 3s ease-in-out infinite;
    opacity: 0;
}

@keyframes sparkle {
    0%, 100% { opacity: 0; transform: scale(0); }
    50% { opacity: 0.8; transform: scale(1); }
}

/* ======================== FLOATING ELEMENTS ======================== */
.float-element {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* ======================== SHIMMER / GLOW EFFECTS ======================== */
.shimmer {
    position: relative;
    overflow: hidden;
}

.shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(200, 169, 110, 0.1),
        transparent
    );
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    50%, 100% { left: 100%; }
}

/* ======================== CURSOR GLOW (Desktop) ======================== */
.cursor-glow {
    position: fixed;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(200, 169, 110, 0.06) 0%, transparent 70%);
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s;
    opacity: 0;
}

.cursor-glow.visible {
    opacity: 1;
}

/* ======================== UNDERLINE HOVER FOR LINKS ======================== */
.animated-underline {
    position: relative;
}

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

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

/* ======================== MAGNETIC BUTTON EFFECT ======================== */
.btn {
    transition: all var(--transition-medium);
}

.btn:active {
    transform: scale(0.97);
}

/* ======================== CARD TILT EFFECT ======================== */
.service-card,
.team-card {
    transition: all var(--transition-medium);
}

/* ======================== STAGGER CHILDREN ======================== */
.stagger-children > * {
    opacity: 0;
    animation: staggerIn 0.6s var(--ease-out) forwards;
}

.stagger-children > *:nth-child(1) { animation-delay: 0s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.1s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.2s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.3s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.4s; }
.stagger-children > *:nth-child(6) { animation-delay: 0.5s; }

@keyframes staggerIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ======================== PULSE EFFECT ======================== */
.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ======================== TEXT GRADIENT ANIMATION ======================== */
.gradient-text {
    background: linear-gradient(
        135deg,
        var(--color-primary) 0%,
        var(--color-primary-light) 50%,
        var(--color-primary) 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 4s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% center; }
    50% { background-position: 100% center; }
    100% { background-position: 0% center; }
}

/* ======================== BORDER GLOW ON HOVER ======================== */
.glow-border {
    position: relative;
}

.glow-border::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, var(--color-primary), transparent, var(--color-primary));
    -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 var(--transition-medium);
}

.glow-border:hover::before {
    opacity: 1;
}

/* ======================== SMOOTH COUNT UP ======================== */
.count-up {
    display: inline-block;
    min-width: 2ch;
}

/* ======================== LOADING DOTS ======================== */
.loading-dots span {
    animation: loadDots 1.4s infinite both;
}

.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes loadDots {
    0%, 80%, 100% { opacity: 0.3; }
    40% { opacity: 1; }
}

/* ======================== PARALLAX HINT ======================== */
.parallax-layer {
    will-change: transform;
}

/* ======================== REVEAL LINE ======================== */
.reveal-line {
    overflow: hidden;
}

.reveal-line span {
    display: inline-block;
    transform: translateY(100%);
    animation: revealLine 0.8s var(--ease-out) forwards;
}

@keyframes revealLine {
    to {
        transform: translateY(0);
    }
}

/* ======================== NOISE TEXTURE OVERLAY ======================== */
.noise-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

/* ======================== SMOOTH SCROLL FIX ======================== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    [data-animate] {
        opacity: 1;
        transform: none;
    }
    
    .intro-overlay {
        display: none;
    }
}
