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

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

body {
    overflow-x: hidden;
}

/* Scroll reveal animations — progressive enhancement, only when JS runs and motion is preferred */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    }

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

    .reveal:nth-child(2) { transition-delay: 0.08s; }
    .reveal:nth-child(3) { transition-delay: 0.16s; }
    .reveal:nth-child(4) { transition-delay: 0.24s; }
}

/* For no-JS or reduced-motion: ensure all content is visible */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* Mobile menu */
#mobileMenu {
    animation: slideDown 0.25s ease-out;
}

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0f172a;
}
::-webkit-scrollbar-thumb {
    background: #1e3a5f;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #2563eb;
}

/* Selection color */
::selection {
    background: rgba(20, 184, 166, 0.3);
    color: #0f172a;
}

/* Focus styles */
:focus-visible {
    outline: 2px solid #14b8a6;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Smooth image rendering */
img {
    -webkit-font-smoothing: antialiased;
}
