/* Sections: a fixed section is a stage of one or two pages, cut off at its edges; a flowing section keeps its pictures still while the words run past */
body.is-house main.house { padding: 0; margin: 0; max-width: none; }
.house .room { position: relative; background: var(--b1, var(--paper)); }
.house .rb-paper { --b1: var(--paper); } .house .rb-ink { --b1: var(--ink); } .house .rb-muted { --b1: var(--muted); }
.house .rb-accent { --b1: var(--accent); } .house .rb-line { --b1: var(--line); } .house .rb-contrast { --b1: var(--contrast, var(--accent)); }
.house .rt-ink { color: var(--ink); } .house .rt-paper { color: var(--paper); } .house .rt-muted { color: var(--muted); }
.house .rt-accent { color: var(--accent); } .house .rt-line { color: var(--line); } .house .rt-contrast { color: var(--contrast, var(--accent)); }
.house .rt-light { color: #f6f1e4; } .house .rt-dark { color: #1d1a16; }
.house .rin .al-l { text-align: left; } .house .rin .al-c { text-align: center; } .house .rin .al-r { text-align: right; }
.house .ra-left { text-align: left; } .house .ra-center { text-align: center; } .house .ra-right { text-align: right; }
.house .of-tl img { object-position: 0 0; } .house .of-tc img { object-position: 50% 0; } .house .of-tr img { object-position: 100% 0; }
.house .of-ml img { object-position: 0 50%; } .house .of-mc img { object-position: 50% 50%; } .house .of-mr img { object-position: 100% 50%; }
.house .of-bl img { object-position: 0 100%; } .house .of-bc img { object-position: 50% 100%; } .house .of-br img { object-position: 100% 100%; }
.house .rbg img, .house .rimg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.house .rin > :first-child { margin-top: 0; } .house .rin > :last-child { margin-bottom: 0; }
.house .rin h1, .house .rin h2 { margin: 0 0 .4em; line-height: 1.1; }
/* the frame: a spread is 3:2, so each page is 3:4 like a paperback. It fits the screen, with a margin either side for the bar and the rail,
   and sits on the backdrop colour. Wide screens keep the margins; narrower ones let the bar float over the page. */
.house { --gut: 0px; --vg: 3svh; --fw: min(calc(100vw - 2 * var(--gut)), calc((100svh - 2 * var(--vg)) * 1.5), 2800px); }
@media (min-width: 1000px) { .house { --gut: calc(var(--ui, 14px) * 10.5); } }
.house .bar-ruler { max-width: var(--fw); }
.house .room { background: var(--bd, #201a16); }
/* the stage: one page is 3 wide by 4 high, two pages side by side make 3 by 2 */
.house .stage { position: relative; overflow: hidden; background: var(--b1, transparent); }
.house .sp-2 .stage { width: var(--fw); aspect-ratio: 3 / 2; }
.house .sp-1 .stage { width: calc(var(--fw) / 2); aspect-ratio: 3 / 4; }
.house .spage { position: absolute; top: 0; height: 100%; overflow: hidden; container-type: size; background: var(--b1, transparent); }
.house .sp-2 .sg-0 { left: 0; width: 50%; } .house .sp-2 .sg-1 { left: 50%; width: 50%; } .house .sp-1 .sg-0 { left: 0; width: 100%; }
.house .stage > .rbg, .house .spage > .rbg { position: absolute; inset: 0; }
/* a full-width picture sits under both pages, so the pages must not paint the stage colour over it */
.house .stage > .rbg ~ .spage { background: transparent; }
.house .rimg { position: absolute; overflow: hidden; }
.house .rs-b { aspect-ratio: 4 / 3; } .house .rs-c { aspect-ratio: 1 / 1; border-radius: 50%; }
.house .rtx { position: absolute; line-height: 1.4; }
.house .rtx p { margin: 0 0 .7em; }
.house .rtx.rpl { border-radius: .4em; }
/* a flowing text is a box from its top down to the bottom margin; the words fill it and the rest carries on to the next spread */
.house .rtx.rfl { overflow: hidden; }
/* where the words sit in a flowing box that they do not fill: auto margins give way when the box is full, so paging is unaffected */
.house .rtx.rfl.va-m, .house .rtx.rfl.va-b { display: flex; flex-direction: column; }
.house .rtx.rfl.va-m > .rin { margin-block: auto; }
.house .rtx.rfl.va-b > .rin { margin-top: auto; }
.house .spage .rz-0 { font-size: calc(2.3cqw * var(--ts, 1)); } .house .spage .rz-1 { font-size: calc(3.3cqw * var(--ts, 1)); } .house .spage .rz-2 { font-size: calc(4.6cqw * var(--ts, 1)); } .house .spage .rz-3 { font-size: calc(7.2cqw * var(--ts, 1)); }
.house .room-s { display: flex; justify-content: center; align-items: center; min-height: 100vh; min-height: 100svh; overflow: hidden; }
/* flowing: the stage stays put, the words run past it */
.house .fx { position: sticky; top: 0; height: 100vh; height: 100svh; display: flex; justify-content: center; align-items: center; overflow: hidden; }
.house .ft { position: relative; display: flex; box-sizing: border-box; min-height: 100vh; min-height: 100svh; margin: -100vh auto 0; margin-top: -100svh; padding: 10vh 0 14vh; }
.house .sp-2 .ft { width: var(--fw); }
.house .sp-1 .ft { width: calc(var(--fw) / 2); }
.house .fcol { flex: 1 1 0; min-width: 0; }
.house .ftx { line-height: 1.75; margin-bottom: 1.2em; }
.house .fw-0 { width: 50%; } .house .fw-1 { width: 70%; } .house .fw-2 { width: 88%; }
.house .fx-0 { margin-left: 6%; margin-right: auto; } .house .fx-1 { margin-inline: auto; } .house .fx-2 { margin-right: 6%; margin-left: auto; }
.house .ftx.rz-0 { font-size: 1.1rem; } .house .ftx.rz-1 { font-size: 1.3rem; } .house .ftx.rz-2 { font-size: 1.7rem; } .house .ftx.rz-3 { font-size: 2.4rem; }
.house .ftx p { margin: 0 0 1.1em; }
html.housed { scroll-snap-type: y proximity; }
.house .room-s { scroll-snap-align: center; }
@media (max-width: 700px) {
  html.housed { scroll-snap-type: none; }
  .house .room-s { min-height: 0; display: block; }
  .house .stage { width: 100% !important; aspect-ratio: auto !important; overflow: visible; padding: 6vw 1rem; box-sizing: border-box; }
  .house .spage { position: relative !important; left: 0 !important; width: 100% !important; height: auto !important; container-type: normal; padding-bottom: 1rem; }
  .house .stage > .rbg, .house .spage > .rbg { position: static; max-height: 60vh; margin: 0 0 1rem; }
  .house .rimg, .house .rtx { position: static !important; width: auto !important; height: auto !important; transform: none !important; margin: 0 0 1rem; }
  .house .rtx { margin-inline: 1.25rem; }
  .house .rimg.rs-c { width: 60% !important; margin-inline: auto; }
  .house .rtx, .house .spage .rtx { font-size: 1.05rem !important; }
  .house .rtx.rfl { height: auto !important; overflow: visible; }
  .house .spage .rtx.rz-3 { font-size: 1.9rem !important; line-height: 1.2; } .house .spage .rtx.rz-2 { font-size: 1.4rem !important; }
  .house .fx { position: static; height: auto; display: block; }
  .house .ft { margin: 0 auto; min-height: 0; padding: 1rem 0 4rem; display: block; width: 100% !important; }
  .house .ftx { width: calc(100% - 2rem) !important; margin-inline: auto !important; }
}

/* Tangents: galleries placed on a page, pins in the text, and the popup that opens from a pin */
.house .rgal { position: absolute; display: grid; gap: 1.1cqw; }
.house .gl-1x3, .house .gl-1x2 { grid-template-columns: 1fr; }
.house .gl-2x1, .house .gl-2x2, .house .gl-2x3 { grid-template-columns: repeat(2, 1fr); }
.house .gl-3x1, .house .gl-3x2, .house .gl-3x3 { grid-template-columns: repeat(3, 1fr); }
.house .gl-t { position: relative; overflow: hidden; display: block; padding: 0; border: 0; aspect-ratio: 1; border-radius: 1cqw; background: var(--b1, #444); }
.house button.gl-t { cursor: zoom-in; }
.house .gl-round .gl-t { border-radius: 50%; }
.house .gl-t img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; }
.house button.gl-t:hover img, .house button.gl-t:focus-visible img { transform: scale(1.04); }
.house button.gl-t:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.house .gl-cap { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(10, 10, 14, .85); color: #fff; font-size: max(11px, 1.5cqw); line-height: 1.3; padding: .45em .65em; text-align: left; max-height: 40%; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.house .gl-e0 { background: var(--accent); } .house .gl-e1 { background: var(--muted); } .house .gl-e2 { background: var(--contrast, var(--accent)); }
.house .ft { pointer-events: none; } .house .ftx, .house .ftx * { pointer-events: auto; }
.pin { font: inherit; color: inherit; background: color-mix(in srgb, currentColor 14%, transparent); border: 0; border-bottom: 1px dotted currentColor; border-radius: 3px; padding: 0 .1em; cursor: pointer; text-align: inherit; }
.pin::after { content: ""; display: inline-block; width: .36em; height: .36em; border-radius: 50%; background: currentColor; margin-left: .2em; vertical-align: .12em; }
.pin:hover, .pin:focus-visible, .pin.on { background: color-mix(in srgb, currentColor 26%, transparent); }
.pin.seen { background: none; }
.lm-pop { position: absolute; z-index: 900; width: 300px; box-sizing: border-box; display: flex; gap: 12px; padding: 12px; background: rgba(15, 20, 28, .97); color: #f2f4f7; border: 1px solid rgba(255, 255, 255, .16); border-radius: 12px; font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; opacity: 0; transition: opacity .12s; }
.lm-pop.in { opacity: 1; }
.lm-pop:focus { outline: none; }
.lm-pop-i { flex: none; width: 76px; height: 76px; border-radius: 8px; overflow: hidden; background: #3a4a5c; }
.lm-pop-i img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lm-pop-b { flex: 1; min-width: 0; }
.lm-pop-t { margin: 0 0 3px; font-weight: 600; font-size: 1rem; }
.lm-pop-p { margin: 0; font-size: .875rem; color: #bcc8d4; overflow-wrap: anywhere; }
.lm-pop-l { display: inline-block; margin-top: 8px; font-size: .875rem; color: #a8f0cb; text-decoration: none; }
.lm-pop-l:hover, .lm-pop-l:focus-visible { text-decoration: underline; }
.lm-pop-x { position: absolute; top: -10px; right: -10px; width: 24px; height: 24px; padding: 0; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .22); background: #0f141c; color: #d7dde4; font-size: 15px; line-height: 1; cursor: pointer; }
.lm-pop-x::before { content: ""; position: absolute; inset: -8px; }
.lm-pop-x:hover, .lm-pop-x:focus-visible { background: #1b2430; color: #fff; }
.lm-pop.sheet { position: fixed; left: 0; right: 0; bottom: 0; top: auto; width: auto; border-radius: 16px 16px 0 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); }
.lm-pop.sheet .lm-pop-x { top: 8px; right: 8px; }
@media (prefers-reduced-motion: reduce) { .lm-pop, .house .gl-t img { transition: none; } }
@media (max-width: 700px) {
  .house .rgal { position: static !important; width: 100% !important; max-width: 26rem; margin: 0 auto 1rem; transform: none !important; }
}

/* the cover has no buttons: a bobbing arrow low on the cover says there is more below (Contents is on the bar) */
.house .cv-down { position: absolute; left: 50%; bottom: 4svh; translate: -50% 0; z-index: 3; width: 3.2rem; height: 3.2rem; display: flex; align-items: center; justify-content: center; border-radius: 50%; color: #f6f1e4; background: rgba(10, 10, 14, .45); border: 1px solid rgba(246, 241, 228, .5); animation: cv-bob 1.6s ease-in-out infinite; }
.house .cv-down svg { width: 1.6rem; height: 1.6rem; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.house .cv-down:hover, .house .cv-down:focus-visible { background: rgba(10, 10, 14, .7); outline: none; }
.house .cv-down:focus-visible { box-shadow: 0 0 0 3px var(--accent); }
@keyframes cv-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(.7rem); } }
@media (prefers-reduced-motion: reduce) { .house .cv-down { animation: none; } }
/* the site name in the margin, wide screens only */
.wm { position: fixed; top: 1.1rem; z-index: 6; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1rem, .5vw + .55rem, 1.7rem); letter-spacing: .02em; color: #f6f1e4; text-decoration: none; opacity: .85; }
.wm:hover, .wm:focus-visible { opacity: 1; }
.wm-left { left: 1.4rem; } .wm-right { right: 1.4rem; }
@media (max-width: 999px) { .wm { display: none; } }
