/* ── Base ── */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    overflow-x: hidden;
}

img {
    display: block;
    max-width: 100%;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ── Navbar transitions ── */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(10, 26, 43, 0.06);
}

#navbar.scrolled .nav-logo-text {
    color: #0a1a2b;
}

#navbar.scrolled .mobile-link {
    color: #0a1a2b;
}

#navbar.scrolled .menu-line {
    background: #0a1a2b;
}

/* ── Mobile menu ── */
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.open .mobile-link {
    animation: fadeUp 0.4s ease forwards;
    opacity: 1;
}

#mobile-menu .mobile-link:nth-child(1) { animation-delay: 0.05s; }
#mobile-menu .mobile-link:nth-child(2) { animation-delay: 0.1s; }
#mobile-menu .mobile-link:nth-child(3) { animation-delay: 0.15s; }
#mobile-menu .mobile-link:nth-child(4) { animation-delay: 0.2s; }
#mobile-menu .mobile-link:nth-child(5) { animation-delay: 0.25s; }

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

/* ── Menu button animation ── */
.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#menu-btn.active .menu-line:first-child {
    transform: translateY(4px) rotate(45deg);
}

#menu-btn.active .menu-line:last-child {
    transform: translateY(-4px) rotate(-45deg);
}

/* ── Scroll reveal (progressive enhancement) ── */
.js-enabled .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* If JS is disabled, content remains visible by default */
:not(.js-enabled) .reveal {
    opacity: 1;
    transform: none;
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html {
        scroll-behavior: auto;
    }
    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ── Selection ── */
::selection {
    background: #38b27d;
    color: #0a1a2b;
}

/* ── Thin scrollbar for webkit ── */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #f0f4f8;
}
::-webkit-scrollbar-thumb {
    background: #a3b8cc;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #7696b2;
}
