/* ===== Base & Utilities ===== */
html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

::selection {
    background: #f9c7b8;
    color: #1e1e26;
}

/* ===== Navigation ===== */
#navbar {
    transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background: rgba(10, 10, 15, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

.nav-logo-text {
    transition: color 0.4s ease;
}

/* ===== Hero Animations ===== */
.hero-elem {
    opacity: 0;
    transform: translateY(30px);
    animation: heroReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

@keyframes heroReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

/* ===== Menu Tabs ===== */
.tab-btn {
    background: transparent;
    color: rgba(30, 30, 38, 0.5);
    border: none;
    cursor: pointer;
}

.tab-btn.active {
    background: white;
    color: #1e1e26;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* ===== Mobile Menu ===== */
#mobile-menu {
    animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.mobile-link {
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.mobile-link:last-child {
    border-bottom: none;
}

/* ===== Form ===== */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23717183' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* ===== Smooth image loading ===== */
img {
    background-color: #e8e8ec;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #a1a1b0;
}

/* ===== Focus visible ===== */
*:focus-visible {
    outline: 2px solid #e0603a;
    outline-offset: 2px;
}

/* ===== Menu panel transition ===== */
.menu-panel {
    animation: fadeIn 0.4s ease;
}

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

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