/* ==========================================
   Texas Prairie Cottage — Custom Styles
   ========================================== */

/* Base & Typography */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #0f766e;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #115e59;
}

/* Selection */
::selection {
    background: #0f766e;
    color: #f0fdf9;
}

/* Navbar transition states */
.navbar-scrolled {
    background: rgba(255, 255, 255, 0.97) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

.navbar-scrolled .nav-text {
    color: #1e293b !important;
}

.navbar-scrolled .nav-subtext {
    color: #0f766e !important;
}

/* Mobile menu active state */
.mobile-menu-open {
    opacity: 1 !important;
    pointer-events: all !important;
}

/* Hero stat cards animation */
.stat-card {
    animation: floatCard 6s ease-in-out infinite;
}

.stat-card:nth-child(2) {
    animation-delay: -2s;
}

.stat-card:nth-child(3) {
    animation-delay: -4s;
}

@keyframes floatCard {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

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

@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; }
}

/* Room cards */
.room-card {
    transform: translateY(0);
}

.room-card:hover {
    transform: translateY(-6px);
}

/* Gallery items */
.gallery-item {
    overflow: hidden;
    border-radius: 4px;
}

.gallery-item img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* Select styling */
select {
    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='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* Mobile menu animation */
#mobileMenu {
    transition: opacity 0.4s ease, pointer-events 0.4s ease;
}

/* Scroll reveal base states */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: no-preference) {
    .reveal-up {
        opacity: 0;
        transform: translateY(40px);
        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-left {
        opacity: 0;
        transform: translateX(-40px);
        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-right {
        opacity: 0;
        transform: translateX(40px);
        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-up.revealed,
    .reveal-left.revealed,
    .reveal-right.revealed {
        opacity: 1;
        transform: none;
    }
}

/* Back to top button */
#backToTop {
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

#backToTop.visible {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

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

/* Print styles */
@media print {
    nav, #backToTop, .stat-card {
        display: none !important;
    }
    body {
        color: #000;
        background: #fff;
    }
}
