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

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

body {
    background-color: #0d1442;
    color: #ffffff;
}

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

::selection {
    background-color: rgba(45, 180, 138, 0.3);
    color: #ffffff;
}

/* ─── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0d1442;
}
::-webkit-scrollbar-thumb {
    background: #1a237e;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #283593;
}

/* ─── Navbar ────────────────────────────────────────────────── */
#navbar.scrolled {
    background: rgba(7, 11, 33, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(45, 180, 138, 0.1);
}

/* ─── Reveal on Scroll ─────────────────────────────────────── */
.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);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    html {
        scroll-behavior: auto;
    }
}

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

.animate-fade-in-up {
    animation-name: fadeInUp;
    animation-duration: 0.9s;
    animation-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    animation-fill-mode: both;
}

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

.mobile-link {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s 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.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; }

/* ─── Form ──────────────────────────────────────────────────── */
.form-input {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    transition: border-color 0.3s ease, background 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: rgba(45, 180, 138, 0.6);
    background: rgba(255, 255, 255, 0.06);
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.form-textarea {
    resize: none;
}

/* ─── Toast ─────────────────────────────────────────────────── */
#toast {
    transform: translateY(calc(100% + 20px));
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
                opacity 0.4s ease;
}

#toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* ─── Utility ───────────────────────────────────────────────── */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}
