/* 7 Plumb Lane landing page. Type, colour and styling follow the rental brochure. */

@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/cormorant.woff2") format("woff2");
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/cormorant-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Work Sans";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/worksans.woff2") format("woff2");
}

:root {
  --paper: #f7f6f2;
  --ink: #1b2a3a;
  --ink-2: #2a3642;
  --muted: #67717a;
  --rule: #d5d2c9;
  --navy: #1b2a3a;
  --on-navy: #f2f0ea;
  --on-navy-muted: #a9b1b9;
  --on-navy-rule: #3a4652;

  --serif: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --sans: "Work Sans", "Helvetica Neue", Arial, sans-serif;

  --nav: 64px;
  --gx: clamp(20px, 4.2vw, 80px);          /* side gutter */
  --gy: clamp(18px, 3.4vh, 48px);          /* top/bottom gutter */
  --gap: clamp(8px, 1vh, 14px);            /* photo gap */

  /* type scale tied to viewport height so every page fits one screen */
  --t-label: clamp(13.22px, 1.52vh, 15.87px);
  --t-small: clamp(15.2px, 1.87vh, 19.17px);
  --t-body: clamp(16.53px, 2.12vh, 21.16px);
  --t-lede: clamp(23.8px, 3.44vh, 37.03px);
  --t-h3: clamp(23.8px, 3.1vh, 34.38px);
  --t-h2: clamp(39.67px, 6.08vh, 74.06px);
  --t-h1: clamp(52px, min(10.5vh, 5.9vw), 128px);
  --t-cap: clamp(18.52px, 2.31vh, 25.13px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: var(--t-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, ul, dl, dd, figure { margin: 0; padding: 0; }
ul { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

/* ---------- shared bits ---------- */
.label {
  font-family: var(--sans);
  font-size: var(--t-label);
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink);
}
.h2 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: var(--t-h2);
  line-height: 1.08;
  color: var(--ink);
  letter-spacing: 0.005em;
}
.h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--t-h3);
  line-height: 1.15;
  color: var(--ink);
}
.italic { font-family: var(--serif); font-style: italic; font-weight: 300; }

/* ---------- top navigation ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--nav);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--gx);
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
.nav-brand {
  font-family: var(--serif); font-weight: 400;
  font-size: 24px; line-height: 1; color: var(--ink);
  text-decoration: none; white-space: nowrap;
}
.nav-brand small {
  font-family: var(--sans); font-size: 10px; font-weight: 500;
  letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted);
  margin-left: 14px; vertical-align: 3px;
}
.nav-links { display: flex; align-items: center; gap: clamp(18px, 2.8vw, 44px); }
.nav-link {
  position: relative;
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--sans); font-size: 11.5px; font-weight: 500;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink); text-decoration: none;
  padding: 8px 0; white-space: nowrap;
}
.nav-link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px;
  background: var(--ink); transform: scaleX(0); transform-origin: left;
  transition: transform .3s ease;
}
.nav-link:hover::after, .nav-link.is-active::after, .nav-link[aria-expanded="true"]::after { transform: scaleX(1); }
.nav-link.is-disabled { cursor: default; }
.nav-link.is-disabled:hover::after { transform: scaleX(0); }
.nav-link svg { width: 10px; height: 10px; transition: transform .3s ease; }
.nav-link[aria-expanded="true"] svg { transform: rotate(180deg); }
.nav-link:focus-visible, .hp-item:focus-visible, .nav-brand:focus-visible { outline: 1px solid var(--ink); outline-offset: 4px; }

/* ---------- The Home panel (full width, 1/4 of the screen tall) ---------- */
.hp-scrim {
  position: fixed; inset: var(--nav) 0 0 0; z-index: 39;
  background: rgba(27, 42, 58, .28);
  opacity: 0; visibility: hidden; transition: opacity .35s ease, visibility .35s;
}
.home-panel {
  position: fixed; left: 0; right: 0; top: var(--nav); z-index: 40;
  height: 25vh; min-height: 190px;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  padding: clamp(14px, 2.4vh, 28px) var(--gx);
  display: grid; grid-template-columns: minmax(130px, 0.62fr) 5.4fr; gap: clamp(14px, 1.6vw, 40px);
  /* opens by sliding down from behind the menu bar. Only transform is animated, so the
     browser finishes the motion cleanly with no flash on the last frame. */
  transform: translate3d(0, -100%, 0);
  visibility: hidden;
  will-change: transform;
  backface-visibility: hidden;
  transition: transform .45s cubic-bezier(.2,.7,.2,1), visibility 0s linear .45s;
}
.is-panel-open .home-panel {
  transform: translate3d(0, 0, 0); visibility: visible;
  transition: transform .45s cubic-bezier(.2,.7,.2,1), visibility 0s linear 0s;
}
@media (prefers-reduced-motion: reduce) {
  .home-panel, .is-panel-open .home-panel { transition: none; }
}
.is-panel-open .hp-scrim { opacity: 1; visibility: visible; }
.hp-intro { display: flex; flex-direction: column; justify-content: space-between; border-right: 1px solid var(--rule); padding-right: clamp(14px, 1.6vw, 28px); }
.hp-intro .h3 { font-size: clamp(29.09px, 3.97vh, 42.32px); font-weight: 300; margin-top: 10px; }
.hp-intro p { font-size: var(--t-small); color: var(--muted); }
.hp-list { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(5px, 0.4vw, 12px); min-height: 0; }
.hp-item {
  display: flex; flex-direction: column; min-height: 0;
  text-decoration: none; color: var(--ink);
}
.hp-thumb { flex: 1; min-height: 0; overflow: hidden; background: var(--rule); }
.hp-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.hp-item:hover .hp-thumb img { transform: scale(1.05); }

.hp-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 4px; padding-top: 9px; border-top: 0; }
.hp-name { font-family: var(--serif); font-size: clamp(21.16px, 2.64vh, 27.77px); line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.hp-num { font-size: 12px; letter-spacing: .06em; color: var(--muted); }
/* the number sits just above its label, so long labels never run into the next item */
.hp-meta { flex-direction: column-reverse; align-items: flex-start; gap: 3px; padding-top: 10px; }
.hp-num { letter-spacing: .2em; }
@media (min-width: 1024px) and (min-height: 600px) {
  /* the panel grows to fit its larger text; every photo keeps one fixed height with its label below */
  .home-panel { height: auto; min-height: max(190px, 25vh); grid-template-columns: minmax(170px, 1.12fr) 5.4fr; gap: clamp(16px, 2vw, 44px); padding-bottom: clamp(18px, 3vh, 32px); }
  .hp-list { gap: clamp(8px, 0.75vw, 18px); }
  .hp-thumb { min-height: clamp(100px, 15vh, 180px); }
  .hp-name { max-width: 100%; }
}
@media (min-width: 1024px) and (max-width: 1199px) and (min-height: 600px) {
  .hp-name { font-size: 17px; }   /* narrow desktop windows: labels stay on one line */
}

/* ---------- pages (one brochure page = one screen) ---------- */
.pg { position: relative; padding-top: var(--nav); }
.pg-in {
  display: flex; flex-direction: column;
  padding: var(--gy) var(--gx) clamp(12px, 2vh, 22px);
}
.pg-body { flex: 1; min-height: 0; }
.pg-foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: clamp(10px, 1.8vh, 22px); padding-top: clamp(8px, 1.3vh, 14px);
  border-top: 1px solid var(--rule);
  font-size: 13.22px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted);
}
.pg-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: clamp(12px, 2.2vh, 26px); }
.pg-head .label { color: var(--ink); }
.cap { font-family: var(--serif); font-style: italic; font-weight: 300; font-size: var(--t-cap); color: var(--ink-2); margin-top: clamp(8px, 1.3vh, 14px); }

@media (min-width: 1024px) and (min-height: 600px) {
  .pg { height: 100vh; height: 100svh; }
  .pg-in { height: 100%; }
}

/* ----- 01 cover ----- */
.cover .pg-in { padding: 0; }
.cover-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: 54fr 46fr; }
.cover-img { position: relative; overflow: hidden; min-height: 360px; }
.cover-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
.cover-text {
  display: flex; flex-direction: column; justify-content: space-between;
  padding: calc(var(--gy) * 1.6) var(--gx) clamp(16px, 2.6vh, 30px);
}
.cover-mid { margin: auto 0; }
.cover h1 {
  font-family: var(--serif); font-weight: 300; font-size: var(--t-h1);
  line-height: .95; color: var(--ink); margin: clamp(12px, 2vh, 22px) 0 clamp(10px, 1.8vh, 18px);
  letter-spacing: -0.005em;
}
.cover .place { font-size: var(--t-small); letter-spacing: .1em; color: var(--ink-2); }
.cover .tagline { display: flex; align-items: center; gap: 18px; margin-top: clamp(28px, 6vh, 72px); }
.cover .tagline::before { content: ""; width: 42px; height: 1px; background: var(--ink); }
.cover .tagline span { font-family: var(--serif); font-style: italic; font-weight: 300; font-size: clamp(26.45px, 3.83vh, 39.67px); color: var(--ink); }
.cover-facts {
  display: flex; justify-content: space-between; gap: 6px 8px; flex-wrap: wrap;
  border-top: 1px solid var(--rule); padding-top: clamp(10px, 1.6vh, 16px);
  font-size: 12.56px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
}
.scroll-cue {
  display: inline-flex; align-items: center; gap: 10px; margin-top: clamp(18px, 3vh, 34px);
  font-size: 13.22px; letter-spacing: .24em; text-transform: uppercase; color: var(--ink); text-decoration: none;
}
.scroll-cue svg { width: 10px; height: 14px; animation: nudge 2.4s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }

/* ----- 02 the home / at a glance ----- */
.glance-grid { height: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 110px); align-items: safe center; }
.glance-intro .h2 { margin: clamp(10px, 1.8vh, 18px) 0 clamp(18px, 3vh, 34px); max-width: 15ch; }
.glance-intro p { font-family: var(--serif); font-weight: 300; font-size: var(--t-lede); line-height: 1.6; color: var(--ink-2); max-width: 36em; }
.glance-photo { margin-top: clamp(18px, 3.4vh, 40px); height: clamp(120px, 26vh, 300px); overflow: hidden; }
.glance-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; }
.glance-list { display: grid; grid-template-columns: 1fr 1fr; column-gap: clamp(20px, 2.6vw, 44px); margin-top: clamp(12px, 2vh, 22px); border-bottom: 1px solid var(--rule); }
.glance-list li {
  border-top: 1px solid var(--rule);
  padding: clamp(13px, 2.5vh, 30px) 0;
  font-size: clamp(17.19px, 2.31vh, 23.14px); line-height: 1.5; color: var(--ink-2);
}

/* ----- 03 room by room ----- */
#room-by-room .pg-body { display: flex; flex-direction: column; justify-content: center; }
@media (min-width: 1024px) and (min-height: 600px) {
  #room-by-room .pg-in { padding-top: clamp(10px, 1.8vh, 30px); padding-left: clamp(20px, 2.8vw, 60px); padding-right: clamp(20px, 2.8vw, 60px); }
  #room-by-room .pg-body { justify-content: safe center; }
  .rooms-head { display: flex; flex-direction: row-reverse; justify-content: space-between; align-items: baseline; gap: 20px; }
  .rooms-head .h2 { margin-top: 0; }
}
.rooms-head .h2 { margin-top: clamp(6px, 1vh, 12px); }
.rooms-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: clamp(18px, 2vw, 48px); row-gap: 0;
  margin-top: clamp(6px, 1.2vh, 26px);
}
.rooms-level {
  grid-column: 1 / -1;
  border-bottom: 1px solid var(--ink);
  padding-bottom: clamp(4px, 0.7vh, 10px);
  margin-bottom: clamp(6px, 1.1vh, 16px);
}
.rooms-level.upper { margin-top: clamp(6px, 1.5vh, 32px); }
.room .h3 { margin-bottom: clamp(3px, 0.6vh, 10px); font-size: clamp(25.13px, 3.56vh, 39.67px); }
.room p { font-size: var(--t-body); line-height: 1.42; color: var(--ink-2); }

/* ----- photo pages ----- */
.gal { height: 100%; display: grid; grid-template-columns: minmax(0, 1.72fr) minmax(0, 1fr); gap: var(--gap); }
.gal-side { display: grid; grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); gap: var(--gap); min-height: 0; }
.gal-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--gap); min-height: 0; }
.ph { position: relative; overflow: hidden; background: var(--rule); min-height: 0; margin: 0; cursor: zoom-in; }
.ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.ph:hover img { transform: scale(1.025); }
.ph:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.tile {
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: clamp(6px, 1vh, 14px) clamp(4px, .6vw, 10px) 2px clamp(10px, 1.1vw, 20px);
  min-width: 0; overflow: hidden;
}
.tile .italic { font-size: clamp(20.7px, 2.88vh, 31.05px); line-height: 1.25; color: var(--ink); margin-bottom: clamp(8px, 1.2vh, 14px); }
.tile p { font-size: var(--t-small); line-height: 1.55; }

/* photo pages that carry a full paragraph: photos share the space above, the text sits
   underneath at its natural height so it is never cut off */
@media (min-width: 1024px) and (min-height: 600px) {
  .gal-side.has-text { grid-template-rows: minmax(0, 1fr) auto; }
  #front-bedroom .gal-side.has-text { grid-template-rows: minmax(0, 1.15fr) minmax(0, 1fr) auto; }
}
.text-tile { justify-content: flex-start; overflow: visible; padding: clamp(4px, .8vh, 10px) 0 0; }
.text-tile p { font-size: var(--t-small); line-height: 1.55; color: var(--ink-2); }

/* ----- 10 location ----- */
.loc-grid { height: 100%; display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 6vw, 110px); align-items: safe center; }
.loc-left .h2 { margin: clamp(8px, 1.4vh, 14px) 0 clamp(18px, 3.4vh, 40px); }
.loc-left .nw { white-space: nowrap; }
.map-pin {
  display: inline-flex; align-items: center; justify-content: center;
  margin-left: .32em; padding: .06em .08em; vertical-align: .02em;
  color: var(--muted); text-decoration: none; line-height: 0;
  transition: color .3s ease, transform .3s ease;
}
.map-pin svg { width: .44em; height: .6em; overflow: visible; }
.map-pin:hover, .map-pin:focus-visible { color: var(--ink); transform: translateY(-2px); }
.map-pin:focus-visible { outline: 1px solid var(--rule); outline-offset: 4px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(12px, 1.6vw, 26px); }
.stat { border-top: 1px solid var(--ink); padding-top: clamp(10px, 1.6vh, 16px); }
.stat b { display: block; font-family: var(--serif); font-weight: 300; font-size: clamp(39.67px, 7.41vh, 84.64px); line-height: 1.05; color: var(--ink); }
.stat span { font-size: var(--t-body); color: var(--ink-2); }
.loc-left p.lede { font-size: clamp(17.19px, 2.38vh, 23.8px); line-height: 1.75; margin-top: clamp(18px, 3.2vh, 38px); max-width: 42em; }
.loc-photo { margin-top: clamp(16px, 3vh, 34px); height: clamp(110px, 22vh, 260px); }
.details dl { margin-top: clamp(8px, 1.4vh, 14px); border-bottom: 1px solid var(--rule); }
.details .row { display: flex; justify-content: space-between; gap: 24px; border-top: 1px solid var(--rule); padding: clamp(10px, 2vh, 22px) 0; font-size: var(--t-body); }
.details dt { color: var(--ink-2); }
.details dd { color: var(--ink); font-weight: 500; text-align: right; }
.inquire {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  margin-top: clamp(20px, 4vh, 48px);
  background: var(--navy); color: var(--on-navy);
  padding: clamp(16px, 3.2vh, 36px) clamp(18px, 2.2vw, 36px);
}
.inquire .h3 { color: var(--on-navy); font-weight: 400; font-size: clamp(26.45px, 3.97vh, 42.32px); }
.inquire .contact { font-size: var(--t-small); letter-spacing: .12em; text-transform: uppercase; }
.inquire .contact a { text-decoration: none; border-bottom: 1px solid var(--on-navy-rule); }
.inquire .contact a:hover { border-color: var(--on-navy); }

/* ----- 11 house history (navy) ----- */
.history { background: var(--navy); color: var(--on-navy); }
.history .label, .history .h2 { color: var(--on-navy); }
.history .pg-foot { border-color: var(--on-navy-rule); color: var(--on-navy-muted); }
.history .ph { background: #2a3642; }
.hist-grid { height: 100%; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 72px); min-height: 0; }
.hist-imgs { display: grid; grid-template-rows: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(14px, 2.2vh, 26px); min-height: 0; }
.hist-row { display: grid; gap: clamp(10px, 1vw, 16px); min-height: 0; }
.hist-row.two { grid-template-columns: 1.15fr 1fr; }
.hist-row.three { grid-template-columns: 1fr 1fr 1fr; }
.hist-fig { display: flex; flex-direction: column; min-height: 0; }
.hist-fig .ph { flex: 1; }
.hist-fig figcaption { font-family: var(--serif); font-style: italic; font-weight: 300; font-size: clamp(17.19px, 2.12vh, 22.48px); color: var(--on-navy); margin-top: 6px; line-height: 1.3; }
.hist-text { display: flex; flex-direction: column; justify-content: safe center; min-height: 0; }
.hist-text p { font-size: var(--t-body); line-height: 1.52; color: var(--on-navy); }
.hist-text p + p { margin-top: clamp(7px, 1.2vh, 14px); }
.hist-text .source { margin-top: clamp(10px, 2vh, 26px); padding-top: clamp(8px, 1.3vh, 14px); border-top: 1px solid var(--on-navy-rule); font-size: clamp(13.88px, 1.59vh, 15.87px); color: var(--on-navy-muted); line-height: 1.6; }
.history .pg-head { margin-bottom: clamp(14px, 2.4vh, 28px); }
.history .pg-head .h2 { margin-top: clamp(6px, 1vh, 12px); }

/* ---------- lightbox ---------- */
.lb {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(17, 26, 36, .94);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility .3s;
}
.lb.is-open { opacity: 1; visibility: visible; }
.lb figure { max-width: 92vw; max-height: 88vh; display: flex; flex-direction: column; align-items: center; }
.lb img { max-width: 92vw; max-height: 82vh; object-fit: contain; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.lb figcaption { margin-top: 14px; font-family: var(--serif); font-style: italic; font-weight: 300; font-size: 25.13px; color: var(--on-navy); text-align: center; }
.lb-btn {
  position: absolute; color: var(--on-navy); width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center; opacity: .8;
}
.lb-btn:hover { opacity: 1; }
.lb-btn svg { width: 22px; height: 22px; }
.lb-close { top: 18px; right: 22px; }
.lb-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 18px; top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; top: 32px; left: 32px; font-size: 13.22px; letter-spacing: .24em; color: var(--on-navy-muted); }

/* ---------- smaller screens: pages flow naturally ---------- */
@media (max-width: 1023px), (max-height: 599px) {
  .home-panel { height: auto; min-height: 0; max-height: calc(100vh - var(--nav)); overflow-y: auto; grid-template-columns: 1fr; }
  .hp-intro { border-right: 0; padding-right: 0; }
  .hp-intro p { display: none; }
  .hp-list { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 18px; }
  .hp-thumb { flex: none; aspect-ratio: 4 / 3; }
  .gal { height: auto; grid-template-columns: 1fr; }
  .gal > .ph { aspect-ratio: 3 / 2; }
  .gal-side { grid-template-rows: auto auto; }
  .gal-side > .ph { aspect-ratio: 3 / 2; }
  .gal-pair > .ph { aspect-ratio: 3 / 4; }
  .hist-imgs { grid-template-rows: auto auto; }
  .hist-fig .ph { flex: none; aspect-ratio: 4 / 3; }
  .pg-in { min-height: 0; }
}
@media (max-width: 1023px) {
  .cover-grid, .glance-grid, .loc-grid, .hist-grid { grid-template-columns: 1fr; }
  .cover-img { aspect-ratio: 4 / 3; min-height: 0; }
  .rooms-grid { grid-template-columns: 1fr 1fr; }
  .rooms-level { grid-column: 1 / -1; }
  .room { margin-bottom: 22px; }
  .glance-grid, .loc-grid { gap: 36px; }
}
@media (max-width: 720px) {
  :root { --nav: 56px; --gx: 16px; --gy: 28px;
    --t-label: 13.22px; --t-small: 17.85px; --t-body: 19.84px; --t-lede: 25.13px; --t-h3: 29.09px; --t-h2: 44.96px; --t-h1: 58px; --t-cap: 22.48px; }
  .nav-brand { display: none; }
  .nav { justify-content: center; }
  .nav-links { gap: 16px; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-link { font-size: 10px; letter-spacing: .14em; }
  .hp-list { grid-template-columns: 1fr 1fr; }
  .rooms-grid, .glance-list, .stats { grid-template-columns: 1fr; }
  .stats { gap: 18px; }
  .hist-row.two, .hist-row.three { grid-template-columns: 1fr; }
  .cover-facts { flex-direction: column; gap: 6px; }
  .pg-head { flex-direction: column; gap: 6px; }
  .details .row { flex-direction: column; gap: 2px; }
  .details dd { text-align: left; }
  .lb-prev, .lb-next { top: auto; bottom: 18px; transform: none; }
}
html.is-lb-open { overflow: hidden; }

/* ---------- phone refinements (desktop untouched) ---------- */
@media (max-width: 720px) {
  .pg-in { padding-top: 36px; padding-bottom: 18px; }
  .nav-link { padding: 14px 0; }                       /* larger tap targets */
  .cover .pg-in { padding: 0; }
  .cover-text { padding: 28px 16px 20px; }
  .cover .tagline { margin-top: 28px; }
  .pg-head { margin-bottom: 14px; }
  .pg-head .h2 { font-size: 42.32px; }

  /* photo pages: big lead photo, then pairs; caption tiles get the full width */
  .gal { gap: 8px; }
  .gal-side, .gal-pair { gap: 8px; }
  .gal > .ph { aspect-ratio: 4 / 3; }
  .gal-pair:has(.tile) { grid-template-columns: 1fr; }
  .gal-pair:has(.tile) > .ph { aspect-ratio: 4 / 3; }
  .tile { padding: 10px 0 4px; overflow: visible; }
  .tile .italic { font-size: 34px; line-height: 1.2; margin-bottom: 12px; }
  .tile p { font-size: 20px; }
  #plumb-lane .gal-side { grid-template-rows: auto auto; }
  .cap { font-size: 22.48px; }

  /* location: keep the three figures side by side */
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .stat b { font-size: 34.38px; }
  .stat span { font-size: 15.87px; line-height: 1.4; display: block; margin-top: 4px; }
  .loc-left p.lede { font-size: 19.84px; }
  .inquire { flex-direction: column; align-items: flex-start; gap: 8px; }
  .inquire .contact { line-height: 1.8; }

  /* history: the three small items sit in one row */
  .hist-row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .hist-row.three .hist-fig .ph { aspect-ratio: 3 / 4; }
  .hist-row.three figcaption { font-size: 15.87px; }
  .hist-row.two .hist-fig .ph { aspect-ratio: 16 / 10; }
  .hist-grid { gap: 28px; }

  /* The Home panel */
  .home-panel { padding: 16px 16px 24px; gap: 12px; }
  .hp-name { font-size: 22.48px; }
  .hp-intro .h3 { font-size: 29.09px; margin-top: 6px; }

  /* photo viewer */
  .lb img { max-width: 100vw; max-height: 72vh; }
  .lb figcaption { font-size: 21.16px; padding: 0 16px; }
}

/* While the page is moving, photos ignore the pointer, so passing over them never
   triggers hover zooms or catches the scroll. */
html.is-scrolling .pg, html.is-scrolling .home-panel { pointer-events: none; }
.ph img { backface-visibility: hidden; }

/* ---------- fit to screen (desktop) ----------
   Each page must sit on one screen. On shorter or narrower windows, or a zoomed-in browser,
   site.js lowers --k on just the page that would overflow, so its text steps down slightly
   instead of running into the page footer. --k stays 1 wherever everything already fits. */
@media (min-width: 1024px) and (min-height: 600px) {
  .pg {
    --k: 1;
    --t-label: calc(clamp(13.22px, 1.52vh, 15.87px) * var(--k));
    --t-small: calc(clamp(15.2px, 1.87vh, 19.17px) * var(--k));
    --t-body: calc(clamp(16.53px, 2.12vh, 21.16px) * var(--k));
    --t-lede: calc(clamp(23.8px, 3.44vh, 37.03px) * var(--k));
    --t-h3: calc(clamp(23.8px, 3.1vh, 34.38px) * var(--k));
    --t-h2: calc(clamp(39.67px, 6.08vh, 74.06px) * var(--k));
    --t-h1: calc(clamp(52px, min(10.5vh, 5.9vw), 128px) * var(--k));
    --t-cap: calc(clamp(18.52px, 2.31vh, 25.13px) * var(--k));
  }
  .cover .tagline span { font-size: calc(clamp(26.45px, 3.83vh, 39.67px) * var(--k)); }
  .glance-list li { font-size: calc(clamp(17.19px, 2.31vh, 23.14px) * var(--k)); padding: calc(clamp(13px, 2.5vh, 30px) * var(--k)) 0; }
  .room .h3 { font-size: calc(clamp(25.13px, min(3.56vh, 2.7vw), 39.67px) * var(--k)); }
  /* Room by Room has the most text of any page: on windows that are narrow for their height
     its text follows the width as well as the height, so it fits even before site.js runs.
     On ordinary widescreen windows these work out to exactly the usual sizes. */
  #room-by-room .room p { font-size: calc(clamp(16.53px, min(2.12vh, 1.6vw), 21.16px) * var(--k)); }
  .tile .italic { font-size: calc(clamp(20.7px, 2.88vh, 31.05px) * var(--k)); }
  .stat b { font-size: calc(clamp(39.67px, 7.41vh, 84.64px) * var(--k)); }
  .loc-left p.lede { font-size: calc(clamp(17.19px, 2.38vh, 23.8px) * var(--k)); }
  .inquire .h3 { font-size: calc(clamp(26.45px, 3.97vh, 42.32px) * var(--k)); }
  .details .row { padding: calc(clamp(10px, 2vh, 22px) * var(--k)) 0; }
  .hist-fig figcaption { font-size: calc(clamp(17.19px, 2.12vh, 22.48px) * var(--k)); }
  .hist-text .source { font-size: calc(clamp(13.88px, 1.59vh, 15.87px) * var(--k)); }
}
