/* ============================================
   POTOMAC OVERLOOK CABIN — Custom Styles
   ============================================ */

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

body {
    overflow-x: hidden;
}

::selection {
    background-color: rgba(31, 163, 112, 0.2);
    color: #0d1e3c;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0d1e3c;
}
::-webkit-scrollbar-thumb {
    background: #3a5ea8;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #1fa370;
}

/* --- Scroll Reveal Animations --- */
.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-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* --- Staggered card reveals --- */
.card-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.card-reveal-delay-1 { transition-delay: 0.05s; }
.card-reveal-delay-2 { transition-delay: 0.1s; }
.card-reveal-delay-3 { transition-delay: 0.15s; }
.card-reveal-delay-4 { transition-delay: 0.2s; }
.card-reveal-delay-5 { transition-delay: 0.25s; }
.card-reveal-delay-6 { transition-delay: 0.3s; }

/* --- Mobile menu transitions --- */
.mobile-nav-link {
    position: relative;
}

.mobile-nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #1fa370, #76d4b0);
    transition: width 0.3s ease;
}

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

/* --- Header transition states --- */
.header-scrolled {
    background: rgba(255, 255, 255, 0.97) !important;
    backdrop-filter: blur(12px) !important;
    box-shadow: 0 1px 0 rgba(13, 30, 60, 0.08), 0 4px 24px rgba(13, 30, 60, 0.06);
}

.header-scrolled .font-display {
    color: #0d1e3c !important;
}

.header-scrolled a:not([class*="bg-"]):not(.mobile-nav-link) {
    color: #1e3868 !important;
}

/* --- Image lazy-load fallback --- */
img[loading="lazy"] {
    transition: opacity 0.4s ease;
}
img[loading="lazy"].loaded {
    opacity: 1;
}

/* --- 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, .card-reveal {
        opacity: 1;
        transform: none;
    }
}

/* --- Focus visible --- */
*:focus-visible {
    outline: 2px solid #1fa370;
    outline-offset: 2px;
    border-radius: 4px;
}

/* --- Form date inputs --- */
input[type="date"] {
    color-scheme: light;
}

/* --- Print --- */
@media print {
    #site-header, #mobile-menu, .reveal, .card-reveal {
        display: none !important;
    }
    body {
        color: #000;
        background: #fff;
    }
}
