/* Base & Typography */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

::selection {
    background-color: rgba(15, 76, 92, 0.2);
    color: #0a3540;
}

/* Scroll Reveal — progressive enhancement via JS */
.reveal-section {
    opacity: 1;
    transform: none;
    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-section.is-revealed {
    opacity: 1;
    transform: translateY(0);
}

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

/* Hero Animations */
@media (prefers-reduced-motion: no-preference) {
    .hero-tagline {
        animation: heroFadeUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.2s both;
    }
    .hero-headline {
        animation: heroFadeUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.4s both;
    }
    .hero-subheadline {
        animation: heroFadeUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.6s both;
    }
    .hero-cta {
        animation: heroFadeUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.8s both;
    }
}

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

/* Navbar scroll state */
.navbar-scrolled {
    background-color: rgba(3, 20, 25, 0.95) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Image hover effects */
img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f8fafc;
}
::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #2e8296;
    outline-offset: 2px;
}

/* Mobile menu transitions */
#mobile-menu {
    transition: max-height 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                padding 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

#mobile-menu.open {
    max-height: 400px;
    padding-top: 0;
}

/* Smooth image loading */
img {
    transition: opacity 0.3s ease;
}
img[data-src] {
    opacity: 0;
}
img.loaded {
    opacity: 1;
}
