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

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

body {
    overflow-x: hidden;
}

::selection {
    background-color: rgba(94, 192, 130, 0.3);
    color: #0a1a38;
}

/* ===== Scroll Reveal ===== */
.reveal {
    opacity: 1;
    transform: translateY(0);
    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);
}

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

/* ===== Navbar ===== */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(242, 251, 247, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(15, 40, 80, 0.06);
}

#navbar.scrolled .font-serif {
    color: #0a1a38 !important;
}

#navbar.scrolled .menu-line {
    background: #0a1a38 !important;
}

#navbar.scrolled a:not(.bg-midnight-950) {
    color: #13325f !important;
}

/* ===== Hero Animations ===== */
#hero-subtitle {
    animation: fadeUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.3s forwards;
    opacity: 0;
}

#hero-headline {
    animation: fadeUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.5s forwards;
    opacity: 0;
}

#hero-desc {
    animation: fadeUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.7s forwards;
    opacity: 0;
}

#hero-cta {
    animation: fadeUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.9s forwards;
    opacity: 0;
}

#scroll-indicator {
    animation: fadeUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 1.2s forwards;
    opacity: 0;
}

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

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

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

/* ===== Mobile Menu ===== */
.mobile-link {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

.mobile-menu-open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu-open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu-open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
.mobile-menu-open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
.mobile-menu-open .mobile-link:nth-child(4) { transition-delay: 0.25s; }

/* ===== Mobile Menu Toggle ===== */
.menu-open .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

.menu-open .menu-line:nth-child(2) {
    opacity: 0;
}

.menu-open .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
}

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

/* ===== Image Loading ===== */
img {
    background-color: #e1f5ea;
}

/* ===== Smooth Scroll Offset ===== */
section[id] {
    scroll-margin-top: 80px;
}

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

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

::-webkit-scrollbar-thumb {
    background: #95d9ab;
    border-radius: 4px;
}

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

/* ===== Responsive Adjustments ===== */
@media (max-width: 768px) {
    .reveal {
        opacity: 1;
        transform: translateY(0);
    }
}
