/* ========================================
   Persimmon Ridge Primitives — Custom Styles
   Premium Dark Luxury | Forest Green + Gold
   ======================================== */

/* Base reset & smooth scrolling */
*, *::before, *::after {
    box-sizing: border-box;
}

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

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

/* Selection color */
::selection {
    background: rgba(180, 134, 11, 0.3);
    color: #faf8f4;
}

/* ========================================
   Scroll Reveal Animations
   (Progressive enhancement — content visible without JS)
   ======================================== */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }

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

    /* Staggered delays */
    .reveal:nth-child(2) { transition-delay: 0.1s; }
    .reveal:nth-child(3) { transition-delay: 0.2s; }
    .reveal:nth-child(4) { transition-delay: 0.3s; }
}

/* When JS is enabled, add hidden state first, then reveal */
.js-enabled .reveal {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   Navbar Scroll State
   ======================================== */
#navbar.scrolled {
    background: rgba(10, 9, 8, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(212, 168, 75, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

#navbar.scrolled .menu-line {
    background: #d4a84b;
}

/* ========================================
   Mobile Menu Animation
   ======================================== */
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.open .mobile-link {
    animation: fadeUp 0.4s ease forwards;
    opacity: 1;
}

#mobile-menu.open .mobile-link:nth-child(1) { animation-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(2) { animation-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(3) { animation-delay: 0.2s; }
#mobile-menu.open .mobile-link:nth-child(4) { animation-delay: 0.25s; }

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

/* Hamburger animation */
.menu-active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

.menu-active .menu-line:nth-child(2) {
    opacity: 0;
}

.menu-active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 1.25rem;
}

/* ========================================
   Button & Link Focus States
   ======================================== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid rgba(212, 168, 75, 0.6);
    outline-offset: 2px;
}

/* ========================================
   Image Loading
   ======================================== */
img {
    display: block;
    max-width: 100%;
}

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

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

::-webkit-scrollbar-thumb {
    background: rgba(212, 168, 75, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 168, 75, 0.5);
}

/* ========================================
   Back to Top Button
   ======================================== */
#back-to-top.visible {
    opacity: 1;
    pointer-events: all;
}

/* ========================================
   Form Input Autofill (dark theme)
   ======================================== */
input:-webkit-autofill,
textarea:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #0a0908 inset !important;
    -webkit-text-fill-color: #faf8f4 !important;
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
    body {
        background: white;
        color: black;
    }
    
    .no-print {
        display: none;
    }
}
