/* Olson's Cabins — Custom Styles */

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

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Smooth anchor scrolling with offset for fixed nav */
@media (prefers-reduced-motion: no-preference) {
    section[id] {
        scroll-margin-top: 80px;
    }
}

/* Selection color */
::selection {
    background: #f2b5a0;
    color: #5c2215;
}

/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 2px solid #c94f2c;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Image loading placeholder */
img {
    background-color: #fdf6ec;
}

/* Subtle text shadow for hero readability */
#hero h1 {
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

#hero p {
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.2);
}

/* Navbar transition states */
#navbar.scrolled {
    background: rgba(254, 252, 248, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

#navbar.scrolled .font-serif {
    color: #1f4028;
}

/* Mobile menu animation */
#mobile-menu.open .mobile-link {
    animation: slideIn 0.3s ease forwards;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-8px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Hamburger animation */
#menu-btn[aria-expanded="true"] .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
#menu-btn[aria-expanded="true"] .menu-line:nth-child(2) {
    opacity: 0;
}
#menu-btn[aria-expanded="true"] .menu-line:nth-child(3) {
    width: 1.5rem;
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Button hover glow */
.btn-primary:hover {
    box-shadow: 0 8px 25px rgba(201, 79, 44, 0.3);
}

.btn-secondary:hover {
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.15);
}

/* Cabin card image container */
.cabin-card .relative {
    position: relative;
}

.cabin-card .relative::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.15), transparent);
    pointer-events: none;
}

/* Select dropdown styling */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23a86c2e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

/* Form input autofill styling */
input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #fdf6ec inset !important;
    -webkit-text-fill-color: #292524 !important;
}

/* Reduced motion preferences */
@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;
    }

    .cabin-card:hover {
        transform: none;
    }

    .cabin-card .relative img {
        transition: none;
    }
}

/* Print styles */
@media print {
    #navbar,
    #mobile-menu,
    .pattern-dots,
    .hero-overlay,
    .reveal {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    a {
        color: #c94f2c;
    }
}
