/* ═══════════════════════════════════════════════
   Animations — Premium $20K Level
   ═══════════════════════════════════════════════ */

/* ─── Reveal Animation System ──────────────── */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
    will-change: opacity, transform;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-60px);
    transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
    will-change: opacity, transform;
}

.reveal-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(60px);
    transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
    will-change: opacity, transform;
}

.reveal-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
    will-change: opacity, transform;
}

.reveal-scale.visible {
    opacity: 1;
    transform: scale(1);
}

/* Stagger delays */
[data-delay="1"] {
    transition-delay: 0.1s !important;
}

[data-delay="2"] {
    transition-delay: 0.2s !important;
}

[data-delay="3"] {
    transition-delay: 0.3s !important;
}

[data-delay="4"] {
    transition-delay: 0.4s !important;
}

[data-delay="5"] {
    transition-delay: 0.5s !important;
}

[data-delay="6"] {
    transition-delay: 0.6s !important;
}

/* ─── Text Reveal ──────────────────────────── */
.text-reveal {
    overflow: hidden;
    display: inline-block;
}

.text-reveal span {
    display: inline-block;
    transform: translateY(110%);
    transition: transform 0.8s var(--ease-out-expo);
}

.text-reveal.visible span {
    transform: translateY(0);
}

/* ─── Hero Canvas BG ──────────────────────── */
#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ─── Ambient Blobs ────────────────────────── */
.ambient-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    pointer-events: none;
    opacity: 0.5;
    animation: orbDrift 30s infinite alternate ease-in-out;
}

.orb-1 {
    top: -15%;
    left: -10%;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, transparent 70%);
}

.orb-2 {
    bottom: -20%;
    right: -15%;
    width: 900px;
    height: 900px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.12) 0%, transparent 70%);
    animation-delay: -8s;
}

.orb-3 {
    top: 50%;
    left: 40%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.08) 0%, transparent 70%);
    animation-delay: -15s;
}

@keyframes orbDrift {
    0% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(40px, -60px) scale(1.08);
    }

    50% {
        transform: translate(-30px, 30px) scale(0.95);
    }

    75% {
        transform: translate(20px, 50px) scale(1.05);
    }

    100% {
        transform: translate(0, 0) scale(1);
    }
}

/* ─── Preloader ────────────────────────────── */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.6s var(--ease-out-expo);
}

.preloader-logo {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 2rem;
    opacity: 0;
    animation: preloaderFadeIn 0.5s 0.2s forwards;
}

.preloader-logo span {
    color: var(--blue-500);
}

.preloader-bar {
    width: 200px;
    height: 2px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    overflow: hidden;
}

.preloader-bar-inner {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--blue-500), var(--purple-500));
    border-radius: 2px;
    animation: preloaderBar 1.2s 0.3s var(--ease-out-expo) forwards;
}

@keyframes preloaderFadeIn {
    to {
        opacity: 1;
    }
}

@keyframes preloaderBar {
    to {
        width: 100%;
    }
}

/* ─── Grid Background ─────────────────────── */
.grid-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 30%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 30%, transparent 100%);
    z-index: 0;
    pointer-events: none;
}

/* ─── Section Divider ──────────────────────── */
.section-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
    margin: 0;
}

/* ─── Pulse Glow ───────────────────────────── */
@keyframes pulseGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(59, 130, 246, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
}

/* ─── Float ────────────────────────────────── */
@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-12px);
    }

    100% {
        transform: translateY(0px);
    }
}

.floating {
    animation: float 6s ease-in-out infinite;
}

/* ─── Particle System ──────────────────────── */
.particles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: var(--blue-500);
    opacity: 0.2;
    pointer-events: none;
    filter: blur(1px);
}

@keyframes particleFloat {
    0% {
        transform: translateY(0) scale(1);
        opacity: 0;
    }

    10% {
        opacity: 0.4;
    }

    90% {
        opacity: 0.4;
    }

    100% {
        transform: translateY(-100vh) scale(0);
        opacity: 0;
    }
}

/* ─── Line Animation ───────────────────────── */
.line-glow {
    position: absolute;
    width: 1px;
    height: 100px;
    background: linear-gradient(180deg, transparent, var(--blue-500), transparent);
    animation: lineMove 3s linear infinite;
    opacity: 0.3;
}

@keyframes lineMove {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }

    50% {
        opacity: 0.3;
    }

    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}