/* Rooney Ridge Retreat — Custom Styles */

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

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

body {
    margin: 0;
    overflow-x: hidden;
}

/* Selection */
::selection {
    background-color: #781f2a;
    color: #fff8f8;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #fdf0f2;
}
::-webkit-scrollbar-thumb {
    background: #c4687e;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #781f2a;
}

/* Focus */
:focus-visible {
    outline: 2px solid #781f2a;
    outline-offset: 2px;
}

/* Navbar */
#navbar {
    transition: background-color 0.5s ease, box-shadow 0.5s ease;
}
#navbar.scrolled {
    background-color: rgba(255, 248, 248, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(120, 31, 42, 0.08);
}

/* Nav Links */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #781f2a;
    transition: width 0.3s ease;
}
.nav-link:hover::after {
    width: 100%;
}

/* Mobile Menu */
#mobile-menu {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}
#mobile-menu.closed {
    opacity: 0;
    pointer-events: none;
}
.mobile-nav-link {
    transition: opacity 0.3s ease;
}
.mobile-nav-link:hover {
    opacity: 0.7;
}

/* Menu Toggle Animation */
.menu-line {
    transition: transform 0.3s ease, width 0.3s ease, opacity 0.2s ease;
}
#menu-toggle[aria-expanded="true"] .menu-line:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}
#menu-toggle[aria-expanded="true"] .menu-line:nth-child(2) {
    opacity: 0;
}
#menu-toggle[aria-expanded="true"] .menu-line:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
    width: 1.5rem;
}

/* Scroll Reveal */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    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; }

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

/* Image Placeholder */
img {
    max-width: 100%;
    height: auto;
}

/* Form */
input::placeholder,
textarea::placeholder {
    color: #d4a8b4;
}
input:focus,
textarea:focus {
    border-bottom-color: #781f2a !important;
}

/* Button Hover */
button:hover,
a:hover {
    cursor: pointer;
}

/* Smooth image loading */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

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