/* ============================================================
   Rooms & Guest House page — layered on top of styles.css
   Uses the shared :root tokens (var(--forest), --cream, etc.)
   ============================================================ */

/* ---------- Page intro ---------- */
.rooms-intro { background: var(--cream-soft); border-bottom: 1px solid var(--rule); }
.rooms-intro .wrap { padding-block: clamp(40px, 6vw, 72px); }
.rooms-intro .eyebrow { margin-bottom: 14px; }
.rooms-intro h1 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(34px, 5.2vw, 58px); line-height: 1.04;
  letter-spacing: -0.01em; margin: 0; color: var(--ink); max-width: 16ch;
}
.rooms-intro h1 em { font-style: italic; color: var(--sienna); }
.rooms-intro p {
  margin: 20px 0 0; max-width: 60ch; color: var(--muted);
  font-size: clamp(15px, 1.5vw, 17px); line-height: 1.65; text-wrap: pretty;
}

/* ---------- Segmented toggle ---------- */
.switcher { background: var(--paper); border-bottom: 1px solid var(--rule); }
.switcher .wrap {
  padding-block: 28px; display: flex; justify-content: center;
  position: sticky; top: 0;
}
.seg {
  display: inline-flex; gap: 6px; padding: 6px;
  background: var(--cream); border: 1px solid var(--rule);
  border-radius: 999px;
}
.seg button {
  display: inline-flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 12px 30px; border-radius: 999px;
  font-family: var(--sans); font-weight: 600; font-size: 14px;
  letter-spacing: 0.04em; color: var(--ink-soft);
  transition: background .25s, color .25s, box-shadow .25s;
  white-space: nowrap;
}
.seg button small {
  font-weight: 500; font-size: 11px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--muted); transition: color .25s;
}
.seg button[aria-selected="true"] {
  background: var(--forest); color: var(--cream-soft);
  box-shadow: 0 10px 22px -12px rgba(31,48,36,0.7);
}
.seg button[aria-selected="true"] small { color: rgba(245,239,228,0.7); }

/* ---------- Featured panel (top, swaps with toggle) ---------- */
.feature { background: var(--paper); }
.feature .wrap { padding-block: clamp(36px, 5vw, 64px); }
.panel { display: none; }
.panel.is-active { display: block; animation: fadeUp .45s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.feature-grid {
  display: grid; grid-template-columns: 1.45fr 1fr;
  gap: clamp(20px, 3vw, 40px); align-items: stretch;
}
.feature-hero {
  position: relative; min-height: clamp(300px, 42vw, 520px);
  border: 1px solid var(--rule); overflow: hidden;
}
.feature-hero .ph {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px; text-align: center;
  color: var(--muted); padding: 16px;
  background:
    repeating-linear-gradient(135deg, rgba(0,0,0,0.025) 0 14px, transparent 14px 28px),
    linear-gradient(160deg, var(--cream) 0%, #e9e0cf 100%);
}
.feature-hero .ph svg { opacity: 0.5; }
.feature-hero .ph .fn {
  font-family: var(--sans); font-size: 11px; letter-spacing: 0.04em;
  color: var(--muted); opacity: 0.85; word-break: break-all;
}
.feature-hero img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block; z-index: 1;
}
.feature-side {
  display: grid; grid-template-rows: 1fr 1fr; gap: clamp(20px, 3vw, 40px);
}
.feature-side .feature-hero { min-height: 0; }

.feature-copy {
  align-self: center; padding: 4px 0;
}
.feature-copy .kicker {
  font-family: var(--sans); font-size: 12px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--sienna);
}
.feature-copy h2 {
  font-family: var(--serif); font-weight: 600; font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.08; margin: 12px 0 0; color: var(--ink);
}
.feature-copy p {
  margin: 16px 0 0; color: var(--muted); font-size: 16px; line-height: 1.65;
  max-width: 46ch; text-wrap: pretty;
}
.feature-stats {
  display: flex; gap: 30px; margin-top: 24px; flex-wrap: wrap;
}
.feature-stats .n {
  font-family: var(--serif); font-size: 32px; font-weight: 600; color: var(--forest); line-height: 1;
}
.feature-stats .l {
  font-family: var(--sans); font-size: 12px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted); margin-top: 6px;
}
.feature-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.btn-primary, .btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--sans); font-size: 13px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; padding: 15px 26px;
  border: 1px solid var(--forest); transition: background .2s, color .2s;
}
.btn-primary { background: var(--forest); color: var(--cream-soft); }
.btn-primary:hover { background: var(--forest-deep); }
.btn-ghost { background: transparent; color: var(--forest); }
.btn-ghost:hover { background: var(--forest); color: var(--cream-soft); }

/* ---------- Gallery grid (swaps with toggle) ---------- */
.gallery-sec { background: var(--cream-soft); border-top: 1px solid var(--rule); }
.gallery-sec .wrap { padding-block: clamp(40px, 6vw, 72px); }
.gallery-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; margin-bottom: 28px; flex-wrap: wrap;
}
.gallery-head h2 {
  font-family: var(--serif); font-weight: 600; font-size: clamp(24px, 3vw, 36px);
  margin: 0; color: var(--ink);
}
.gallery-head .eyebrow { margin-bottom: 8px; }
.gallery-head .count {
  font-family: var(--sans); font-size: 13px; color: var(--muted);
  letter-spacing: 0.04em;
}

.grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(12px, 1.4vw, 18px);
}
.tile {
  position: relative; aspect-ratio: 4 / 3; overflow: hidden;
  border: 1px solid var(--rule); background: var(--cream);
  cursor: pointer; display: block; width: 100%; padding: 0;
  transition: transform .3s ease, box-shadow .3s ease;
}
.tile:hover { transform: translateY(-3px); box-shadow: 0 18px 34px -20px rgba(28,26,22,0.5); }
.tile:focus-visible { outline: 3px solid var(--sienna); outline-offset: 2px; }

/* placeholder layer (always present, sits behind the photo) */
.tile .ph {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px; text-align: center;
  background:
    repeating-linear-gradient(135deg, rgba(0,0,0,0.025) 0 14px, transparent 14px 28px),
    linear-gradient(160deg, var(--cream) 0%, #e9e0cf 100%);
  color: var(--muted); padding: 16px;
}
.tile .ph svg { opacity: 0.5; }
.tile .ph .fn {
  font-family: var(--sans); font-size: 11px; letter-spacing: 0.04em;
  color: var(--muted); opacity: 0.85; word-break: break-all;
}
/* real photo layer */
.tile img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block; z-index: 1;
}
/* expand hint glyph */
.tile .zoom {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(28,26,22,0.55); color: #fff;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: scale(.85); transition: opacity .25s, transform .25s;
}
.tile:hover .zoom, .tile:focus-visible .zoom { opacity: 1; transform: none; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  display: none; align-items: center; justify-content: center;
  background: rgba(15,14,11,0.92); padding: clamp(12px, 4vw, 48px);
  opacity: 0; transition: opacity .2s ease;
}
.lightbox.open { display: flex; opacity: 1; }
.lb-stage {
  position: relative; max-width: 1100px; width: 100%;
  max-height: 100%; display: flex; flex-direction: column; align-items: center;
}
.lb-frame {
  position: relative; width: 100%; aspect-ratio: 3 / 2;
  max-height: 78vh; background: #1c1a16; overflow: hidden;
  border: 1px solid rgba(245,239,228,0.16);
}
.lb-frame img { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: contain; display: block; }
.lb-frame .ph {
  position: absolute; inset: 0; z-index: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px; color: rgba(245,239,228,0.55);
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,0.02) 0 16px, transparent 16px 32px),
    linear-gradient(160deg, #2a2620, #1c1a16);
}
.lb-frame .ph .fn { font-family: var(--sans); font-size: 12px; letter-spacing: 0.04em; }
.lb-count {
  margin-top: 16px; color: rgba(245,239,228,0.6); font-family: var(--sans);
  font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; text-align: center;
}
.lb-btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(245,239,228,0.1); border: 1px solid rgba(245,239,228,0.22);
  color: var(--cream-soft); display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background .2s;
}
.lb-btn:hover { background: rgba(245,239,228,0.22); }
.lb-prev { left: clamp(-8px, -2vw, 8px); }
.lb-next { right: clamp(-8px, -2vw, 8px); }
.lb-close {
  position: absolute; top: clamp(10px, 3vw, 24px); right: clamp(10px, 3vw, 24px);
  z-index: 4; width: 46px; height: 46px; border-radius: 50%;
  background: rgba(245,239,228,0.1); border: 1px solid rgba(245,239,228,0.22);
  color: var(--cream-soft); display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background .2s;
}
.lb-close:hover { background: rgba(245,239,228,0.22); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .feature-grid { grid-template-columns: 1fr; }
  .feature-side { grid-template-rows: none; grid-template-columns: 1fr 1fr; }
  .grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .switcher .wrap { padding-block: 18px; }
  .seg { width: 100%; }
  .seg button { flex: 1; padding: 11px 8px; }
  .feature-side { grid-template-columns: 1fr 1fr; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .lb-btn { width: 44px; height: 44px; }
  .lb-prev { left: 2px; } .lb-next { right: 2px; }
}
