/* ===== Pine Hill Farm Bed & Breakfast — Custom Styles ===== */

/* Base reset & typography */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: 'Nunito', system-ui, -apple-system, sans-serif;
    background-color: #FDF9F0;
    color: #292524;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Selection color */
::selection {
    background-color: #e05c28;
    color: #fff;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fdf9ec;
}
::-webkit-scrollbar-thumb {
    background: #e05c28;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #c94418;
}

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

#navbar.scrolled {
    background-color: rgba(253, 249, 240, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

#navbar.scrolled .font-display {
    color: #292524;
}

#navbar.scrolled a:not(.bg-terracotta) {
    color: #44403c;
}

#navbar.scrolled a:not(.bg-terracotta):hover {
    color: #e05c28;
}

/* ===== Smooth image loading ===== */
img {
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* ===== Scroll reveal animations ===== */
/* Default state: visible (progressive enhancement) */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
    }
    .reveal.visible {
        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; }
}

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

/* ===== Button ripple effect (subtle) ===== */
button, a {
    -webkit-tap-highlight-color: transparent;
}

/* ===== Mobile menu ===== */
#mobile-menu {
    transition: max-height 0.35s ease, opacity 0.3s ease;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

#mobile-menu.open {
    max-height: 500px;
    opacity: 1;
}

.mobile-link {
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.mobile-link:last-child {
    border-bottom: none;
}

/* ===== Card hover effects ===== */
.group:hover .group-hover\:scale-105 {
    transform: scale(1.05);
}

/* ===== Subtle pattern overlay for sections ===== */
.bg-pattern {
    background-image: radial-gradient(circle at 1px 1px, rgba(224, 92, 40, 0.05) 1px, transparent 0);
    background-size: 24px 24px;
}

/* ===== Accessibility: 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;
    }
    .float-anim, .float-anim-delay {
        animation: none;
    }
}

/* ===== Responsive adjustments ===== */
@media (max-width: 640px) {
    .font-display {
        font-size: 1.75rem;
    }
}

@media (min-width: 641px) and (max-width: 768px) {
    .font-display {
        font-size: 2.25rem;
    }
}

/* ===== Print styles ===== */
@media print {
    #navbar, #mobile-menu, .float-anim, .float-anim-delay {
        display: none !important;
    }
    body {
        background: white;
        color: black;
    }
    a {
        color: black;
        text-decoration: underline;
    }
}
