/* ========== BASE ========== */
*, *::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(52, 212, 160, 0.2);
    color: #f0fdf4;
}

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

#navbar.scrolled {
    background: rgba(10, 22, 40, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

#navbar.scrolled .nav-link {
    color: rgba(255, 255, 255, 0.6);
}

/* ========== MOBILE MENU ========== */
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.open .mobile-link {
    animation: fadeDown 0.4s ease forwards;
    opacity: 0;
}

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

@keyframes fadeDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.menu-line {
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

#menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(2px, 2px);
    background: #34d4a0;
}

#menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

#menu-btn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(2px, -2px);
    width: 14px;
    background: #34d4a0;
}

/* ========== HERO ========== */
.hero-bg {
    transition: transform 8s ease-out;
}

#hero.loaded .hero-bg {
    transform: scale(1);
}

/* ========== REVEAL ANIMATIONS ========== */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

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

/* ========== FORM ========== */
input:focus, textarea:focus {
    outline: none;
}

input::placeholder, textarea::placeholder {
    color: rgba(255, 255, 255, 0.15);
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #070f1c;
}

::-webkit-scrollbar-thumb {
    background: rgba(52, 212, 160, 0.2);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(52, 212, 160, 0.4);
}

/* ========== FOCUS ========== */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
    outline: 1px solid rgba(52, 212, 160, 0.5);
    outline-offset: 2px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 767px) {
    .font-serif {
        line-height: 1.1;
    }
}
