/* ============================================
   Bed & Breakfast — Terrell, TX
   Custom styles for confident corporate design
   ============================================ */

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    min-height: 100vh;
}

/* Selection */
::selection {
    background: #c9a84c;
    color: #0a1628;
}

/* Header */
#site-header {
    transition: box-shadow 0.3s ease;
}

#site-header.scrolled {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Nav links */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #c9a84c;
    transition: all 0.2s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 60%;
}

/* Mobile menu */
#mobile-menu {
    animation: slideDown 0.25s ease;
}

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

.mobile-link {
    display: block;
}

.mobile-link::after {
    content: '';
    display: block;
    height: 1px;
    background: rgba(255, 255, 255, 0.05);
    margin-top: 4px;
}

/* Hero */
.hero-section {
    position: relative;
}

/* Rooms */
.room-card {
    position: relative;
    overflow: hidden;
}

.room-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10, 22, 40, 0.4) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.room-card:hover::before {
    opacity: 1;
}

/* Amenities */
.amenity-card {
    transition: all 0.25s ease;
}

.amenity-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(15, 29, 58, 0.08);
}

/* Buttons */
.btn-primary {
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.btn-primary:hover::before {
    opacity: 1;
}

/* Scroll animations — progressive enhancement only */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.6s ease, transform 0.6s ease;
    }

    .reveal.from-bottom {
        transform: translateY(24px);
    }

    .reveal.from-left {
        transform: translateX(-24px);
    }

    .reveal.from-right {
        transform: translateX(24px);
    }

    .reveal.visible {
        opacity: 1;
        transform: translateY(0) translateX(0);
    }
}

/* Fallback: always visible if JS is disabled */
.reveal {
    opacity: 1 !important;
    transform: none !important;
}

/* Focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #c9a84c;
    outline-offset: 2px;
    border-radius: 4px;
}

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0a1628;
}

::-webkit-scrollbar-thumb {
    background: #1e3a6e;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #c9a84c;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Utility */
.container-padding {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

@media (min-width: 1024px) {
    .container-padding {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}
