/* ==========================================================================
   BLUSH & BLOOM — Skin, Hair & Laser Clinic
   Cinematic Animations & Motion Choreography
   ========================================================================== */

/* ==========================================================================
   1. Cinematic Intro Loader
   ========================================================================== */
.cinematic-loader {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-warm-ivory);
    transition: opacity 0.8s cubic-bezier(0.65, 0, 0.35, 1),
                visibility 0.8s cubic-bezier(0.65, 0, 0.35, 1);
}

.cinematic-loader.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-backdrop {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(167, 201, 0, 0.08) 0%, transparent 60%),
                radial-gradient(circle at 80% 80%, rgba(129, 117, 168, 0.07) 0%, transparent 50%),
                var(--color-warm-ivory);
}

.loader-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 480px;
    padding: 20px;
}

/* Botanical Stem Drawing Upward */
.loader-botanical-art {
    width: 90px;
    height: 140px;
    margin-bottom: 12px;
}
.loader-stem-svg {
    width: 100%;
    height: 100%;
}

.loader-path-stem {
    stroke-dasharray: 250;
    stroke-dashoffset: 250;
    animation: stemDrawUp 1.4s cubic-bezier(0.4, 0, 0.2, 1) forwards 0.2s;
}
.loader-path-leaf-1 {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: leafSprout 1s ease-out forwards 0.7s;
}
.loader-path-leaf-2 {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: leafSprout 1s ease-out forwards 0.9s;
}
.loader-path-profile {
    stroke-dasharray: 300;
    stroke-dashoffset: 300;
    animation: profileDraw 1.6s ease-out forwards 0.3s;
}

@keyframes stemDrawUp {
    to { stroke-dashoffset: 0; }
}
@keyframes leafSprout {
    to { stroke-dashoffset: 0; }
}
@keyframes profileDraw {
    to { stroke-dashoffset: 0; }
}

/* Flower Reveal */
.loader-flower {
    opacity: 0;
    transform: scale(0.6) rotate(-15deg);
    animation: flowerBloom 1.1s cubic-bezier(0.34, 1.56, 0.64, 1) forwards 1.1s;
    margin-bottom: 16px;
}
@keyframes flowerBloom {
    to {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

/* Brand Title & Tagline */
.loader-brand-title {
    font-family: var(--font-heading);
    font-size: 2.75rem;
    font-weight: 600;
    color: var(--color-primary-green);
    letter-spacing: -0.01em;
    opacity: 0;
    transform: translateY(12px);
    animation: textFadeUp 0.9s ease-out forwards 1.4s;
    line-height: 1.1;
}
.loader-brand-title .text-amp {
    color: var(--color-deep-emerald);
    font-weight: 300;
    margin: 0 4px;
}
.loader-brand-title .registered-mark {
    font-size: 0.45em;
    vertical-align: super;
    color: var(--color-primary-green);
    margin-left: 2px;
}

.loader-tagline {
    font-family: var(--font-body);
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--color-soft-lavender);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-top: 8px;
    opacity: 0;
    transform: translateY(10px);
    animation: textFadeUp 0.9s ease-out forwards 1.7s;
}

@keyframes textFadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Progress Line Track */
.loader-line-track {
    width: 140px;
    height: 2px;
    background: rgba(7, 91, 59, 0.1);
    margin-top: 24px;
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}
.loader-line-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--color-primary-green), var(--color-lime-accent));
    animation: lineProgress 2.2s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.2s;
}
@keyframes lineProgress {
    0% { width: 0%; }
    50% { width: 65%; }
    100% { width: 100%; }
}

/* ==========================================================================
   2. Floating & Parallax Botanical Motifs
   ========================================================================== */
.float-gentle {
    animation: floatGentle 6s ease-in-out infinite alternate;
}
.float-reverse {
    animation: floatReverse 7s ease-in-out infinite alternate;
}

@keyframes floatGentle {
    0% {
        transform: translateY(0px) rotate(0deg);
    }
    100% {
        transform: translateY(-16px) rotate(2deg);
    }
}

@keyframes floatReverse {
    0% {
        transform: translateY(0px) rotate(0deg);
    }
    100% {
        transform: translateY(14px) rotate(-2deg);
    }
}

/* Mouse Wheel Hero Animation */
@keyframes mouseWheel {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    60% {
        opacity: 0.4;
        transform: translateX(-50%) translateY(12px);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(14px);
    }
}

/* ==========================================================================
   3. Headline Mask Reveal & Micro-Interactions
   ========================================================================== */
.reveal-text-mask {
    overflow: hidden;
    display: block;
}
.reveal-text-mask > span {
    display: inline-block;
    transform: translateY(100%);
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.is-revealed .reveal-text-mask > span {
    transform: translateY(0%);
}

/* Button Subtle Glow & Shine Effect */
.btn-luxury-cta::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 40%;
    height: 200%;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.25) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(30deg);
    transition: left 0.75s ease-out;
    pointer-events: none;
}
.btn-luxury-cta:hover::before {
    left: 130%;
}

/* Pulsing Badge Indicator */
.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-primary-green);
    display: inline-block;
    position: relative;
}
.pulse-dot::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 1.5px solid var(--color-primary-green);
    animation: pulseRing 1.8s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}
@keyframes pulseRing {
    0% { transform: scale(0.8); opacity: 1; }
    100% { transform: scale(2.2); opacity: 0; }
}

/* Card Stagger Entrance Class */
.fade-up-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.fade-up-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   4. Reduced Motion Preferences
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .cinematic-loader {
        display: none !important;
    }

    .fade-up-card {
        opacity: 1 !important;
        transform: none !important;
    }

    .float-gentle, .float-reverse {
        animation: none !important;
    }
}
