/* Building pages and the A–Z index. Shares the wall's palette and type. */
:root {
  --ground: #FFFFFF; --paper: #F7F7F5; --ink: #111110; --graphite: #5D5C57; --hair: #E6E4DF;
  --red: #DA3A26; --red-ink: #B82E1D; --r: 10px; --r-panel: 18px;
  --sans: 'Barlow', system-ui, sans-serif; --serif: 'Barlow', system-ui, sans-serif; --mono: 'Barlow Condensed', system-ui, sans-serif; --display: 'Big Shoulders Display', Impact, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--ink); }
a:hover { color: var(--red); }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
img { max-width: 100%; display: block; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px clamp(16px, 3vw, 32px); }
.mark { font-family: var(--display); font-weight: 900; font-size: 20px; line-height: 0.9; letter-spacing: 0.01em; text-transform: uppercase; color: var(--ink); text-decoration: none; }
.mark .accent { color: var(--red); }
.top nav { display: flex; gap: 6px; flex-wrap: wrap; }
.top nav a { text-decoration: none; color: var(--ink); border: 1px solid var(--hair); border-radius: var(--r); padding: 11px 14px; font-size: 14px; font-weight: 600; transition: color .15s ease, border-color .15s ease; }
.top nav a:hover { border-color: var(--red); color: var(--red); }
.top nav a.wall { border-color: var(--ink); }
.top nav a.wall:hover { border-color: var(--red); }

.page { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 56px); padding: 8px clamp(16px, 3vw, 32px) 24px; align-items: start; }
.gallery { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; background: #1B1B1A; scrollbar-width: none; }
.slides::-webkit-scrollbar { display: none; }
.slides figure { flex: 0 0 100%; margin: 0; scroll-snap-align: start; display: flex; flex-direction: column; min-width: 0; position: relative; }
.slides .nophoto { position: absolute; top: 12px; left: 14px; z-index: 1; font: 500 12px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--graphite); }
.slides .nophoto + figcaption, .slides figure:has(.nophoto) img { background: #fff; }
.slides img { width: 100%; height: min(68vh, 720px); object-fit: contain; background: #1B1B1A; }
.slides figcaption { background: var(--paper); padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; font-size: 13px; line-height: 1.4; }
.slides figcaption b { font-weight: 700; }
.slides figcaption span { font: 400 11px/1.6 var(--mono); color: var(--graphite); }
.thumbs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.thumbs a { flex: 0 0 auto; width: 76px; height: 56px; background: #E2E1DC; outline: 2px solid transparent; outline-offset: -2px; }
.thumbs a img { width: 100%; height: 100%; object-fit: cover; opacity: .75; transition: opacity .15s; }
.thumbs a:hover img, .thumbs a[aria-current] img { opacity: 1; }
.thumbs a[aria-current] { outline-color: var(--red); }
.gallery.none { aspect-ratio: 4 / 3; border-radius: var(--r-panel); background: #DCDBD5; justify-content: center; align-items: center; padding: 24px; text-align: center; color: var(--graphite); font-size: 15px; }
.gallery.none p { margin: 0; max-width: 32ch; }
.info { display: flex; flex-direction: column; gap: 18px; min-width: 0; padding-top: 8px; }
.kicker { margin: 0; font: 500 12px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--graphite); }
.info h1 { margin: 0; font-size: clamp(48px, 6.4vw, 92px); font-family: var(--display); font-weight: 900; letter-spacing: 0.005em; line-height: 0.92; text-transform: uppercase; text-wrap: balance; }
.by { margin: 0; font-size: 17px; line-height: 1.4; }
.study { margin: 0; max-width: 60ch; font-family: var(--serif); font-size: clamp(19px, 1.6vw, 23px); line-height: 1.4; }
.study span { display: block; margin-bottom: 4px; font: 500 12px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--graphite); }
.tags { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { border: 1px solid var(--ink); border-radius: var(--r); padding: 5px 10px; font: 500 12px var(--mono); letter-spacing: 0.02em; }
.lede { margin: 0; max-width: 60ch; font-family: var(--serif); font-size: clamp(19px, 1.6vw, 23px); line-height: 1.4; }
.facts { margin: 0; display: grid; grid-template-columns: max-content 1fr; border-top: 1px solid var(--ink); }
.facts dt, .facts dd { margin: 0; padding: 10px 0; border-bottom: 1px solid var(--hair); }
.facts dt { font: 500 11px/1.9 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--graphite); padding-right: 24px; }
.facts dd { font-size: 15px; }
.cta { align-self: flex-start; background: var(--red); color: #fff; text-decoration: none; border-radius: var(--r); padding: 14px 20px; font-size: 15px; font-weight: 700; }
.cta:hover { background: var(--red-ink); color: #fff; }

.block { padding: 8px clamp(16px, 3vw, 32px) 24px; }
.block h2 { margin: 0 0 12px; padding-top: 14px; border-top: 1px solid var(--ink); font: 500 12px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; }
.links { display: flex; flex-wrap: wrap; gap: 8px; }
.links a { text-decoration: none; color: var(--ink); background: #fff; border: 1px solid var(--hair); border-radius: var(--r); padding: 11px 14px; font-size: 15px; font-weight: 700; transition: color .15s ease, border-color .15s ease; }
.links a:hover { border-color: var(--red); color: var(--red); }
.links a.guess { border-style: dashed; }
.links a span { display: block; font: 400 11px var(--mono); letter-spacing: 0.06em; color: var(--graphite); margin-bottom: 2px; }
.rel, .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.rel a, .grid a { text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 6px; font-size: 14px; line-height: 1.25; }
.rel .ph, .grid .ph { position: relative; aspect-ratio: 4 / 3; background: #E2E1DC; overflow: hidden; }
.rel .ph::after, .grid .ph::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--red); opacity: 0; transition: opacity .15s ease; }
.rel a:hover .ph::after, .grid a:hover .ph::after { opacity: 1; }
.rel a:hover, .grid a:hover { color: var(--red); }
.rel .ph img, .grid .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.rel a:hover img, .grid a:hover img { transform: scale(1.04); }
.rel small, .grid small { font: 400 12px var(--mono); color: var(--graphite); }

.index { padding: 8px clamp(16px, 3vw, 32px) 24px; display: flex; flex-direction: column; gap: 18px; }
.index h1 { margin: 0; font-size: clamp(48px, 7vw, 96px); font-family: var(--display); font-weight: 900; letter-spacing: 0.005em; line-height: 0.92; text-transform: uppercase; }

.foot { padding: 24px clamp(16px, 3vw, 32px) calc(110px + env(safe-area-inset-bottom, 0px)); font: 400 12px/1.7 var(--mono); color: var(--graphite); border-top: 1px solid var(--hair); margin-top: 16px; }
.foot p { margin: 0; }

/* The wall's dock, here with Home and Surprise me (which opens a surprise on the wall). */
.dock { position: fixed; z-index: 60; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); display: flex; gap: 2px; padding: 5px; width: max-content;
  background: rgba(255,255,255,.82); -webkit-backdrop-filter: blur(20px) saturate(140%); backdrop-filter: blur(20px) saturate(140%); border: 1px solid var(--hair); border-radius: calc(var(--r) + 5px);
  box-shadow: 0 14px 34px rgba(17,17,16,.14); }
.dock a { padding: 0 18px; height: 44px; display: flex; align-items: center; border-radius: var(--r); font-size: 14px; font-weight: 600; white-space: nowrap; text-decoration: none; color: var(--ink); transition: color .15s ease, background .15s ease; }
.dock a:hover { color: var(--red); }
.dock .go { background: var(--red); color: #fff; padding: 0 22px; }
.dock .go:hover { background: var(--red-ink); color: #fff; }

@media (max-width: 820px) {
  .page { grid-template-columns: 1fr; }
  .gallery { position: static; }
  .slides img { height: 62vh; }
  .dock { bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
  .dock a { padding: 0 12px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* the collection's size shows only on hover */
.top nav .all { position: relative; }
.top nav .all::after { content: attr(data-tip); position: absolute; top: calc(100% + 8px); right: 0; z-index: 30; white-space: nowrap; padding: 7px 10px; border-radius: var(--r); background: #fff; border: 1px solid var(--hair); box-shadow: 0 10px 30px rgba(0,0,0,.12); font: 500 13px var(--sans); color: var(--ink); opacity: 0; transform: translateY(-4px); pointer-events: none; transition: opacity .15s ease, transform .15s ease; }
.top nav .all:hover::after, .top nav .all:focus-visible::after { opacity: 1; transform: none; }

/* "About" on the most looked-up buildings: a few paragraphs quoted from Wikipedia, credited. */
.about p { margin: 0 0 12px; max-width: 68ch; font-family: var(--serif); font-size: clamp(17px, 1.3vw, 19px); line-height: 1.5; }
.about .src { margin: 2px 0 0; font: 400 12px/1.7 var(--mono); color: var(--graphite); }
.about .src a { color: inherit; }
.about .src a:hover { color: var(--red); }
