/* ── Base & utilities ── */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    overflow-x: hidden;
}

::selection {
    background: color-mix(in srgb, #7C3AED 30%, transparent);
    color: #1e1b4b;
}

/* ── Navbar scroll state ── */
#navbar.scrolled {
    box-shadow: 0 4px 30px rgba(124, 58, 237, 0.08);
}

.nav-link::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #7C3AED, #F59E0B);
    border-radius: 1px;
    margin-top: 2px;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* ── Mobile menu animation ── */
#mobile-menu {
    animation: slideDown 0.3s ease forwards;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-link {
    position: relative;
    padding-left: 0;
}

.mobile-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #7C3AED, #F59E0B);
    transition: width 0.3s ease;
    border-radius: 1px;
}

.mobile-link:hover::before {
    width: 12px;
}

/* ── Scroll reveal animations ── */
.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);
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* ── Floating cards parallax ── */
.floating-card {
    will-change: transform;
}

/* ── Custom scrollbar ── */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #faf5ff;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #7C3AED, #A855F7);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #6D28D9, #7C3AED);
}

/* ── Select styling ── */
select option {
    background: #4C1D95;
    color: #E9D5FF;
}

/* ── Form focus states ── */
input:focus, textarea:focus, select:focus {
    outline: none;
}

/* ── Responsive adjustments ── */
@media (max-width: 767px) {
    html {
        scroll-padding-top: 70px;
    }
}
