/* ===== RESET & BASE ===== */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

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

img, video, svg {
    display: block;
    max-width: 100%;
}

button, input, select, textarea {
    font: inherit;
}

/* ===== SCROLL REVEAL (progressive enhancement) ===== */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(32px);
        transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }

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

    /* Staggered delays */
    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
}

/* Default state: always visible (no JS) */
.reveal {
    opacity: 1;
    transform: none;
}

/* ===== NAVBAR SCROLL STATE ===== */
#site-header.scrolled {
    background: rgba(11, 15, 24, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

#site-header.scrolled .nav-link {
    color: rgba(255, 255, 255, 0.85);
}

#site-header.scrolled #nav-logo-text {
    color: #fff;
}

/* ===== MOBILE MENU ===== */
#mobile-menu {
    animation: slideDown 0.3s ease;
}

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

/* ===== CUSTOM SELECTION ===== */
::selection {
    background: rgba(184, 92, 56, 0.25);
    color: #1f2937;
}

/* ===== FOCUS VISIBLE ===== */
:focus-visible {
    outline: 2px solid #B85C38;
    outline-offset: 2px;
}

/* ===== FORM FOCUS STATES ===== */
input:focus, select:focus, textarea:focus {
    box-shadow: 0 0 0 3px rgba(184, 92, 56, 0.15);
}

/* ===== SUBTLE CARD SHADOW ===== */
.rounded-2xl {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.04);
}

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

::-webkit-scrollbar-track {
    background: #0B0F18;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #4B5563;
}

/* ===== REDUCED MOTION: disable transitions ===== */
@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;
    }
}
