/* ============================================================
   LOXUNO — Animations & Keyframes
   ============================================================ */

/* ── PAGE LOAD OVERLAY ─────────────────────────────────────── */
#page-overlay {
    position: fixed;
    inset: 0;
    background: #0A0A0A;
    z-index: 9999;
    pointer-events: none;
    animation: overlayExit 0.8s cubic-bezier(0.25, 0.1, 0.25, 1) 0.15s forwards;
}

@keyframes overlayExit {
    0%   { opacity: 1; }
    80%  { opacity: 1; }
    100% { opacity: 0; visibility: hidden; }
}

/* ── CORE KEYFRAMES ────────────────────────────────────────── */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

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

@keyframes drawLine {
    from { transform: scaleX(0); }
    to   { transform: scaleX(1); }
}

@keyframes drawLineVertical {
    from { transform: scaleY(0); }
    to   { transform: scaleY(1); }
}

@keyframes clipReveal {
    from { clip-path: inset(100% 0 0 0); }
    to   { clip-path: inset(0 0 0 0); }
}

@keyframes gentleBounce {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(8px); }
}

@keyframes subtleScale {
    from { transform: scale(1.04); }
    to   { transform: scale(1); }
}

@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-10deg) scale(0.9);
    }
    to {
        opacity: 1;
        transform: rotate(0deg) scale(1);
    }
}

@keyframes drawDown {
    from {
        height: 0;
        opacity: 0;
    }
    to {
        height: 80px;
        opacity: 1;
    }
}

@keyframes shimmer {
    0%   { background-position: -200% center; }
    100% { background-position: 200% center; }
}

@keyframes pulseGold {
    0%, 100% { box-shadow: 0 0 0 0 rgba(201, 169, 110, 0); }
    50%       { box-shadow: 0 0 0 8px rgba(201, 169, 110, 0.08); }
}

/* ── HERO ENTRANCE ANIMATIONS ──────────────────────────────── */
.hero-headline .line {
    display: block;
    clip-path: inset(100% 0 0 0);
    animation: clipReveal 0.9s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
    opacity: 1;
}

.hero-headline .line:nth-child(1) { animation-delay: 0.6s; }
.hero-headline .line:nth-child(2) { animation-delay: 0.78s; }
.hero-headline .line:nth-child(3) { animation-delay: 0.96s; }

.hero-sub {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.7s cubic-bezier(0.25, 0.1, 0.25, 1) 1.1s forwards;
}

.hero-cta-wrap {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.7s cubic-bezier(0.25, 0.1, 0.25, 1) 1.3s forwards;
}

.hero-vertical-line {
    transform-origin: top;
    animation: drawLineVertical 0.8s cubic-bezier(0.25, 0.1, 0.25, 1) 0.9s both;
}

.hero-scroll-indicator {
    animation: gentleBounce 2s ease-in-out 1.8s infinite;
}

/* ── HEADER ENTRANCE ───────────────────────────────────────── */
.site-header {
    animation: slideDown 0.5s cubic-bezier(0.25, 0.1, 0.25, 1) 0.3s both;
}

/* ── SCROLL-TRIGGERED BASE STATE ───────────────────────────── */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.25, 0.1, 0.25, 1),
                transform 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.animate-on-scroll.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* Scale variant */
.animate-scale {
    opacity: 0;
    transform: scale(1.03);
    transition: opacity 0.8s cubic-bezier(0.25, 0.1, 0.25, 1),
                transform 0.8s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.animate-scale.in-view {
    opacity: 1;
    transform: scale(1);
}

/* Fade only variant */
.animate-fade {
    opacity: 0;
    transition: opacity 0.8s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.animate-fade.in-view {
    opacity: 1;
}

/* Rotate-in variant (icons) */
.animate-icon {
    opacity: 0;
    transform: rotate(-10deg) scale(0.85);
    transition: opacity 0.6s cubic-bezier(0.25, 0.1, 0.25, 1),
                transform 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.animate-icon.in-view {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

/* Slide from left */
.animate-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.7s cubic-bezier(0.25, 0.1, 0.25, 1),
                transform 0.7s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.animate-left.in-view {
    opacity: 1;
    transform: translateX(0);
}

/* Slide from right */
.animate-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.7s cubic-bezier(0.25, 0.1, 0.25, 1),
                transform 0.7s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.animate-right.in-view {
    opacity: 1;
    transform: translateX(0);
}

/* ── GOLD LINE DRAW ─────────────────────────────────────────── */
.gold-line {
    transform-origin: center;
    transform: scaleX(0);
    transition: transform 0.8s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.gold-line.draw {
    transform: scaleX(1);
}

.gold-line-v {
    transform-origin: top;
    transform: scaleY(0);
    transition: transform 0.8s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.gold-line-v.draw {
    transform: scaleY(1);
}

/* ── STAGGER DELAYS (set via data-delay or inline style --delay) */
[data-stagger] .animate-on-scroll:nth-child(1)  { transition-delay: 0s; }
[data-stagger] .animate-on-scroll:nth-child(2)  { transition-delay: 0.08s; }
[data-stagger] .animate-on-scroll:nth-child(3)  { transition-delay: 0.16s; }
[data-stagger] .animate-on-scroll:nth-child(4)  { transition-delay: 0.24s; }
[data-stagger] .animate-on-scroll:nth-child(5)  { transition-delay: 0.32s; }
[data-stagger] .animate-on-scroll:nth-child(6)  { transition-delay: 0.40s; }
[data-stagger] .animate-on-scroll:nth-child(7)  { transition-delay: 0.48s; }
[data-stagger] .animate-on-scroll:nth-child(8)  { transition-delay: 0.56s; }
[data-stagger] .animate-on-scroll:nth-child(9)  { transition-delay: 0.64s; }
[data-stagger] .animate-on-scroll:nth-child(10) { transition-delay: 0.72s; }
[data-stagger] .animate-on-scroll:nth-child(11) { transition-delay: 0.80s; }
[data-stagger] .animate-on-scroll:nth-child(12) { transition-delay: 0.88s; }

/* Tighter stagger for icon cards */
[data-stagger="tight"] .animate-on-scroll:nth-child(1) { transition-delay: 0s; }
[data-stagger="tight"] .animate-on-scroll:nth-child(2) { transition-delay: 0.10s; }
[data-stagger="tight"] .animate-on-scroll:nth-child(3) { transition-delay: 0.20s; }
[data-stagger="tight"] .animate-on-scroll:nth-child(4) { transition-delay: 0.30s; }

/* ── TESTIMONIAL CROSSFADE ─────────────────────────────────── */
.testimonial-slide {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.8s cubic-bezier(0.25, 0.1, 0.25, 1);
    pointer-events: none;
}

.testimonial-slide.active {
    opacity: 1;
    pointer-events: auto;
}

/* ── PRODUCT CARD FILTER TRANSITIONS ──────────────────────── */
.product-card {
    transition: opacity 0.4s cubic-bezier(0.25, 0.1, 0.25, 1),
                transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.product-card.hidden {
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none;
    position: absolute;
    visibility: hidden;
}

/* ── MOBILE MENU ───────────────────────────────────────────── */
.mobile-menu {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

body.menu-open .mobile-menu {
    opacity: 1;
    visibility: visible;
}

.mobile-menu .mobile-nav-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

body.menu-open .mobile-menu .mobile-nav-link:nth-child(1) { opacity: 1; transform: none; transition-delay: 0.1s; }
body.menu-open .mobile-menu .mobile-nav-link:nth-child(2) { opacity: 1; transform: none; transition-delay: 0.18s; }
body.menu-open .mobile-menu .mobile-nav-link:nth-child(3) { opacity: 1; transform: none; transition-delay: 0.26s; }
body.menu-open .mobile-menu .mobile-nav-link:nth-child(4) { opacity: 1; transform: none; transition-delay: 0.34s; }

/* ── TIMELINE CONNECTOR ────────────────────────────────────── */
.timeline-connector {
    transform-origin: top;
    transform: scaleY(0);
    transition: transform 1.2s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.timeline-connector.draw {
    transform: scaleY(1);
}
