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

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

body {
    margin: 0;
    overflow-x: hidden;
}

::selection {
    background: #5eead4;
    color: #0a1628;
}

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

.animate-fade-up {
    animation: fadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

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

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

/* ── Navbar ── */
#navbar {
    background: rgba(248, 247, 244, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(10, 22, 40, 0.06);
}

#navbar.scrolled {
    box-shadow: 0 1px 20px rgba(10, 22, 40, 0.06);
}

/* ── Mobile Menu ── */
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

.mobile-link {
    transition: opacity 0.3s;
}

.mobile-link:hover {
    opacity: 0.7;
}

/* ── Menu Toggle ── */
.menu-line {
    display: block;
    width: 20px;
    height: 1px;
    background: #0a1628;
    transition: transform 0.3s, opacity 0.3s;
}

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

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

/* ── Form Inputs ── */
input:focus,
select:focus,
textarea:focus {
    border-color: #5eead4 !important;
}

input::placeholder,
textarea::placeholder {
    color: rgba(10, 22, 40, 0.15);
}

select {
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%230a1628' stroke-width='1.2' fill='none' stroke-linecap='round' stroke-linejoin='round' opacity='0.4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0 center;
    padding-right: 24px;
}

/* ── Smooth Image Loading ── */
img {
    display: block;
    max-width: 100%;
}

/* ── Focus Visible ── */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #5eead4;
    outline-offset: 2px;
}

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

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }

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