/* The plate (kin "plate", 2026-09-29).
   The page below the spring is a photographic plate: silver in gelatin on glass, warm black where no light came,
   silver where something was present. The spring above is the exposure; where it ends is the edge of the dark slide.
   Words are latent until you reach them, then they develop up out of the grain. Light spreads a little in emulsion
   (halation), most around her Tibetan, which is where the plate took the most light. */

@property --dev { syntax: '<number>'; inherits: false; initial-value: 1; }

body.emulsion {
  --night: #0b0908; --ink: #d6cfbf; --muted: #898173; --faint: #544d43; --line: #29241e;
  --silver: #eee5d1; --her: #ead09a;
  --read: 'Bricolage Grotesque', 'Helvetica Neue', system-ui, sans-serif;
  --label: 'Syne Mono', ui-monospace, monospace;
  --note: 'Xanh Mono', ui-monospace, monospace;
  background: var(--night); color: var(--ink);
  font: 300 18.5px/1.66 var(--read); font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}
body.emulsion ::selection { background: #3b3326; color: var(--silver); }
body.emulsion a:hover { color: var(--silver); }

/* ── the emulsion: his speckle, fixed like the grain in the gelatin, drifting a hair as you scroll ── */
.emulsion .grain { display: block; position: fixed; inset: -10vh 0; z-index: 1; pointer-events: none;
  background: url(public/baraduc/grain-tile.jpg) repeat; background-size: 620px;
  opacity: .34; mix-blend-mode: soft-light; filter: grayscale(1) contrast(1.15); will-change: transform; }
/* uneven exposure: plates are never evenly lit; the edges fall off, the middle holds a little light */
.emulsion .garden { position: relative; }
.emulsion .garden::before { content: ''; position: absolute; inset: 0 -30vw; z-index: 0; pointer-events: none;
  background:
    radial-gradient(38% 26% at 46% 12%, rgba(238,229,209,.045), transparent 72%),
    radial-gradient(30% 22% at 58% 48%, rgba(238,229,209,.03), transparent 70%),
    radial-gradient(34% 20% at 42% 84%, rgba(238,229,209,.035), transparent 70%); }
.emulsion::after { content: ''; position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 50%, transparent 55%, rgba(0,0,0,.42) 100%); }

/* ── the seam: the spring's colour drains into silver as it nears the edge of the dark slide ── */
.emulsion #hero { z-index: 2; } /* the spring stays itself: no grain or falloff laid over the glass */
.emulsion #hero::after { height: 46%; background: none;
  -webkit-backdrop-filter: grayscale(1) sepia(.28) contrast(1.08) brightness(.86);
  backdrop-filter: grayscale(1) sepia(.28) contrast(1.08) brightness(.86);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 88%);
  mask-image: linear-gradient(to bottom, transparent, #000 88%); }
.emulsion .slide { position: relative; z-index: 3; height: 0; pointer-events: none; }
/* the exposure stops in a straight line; light piles up a little along it before the unexposed plate */
.emulsion .slide::before { content: ''; position: absolute; left: 0; right: 0; top: -1px; height: 1px;
  background: rgba(238,229,209,.22); box-shadow: 0 0 10px 1px rgba(238,229,209,.16), 0 0 38px 6px rgba(238,229,209,.05); }
.emulsion .slide::after { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 60vh;
  background: url(public/baraduc/plate-grain.jpg) center 0 / cover;
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent);
  mask-image: linear-gradient(to bottom, #000, transparent);
  mix-blend-mode: screen; opacity: .09; filter: grayscale(1) contrast(1.4) brightness(.7); }

/* ── type ── */
.emulsion .content { z-index: 2; }
.emulsion .rail { position: sticky; z-index: 2; } /* the studies' `.rail { position: relative }` had unstuck it */
.emulsion .copy { text-shadow: 0 0 .9em rgba(238,229,209,.09); }
.emulsion em { color: var(--silver); }
.emulsion strong { font-weight: 500; }
.emulsion .kicker { font: 11px/1 var(--label); letter-spacing: .28em; color: var(--faint); margin-bottom: 22px; }
.emulsion h1 { font: 300 50px/1.08 var(--read); font-variation-settings: 'opsz' 96; letter-spacing: -.025em; color: var(--silver);
  text-shadow: 0 0 .5em rgba(238,229,209,.16); margin-bottom: 14px; }
.emulsion h1 .bo { font: 36px/1.9 var(--tibetan); color: var(--her); letter-spacing: 0; margin-top: 6px; }
.emulsion .byline { font: 13px/1.6 var(--note); font-style: italic; color: var(--muted); letter-spacing: .02em; }
.emulsion h2 { font: 11.5px/1.6 var(--label); letter-spacing: .26em; text-transform: uppercase; color: var(--muted); margin-bottom: 22px; }
.emulsion .intro { margin-bottom: 104px; }
.emulsion .block { margin-bottom: 84px; }
.emulsion p + p { margin-top: 18px; }
.emulsion sup { font: 11px var(--label); }
.emulsion sup a, .emulsion .note .mark { color: var(--her); opacity: .8; }
.emulsion .note { font: 14px/1.6 var(--note); color: var(--muted); padding-top: 50px; }
.emulsion .note .mark { font: 11px var(--label); margin-bottom: 12px; }
.emulsion .bo, .emulsion .note .bo { color: var(--her);
  text-shadow: 0 0 .28em rgba(234,208,154,.42), 0 0 1.1em rgba(234,208,154,.16); }
.emulsion .note .bo { font: 18px/1.95 var(--tibetan); margin-bottom: 14px; }
.emulsion .rail { font: 11.5px/1.9 var(--label); letter-spacing: .06em; }
.emulsion .rail .name { color: var(--silver); letter-spacing: .22em; text-transform: uppercase; font-size: 11px; }
.emulsion .rail nav a { color: var(--muted); }
.emulsion .rail nav a:hover { color: var(--silver); }
.emulsion .rail .small-print { font: italic 12px/1.7 var(--note); letter-spacing: 0; }
.emulsion .entries li { margin-bottom: 24px; }
.emulsion .entries a { color: var(--silver); text-decoration: underline; text-decoration-color: var(--faint); font-weight: 400; }
.emulsion .entries a:hover { text-decoration-color: var(--silver); }
.emulsion .entries .sub { font: 14.5px/1.6 var(--note); color: var(--muted); margin-top: 4px; }
.emulsion .foot { font: italic 13.5px/1.7 var(--note); color: var(--muted); margin-top: 110px; }
.emulsion .foot .bo.big { font: 30px/1.9 var(--tibetan); letter-spacing: .06em; }

/* ── his plate as the spring, set into the page like a plate in its holder ── */
.emulsion .exposure { display: block; margin: 44px 0 40px; position: relative; }
.emulsion .exposure img { width: 100%; display: block; filter: grayscale(1) sepia(.22) contrast(1.06) brightness(.9);
  /* the plate's edges fall away into the page: no frame, only where light came */
  -webkit-mask-image: linear-gradient(to right, transparent, #000 14%, #000 86%, transparent), linear-gradient(to bottom, transparent, #000 12%, #000 86%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 14%, #000 86%, transparent), linear-gradient(to bottom, transparent, #000 12%, #000 86%, transparent);
  -webkit-mask-composite: source-in; mask-composite: intersect; }

/* ── development: latent until reached, then the image comes up out of the grain ──
   alpha = speckle + dev·(1 − speckle): the brightest grains register first, then the rest fills in. */
.latent .dev { opacity: 0; --dev: 0;
  -webkit-mask-image: linear-gradient(rgba(0,0,0,var(--dev)), rgba(0,0,0,var(--dev))), url(public/baraduc/develop-mask.png);
  mask-image: linear-gradient(rgba(0,0,0,var(--dev)), rgba(0,0,0,var(--dev))), url(public/baraduc/develop-mask.png);
  -webkit-mask-size: 100% 100%, 300px; mask-size: 100% 100%, 300px;
  -webkit-mask-composite: source-over; mask-composite: add; }
.latent .dev.up { opacity: 1; --dev: 1; transition: opacity 1.1s ease-out, --dev 2.6s cubic-bezier(.5,0,.3,1) .25s; }
.latent .dev.up.done { -webkit-mask-image: none; mask-image: none; }
.latent .exposure.dev.up { transition: opacity 1.8s ease-out, --dev 4.2s cubic-bezier(.5,0,.3,1) .5s; }
@media (prefers-reduced-motion: reduce) {
  .latent .dev { opacity: 1; --dev: 1; -webkit-mask-image: none; mask-image: none; }
  .emulsion .grain { will-change: auto; }
}

@media (max-width: 760px) {
  body.emulsion { font-size: 17.5px; }
  .emulsion h1 { font-size: 38px; }
  .emulsion h1 .bo { font-size: 30px; }
  .emulsion .rail { position: relative; margin-bottom: 64px; }
  .emulsion .rail .name { width: 100%; margin-bottom: 4px; }
  .emulsion .note { padding: 2px 0 0 16px; margin-top: 28px; border-left-color: #3a3228; }
  .emulsion .block { margin-bottom: 64px; }
  .emulsion .intro { margin-bottom: 72px; }
  .emulsion .grain { background-size: 420px; }
  .emulsion .exposure { margin-left: -22px; margin-right: -22px; }
}

/* follow a mark to its note and the note takes light again, briefly */
.emulsion .foot .bo.big { color: var(--her); }
.emulsion .copy a:not(sup a) { text-decoration-color: var(--faint); }
@keyframes reexpose { from { color: var(--silver); text-shadow: 0 0 .6em rgba(238,229,209,.5); } }
.emulsion .note:target { color: var(--ink); animation: reexpose 2.4s ease-out; }

/* ── the seam, revised with Ezra (2026-09-29): no hard dark-slide line. His plate straddles the boundary,
   so the spring's night thins into the grain and the grain into the page (as in studies C and M). ── */
.emulsion .slide { display: none; }
.emulsion .seam { display: block; z-index: 3; opacity: .26; mix-blend-mode: screen;
  filter: grayscale(1) sepia(.22) contrast(1.3) brightness(.78); }
.emulsion #hero::after {
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 100%);
  mask-image: linear-gradient(to bottom, transparent, #000 100%); }
/* the drain also darkens into the page's own black, so there is no edge where the glass ends */
.emulsion #hero::after { height: 55%;
  background: linear-gradient(to bottom, transparent 0%, rgba(11,9,8,.35) 55%, var(--night) 100%); }
.emulsion .seam { opacity: .15; }
