/* ── Brand tokens wired into Bootstrap's theme vars ── */
:root,
[data-bs-theme="light"]{
  --bs-font-sans-serif: 'Plantin MT Pro','Plantin','Times New Roman',serif;
  --bs-body-font-family: 'Plantin MT Pro','Plantin','Times New Roman',serif;

  --so-paper:        #f3ecd9;
  --so-paper-2:      #e9dfc2;
  --so-ink:          #1c1612;
  --so-ink-soft:     #3a2e26;
  --so-carmine:      #8e2f3c;
  --so-carmine-deep: #6b1f29;
  --so-rule:         rgba(28,22,18,.16);

  --bs-body-bg:       var(--so-paper);
  --bs-body-color:    var(--so-ink);
  --bs-border-color:  var(--so-rule);
  --bs-link-color:    var(--so-carmine-deep);
  --bs-link-hover-color: var(--so-carmine);

  --so-card-bg:    var(--so-paper);
  --so-card-text:  var(--so-ink);
  --so-card-soft:  var(--so-ink-soft);
  --so-nav-glass:  rgba(20,14,10,.42);
  --so-nav-text:   #f3ecd9;

  /* Scrim strengths — light mode lets the engraving breathe;
     dark mode dims everything for a moodier read.            */
  --so-tint-alpha:        0;     /* whole-plate darkening */
  --so-vignette-alpha:    0;     /* edge vignette (off in light mode) */
  --so-scrim-top-alpha:   0.8;   /* behind navbar + title */
  --so-scrim-bot-alpha:   0;     /* (footer rail retired) */
  --so-cap-scrim-alpha:   0.6;   /* (caption now has its own card) */
}

[data-bs-theme="dark"]{
  --so-paper:        #15110c;
  --so-paper-2:      #1d1812;
  --so-ink:          #efe6d0;
  --so-ink-soft:     #cbbfa3;
  --so-carmine:      #d27580;
  --so-carmine-deep: #b65460;
  --so-rule:         rgba(239,230,208,.14);

  --bs-body-bg:       var(--so-paper);
  --bs-body-color:    var(--so-ink);
  --bs-border-color:  var(--so-rule);
  --bs-link-color:    var(--so-carmine);

  --so-card-bg:    #1b1610;
  --so-card-text:  var(--so-ink);
  --so-card-soft:  var(--so-ink-soft);
  --so-nav-glass:  rgba(10,7,4,.55);
  --so-nav-text:   #f3ecd9;

  --so-tint-alpha:        0.25;  /* darken the plate in night mode */
  --so-vignette-alpha:    0.60;
  --so-scrim-top-alpha:   0.92;
  --so-scrim-bot-alpha:   0.55;
  --so-cap-scrim-alpha:   0.85;
}

html, body{ height: 100%; }
body{
  margin: 0;
  overflow: hidden;            /* single-viewport page */
  background: #2a221a;
  color: var(--so-card-text);
  font-family: var(--bs-body-font-family);
  font-weight: 300;
}

/* Display headlines: Plantin, tight */
h1,h2,h3{
  font-family: 'Plantin MT Pro', serif;
  font-weight: 600;
  letter-spacing: -.005em;
}

.so-cap{
  font-family: 'Plantin MT Pro', serif;
  font-weight: 700;
  font-stretch: condensed;
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: .78rem;
}
.so-cap-sm{ font-size: .68rem; letter-spacing: .26em; }

/* ── Fixed navbar — always glassy over the plate ── */
.navbar.so-nav{
  background: var(--so-nav-glass);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid rgba(241,234,216,.15);
  padding-top: .55rem;
  padding-bottom: .55rem;
  color: var(--so-nav-text);
}
.navbar.so-nav .navbar-brand,
.navbar.so-nav .nav-link,
.navbar.so-nav .so-cap{ color: var(--so-nav-text); }
.navbar-brand{
  display: inline-flex; align-items: baseline; gap: .55rem;
  font-weight: 700; font-stretch: condensed;
  text-transform: uppercase; letter-spacing: .14em;
  font-size: 1rem;
}
.navbar-brand .glyph{
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px;
  border: 1px solid currentColor;
  font-family: 'Plantin MT Pro', serif;
  font-weight: 600; font-style: italic;
  font-size: 14px; line-height: 1; letter-spacing: -.04em;
  transform: translateY(-1px);
}
.navbar-brand .glyph::before{ content: "SO"; }
.navbar.so-nav .nav-link{
  font-weight: 600; font-size: .8rem;
  letter-spacing: .18em; text-transform: uppercase;
  padding: .35rem .9rem !important;
  opacity: .85;
}
.navbar.so-nav .nav-link:hover{ opacity: 1; }
.theme-toggle{
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(241,234,216,.35);
  background: transparent;
  color: var(--so-nav-text);
  transition: background .15s ease;
  padding: 0;
}
.theme-toggle:hover{ background: rgba(241,234,216,.12); }
.theme-toggle .bi-sun-fill{ display: none; }
[data-bs-theme="dark"] .theme-toggle .bi-moon-stars-fill{ display: none; }
[data-bs-theme="dark"] .theme-toggle .bi-sun-fill{ display: inline-block; }

/* Plate (engraving) — scaled to fit more of the image in view
   while keeping the dancers anchored to the viewport centre.        */
:root{
  --plate-zoom: 0.57;
  --focus-x-raw: 1875;
  --focus-y-raw: 1455;
  --plate-w: calc(3736px * var(--plate-zoom));
  --plate-h: calc(2627px * var(--plate-zoom));
}
.plate{
  position: fixed; inset: 0; overflow: hidden; z-index: 0;
}
.plate img{
  position: absolute;
  width: var(--plate-w); height: var(--plate-h);
  left: calc(50vw - (var(--focus-x-raw) * var(--plate-zoom) * 1px));
  top:  calc(50vh - (var(--focus-y-raw) * var(--plate-zoom) * 1px));
  pointer-events: none; user-select: none;
}
.tint{
  position: fixed; inset: 0; z-index: 1;
  background: rgba(8,5,3, var(--so-tint-alpha));
  pointer-events: none;
}
/* Edge vignette — tuned via --so-vignette-alpha so it can be near‐zero in light mode. */
.vignette{
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(ellipse 55vw 60vh at 50% 56%,
      rgba(20,14,10,0) 0%,
      rgba(20,14,10,0) 28%,
      rgba(20,14,10, calc(var(--so-vignette-alpha) * 0.55)) 70%,
      rgba(20,14,10, var(--so-vignette-alpha)) 100%);
}
/* Top scrim — sits behind the fixed navbar + title block.
   Always present for nav legibility, but in light mode it fades quickly
   so the engraving below is mostly untouched. */
.scrim-top{
  position: fixed; left: 0; right: 0; top: 0; height: 360px; z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg,
      rgba(14,10,8, var(--so-scrim-top-alpha)) 0%,
      rgba(14,10,8, calc(var(--so-scrim-top-alpha) * 0.62)) 38%,
      rgba(14,10,8, calc(var(--so-scrim-top-alpha) * 0.18)) 75%,
      rgba(14,10,8, 0) 100%);
}
/* Localized halo behind the title block — only the headline gets a dark pool. */
.scrim-title{
  position: fixed; left: 0; right: 0; top: 0; height: 480px; z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 44vw 280px at 50% 200px,
      rgba(14,10,8, calc(var(--so-scrim-top-alpha) * 0.7)) 0%,
      rgba(14,10,8, calc(var(--so-scrim-top-alpha) * 0.35)) 45%,
      rgba(14,10,8, 0) 78%);
}
/* Footer rail scrim — thin gradient under the bottom domain bar. */
.scrim-bottom{
  position: fixed; left: 0; right: 0; bottom: 0; height: 120px; z-index: 1;
  background: linear-gradient(0deg,
    rgba(14,10,8, var(--so-scrim-bot-alpha)) 0%,
    rgba(14,10,8, calc(var(--so-scrim-bot-alpha) * 0.4)) 60%,
    rgba(14,10,8, 0) 100%);
  pointer-events: none;
}
/* Caption scrim retired — the figure caption now sits in its own panel. */
.scrim-cap{ display: none; }

/* ── Title block over the dancers ── */
.stage-title{
  position: fixed;
  left: 50%; top: 110px;
  transform: translateX(-50%);
  text-align: center;
  color: #f3ecd9;
  z-index: 4;
  width: min(1000px, 88vw);
  pointer-events: none;
}
.stage-title .eyebrow{
  color: rgba(243,236,217,.88);
  margin-bottom: 1rem;
  text-shadow: 0 1px 10px rgba(0,0,0,.85);
}
.stage-title .eyebrow::before,
.stage-title .eyebrow::after{
  content:""; display:inline-block; width:36px; height:1px;
  background: currentColor; vertical-align: middle; margin: 0 .8rem; opacity:.7;
}
.stage-title h1{
  color: #f3ecd9;
  font-size: clamp(2.4rem, 5.8vw, 4.8rem);
  line-height: .98;
  margin: 0;
  text-shadow: 0 2px 18px rgba(0,0,0,.85), 0 1px 2px rgba(0,0,0,.6);
  text-transform:uppercase;
}
.stage-title h1 .ofthe{
  display: block;
  font-style: italic; font-weight: 400;
  font-size: .24em; letter-spacing: .26em;
  text-transform: uppercase; opacity: .82;
  margin-bottom: .55em;
}
.stage-title .tagline{
  margin: 1rem auto 0;
  font-style: italic;
  font-size: clamp(.95rem, 1.3vw, 1.15rem);
  max-width: 56ch;
  color: rgba(243,236,217,.95);
  text-shadow: 0 1px 12px rgba(0,0,0,.8);
}

/* ── Blurb card — anchored lower-left like museum signage ── */
.blurb-card{
  position: fixed;
  left: 28px; bottom: 28px;
  width: min(440px, 38vw);
  z-index: 4;
  background: var(--so-card-bg);
  color: var(--so-card-text);
  border: 1px solid var(--so-ink);
  box-shadow: 0 18px 40px -10px rgba(0,0,0,.55);
  padding: 22px 24px 20px;
}
[data-bs-theme="dark"] .blurb-card{
  border-color: rgba(239,230,208,.4);
  box-shadow: 0 18px 40px -10px rgba(0,0,0,.85);
}
.blurb-card::before{
  content: "";
  position: absolute; inset: 8px;
  border: 1px solid var(--so-rule);
  pointer-events: none;
}
.blurb-card .archival{
  display: flex; justify-content: space-between; align-items: baseline;
  padding-bottom: 10px; margin-bottom: 12px;
  border-bottom: 1px solid var(--so-rule);
  position: relative; z-index: 1;
}
.blurb-card .archival .cat{ color: var(--so-carmine-deep); }
[data-bs-theme="dark"] .blurb-card .archival .cat{ color: var(--so-carmine); }
.blurb-card h2{
  font-size: 1.18rem;
  line-height: 1.2;
  margin: 0 0 .6rem;
  position: relative; z-index: 1;
}
.blurb-card h2 em{
  font-style: italic; font-weight: 400;
  color: var(--so-card-soft);
}
.blurb-card p{
  font-size: .98rem;
  line-height: 1.55;
  color: var(--so-card-soft);
  margin: 0 0 .6rem;
  text-wrap: pretty;
  position: relative; z-index: 1;
}
.blurb-card p:last-of-type{ margin-bottom: 0; }
.blurb-card .read-more{
  display: inline-flex; align-items: center; gap: .4rem;
  margin-top: .9rem;
  font-style: italic; font-weight: 600; font-size: .88rem;
  color: var(--so-carmine-deep);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
  position: relative; z-index: 1;
}
[data-bs-theme="dark"] .blurb-card .read-more{ color: var(--so-carmine); }
.blurb-card .read-more::after{ content: "→"; font-style: normal; }

/* ── Caption card — mirror of the blurb card, anchored lower-right.
   Same archival treatment so the two panels read as a pair.            */
.caption-card{
  position: fixed;
  right: 28px; bottom: 28px;
  width: min(320px, 32vw);
  z-index: 4;
  background: var(--so-card-bg);
  color: var(--so-card-text);
  border: 1px solid var(--so-ink);
  box-shadow: 0 18px 40px -10px rgba(0,0,0,.55);
  padding: 18px 20px 16px;
}
[data-bs-theme="dark"] .caption-card{
  border-color: rgba(239,230,208,.4);
  box-shadow: 0 18px 40px -10px rgba(0,0,0,.85);
}
.caption-card::before{
  content: "";
  position: absolute; inset: 7px;
  border: 1px solid var(--so-rule);
  pointer-events: none;
}
.caption-card .archival{
  display: flex; justify-content: space-between; align-items: baseline;
  padding-bottom: 8px; margin-bottom: 10px;
  border-bottom: 1px solid var(--so-rule);
  position: relative; z-index: 1;
}
.caption-card .archival .figno{ color: var(--so-carmine-deep); }
[data-bs-theme="dark"] .caption-card .archival .figno{ color: var(--so-carmine); }
.caption-card .title{
  font-style: italic;
  font-size: .98rem;
  line-height: 1.25;
  color: var(--so-card-text);
  margin-bottom: .35rem;
  position: relative; z-index: 1;
}
.caption-card .meta{
  font-size: .8rem;
  line-height: 1.45;
  color: var(--so-card-soft);
  position: relative; z-index: 1;
}
.caption-card .meta .artist{
  display: block;
  font-style: normal;
  color: var(--so-card-text);
  margin-bottom: 2px;
  font-weight: 600;
}

@media (max-width: 820px){
  .blurb-card{ width: calc(100vw - 32px); left: 16px; right: 16px; bottom: 16px; }
  .caption-card{ display: none; }
}
