/* 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;
}

::selection {
    background: color-mix(in srgb, #14b8a6 30%, transparent);
    color: inherit;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #f0fdf9;
}
::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, #0a1628 30%, transparent);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: color-mix(in srgb, #0a1628 50%, transparent);
}

/* Animations */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scroll {
    0% { transform: translateY(-8px); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateY(8px); opacity: 0; }
}

.animate-scroll {
    animation: scroll 1.8s ease-in-out infinite;
}

/* Scroll reveal — progressive enhancement, only when JS runs */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

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

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(32px);
        transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                    transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navbar */
#navbar {
    color: #0a1628;
}

#navbar.scrolled {
    background: color-mix(in srgb, #f0fdf9 92%, transparent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 color-mix(in srgb, #0a1628 8%, transparent);
}

/* Mobile menu */
#mobile-menu {
    color: #0a1628;
}

#mobile-menu.open {
    transform: translateX(0);
}

/* Image aspect ratios */
img {
    display: block;
}

/* Thin line decorations */
.line-accent {
    width: 1px;
    height: 64px;
    background: linear-gradient(to bottom, transparent, #5eead4, transparent);
}

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

/* Print */
@media print {
    #navbar, .reveal:not(.revealed) { display: none; }
    body { color: #000; background: #fff; }
}
