/* ==========================================================================
   424 Blackstone — styles.css
   Dependency-free. Design tokens first, then layout, then components.
   ========================================================================== */

:root {
  --primary: #A2845E;
  --primary-dark: #8B6F4B;
  --primary-tint: #F6F1EA;
  --text: #272B30;
  --muted: #586167;
  --faint: #8B9298;
  --line: #E7E3DD;
  --line-soft: #F0EDE8;
  --bg: #FFFFFF;
  --warm: #FAF8F5;
  --radius: 8px;
  --radius-lg: 14px;
  --wrap: 1152px;
  --header-h: 68px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
  --shadow-card: 0 2px 4px rgba(39, 43, 48, .05), 0 10px 28px rgba(39, 43, 48, .07);
}

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

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { max-width: 100%; }
img { display: block; }

h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.012em; color: var(--text); }
p { margin: 0; }
ul, ol, dl, dd { margin: 0; padding: 0; }
ul { list-style: none; }

a { color: inherit; }
a:not([class]) { color: var(--primary-dark); text-decoration: underline; text-underline-offset: 2px; }
a:not([class]):hover { color: var(--text); }

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

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

.visually-hidden, .skip-link:not(:focus) {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed; top: 10px; left: 10px; z-index: 200;
  background: #fff; color: var(--text);
  padding: 10px 16px; border-radius: var(--radius);
  box-shadow: var(--shadow-card); font-weight: 500;
}

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 500; font-size: 15px;
  padding: 11px 18px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  background: none; color: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease;
  white-space: nowrap;
}
.btn-sm { padding: 8px 16px; font-size: 14px; }

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }

.btn-outline { border-color: #CFC8BE; color: var(--text); background: #fff; }
.btn-outline:hover { border-color: var(--text); background: var(--warm); }

.btn-white {
  background: rgba(255, 255, 255, .94);
  color: var(--text);
  border-color: rgba(39, 43, 48, .1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .14);
  backdrop-filter: blur(4px);
  font-size: 14px; padding: 9px 14px;
}
.btn-white:hover { background: #fff; }

.link-btn {
  font: inherit; font-weight: 500; font-size: 15px;
  background: none; border: 0; padding: 4px 0;
  color: var(--text); cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.link-btn:hover { color: var(--primary-dark); }

/* ----------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255, 255, 255, .93);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; min-width: 0; }
.brand-mark {
  flex: none; width: 28px; height: 30px;
  background: var(--primary);
  -webkit-mask: url("../images/site-icon.png") center / contain no-repeat;
          mask: url("../images/site-icon.png") center / contain no-repeat;
}
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name {
  font-weight: 700; font-size: 17px; line-height: 1.2;
  letter-spacing: -.015em;
}
.brand-sub {
  font-size: 11.5px; line-height: 1.35; color: var(--faint);
  letter-spacing: .01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.header-nav { display: flex; align-items: center; gap: 6px; }
.header-link {
  font-size: 14.5px; color: var(--muted); text-decoration: none;
  padding: 8px 12px; border-radius: var(--radius);
}
.header-link:hover { color: var(--text); background: var(--warm); }

/* ---------------------------------------------------------------- gallery */
.gallery-section { position: relative; margin-top: 24px; }

.gallery {
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 8px;
  aspect-ratio: 2.15 / 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--line-soft);
}
.g-cell {
  position: relative; margin: 0; padding: 0; border: 0;
  background: var(--line-soft);
  overflow: hidden; cursor: pointer;
  display: block; min-width: 0; min-height: 0;
}
.g-cell:first-child { grid-row: span 2; }
.g-cell > img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s cubic-bezier(.2, .7, .3, 1), filter .2s ease;
}
.g-cell:hover > img { transform: scale(1.035); filter: brightness(.96); }
.g-cell:focus-visible { outline-offset: -3px; }
.gallery > .g-cell:nth-child(n+6) { display: none; }

.show-all-photos { position: absolute; right: 40px; bottom: 20px; z-index: 2; }
.photo-pill { display: none; }

/* ------------------------------------------------------------------ title */
.title-section { padding: 26px 24px 22px; }
h1 {
  font-size: 31px; line-height: 1.22; font-weight: 700;
  letter-spacing: -.022em;
  max-width: 22ch;
}
.summary-line { margin-top: 10px; color: var(--muted); font-size: 15.5px; }
.summary-line span { color: var(--faint); margin: 0 2px; }

.bed-list {
  display: flex; flex-wrap: wrap; gap: 8px 22px;
  margin-top: 16px; padding-top: 16px;
  border-top: 1px solid var(--line-soft);
}
.bed-list li {
  display: flex; align-items: center; gap: 9px;
  font-size: 14.5px; color: var(--muted);
}
.bed-list img { width: 20px; height: 20px; opacity: .8; }

/* ----------------------------------------------------------- two columns */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(380px, 1fr);
  column-gap: 72px;
  align-items: start;
  padding-bottom: 72px;
}
.layout > .col-main { grid-column: 1; min-width: 0; }
.layout > .col-side {
  grid-column: 2;
  grid-row: 1 / span 20;
  align-self: start;
  position: sticky;
  top: calc(var(--header-h) + 24px);
  min-width: 0;
}

.sec { padding: 34px 0; border-top: 1px solid var(--line); }
.layout > .col-main:first-of-type { padding-top: 4px; border-top: 0; }
.sec h2 { font-size: 21px; letter-spacing: -.018em; }
.sec > h2 + * { margin-top: 18px; }
.sec-lede { color: var(--muted); font-size: 15px; max-width: 62ch; }

/* ------------------------------------------------------------ description */
.desc { position: relative; }
.desc > .desc-body { max-height: 10.6em; overflow: hidden; }
.desc.is-open > .desc-body { max-height: none; }
.desc:not(.is-open).is-clamped::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3.2em;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff 78%);
  pointer-events: none;
}
.desc-body > * + * { margin-top: 14px; }
.desc-body p { color: var(--muted); font-size: 15.5px; line-height: 1.72; }
.desc-body strong { color: var(--text); font-weight: 600; }
#desc-toggle { margin-top: 12px; }

.desc-sub {
  font-size: 14px; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; color: var(--faint);
  margin-top: 22px !important;
}
.policy-list {
  margin-top: 10px !important;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  max-width: 480px;
}
.policy-list li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 10px 14px;
  font-size: 14.5px;
}
.policy-list li + li { border-top: 1px solid var(--line-soft); }
.policy-when { color: var(--muted); }
.policy-what { font-weight: 600; white-space: nowrap; }

/* -------------------------------------------------------------- amenities */
.amenity-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 20px;
}
.amenity-grid li {
  display: flex; align-items: center; gap: 12px;
  font-size: 15px; color: var(--text);
  min-width: 0;
}
.amenity-grid img { flex: none; width: 22px; height: 22px; opacity: .78; }
#amenities .btn-outline { margin-top: 26px; }

/* ---------------------------------------------------------- booking card */
/* The Hostex widget draws its own 370px card (background, radius, shadow) inside
   shadow DOM, so the wrapper is deliberately plain: no border, padding or
   overflow clipping (its date-picker popover needs room). */
.book-card { padding: 0; }
.book-card-title { font-size: 18px; letter-spacing: -.015em; }
.book-lede { margin-top: 8px; font-size: 14.5px; color: var(--muted); line-height: 1.65; }

hostex-booking-widget {
  display: block;
  margin-top: 18px;
  min-height: 420px;       /* reserve space until the element upgrades */
}

.book-foot {
  display: flex; align-items: center; gap: 8px;
  margin-top: 18px; padding-top: 15px;
  border-top: 1px solid var(--line-soft);
  font-size: 13px; color: var(--faint);
}
.book-foot svg { flex: none; color: var(--primary); }

/* --------------------------------------------------------------- location */
.map-frame {
  isolation: isolate; /* keep Leaflet's z-index 400/1000 panes below our modals */
  z-index: 0;
  position: relative;
  border-radius: 12px; overflow: hidden;
  border: 1px solid var(--line);
  background: var(--warm);
  margin-top: 18px;
}
.map { height: 380px; width: 100%; }
.map-noscript {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; height: 380px; text-align: center; color: var(--muted);
}
.map-caption { margin-top: 12px; font-size: 14px; color: var(--muted); }

.leaflet-container { font: inherit !important; background: #E8E8E6 !important; }
.leaflet-control-attribution { font-size: 10px !important; }
.map-pin { background: none; border: 0; filter: drop-shadow(0 2px 3px rgba(0,0,0,.35)); }
.leaflet-popup-content { font-size: 13.5px; line-height: 1.45; margin: 12px 16px; }

/* ------------------------------------------------------------ house rules */
.rules-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 24px;
}
.rules-grid li {
  display: flex; align-items: center; gap: 12px;
  font-size: 15px; color: var(--text);
}
.rules-grid svg { flex: none; color: var(--muted); }

/* ---------------------------------------------------------------- reviews */
.reviews-h { display: flex; align-items: center; gap: 9px; font-size: 21px; }
.star { color: var(--primary); font-size: 19px; line-height: 1; }
.dot { color: var(--faint); }

.rating-bars {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 44px;
  margin-top: 20px;
}
.rating-bars li { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.rb-name { flex: none; width: 104px; color: var(--muted); }
.rb-track {
  flex: 1 1 auto; height: 4px; border-radius: 2px;
  background: var(--line); overflow: hidden; min-width: 40px;
}
.rb-fill { display: block; height: 100%; background: var(--text); border-radius: 2px; }
.rb-val { flex: none; width: 26px; text-align: right; font-weight: 500; font-variant-numeric: tabular-nums; }

.review-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 44px;
  margin-top: 34px;
}
.review { min-width: 0; }
.rev-head { display: flex; flex-direction: column; }
.rev-name { font-weight: 600; font-size: 15px; }
.rev-date { font-size: 13px; color: var(--faint); }
.rev-text {
  margin-top: 10px;
  font-size: 14.5px; line-height: 1.65; color: var(--muted);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4;
  overflow: hidden;
}
.rev-text.is-expandable { cursor: pointer; }
.rev-text.is-expanded { display: block; -webkit-line-clamp: unset; }
.rev-more {
  display: block; margin-top: 4px;
  font-size: 13.5px; font-weight: 500; color: var(--text);
  text-decoration: underline; text-underline-offset: 3px;
}
#reviews .btn-outline { margin-top: 30px; }

/* ----------------------------------------------------------------- footer */
.site-footer { background: var(--warm); border-top: 1px solid var(--line); }
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
  padding-top: 34px; padding-bottom: 34px;
}
.footer-brand { display: flex; align-items: center; gap: 13px; }
.brand-mark-light { width: 30px; height: 32px; }
.footer-brand-text { display: flex; flex-direction: column; }
.footer-name { font-weight: 700; font-size: 16px; letter-spacing: -.015em; }
.footer-sub { font-size: 13px; color: var(--muted); }
.footer-meta { font-size: 13px; color: var(--faint); text-align: right; line-height: 1.7; }

/* ------------------------------------------------------------ mobile bar */
.mobile-bar { display: none; }

/* ------------------------------------------------------------- lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 120;
  background: #0F0F0F;
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) 84px;
  grid-template-rows: 60px minmax(0, 1fr);
  align-items: center;
}
.lightbox[hidden] { display: none; }
.lb-bar {
  grid-column: 1 / -1; grid-row: 1;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; color: #fff;
}
.lb-counter { font-size: 14px; font-variant-numeric: tabular-nums; color: rgba(255, 255, 255, .82); }
.lb-close, .lb-nav {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .22);
  background: rgba(255, 255, 255, .08);
  color: #fff; cursor: pointer;
  transition: background-color .16s ease;
}
.lb-close:hover, .lb-nav:hover { background: rgba(255, 255, 255, .2); }
.lb-prev { grid-column: 1; grid-row: 2; justify-self: center; }
.lb-next { grid-column: 3; grid-row: 2; justify-self: center; }
.lb-stage {
  grid-column: 2; grid-row: 2;
  margin: 0; padding: 0 8px 28px;
  display: flex; align-items: center; justify-content: center;
  height: 100%; min-height: 0;
}
.lb-stage img {
  max-width: 100%; max-height: 100%;
  width: auto; height: auto;
  object-fit: contain;
  border-radius: 6px;
}
.lightbox:focus-visible { outline: none; }

/* ---------------------------------------------------------------- modals */
.modal {
  position: fixed; inset: 0; z-index: 130;
  background: rgba(39, 43, 48, .48);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.modal[hidden] { display: none; }
.modal-card {
  background: #fff; border-radius: var(--radius-lg);
  width: 100%; max-width: 720px;
  max-height: min(86vh, 860px);
  display: flex; flex-direction: column;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .28);
  overflow: hidden;
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  flex: none;
}
.modal-head h2 { font-size: 18px; }
.modal-close {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; flex: none;
  border-radius: 50%; border: 1px solid var(--line);
  background: #fff; color: var(--text); cursor: pointer;
}
.modal-close:hover { background: var(--warm); }
.modal-body { overflow-y: auto; padding: 8px 24px 28px; -webkit-overflow-scrolling: touch; }

.am-group + .am-group { margin-top: 8px; }
.am-group h3 {
  font-size: 13px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
  color: var(--faint);
  padding: 22px 0 4px;
}
.am-group ul li {
  display: flex; align-items: center; gap: 13px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 15px;
}
.am-group ul li img { flex: none; width: 22px; height: 22px; opacity: .78; }

.rv-list li { padding: 22px 0; border-bottom: 1px solid var(--line-soft); }
.rv-list li:last-child { border-bottom: 0; }
.rv-list .rev-text { display: block; -webkit-line-clamp: unset; }

/* ==========================================================================
   Responsive
   ========================================================================== */

/* ---- tablet / narrow desktop ---- */
@media (max-width: 1080px) {
  .layout { column-gap: 44px; }
  .brand-sub { display: none; }
}

@media (max-width: 980px) {
  .header-link { display: none; }
  h1 { font-size: 28px; }
  .map { height: 320px; }
}

/* ---- single column ---- */
@media (max-width: 899px) {
  .wrap { padding: 0 20px; }

  .gallery-section { margin-top: 0; padding: 0; }
  .gallery {
    display: flex;
    grid-template-columns: none; grid-template-rows: none;
    gap: 0;
    aspect-ratio: 4 / 3;
    border-radius: 0;
    overflow-x: auto; overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
  }
  .gallery::-webkit-scrollbar { display: none; }
  .g-cell { flex: 0 0 100%; scroll-snap-align: center; }
  .g-cell:first-child { grid-row: auto; }
  .g-cell:hover > img { transform: none; filter: none; }
  .gallery > .g-cell:nth-child(n+6) { display: block; }

  .photo-pill {
    display: block; position: absolute; z-index: 2;
    right: 14px; bottom: 14px;
    background: rgba(16, 16, 16, .62);
    color: #fff; font-size: 12.5px; font-variant-numeric: tabular-nums;
    padding: 4px 10px; border-radius: 999px;
    backdrop-filter: blur(3px);
  }
  .show-all-photos { right: 14px; bottom: 52px; }

  .title-section { padding: 22px 20px 20px; }
  h1 { max-width: none; }

  .layout {
    grid-template-columns: minmax(0, 1fr);
    column-gap: 0;
    padding-bottom: 24px;
  }
  .layout > .col-main, .layout > .col-side {
    grid-column: 1; grid-row: auto;
    position: static; top: auto;
  }
  .layout > .col-side { padding: 30px 0 4px; border-top: 1px solid var(--line); }
  .sec { padding: 30px 0; }

  .amenity-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .review-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .rating-bars { gap: 10px 28px; }

  .mobile-bar {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
    padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .97);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--line);
    box-shadow: 0 -2px 14px rgba(39, 43, 48, .06);
  }
  .mobile-bar-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
  .mobile-bar-text strong { font-size: 14.5px; font-weight: 600; }
  .mobile-bar-text span { font-size: 12.5px; color: var(--faint); }
  body { padding-bottom: 76px; }

  .header-nav .js-scroll-book { display: none; }

  .lightbox { grid-template-columns: 1fr; grid-template-rows: 56px minmax(0, 1fr) 72px; }
  .lb-stage { grid-column: 1; grid-row: 2; padding: 0 12px; }
  .lb-prev, .lb-next { grid-column: 1; grid-row: 3; align-self: center; }
  .lb-prev { justify-self: start; margin-left: 24%; }
  .lb-next { justify-self: end; margin-right: 24%; }

  .modal { padding: 0; align-items: stretch; }
  .modal-card { max-width: none; max-height: 100%; border-radius: 0; }
}

@media (max-width: 640px) {
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 18px; }
  .footer-meta { text-align: left; }
}

@media (max-width: 520px) {
  h1 { font-size: 25px; }
  .summary-line { font-size: 14.5px; }
  .amenity-grid { grid-template-columns: minmax(0, 1fr); gap: 13px; }
  .rules-grid { grid-template-columns: minmax(0, 1fr); }
  .rating-bars { grid-template-columns: minmax(0, 1fr); }
  .rb-name { width: 96px; }
  .policy-list li { flex-direction: column; gap: 2px; }
  .book-card { padding: 18px; }
  .sec h2, .reviews-h { font-size: 19.5px; }
  .modal-body, .modal-head { padding-left: 20px; padding-right: 20px; }
  .map { height: 260px; }
  .gallery { aspect-ratio: 1 / 1; }
}
