/* Shared by 50archbishop.com and 19-church.com. Single dark theme, set on purpose:
   the photographs are warm night interiors and read best on a cool dark ground. */
:root {
  color-scheme: dark;
  --ground: #121416;      /* shutter-black, a touch of blue-green */
  --raise: #1a1d20;
  --line: #2a2e32;
  --ink: #ebe6de;         /* warm off-white, like lit limestone */
  --ink-2: #a39e95;
  --ink-3: #6f6b65;
  --stone: #c9a66b;       /* Globigerina limestone, used sparingly */
  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --text: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --gutter: clamp(16px, 4vw, 48px);
  --measure: 62ch;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 17px/1.6 var(--text);
  font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-color: var(--ink-3); text-underline-offset: 3px; }
a:hover { color: var(--stone); text-decoration-color: var(--stone); }
:focus-visible { outline: 2px solid var(--stone); outline-offset: 3px; }

.wrap { padding-inline: var(--gutter); max-width: 1320px; margin-inline: auto; }

/* Top bar */
.bar {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap;
  padding-block: 18px;
  font: 400 12px/1.4 var(--mono); letter-spacing: .04em; color: var(--ink-2);
}
.bar nav { display: flex; gap: 18px; flex-wrap: wrap; }
.bar a { text-decoration: none; }
.bar a[aria-current="page"] { color: var(--ink); }

/* Hero photograph: sized to the picture, never to the viewport */
.hero { margin-block: 0; }
.hero img { width: 100%; max-height: 78vh; object-fit: cover; }
.hero figcaption, .photo figcaption {
  font: 400 12px/1.4 var(--mono); color: var(--ink-3); padding-top: 10px; letter-spacing: .02em;
}

/* Address block */
.address {
  display: grid; grid-template-columns: auto 1fr; column-gap: clamp(14px, 2.4vw, 32px); align-items: end;
  padding-block: clamp(36px, 6vw, 80px) clamp(28px, 4vw, 48px);
}
.address .no {
  font-family: var(--display); font-weight: 700; font-variation-settings: "wdth" 125;
  font-size: clamp(88px, 17vw, 220px); line-height: .78; letter-spacing: -.04em;
  font-variant-numeric: lining-nums;
}
.address h1 {
  margin: 0; font-family: var(--display); font-weight: 600; font-variation-settings: "wdth" 112;
  font-size: clamp(26px, 4.2vw, 54px); line-height: 1.02; letter-spacing: -.02em; text-wrap: balance;
}
.address .mt {
  display: block; margin-top: 10px; font: 400 13px/1.3 var(--mono); color: var(--stone); letter-spacing: .03em;
}

/* Intro text + facts */
.about {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(28px, 6vw, 96px);
  padding-block: 8px clamp(48px, 7vw, 96px);
  border-top: 1px solid var(--line); padding-top: clamp(28px, 4vw, 44px);
}
.about p { margin: 0 0 1em; max-width: var(--measure); font-size: clamp(17px, 1.5vw, 19px); }
.about p:last-child { margin-bottom: 0; }
.facts { margin: 0; display: grid; grid-template-columns: max-content 1fr; column-gap: 24px; row-gap: 0; align-self: start; }
.facts dt, .facts dd { padding-block: 10px; border-bottom: 1px solid var(--line); margin: 0; }
.facts dt { font: 400 12px/1.9 var(--mono); color: var(--ink-3); text-transform: uppercase; letter-spacing: .08em; }
.facts dd { font-size: 15px; color: var(--ink); }

/* Photographs: six-column grid, landscapes take four, portraits two, rows share a height */
.photos {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(10px, 1.4vw, 18px);
  padding-bottom: clamp(56px, 8vw, 112px);
}
.photo { margin: 0; grid-column: span 4; }
.photo.p { grid-column: span 2; }
.photo.w { grid-column: 1 / -1; }
.photo a { display: block; cursor: zoom-in; }
.photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--raise); transition: opacity .2s; }
.photo.p img { aspect-ratio: 2 / 3; }
.photo.w img { aspect-ratio: 16 / 7; }
.photo a:hover img { opacity: .86; }

/* Section heading */
.label {
  font: 400 12px/1.4 var(--mono); color: var(--ink-3); text-transform: uppercase; letter-spacing: .1em;
  margin: 0 0 18px;
}

/* Nearby: minutes on foot, aligned */
.near { padding-bottom: clamp(56px, 8vw, 112px); }
.near ol { list-style: none; margin: 0; padding: 0; columns: 2 340px; column-gap: clamp(28px, 6vw, 96px); }
.near li {
  break-inside: avoid; display: grid; grid-template-columns: 84px 1fr; gap: 12px;
  padding-block: 12px; border-top: 1px solid var(--line);
}
.near .t { font: 400 13px/1.55 var(--mono); color: var(--stone); font-variant-numeric: tabular-nums; }
.near b { font-weight: 600; display: block; }
.near span.d { color: var(--ink-2); font-size: 15px; }

/* Link to the other floor / house */
.next {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding-block: 28px; border-top: 1px solid var(--line); text-decoration: none;
  font-family: var(--display); font-weight: 600; font-variation-settings: "wdth" 112;
  font-size: clamp(22px, 3vw, 34px); letter-spacing: -.01em;
}
.next small { display: block; font: 400 12px/1.4 var(--mono); color: var(--ink-3); letter-spacing: .06em; text-transform: uppercase; margin-bottom: 6px; }

footer.foot {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding-block: 28px 40px; border-top: 1px solid var(--line);
  font: 400 12px/1.5 var(--mono); color: var(--ink-3);
}

/* Lightbox */
dialog.lb {
  border: 0; padding: 0; margin: 0; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh;
  background: rgba(10, 11, 12, .96); color: var(--ink);
}
dialog.lb::backdrop { background: rgba(10, 11, 12, .96); }
.lb-inner { height: 100%; display: grid; grid-template-rows: 1fr auto; padding: 20px var(--gutter); }
.lb img { max-width: 100%; max-height: 100%; margin: auto; object-fit: contain; min-height: 0; }
.lb-stage { display: flex; min-height: 0; }
.lb-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 14px; font: 400 12px/1.4 var(--mono); color: var(--ink-2); }
.lb button {
  background: none; border: 1px solid var(--line); color: var(--ink); font: 400 13px/1 var(--mono);
  padding: 10px 14px; cursor: pointer;
}
.lb button:hover { border-color: var(--stone); color: var(--stone); }
.lb .ctl { display: flex; gap: 8px; }

@media (max-width: 760px) {
  .about { grid-template-columns: 1fr; }
  .photos { grid-template-columns: 1fr; }
  .photo, .photo.p, .photo.w { grid-column: auto; }
  .photo img, .photo.p img, .photo.w img { aspect-ratio: auto; }
  .address { grid-template-columns: 1fr; row-gap: 14px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
