/* ── Base & Utilities ── */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

::selection {
    background: #e9d5ff;
    color: #581c87;
}

/* ── Scroll Reveal ── */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.scroll-reveal[data-reveal="delay-1"] { transition-delay: 0.1s; }
.scroll-reveal[data-reveal="delay-2"] { transition-delay: 0.2s; }
.scroll-reveal[data-reveal="delay-3"] { transition-delay: 0.3s; }
.scroll-reveal[data-reveal="delay-4"] { transition-delay: 0.4s; }
.scroll-reveal[data-reveal="delay-5"] { transition-delay: 0.5s; }
.scroll-reveal[data-reveal="delay-6"] { transition-delay: 0.6s; }

/* Hidden by default for progressive enhancement — JS adds visible state */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(30px);
    }
}

/* ── Navbar ── */
#navbar {
    background: rgba(255, 255, 255, 0.0);
    backdrop-filter: blur(0px);
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(124, 58, 237, 0.08);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #9333ea, #f59e0b);
    border-radius: 1px;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

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

/* ── Floating Cards ── */
.card-float-slow {
    animation: floatSlow 6s ease-in-out infinite;
}

.card-float-medium {
    animation: floatMedium 4.5s ease-in-out infinite;
}

.card-float-fast {
    animation: floatFast 3.5s ease-in-out infinite;
}

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

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

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

/* Stagger animation delays */
.card-float-medium { animation-delay: -1.5s; }
.card-float-fast { animation-delay: -0.8s; }

/* ── Mobile Menu ── */
#mobileMenu {
    animation: slideDown 0.3s ease-out;
}

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

.mobile-nav-link {
    display: block;
}

/* ── Button Ripple Effect ── */
button, a {
    -webkit-tap-highlight-color: transparent;
}

/* ── Focus Styles ── */
*:focus-visible {
    outline: 2px solid #9333ea;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ── Form Input Focus ── */
input:focus, select:focus, textarea:focus {
    box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.1);
}

/* ── Responsive Tweaks ── */
@media (max-width: 640px) {
    .font-serif {
        line-height: 1.15;
    }

    #hero {
        min-height: auto;
        padding-top: 80px;
        padding-bottom: 60px;
    }
}

/* ── Print Styles ── */
@media print {
    #navbar, #contact, .scroll-reveal {
        display: block !important;
        opacity: 1 !important;
    }

    body {
        color: #000;
        background: #fff;
    }
}
