/* =====================================================
   HYGGE HEAD SPA – Animation Styles
   Weiche, luxuriöse, spa-inspirierte Animationen
   ===================================================== */

/* --- Reveal Animations (Intersection Observer driven) --- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.9s var(--ease-out),
                transform 0.9s var(--ease-out);
    will-change: transform, opacity;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Variants */
.reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.9s var(--ease-out),
                transform 0.9s var(--ease-out);
    will-change: transform, opacity;
}

.reveal-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.9s var(--ease-out),
                transform 0.9s var(--ease-out);
    will-change: transform, opacity;
}

.reveal-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.92);
    transition: opacity 0.9s var(--ease-out),
                transform 0.9s var(--ease-out);
    will-change: transform, opacity;
}

.reveal-scale.visible {
    opacity: 1;
    transform: scale(1);
}

.reveal-fade {
    opacity: 0;
    transition: opacity 1.2s var(--ease-out);
    will-change: opacity;
}

.reveal-fade.visible {
    opacity: 1;
}

/* Stagger children */
.stagger-children .reveal {
    transition-delay: calc(var(--stagger, 0) * 120ms);
}

/* --- Hero Entrance Animations --- */
.hero.visible .hero-label {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s var(--ease-out) 0.3s,
                transform 0.8s var(--ease-out) 0.3s;
}

.hero.visible .hero-title {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 1s var(--ease-out) 0.6s,
                transform 1s var(--ease-out) 0.6s;
}

.hero.visible .hero-text {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s var(--ease-out) 1s,
                transform 0.8s var(--ease-out) 1s;
}

.hero.visible .hero-actions {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s var(--ease-out) 1.3s,
                transform 0.8s var(--ease-out) 1.3s;
}

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

/* --- Soft Float Animation (decorative elements) --- */
@keyframes softFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

.float-element {
    animation: softFloat 6s ease-in-out infinite;
}

/* --- Gentle Pulse (CTA attention) --- */
@keyframes gentlePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(139, 115, 85, 0.2); }
    50% { box-shadow: 0 0 0 12px rgba(139, 115, 85, 0); }
}

.pulse-attention {
    animation: gentlePulse 3s ease-in-out infinite;
}

/* --- Image Reveal (clip-path) --- */
.image-reveal {
    clip-path: inset(0 100% 0 0);
    transition: clip-path 1.2s var(--ease-out);
}

.image-reveal.visible {
    clip-path: inset(0 0 0 0);
}

/* --- Line Draw Animation --- */
.line-draw {
    width: 0;
    transition: width 1s var(--ease-out);
}

.line-draw.visible {
    width: 50px;
}

/* --- Counter / Number Animation --- */
.price-reveal {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.6s var(--ease-out),
                transform 0.6s var(--ease-out);
}

.price-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Organic Shape Backgrounds --- */
.organic-shape {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(196, 168, 130, 0.06) 0%,
        transparent 70%
    );
    pointer-events: none;
    z-index: 0;
}

.organic-shape--1 {
    width: 600px;
    height: 600px;
    top: -200px;
    right: -200px;
    animation: softFloat 10s ease-in-out infinite;
}

.organic-shape--2 {
    width: 400px;
    height: 400px;
    bottom: -100px;
    left: -100px;
    animation: softFloat 8s ease-in-out 2s infinite;
}

/* --- Smooth Section Transition Gradients --- */
.section-transition {
    position: relative;
}

.section-transition::before {
    content: '';
    position: absolute;
    top: -60px;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to bottom, transparent, var(--color-bg-cream));
    pointer-events: none;
}

/* --- Nav scroll-based reveal --- */
.site-header .nav-link,
.site-header .nav-cta {
    transition: opacity 0.4s var(--ease-out),
                transform 0.4s var(--ease-out),
                color var(--transition-fast),
                background var(--transition-fast);
}

/* --- Hover lift for interactive cards --- */
.hover-lift {
    transition: transform var(--transition-base),
                box-shadow var(--transition-base);
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-medium);
}

/* --- Reduced motion preference --- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .reveal,
    .reveal-left,
    .reveal-right,
    .reveal-scale,
    .reveal-fade {
        opacity: 1;
        transform: none;
    }

    .hero-label,
    .hero-title,
    .hero-text,
    .hero-actions {
        opacity: 1;
        transform: none;
    }

    html {
        scroll-behavior: auto;
    }
}
