/* ============================================================
   White Pine Lodge — Design Tokens
   Palette: pine, cedar, parchment, amber, slate, ink
   Type: Fraunces (display) / Inter (body) / JetBrains Mono (data)
   Signature: hand-drawn topographic contour lines throughout,
   echoing the elevation map of Island Park itself.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --pine: #24332A;
  --pine-light: #3A4F40;
  --cedar: #6B4A32;
  --parchment: #EDE6D6;
  --parchment-dark: #E1D8C3;
  --amber: #B5652D;
  --amber-light: #D68A4E;
  --slate: #4F6E76;
  --ink: #231F1C;
  --white: #FBF9F4;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --max-width: 1180px;
  --radius: 3px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--parchment);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
}

/* -------------------- Contour motif -------------------- */
/* Reused as a background texture and as a section divider.
   Represents the topo lines of the Island Park caldera. */
.contour-divider {
  width: 100%;
  height: 48px;
  display: block;
  color: var(--pine);
  opacity: 0.35;
}
.contour-divider.on-dark { color: var(--parchment); opacity: 0.25; }

/* -------------------- Header / Nav -------------------- */
/* -------------------- Announcement banner -------------------- */
.announce-bar {
  background: var(--cedar);
  color: var(--parchment);
  text-align: center;
  padding: 11px 44px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  position: relative;
}
.announce-close {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--parchment);
  opacity: 0.65;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 4px;
}
.announce-close:hover { opacity: 1; }
.announce-bar.hidden { display: none; }
@media (max-width: 640px) {
  .announce-bar { font-size: 0.72rem; padding: 10px 36px; }
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--pine);
  border-bottom: 1px solid rgba(237,230,214,0.12);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  max-width: var(--max-width);
  margin: 0 auto;
}
.brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  color: var(--parchment);
  letter-spacing: 0.01em;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.brand .eyebrow {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber-light);
  font-weight: 500;
}
.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  font-size: 0.92rem;
  font-weight: 500;
}
.nav-links a {
  color: var(--parchment);
  opacity: 0.8;
  transition: opacity 0.15s ease;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
}
.nav-links a:hover, .nav-links a.active {
  opacity: 1;
  border-bottom-color: var(--amber-light);
}
.nav-toggle { display: none; }

@media (max-width: 720px) {
  .nav-links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--pine);
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .nav-links.open { max-height: 320px; }
  .nav-links a { display: block; padding: 14px 32px; border-bottom: 1px solid rgba(237,230,214,0.08); }
  .nav-toggle {
    display: block;
    background: none;
    border: none;
    color: var(--parchment);
    font-size: 1.4rem;
    cursor: pointer;
  }
}

/* -------------------- Buttons -------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 13px 26px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-amber { background: var(--amber); color: var(--white); }
.btn-amber:hover { background: var(--amber-light); }
.btn-outline { border-color: var(--parchment); color: var(--parchment); }
.btn-outline:hover { background: rgba(237,230,214,0.1); }
.btn-slate { background: var(--slate); color: var(--white); }
.btn-row { display: flex; gap: 14px; flex-wrap: wrap; }

/* -------------------- Hero -------------------- */
.hero {
  position: relative;
  background: linear-gradient(180deg, var(--pine) 0%, #1c2721 100%);
  color: var(--parchment);
  padding: 96px 0 72px;
  overflow: hidden;
}
.hero .wrap { position: relative; z-index: 2; }
.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--amber-light);
  margin-bottom: 18px;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5.5vw, 4.4rem);
  font-weight: 600;
  line-height: 1.05;
  max-width: 14ch;
  margin-bottom: 20px;
}
.hero p.lede {
  font-size: 1.15rem;
  max-width: 46ch;
  opacity: 0.85;
  margin-bottom: 36px;
}
.hero-stats {
  display: flex;
  gap: 36px;
  margin-top: 56px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
}
.hero-stats div { font-size: 0.78rem; letter-spacing: 0.05em; color: rgba(237,230,214,0.6); text-transform: uppercase; }
.hero-stats strong { display: block; font-family: var(--font-display); font-size: 1.6rem; color: var(--parchment); font-weight: 600; letter-spacing: 0; text-transform: none; }

/* On light backgrounds (e.g. the "Before you book" grid), the hero-stats
   label text needs to be dark instead of the light-on-dark hero default. */
.good-to-know-grid .hero-stats div { color: var(--ink); }
.good-to-know-grid .hero-stats strong { color: var(--pine); }

.hero-topo {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0.16;
  pointer-events: none;
}

.hero-house {
  position: absolute;
  right: -4%;
  bottom: -6%;
  width: min(62%, 720px);
  z-index: 1;
  opacity: 0.16;
  filter: invert(1);
  mix-blend-mode: screen;
  pointer-events: none;
  user-select: none;
}
@media (max-width: 720px) {
  .hero-house { width: 88%; right: -10%; bottom: -4%; opacity: 0.12; }
}

/* -------------------- Sections -------------------- */
section { padding: 76px 0; }
.section-alt { background: var(--white); }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 12px;
}
h2.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 600;
  color: var(--pine);
  max-width: 20ch;
  margin-bottom: 18px;
}
.section-lede { max-width: 60ch; color: var(--cedar); font-size: 1.05rem; margin-bottom: 44px; }

/* -------------------- About / feature grid -------------------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: start;
}
.about-grid p { margin-bottom: 16px; color: var(--ink); }
.amenity-list { list-style: none; display: grid; gap: 12px; }
.amenity-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 0.95rem;
  padding: 12px 0;
  border-bottom: 1px solid var(--parchment-dark);
}
.amenity-list .mark { color: var(--amber); font-family: var(--font-mono); font-size: 0.8rem; padding-top: 2px; }

@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; }
}

/* -------------------- Photo grid (home teaser) -------------------- */
.photo-teaser {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 8px;
}
.photo-teaser .ph {
  aspect-ratio: 1;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--pine-light);
  cursor: pointer;
}
.photo-teaser .ph img { transition: transform 0.3s ease; }
.photo-teaser .ph:hover img { transform: scale(1.05); }
.photo-teaser .ph:first-child { grid-column: span 2; grid-row: span 2; aspect-ratio: 1; }
.ph img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 720px) {
  .photo-teaser { grid-template-columns: repeat(2, 1fr); }
  .photo-teaser .ph:first-child { grid-column: span 2; }
}

/* -------------------- Reviews -------------------- */
.review-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.review-card {
  background: var(--pine);
  color: var(--parchment);
  padding: 28px;
  border-radius: var(--radius);
  position: relative;
}
.review-card .stars { color: var(--amber-light); font-family: var(--font-mono); font-size: 0.85rem; margin-bottom: 14px; letter-spacing: 0.1em; }
.review-card p.quote { font-family: var(--font-display); font-size: 1.05rem; line-height: 1.5; margin-bottom: 18px; font-weight: 500; }
.review-card .attrib { font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--amber-light); }
@media (max-width: 860px) { .review-strip { grid-template-columns: 1fr; } }

/* Review carousel: wraps N pages of review-strip, one page visible at a time */
.review-carousel {
  position: relative;
  padding: 0 8px;
}
.rc-viewport {
  overflow: hidden;
  width: 100%;
}
.rc-track {
  display: flex;
  flex-wrap: nowrap;
  width: 100%;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}
.rc-page {
  min-width: 100%;
  max-width: 100%;
  flex: 1 0 100%;
}
.rc-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--amber);
  color: var(--white);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, transform 0.15s ease;
  box-shadow: 0 6px 18px rgba(35,31,28,0.28);
  z-index: 5;
}
.rc-arrow:hover { background: var(--amber-light); transform: translateY(-50%) scale(1.06); }
.rc-arrow[disabled] { opacity: 0.35; cursor: default; pointer-events: none; }
.rc-prev { left: -24px; }
.rc-next { right: -24px; }
.rc-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
}
.rc-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--parchment-dark);
  border: none;
  cursor: pointer;
  padding: 0;
}
.rc-dot.active { background: var(--amber); }
@media (max-width: 640px) {
  .review-carousel { padding: 0 4px; }
  .rc-arrow { width: 40px; height: 40px; font-size: 1.2rem; }
  .rc-prev { left: -14px; }
  .rc-next { right: -14px; }
}

/* -------------------- Booking CTA -------------------- */
.booking-cta {
  background: var(--cedar);
  color: var(--white);
  padding: 56px 0;
  text-align: center;
}
.booking-cta h2 { font-family: var(--font-display); font-size: 2rem; margin-bottom: 10px; }
.booking-cta p { opacity: 0.85; margin-bottom: 28px; }
.booking-cta .btn-row { justify-content: center; }

/* -------------------- Gallery page -------------------- */
.gallery-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.filter-btn {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 8px 16px;
  border: 1px solid var(--cedar);
  border-radius: 999px;
  background: transparent;
  color: var(--cedar);
  cursor: pointer;
}
.filter-btn.active, .filter-btn:hover { background: var(--cedar); color: var(--white); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.gallery-grid .g-item {
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4/3;
  background: var(--pine-light);
  position: relative;
}
.gallery-grid .g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.gallery-grid .g-item:hover img { transform: scale(1.05); }
.gallery-grid .g-item .cap {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.6), transparent);
  color: var(--white); font-size: 0.78rem; padding: 20px 12px 10px;
  font-family: var(--font-mono);
}
@media (max-width: 720px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; background: rgba(24,20,18,0.92);
  display: none; align-items: center; justify-content: center;
  z-index: 200; padding: 24px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 82vh; border-radius: var(--radius); }
.lightbox .lb-close, .lightbox .lb-prev, .lightbox .lb-next {
  position: absolute; background: none; border: none; color: var(--parchment);
  font-size: 1.8rem; cursor: pointer; padding: 12px;
}
.lightbox .lb-close { top: 16px; right: 24px; }
.lightbox .lb-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 8px; top: 50%; transform: translateY(-50%); }

/* -------------------- Explore / map page -------------------- */
.explore-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 0;
  height: 640px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--parchment-dark);
  /* Leaflet's internal panes/controls/popups use z-index values up to ~700.
     Without a stacking context here, those can render above the sticky
     header (z-index: 50) once the page is scrolled. Establishing a new
     stacking context on this wrapper contains all of Leaflet's internal
     z-indexes inside it, so nothing it draws can escape above the header. */
  position: relative;
  z-index: 0;
}
#poi-map { width: 100%; height: 100%; background: var(--pine-light); }
.poi-list {
  background: var(--white);
  overflow-y: auto;
  border-right: 1px solid var(--parchment-dark);
}
.poi-cat-toggle {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 16px;
  border-bottom: 1px solid var(--parchment-dark);
  position: sticky; top: 0; background: var(--white); z-index: 5;
}
.poi-card {
  padding: 16px 18px;
  border-bottom: 1px solid var(--parchment-dark);
  cursor: pointer;
  transition: background 0.15s ease;
}
.poi-card:hover, .poi-card.active { background: var(--parchment); }
.poi-card .cat-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}
.poi-card .cat-tag {
  font-family: var(--font-mono); font-size: 0.62rem; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--amber); background: var(--parchment);
  border-radius: 999px; padding: 2px 8px; display: inline-block;
}
.poi-card h4 { font-family: var(--font-display); font-size: 1.02rem; color: var(--pine); margin-bottom: 4px; }
.poi-card p { font-size: 0.85rem; color: var(--cedar); }
.poi-card .dist { font-family: var(--font-mono); font-size: 0.72rem; color: var(--slate); margin-top: 6px; }

.poi-links, .leaflet-popup-content .poi-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.poi-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 5px 10px;
  border: 1px solid var(--slate);
  border-radius: 999px;
  color: var(--slate);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.poi-link:hover { background: var(--slate); color: var(--white); }

@media (max-width: 860px) {
  .explore-layout { grid-template-columns: 1fr; height: auto; }
  #poi-map { height: 380px; }
  .poi-list { max-height: 420px; border-right: none; border-top: 1px solid var(--parchment-dark); }
}

/* -------------------- Contact page -------------------- */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
}
.contact-info .item { margin-bottom: 26px; }
.contact-info .label {
  font-family: var(--font-mono); font-size: 0.7rem; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--amber); margin-bottom: 6px;
}
.contact-info .val { font-family: var(--font-display); font-size: 1.2rem; color: var(--pine); }

.form-field { margin-bottom: 20px; }
.form-field label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; color: var(--pine); }
.form-field input, .form-field textarea {
  width: 100%; font-family: var(--font-body); font-size: 0.95rem;
  padding: 12px 14px; border: 1px solid var(--parchment-dark); border-radius: var(--radius);
  background: var(--white); color: var(--ink);
}
.form-field input:focus, .form-field textarea:focus { outline: 2px solid var(--amber); outline-offset: 1px; }
.form-field textarea { min-height: 130px; resize: vertical; }
.form-note { font-size: 0.8rem; color: var(--cedar); margin-top: 8px; }

@media (max-width: 860px) { .contact-layout { grid-template-columns: 1fr; } }

/* -------------------- Footer -------------------- */
footer {
  background: var(--pine);
  color: var(--parchment);
  padding: 48px 0 28px;
}
footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 24px; align-items: center; }
footer .foot-links { display: flex; gap: 24px; list-style: none; font-size: 0.85rem; opacity: 0.75; }
footer .foot-brand { font-family: var(--font-display); font-size: 1.1rem; }
footer .copyright { font-family: var(--font-mono); font-size: 0.7rem; opacity: 0.5; margin-top: 24px; text-align: center; }

/* -------------------- Focus visibility -------------------- */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
