/* Exposure — image-forward, minimal, durable. EB Garamond, cream/ink, one oxblood accent. */

@font-face {
  font-family: "EB Garamond";
  src: url("fonts/EBGaramond-var.woff2") format("woff2");
  font-weight: 400 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "EB Garamond";
  src: url("fonts/EBGaramond-Italic-var.woff2") format("woff2");
  font-weight: 400 800; font-style: italic; font-display: swap;
}

:root {
  --bg: #f6f4ef; --panel: #efece4; --ink: #1b1916; --grey: #6c675f;
  --faint: #a59e93; --accent: #8a4b3b; --line: #e3ded4;
  --serif: "EB Garamond", Georgia, "Times New Roman", serif;
  --maxw: 76rem; --prose: 34rem; --gap: clamp(2.6rem, 6vw, 5.5rem);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121214; --panel: #1a1a1d; --ink: #e9e4da; --grey: #a49d91;
    --faint: #6b6660; --accent: #c8866c; --line: #2a2a2e;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--serif); font-size: clamp(1.02rem, 0.55rem + 0.95vw, 1.2rem);
  line-height: 1.62; font-feature-settings: "kern" 1, "liga" 1, "onum" 1;
  text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
/* eleventy-img wrapper is presentational only (alt lives on the img); display:contents stops the
   <picture> flex-item from grabbing its intrinsic width (2:1 masters = 2048px) and overflowing the
   single-plate page. The img's own max-width caps apply directly against the flex container. */
picture { display: contents; }
a { color: inherit; text-decoration-color: var(--faint); text-underline-offset: 2px; }
a:hover { text-decoration-color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
main:focus { outline: none; }

.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--bg);
  padding: .6rem 1rem; z-index: 10;
}
.skip-link:focus { left: .5rem; top: .5rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }

/* ---- chrome ---- */
.site-head, .site-foot { max-width: var(--maxw); margin: 0 auto; padding: 1.5rem clamp(1.1rem, 4vw, 3rem); }
.site-head { display: flex; align-items: baseline; gap: 1rem; }
.wordmark {
  font-size: .82rem; letter-spacing: .42em; text-transform: uppercase;
  color: var(--accent); text-decoration: none; font-weight: 500;
}
.crumb { font-style: italic; color: var(--grey); font-size: .98rem; text-decoration: none; display: inline-block; padding: .35rem 0; }
.crumb::before { content: "·"; color: var(--faint); margin-right: .85rem; font-style: normal; }
.crumb:hover { color: var(--accent); }

/* ---- volume switcher (nav decision: VA panel, Option C) — resting state == the old breadcrumb;
        the full shelf opens on intent. Native <details>: zero JS, CSP-clean, pjax-self-healing. ---- */
.vol-switch { display: inline-block; position: relative; }
.vol-switch > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: baseline; gap: .3rem; }
.vol-switch > summary::-webkit-details-marker { display: none; }
.crumb-caret { font-size: .7em; color: var(--faint); transition: transform .15s; }
.vol-switch[open] > summary .crumb-caret { transform: rotate(180deg); }
.vol-menu {
  position: absolute; left: 0; top: calc(100% + .4rem); z-index: 40;
  display: flex; flex-direction: column; min-width: 11rem; max-height: 70vh; overflow-y: auto;
  background: var(--bg); border: 1px solid var(--line); border-radius: .4rem;
  padding: .35rem; box-shadow: 0 6px 24px rgba(0,0,0,.10);
}
.vol-menu a {
  font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; text-decoration: none;
  color: var(--grey); padding: .55rem .7rem; border-radius: .25rem;
}
.vol-menu a:hover, .vol-menu a:focus-visible { color: var(--accent); background: var(--panel); }
.vol-menu a[aria-current="page"] { color: var(--accent); font-weight: 600; }
.vol-menu .vol-root { color: var(--ink); border-bottom: 1px solid var(--line); margin-bottom: .25rem; padding-bottom: .6rem; }
@media (max-width: 640px) { .vol-menu { left: auto; right: 0; min-width: 9.5rem; } }
@media (prefers-reduced-motion: reduce) { .crumb-caret { transition: none; } }
.site-foot { margin-top: var(--gap); padding-top: 1.6rem; padding-bottom: 2.6rem; border-top: 1px solid var(--line); }
.site-foot nav { display: flex; gap: 1.6rem; flex-wrap: wrap; }
.site-foot nav a {
  font-size: .76rem; letter-spacing: .22em; text-transform: uppercase;
  text-decoration: none; color: var(--grey);
}
.site-foot nav a:hover { color: var(--accent); }
.site-foot nav a, .wordmark, .seq-nav a, .project-links a, .back a, .single-kicker a { display: inline-block; }
.site-foot nav a, .seq-nav a { padding: .42rem 0; }   /* >=24px tap target (WCAG 2.5.8) */
.wordmark { padding: .35rem 0; }
.fineprint { color: var(--grey); font-size: .82rem; margin: 1rem 0 0; max-width: 50rem; }
.privacy-note { font-size: .74rem; color: var(--faint); margin-top: .45rem; }   /* web-only analytics disclosure — quieter than the copyright line */

main { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(1.1rem, 4vw, 3rem); }

/* ---- landing ---- */
.hero { text-align: center; padding: clamp(3rem, 11vw, 8rem) 0 clamp(2rem, 6vw, 4rem); }
.series-title { font-size: clamp(3rem, 12vw, 6rem); font-weight: 400; font-style: italic; margin: 0; letter-spacing: .01em; }
.series-statement { max-width: 40rem; margin: 1.4rem auto 0; color: var(--grey); font-size: 1.15rem; }

.volumes { display: grid; gap: var(--gap); padding-bottom: var(--gap); }
.volume {
  display: grid; grid-template-columns: 1fr; gap: 1.6rem; align-items: center;
  text-decoration: none; max-width: 30rem; margin: 0 auto;
}
@media (min-width: 720px) {
  .volume { grid-template-columns: minmax(0, 26rem) 1fr; max-width: none; align-items: center; }
}
/* square index tile for every volume, so a 2:1 landscape cover (Land) sits level with the square ones */
.volume-cover { aspect-ratio: 1 / 1; overflow: hidden; border: 1px solid var(--line); }
.volume-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.volume:hover .volume-cover { outline: 1px solid var(--accent); outline-offset: -1px; }
.kicker { font-size: .76rem; letter-spacing: .26em; text-transform: uppercase; color: var(--accent); margin: 0 0 .4rem; }
.volume-name { font-size: clamp(2.2rem, 6vw, 3.2rem); font-style: italic; font-weight: 400; margin: 0; }
.volume-tagline { color: var(--grey); margin: .8rem 0 0; max-width: 32rem; }
.volume-go { color: var(--accent); margin: 1.2rem 0 0; letter-spacing: .04em; }

/* ---- project head ---- */
.project-head { text-align: center; padding: clamp(2.6rem, 8vw, 5.5rem) 0 clamp(1.6rem, 4vw, 3rem); }
.project-title { font-size: clamp(2.8rem, 10vw, 5rem); font-style: italic; font-weight: 400; margin: 0; }
.lede { max-width: 40rem; margin: 1.2rem auto 0; color: var(--grey); }
.project-links { margin: 1.4rem 0 0; }
.project-links a { font-size: .8rem; letter-spacing: .18em; text-transform: uppercase; color: var(--grey); }
.project-note { color: var(--grey); font-size: .9rem; margin: 1.4rem auto 0; max-width: 34rem; }
.project-note a { color: var(--grey); }

/* ---- gallery ---- */
.gallery { display: flex; flex-direction: column; align-items: center; gap: var(--gap); padding-bottom: var(--gap); }
.movement { text-align: center; padding: clamp(2.4rem, 7vw, 5rem) 0 .5rem; display: flex; flex-direction: column; gap: .4rem; margin: 0; font-weight: 400; }
.movement::before { content: ""; display: block; width: 2.4rem; height: 1px; background: var(--line); margin: 0 auto 1.4rem; }
.mv-label { font-style: italic; color: var(--accent); font-size: 1.8rem; line-height: 1; }
.mv-name { letter-spacing: .3em; text-transform: uppercase; font-size: 1.08rem; }
.mv-desc { color: var(--grey); font-style: italic; font-size: 1.15rem; line-height: 1.5; max-width: 34rem; margin: .15rem auto 0; }
.plate { margin: 0; width: 100%; max-width: 44rem; text-align: center; }
.plate-link { display: block; text-decoration: none; }
.plate-img { width: 100%; border: 1px solid var(--line); transition: outline-color .2s, transform .2s; }
.plate-link:hover .plate-img, .plate-link:focus-visible .plate-img { outline: 1px solid var(--accent); outline-offset: -1px; }
/* Landscape (2:1) volume — give the letterbox plate more width so it lands with the force a square plate gets. */
[data-aspect="2:1"] .plate { max-width: 64rem; }
[data-aspect="2:1"].single, [data-aspect="2:1"] .single { max-width: 66rem; }
[data-aspect="2:1"] .single-plate { max-width: min(100%, 64rem); }
[data-aspect="2:1"] .slide-img { max-width: min(94vw, 64rem); max-height: 80vh; }
[data-aspect="2:1"] .slide-stage { min-height: 38vh; }
.plate figcaption { margin-top: .9rem; display: flex; gap: .6rem; justify-content: center; align-items: baseline; }
.plate-no { color: var(--grey); font-size: .85rem; font-variant-numeric: oldstyle-nums; }
.plate-title { letter-spacing: .2em; text-transform: uppercase; font-size: .82rem; }

/* ---- single image ---- */
.single { max-width: 58rem; margin: 0 auto; padding: clamp(1.4rem, 5vw, 3rem) 0 var(--gap); text-align: center; }
.single-kicker { margin: 0 0 1.4rem; }
.single-kicker a { font-size: .76rem; letter-spacing: .24em; text-transform: uppercase; color: var(--grey); text-decoration: none; }
.single-kicker a:hover { color: var(--accent); }
.single-img { display: flex; justify-content: center; }
.single-plate { border: 1px solid var(--line); max-width: min(100%, 56rem); }
.single-title { font-style: italic; font-weight: 400; font-size: clamp(2rem, 6vw, 3rem); margin: 1.6rem 0 .3rem; }
.single-gloss { font-style: italic; color: var(--grey); max-width: 32rem; margin: .2rem auto .5rem; }
.single-meta { color: var(--grey); font-size: .9rem; margin: 0; font-variant-numeric: oldstyle-nums; }
.seq-nav { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-top: clamp(4rem, 10vw, 8rem); border-top: 1px solid var(--line); padding-top: 1.4rem; }
.seq-nav a { text-decoration: none; color: var(--ink); font-style: italic; }
.seq-nav a:hover { color: var(--accent); }
.nav-up { font-style: normal !important; font-size: .76rem; letter-spacing: .2em; text-transform: uppercase; color: var(--grey) !important; }
.nav-end { color: var(--grey); font-style: italic; font-size: .9rem; }
.nav-prev, .nav-next { max-width: 40%; }
.arr { color: var(--accent); }

/* ---- prose (intro + colophon) ---- */
.prose { max-width: var(--prose); margin: 0 auto; padding: clamp(2rem, 6vw, 4rem) 0 var(--gap); }
.prose-head { text-align: center; margin-bottom: 2.6rem; }
.prose-head h1 { font-style: italic; font-weight: 400; font-size: clamp(2rem, 6vw, 2.8rem); margin: .2rem 0 0; }
.prose h2 { text-align: center; letter-spacing: .24em; text-transform: uppercase; font-size: .9rem; font-weight: 500; color: var(--accent); margin: 2.8rem 0 1.4rem; }
.prose p { margin: 0 0 1.1rem; }
.intro p + p { text-indent: 1.3em; margin-top: -.4rem; }
.dedication { text-align: center; font-style: italic; color: var(--grey); font-size: .95rem; margin: 0 auto clamp(.5rem, 3vw, 1.5rem); }
.epigraph { text-align: center; color: var(--ink); margin: 0 auto 2rem; }
.ep-line { font-style: italic; margin: 0; line-height: 1.5; }
.ep-attr { color: var(--grey); font-size: .9rem; margin: .8rem 0 0; }
/* epigraph shown on the gallery, before the Prologue */
.gallery-epigraph { max-width: 40rem; margin: 0 auto; padding: clamp(.5rem, 3vw, 2rem) 0 clamp(2rem, 7vw, 4.5rem); }
.gallery-epigraph .ep-line { font-size: clamp(1.1rem, 2.4vw, 1.3rem); }
.project-links .sep { color: var(--faint); margin: 0 .4rem; }
.sig { font-style: italic; text-align: right; color: var(--grey); }
/* colophon prose matches the introduction on the web (no size override; book may differ) */
.discl { color: var(--grey); font-style: italic; font-size: .95rem; margin-top: 1.2rem; }
/* about / author page */
.about-bio p { margin: 0 0 1.1rem; }
.about-links { margin-top: 2.6rem; }
.link-list { list-style: none; padding: 0; margin: 0; }
.link-list li { margin: 0 0 .7rem; }
.link-list a { text-decoration-color: var(--faint); }
.link-note { color: var(--grey); font-style: italic; font-size: .92rem; }
.back { text-align: center; margin-top: 2.6rem; }
.back a { font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; color: var(--grey); }

/* ---- slideshow ---- */
.slideshow-cta { margin: 1.3rem 0 0; }
.slideshow-cta a {
  font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent);
  text-decoration: none; border: 1px solid var(--line); border-radius: 2px;
  padding: .6rem 1.15rem; display: inline-block; min-height: 44px;
}
.slideshow-cta a:hover, .slideshow-cta a:focus-visible { border-color: var(--accent); }
.slideshow { text-align: center; max-width: 60rem; margin: 0 auto; padding: clamp(1rem, 4vw, 2.5rem) 0 var(--gap); }
.slide-figure { margin: 0; }
.slide-stage { display: flex; justify-content: center; align-items: center; min-height: 46vh; }
.slide-img { width: 100%; max-width: min(82vh, 46rem); height: auto; border: 1px solid var(--line); }
.slide-cap { display: flex; flex-direction: column; gap: .3rem; margin-top: 1.2rem; }
.slide-no { color: var(--grey); font-size: .85rem; font-variant-numeric: oldstyle-nums; }
.slide-title { letter-spacing: .2em; text-transform: uppercase; font-size: .92rem; }
.slide-meaning { color: var(--grey); font-style: italic; font-size: 1.06rem; max-width: 34rem; margin: .3rem auto 0; min-height: 1.6em; }
.slide-controls { display: flex; justify-content: center; gap: 1rem; margin-top: 1.5rem; }
.slide-controls button {
  font-family: inherit; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--grey); background: none; border: 1px solid var(--line); border-radius: 2px;
  padding: .5rem 1.1rem; cursor: pointer; min-width: 3rem; min-height: 44px;
}
.slide-controls button:hover, .slide-controls button:focus-visible { color: var(--accent); border-color: var(--accent); }
.slide-exit { margin-top: 1.7rem; }
.slide-exit a { font-size: .76rem; letter-spacing: .16em; text-transform: uppercase; color: var(--grey); }

/* ---- optional ambient music toggle (default off) ---- */
.ambient { position: fixed; right: clamp(.7rem, 3vw, 1.5rem); bottom: clamp(.7rem, 3vw, 1.5rem); z-index: 30; }
.ambient-toggle {
  display: inline-flex; align-items: center; gap: .4rem; font-family: inherit;
  font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; color: var(--grey);
  background: var(--bg); border: 1px solid var(--line); border-radius: 2rem;
  padding: .55rem .9rem; min-height: 44px; cursor: pointer; opacity: .72;
  transition: opacity .2s, color .2s, border-color .2s;
}
.ambient-toggle:hover, .ambient-toggle:focus-visible { opacity: 1; color: var(--ink); border-color: var(--faint); }
.ambient-toggle.on { color: var(--accent); border-color: var(--accent); opacity: 1; }
.ambient-icon { font-size: .9rem; line-height: 1; }

/* on phones the toggle should sit lighter and smaller so it doesn't crowd navigation;
   it firms up (opacity 1) on press and while playing (.on) via the higher-specificity rules above */
@media (max-width: 640px) {
  .ambient { right: .5rem; bottom: .5rem; }
  .ambient-toggle {
    font-size: .58rem; letter-spacing: .12em; gap: .25rem;
    padding: .3rem .6rem; min-height: 32px; opacity: .45;
  }
  .ambient-icon { font-size: .8rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
  .ambient-toggle { transition: none; }
}
