/* ============================================
   BROUJ TX - PREMIUM UI ENHANCEMENTS
   Futuristic Web3 / Dark Mode / Neon Green
   ============================================ */

/* Smooth scroll for all browsers */
html {
    scroll-behavior: smooth;
}

/* ---- PARTICLES CANVAS ---- */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ---- SCROLL REVEAL ANIMATIONS ---- */
.scroll-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.scroll-reveal.from-left {
    transform: translateX(60px);
}
.scroll-reveal.from-right {
    transform: translateX(-60px);
}
.scroll-reveal.scale-in {
    transform: scale(0.92);
}
.scroll-reveal.visible {
    opacity: 1;
    transform: translate(0, 0) scale(1);
}

/* Staggered children animation */
.stagger-children > * {
    opacity: 0;
    transform: translateY(25px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.stagger-children.visible > *:nth-child(1) { transition-delay: 0.05s; }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.1s; }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.15s; }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.2s; }
.stagger-children.visible > *:nth-child(5) { transition-delay: 0.25s; }
.stagger-children.visible > *:nth-child(6) { transition-delay: 0.3s; }
.stagger-children.visible > *:nth-child(7) { transition-delay: 0.35s; }
.stagger-children.visible > *:nth-child(8) { transition-delay: 0.4s; }
.stagger-children.visible > *:nth-child(9) { transition-delay: 0.45s; }
.stagger-children.visible > * {
    opacity: 0;
    transform: translateY(25px);
}
.stagger-children.visible > * {
    opacity: 1;
    transform: translateY(0);
}

/* ---- GLASSMORPHISM ENHANCEMENTS ---- */
.stat-card,
.eco-stat-card,
.feature-card,
.about-card,
.calc-card,
.step-content,
.blog-card,
.counter-card,
.leaderboard-item,
.chart-container {
    background: rgba(17, 24, 39, 0.6) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* ---- ENHANCED HOVER EFFECTS ---- */

/* Glow + Lift on cards */
.stat-card:hover,
.eco-stat-card:hover {
    border-color: rgba(0, 255, 157, 0.35) !important;
    transform: translateY(-6px) !important;
    box-shadow: 0 12px 40px rgba(0, 255, 157, 0.12),
                0 0 30px rgba(0, 255, 157, 0.06),
                inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

.feature-card:hover {
    border-color: rgba(0, 255, 157, 0.3) !important;
    transform: translateY(-6px) !important;
    box-shadow: 0 16px 48px rgba(0, 255, 157, 0.1),
                0 0 40px rgba(0, 255, 157, 0.05) !important;
}

.about-card:hover {
    border-color: rgba(0, 255, 157, 0.25) !important;
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 255, 157, 0.08),
                inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}

.blog-card:hover {
    border-color: rgba(168, 85, 247, 0.35) !important;
    transform: translateY(-6px) !important;
    box-shadow: 0 16px 48px rgba(168, 85, 247, 0.12),
                0 0 30px rgba(168, 85, 247, 0.06) !important;
}

.calc-card:hover {
    border-color: rgba(0, 255, 157, 0.2) !important;
    box-shadow: 0 12px 40px rgba(0, 255, 157, 0.08) !important;
}

.leaderboard-item:hover {
    border-color: rgba(0, 255, 157, 0.3) !important;
    transform: translateX(-4px) !important;
    box-shadow: 0 8px 32px rgba(0, 255, 157, 0.1) !important;
}

.counter-card:hover {
    border-color: rgba(0, 255, 157, 0.3) !important;
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 255, 157, 0.12) !important;
}

/* Add transition to all hoverable cards */
.stat-card, .eco-stat-card, .feature-card, .about-card,
.calc-card, .blog-card, .counter-card, .leaderboard-item {
    transition: all 0.45s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* ---- BUTTON ENHANCEMENTS ---- */
.cta-btn-primary {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.cta-btn-primary::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.15) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: none;
}

.cta-btn-primary:hover::after {
    animation: btnSheen 0.6s ease forwards;
}

@keyframes btnSheen {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.cta-btn-primary:hover {
    transform: translateY(-3px) scale(1.03) !important;
    box-shadow: 0 8px 40px rgba(0, 255, 157, 0.4),
                0 0 60px rgba(0, 255, 157, 0.15) !important;
}

.ref-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.ref-btn:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 6px 24px rgba(0, 255, 136, 0.2) !important;
}

/* ---- SOCIAL ICONS GLOW ---- */
.social-icons a {
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.social-icons a:hover {
    border-color: var(--neon-green) !important;
    color: var(--neon-green) !important;
    transform: translateY(-4px) scale(1.1);
    box-shadow: 0 6px 24px rgba(0, 255, 136, 0.2),
                0 0 20px rgba(0, 255, 136, 0.1) !important;
}

/* ---- NAV ENHANCEMENT ---- */
.navbar {
    background: rgba(10, 14, 23, 0.8) !important;
    backdrop-filter: blur(24px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04) !important;
    transition: all 0.3s ease !important;
}

.navbar.scrolled {
    background: rgba(10, 14, 23, 0.95) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* ---- HERO ENHANCEMENTS ---- */
.hero-logo {
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.hero-logo:hover {
    transform: scale(1.08) !important;
    box-shadow: 0 0 50px rgba(0, 255, 157, 0.4),
                0 0 100px rgba(0, 255, 157, 0.15) !important;
}

.hero h1 {
    animation: heroTitleGlow 4s ease-in-out infinite alternate;
}

@keyframes heroTitleGlow {
    0% { filter: drop-shadow(0 0 8px rgba(0, 255, 157, 0)); }
    100% { filter: drop-shadow(0 0 20px rgba(0, 255, 157, 0.3)); }
}

/* ---- SECTION DIVIDER ANIMATION ---- */
.section-divider {
    position: relative;
    overflow: hidden;
}
.section-divider::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: dividerShimmer 3s ease-in-out infinite;
}
@keyframes dividerShimmer {
    0% { left: -100%; }
    50% { left: 100%; }
    100% { left: 100%; }
}

/* ---- CTA SECTION ENHANCEMENT ---- */
.cta-section {
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse, rgba(0, 255, 157, 0.04) 0%, transparent 60%);
    animation: ctaGlow 6s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes ctaGlow {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(5%, 5%) scale(1.1); }
}

/* ---- FOOTER ENHANCEMENT ---- */
.footer {
    background: rgba(17, 24, 39, 0.8) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: relative;
}

/* ---- STEP NUMBER GLOW ---- */
.step-number {
    box-shadow: 0 0 20px rgba(0, 255, 157, 0.25);
    transition: all 0.4s ease;
}
.guide-step:hover .step-number {
    box-shadow: 0 0 30px rgba(0, 255, 157, 0.4),
                0 0 60px rgba(0, 255, 157, 0.15);
    transform: scale(1.1);
}

/* ---- CHART CONTAINER GLOW ---- */
.chart-container:hover {
    border-color: rgba(0, 212, 255, 0.25) !important;
    box-shadow: 0 12px 40px rgba(0, 212, 255, 0.08) !important;
}

/* ---- VIDEO CONTAINER ENHANCEMENT ---- */
.video-container {
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.video-container:hover {
    border-color: rgba(0, 255, 157, 0.3);
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.4),
                0 0 40px rgba(0, 255, 157, 0.08);
    transform: translateY(-4px);
}

/* ---- FLOATING CONTACT BUTTON ENHANCEMENT ---- */
.floating-contact-btn {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* ---- PARALLAX-READY SECTIONS ---- */
.parallax-bg {
    will-change: transform;
}

/* ---- ENHANCED TYPOGRAPHY ---- */
.section-header h2 {
    letter-spacing: -0.02em;
}

.hero h1 {
    letter-spacing: -0.03em;
}

/* ---- INPUT FOCUS GLOW ---- */
.calc-input-wrap input:focus {
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.15),
                0 0 40px rgba(0, 255, 136, 0.05) !important;
}

/* ---- CURSOR GLOW EFFECT (DESKTOP ONLY) ---- */
.cursor-glow {
    position: fixed;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 255, 157, 0.04) 0%, transparent 70%);
    pointer-events: none;
    z-index: 1;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
    will-change: left, top;
}

/* ---- LOADING ANIMATION FOR PAGE ---- */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a0e17;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 20px;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-ring {
    width: 60px;
    height: 60px;
    border: 3px solid rgba(0, 255, 157, 0.1);
    border-top: 3px solid #00ff9d;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loader-text {
    font-family: 'Space Mono', monospace;
    font-size: 12px;
    color: rgba(0, 255, 157, 0.6);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    animation: loaderTextPulse 1.5s ease-in-out infinite;
}

@keyframes loaderTextPulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

/* ---- SMOOTH ENTRANCE FOR HERO ELEMENTS ---- */
.hero-entrance .hero-logo {
    animation: heroLogoEntrance 1s cubic-bezier(0.16, 1, 0.3, 1) forwards, float 4s ease-in-out 1s infinite;
    opacity: 0;
}
.hero-entrance h1 {
    animation: heroTextEntrance 1s cubic-bezier(0.16, 1, 0.3, 1) 0.15s forwards;
    opacity: 0;
}
.hero-entrance .subtitle {
    animation: heroTextEntrance 1s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
    opacity: 0;
}
.hero-entrance .hero-btns {
    animation: heroTextEntrance 1s cubic-bezier(0.16, 1, 0.3, 1) 0.45s forwards;
    opacity: 0;
}
.hero-entrance .hero-trust-badges {
    animation: heroTextEntrance 1s cubic-bezier(0.16, 1, 0.3, 1) 0.6s forwards;
    opacity: 0;
}

@keyframes heroLogoEntrance {
    0% { opacity: 0; transform: scale(0.5) translateY(30px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes heroTextEntrance {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* ---- TRUST BADGES IN HERO ---- */
.hero-trust-badges {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-top: 28px;
    flex-wrap: wrap;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(17, 24, 39, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 255, 157, 0.12);
    border-radius: 50px;
    font-size: 0.82rem;
    color: var(--text-secondary);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.trust-badge:hover {
    border-color: rgba(0, 255, 157, 0.3);
    box-shadow: 0 4px 20px rgba(0, 255, 157, 0.1);
    transform: translateY(-2px);
}

.trust-badge i {
    color: var(--neon-green);
    font-size: 0.9rem;
}

.trust-badge .trust-value {
    color: var(--neon-green);
    font-weight: 700;
    font-family: 'Space Mono', monospace;
    font-size: 0.8rem;
}

/* ---- VALIDATOR UPTIME/PERFORMANCE BAR ---- */
.validator-metrics {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.metric-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(0, 255, 157, 0.04);
    border: 1px solid rgba(0, 255, 157, 0.1);
    border-radius: 8px;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: 'Space Mono', monospace;
}

.metric-pill .metric-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--neon-green);
    animation: metricDotPulse 2s ease-in-out infinite;
}

.metric-pill .metric-val {
    color: var(--neon-green);
    font-weight: 700;
}

@keyframes metricDotPulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 4px rgba(0, 255, 157, 0.5); }
    50% { opacity: 0.5; box-shadow: 0 0 2px rgba(0, 255, 157, 0.2); }
}

/* ---- LAST UPDATED GLOBAL TIMESTAMP ---- */
.global-last-updated {
    text-align: center;
    padding: 6px 0;
    font-family: 'Space Mono', monospace;
    font-size: 0.7rem;
    color: var(--text-muted);
    opacity: 0.6;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.global-last-updated .update-dot {
    width: 5px;
    height: 5px;
    background: var(--neon-green);
    border-radius: 50%;
    animation: metricDotPulse 2s ease-in-out infinite;
}

/* ---- CTA PULSE ANIMATION for repeated CTAs ---- */
.cta-pulse {
    animation: ctaPulseGlow 3s ease-in-out infinite;
}

@keyframes ctaPulseGlow {
    0%, 100% {
        box-shadow: 0 4px 24px rgba(0, 255, 157, 0.25);
    }
    50% {
        box-shadow: 0 4px 40px rgba(0, 255, 157, 0.45), 0 0 60px rgba(0, 255, 157, 0.15);
    }
}

/* ---- INLINE CTA BANNER ---- */
.inline-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 16px 24px;
    margin: 24px 0;
    background: linear-gradient(135deg, rgba(0, 255, 157, 0.06) 0%, rgba(255, 215, 0, 0.06) 100%);
    border: 1px solid rgba(0, 255, 157, 0.12);
    border-radius: 14px;
    flex-wrap: wrap;
    position: relative;
    overflow: hidden;
}

.inline-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 157, 0.04), transparent);
    animation: inlineCtaSweep 4s ease-in-out infinite;
}

@keyframes inlineCtaSweep {
    0% { left: -100%; }
    50% { left: 100%; }
    100% { left: 100%; }
}

.inline-cta-text {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.inline-cta .cta-btn {
    padding: 10px 24px;
    font-size: 0.88rem;
}

/* ---- STAT CARD LIVE INDICATOR ---- */
.stat-live-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--neon-green);
    border-radius: 50%;
    margin-left: 6px;
    animation: metricDotPulse 2s ease-in-out infinite;
    vertical-align: middle;
}

/* ---- SECTION NUMBER BADGE ---- */
.section-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(0, 255, 157, 0.15), rgba(255, 215, 0, 0.15));
    border: 1px solid rgba(0, 255, 157, 0.2);
    font-family: 'Space Mono', monospace;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--neon-green);
    margin-bottom: 10px;
}

/* ---- PERFORMANCE ---- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .scroll-reveal {
        opacity: 1 !important;
        transform: none !important;
    }
    .stagger-children > * {
        opacity: 1 !important;
        transform: none !important;
    }
    .cursor-glow { display: none !important; }
    #particles-canvas { display: none !important; }
}

/* ---- MOBILE ADJUSTMENTS ---- */
@media (max-width: 768px) {
    .cursor-glow { display: none !important; }

    .scroll-reveal {
        transform: translateY(25px);
    }
    .scroll-reveal.from-left,
    .scroll-reveal.from-right {
        transform: translateY(25px);
    }

    .hero-trust-badges {
        gap: 10px;
    }

    .trust-badge {
        padding: 6px 12px;
        font-size: 0.75rem;
    }

    .validator-metrics {
        gap: 8px;
    }

    .metric-pill {
        padding: 5px 10px;
        font-size: 0.68rem;
    }

    .inline-cta {
        flex-direction: column;
        gap: 10px;
        padding: 14px 16px;
    }

    .inline-cta-text {
        font-size: 0.85rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-trust-badges {
        gap: 8px;
    }

    .trust-badge {
        padding: 5px 10px;
        font-size: 0.7rem;
        gap: 6px;
    }

    .trust-badge i {
        font-size: 0.78rem;
    }
}
