/* ===== Base & Reset ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(65, 157, 139, 0.3);
    color: #f0f4f8;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #0a1424;
}
::-webkit-scrollbar-thumb {
    background: #2c4d7c;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #419d8b;
}

/* ===== Hero Animations ===== */
.hero-eyebrow {
    animation: slideUp 0.8s ease forwards;
    opacity: 0;
    transform: translateY(20px);
}

.hero-headline {
    animation: slideUp 0.8s 0.15s ease forwards;
    opacity: 0;
    transform: translateY(30px);
}

.hero-sub {
    animation: slideUp 0.8s 0.3s ease forwards;
    opacity: 0;
    transform: translateY(20px);
}

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Scroll Indicator ===== */
.scroll-line {
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.5); transform-origin: top; }
    50% { opacity: 1; transform: scaleY(1); }
}

/* ===== Navbar ===== */
.nav-scrolled {
    background: rgba(10, 20, 36, 0.95) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(65, 157, 139, 0.1);
}

.nav-scrolled #navbar {
    border-bottom: 1px solid rgba(65, 157, 139, 0.08);
}

/* ===== Mobile Menu ===== */
.mobile-menu-open {
    opacity: 1 !important;
    pointer-events: all !important;
}

.mobile-link {
    animation: fadeIn 0.4s ease forwards;
    opacity: 0;
}

.mobile-link:nth-child(1) { animation-delay: 0.1s; }
.mobile-link:nth-child(2) { animation-delay: 0.15s; }
.mobile-link:nth-child(3) { animation-delay: 0.2s; }
.mobile-link:nth-child(4) { animation-delay: 0.25s; }
.mobile-link:nth-child(5) { animation-delay: 0.3s; }

@keyframes fadeIn {
    to { opacity: 1; }
}

/* ===== Reveal Animations ===== */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.reveal-image {
    transform: translateX(0);
    transition: transform 1s ease;
}

.reveal-image.revealed {
    transform: translateX(0);
}

/* When not yet revealed (default state for progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 1;
        transform: translateY(0);
    }
    
    .reveal-image {
        transform: translateX(0);
    }
}

/* ===== Gallery Hover ===== */
.gallery-item img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* ===== Input Autofill ===== */
input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #0f1e33 inset !important;
    -webkit-text-fill-color: #d0dae6 !important;
    transition: background-color 5000s ease-in 0s;
}

/* ===== Focus Visible ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #419d8b;
    outline-offset: 2px;
}

/* ===== Mobile Menu Overlay ===== */
body.menu-open {
    overflow: hidden;
}

/* ===== Responsive Tweaks ===== */
@media (max-width: 767px) {
    .hero-headline {
        font-size: 2.75rem !important;
    }
    
    .floating-card {
        position: relative !important;
        bottom: auto !important;
        left: auto !important;
        margin-top: 1rem;
        max-width: 100% !important;
    }
    
    .secondary-float {
        display: none;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .hero-headline {
        font-size: 3.5rem !important;
    }
}
