/* ── Page Load Orchestration ──────────── */
.load-reveal {
    opacity: 0;
    transform: translateY(20px);
    animation: load-reveal-in 0.8s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
    animation-delay: calc(var(--i, 0) * 0.1s + 0.2s);
}

@keyframes load-reveal-in {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Scroll Progress Bar ──────────────── */
.scroll-progress {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--gradient);
    z-index: var(--z-progress);
    transition: none;
    will-change: width;
}

/* ── Scroll Reveal ────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Delay variants */
.reveal--delay-1 { transition-delay: 0.1s; }
.reveal--delay-2 { transition-delay: 0.2s; }
.reveal--delay-3 { transition-delay: 0.3s; }
.reveal--delay-4 { transition-delay: 0.4s; }
.reveal--delay-5 { transition-delay: 0.5s; }

/* Direction variants */
.reveal--left {
    transform: translateX(-30px);
}

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

.reveal--right {
    transform: translateX(30px);
}

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

.reveal--scale {
    transform: scale(0.95);
}

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

/* Clip reveal — wipes in from left */
.reveal--clip {
    opacity: 1;
    transform: none;
    clip-path: inset(0 100% 0 0);
    transition: clip-path 0.8s cubic-bezier(0.25, 0.1, 0.25, 1);
}

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

/* Blur-in reveal */
.reveal--blur {
    opacity: 0;
    filter: blur(8px);
    transform: translateY(10px);
    transition: opacity 0.7s ease, filter 0.7s ease, transform 0.7s ease;
}

.reveal--blur.is-visible {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
}

/* Scale-up reveal — for images */
.reveal--scale-up {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.6s ease, transform 0.8s cubic-bezier(0.25, 0.1, 0.25, 1);
}

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

/* ── Custom Cursor (Hero Section) ──────── */
.hero-cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    border: 1.5px solid var(--color-primary);
    border-radius: 50%;
    pointer-events: none;
    z-index: var(--z-overlay);
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease, border-color 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    mix-blend-mode: difference;
}

.hero-cursor.is-visible {
    opacity: 1;
}

.hero-cursor.is-hovering {
    width: 48px;
    height: 48px;
    border-color: var(--color-accent);
}

/* ── Floating Buttons Animation ──────────── */
.floating-buttons {
    position: fixed;
    bottom: var(--space-xl);
    right: var(--space-xl);
    z-index: var(--z-fixed);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.floating-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: var(--radius-full);
    color: var(--color-white);
    box-shadow: var(--shadow-lg);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.floating-btn:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-xl);
    color: var(--color-white);
}

.floating-btn--whatsapp {
    background: #25d366;
}

.floating-btn--phone {
    background: var(--color-primary);
}

.floating-btn svg {
    width: 24px;
    height: 24px;
}

/* Pulse animation for WhatsApp */
.floating-btn--whatsapp::before {
    content: '';
    position: absolute;
    width: 56px;
    height: 56px;
    border-radius: var(--radius-full);
    background: #25d366;
    animation: pulse 2s ease-out infinite;
    z-index: -1;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

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

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

/* ── Mobile floating buttons ───────────── */
@media (max-width: 768px) {
    .floating-buttons {
        bottom: var(--space-md);
        right: var(--space-md);
    }

    .floating-btn {
        width: 48px;
        height: 48px;
    }

    .floating-btn svg {
        width: 20px;
        height: 20px;
    }

    .floating-btn--whatsapp::before {
        width: 48px;
        height: 48px;
    }
}

/* ── Reduced motion ──────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .floating-btn--whatsapp::before {
        animation: none;
    }

    /* Ethos: disable sticky scroll animation */
    .ethos-scroll-container {
        height: auto;
    }

    .ethos-section {
        position: relative;
        height: auto;
        overflow: visible;
        padding: var(--space-3xl) 0;
    }

    .ethos-content {
        position: relative;
        width: min(600px, 90%);
        top: auto;
        left: auto;
        transform: none;
        margin: 0 auto;
        opacity: 1 !important;
        background: var(--color-primary);
        color: var(--color-white);
        border: none;
        border-radius: var(--space-md);
        padding: var(--space-xl);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .gallery-space {
        display: none;
    }

    .load-reveal {
        opacity: 1;
        transform: none;
        animation: none;
    }

    .scroll-progress {
        display: none;
    }

    .hero-cursor {
        display: none;
    }

    .reveal--clip {
        clip-path: none;
    }

    .reveal--blur {
        opacity: 1;
        filter: none;
        transform: none;
    }

    .reveal--scale-up {
        opacity: 1;
        transform: none;
    }

    * {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
