/* Boise's Gem — one stylesheet for every page. Mobile first: base styles are for
   phones; the min-width blocks at the bottom widen the layout on bigger screens. */

:root {
  --ink: #1f2a2e;        /* body text: 14:1 contrast on --paper */
  --muted: #4a5a60;      /* secondary text: 7:1 on --paper */
  --paper: #fdfbf7;
  --panel: #f1ece2;
  --accent: #0b5c63;     /* deep teal: 7.5:1 on white, used for links and buttons */
  --accent-dark: #083f44;
  --line: #d9d2c3;
  --radius: 10px;
  --wrap: 68rem;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-underline-offset: 0.15em; }
a:hover { color: var(--accent-dark); }
a:focus-visible, .button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

h1, h2, h3 { line-height: 1.25; margin: 1.5em 0 0.5em; }
h1 { font-size: 2rem; margin-top: 0.5em; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 0.5rem;
  background: var(--ink);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 10;
}
.skip-link:focus { left: 0.5rem; color: #fff; }

/* Header and navigation */
.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.header-inner { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.brand {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}
.nav-list {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
}
.nav-list a { display: inline-block; padding: 0.35rem 0; text-decoration: none; }
.nav-list a:hover { text-decoration: underline; }

/* The <body data-page="..."> value marks the current page in the menu without JavaScript. */
[data-page="home"] [data-nav="home"],
[data-page="the-home"] [data-nav="the-home"],
[data-page="amenities"] [data-nav="amenities"],
[data-page="location"] [data-nav="location"],
[data-page="house-rules"] [data-nav="house-rules"],
[data-page="policies"] [data-nav="policies"],
[data-page="contact"] [data-nav="contact"] {
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

main { padding-bottom: 3rem; }

.lead { font-size: 1.2rem; color: var(--muted); }

.button {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  margin: 0.5rem 0;
}
.button:hover { background: var(--accent-dark); color: #fff; }

.facts {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}
.facts li {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  font-weight: 600;
  text-align: center;
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 1rem 0;
}

/* Photos. Every photo has two files: name-800.webp and name.webp (1600 px wide);
   the browser picks the right one from srcset/sizes. */
.hero { margin: 1rem 0 0; }
.hero img { width: 100%; border-radius: var(--radius); }

.room { margin: 2.5rem 0; }
.room h3 { margin-bottom: 0.25rem; }
.room-note { margin: 0 0 0.75rem; color: var(--muted); font-weight: 600; }
.room-lead { margin: 0 0 0.75rem; }
.room-lead img { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); }

.gallery {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  display: grid;
  grid-template-columns: 1fr;   /* one photo per row on phones, so captions stay readable */
  gap: 1rem 0.75rem;
}
.gallery figure { margin: 0; }
.gallery a, .room-lead a { display: block; }
/* Photo captions (docs/photos-manifest.json): normal text size, wrap on small screens. */
.room-lead figcaption, .gallery figcaption {
  margin-top: 0.4rem;
  overflow-wrap: anywhere;
}
/* Gallery photos are cropped to one shape so the grid lines up; select one to see all of it. */
.gallery img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: calc(var(--radius) / 2);
  border: 1px solid var(--line);
}

.promise {
  font-weight: 700;
  font-size: 1.1rem;
  background: var(--panel);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
}

.notice {
  background: #fff8e1;
  border-left: 4px solid #8a6d00;
  padding: 0.75rem 1rem;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.summary-note { font-weight: 600; margin-top: 2rem; }

.version { font-size: 0.9rem; color: var(--muted); margin-top: -0.5rem; }

.columns { list-style: none; padding: 0; }
.columns li { padding: 0.3rem 0; border-bottom: 1px solid var(--line); }

table { border-collapse: collapse; width: 100%; margin: 1rem 0; }
th, td { text-align: left; padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--line); }
th { background: var(--panel); }

.site-footer {
  background: var(--ink);
  color: #f1ece2;
  padding: 1.5rem 0;
  font-size: 0.95rem;
}
.site-footer p { margin: 0.3rem 0; }
.site-footer a { color: #fff; }

@media (min-width: 40rem) {
  h1 { font-size: 2.5rem; }
  .header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
  .nav-list { margin: 0; }
  .facts { grid-template-columns: repeat(5, 1fr); }
  .columns { columns: 2; column-gap: 2rem; }
  .columns li { break-inside: avoid; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 60rem) {
  .gallery { grid-template-columns: repeat(3, 1fr); }
}


/* Text for screen readers only. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Full-screen photo viewer (public/assets/photo-viewer.js; only on pages that load that script). */
html.pv-open, html.pv-open body { overflow: hidden; }
.pv {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  background: #111;
  color: #f5f5f5;
  height: 100vh;
  height: 100dvh;
}
.pv[hidden] { display: none; }
.pv-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  flex: none;
}
.pv-count { margin: 0; font-weight: 600; }
.pv-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  touch-action: pan-y pinch-zoom; /* horizontal swipes go to the viewer, vertical scrolling stays */
}
.pv-stage img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
}
.pv-cap {
  flex: none;
  max-height: 30vh;
  overflow-y: auto;
  margin: 0;
  padding: 0.5rem 1rem 0;
  overflow-wrap: anywhere;
  max-width: 48rem;
  align-self: center;
  width: 100%;
}
.pv-cap[hidden] { display: none; }
.pv-nav { justify-content: center; gap: 2rem; padding-bottom: max(0.75rem, env(safe-area-inset-bottom)); }
.pv button {
  min-width: 48px;
  min-height: 48px;
  padding: 0 0.9rem;
  font: inherit;
  font-size: 1.5rem;
  line-height: 1;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--radius);
  cursor: pointer;
}
.pv button:hover { background: rgba(255, 255, 255, 0.25); }
.pv button:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
@media (prefers-reduced-motion: no-preference) {
  .pv { animation: pv-fade 0.15s ease-out; }
  @keyframes pv-fade { from { opacity: 0; } to { opacity: 1; } }
}
