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

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

body {
    min-height: 100vh;
}

::selection {
    background: color-mix(in srgb, #A7C4B8 30%, transparent);
    color: #0D2137;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

#navbar.scrolled {
    background: rgba(13, 33, 55, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(167, 196, 184, 0.08);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: #A7C4B8;
    transition: width 0.3s ease;
}

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

/* ── Hero Animations ─────────────────────────────── */
.hero-line {
    display: inline-block;
    transform: translateY(110%);
    animation: slideUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero-line:nth-child(1) { animation-delay: 0.1s; }
.hero-line:nth-child(2) { animation-delay: 0.25s; }
.hero-line:nth-child(3) { animation-delay: 0.4s; }
.hero-line:nth-child(4) { animation-delay: 0.55s; }

.hero-subtitle {
    opacity: 0;
    animation: fadeIn 0.8s ease forwards;
    animation-delay: 0.7s;
}

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

.hero-fade:nth-of-type(1) { animation-delay: 0.9s; }
.hero-fade:nth-of-type(2) { animation-delay: 1.05s; }

.hero-image-card {
    opacity: 0;
    transform: translateX(40px);
    animation: slideInRight 1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: 0.6s;
}

.hero-scroll {
    opacity: 0;
    animation: fadeIn 0.8s ease forwards;
    animation-delay: 1.4s;
}

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

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

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ── Scroll Reveal ───────────────────────────────── */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* ── Scroll Pills ────────────────────────────────── */
@keyframes scrollPills {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.animate-scroll-pills {
    animation: scrollPills 30s linear infinite;
}

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

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

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

/* ── Mobile Toggle ───────────────────────────────── */
.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#mobile-toggle[aria-expanded="true"] .menu-line:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}

#mobile-toggle[aria-expanded="true"] .menu-line:nth-child(2) {
    opacity: 0;
}

#mobile-toggle[aria-expanded="true"] .menu-line:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
    width: 1.5rem;
}

/* ── Reduced Motion ──────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }

    .animate-scroll-pills {
        animation: none;
    }
}
