/* Progressive Blur, in full: six photochroms, each whole and as wide as the screen, captioned on the picture. Towards
   the caption's edge, six layers of backdrop blur, each twice the last and masked to its own overlapping band, make
   the blur itself grow; a whisper of tint helps the ink. --reach is how much of the picture the softening covers,
   chosen per print to stop short of its subject. Each print carries the switch: labels for one radio group. */

.photochroms{position:relative;width:100vw;margin-inline:calc(50% - 50vw);border:0;border-radius:0;background:#0E0D0C}
.print{position:relative;margin:0;aspect-ratio:var(--ar);overflow:clip;
  --ink:#F7F1E6;--ink-soft:rgb(247 241 230 / .8);--tint:rgb(12 8 4 / .3)}
.print.dark{--ink:#1D1813;--ink-soft:rgb(29 24 19 / .76);--tint:rgb(255 250 240 / .26)}
.print img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:var(--x) 50%;display:block}

/* the softening: six bands, 1px to 32px, each overlapping the next, growing towards the quiet edge */
.veil{position:absolute;left:0;right:0;height:var(--reach);pointer-events:none;--to:to bottom}
.bottom .veil{bottom:0}
.top .veil{top:0;--to:to top}
.veil i{position:absolute;inset:0;backdrop-filter:blur(var(--b));-webkit-backdrop-filter:blur(var(--b));
  mask:linear-gradient(var(--to),transparent calc(var(--k) * 12.5%),#000 calc((var(--k) + 1) * 12.5%),
    #000 calc((var(--k) + 2) * 12.5%),transparent calc((var(--k) + 3) * 12.5%))}
.veil i:last-child{mask:linear-gradient(var(--to),transparent calc(var(--k) * 12.5%),#000 calc((var(--k) + 1) * 12.5%))}
.veil::after{content:'';position:absolute;inset:0;background:linear-gradient(var(--to),transparent 20%,var(--tint))}
/* what it replaces */
.bar{position:absolute;left:0;right:0;height:calc(var(--reach) * .72);background:rgb(0 0 0 / .66);display:none}
.bottom .bar{bottom:0}
.top .bar{top:0}

.print figcaption{--gap:clamp(22px,5.5vh,60px);position:absolute;left:clamp(20px,5vw,80px);right:clamp(20px,5vw,80px);
  display:grid;gap:8px;color:var(--ink)}
.bottom figcaption{bottom:var(--gap)}
.top figcaption{top:var(--gap)}
.right figcaption{justify-items:end;text-align:right}
.print .no{font:10px/1 var(--mono);letter-spacing:.18em;color:var(--ink-soft)}
.print figcaption b{font-family:var(--display);font-weight:400;font-size:clamp(40px,6.6vw,104px);line-height:.92;letter-spacing:-.02em;
  text-wrap:balance;padding-bottom:.16em}   /* room for the descenders of p, y and g above the line below */
.print .where{font:11px/1.2 var(--mono);letter-spacing:.16em;text-transform:uppercase;color:var(--ink-soft)}

/* the switch, on every print, at the edge away from its caption; all its labels drive one radio group */
.under{position:absolute;width:1px;height:1px;margin:0;padding:0;border:0;overflow:hidden;clip-path:inset(50%)}
.switch{position:absolute;right:clamp(14px,3vw,40px);display:flex;margin:0;border-radius:999px;white-space:nowrap;
  background:rgb(14 13 12 / .5);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px)}
.bottom .switch{top:clamp(14px,3vh,28px)}
.top .switch{bottom:clamp(14px,3vh,28px)}
.switch label{padding:8px 13px;border-radius:999px;cursor:pointer;font:10px/1 var(--mono);letter-spacing:.12em;text-transform:uppercase;
  color:rgb(247 241 230 / .82);transition:background-color .25s var(--settle),color .25s var(--settle)}
.switch label:hover{color:#fff}
.photochroms:has(#under-blur:checked) [for=under-blur],.photochroms:has(#under-bar:checked) [for=under-bar],
.photochroms:has(#under-none:checked) [for=under-none]{background:#F7F1E6;color:#141210}
.photochroms:has(#under-blur:focus-visible) [for=under-blur],.photochroms:has(#under-bar:focus-visible) [for=under-bar],
.photochroms:has(#under-none:focus-visible) [for=under-none]{outline:2px solid #F7F1E6;outline-offset:2px}
.photochroms:has(#under-bar:checked) .veil,.photochroms:has(#under-none:checked) .veil{display:none}
.photochroms:has(#under-bar:checked) .bar{display:block}
.photochroms:has(#under-bar:checked) .print{--ink:#F7F1E6;--ink-soft:rgb(247 241 230 / .8)}

@media (max-width:760px){
  /* a phone crops each print tall, held on its subject; the softening reaches a little further */
  .print{aspect-ratio:auto;height:calc(100svh - var(--bar));--reach-m:calc(var(--reach) + 8%)}
  .veil{height:var(--reach-m)}
  .bar{height:calc(var(--reach-m) * .6)}
  .print figcaption b{font-size:clamp(34px,10vw,48px)}
  .switch{left:50%;right:auto;translate:-50% 0}
  .switch label{padding:8px 10px}
}
