/* ============================================
   Cave and Creek in Hocking Hills — Stylesheet
   Earthy, woodsy palette. Mobile-first.
   ============================================ */

:root {
    --green-900: #0f2818;
    --green-700: #16492a;
    --green-500: #1e7a3e;
    --cream-50: #ffffff;
    --cream-100: #f5f5f3;
    --sand-500: #c9a55a;
    --sand-700: #b08e3e;
    --charcoal: #111111;
    --gray-700: #2e2e2e;
    --gray-500: #5a5a5a;
    --gray-300: #e0e0e0;
    --white: #ffffff;
    --shadow-sm: 0 2px 6px rgba(0,0,0,0.06);
    --shadow-md: 0 6px 20px rgba(0,0,0,0.12);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.25);
    --radius: 6px;
    --container-w: 1180px;
    --header-h: 72px;
    --transition: 0.25s ease;
}

/* ---------- Reset / Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
    color: var(--charcoal);
    background: var(--cream-50);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-700); text-decoration: none; transition: color var(--transition); }
a:hover, a:focus { color: var(--sand-700); }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4 {
    font-family: "Montserrat", sans-serif;
    font-weight: 700;
    line-height: 1.15;
    color: var(--green-900);
    margin: 0 0 .6em;
    letter-spacing: 0.01em;
    text-transform: uppercase;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
:focus-visible {
    outline: 3px solid var(--sand-500);
    outline-offset: 2px;
    border-radius: 3px;
}

/* ---------- Layout helpers ---------- */
.container {
    width: 100%;
    max-width: var(--container-w);
    margin: 0 auto;
    padding: 0 1.25rem;
}
.container.narrow { max-width: 760px; }
.section {
    padding: clamp(3rem, 7vw, 5.5rem) 0;
}
.section-light { background: var(--cream-50); }
.section-dark  { background: var(--cream-100); }
.section-intro {
    max-width: 720px;
    color: var(--gray-700);
    font-size: 1.05rem;
    margin-bottom: 2.5rem;
}
.lede {
    font-size: 1.15rem;
    color: var(--gray-700);
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    padding: 0.85rem 1.6rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    border: 2px solid transparent;
    transition: all var(--transition);
    text-align: center;
    line-height: 1.2;
    cursor: pointer;
}
.btn-sm { padding: 0.55rem 1.05rem; font-size: 0.9rem; }
.btn-primary {
    background: var(--green-700);
    color: var(--white);
    border-color: var(--green-700);
}
.btn-primary:hover, .btn-primary:focus {
    background: var(--green-900);
    border-color: var(--green-900);
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}
.btn-secondary {
    background: transparent;
    color: var(--cream-50);
    border-color: var(--cream-50);
}
.btn-secondary:hover, .btn-secondary:focus {
    background: var(--cream-50);
    color: var(--green-900);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* ---------- Header / Nav ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: saturate(180%) blur(10px);
    -webkit-backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--gray-300);
}
.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: var(--header-h);
    gap: 1rem;
}
.brand {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.brand-logo {
    height: 48px;
    width: auto;
}
.primary-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.primary-nav a {
    color: var(--gray-700);
    font-weight: 500;
    font-size: 0.97rem;
}
.primary-nav a.btn { color: var(--white); }
.primary-nav a:hover { color: var(--green-700); }

.nav-toggle {
    display: none;
    background: transparent;
    border: 0;
    width: 44px;
    height: 44px;
    padding: 10px;
    flex-direction: column;
    justify-content: space-between;
}
.nav-toggle span {
    display: block;
    height: 3px;
    background: var(--green-900);
    border-radius: 2px;
    transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    min-height: clamp(480px, 80vh, 740px);
    display: flex;
    align-items: center;
    color: var(--cream-50);
    background: #111 url('hero2.jpg') center/cover no-repeat;
    overflow: hidden;
}
.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.25);
    z-index: 0;
}
.hero-content {
    position: relative;
    z-index: 1;
    padding: 2.5rem 3rem;
    max-width: 820px;
    text-align: center;
    margin: 0 auto;
    background: none;
}
.hero-logo {
    width: clamp(320px, 55vw, 580px);
    height: auto;
    margin: 0 auto 1.5rem;
    display: block;
    filter: drop-shadow(0 2px 10px rgba(0,0,0,0.3));
}
.hero-sub {
    font-family: "Montserrat", sans-serif;
    font-size: 1.15rem;
    margin-bottom: 1rem;
    color: #fff;
    text-shadow: 0 1px 6px rgba(0,0,0,0.7), 0 0 2px rgba(0,0,0,0.8);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}
.hero-stat {
    text-align: center;
}
.hero-stat-num {
    display: block;
    font-family: "Montserrat", sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--cream-50);
    line-height: 1;
    text-shadow: 0 1px 6px rgba(0,0,0,0.7), 0 0 2px rgba(0,0,0,0.8);
}
.hero-stat-label {
    display: block;
    font-family: "Montserrat", sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255,255,255,0.92);
    margin-top: 0.3rem;
    text-shadow: 0 1px 4px rgba(0,0,0,0.7);
}
.hero-divider {
    width: 60px;
    height: 2px;
    background: var(--sand-500);
    margin: 0 auto 2rem;
    border: none;
}
.hero-cta {
    display: flex;
    gap: 0.85rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* ---------- Stats ---------- */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-top: 2.5rem;
}
.stat {
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    padding: 1.5rem 1rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
}
.stat-num {
    display: block;
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--green-700);
    line-height: 1;
}
.stat-label {
    display: block;
    margin-top: .4rem;
    color: var(--gray-500);
    font-size: .9rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ---------- Fine print ---------- */
.fine-print {
    text-align: center;
    color: var(--gray-500);
    font-size: 0.92rem;
    margin-top: 1.5rem;
}

/* ---------- Property Sections ---------- */
.property-section {
    margin-bottom: 3rem;
}
.property-section:last-of-type {
    margin-bottom: 1.5rem;
}
.property-section h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
}
.property-desc {
    color: var(--gray-700);
    font-size: 1.02rem;
    margin-bottom: 1.2rem;
    max-width: 700px;
}

/* ---------- Gallery ---------- */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 0.75rem;
}
.gallery-item {
    position: relative;
    border: 0;
    padding: 0;
    margin: 0;
    background: var(--gray-300);
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 4 / 3;
    cursor: default;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.4s ease,
                z-index 0s;
    z-index: 1;
}
.gallery-item:hover {
    transform: scale(1.45);
    box-shadow: 0 16px 48px rgba(0,0,0,0.35);
    z-index: 10;
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* Hover overlay with caption */
.gallery-item::after {
    content: attr(data-caption);
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2.5rem 0.9rem 0.75rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: var(--cream-50);
    font-family: "Montserrat", sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    pointer-events: none;
}
.gallery-item:hover::after,
.gallery-item:focus::after {
    transform: translateY(0);
}
/* On touch devices: show caption always, no expand */
@media (hover: none) {
    .gallery-item::after {
        transform: translateY(0);
        padding-top: 1.5rem;
        font-size: 0.72rem;
        background: linear-gradient(transparent 0%, rgba(0,0,0,0.6) 40%);
    }
    .gallery-item:hover {
        transform: none;
        box-shadow: none;
    }
}

/* Mobile carousel */
@media (max-width: 600px) {
    .gallery {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 0;
        scrollbar-width: none;
        padding-bottom: 0.5rem;
    }
    .gallery::-webkit-scrollbar { display: none; }
    .gallery-item {
        flex: 0 0 100%;
        scroll-snap-align: center;
        border-radius: var(--radius);
        aspect-ratio: 4 / 3;
    }
    .gallery-item:hover {
        transform: none;
        box-shadow: none;
        z-index: 1;
    }
    .gallery-dots {
        display: flex;
        justify-content: center;
        gap: 0.5rem;
        padding: 0.75rem 0 0.25rem;
    }
    .gallery-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: var(--gray-300);
        border: none;
        padding: 0;
        cursor: pointer;
        transition: background 0.25s ease;
    }
    .gallery-dot.active {
        background: var(--green-700);
    }
}
@media (min-width: 601px) {
    .gallery-dots { display: none; }
}

/* ---------- Two-column (Area) ---------- */
.two-col {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}
@media (min-width: 760px) {
    .two-col { grid-template-columns: 1.1fr 0.9fr; gap: 3rem; }
}
.attractions {
    list-style: none;
    padding: 0;
    margin: 0;
}
.attractions li {
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--gray-300);
    color: var(--gray-700);
}
.attractions li:last-child { border-bottom: 0; }
.attractions strong { color: var(--green-900); }

/* ---------- Calendar Widget ---------- */
.calendar-widget {
    margin-bottom: 2rem;
}
.calendar-loading {
    text-align: center;
    padding: 3rem;
    color: var(--gray-500);
    font-size: 1rem;
}
.calendar-grid-wrap {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}
.calendar-month {
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
}
.calendar-month-header {
    text-align: center;
    font-family: "Montserrat", sans-serif;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--green-900);
    margin-bottom: 0.75rem;
}
.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 4px;
}
.calendar-weekday {
    text-align: center;
    font-family: "Montserrat", sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-500);
    padding: 0.3rem 0;
}
.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}
.calendar-day {
    text-align: center;
    padding: 0.5rem 0.2rem;
    font-size: 0.88rem;
    border-radius: 4px;
    color: var(--charcoal);
}
.calendar-day.empty {
    visibility: hidden;
}
.calendar-day.available {
    background: rgba(22, 73, 42, 0.08);
    color: var(--green-700);
    font-weight: 600;
}
.calendar-day.booked {
    background: var(--cream-100);
    color: var(--gray-500);
    text-decoration: line-through;
    opacity: 0.6;
}
.calendar-day.past {
    color: var(--gray-300);
}
.calendar-legend {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1.25rem;
    font-size: 0.82rem;
    color: var(--gray-500);
}
.calendar-legend span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.legend-swatch {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 3px;
}
.legend-swatch.available { background: rgba(22, 73, 42, 0.15); }
.legend-swatch.booked { background: var(--cream-100); }
.calendar-fallback {
    text-align: center;
    padding: 2rem;
    color: var(--gray-700);
}
.calendar-fallback p {
    margin-bottom: 1rem;
}
.cta-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}
.cta-row .btn-secondary {
    color: var(--green-700);
    border-color: var(--green-700);
}
.cta-row .btn-secondary:hover {
    background: var(--green-700);
    color: var(--white);
}

/* ---------- Contact form ---------- */
.contact-form {
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
}
.field { margin-bottom: 1.1rem; }
.field-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.1rem;
}
@media (min-width: 540px) {
    .field-row { grid-template-columns: 1fr 1fr; }
}
.field label {
    display: block;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.35rem;
    font-size: 0.95rem;
}
.field input,
.field textarea {
    width: 100%;
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font: inherit;
    color: var(--charcoal);
    background: var(--cream-50);
    transition: border-color var(--transition), box-shadow var(--transition);
}
.field input:focus,
.field textarea:focus {
    outline: 0;
    border-color: var(--green-700);
    box-shadow: 0 0 0 3px rgba(45,74,53,0.15);
}
.field textarea { resize: vertical; min-height: 120px; }
.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ---------- Footer ---------- */
.site-footer {
    background: var(--green-900);
    color: var(--cream-100);
    padding: 3rem 0 1.5rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}
@media (min-width: 700px) {
    .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}
.site-footer h4 {
    color: var(--cream-50);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.8rem;
}
.site-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.site-footer li { margin-bottom: 0.4rem; }
.site-footer a {
    color: var(--cream-100);
    font-size: 0.95rem;
}
.site-footer a:hover {
    color: var(--sand-500);
}
.footer-logo {
    width: 180px;
    height: auto;
    margin-bottom: 0.8rem;
}
.footer-tag {
    color: var(--cream-100);
    font-size: 0.95rem;
    max-width: 320px;
}
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.12);
    padding-top: 1.2rem;
    text-align: center;
    color: rgba(255,255,255,0.6);
    font-size: 0.85rem;
}

/* ---------- Mobile sticky book bar ---------- */
.mobile-book-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--cream-50);
    padding: 0.75rem 1rem;
    box-shadow: 0 -4px 16px rgba(0,0,0,0.15);
    z-index: 90;
    border-top: 1px solid var(--gray-300);
}
.mobile-book-bar .btn {
    display: block;
    width: 100%;
}

/* ---------- Lightbox ---------- */

/* ---------- Parallax Dividers ---------- */
.parallax-divider {
    position: relative;
    min-height: clamp(320px, 50vh, 480px);
    display: flex;
    align-items: center;
    justify-content: center;
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* NOTE: do NOT add overflow:hidden or transform here — both break background-attachment:fixed */
}
.parallax-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.32) 0%,
        rgba(0, 0, 0, 0.12) 50%,
        rgba(0, 0, 0, 0.32) 100%
    );
}
.parallax-text {
    position: relative;
    z-index: 1;
    text-align: center;
    color: var(--cream-50);
}
.parallax-text h2 {
    font-family: "Montserrat", sans-serif;
    color: var(--cream-50);
    font-size: clamp(2rem, 5vw, 3.4rem);
    font-weight: 800;
    text-shadow: 0 3px 30px rgba(0,0,0,0.5);
    margin: 0;
    letter-spacing: 0.01em;
}
.parallax-label {
    display: block;
    font-family: "Montserrat", sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--sand-500);
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

/* Individual parallax backgrounds */
.parallax-oldmans {
    background-image: url('https://upload.wikimedia.org/wikipedia/commons/thumb/5/5d/Old_Mans_Cave_5.jpg/1920px-Old_Mans_Cave_5.jpg');
}
.parallax-ash {
    background-image: url('https://upload.wikimedia.org/wikipedia/commons/thumb/3/3e/Ash_Cave_-_Hocking_Hills_State_Park.jpg/1920px-Ash_Cave_-_Hocking_Hills_State_Park.jpg');
}
.parallax-cedar {
    background-image: url('https://upload.wikimedia.org/wikipedia/commons/thumb/6/6b/Cedar_Falls_%2823410%29.jpg/1280px-Cedar_Falls_%2823410%29.jpg');
}
.parallax-conkles {
    background-image: url('https://upload.wikimedia.org/wikipedia/commons/thumb/a/a0/Conkle%27s_Hollow_Gorge_Head.jpg/1920px-Conkle%27s_Hollow_Gorge_Head.jpg');
}

/* ---------- Scroll-triggered fade-in ---------- */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}
/* Parallax dividers must NEVER get transform — it breaks background-attachment:fixed */
.parallax-divider.fade-in {
    transform: none;
}
.parallax-divider.fade-in.visible {
    transform: none;
}

/* ---------- Scrolled header ---------- */
.site-header.scrolled {
    box-shadow: 0 2px 16px rgba(0,0,0,0.1);
}

/* ---------- Photo Credits ---------- */
.photo-credits {
    display: block;
    margin-top: 0.6rem;
    font-size: 0.72rem;
    line-height: 1.5;
    color: rgba(255,255,255,0.4);
}

/* ---------- Mobile breakpoints ---------- */
@media (max-width: 880px) {
    .nav-toggle { display: flex; }
    .primary-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--cream-50);
        border-bottom: 1px solid var(--gray-300);
        padding: 0 1.25rem;
        box-shadow: var(--shadow-md);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s ease;
    }
    .primary-nav.open {
        max-height: 600px;
        padding: 1rem 1.25rem 1.5rem;
    }
    .primary-nav ul {
        flex-direction: column;
        align-items: stretch;
        gap: 0.25rem;
    }
    .primary-nav li {
        border-bottom: 1px solid var(--gray-300);
    }
    .primary-nav li:last-child { border-bottom: 0; padding-top: 0.6rem; }
    .primary-nav a {
        display: block;
        padding: 0.85rem 0.25rem;
    }
    .primary-nav a.btn {
        text-align: center;
        padding: 0.85rem 1rem;
    }
}

@media (max-width: 600px) {
    .mobile-book-bar { display: block; }
    main { padding-bottom: 80px; }
    .hero-cta .btn { flex: 1 1 100%; }
    .contact-form { padding: 1.4rem; }
    .parallax-divider {
        background-attachment: scroll;
        min-height: 260px;
    }
}

/* iOS doesn't support background-attachment: fixed */
@supports (-webkit-touch-callout: none) {
    .parallax-divider { background-attachment: scroll; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
