/* ========================================
   Tin Star Ranch — Custom Styles
   ======================================== */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: #FAF7F2;
    color: #2A2520;
    font-family: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
    font-weight: 300;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Selection */
::selection {
    background-color: #B85C38;
    color: #FAF7F2;
}

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

::-webkit-scrollbar-track {
    background: #E8DCC4;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #9A4B2C;
}

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

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

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ========================================
   Hero Animations
   ======================================== */
.hero-subtitle {
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.2s;
}

.hero-title {
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.4s;
}

.hero-description {
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.6s;
}

.hero-cta {
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.8s;
}

.hero-image-frame {
    animation: scaleIn 1s ease forwards;
    animation-delay: 0.3s;
    opacity: 0;
}

/* ========================================
   Scroll-triggered Animations
   ======================================== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.95);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-scale.active {
    opacity: 1;
    transform: scale(1);
}

/* Staggered delays */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ========================================
   Navbar
   ======================================== */
#navbar {
    background: transparent;
    backdrop-filter: none;
    transition: all 0.5s ease;
}

#navbar.scrolled {
    background: rgba(250, 247, 242, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(196, 180, 154, 0.3);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: #B85C38;
    transition: width 0.3s ease;
}

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

/* Mobile Menu */
#mobile-menu {
    background: rgba(250, 247, 242, 0.98);
    backdrop-filter: blur(20px);
}

.mobile-link {
    position: relative;
}

/* ========================================
   Scroll Indicator
   ======================================== */
.scroll-indicator {
    animation: fadeIn 1s ease forwards;
    animation-delay: 1.5s;
    opacity: 0;
}

/* ========================================
   Typography
   ======================================== */
.font-serif {
    letter-spacing: -0.01em;
}

/* ========================================
   Lodging Cards
   ======================================== */
.lodging-card {
    position: relative;
}

.lodging-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #B85C38;
    transition: width 0.4s ease;
}

.lodging-card:hover::after {
    width: 100%;
}

/* ========================================
   Experience Items
   ======================================== */
.experience-item {
    position: relative;
    overflow: hidden;
}

.experience-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(42, 37, 32, 0.9) 0%, rgba(42, 37, 32, 0.3) 50%, transparent 100%);
    z-index: 1;
    opacity: 0.8;
    transition: opacity 0.4s ease;
}

.experience-item:hover::before {
    opacity: 1;
}

/* ========================================
   Gallery
   ======================================== */
.gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(184, 92, 56, 0);
    transition: background 0.4s ease;
}

.gallery-item:hover::after {
    background: rgba(184, 92, 56, 0.1);
}

/* ========================================
   Form Elements
   ======================================== */
.form-group 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='%23B85C38' stroke-width='1.5'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0 center;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: #B85C38 !important;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(107, 99, 91, 0.5);
}

/* ========================================
   Button Focus States
   ======================================== */
button:focus-visible,
a:focus-visible {
    outline: 2px solid #B85C38;
    outline-offset: 2px;
}

/* ========================================
   Responsive Adjustments
   ======================================== */
@media (max-width: 768px) {
    html {
        font-size: 15px;
    }

    .hero-title {
        font-size: 3rem !important;
    }

    .hero-image-frame img {
        height: 400px !important;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }

    .hero-title {
        font-size: 2.5rem !important;
    }
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
    #navbar,
    .scroll-indicator {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    .hero-title,
    .lodging-title,
    .experiences-title,
    .contact-title {
        color: black;
    }
}
