/* ─── Animations ─────────────────────────────────────────────────── */

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fade-in-up {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes particle-float {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.4; }
    25% { transform: translate(20px, -30px) scale(1.2); opacity: 0.7; }
    50% { transform: translate(-10px, -50px) scale(0.8); opacity: 0.5; }
    75% { transform: translate(15px, -20px) scale(1.1); opacity: 0.6; }
}

@keyframes glow-pulse {
    0%, 100% { box-shadow: 0 0 20px rgba(108, 92, 231, 0.1); }
    50% { box-shadow: 0 0 40px rgba(108, 92, 231, 0.25); }
}

.animate-fade-in {
    animation: fade-in 0.8s ease-out forwards;
}

.animate-fade-in-up {
    opacity: 0;
    animation: fade-in-up 0.8s ease-out forwards;
}

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }

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

/* ─── Scrollbar ──────────────────────────────────────────────────── */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0D0B1A;
}

::-webkit-scrollbar-thumb {
    background: #6C5CE7;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #7D6FF0;
}

/* ─── Selection ──────────────────────────────────────────────────── */

::selection {
    background: rgba(108, 92, 231, 0.3);
    color: #F0EDFF;
}

/* ─── Navbar ─────────────────────────────────────────────────────── */

#navbar.scrolled {
    background: rgba(13, 11, 26, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(108, 92, 231, 0.15);
}

/* ─── Particles ──────────────────────────────────────────────────── */

.hero-particle {
    position: absolute;
    border-radius: 50%;
    animation: particle-float linear infinite;
    pointer-events: none;
}

/* ─── Scroll Reveal ──────────────────────────────────────────────── */

.scroll-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

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

.scroll-reveal.delay-75 { transition-delay: 75ms; }
.scroll-reveal.delay-100 { transition-delay: 100ms; }
.scroll-reveal.delay-150 { transition-delay: 150ms; }
.scroll-reveal.delay-200 { transition-delay: 200ms; }

/* ─── Service Cards ──────────────────────────────────────────────── */

.service-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 1rem;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(108, 92, 231, 0.08) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.service-card:hover::before {
    opacity: 1;
}

/* ─── Smooth Scroll ──────────────────────────────────────────────── */

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

/* ─── Active Nav ─────────────────────────────────────────────────── */

.nav-link.active {
    color: #00CEC9;
}

/* ─── Focus States ───────────────────────────────────────────────── */

a:focus-visible,
button:focus-visible {
    outline: 2px solid #6C5CE7;
    outline-offset: 4px;
    border-radius: 4px;
}

/* ─── Responsive ─────────────────────────────────────────────────── */

@media (max-width: 768px) {
    .font-heading {
        word-break: break-word;
    }
}

/* ─── Print ──────────────────────────────────────────────────────── */

@media print {
    body { background: #fff; color: #000; }
    #navbar, #back-to-top, .hero-particles { display: none; }
}
