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

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

body {
    overflow-x: hidden;
}

/* Selection */
::selection {
    background: rgba(69, 209, 163, 0.3);
    color: #F0FFF8;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #050A18;
}
::-webkit-scrollbar-thumb {
    background: #1B3A68;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #2AB888;
}

/* Reveal Animations */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-hidden {
    opacity: 0;
    transform: translateY(30px);
}

@media (prefers-reduced-motion: no-preference) {
    .reveal-visible {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero Badge Pulse */
@keyframes subtle-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.hero-badge span {
    animation: subtle-pulse 2s ease-in-out infinite;
}

/* Hero Text Entrance - only for below-fold content handled by JS */
.hero-content {
    opacity: 1;
    transform: translateY(0);
}

/* Navbar Transition */
.nav-scrolled {
    background: rgba(5, 10, 24, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.nav-transparent {
    background: transparent !important;
}

/* Mobile Menu */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.mobile-link {
    position: relative;
}

.mobile-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: #45D1A3;
    transition: width 0.3s ease;
}

.mobile-link:hover::after {
    width: 100%;
}

/* Image Hover Effects */
.rounded-3xl.overflow-hidden img {
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.rounded-3xl.overflow-hidden:hover img {
    transform: scale(1.03);
}

/* Button Focus States */
a:focus-visible, button:focus-visible {
    outline: 2px solid #45D1A3;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Smooth Section Transitions */
section {
    position: relative;
}

/* Decorative Line Animation */
@keyframes line-grow {
    from { width: 0; }
    to { width: 100%; }
}

/* Loading State for Images */
img {
    background: linear-gradient(135deg, #0A1628 0%, #152E54 100%);
    min-height: 100px;
}

/* Prevent layout shift */
img {
    vertical-align: middle;
}

/* Responsive Typography */
@media (max-width: 768px) {
    .font-serif {
        line-height: 1.1;
    }
}

/* Print Styles */
@media print {
    nav, #mobile-menu-btn, .reveal-hidden {
        display: none !important;
    }
    body {
        background: white;
        color: black;
    }
}
