/* ══════════════════════════════════════════════════════════════
   ANIMATIONS.CSS — Rizzo Michele Fashion Theme
   Site: https://rizzo-style.com
   Made in Italy — Manifattura Luxury
   ══════════════════════════════════════════════════════════════ */


/* ──────────────────────────────────────────────────────────────
   1. SCROLL REVEAL — base animation states
   ────────────────────────────────────────────────────────────── */

.fade-in {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.fade-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.fade-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.scale-in {
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.scale-in.visible {
    opacity: 1;
    transform: scale(1);
}


/* ──────────────────────────────────────────────────────────────
   2. TIMELINE STEPS
   ────────────────────────────────────────────────────────────── */

.timeline-step {
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.timeline-step.visible {
    opacity: 1;
    transform: translateX(0);
}


/* ──────────────────────────────────────────────────────────────
   3. @KEYFRAMES LIBRARY
   ────────────────────────────────────────────────────────────── */

/* Floating particles — CSS fallback when canvas is unavailable */
@keyframes float-up {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(-100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Hero scroll indicator bounce */
@keyframes scroll-bounce {
    0%, 100% {
        transform: translateY(0);
        opacity: 1;
    }
    50% {
        transform: translateY(8px);
        opacity: 0.5;
    }
}

/* Gold line draw from left to right */
@keyframes draw-line {
    from { width: 0; }
    to   { width: 60px; }
}

/* Gold pulsing glow */
@keyframes pulse-gold {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(201, 168, 76, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(201, 168, 76, 0);
    }
}

/* Hero title word reveal — clip-path wipe */
@keyframes word-reveal {
    from { clip-path: inset(0 100% 0 0); }
    to   { clip-path: inset(0 0% 0 0); }
}

/* Underline slide-in from left */
@keyframes underline-slide {
    from {
        transform: scaleX(0);
        transform-origin: left;
    }
    to {
        transform: scaleX(1);
        transform-origin: left;
    }
}

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

/* Service card glow on hover */
@keyframes card-glow {
    0% {
        box-shadow: 0 0 0 0 rgba(201, 168, 76, 0);
    }
    100% {
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4),
                    0 0 30px rgba(201, 168, 76, 0.1);
    }
}

/* Page entrance */
@keyframes page-enter {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade in simple */
@keyframes fade-in-simple {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Scale up from center */
@keyframes scale-up {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Horizontal marquee — collections ticker */
@keyframes marquee {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}


/* ──────────────────────────────────────────────────────────────
   4. GOLD DIVIDER
   ────────────────────────────────────────────────────────────── */

.gold-divider {
    display: block;
    height: 1px;
    background: var(--color-gold, #c9a84c);
    animation: draw-line 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    animation-play-state: paused;
}
.gold-divider.visible {
    animation-play-state: running;
}


/* ──────────────────────────────────────────────────────────────
   5. GOLD SHIMMER TEXT
   ────────────────────────────────────────────────────────────── */

.gold-shimmer {
    background: linear-gradient(
        90deg,
        #c9a84c 0%,
        #e8d5a3 30%,
        #f5e6b8 50%,
        #e8d5a3 70%,
        #a07830 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 4s linear infinite;
}


/* ──────────────────────────────────────────────────────────────
   6. SCROLL LINE / HERO INDICATOR
   ────────────────────────────────────────────────────────────── */

.scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--color-gold, #c9a84c), transparent);
    margin: 8px auto 0;
    animation: scroll-bounce 2s ease-in-out infinite;
}

.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    opacity: 0.7;
}

.scroll-indicator span {
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-gold, #c9a84c);
}


/* ──────────────────────────────────────────────────────────────
   7. CUSTOM CURSOR
   ────────────────────────────────────────────────────────────── */

#cursor {
    width: 8px;
    height: 8px;
    background: var(--color-gold, #c9a84c);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 99999;
    top: 0;
    left: 0;
    will-change: transform;
    transition: width 0.2s ease,
                height 0.2s ease,
                background 0.2s ease;
}

#cursor-follower {
    width: 30px;
    height: 30px;
    border: 1px solid rgba(201, 168, 76, 0.5);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 99998;
    top: 0;
    left: 0;
    will-change: transform;
    transition: width 0.3s ease,
                height 0.3s ease,
                border-color 0.3s ease;
}

#cursor.cursor--hover {
    width: 12px;
    height: 12px;
    background: var(--color-gold-light, #e8d5a3);
}

#cursor-follower.cursor--hover {
    width: 50px;
    height: 50px;
    border-color: var(--color-gold, #c9a84c);
}

body.custom-cursor,
body.custom-cursor * {
    cursor: none !important;
}


/* ──────────────────────────────────────────────────────────────
   8. NAVBAR TRANSITIONS
   ────────────────────────────────────────────────────────────── */

#site-header,
.site-header {
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                background 0.4s ease,
                padding 0.4s ease,
                border-bottom 0.4s ease,
                backdrop-filter 0.4s ease;
}

#site-header.nav-hidden,
.site-header.nav-hidden {
    transform: translateY(-100%);
}

#site-header.scrolled,
.site-header.scrolled {
    background: rgba(8, 8, 8, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(201, 168, 76, 0.15);
}


/* ──────────────────────────────────────────────────────────────
   9. NAV LINKS HOVER UNDERLINE
   ────────────────────────────────────────────────────────────── */

.nav-links a {
    position: relative;
    text-decoration: none;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--color-gold, #c9a84c);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.nav-links a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}


/* ──────────────────────────────────────────────────────────────
   10. HAMBURGER MENU TOGGLE
   ────────────────────────────────────────────────────────────── */

.nav-toggle {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 36px;
    height: 28px;
}

.nav-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--color-gold, #c9a84c);
    margin: 3px 0;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                opacity 0.3s ease;
    transform-origin: center;
    pointer-events: none;
}

.nav-toggle.is-active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.nav-toggle.is-active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}


/* ──────────────────────────────────────────────────────────────
   11. MOBILE MENU SLIDE-IN PANEL
   ────────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80vw;
        max-width: 320px;
        height: 100vh;
        background: #0a0a0a;
        border-left: 1px solid rgba(201, 168, 76, 0.3);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 40px;
        transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        z-index: 999;
        padding: 80px 40px;
    }

    .nav-links.is-open {
        right: 0;
    }

    body.nav-open {
        overflow: hidden;
    }

    /* Backdrop overlay */
    body.nav-open::after {
        content: '';
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.7);
        z-index: 998;
        animation: fade-in-simple 0.3s ease forwards;
    }
}


/* ──────────────────────────────────────────────────────────────
   12. PAGE ENTRANCE ANIMATION
   ────────────────────────────────────────────────────────────── */

.main-content {
    animation: page-enter 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}


/* ──────────────────────────────────────────────────────────────
   13. SERVICE CARD HOVER
   ────────────────────────────────────────────────────────────── */

.service-card {
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.4s ease,
                border-color 0.4s ease;
}

.service-card:hover,
.service-card.is-touched {
    transform: translateY(-6px);
    animation: card-glow 0.4s ease forwards;
    border-color: rgba(201, 168, 76, 0.4);
}


/* ──────────────────────────────────────────────────────────────
   14. HERO WORD REVEAL
   ────────────────────────────────────────────────────────────── */

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

.word-reveal--delay-1 { animation-delay: 0.1s; }
.word-reveal--delay-2 { animation-delay: 0.25s; }
.word-reveal--delay-3 { animation-delay: 0.4s; }
.word-reveal--delay-4 { animation-delay: 0.55s; }


/* ──────────────────────────────────────────────────────────────
   15. PULSE GOLD (CTA button / badge)
   ────────────────────────────────────────────────────────────── */

.pulse-gold {
    animation: pulse-gold 2.5s ease-in-out infinite;
}


/* ──────────────────────────────────────────────────────────────
   16. MARQUEE TICKER (collections / brand strip)
   ────────────────────────────────────────────────────────────── */

.marquee-wrapper {
    overflow: hidden;
    white-space: nowrap;
}

.marquee-track {
    display: inline-block;
    animation: marquee 20s linear infinite;
}

.marquee-track:hover {
    animation-play-state: paused;
}


/* ──────────────────────────────────────────────────────────────
   17. CSS PARTICLES (canvas fallback)
   ────────────────────────────────────────────────────────────── */

.css-particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    animation: float-up var(--duration, 8s) ease-in-out infinite;
    animation-delay: var(--delay, 0s);
    opacity: 0;
}


/* ──────────────────────────────────────────────────────────────
   18. HERO CANVAS
   ────────────────────────────────────────────────────────────── */

#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}


/* ──────────────────────────────────────────────────────────────
   19. COOKIE BANNER SLIDE-UP
   ────────────────────────────────────────────────────────────── */

#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9000;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                opacity 0.4s ease;
}

#cookie-banner.hidden {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
}


/* ──────────────────────────────────────────────────────────────
   20. SCROLL PROGRESS BAR
   ────────────────────────────────────────────────────────────── */

#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    background: var(--color-gold, #c9a84c);
    z-index: 9999;
    transition: width 0.1s linear;
    width: 0;
    pointer-events: none;
}


/* ──────────────────────────────────────────────────────────────
   21. LAZY IMAGE FADE
   ────────────────────────────────────────────────────────────── */

img[loading="lazy"] {
    transition: opacity 0.5s ease;
}


/* ──────────────────────────────────────────────────────────────
   22. PREFERS-REDUCED-MOTION
       Respect user accessibility settings
   ────────────────────────────────────────────────────────────── */

@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;
    }

    /* Reveal all hidden elements instantly */
    .fade-in,
    .fade-in-left,
    .fade-in-right,
    .scale-in {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .timeline-step {
        opacity: 1 !important;
        transform: none !important;
    }

    .gold-shimmer {
        animation: none !important;
        background: var(--color-gold, #c9a84c);
        -webkit-text-fill-color: var(--color-gold, #c9a84c);
    }

    .marquee-track {
        animation: none !important;
    }

    .word-reveal {
        clip-path: none !important;
        animation: none !important;
    }

    .scroll-line {
        animation: none !important;
    }

    #hero-canvas {
        display: none;
    }
}
