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

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

body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
}

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

button, input, select, textarea {
    font-family: inherit;
    font-size: 100%;
}

/* ===== Scroll Reveal (progressive enhancement) ===== */
@media (prefers-reduced-motion: no-preference) {
    .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);
    }

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

    .reveal[data-delay="100ms"] { transition-delay: 100ms; }
    .reveal[data-delay="200ms"] { transition-delay: 200ms; }
    .reveal[data-delay="300ms"] { transition-delay: 300ms; }
}

/* ===== Card Hover ===== */
.card-hover {
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease;
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

/* ===== Nav Link Underline ===== */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: currentColor;
    transition: width 0.3s ease;
}

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

/* ===== Hero Animations ===== */
@media (prefers-reduced-motion: no-preference) {
    .hero-eyebrow {
        animation: fadeSlideUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
    }

    .hero h1 {
        animation: fadeSlideUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.4s both;
    }

    .hero p {
        animation: fadeSlideUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.6s both;
    }

    .hero > div > div:last-child {
        animation: fadeSlideUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.8s both;
    }
}

@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Mobile Menu Transitions ===== */
#mobileNav.open {
    animation: slideDown 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 500px;
    }
}

/* ===== Hamburger Animation ===== */
#menuToggle[aria-expanded="true"] #bar1 {
    transform: translateY(5px) rotate(45deg);
}

#menuToggle[aria-expanded="true"] #bar2 {
    opacity: 0;
}

#menuToggle[aria-expanded="true"] #bar3 {
    transform: translateY(-5px) rotate(-45deg);
}

/* ===== Selection Color ===== */
::selection {
    background: rgba(196, 136, 0, 0.3);
    color: #f9f0fb;
}

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

::-webkit-scrollbar-track {
    background: #2d0d27;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #a840a0;
}

/* ===== Focus Visible ===== */
:focus-visible {
    outline: 2px solid #f5c437;
    outline-offset: 2px;
}

/* ===== 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;
    }
}

/* ===== Print ===== */
@media print {
    header, footer, #contactForm, #formSuccess {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }

    a {
        color: black !important;
    }
}
