/* ===== Base & Typography ===== */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background: rgba(200, 164, 94, 0.3);
    color: #0A1D3F;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0A1D3F;
}
::-webkit-scrollbar-thumb {
    background: #C8A45E;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #DFC27A;
}

/* ===== Navbar ===== */
#navbar {
    background: transparent;
    transition: background 0.5s ease, box-shadow 0.5s ease, padding 0.5s ease;
}

#navbar.scrolled {
    background: rgba(250, 247, 240, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(10, 29, 63, 0.08);
}

#navbar.scrolled .font-serif,
#navbar.scrolled span {
    color: #0A1D3F;
}

#navbar.scrolled .menu-line {
    background: #0A1D3F;
}

/* ===== Hero Animations ===== */
.hero-subtitle {
    animation: slideUp 0.8s ease forwards;
    animation-delay: 0.2s;
    opacity: 0;
    transform: translateY(20px);
}

.hero-title-line {
    animation: slideUp 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    opacity: 0;
    transform: translateY(100%);
}

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

.hero-line {
    animation: expandWidth 0.8s ease forwards;
    animation-delay: 1s;
    opacity: 0;
    width: 0;
}

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

.hero-fade:nth-of-type(1) { animation-delay: 1.1s; }
.hero-fade:nth-of-type(2) { animation-delay: 1.25s; }
.hero-fade:nth-of-type(3) { animation-delay: 1.4s; }

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

@keyframes expandWidth {
    to {
        opacity: 1;
        width: 4rem;
    }
}

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

/* ===== Scroll Indicator ===== */
@keyframes scrollDot {
    0% { top: 0; opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

.scroll-dot {
    animation: scrollDot 1.5s ease-in-out infinite;
}

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

#mobile-menu.closed {
    opacity: 0;
    pointer-events: none;
}

.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    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.1s; }
#mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }
#mobile-menu.open .mobile-link:nth-child(5) { transition-delay: 0.3s; }

/* ===== Menu Toggle ===== */
.menu-line {
    transition: all 0.3s ease;
}

#menu-toggle.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}
#menu-toggle.active .menu-line:nth-child(2) {
    opacity: 0;
}
#menu-toggle.active .menu-line:nth-child(3) {
    width: 6rem;
    transform: rotate(-45deg) translate(4px, -4px);
}

/* ===== Reveal Animations ===== */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: no-preference) {
    .reveal-up {
        opacity: 0;
        transform: translateY(40px);
        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-left {
        opacity: 0;
        transform: translateX(-40px);
        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-right {
        opacity: 0;
        transform: translateX(40px);
        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-up.visible,
    .reveal-left.visible,
    .reveal-right.visible {
        opacity: 1;
        transform: translate(0, 0);
    }
}

/* ===== Selection ===== */
::selection {
    background: rgba(200, 164, 94, 0.3);
    color: #0A1D3F;
}

/* ===== Focus Styles ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #C8A45E;
    outline-offset: 2px;
}

/* ===== Select arrow ===== */
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='%239CA3AF' 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 0 center;
    padding-right: 2rem;
}

/* ===== Smooth image loading ===== */
img {
    loading: lazy;
    decoding: async;
}
