/* ============================================
   PARTICLE CANVAS STYLES
   ============================================ */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* Navbar & Topbar transparency overrides REMOVED to fix visibility issues */
/* The main style.css provides solid colors */

.floating-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.floating-shape {
    position: absolute;
    background: radial-gradient(circle, rgba(234, 179, 8, 0.08) 0%, rgba(0, 86, 179, 0.05) 100%);
    backdrop-filter: blur(2px);
    opacity: 0.4;
    will-change: transform;
}

/* Header Animations */
@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-3px);
    }
}

.animate-bounce {
    animation: bounce 2s infinite;
}

@keyframes ring {
    0% {
        transform: rotate(0deg);
    }

    10% {
        transform: rotate(15deg);
    }

    20% {
        transform: rotate(-15deg);
    }

    30% {
        transform: rotate(15deg);
    }

    40% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

.animate-ring {
    animation: ring 3s infinite;
}

.hover-op-80:hover {
    opacity: 0.8;
    transition: opacity 0.3s;
}

.social-link {
    transition: transform 0.3s;
    display: inline-block;
}

.social-link:hover {
    transform: translateY(-3px) scale(1.1);
    color: var(--accent-color);
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    25% {
        transform: translate(50px, -50px) rotate(90deg);
    }

    50% {
        transform: translate(-30px, 30px) rotate(180deg);
    }

    75% {
        transform: translate(30px, 50px) rotate(270deg);
    }
}

/* ============================================
   SCROLL PROGRESS BAR
   ============================================ */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), var(--secondary-color));
    width: 0%;
    z-index: 10001;
    transition: width 0.1s ease-out;
}

/* ============================================
   SECTION REVEAL ANIMATIONS
   ============================================ */
.section-animate {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.section-animate.section-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   CARD REVEAL ANIMATIONS
   ============================================ */
.card-hidden {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-revealed {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* ============================================
   TAP FEEDBACK (Mobile)
   ============================================ */
@media (max-width: 768px) {
    .tapped {
        transform: scale(0.98) !important;
        opacity: 0.8;
        transition: all 0.1s ease !important;
    }
}

/* ============================================
   STICKY HEADER SHRINK
   ============================================ */
.navbar {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar.scrolled {
    padding: 8px 0 !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.navbar.scrolled .navbar-brand img {
    height: 40px !important;
}

/* ============================================
   MAGNETIC BUTTON ENHANCEMENT
   ============================================ */
.btn,
button {
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
}

/* ============================================
   NUMBER COUNTER PREPARATION
   ============================================ */
.stat-number {
    font-variant-numeric: tabular-nums;
    transition: opacity 0.5s ease;
}

/* ============================================
   TEXT HOVER SCALE
   ============================================ */
.section-title,
h1,
h2,
h3 {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   REDUCED MOTION SUPPORT
   ============================================ */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .floating-shapes,
    #particle-canvas {
        display: none !important;
    }
}

.reduce-motion * {
    animation: none !important;
    transition: none !important;
}

/* ============================================
   LOADING OVERLAY
   ============================================ */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--white);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease;
}

.loader {
    width: 50px;
    height: 50px;
    border: 5px solid var(--light-bg);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   PERFORMANCE OPTIMIZATIONS
   ============================================ */
.sector-card,
.stat-item,
.btn,
button,
.nav-link {
    will-change: auto;
}

.sector-card:hover,
.stat-item:hover,
.navbar.scrolled {
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* ============================================
   MOBILE SPECIFIC OPTIMIZATIONS
   ============================================ */
@media (max-width: 768px) {
    #particle-canvas {
        display: none;
    }

    .floating-shapes .floating-shape {
        opacity: 0.2;
    }

    .section-animate {
        transform: translateY(20px);
    }
}

/* ============================================
   ACCESSIBILITY ENHANCEMENTS
   ============================================ */
a:focus-visible,
button:focus-visible,
.btn:focus-visible {
    outline: 3px solid var(--accent-color);
    outline-offset: 2px;
}

@media (prefers-contrast: high) {
    .floating-shapes {
        display: none;
    }

    a,
    button {
        text-decoration: underline;
    }
}