/* ==========================================================================
   Castle Matrix — site styles
   Shared by the homepage and the History reader. Limestone and ink with
   brass accents: Cormorant Garamond for display, EB Garamond for reading,
   Jost for small capitals. Fonts are self-hosted (latin subsets).
   ========================================================================== */

@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/assets/fonts/cormorant-garamond-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 300 700;
  font-display: swap;
  src: url('/assets/fonts/cormorant-garamond-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/assets/fonts/eb-garamond-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'EB Garamond';
  font-style: italic;
  font-weight: 400 800;
  font-display: swap;
  src: url('/assets/fonts/eb-garamond-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url('/assets/fonts/jost-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Ink — the dark sections */
  --ink-950: #0b0a09;
  --ink-900: #11100e;
  --ink-850: #151311;
  --ink-800: #1a1815;
  --ink-700: #24211d;
  --bone: #ece5d8;
  --bone-dim: #a39b8c;
  --gold: #c6a15b;
  --gold-bright: #dfbd78;
  --gold-deep: #8f7443;

  /* Limestone — the light sections */
  --lime: #efeae1;
  --paper: #f6f3ed;
  --lime-deep: #e4ddd0;
  --text: #1b1916;
  --text-dim: #5c554a;
  --brass: #7a5b2b;

  --rule-dark: rgba(198, 161, 91, 0.2);
  --rule-light: rgba(27, 25, 22, 0.13);

  --font-display: 'Cormorant Garamond', 'Cormorant', Garamond, 'Times New Roman', serif;
  --font-text: 'EB Garamond', Garamond, Georgia, serif;
  --font-ui: 'Jost', 'Futura', 'Avenir Next', 'Century Gothic', system-ui, sans-serif;

  --gutter: clamp(1.25rem, 4.6vw, 4.75rem);
  --max: 1380px;
  --max-wide: 1600px;
  --nav-h: 76px;
  --section-y: clamp(5.5rem, 11vw, 10.5rem);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

@media (max-width: 720px) {
  :root { --nav-h: 64px; }
}

/* Cross-document transitions between the homepage and the History reader. */
@view-transition { navigation: auto; }

/* ========== BASE ======================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}
html:has(dialog[open]) { overflow: hidden; }

body {
  font-family: var(--font-text);
  font-size: clamp(1.0625rem, 0.3vw + 1rem, 1.1875rem);
  line-height: 1.65;
  color: var(--bone);
  background: var(--ink-900);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-kerning: normal;
}

img, svg, canvas, video { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ol, ul { list-style: none; }
[hidden] { display: none !important; }

::selection { background: rgba(198, 161, 91, 0.35); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.visually-hidden {
  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: 0.75rem; left: 0.75rem;
  z-index: 200;
  padding: 0.7rem 1.1rem;
  background: var(--gold);
  color: var(--ink-900);
  font: 500 0.72rem/1 var(--font-ui);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.3s var(--ease-out);
}
.skip-link:focus { transform: none; }

.wrap {
  width: min(100% - 2 * var(--gutter), var(--max));
  margin-inline: auto;
}
.wrap--wide { width: min(100% - 2 * var(--gutter), var(--max-wide)); }

.theme-dark  { background: var(--ink-900); color: var(--bone); }
.theme-light { background: var(--lime);    color: var(--text); }
.theme-paper { background: var(--paper);   color: var(--text); }

.section {
  position: relative;
  padding-block: var(--section-y);
}

/* ========== TYPE ======================================================== */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--brass);
}
.theme-dark .eyebrow { color: var(--gold); }
.eyebrow__num { font-variant-numeric: tabular-nums; }
.eyebrow__rule { width: 2.6rem; height: 1px; background: currentColor; opacity: 0.55; }

.display {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.7rem, 6vw, 5.9rem);
  line-height: 1;
  letter-spacing: -0.012em;
  text-wrap: balance;
}
.display em { font-style: italic; }

.dek {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.25rem, 1.55vw, 1.55rem);
  line-height: 1.45;
  color: var(--text-dim);
  text-wrap: balance;
}
.theme-dark .dek { color: var(--bone-dim); }

.num-qualifier {
  font-family: var(--font-ui);
  font-size: 0.3em;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  vertical-align: 0.5em;
  margin-right: 0.35em;
  opacity: 0.8;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 1.6rem clamp(2rem, 6vw, 6rem);
  align-items: end;
  margin-bottom: clamp(3rem, 6vw, 5.5rem);
}
.section-head .eyebrow { grid-column: 1 / -1; }
.section-head .dek { max-width: 30ch; justify-self: end; padding-bottom: 0.35rem; }
.section-head--center {
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
}
.section-head--center .dek { justify-self: center; max-width: 36ch; }

@media (max-width: 900px) {
  .section-head { grid-template-columns: 1fr; }
  .section-head .dek { justify-self: start; }
  .section-head--center .dek { justify-self: center; }
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-ui);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--brass);
  padding-block: 0.4rem;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size 0.6s var(--ease-out);
}
.text-link:hover { background-size: 100% 1px; }
.text-link svg { width: 1.1rem; height: 1.1rem; transition: transform 0.5s var(--ease-out); }
.text-link:hover svg { transform: translateX(4px); }
.theme-dark .text-link { color: var(--gold); }

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1.05rem 1.6rem 1.05rem 1.8rem;
  border: 1px solid var(--gold);
  border-radius: 999px;
  font-family: var(--font-ui);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--bone);
  transition: background-color 0.4s, color 0.4s;
}
.button svg { width: 1.1rem; height: 1.1rem; transition: transform 0.5s var(--ease-out); }
.button:hover { background: var(--gold); color: var(--ink-900); }
.button:hover svg { transform: translateX(4px); }

/* ========== REVEALS =====================================================
   Only hidden when scripts run, so the page reads fully without them.   */

html.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1.1s var(--ease-out), transform 1.1s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 90ms);
}
html.js .reveal.is-in { opacity: 1; transform: none; }

/* The observed box stays unclipped (a fully clipped target never reports an
   intersection); the photograph inside it is unmasked from the bottom. */
html.js .reveal-img { background: transparent; }
html.js .reveal-img > img {
  clip-path: inset(100% 0 0 0);
  transform: scale(1.14);
  transition: clip-path 1.5s var(--ease-out), transform 2s var(--ease-out);
}
html.js .reveal-img.is-in > img { clip-path: inset(0 0 0 0); transform: none; }

/* ========== HEADER ====================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--nav-h);
  color: var(--bone);
  background: rgba(14, 13, 11, 0.9);
  -webkit-backdrop-filter: saturate(140%) blur(16px);
  backdrop-filter: saturate(140%) blur(16px);
  border-bottom: 1px solid rgba(198, 161, 91, 0.16);
  transition: transform 0.6s var(--ease-out), background-color 0.5s, border-color 0.5s;
}
.site-header--overlay {
  position: fixed;
  inset: 0 0 auto 0;
  background: transparent;
  border-bottom-color: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.site-header--overlay.is-solid {
  background: rgba(14, 13, 11, 0.86);
  -webkit-backdrop-filter: saturate(140%) blur(16px);
  backdrop-filter: saturate(140%) blur(16px);
  border-bottom-color: rgba(198, 161, 91, 0.16);
}
.site-header.is-tucked { transform: translateY(-101%); }

.site-header__inner {
  height: 100%;
  width: min(100% - 2 * var(--gutter), var(--max-wide));
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 2.6vw, 2.75rem);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  margin-right: auto;
  color: var(--bone);
  text-decoration: none;
}
.brand__mark { width: 30px; height: 30px; color: var(--gold); flex: none; }
.brand__name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.28rem;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
}
.brand__est {
  font-family: var(--font-ui);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--bone-dim);
  padding-left: 0.85rem;
  border-left: 1px solid rgba(236, 229, 216, 0.25);
  white-space: nowrap;
}

.site-nav ul { display: flex; gap: clamp(1.1rem, 2.1vw, 2.2rem); }
.site-nav a {
  position: relative;
  display: block;
  padding-block: 0.5rem;
  font-family: var(--font-ui);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  color: rgba(236, 229, 216, 0.8);
  transition: color 0.3s;
}
.site-nav a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0.15rem;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.55s var(--ease-out);
}
.site-nav a:hover,
.site-nav a.is-active,
.site-nav a[aria-current="page"] { color: var(--bone); }
.site-nav a:hover::after,
.site-nav a.is-active::after,
.site-nav a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.72rem 1.15rem;
  border: 1px solid rgba(198, 161, 91, 0.55);
  border-radius: 999px;
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--bone);
  white-space: nowrap;
  transition: background-color 0.35s, color 0.35s, border-color 0.35s;
}
.header-cta::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(198, 161, 91, 0.2);
}
.header-cta:hover { background: var(--gold); border-color: var(--gold); color: var(--ink-900); }
.header-cta:hover::before { background: var(--ink-900); }

.menu-toggle {
  display: none;
  align-items: center;
  gap: 0.8rem;
  padding: 0.6rem 0 0.6rem 0.6rem;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.menu-toggle__icon { display: grid; gap: 6px; width: 26px; }
.menu-toggle__icon i { display: block; height: 1px; background: currentColor; }
.menu-toggle__icon i:last-child { width: 62%; justify-self: end; }

@media (max-width: 1180px) {
  .site-nav, .header-cta { display: none; }
  .menu-toggle { display: inline-flex; }
}
@media (max-width: 520px) {
  .brand__est { display: none; }
  .brand__name { font-size: 1.12rem; letter-spacing: 0.14em; }
  .menu-toggle__label { display: none; }
}

/* ========== MENU ======================================================== */

.site-menu {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--bone);
  background:
    radial-gradient(90% 60% at 85% 10%, rgba(198, 161, 91, 0.09), transparent 60%),
    var(--ink-950);
  opacity: 0;
  transition: opacity 0.45s var(--ease-out);
  overflow-y: auto;
}
.site-menu::backdrop { background: transparent; }
.site-menu.is-open { opacity: 1; }

.site-menu__inner {
  min-height: 100%;
  width: min(100% - 2 * var(--gutter), var(--max-wide));
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  padding-bottom: 2rem;
}
.site-menu__top {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--rule-dark);
}
.site-menu__close {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.6rem 0 0.6rem 0.6rem;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.site-menu__close svg { width: 20px; height: 20px; }

.site-menu__list { margin-block: auto; padding-block: 2.5rem; }
.site-menu__list a {
  display: flex;
  align-items: baseline;
  gap: clamp(1rem, 3vw, 2rem);
  padding-block: clamp(0.2rem, 0.8vh, 0.45rem);
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.1rem, 6.4vw, 4rem);
  line-height: 1.1;
  text-decoration: none;
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out), color 0.3s;
  transition-delay: calc(var(--i, 0) * 45ms + 80ms);
}
.site-menu.is-open .site-menu__list a { opacity: 1; transform: none; }
.site-menu__list a:hover { color: var(--gold-bright); }
.site-menu__list a span {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.site-menu__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule-dark);
}

/* ========== HERO ========================================================
   The owner's photograph is always shown whole — never cropped — as large
   as the screen allows. On larger screens it fills everything below the
   header and the title sits inside it (see the "full" block below); on
   phones and small tablets it is a plate with the title in a band beneath.
   A blurred glow of the same image fills any space the photograph's shape
   leaves, and the spiders hang over both.                                */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100svh;
  min-height: 560px;
  color: var(--bone);
  overflow: hidden;
  isolation: isolate;
  background: var(--ink-950);
}

.hero__ambient {
  position: absolute;
  inset: -6%;
  z-index: 0;
  background: #2b2233 center 35% / cover no-repeat;
  filter: blur(28px) saturate(1.3) brightness(0.62);
  transform: scale(1.08);
}
.hero__veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(11, 10, 9, 0.6) 0%, rgba(11, 10, 9, 0.12) 16%, rgba(11, 10, 9, 0.12) 58%, rgba(11, 10, 9, 0.88) 100%),
    radial-gradient(110% 85% at 50% 42%, transparent 45%, rgba(11, 10, 9, 0.55) 100%);
}

.hero__stage {
  position: relative;
  z-index: 2;
  flex: 1 1 0;
  min-height: 0;
  display: grid;
  place-items: end center;       /* on tall screens the spare height gathers above,
                                    where the spiders hang; the photograph sits on its title */
  padding: calc(var(--nav-h) + clamp(0.35rem, 1.4vh, 1.1rem)) var(--gutter) 0;
  container-type: size;
}
.hero__media {
  width: min(100cqw, 150cqh);    /* the whole 3:2 photograph, as large as fits */
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: #231b2b;           /* the dusk, while the photograph arrives */
  box-shadow:
    0 0 0 1px rgba(198, 161, 91, 0.22),
    0 2px 6px rgba(0, 0, 0, 0.35),
    0 40px 90px -30px rgba(0, 0, 0, 0.85);
  will-change: transform;
}
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
/* The photograph shows the moment it arrives, then settles from a slight zoom. */
html.js .hero__media img {
  transform: scale(1.06);
  transition: transform 3.2s var(--ease-out);
}
html.js .hero.is-loaded .hero__media img { transform: none; }

.hero__spiders {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 4;
  flex: none;
  width: min(100% - 2 * var(--gutter), var(--max-wide));
  margin-inline: auto;
  padding: clamp(0.75rem, 1.8vh, 1.4rem) 0 clamp(1.2rem, 3.8vh, 2.9rem);
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  column-gap: clamp(2rem, 5vw, 6rem);
  align-items: end;
  will-change: transform, opacity;
}

.hero__eyebrow {
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: clamp(0.4rem, 1.1vh, 0.8rem);
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-bright);
}
.hero__eyebrow svg { width: 24px; height: 24px; color: var(--gold); }

.hero__title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(3rem, min(6.1vw, 10.5vh), 7.4rem);   /* short screens keep room for the photograph */
  line-height: 0.95;
  letter-spacing: -0.015em;
  white-space: nowrap;
}
.hero__title .line { display: block; overflow: hidden; padding-bottom: 0.08em; }
.hero__title .line > span { display: inline-block; }
html.js .hero__title .line > span {
  transform: translateY(108%);
  transition: transform 1.3s var(--ease-out);
}
html.js .hero.is-ready .hero__title .line > span { transform: none; }

.hero__aside {
  padding: 0 0 0.45rem 1.5rem;
  border-left: 1px solid rgba(198, 161, 91, 0.5);
  max-width: 32rem;
}
.hero__tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.15rem, 1.45vw, 1.5rem);
  line-height: 1.4;
  color: rgba(236, 229, 216, 0.94);
  text-wrap: balance;
}
.hero__date {
  margin-top: 0.8rem;
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold-bright);
}
html.js .hero__eyebrow,
html.js .hero__aside {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 1.1s var(--ease-out) 0.25s, transform 1.1s var(--ease-out) 0.25s;
}
html.js .hero__aside { transition-delay: 0.45s; }
html.js .hero.is-ready .hero__eyebrow,
html.js .hero.is-ready .hero__aside { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; row-gap: 1.1rem; }
  .hero__aside { padding-bottom: 0; }
}
@media (max-width: 720px) {
  /* Phones: the photograph runs edge to edge. */
  .hero__stage { padding-inline: 0; }
  .hero__media { box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.9); }
  .hero__eyebrow { gap: 0.6rem; font-size: 0.62rem; letter-spacing: 0.2em; }
  .hero__eyebrow svg { width: 20px; height: 20px; }
  .hero__title { font-size: clamp(2.7rem, 13.5vw, 4.2rem); }
  .hero__aside { padding-left: 1.1rem; }
  .hero__date { letter-spacing: 0.16em; }
}
@media (max-width: 400px) {
  .hero__eyebrow svg { display: none; }
}

/* Full: on screens with room for it, the photograph fills the whole screen
   below the header — all of it, as large as possible — and the title sits
   inside it. Wide screens keep a slim glow at the sides; on taller ones the
   hero shortens to the photograph's own height.                          */
@media screen and (min-width: 901px) and (min-height: 560px) {
  .hero {
    height: min(100vh, calc(var(--nav-h) + 100vw / 1.5));
    height: min(100svh, calc(var(--nav-h) + 100vw / 1.5));
    container-type: size;
  }
  .hero__stage { padding: var(--nav-h) 0 0; }
  .hero__media { position: relative; }
  /* A shade along the foot of the photograph, only where the words sit. */
  .hero__media::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(0deg,
      rgba(11, 10, 9, 0.72) 0%, rgba(11, 10, 9, 0.46) 13%,
      rgba(11, 10, 9, 0.14) 27%, rgba(11, 10, 9, 0) 38%);
  }
  .hero__inner {
    --photo-w: min(100cqw, (100cqh - var(--nav-h)) * 1.5);   /* the photograph's width */
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    width: var(--photo-w);
    margin-inline: auto;
    padding: 0 calc(var(--photo-w) * 0.036) calc(var(--photo-w) * 0.026);
    column-gap: calc(var(--photo-w) * 0.05);
    /* The place line rides directly on the title, whatever the height of
       the tagline beside them, so the words stay low on the photograph. */
    grid-template-rows: 1fr auto;
    container-type: inline-size;   /* sizes below follow the photograph */
    text-shadow: 0 1px 16px rgba(0, 0, 0, 0.45);
  }
  .hero__eyebrow {
    grid-area: 1 / 1;
    align-self: end;
    margin-bottom: clamp(0.3rem, 0.9cqw, 0.8rem);
    font-size: clamp(0.72rem, 0.9cqw, 0.84rem);
  }
  /* 60% larger than first built (owner's request, 25 September 2026): the
     largest step that keeps a clear gap before the tagline and the place line
     below the tower's ground-floor windows. */
  .hero__title { grid-area: 2 / 1; font-size: clamp(4.8rem, 10.24cqw, 11.84rem); }
  .hero__aside { grid-area: 1 / 2 / 3 / 3; align-self: end; max-width: 34rem; }
  /* Large and a touch heavier, to read easily over the photograph. */
  .hero__tagline { font-size: clamp(1.3rem, 1.95cqw, 2rem); font-weight: 500; line-height: 1.32; }
  .hero__date { font-size: clamp(0.7rem, 0.92cqw, 0.84rem); }
}

/* ========== OVERVIEW ==================================================== */

.overview__head {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 1.6rem clamp(2rem, 6vw, 6rem);
  align-items: end;
}
.overview__head .eyebrow { grid-column: 1 / -1; }
.overview__lead {
  font-size: clamp(1.1rem, 0.4vw + 1rem, 1.3rem);
  line-height: 1.72;
  color: var(--text-dim);
  padding-bottom: 0.5rem;
}
.overview__lead::first-letter {
  float: left;
  font-family: var(--font-display);
  font-size: 4.3em;
  line-height: 0.8;
  padding: 0.06em 0.1em 0 0;
  color: var(--brass);
}

/* An outside and an inside view, side by side at one height: each photograph
   takes width in proportion to its shape, so tops and bottoms line up. */
.overview__media {
  display: flex;
  align-items: flex-start;
  gap: clamp(0.75rem, 1.6vw, 1.75rem);
  margin-block: clamp(3.5rem, 8vw, 7rem);
}
.frame { position: relative; overflow: hidden; background: var(--lime-deep); }
.frame img { width: 100%; height: 100%; object-fit: cover; }
.overview__media .frame { flex: var(--ar) 1 0; aspect-ratio: var(--ar); }
.frame--main { --ar: 1.3333; }   /* 4 : 3 */
.frame--side { --ar: 0.75; }     /* 3 : 4 */
.frame figcaption {
  position: absolute;
  left: 1rem; bottom: 0.9rem;
  font-family: var(--font-ui);
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.5);
}

.statement {
  max-width: 31ch;
  margin: clamp(4rem, 9vw, 8rem) auto 0;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2rem, 4.3vw, 4.1rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  text-align: center;
  text-wrap: balance;
}
.overview__coda {
  max-width: 46ch;
  margin: 2.6rem auto 0;
  text-align: center;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.2rem, 1.5vw, 1.45rem);
  line-height: 1.5;
  color: var(--text-dim);
  text-wrap: balance;
}

.facts {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-top: clamp(4rem, 9vw, 8rem);
  border-top: 1px solid var(--rule-light);
}
.fact {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: 0.6rem;
  padding: 2rem clamp(0.75rem, 1.6vw, 1.5rem) 0.5rem;
  border-left: 1px solid var(--rule-light);
}
.fact:first-child { border-left: 0; padding-left: 0; }
.fact dt {
  font-family: var(--font-ui);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  line-height: 1.5;
  color: var(--text-dim);
}
.fact dd {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.4rem, 3.6vw, 3.6rem);
  line-height: 1;
  color: var(--text);
  font-variant-numeric: lining-nums;
  white-space: nowrap;
}
.fact .num-qualifier { font-size: 0.26em; color: var(--brass); opacity: 1; }

@media (max-width: 1100px) {
  .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fact:nth-child(4) { border-left: 0; padding-left: 0; }
  .fact:nth-child(n + 4) { border-top: 1px solid var(--rule-light); }
}
@media (max-width: 900px) {
  .overview__head { grid-template-columns: 1fr; }
}
@media (max-width: 599px) {
  /* Phones: one above the other, each at full width. */
  .overview__media { flex-direction: column; }
  .overview__media .frame { flex: none; width: 100%; }
}
@media (max-width: 560px) {
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fact:nth-child(n) { border-left: 1px solid var(--rule-light); padding-left: clamp(0.75rem, 1.6vw, 1.5rem); }
  .fact:nth-child(odd) { border-left: 0; padding-left: 0; }
  .fact:nth-child(n + 3) { border-top: 1px solid var(--rule-light); }
}

/* ========== INTERLUDE =================================================== */

.interlude {
  position: relative;
  height: clamp(460px, 88vh, 920px);
  overflow: hidden;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  color: var(--bone);
  background: var(--ink-800);
}
.interlude__media { position: absolute; inset: -12% 0; z-index: -2; will-change: transform; }
.interlude__media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
.interlude::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(0deg, rgba(11, 10, 9, 0.78) 0%, rgba(11, 10, 9, 0.2) 45%, rgba(11, 10, 9, 0.05) 100%);
}
.interlude__text { padding-bottom: clamp(3rem, 8vh, 6rem); }
.interlude__line {
  font-family: var(--font-display);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(2.4rem, 6vw, 5.8rem);
  line-height: 1;
  letter-spacing: -0.01em;
  text-shadow: 0 4px 40px rgba(0, 0, 0, 0.4);
}
.interlude__meta {
  margin-top: 1.4rem;
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold-bright);
}

/* ========== FILM ========================================================
   The short film opens the timeline, as wide as the page allows and never
   taller than the screen. Its poster is a link to the film; with scripts,
   pressing play puts the player in the poster's place (see site.js). The
   play button sits beneath the title painted on the poster itself.     */

.film {
  width: min(100%, (100vh - var(--nav-h) - 4.5rem) * 16 / 9);
  width: min(100%, (100svh - var(--nav-h) - 4.5rem) * 16 / 9);
  margin: 0 auto clamp(4.5rem, 9vw, 8.5rem);
}
.film__screen {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--ink-950);
  box-shadow: 0 0 0 1px rgba(198, 161, 91, 0.3), 0 40px 90px -40px rgba(0, 0, 0, 0.9);
}
.film__cover { position: absolute; inset: 0; display: block; color: var(--bone); }
.film__cover > img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease-out); }
html.js .film__cover.is-in > img { transition: clip-path 1.5s var(--ease-out), transform 1.2s var(--ease-out); }
.film__cover:focus-visible { outline-offset: -4px; }
/* Keyboard focus also lights the play button, where the eye already is. */
.film__cover:focus-visible .film__play {
  background: rgba(17, 16, 14, 0.8);
  border-color: var(--gold-bright);
  box-shadow: 0 0 0 3px rgba(223, 189, 120, 0.55), 0 14px 40px -14px rgba(0, 0, 0, 0.7);
}
.film__cover:focus-visible .film__play-icon { background: var(--gold-bright); }
.film__screen video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: var(--ink-950);
}

.film__play {
  position: absolute;
  left: 29%;
  top: 62%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: 1.1rem;
  padding: 0.5rem 1.6rem 0.5rem 0.5rem;
  border: 1px solid rgba(223, 189, 120, 0.55);
  border-radius: 999px;
  background: rgba(17, 16, 14, 0.62);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 14px 40px -14px rgba(0, 0, 0, 0.7);
  font-family: var(--font-ui);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background-color 0.4s, border-color 0.4s, opacity 0.9s var(--ease-out) 0.5s;
}
html.js .film__cover .film__play { opacity: 0; }
html.js .film__cover.is-in .film__play { opacity: 1; }
.film__play-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(2.9rem, 3.4vw, 3.5rem);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--gold);
  color: var(--ink-900);
  transition: background-color 0.4s, transform 0.6s var(--ease-out);
}
/* The triangle is drawn with its centre of mass at the middle of its box,
   so it looks centred in the circle without any further nudge. */
.film__play-icon svg { width: 44%; height: 44%; }
/* A slow ring, like a ripple, to say this picture moves. */
.film__play-icon::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid var(--gold-bright);
  border-radius: 50%;
  opacity: 0;
  animation: film-ring 3.2s var(--ease-out) 1.6s infinite;
}
@keyframes film-ring {
  0% { opacity: 0.8; transform: scale(1); }
  70%, 100% { opacity: 0; transform: scale(1.7); }
}
.film__play-time {
  margin-left: 1rem;
  padding-left: 1rem;
  border-left: 1px solid rgba(223, 189, 120, 0.45);
  color: var(--gold-bright);
  font-variant-numeric: tabular-nums;
}
@media (hover: hover) and (pointer: fine) {
  .film__cover:hover > img,
  html.js .film__cover.is-in:hover > img { transform: scale(1.025); }
  .film__cover:hover .film__play { background: rgba(17, 16, 14, 0.8); border-color: var(--gold-bright); }
  .film__cover:hover .film__play-icon { background: var(--gold-bright); transform: scale(1.06); }
}

.film__caption {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.4rem 2rem;
  margin-top: 1.25rem;
}
.film__title {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.25rem, 1.6vw, 1.6rem);
  line-height: 1.3;
}
.film__meta {
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}
.film__keep { white-space: nowrap; }

@media (max-width: 900px) {
  /* Smaller screens: the round button alone; the running time is below. */
  .film__play { padding: 0.4rem; border-radius: 50%; }
  .film__play-text { display: none; }
}
@media (max-width: 560px) {
  .film__play-icon { width: 2.6rem; }
  .film__caption { flex-direction: column; }
  /* Two tidy lines rather than a break beside a dot. */
  .film__kind { display: block; margin-bottom: 0.3rem; }
  .film__sep { display: none; }
}

/* ========== TIMELINE ==================================================== */

.tl-wrap { position: relative; --marker: 34%; }
.tl-rail {
  position: absolute;
  top: 0; bottom: 0;
  left: var(--marker);
  width: 1px;
  background: var(--rule-dark);
}
.tl-rail span {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--gold-deep), var(--gold));
  transform: scaleY(var(--progress, 0));
  transform-origin: top;
}

.tl__entry {
  display: grid;
  grid-template-columns: var(--marker) minmax(0, 1fr);
  padding-bottom: clamp(4.5rem, 9vw, 8.5rem);
}
.tl__entry:last-child { padding-bottom: 0; }

.tl__marker {
  position: sticky;
  top: calc(var(--nav-h) + 9vh);
  align-self: start;
  padding-right: clamp(1.5rem, 4vw, 4rem);
  text-align: right;
}
.tl__numeral {
  display: block;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(3.8rem, 8vw, 8.4rem);
  line-height: 0.9;
  letter-spacing: -0.02em;
  font-variant-numeric: lining-nums;
  color: #66615a;   /* quiet, but still 3:1 against the ink */
  transition: color 0.8s var(--ease-out);
}
.tl__entry.is-active .tl__numeral { color: var(--gold); }

.tl__body { position: relative; padding-left: clamp(2rem, 5vw, 5rem); }
.tl__body::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 0.9rem;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--ink-900);
  border: 1px solid var(--gold-deep);
  transition: background-color 0.6s, border-color 0.6s, box-shadow 0.6s;
}
.tl__entry.is-active .tl__body::before {
  background: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 0 0 6px rgba(198, 161, 91, 0.15);
}

.tl__art { aspect-ratio: 3 / 2; overflow: hidden; background: var(--ink-800); }
.tl__art img { width: 100%; height: 100%; object-fit: cover; }

.tl__text {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 0.9rem clamp(1.5rem, 3vw, 3rem);
  margin-top: 1.8rem;
}
.tl__date {
  grid-column: 1 / -1;
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
}
.tl__date .num-qualifier { font-size: 1em; vertical-align: 0; margin-right: 0.4em; opacity: 0.75; }
.tl__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.7rem, 2.4vw, 2.3rem);
  line-height: 1.12;
  text-wrap: balance;
}
.tl__desc { color: var(--bone-dim); }

@media (max-width: 1100px) {
  .tl__text { grid-template-columns: 1fr; }
}
@media (max-width: 800px) {
  .tl-wrap { --marker: 0px; }
  .tl-rail { left: 0; }
  .tl__entry { grid-template-columns: 1fr; }
  .tl__marker { position: static; padding: 0 0 1rem 1.6rem; text-align: left; }
  .tl__numeral { font-size: clamp(3rem, 14vw, 4.4rem); }
  .tl__body { padding-left: 1.6rem; }
  .tl__body::before { top: -3.1rem; }
}

/* ========== LINE OF OWNERSHIP =========================================== */

.owners__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(3rem, 7vw, 8rem);
  align-items: start;
}
.owners__head {
  position: sticky;
  top: calc(var(--nav-h) + 4rem);
  display: grid;
  gap: 1.6rem;
}
.owners__list { counter-reset: owner; border-top: 1px solid var(--rule-light); }
.owner {
  counter-increment: owner;
  display: grid;
  grid-template-columns: 2.6rem minmax(9.5rem, 0.8fr) minmax(0, 1.4fr);
  align-items: baseline;
  gap: 1rem;
  padding: 1.3rem 0;
  border-bottom: 1px solid var(--rule-light);
  transition: background-color 0.4s;
}
.owner::before {
  content: counter(owner, decimal-leading-zero);
  font-family: var(--font-ui);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}
.owner__dates {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass);
}
.owner__name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.45rem, 2vw, 1.9rem);
  line-height: 1.15;
  transition: transform 0.5s var(--ease-out);
}
.owner:hover .owner__name { transform: translateX(6px); }
.owner--current { border-bottom-color: rgba(122, 91, 43, 0.5); }
.owner--current .owner__name { font-style: italic; color: var(--brass); }
.owner--current .owner__name::after {
  content: '';
  display: inline-block;
  width: 7px; height: 7px;
  margin-left: 0.8rem;
  vertical-align: 0.3em;
  border-radius: 50%;
  background: var(--brass);
  box-shadow: 0 0 0 4px rgba(122, 91, 43, 0.15);
}

@media (max-width: 900px) {
  .owners__grid { grid-template-columns: 1fr; }
  .owners__head { position: static; }
}
@media (max-width: 560px) {
  .owner { grid-template-columns: 2.2rem minmax(0, 1fr); row-gap: 0.25rem; }
  .owner__name { grid-column: 2; }
}

/* ========== GHOSTS & LEGENDS ============================================ */

.legends { overflow: hidden; isolation: isolate; background: var(--ink-950); }
.legends__backdrop {
  position: absolute;
  inset: 0 0 auto 0;
  height: min(100vh, 900px);
  z-index: -1;
}
.legends__backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
  opacity: 0.5;
  filter: saturate(0.7) contrast(1.05);
}
.legends__backdrop::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(11, 10, 9, 0.55) 0%, rgba(11, 10, 9, 0.35) 40%, var(--ink-950) 100%),
    radial-gradient(80% 60% at 50% 20%, transparent, rgba(11, 10, 9, 0.6));
}

.legends__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.75rem);
}
.legend {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(2rem, 3vw, 3rem) clamp(1.5rem, 2.4vw, 2.5rem);
  background: linear-gradient(180deg, rgba(36, 31, 26, 0.72), rgba(17, 16, 14, 0.9));
  border: 1px solid rgba(198, 161, 91, 0.14);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: border-color 0.5s, transform 0.7s var(--ease-out);
}
.legend::before {
  content: '';
  position: absolute;
  inset: -1px -1px auto;
  height: 2px;
  background: linear-gradient(90deg, transparent, #8c1c14, transparent);
  opacity: 0;
  transition: opacity 0.5s;
}
.legend:hover { border-color: rgba(198, 161, 91, 0.35); transform: translateY(-6px); }
.legend:hover::before { opacity: 1; }
.legend__num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 3.2rem;
  line-height: 1;
  color: var(--gold);
  margin-bottom: 1.5rem;
}
.legend__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.7rem, 2.2vw, 2.1rem);
  line-height: 1.12;
  margin-bottom: 1.1rem;
}
.legend p { color: var(--bone-dim); }
.legend p + p { margin-top: 0.85rem; }
.legend .legend__quote {
  margin-top: auto;
  padding-top: 1.5rem;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.32rem;
  line-height: 1.4;
  color: #d9a08f;
}
.legend__quote::before {
  content: '';
  display: block;
  width: 2.2rem;
  height: 1px;
  margin: 0.4rem 0 1.2rem;
  background: rgba(198, 161, 91, 0.45);
}

@media (max-width: 1000px) {
  .legends__grid { grid-template-columns: 1fr; max-width: 640px; margin-inline: auto; }
}

/* ========== GALLERY ===================================================== */

.gallery__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: -1.5rem 0 clamp(1.75rem, 3vw, 2.5rem);
}
html:not(.js) .gallery__filters { display: none; }
.gallery__filters button {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.7rem 1.15rem;
  border: 1px solid var(--rule-light);
  border-radius: 999px;
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  transition: color 0.3s, border-color 0.3s, background-color 0.3s;
}
.gallery__filters button span { font-variant-numeric: tabular-nums; }
.gallery__filters button:hover { color: var(--text); border-color: rgba(27, 25, 22, 0.35); }
.gallery__filters button[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--paper); }

.gallery-grid {
  --row: clamp(150px, 21vw, 330px);
  display: flex;
  flex-wrap: wrap;
  gap: clamp(6px, 0.7vw, 12px);
}
.gallery-grid::after { content: ''; flex-grow: 100000; }
.g-item {
  position: relative;
  display: block;
  flex-grow: calc(var(--r) * 100);
  flex-basis: calc(var(--r) * var(--row));
  aspect-ratio: var(--r);
  overflow: hidden;
  background: var(--lime-deep);
  cursor: zoom-in;
}
.g-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease-out), filter 0.6s;
}
.g-item::after {
  content: attr(data-caption);
  position: absolute;
  inset: auto 0 0 0;
  padding: 2.5rem 1rem 0.9rem;
  font-family: var(--font-ui);
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.5;
  color: #fff;
  background: linear-gradient(0deg, rgba(11, 10, 9, 0.75), transparent);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
  pointer-events: none;
}
@media (hover: hover) and (pointer: fine) {
  .g-item:hover img { transform: scale(1.045); }
  .g-item:hover::after { opacity: 1; transform: none; }
}
.g-item:focus-visible { outline-offset: 2px; }
.gallery-grid.is-filtering .g-item { view-transition-name: var(--vt); }

@media (max-width: 700px) {
  .gallery-grid { --row: 118px; }
  .g-item::after { display: none; }
}

/* ========== PLANS ======================================================= */

.plans__row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 2rem);
}
.plan__mat {
  display: block;
  padding: clamp(0.9rem, 1.4vw, 1.4rem);
  background: #f3ecdd;
  border: 1px solid #e0d5bf;
  box-shadow: 0 1px 2px rgba(27, 25, 22, 0.08), 0 18px 40px -18px rgba(27, 25, 22, 0.35);
  cursor: zoom-in;
  isolation: isolate;
  transition: transform 0.7s var(--ease-out), box-shadow 0.7s var(--ease-out);
}
.plan__mat:hover {
  transform: translateY(-8px);
  box-shadow: 0 2px 4px rgba(27, 25, 22, 0.1), 0 30px 60px -22px rgba(27, 25, 22, 0.45);
}
.plan__mat img {
  width: 100%;
  aspect-ratio: 0.763;
  height: auto;
  object-fit: contain;
  mix-blend-mode: multiply;
}
.plan__caption {
  margin-top: 1rem;
  font-size: 0.98rem;
  line-height: 1.4;
  color: var(--text-dim);
}
.plan__caption span {
  display: block;
  margin-bottom: 0.3rem;
  font-family: var(--font-ui);
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--brass);
}
.plans__more { margin-top: clamp(2.5rem, 5vw, 4rem); }

@media (max-width: 1000px) {
  .plans__row {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(200px, 42vw);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 1.25rem;
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
    scroll-padding-inline: var(--gutter);
    scrollbar-width: thin;
  }
  .plan { scroll-snap-align: start; }
}
@media (max-width: 560px) {
  .plans__row { grid-auto-columns: 68vw; }
}

/* ========== NOTABLE FIGURES ============================================= */

.figures__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--rule-light);
}
.figure {
  display: flex;
  flex-direction: column;
  padding: clamp(1.75rem, 2.6vw, 2.6rem) clamp(1.1rem, 2vw, 2rem) clamp(2rem, 3vw, 3rem);
  border-bottom: 1px solid var(--rule-light);
  border-left: 1px solid var(--rule-light);
  transition: background-color 0.5s;
}
.figure:nth-child(4n + 1) { border-left: 0; padding-left: 0; }
.figure:hover { background: rgba(122, 91, 43, 0.045); }
.figure__mono {
  width: 3.4rem; height: 3.4rem;
  display: grid;
  place-items: center;
  margin-bottom: 1.6rem;
  border: 1px solid rgba(122, 91, 43, 0.4);
  border-radius: 50%;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.3rem;
  letter-spacing: 0.02em;
  color: var(--brass);
}
.figure__era {
  font-family: var(--font-ui);
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.figure__name {
  margin-top: 0.7rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.6rem, 2vw, 1.95rem);
  line-height: 1.1;
}
.figure__role {
  margin-top: 0.35rem;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--brass);
}
.figure__desc { margin-top: 1rem; font-size: 1rem; line-height: 1.65; color: var(--text-dim); }

@media (max-width: 1100px) {
  .figures__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .figure:nth-child(n) { border-left: 1px solid var(--rule-light); padding-left: clamp(1.1rem, 2vw, 2rem); }
  .figure:nth-child(odd) { border-left: 0; padding-left: 0; }
}
@media (max-width: 620px) {
  .figures__grid { grid-template-columns: 1fr; }
  .figure:nth-child(n) { border-left: 0; padding-left: 0; }
}

/* ========== THE FULL ACCOUNT ============================================ */

.account {
  overflow: hidden;
  background:
    radial-gradient(70% 90% at 80% 50%, rgba(198, 161, 91, 0.08), transparent 70%),
    var(--ink-900);
}
.account__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(3rem, 7vw, 8rem);
  align-items: center;
}
.account__copy { display: grid; gap: 1.6rem; justify-items: start; }
.account__copy > p:not(.eyebrow):not(.dek) { color: var(--bone-dim); max-width: 46ch; }
.account__meta {
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold) !important;
}
.account__copy .button { margin-top: 0.8rem; }

.book {
  position: relative;
  width: min(100%, 400px);
  margin-inline: auto;
  aspect-ratio: 0.72;
  perspective: 1400px;
}
.book__cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12% 12%;
  text-align: center;
  color: #33291f;
  background: #efe6d4;
  border: 1px solid #e2d6bd;
  border-radius: 2px 4px 4px 2px;
  box-shadow:
    inset 12px 0 18px -10px rgba(90, 68, 34, 0.35),
    0 2px 4px rgba(0, 0, 0, 0.4),
    0 40px 80px -30px rgba(0, 0, 0, 0.8);
  transform: rotateY(-16deg) rotateX(4deg);
  transform-origin: left center;
  transition: transform 1.2s var(--ease-out);
}
.book:hover .book__cover { transform: rotateY(-6deg) rotateX(2deg); }
.book__cover::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.42'/%3E%3C/svg%3E");
  opacity: 0.16;
  mix-blend-mode: multiply;
  pointer-events: none;
}
.book__mark { font-family: var(--font-ui); font-size: 0.6rem; letter-spacing: 0.5em; color: #a8823c; }
.book__rule { width: 36px; height: 1px; margin: 1.3rem 0; background: rgba(120, 96, 56, 0.35); }
.book__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.9rem, 3.2vw, 2.7rem);
  line-height: 1.05;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.book__subtitle {
  margin-top: 0.8rem;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.12rem;
  line-height: 1.45;
  color: #6b5c48;
}
.book__byline {
  font-family: var(--font-ui);
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

@media (max-width: 900px) {
  .account__grid { grid-template-columns: 1fr; }
  .book { width: min(78%, 340px); }
}

/* ========== PRIVATE PROPERTY NOTICE ===================================== */

.notice {
  background:
    radial-gradient(60% 70% at 50% 0%, rgba(198, 161, 91, 0.07), transparent 70%),
    var(--ink-950);
  color: var(--bone);
}
.notice__panel {
  position: relative;
  max-width: 940px;
  margin-inline: auto;
  padding: clamp(2.5rem, 6vw, 5.5rem) clamp(1.4rem, 5vw, 5rem);
  border: 1px solid rgba(198, 161, 91, 0.3);
  text-align: center;
}
.notice__panel::before {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(198, 161, 91, 0.12);
  pointer-events: none;
}
.notice__crest { width: 44px; height: 44px; margin: 0 auto 1.6rem; color: var(--gold); }
.notice__title {
  margin-top: 1.1rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.3rem, 5vw, 4rem);
  line-height: 1;
  letter-spacing: 0.08em;
}
.notice__rule { width: 64px; height: 1px; margin: 2rem auto 2.4rem; background: var(--gold); opacity: 0.7; }
.notice__copy {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1rem, 1.3vw, 1.17rem);
  line-height: 1.9;
  letter-spacing: 0.045em;
  color: rgba(236, 229, 216, 0.92);
  text-wrap: pretty;
}
.notice__copy p + p { margin-top: 1.4rem; }
.notice__copy a {
  color: var(--gold-bright);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
  overflow-wrap: anywhere;
}
.notice__copy a:hover { color: var(--bone); }

/* ========== FOOTER ====================================================== */

.site-footer {
  position: relative;
  padding: clamp(4.5rem, 9vw, 8rem) 0 2rem;
  background: var(--ink-950);
  color: var(--bone);
  border-top: 1px solid rgba(198, 161, 91, 0.1);
  overflow: hidden;
}
/* The name in gilded letters: a gold gradient cut out by the type. The
   padding gives the gradient room for the tall letters, which rise above
   the tight line box; the negative margins keep the layout unchanged.    */
.site-footer__mark {
  padding-block: 0.12em;
  margin: -0.12em 0 calc(clamp(3rem, 6vw, 5rem) - 0.12em);
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(3.4rem, 13.5vw, 14.5rem);
  line-height: 0.82;
  letter-spacing: -0.03em;
  white-space: nowrap;
  color: var(--gold);
  user-select: none;
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .site-footer__mark {
    background: linear-gradient(180deg, #f0dcad 0%, var(--gold-bright) 32%, var(--gold) 58%, var(--gold-deep) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }
}
.site-footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 2.5rem clamp(2rem, 5vw, 5rem);
  padding-bottom: clamp(3rem, 5vw, 4rem);
}
.site-footer__desc { max-width: 36ch; color: var(--bone-dim); font-size: 1rem; }
.site-footer h2 {
  margin-bottom: 1.1rem;
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
}
.site-footer li + li { margin-top: 0.45rem; }
.site-footer__grid a {
  color: var(--bone-dim);
  text-decoration: none;
  font-size: 1rem;
  transition: color 0.3s;
}
.site-footer__grid a:hover { color: var(--bone); }
.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(198, 161, 91, 0.1);
  font-family: var(--font-ui);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: rgba(163, 155, 140, 0.8);
}
.site-footer__bottom a { color: inherit; text-decoration: none; letter-spacing: 0.2em; text-transform: uppercase; }
.site-footer__bottom a:hover { color: var(--gold); }

.site-footer--compact { padding-top: clamp(3.5rem, 7vw, 5.5rem); }

@media (max-width: 800px) {
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .site-footer__grid > :first-child { grid-column: 1 / -1; }
}

/* ========== LIGHTBOX ====================================================
   Each photograph is sized from its own proportions to the largest box the
   stage allows (container units), never from whichever file has loaded, so
   nothing jumps. Two slides cross-fade; inside each, the sharp image fades in
   over the thumbnail already in the browser.                              */

dialog.lightbox {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: clip;           /* a drifting slide must never make the viewer scroll */
  color: var(--bone);
  background:
    radial-gradient(70% 60% at 50% 45%, rgba(198, 161, 91, 0.05), transparent 70%),
    var(--ink-950);
  opacity: 0;
  transition: opacity 0.4s var(--ease-out);
}
dialog.lightbox::backdrop { background: var(--ink-950); }
dialog.lightbox.is-open { opacity: 1; }
.lightbox__frame { display: flex; flex-direction: column; height: 100%; }

.lightbox__bar {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: var(--nav-h);
  padding-inline: var(--gutter);
  border-bottom: 1px solid rgba(198, 161, 91, 0.12);
}
.lightbox__count {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  color: var(--bone-dim);
  font-variant-numeric: tabular-nums;
}
.lightbox__count b { color: var(--gold); font-weight: 500; }
.lightbox__close {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.6rem 0 0.6rem 0.6rem;
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.lightbox__close svg { width: 20px; height: 20px; }

.lightbox__stage {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(0.5rem, 2vw, 2rem);
  padding: clamp(0.75rem, 3vh, 2.25rem) clamp(0.5rem, 2vw, 2rem) 0;
  touch-action: pan-y pinch-zoom;
}
.lightbox__slides {
  position: relative;
  height: 100%;
  min-height: 0;
  container-type: size;
}
.lightbox__slide {
  --ratio: 1.5;
  --drift: 0%;
  position: absolute;
  inset: 0;
  margin: auto;
  width: min(100cqw, 100cqh * var(--ratio));
  height: min(100cqh, 100cqw / var(--ratio));
  overflow: hidden;
  opacity: 0;
  transform: translateX(var(--drift));
  transition: opacity 0.55s var(--ease-out), transform 0.8s var(--ease-out);
  pointer-events: none;
}
.lightbox__slide.is-current { opacity: 1; pointer-events: auto; }
.lightbox__slide.is-instant { transition: none; }
.lightbox__slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}
.lightbox__slide .lightbox__sharp { opacity: 0; transition: opacity 0.45s var(--ease-out); }
.lightbox__slide.is-sharp .lightbox__sharp { opacity: 1; }
/* Once the sharp image is in, retire the preview beneath it. */
.lightbox__slide.is-sharp .lightbox__soft { opacity: 0; transition: opacity 0.2s linear 0.45s; }

/* Drawings are scans on white: multiply them into a paper mat. */
dialog.lightbox--plans .lightbox__slide { background: #efe6d4; isolation: isolate; }
dialog.lightbox--plans .lightbox__slide img { padding: clamp(0.6rem, 3%, 1.5rem); mix-blend-mode: multiply; }

.lightbox__caption {
  flex: none;
  min-height: 4.25rem;
  padding: 1rem var(--gutter) 1.5rem;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.05rem, 1.3vw, 1.25rem);
  line-height: 1.4;
  text-align: center;
  color: var(--bone-dim);
  transition: opacity 0.3s var(--ease-out);
}
.lightbox__caption.is-changing { opacity: 0; }

.lightbox__nav {
  width: clamp(44px, 4vw, 56px);
  height: clamp(44px, 4vw, 56px);
  display: grid;
  place-items: center;
  border: 1px solid rgba(198, 161, 91, 0.35);
  border-radius: 50%;
  color: var(--gold);
  transition: background-color 0.3s, color 0.3s;
}
.lightbox__nav:hover { background: var(--gold); color: var(--ink-900); }
.lightbox__nav svg { width: 20px; height: 20px; }

@media (max-width: 700px) {
  .lightbox__stage { grid-template-columns: 1fr; padding-inline: 0; }
  .lightbox__nav { display: none; }
}

/* ========== MOTION PREFERENCES ========================================== */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
  html.js .reveal,
  html.js .reveal-img > img,
  html.js .hero__media img,
  html.js .hero__title .line > span,
  html.js .hero__eyebrow,
  html.js .hero__aside { opacity: 1; transform: none; clip-path: none; }
}

@media print {
  .site-header, .site-menu, .lightbox, .hero__spiders, .gallery__filters, .film__play { display: none !important; }
  .hero { height: auto; min-height: 0; }
  html.js .reveal, html.js .reveal-img > img { opacity: 1; transform: none; clip-path: none; }
  /* Printers usually skip backgrounds, which would leave the gilded name blank. */
  .site-footer__mark { background: none; color: var(--brass); -webkit-text-fill-color: currentColor; }
}
