/* ==========================================================================
   Holbein Quartet – one small stylesheet, mobile first.
   Contents: 1 Tokens · 2 Fonts · 3 Base · 4 Header · 5 Buttons · 6 Hero
             7 Staff divider · 8 Sections · 9 Musicians · 10 Contact
             11 Footer · 12 Legal pages · 13 Utilities
   ========================================================================== */

/* 1 Tokens ---------------------------------------------------------------- */
:root {
  --paper: #f4efe4;
  --paper-deep: #ebe3d1;
  --ink: #1b2430;
  --ink-soft: #4a5360;          /* 6.8:1 on paper */
  --burgundy: #6b1a2c;          /* velvet in the photo, deepened for contrast (10:1 on paper) */
  --burgundy-deep: #4a1020;     /* contact band */
  --brass: #8a6a24;             /* decorative lines and note only (4.4:1) */
  --brass-text: #76591a;        /* brass when used for text (5.7:1) */
  --gold-on-dark: #dcc17c;      /* labels on the burgundy band */
  --teal: #1d4750;              /* links in running text, focus ring (8.9:1) */
  --line: rgba(27, 36, 48, 0.2);

  --serif: "Bodoni Moda", "Bodoni 72", Didot, "Bodoni MT", "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Work Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(1rem, 4vw, 2.5rem);   /* never below 16 px */
  --maxw: 1240px;
  --header-h: 3.5rem;
}

/* 2 Fonts (self-hosted, Latin subset) -------------------------------------- */
@font-face { font-family: "Work Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/work-sans-400.woff2") format("woff2"); }
@font-face { font-family: "Work Sans"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/work-sans-700.woff2") format("woff2"); }
/* Bodoni Moda italic (variable): download once with `npm run fonts`; until then the fallback stack is used. */
@font-face { font-family: "Bodoni Moda"; font-style: italic; font-weight: 400 900; font-display: swap;
  src: url("../fonts/bodoni-moda-italic.woff2") format("woff2"); }

/* 3 Base ------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
@media (min-width: 1100px) { html { font-size: 106.25%; } }
@media (min-width: 1600px) { html { font-size: clamp(17px, 0.85rem + 0.35vw, 20px); } }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.65 var(--sans);
  hyphens: auto;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
h1, h2, h3 { font-family: var(--serif); font-style: italic; font-weight: 500; line-height: 1.1; margin: 0; text-wrap: balance; }
p { margin: 0 0 1em; }
a { color: inherit; }
main:focus { outline: none; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
/* Anchor targets keep the sticky header clear of the heading (section padding provides the rest). */
.section[id] { scroll-margin-top: 0.25rem; }

.container {
  width: 100%;
  max-width: calc(var(--maxw) + 2 * var(--gutter));
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}

/* Placeholders, highlighted so they cannot be overlooked */
.ph { background: rgba(138, 106, 36, 0.2); color: inherit; padding: 0 0.15em; border-radius: 2px;
  -webkit-box-decoration-break: clone; box-decoration-break: clone; }

/* 4 Header ----------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top);
}
.header-inner { display: flex; flex-wrap: wrap; align-items: center; min-height: var(--header-h); column-gap: 0.25rem; }
.brand {
  margin-right: auto; display: inline-flex; align-items: center; min-height: 44px;
  font: italic 500 clamp(1.05rem, 5.2vw, 1.35rem)/1 var(--serif);
  color: var(--burgundy); text-decoration: none; white-space: nowrap;
}
.lang { display: flex; align-items: center; }
.lang a {
  display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px;
  color: var(--ink); text-decoration: none; font-size: 0.9375rem;
}
.lang a[aria-current] { font-weight: 700; text-decoration: underline; text-decoration-color: var(--brass); text-decoration-thickness: 2px; text-underline-offset: 0.45em; }
.lang-sep { color: var(--ink-soft); }
.menu-toggle {
  display: none; width: 44px; height: 44px; padding: 0; align-items: center; justify-content: center;
  background: none; border: 0; color: var(--ink); cursor: pointer;
}
.menu-toggle svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.menu-toggle .icon-close, .menu-toggle[aria-expanded="true"] .icon-open { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }

.primary-nav { flex-basis: 100%; }
.primary-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 0.5rem; }
.primary-nav a:not(.btn) { display: flex; align-items: center; min-height: 48px; padding: 0 0.75rem; color: var(--ink); text-decoration: none; }

/* Without JavaScript the links simply sit in a second row; with it, they fold into a panel. */
@media (max-width: 899.98px) {
  .js .menu-toggle { display: inline-flex; }
  .js .primary-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 0.5rem max(var(--gutter), env(safe-area-inset-right)) 1.25rem max(var(--gutter), env(safe-area-inset-left));
    max-height: calc(100vh - var(--header-h)); max-height: calc(100dvh - var(--header-h)); overflow-y: auto;
  }
  .js .primary-nav.is-open { display: block; }
  .js .primary-nav ul { flex-direction: column; gap: 0; }
  .js .primary-nav a:not(.btn) { min-height: 56px; font: italic 500 1.5rem/1 var(--serif); border-bottom: 1px solid var(--line); padding: 0; }
  .js .primary-nav li:last-child { padding-top: 1rem; }
  .js .primary-nav .btn { width: 100%; }
}
@media (min-width: 900px) {
  .primary-nav { flex-basis: auto; order: 1; }
  .lang { order: 2; margin-left: 0.75rem; }
  .menu-toggle { display: none; }
  .primary-nav a:not(.btn):focus-visible, .btn--nav:focus-visible { outline-offset: 2px; }
}
.primary-nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--brass); text-decoration-thickness: 2px; text-underline-offset: 0.45em; }
@media (hover: hover) and (pointer: fine) {
  .primary-nav a:not(.btn):hover, .lang a:hover { color: var(--burgundy); }
}

/* 5 Buttons ---------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0.5rem 1.75rem;
  background: var(--burgundy); color: var(--paper); border: 2px solid var(--burgundy); border-radius: 2px;
  font-weight: 700; text-decoration: none; text-align: center;
}
.btn--nav { min-height: 44px; padding: 0.25rem 1.25rem; }
@media (prefers-reduced-motion: no-preference) { .btn { transition: background-color 0.2s, border-color 0.2s; } }
@media (hover: hover) and (pointer: fine) { .btn:hover { background: var(--burgundy-deep); border-color: var(--burgundy-deep); } }

/* 6 Hero ------------------------------------------------------------------- */
.hero { padding-block: 1.25rem 2rem; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); }
.hero-eyebrow { margin: 0 0 0.25rem; font-style: italic; font-size: 1.125rem; color: var(--brass-text); }
.hero-title { font-size: clamp(2.6rem, 12.5vw, 3.75rem); color: var(--burgundy); letter-spacing: -0.01em; margin-bottom: 0.9rem; hyphens: manual; }
.hero-orchestra { text-wrap: pretty; max-width: 30ch; margin: 0; font-size: 1.1875rem; line-height: 1.5; padding-left: 1rem; border-left: 2px solid var(--brass); }
.hero-figure { margin: 1.5rem 0 1.5rem; }
.hero-figure picture { display: block; }
.hero-figure img {
  display: block; width: 100%; height: auto;
  max-height: 75vh; max-height: 75svh;
  object-fit: cover; object-position: center 30%;
  background: var(--paper-deep);
}
.hero-figure figcaption { margin-top: 0.5rem; font-size: 0.8125rem; color: var(--ink-soft); text-align: right; }
.hero-cta { margin: 0; }
.hero-cta .btn { width: 100%; }

@media (min-width: 560px) { .hero-cta .btn { width: auto; } }

@media (min-width: 700px) {
  .hero { padding-block: clamp(2rem, 5vw, 4rem); }
  .hero-grid {
    grid-template-columns: minmax(0, 56fr) minmax(0, 44fr);
    grid-template-rows: 1fr auto auto auto auto 1fr;   /* the 1fr rows centre the text beside the photo */
    column-gap: clamp(1.5rem, 4vw, 4rem);
  }
  .hero-eyebrow { grid-column: 1; grid-row: 2; }
  .hero-title { grid-column: 1; grid-row: 3; font-size: clamp(2.75rem, 6.2vw, 4rem); }
  .hero-orchestra { grid-column: 1; grid-row: 4; margin-bottom: 1.75rem; }
  .hero-cta { grid-column: 1; grid-row: 5; }
  .hero-figure { grid-column: 2; grid-row: 1 / -1; margin: 0; }
}
@media (min-width: 1100px) {
  .hero-title { font-size: clamp(3.6rem, 5.4vw, 5.75rem); }
  .hero-figure img { width: auto; max-width: 100%; margin-left: auto;
    max-height: min(88vh, 960px); max-height: min(88svh, calc(100svh - var(--header-h) - 4rem), 960px); }
  .hero-figure figcaption { max-width: 100%; }
}
/* Phone in landscape: no height tricks, the hero just scrolls. */
@media (max-height: 500px) and (orientation: landscape) {
  .hero-figure img { max-height: none; }
  .hero-grid { grid-template-rows: 0 auto auto auto auto 1fr; }  /* text starts at the top */
}

/* 7 Staff divider (five lines, one gold note) ------------------------------- */
.staff { padding-inline: var(--gutter); }
.staff svg { display: block; width: min(100%, 520px); height: auto; margin-inline: auto; overflow: visible; }
.staff-lines { fill: none; stroke: var(--ink); stroke-opacity: 0.28; stroke-width: 1; vector-effect: non-scaling-stroke; }
.staff-note { fill: var(--brass); }
.staff-stem { fill: none; stroke: var(--brass); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* 8 Sections --------------------------------------------------------------- */
.section { padding-block: clamp(2.75rem, 7vw, 5.5rem); }
.section h2 { font-size: clamp(1.9rem, 5.2vw, 3rem); color: var(--burgundy); margin-bottom: 1.25rem; }
.quartet-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.5rem 4rem; }
.prose p { max-width: 66ch; }
@media (min-width: 900px) { .quartet-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 8fr); } }

/* 9 Musicians: overview cards and separate biography pages ------------------ */
.members { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 1rem; }
.member { display: flex; flex-direction: column; align-items: stretch; }
.member-portrait, .member-page-portrait { display: block; width: 100%; height: auto; background: var(--paper-deep); }.member-role { margin: 0 0 0.15rem; color: var(--brass-text); font-weight: 700; font-size: 0.9375rem; }
.member .member-portrait { margin-top: auto; }
.member .member-role { margin-top: 0.9rem; }
.member h3 { font-size: clamp(1.25rem, 4.6vw, 1.6rem); line-height: 1.15; margin-bottom: 1rem; }
.member .btn { padding-inline: 0.75rem; }
.btn--outline { background: transparent; color: var(--burgundy); }
@media (hover: hover) and (pointer: fine) { .btn--outline:hover { background: var(--burgundy); border-color: var(--burgundy); color: var(--paper); } }
@supports (grid-template-rows: subgrid) {
  @media (min-width: 360px) {
    .members { row-gap: 0; }
    .member { display: grid; grid-row: span 4; grid-template-rows: subgrid; row-gap: 0; align-items: start; }
    .member .member-portrait { margin-top: 0; align-self: end; }
    .member .btn { margin-bottom: 2.25rem; }
  }
}
@media (max-width: 359.98px) { .members { grid-template-columns: minmax(0, 1fr); } }
@media (min-width: 900px) { .members { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2.5rem 1.5rem; } }

.member-page { padding-block: clamp(1rem, 4vw, 2.5rem) clamp(3rem, 7vw, 5rem); }
.back-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--teal); text-underline-offset: 0.2em; }
.member-page-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem 3.5rem; align-items: start; margin-top: 0.5rem; }
/* Phone: keep the portrait modest (about 260 px wide); larger screens override this below. */
.member-page-portrait { max-width: 260px; }
@media (min-width: 560px) { .member-page-portrait { max-width: 340px; } }
.member-page-text h1 { font-size: clamp(2rem, 7vw, 3.5rem); color: var(--burgundy); margin: 0.15rem 0 1.5rem; }
.member-page-text p { max-width: 64ch; }
.member-orchestra { margin-top: 1.5rem; font-size: 0.9375rem; color: var(--ink-soft); }
.member-next { margin-top: 2rem; }
@media (min-width: 800px) {
  .member-page-grid { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); }
  .member-page-portrait { max-width: 360px; position: sticky; top: calc(var(--header-h) + 1.5rem); }
}

/* 10 Contact (closing statement on the velvet colour) ----------------------- */
.section--contact { background: var(--burgundy-deep); color: var(--paper); text-align: center; }
.section--contact h2 { color: var(--paper); }
.section--contact :focus-visible { outline-color: var(--gold-on-dark); }
.section--contact .ph { background: rgba(255, 255, 255, 0.16); }
.section--contact { hyphens: manual; }
.contact-intro { max-width: 44ch; margin: 0 auto; font-size: 1.1875rem; text-wrap: balance; }
.contact-group { margin: 2rem auto 0; max-width: 60rem; }
.contact-group + .contact-group { margin-top: 2.5rem; }
.contact-person { margin-bottom: 0.9rem; font-size: clamp(1.25rem, 3.5vw, 1.6rem); color: var(--gold-on-dark); }
.contact-list { list-style: none; margin: 0 auto; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.contact-card {
  display: block; min-height: 48px; padding: 1rem 1.25rem; text-decoration: none; text-align: center;
  border: 1px solid rgba(244, 239, 228, 0.4); border-radius: 2px;
}
.contact-label { display: block; font-size: 0.9375rem; color: var(--gold-on-dark); }
.contact-value { display: block; margin-top: 0.15rem; font: italic 500 clamp(1.3rem, 4.4vw, 1.9rem)/1.25 var(--serif); overflow-wrap: anywhere; hyphens: none; }
/* The e-mail address is longer than a phone number: smaller type that scales with the card keeps it on one line. */
.contact-card { container-type: inline-size; }
.contact-card--email .contact-value { font-size: clamp(1.05rem, 4.3vw, 1.5rem); font-size: clamp(0.95rem, 5.4cqi, 1.5rem); }
/* A phone number must never break at its spaces: it stays on one line and scales with the card width. */
.contact-card:not(.contact-card--email) .contact-value { white-space: nowrap; font-size: clamp(1.1rem, 5.5vw, 1.9rem); font-size: clamp(12px, 8cqi, 1.9rem); }
.contact-note { max-width: 50ch; margin: 2rem auto 0; text-wrap: pretty; }
@media (min-width: 700px) { .contact-list { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); } }
@media (prefers-reduced-motion: no-preference) {
  .contact-card { transition: background-color 0.2s, border-color 0.2s, color 0.2s; }
  .contact-label { transition: color 0.2s; }
}
/* Hover and keyboard focus: the colours invert (light card, dark text), like the outline buttons. */
@media (hover: hover) and (pointer: fine) {
  .contact-card:hover { background: var(--paper); border-color: var(--paper); color: var(--burgundy-deep); }
  .contact-card:hover .contact-label { color: var(--brass-text); }
  .contact-card:hover .contact-value { text-decoration: underline; text-underline-offset: 0.2em; }
}
.contact-card:focus-visible { background: var(--paper); border-color: var(--paper); color: var(--burgundy-deep); outline-color: var(--gold-on-dark); }
.contact-card:focus-visible .contact-label { color: var(--brass-text); }

/* 10b Concerts and links pages ------------------------------------------------ */
.page-wide { padding-block: clamp(2rem, 6vw, 4.5rem); }
.page-intro { max-width: 62ch; color: var(--ink-soft); }
.concert-list { list-style: none; margin: 2rem 0 0; padding: 0; }
.concert { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem 3rem; padding-block: 2rem; border-top: 1px solid var(--line); align-items: start; }
.concert-date { margin: 0 0 0.3rem; color: var(--brass-text); font-weight: 700; }
.concert h2 { font-size: clamp(1.5rem, 4.5vw, 2.1rem); color: var(--burgundy); margin-bottom: 0.4rem; }
.concert-place { color: var(--ink-soft); }
.concert-text p:last-child { margin-bottom: 0; }
.concert-text p { max-width: 62ch; }
.concert-media { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.75rem; align-items: start; }
.concert-media figure { margin: 0; }
.concert-media img { display: block; width: 100%; height: auto; background: var(--paper-deep); }   /* never cropped */
.concert figcaption { margin-top: 0.35rem; font-size: 0.8125rem; color: var(--ink-soft); }
@media (min-width: 560px) { .concert-media:not(.concert-media--1) { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .concert { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } .concert--text-only { grid-template-columns: minmax(0, 1fr); } }

.link-group { margin-top: 2.5rem; }
.link-group h2 { font-size: clamp(1.35rem, 4vw, 1.75rem); margin-bottom: 1rem; }
.link-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.legal .link-card { display: block; min-height: 48px; padding: 0.9rem 1.1rem; color: var(--ink); text-decoration: none; border: 1px solid var(--line); border-left: 4px solid var(--brass); background: var(--paper-deep); }
.link-title { display: block; font: italic 500 1.35rem/1.25 var(--serif); color: var(--burgundy); }
.link-note { display: block; margin-top: 0.2rem; }
.link-url { display: block; margin-top: 0.25rem; font-size: 0.875rem; color: var(--teal); overflow-wrap: anywhere; hyphens: none; }
@media (prefers-reduced-motion: no-preference) { .legal .link-card { transition: background-color 0.2s; } }
@media (hover: hover) and (pointer: fine) { .legal .link-card:hover { background: #e3dac6; } .legal .link-card:hover .link-title { text-decoration: underline; text-underline-offset: 0.2em; } }


/* 10c Gallery items and the viewer (lightbox) for photos and PDFs ------------- */
.gallery-link { display: block; position: relative; color: inherit; text-decoration: none; cursor: zoom-in; }
.gallery-link::after {   /* small "enlarge" hint in the corner */
  content: ""; position: absolute; right: 0.5rem; bottom: 0.5rem; width: 2rem; height: 2rem; border-radius: 50%;
  background: rgba(27, 36, 48, 0.7) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 4h6v6M10 20H4v-6M20 4l-7 7M4 20l7-7'/%3E%3C/svg%3E") center / 60% no-repeat;
}
.pdf-badge { position: absolute; left: 0.5rem; top: 0.5rem; padding: 0.15rem 0.55rem; background: var(--burgundy); color: var(--paper); font-size: 0.8125rem; font-weight: 700; border-radius: 2px; }
.pdf-tile { display: flex; align-items: center; justify-content: center; aspect-ratio: 3 / 4; padding: 1.25rem; text-align: center; background: var(--paper-deep); border: 1px solid var(--line); }
.pdf-tile-title { font: italic 500 1.25rem/1.25 var(--serif); color: var(--burgundy); }

html.lb-open { overflow: hidden; }
.lightbox { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #160a0e; color: var(--paper); }
.lightbox[open] { display: flex; flex-direction: column; }
.lightbox::backdrop { background: #160a0e; }
.lightbox :focus-visible { outline-color: var(--gold-on-dark); }
.lightbox-bar { display: flex; align-items: center; gap: 0.75rem; padding: max(0.5rem, env(safe-area-inset-top)) max(0.75rem, env(safe-area-inset-right)) 0.25rem max(0.75rem, env(safe-area-inset-left)); }
.lightbox-count { margin: 0 auto 0 0; font-size: 0.9375rem; }
.lightbox-open { display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.75rem; color: var(--gold-on-dark); text-underline-offset: 0.2em; }
.lightbox-open[hidden], .lightbox-nav[hidden] { display: none; }
.lightbox-close, .lightbox-nav { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; padding: 0; border: 1px solid rgba(244, 239, 228, 0.45); border-radius: 50%; background: rgba(22, 10, 14, 0.6); color: var(--paper); cursor: pointer; }
.lightbox-close svg, .lightbox-nav svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lightbox-stage { position: relative; flex: 1; min-height: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0.5rem; padding: 0 max(0.5rem, env(safe-area-inset-right)) 0 max(0.5rem, env(safe-area-inset-left)); }
.lightbox-body { min-width: 0; min-height: 0; height: 100%; display: flex; align-items: center; justify-content: center; }
.lightbox-img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.lightbox-pdf { width: 100%; height: 100%; border: 0; background: #fff; }
.lightbox-fallback { display: flex; flex-direction: column; align-items: center; gap: 1rem; max-width: 32rem; max-height: 100%; text-align: center; }
.lightbox-fallback img { max-width: 100%; max-height: 55vh; width: auto; height: auto; }
.lightbox-caption { min-height: 2.75rem; margin: 0; padding: 0.5rem max(1rem, env(safe-area-inset-right)) max(0.75rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left)); text-align: center; font-size: 0.9375rem; }
@media (max-width: 599.98px) {   /* phones: the arrows float over the picture (swiping works too) */
  .lightbox-stage { grid-template-columns: minmax(0, 1fr); }
  .lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 1; }
  .lightbox-prev { left: max(0.5rem, env(safe-area-inset-left)); }
  .lightbox-next { right: max(0.5rem, env(safe-area-inset-right)); }
}
@media (hover: hover) and (pointer: fine) { .lightbox-close:hover, .lightbox-nav:hover { background: var(--paper); color: var(--burgundy-deep); } }

/* 11 Footer ----------------------------------------------------------------- */
main + .staff { margin-top: 1.5rem; }
.site-footer { padding-block: 0.75rem calc(1rem + env(safe-area-inset-bottom)); font-size: 0.9375rem; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 1.5rem; }
.footer-copy { margin: 0; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 0.5rem; }
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.5rem; text-decoration-thickness: 1px; text-underline-offset: 0.25em; }
@media (hover: hover) and (pointer: fine) { .site-footer a:hover { color: var(--burgundy); } }

/* 12 Legal pages and 404 ----------------------------------------------------- */
.legal { max-width: 52rem; padding-block: clamp(2rem, 6vw, 4.5rem); }
.legal-title { font-size: clamp(1.75rem, 8vw, 3.25rem); color: var(--burgundy); margin-bottom: 1.5rem; }
.legal-updated { color: var(--ink-soft); }
.legal-section { margin-top: 2rem; }
.legal-section h2 { font-size: clamp(1.35rem, 4vw, 1.75rem); margin-bottom: 0.6rem; }
.legal a { color: var(--teal); text-underline-offset: 0.2em; }
.legal a.btn { color: var(--paper); }
.notice, .callout { padding: 1rem 1.25rem; background: var(--paper-deep); border-left: 4px solid var(--brass); }
.callout h2 { margin-top: 0; }
.callout p:last-child, .notice:last-child { margin-bottom: 0; }
.contact-dl { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; margin: 0 0 1rem; }
.contact-dl dt { margin-top: 0.75rem; font-weight: 700; }
.contact-dl dd { margin: 0; overflow-wrap: anywhere; }
.contact-dl a { display: inline-flex; align-items: center; min-height: 44px; }
@media (min-width: 560px) {
  .contact-dl { grid-template-columns: max-content minmax(0, 1fr); column-gap: 1.5rem; }
  .contact-dl dt, .contact-dl dd { margin-top: 0.4rem; }
}
.notfound { min-height: 50vh; }

/* 13 Utilities --------------------------------------------------------------- */
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 0.5rem; top: 0.5rem; z-index: 100; padding: 0.75rem 1rem; background: var(--burgundy); color: var(--paper); transform: translateY(-200%); }
.skip:focus { transform: none; }
