/* ========== Base & Utilities ========== */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

/* ========== Hero ========== */
.hero-gradient {
    background: linear-gradient(135deg, #831443 0%, #500724 40%, #3b0419 70%, #1a130c 100%);
}

.hero-overlay {
    background: linear-gradient(to bottom, rgba(74, 56, 34, 0.3) 0%, rgba(80, 7, 36, 0.5) 50%, rgba(26, 19, 12, 0.7) 100%);
}

.hero-img {
    filter: brightness(0.7);
}

.hero-scroll-indicator {
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.5; transform: translate(-50%, 0); }
    50% { opacity: 1; transform: translate(-50%, 8px); }
}

/* ========== Header ========== */
#site-header {
    transition: background-color 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}

#site-header.scrolled {
    background-color: rgba(74, 56, 34, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.menu-link {
    position: relative;
}

.menu-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #f59e0b;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.menu-link:hover::after {
    width: 60%;
}

/* ========== Scroll Reveal (progressive enhancement) ========== */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.js-enabled .reveal {
    opacity: 0;
    transform: translateY(24px);
}

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

.js-enabled .reveal:nth-child(2) { transition-delay: 0.1s; }
.js-enabled .reveal:nth-child(3) { transition-delay: 0.2s; }
.js-enabled .reveal:nth-child(4) { transition-delay: 0.3s; }

/* ========== Back to Top ========== */
.back-to-top {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.back-to-top:not(.visible) {
    transform: translateY(10px);
}

/* ========== Mobile Menu ========== */
#mobile-menu.open {
    animation: slideDown 0.3s ease;
}

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

/* ========== Focus Styles ========== */
a:focus-visible, button:focus-visible {
    outline: 2px solid #f59e0b;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ========== Reduced Motion ========== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; }
    .hero-scroll-indicator { animation: none; }
}

/* ========== Print ========== */
@media print {
    #site-header, .back-to-top, .hero-scroll-indicator { display: none; }
    body { color: #000; background: #fff; }
}
