/* ── Custom base styles ── */
html {
    scroll-behavior: smooth;
}

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

/* ── Hero animations (above the fold — always visible) ── */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* ── Marquee ── */
@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.animate-marquee {
    animation: marquee 30s linear infinite;
}

/* ── Scroll reveal (below the fold only) ── */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.scroll-reveal[data-reveal] {
    opacity: 0;
    transform: translateY(24px);
}

@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal[data-reveal] {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }
    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Navbar glass effect ── */
#navbar.scrolled {
    background: rgba(254, 252, 247, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(0,0,0,0.06);
}

/* ── Menu hover effects ── */
#menu ul li {
    border-bottom: 1px solid rgba(0,0,0,0.04);
    padding-bottom: 1rem;
}

#menu ul li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* ── Image hover zoom ── */
img {
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── Selection color ── */
::selection {
    background: #f9ddd3;
    color: #7d2616;
}

/* ── Focus styles ── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #d94f2e;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ── Mobile menu transition ── */
#mobile-menu {
    animation: slideDown 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* ── Smooth scroll offset for fixed nav ── */
section[id] {
    scroll-margin-top: 80px;
}

/* ── Custom scrollbar ── */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fefcf7;
}
::-webkit-scrollbar-thumb {
    background: #f3bba8;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #ec9172;
}
