/* ── Base ── */
html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(91, 44, 111, 0.15);
    color: #3a1b46;
}

/* ── Nav ── */
#nav.scrolled {
    box-shadow: 0 1px 0 rgba(91, 44, 111, 0.06);
}

/* ── Mobile menu ── */
#mobile-menu.open .menu-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}
#mobile-menu.open .menu-line:nth-child(2) {
    opacity: 0;
}
#mobile-menu.open .menu-line:nth-child(3) {
    width: 24px;
    transform: translateY(-6px) rotate(-45deg);
}
#mobile-menu.open {
    display: block;
}

.mobile-link {
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(91, 44, 111, 0.06);
}
.mobile-link:last-child {
    border-bottom: none;
}

/* ── Floating stat cards ── */
.stat-card {
    animation: float 6s ease-in-out infinite;
}
.stat-card:nth-child(2) {
    animation-delay: -2s;
    margin-left: 1.5rem;
}
.stat-card:nth-child(3) {
    animation-delay: -4s;
}

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

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

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Menu list hover line ── */
#menu ul li {
    position: relative;
    padding-left: 0;
}
#menu ul li::before {
    content: '';
    position: absolute;
    left: -16px;
    top: 50%;
    width: 0;
    height: 1px;
    background: rgba(91, 44, 111, 0.15);
    transition: width 0.3s ease;
}
#menu ul li:hover::before {
    width: 10px;
}
