/* ============================================
   SECUREARK ANIMATIONS
   Parallax, Scroll Reveal, Micro-interactions
   ============================================ */

/* ── Scroll Reveal Base ── */
.reveal {
    opacity: 0;
    transform: translateY(60px) scale(0.95) rotateX(-4deg);
    transform-origin: center bottom;
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1),
        transform 1s cubic-bezier(0.16, 1, 0.3, 1),
        filter 1s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity, filter;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0) scale(1) rotateX(0deg);
}

.reveal-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1),
        transform 1s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity;
}

.reveal-up.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-blur {
    opacity: 0;
    transform: translateY(40px);
    filter: blur(20px);
    transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1),
        transform 1.2s cubic-bezier(0.16, 1, 0.3, 1),
        filter 1.2s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity, filter;
}

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

.reveal-left {
    opacity: 0;
    transform: translateX(-80px) scale(0.98);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1),
        transform 1s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity;
}

.reveal-left.revealed {
    opacity: 1;
    transform: translateX(0) scale(1);
}

.reveal-right {
    opacity: 0;
    transform: translateX(80px) scale(0.98);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1),
        transform 1s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity;
}

.reveal-right.revealed {
    opacity: 1;
    transform: translateX(0) scale(1);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.85);
    transition: opacity var(--duration-slow) var(--ease-out),
        transform var(--duration-slow) var(--ease-out);
}

.reveal-scale.revealed {
    opacity: 1;
    transform: scale(1);
}

/* Staggered children */
.reveal-stagger>* {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-stagger.revealed>*:nth-child(1) { transition-delay: 0.05s; }
.reveal-stagger.revealed>*:nth-child(2) { transition-delay: 0.12s; }
.reveal-stagger.revealed>*:nth-child(3) { transition-delay: 0.20s; }
.reveal-stagger.revealed>*:nth-child(4) { transition-delay: 0.28s; }
.reveal-stagger.revealed>*:nth-child(5) { transition-delay: 0.36s; }
.reveal-stagger.revealed>*:nth-child(6) { transition-delay: 0.44s; }
.reveal-stagger.revealed>*:nth-child(7) { transition-delay: 0.52s; }
.reveal-stagger.revealed>*:nth-child(8) { transition-delay: 0.60s; }
.reveal-stagger.revealed>*:nth-child(9) { transition-delay: 0.68s; }
.reveal-stagger.revealed>*:nth-child(10) { transition-delay: 0.76s; }

.reveal-stagger.revealed>* {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* ── Hero Animations ── */
@keyframes hero-float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }
}

@keyframes hero-glow {

    0%,
    100% {
        opacity: 0.4;
        filter: blur(60px);
    }

    50% {
        opacity: 0.7;
        filter: blur(80px);
    }
}

@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.hero-gradient-bg {
    background-size: 200% 200%;
    animation: gradient-shift 15s ease infinite;
}

/* ── Mesh Gradient Background ── */
.mesh-gradient {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.mesh-gradient::before,
.mesh-gradient::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    animation: hero-glow 8s ease-in-out infinite;
}

.mesh-gradient::before {
    width: 600px;
    height: 600px;
    background: rgba(79, 125, 249, 0.15);
    top: -10%;
    left: 10%;
    animation-delay: 0s;
}

.mesh-gradient::after {
    width: 500px;
    height: 500px;
    background: rgba(139, 92, 246, 0.12);
    bottom: -10%;
    right: 10%;
    animation-delay: 4s;
}

.mesh-gradient-gold {
    position: absolute;
    width: 400px;
    height: 400px;
    background: rgba(212, 168, 67, 0.08);
    border-radius: 50%;
    filter: blur(80px);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: hero-glow 10s ease-in-out infinite;
    animation-delay: 2s;
    pointer-events: none;
}

/* ── Typing Effect ── */
.typing-cursor::after {
    content: '|';
    animation: blink 1s step-end infinite;
    color: var(--color-accent-gold);
    font-weight: 300;
    margin-left: 2px;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* ── Parallax System (Multi-Layer) ── */
.parallax-section {
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    perspective: 1200px;
}

/* Base parallax element */
[data-parallax] {
    will-change: transform;
}

/* Layered parallax speeds */
.parallax-layer-back {
    will-change: transform;
}

.parallax-layer-mid {
    will-change: transform;
}

.parallax-layer-front {
    will-change: transform;
}

/* ── Parallax Floating Orbs ── */
.parallax-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    will-change: transform;
    z-index: 0;
}

.parallax-orb--blue {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(79, 125, 249, 0.12) 0%, transparent 70%);
    filter: blur(60px);
    animation: orb-drift-1 18s ease-in-out infinite;
}

.parallax-orb--purple {
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.10) 0%, transparent 70%);
    filter: blur(50px);
    animation: orb-drift-2 22s ease-in-out infinite;
}

.parallax-orb--gold {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(212, 168, 67, 0.08) 0%, transparent 70%);
    filter: blur(45px);
    animation: orb-drift-3 15s ease-in-out infinite;
}

@keyframes orb-drift-1 {
    0%, 100% {
        transform: translate3d(0, 0, 0) scale(1) rotate(0deg);
    }
    25% {
        transform: translate3d(50px, -40px, 0) scale(1.15) rotate(5deg);
    }
    50% {
        transform: translate3d(-30px, -80px, 0) scale(0.9) rotate(-3deg);
    }
    75% {
        transform: translate3d(40px, 30px, 0) scale(1.05) rotate(2deg);
    }
}

@keyframes orb-drift-2 {
    0%, 100% {
        transform: translate3d(0, 0, 0) scale(1) rotate(0deg);
    }
    33% {
        transform: translate3d(-60px, 50px, 0) scale(1.1) rotate(-8deg);
    }
    66% {
        transform: translate3d(40px, -60px, 0) scale(0.85) rotate(4deg);
    }
}

@keyframes orb-drift-3 {
    0%, 100% {
        transform: translate3d(0, 0, 0) scale(1) rotate(0deg);
    }
    50% {
        transform: translate3d(70px, -50px, 0) scale(1.1) rotate(20deg);
    }
}

/* ── Section Depth Scroll Effects ── */
.depth-section {
    position: relative;
    overflow: hidden;
    will-change: transform, opacity;
}

/* Scale-in effect as section enters viewport */
.depth-zoom {
    opacity: 0;
    transform: scale(0.92);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Push-back effect as section scrolls away */
.depth-push {
    transition: transform 0.1s linear, opacity 0.1s linear;
}

/* ── Section Divider with Gradient Reveal ── */
.section-divider {
    position: relative;
    height: 120px;
    overflow: hidden;
    pointer-events: none;
}

.section-divider::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
            transparent 0%,
            rgba(79, 125, 249, 0.03) 30%,
            rgba(139, 92, 246, 0.03) 70%,
            transparent 100%);
}

.section-divider::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(79, 125, 249, 0.15) 20%,
            rgba(139, 92, 246, 0.2) 50%,
            rgba(79, 125, 249, 0.15) 80%,
            transparent 100%);
}

/* ── Scroll Progress Indicator ── */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 0%;
    background: var(--gradient-primary);
    z-index: 9999;
    transition: width 0.05s linear;
}

/* ── Enhanced Particle Grid with Parallax ── */
.particle-grid-deep {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 1px 1px, rgba(79, 125, 249, 0.06) 1px, transparent 0),
        radial-gradient(circle at 1px 1px, rgba(139, 92, 246, 0.04) 1px, transparent 0);
    background-size: 50px 50px, 80px 80px;
    pointer-events: none;
    z-index: 0;
    will-change: transform;
}

/* ── Card Hover Effects ── */
.card-hover {
    transition: transform var(--duration-normal) var(--ease-out),
        box-shadow var(--duration-normal) var(--ease-out),
        border-color var(--duration-normal) var(--ease-out);
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-glow-blue);
    border-color: rgba(79, 125, 249, 0.3);
}

/* ── Glow Line ── */
.glow-line {
    position: relative;
    overflow: hidden;
}

.glow-line::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--duration-normal) var(--ease-out);
}

.glow-line:hover::after {
    transform: scaleX(1);
}

/* ── Stats Counter ── */
@keyframes count-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.stat-number {
    font-family: var(--font-primary);
    font-size: var(--text-5xl);
    font-weight: 800;
    line-height: 1;
}

/* ── Floating Elements ── */
@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    33% {
        transform: translateY(-10px) rotate(1deg);
    }

    66% {
        transform: translateY(5px) rotate(-1deg);
    }
}

@keyframes float-slow {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

.float {
    animation: float 6s ease-in-out infinite;
}

.float-slow {
    animation: float-slow 8s ease-in-out infinite;
}

/* ── Particle Grid Background ── */
.particle-grid {
    position: absolute;
    inset: -10%;
    width: 120%;
    height: 120%;
    background-image:
        radial-gradient(circle at 1px 1px, rgba(79, 125, 249, 0.08) 1px, transparent 0);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
    will-change: transform;
}

/* ── Shimmer Effect ── */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }

    100% {
        background-position: 1000px 0;
    }
}

.shimmer {
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.05) 50%,
            transparent 100%);
    background-size: 1000px 100%;
    animation: shimmer 3s infinite;
}

/* ── Rotating Border ── */
@keyframes rotate-border {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.rotating-border {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius-lg);
}

.rotating-border::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: conic-gradient(from 0deg, var(--color-accent-blue), var(--color-accent-purple), var(--color-accent-gold), var(--color-accent-blue));
    border-radius: inherit;
    animation: rotate-border 4s linear infinite;
    z-index: -1;
}

/* ── Marquee / Scroll ── */
@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.marquee-track {
    display: flex;
    animation: marquee 30s linear infinite;
    width: max-content;
}

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

/* ── Icon Spin ── */
@keyframes spin-slow {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.spin-slow {
    animation: spin-slow 20s linear infinite;
}

/* ── Pulse Ring ── */
@keyframes pulse-ring {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }

    100% {
        transform: scale(1.8);
        opacity: 0;
    }
}

.pulse-ring {
    position: relative;
}

.pulse-ring::after {
    content: '';
    position: absolute;
    inset: -4px;
    border: 2px solid var(--color-accent-blue);
    border-radius: 50%;
    animation: pulse-ring 2s ease-out infinite;
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .reveal,
    .reveal-left,
    .reveal-right,
    .reveal-scale {
        opacity: 1;
        transform: none;
    }

    .reveal-stagger>* {
        opacity: 1;
        transform: none;
    }
}