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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
}

body {
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    background: #5eead4;
    color: #0a1628;
    padding: 0.5rem 1rem;
    border-radius: 0 0 0.5rem 0.5rem;
    z-index: 100;
    font-weight: 600;
    text-decoration: none;
}

.skip-link:focus {
    top: 0;
}

/* Navbar */
#navbar.scrolled {
    background: rgba(4, 8, 16, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

#navbar.scrolled .font-display,
#navbar.scrolled .font-body {
    color: inherit;
}

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

.mobile-link {
    transition: color 0.2s ease;
}

.mobile-link:hover {
    color: #5eead4;
}

/* Marquee */
@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.animate-marquee {
    animation: marquee 25s linear infinite;
}

/* Floating animations */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(3deg); }
}

@keyframes float-slow {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-12px) rotate(-2deg); }
}

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

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-float-slow {
    animation: float-slow 8s ease-in-out infinite;
}

.animate-float-medium {
    animation: float-medium 7s ease-in-out infinite;
}

/* Scroll reveal */
.reveal-up,
.reveal-left {
    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-up,
    .reveal-left {
        opacity: 0;
        transform: translateY(30px);
    }

    .reveal-left {
        transform: translateX(-30px);
    }

    .reveal-up.visible,
    .reveal-left.visible {
        opacity: 1;
        transform: translateY(0) translateX(0);
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #040810;
}

::-webkit-scrollbar-thumb {
    background: #1e3a5f;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #5eead4;
}

/* Selection */
::selection {
    background: rgba(94, 234, 212, 0.3);
    color: #f0fdf9;
}

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

/* Image placeholder fallback */
img {
    background: linear-gradient(135deg, #0a1628 0%, #1a2d4a 100%);
}
