/* ============================================
   Tingler Island Mansion — Custom Styles
   Classic & Elegant · Charcoal + Coral
   ============================================ */

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

body {
    min-height: 100vh;
}

/* Selection Color */
::selection {
    background: #E87461;
    color: #FDFCFA;
}

/* ============================================
   Scroll Reveal Animations (progressive enhancement)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(32px);
        transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                    transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

    .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; }
}

/* ============================================
   Navbar
   ============================================ */
#navbar {
    transition: background-color 0.4s ease, 
                box-shadow 0.4s ease,
                padding 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(26, 26, 26, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

#navbar.light {
    background-color: rgba(253, 252, 250, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

#navbar.light .font-serif,
#navbar.light #nav-about,
#navbar.light #nav-residences,
#navbar.light #nav-amenities,
#navbar.light #nav-location {
    color: #2C2C2C;
}

/* ============================================
   Hero Stat Cards
   ============================================ */
.stat-card {
    transform: translateZ(0);
    will-change: transform, background-color;
}

/* ============================================
   Mobile Menu
   ============================================ */
.mobile-link {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

#mobile-menu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

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

/* Mobile menu toggle animation */
#menu-toggle[aria-expanded="true"] #bar1 {
    transform: rotate(45deg) translate(4px, 4px);
}
#menu-toggle[aria-expanded="true"] #bar2 {
    opacity: 0;
}
#menu-toggle[aria-expanded="true"] #bar3 {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 1.5rem;
}

/* ============================================
   Image Hover Effects
   ============================================ */
img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ============================================
   Button Focus States
   ============================================ */
button:focus-visible,
a:focus-visible {
    outline: 2px solid #E87461;
    outline-offset: 2px;
}

/* ============================================
   Input Focus States
   ============================================ */
input:focus,
textarea:focus {
    outline: none;
}

/* ============================================
   Custom Scrollbar
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #2C2C2C;
}
::-webkit-scrollbar-thumb {
    background: #5F5F5F;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #E87461;
}

/* ============================================
   Subtle Pattern Overlay for Sections
   ============================================ */
section::before {
    content: '';
    pointer-events: none;
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    #navbar,
    #mobile-menu,
    .stat-card,
    footer {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    a {
        color: #000;
    }
}
