/* Base & utilities */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: #FDF6F0;
}

/* Selection color */
::selection {
    background-color: #b91c1c;
    color: #FDF6F0;
}

/* Smooth image rendering */
img {
    -webkit-font-smoothing: antialiased;
}

/* Scroll reveal base — content visible by default, animated via JS */
.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);
}

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

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

/* Navbar scroll state */
#navbar.scrolled {
    background: rgba(253, 246, 240, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(127, 29, 29, 0.08);
}

/* Mobile menu transitions */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
    opacity: 0;
}

#mobile-menu.open {
    max-height: 500px;
    opacity: 1;
}

/* Hamburger animation */
#mobile-toggle.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

#mobile-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

#mobile-toggle.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 1.25rem;
}

/* Custom select arrow */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237f1d1d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

/* Subtle hover on cards */
.group:hover .group-hover\:bg-burgundy-800 {
    background-color: #7f1d1d;
}

/* Prevent layout shift on images */
img {
    content-visibility: auto;
}

/* Mobile menu link underline animation */
.mobile-link {
    position: relative;
}

.mobile-link::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #b91c1c;
    transition: width 0.3s ease;
    border-radius: 1px;
}

.mobile-link:hover::after {
    width: 100%;
}

/* Focus visible outlines */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #b91c1c;
    outline-offset: 2px;
    border-radius: 8px;
}

/* Print styles */
@media print {
    #navbar, #mobile-menu, .reveal:not(.animated) {
        display: none;
    }
    body {
        background: white;
        color: black;
    }
}
