/* ========================================
   SMOOTH.CSS - Apple-inspired polish & performance
   MineXHost Professional Enhancement Layer
   ======================================== */

/* ---- Page Load Fade-in ---- */
html {
    scroll-behavior: smooth;
}

body {
    opacity: 0;
    animation: pageIn 0.5s ease-out forwards;
}

@keyframes pageIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Ensure body becomes visible even if animation fails */
body.loaded {
    opacity: 1 !important;
}

/* ---- Scroll Reveal Animations ---- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children for grid items */
.reveal-stagger > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-stagger.visible > *:nth-child(1) { transition-delay: 0s; }
.reveal-stagger.visible > *:nth-child(2) { transition-delay: 0.08s; }
.reveal-stagger.visible > *:nth-child(3) { transition-delay: 0.16s; }
.reveal-stagger.visible > *:nth-child(4) { transition-delay: 0.24s; }
.reveal-stagger.visible > *:nth-child(5) { transition-delay: 0.32s; }
.reveal-stagger.visible > *:nth-child(6) { transition-delay: 0.40s; }
.reveal-stagger.visible > *:nth-child(7) { transition-delay: 0.48s; }
.reveal-stagger.visible > *:nth-child(8) { transition-delay: 0.56s; }

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

/* Scale-up variant */
.reveal-scale {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* ---- GPU-Accelerated Transitions ---- */
.feature-card,
.pricing-card,
.panel-feature-card,
.social-link,
.payment-icon,
.back-to-top,
.cta-btn,
.header-btn,
.plan-cta {
    will-change: transform;
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                border-color 0.35s ease !important;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* Smoother hover lifts */
.feature-card:hover,
.pricing-card:hover,
.panel-feature-card:hover {
    transform: translateY(-4px) !important;
}

/* ---- Lightweight Ambient Background ---- */
/* Replaces heavy canvas animation with pure CSS */
.ambient-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.ambient-glow::before,
.ambient-glow::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.035;
    animation: ambientDrift 20s ease-in-out infinite alternate;
}

.ambient-glow::before {
    width: 600px;
    height: 600px;
    background: #00e5ff;
    top: -200px;
    right: -100px;
    animation-delay: 0s;
}

.ambient-glow::after {
    width: 500px;
    height: 500px;
    background: #8a00c4;
    bottom: -150px;
    left: -100px;
    animation-delay: -10s;
}

@keyframes ambientDrift {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(40px, 30px) scale(1.1); }
    100% { transform: translate(-20px, -10px) scale(0.95); }
}

/* Third subtle orb */
.ambient-orb {
    position: fixed;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: #39FF14;
    filter: blur(150px);
    opacity: 0.02;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 0;
    animation: ambientPulse 15s ease-in-out infinite;
}

@keyframes ambientPulse {
    0%, 100% { opacity: 0.015; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.03; transform: translate(-50%, -50%) scale(1.2); }
}

/* ---- Smoother Scrollbar ---- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 229, 255, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 229, 255, 0.5);
}

/* ---- Refined Link Underlines ---- */
.nav-menu a::after {
    transition: width 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}

/* ---- Smoother Mobile Menu ---- */
.mobile-menu-drawer {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.menu-overlay {
    transition: opacity 0.4s ease !important;
}

/* ---- Reduce Motion for Accessibility ---- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .reveal,
    .reveal-scale,
    .reveal-stagger > * {
        opacity: 1 !important;
        transform: none !important;
    }

    body {
        opacity: 1 !important;
        animation: none !important;
    }
}

/* ---- Remove shimmer animation (causes jank) ---- */
.bar-fill::after {
    animation: none !important;
    display: none;
}
