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

body {
    overflow-x: hidden;
}

/* Selection */
::selection {
    background-color: rgba(251, 191, 36, 0.3);
    color: #faf5f7;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #2b1420;
}
::-webkit-scrollbar-thumb {
    background: #5e314a;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #8e4d70;
}

/* Reveal animations — progressive enhancement, hidden by default, activated via JS */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(32px);
        transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    .reveal:nth-child(2) { transition-delay: 0.1s; }
    .reveal:nth-child(3) { transition-delay: 0.2s; }
    .reveal:nth-child(4) { transition-delay: 0.3s; }
}

/* Ensure content is visible even without JS */
@media not all and (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* Navbar states */
.nav-scrolled {
    background-color: rgba(43, 20, 32, 0.95) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(142, 77, 112, 0.2);
}

/* Hero subtle parallax feel */
header {
    will-change: transform;
}

/* Button focus styles */
button:focus-visible,
a:focus-visible {
    outline: 2px solid #fbbf24;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Form focus styles */
input:focus-visible,
textarea:focus-visible {
    outline: none;
}

/* Smooth image loading */
img {
    loading: lazy;
}

/* Print styles */
@media print {
    nav, .reveal, #contact-form, #form-success, iframe {
        display: none !important;
    }
    body {
        background: white !important;
        color: black !important;
    }
}
