/* ========================================
   Main Street Bed & Breakfast
   Premium Dark Luxury Styles
   ======================================== */

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

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

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(201, 168, 76, 0.3);
    color: #fff;
}

/* --- Animations --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scrollLine {
    0% {
        opacity: 0;
        transform: scaleY(0);
        transform-origin: top;
    }
    50% {
        opacity: 1;
        transform: scaleY(1);
        transform-origin: top;
    }
    51% {
        transform-origin: bottom;
    }
    100% {
        opacity: 0;
        transform: scaleY(0);
        transform-origin: bottom;
    }
}

.animate-fade-in {
    animation: fadeIn 0.8s ease forwards;
}

.animate-scroll-line {
    animation: scrollLine 2s ease-in-out infinite;
}

/* --- Scroll Reveal --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.reveal.visible:nth-child(1) { transition-delay: 0.05s; }
.reveal.visible:nth-child(2) { transition-delay: 0.1s; }
.reveal.visible:nth-child(3) { transition-delay: 0.15s; }
.reveal.visible:nth-child(4) { transition-delay: 0.2s; }
.reveal.visible:nth-child(5) { transition-delay: 0.25s; }
.reveal.visible:nth-child(6) { transition-delay: 0.3s; }

/* --- Gold Button --- */
.gold-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    background: linear-gradient(135deg, #C9A84C 0%, #A8872E 50%, #C9A84C 100%);
    background-size: 200% 200%;
    color: #0A1628;
    font-family: 'Raleway', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 0 4px 20px rgba(201, 168, 76, 0.2), inset 0 1px 0 rgba(255,255,255,0.2);
}

.gold-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 4px;
    padding: 1px;
    background: linear-gradient(135deg, #E0CA7E, #8B6F24);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gold-btn:hover {
    background-position: right center;
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(201, 168, 76, 0.35), inset 0 1px 0 rgba(255,255,255,0.2);
    color: #050D1A;
}

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

.gold-btn:active {
    transform: translateY(0);
}

/* --- Navbar --- */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(5, 13, 26, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(201, 168, 76, 0.1);
    box-shadow: 0 4px 40px rgba(0, 0, 0, 0.3);
}

#navbar.scrolled .gold-btn {
    padding: 10px 20px;
}

/* --- Mobile Menu --- */
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

.mobile-link {
    font-size: 14px;
    letter-spacing: 0.2em;
}

/* --- Image hover effects --- */
.group img {
    will-change: transform;
}

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

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #C9A84C, #8B6F24);
    border-radius: 4px;
}

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

/* --- Date input styling --- */
input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(0.7) sepia(1) saturate(3) hue-rotate(10deg);
    cursor: pointer;
}

/* --- Select styling --- */
select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23C9A84C' 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: 36px;
}

/* --- Responsive adjustments --- */
@media (max-width: 640px) {
    .gold-btn {
        padding: 12px 20px;
        font-size: 10px;
    }
}

/* --- Focus visible for accessibility --- */
*:focus-visible {
    outline: 2px solid rgba(201, 168, 76, 0.6);
    outline-offset: 2px;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: none;
}
