/* ============================================
   Young Ranch Guest House — Custom Styles
   ============================================ */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Base selection color */
::selection {
    background-color: #115e59;
    color: #f5f5f4;
}

/* ============================================
   Navbar
   ============================================ */
.nav-fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(250, 250, 249, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.nav-fixed.scrolled {
    border-bottom-color: rgba(0, 0, 0, 0.06);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

.nav-link {
    position: relative;
}

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

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

/* ============================================
   Hero Section
   ============================================ */
.hero-section {
    padding-top: 80px;
}

.hero-img-col {
    min-height: 60vh;
}

.hero-img {
    will-change: transform;
}

.hero-img-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, transparent 60%, rgba(4, 47, 46, 0.15));
    pointer-events: none;
}

.hero-content-col {
    min-height: 60vh;
}

/* Hero reveal animations — progressive enhancement only */
@media (prefers-reduced-motion: no-preference) {
    [data-reveal] {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }

    [data-reveal].revealed {
        opacity: 1;
        transform: translateY(0);
    }

    /* Staggered delays for hero content */
    .hero-content-inner > [data-reveal]:nth-child(1) { transition-delay: 0.15s; }
    .hero-content-inner > [data-reveal]:nth-child(2) { transition-delay: 0.3s; }
    .hero-content-inner > [data-reveal]:nth-child(3) { transition-delay: 0.45s; }
    .hero-content-inner > [data-reveal]:nth-child(4) { transition-delay: 0.6s; }

    /* Hero image parallax-like entrance */
    .hero-img {
        opacity: 0;
        transform: scale(1.05);
        animation: heroImageIn 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.1s forwards;
    }

    @keyframes heroImageIn {
        to {
            opacity: 1;
            transform: scale(1);
        }
    }

    /* Content fade in */
    .hero-content-inner {
        opacity: 0;
        animation: heroContentIn 1s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
    }

    @keyframes heroContentIn {
        to { opacity: 1; }
    }
}

/* ============================================
   Section Eyebrows
   ============================================ */
.section-eyebrow {
    letter-spacing: 0.3em;
}

/* ============================================
   Divider Line
   ============================================ */
.divider-line {
    margin-top: 0;
    margin-bottom: 0;
}

/* ============================================
   Room Cards
   ============================================ */
.room-card {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.room-img-wrap {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.4s ease;
}

.room-card:hover .room-img-wrap {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.14);
}

/* ============================================
   Experience Section
   ============================================ */
.experience-item {
    opacity: 1;
}

/* ============================================
   Location Cards
   ============================================ */
.location-card {
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.location-card:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

/* ============================================
   Buttons
   ============================================ */
.btn-primary {
    box-shadow: 0 4px 16px rgba(13, 148, 136, 0.3);
    transition: box-shadow 0.3s ease, background-color 0.3s ease, transform 0.2s ease;
}

.btn-primary:hover {
    box-shadow: 0 8px 28px rgba(13, 148, 136, 0.4);
    transform: translateY(-1px);
}

.btn-secondary {
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* ============================================
   Contact Form
   ============================================ */
.btn-submit {
    box-shadow: 0 4px 16px rgba(13, 148, 136, 0.25);
    transition: box-shadow 0.3s ease, background-color 0.3s ease, transform 0.2s ease;
}

.btn-submit:hover {
    box-shadow: 0 8px 28px rgba(13, 148, 136, 0.35);
    transform: translateY(-1px);
}

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

/* ============================================
   Mobile Menu
   ============================================ */
.mobile-link {
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.mobile-link:last-child {
    border-bottom: none;
}

/* Mobile menu animation */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), padding 0.4s ease;
}

#mobile-menu.open {
    max-height: 400px;
    padding-top: 0;
    padding-bottom: 0;
}

/* ============================================
   Scroll Reveal (below fold only)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    }

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

    .reveal[data-reveal-hidden] {
        opacity: 0;
        transform: translateY(32px);
    }
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 1023px) {
    .hero-img-col,
    .hero-content-col {
        min-height: 50vh;
    }

    .hero-content-col {
        min-height: auto;
    }
}

@media (max-width: 639px) {
    .hero-section {
        padding-top: 64px;
    }

    .hero-img-col,
    .hero-content-col {
        min-height: 45vh;
    }

    .hero-content-col {
        padding: 2rem 1.5rem;
    }
}

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

/* ============================================
   Print styles
   ============================================ */
@media print {
    .nav-fixed,
    #mobile-menu-btn {
        display: none;
    }

    body {
        color: #000;
        background: #fff;
    }

    .hero-section {
        min-height: auto;
        padding-top: 0;
    }
}
