/* Shared by every page: paper, type, cutout letters, his grain, film frames. */
@font-face { font-family: "Magazine Letter"; src: url(magazine-letter.ttf) format("truetype"); font-display: block; }

:root {
  --paper: #f1ece2;
  --ink: #16130f;
  --night: #05110a;                         /* his shadows: Fuji green-black, sampled from the concert frames */
  --grey: #8a8378;
  --wax-o: #f28c28;
  --wax-y: #f2c81e;
  --wax-r: #e5412d;
  --wax-b: #2c6cc0;
  --wax-g: #2e9f5b;
  --gut: clamp(20px, 4vw, 64px);
  --snap: cubic-bezier(.2, 1.4, .35, 1);   /* registration pins: lands with a small overshoot */
  --drift: cubic-bezier(.45, 0, .2, 1);    /* falling back out of register: slow, no bounce */
}
* { box-sizing: border-box; margin: 0 }
[hidden] { display: none !important }   /* `hidden` wins over any display rule */
html { scrollbar-width: none }                                   /* no scrollbar: Firefox + Chrome */
html::-webkit-scrollbar { display: none }                       /* Safari */
body {
  /* real paper scan (ambientCG Paper001, CC0), warmed by multiplying with --paper */
  background: var(--paper) url(paper.jpg) 0 0 / 1024px auto;
  background-blend-mode: multiply;
  color: var(--ink);
  font: 400 1.0625rem/1.5 "EB Garamond", Georgia, serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; display: inline-block; transition: scale 150ms ease-out }
a:active { scale: .97 }
a:focus-visible { outline: 1px solid var(--ink); outline-offset: 4px }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap }

/* ── misregistration ─────────────────────────────────────────────
   Every letter is a cutout printed three times in wax colours, stacked like
   wax layers (normal blend) and each pass knocked slightly off its pins.
   The letter as a whole multiplies onto the paper, so the paper grain shows through.
   Registered = every pass back on its pins, in ink. */
.reg { display: inline-block; font-family: "Magazine Letter", fantasy; font-weight: 400; line-height: 1; white-space: nowrap; vertical-align: top; cursor: default }
.l { display: inline-grid; mix-blend-mode: multiply; transform: translateY(var(--dy)) rotate(var(--rot)) }
.c {
  grid-area: 1 / 1;
  --x: var(--x0); --y: var(--y0); --c: var(--c0);
  color: var(--c);
  transform: translate(var(--x), var(--y));
  transition: transform .9s var(--drift), color .6s var(--drift);
}
.reg.is-reg .c,
.entry.is-active .c {
  --x: 0em; --y: 0em; --c: var(--ink);
  transition: transform .45s var(--snap) var(--d), color .2s linear var(--d);
}
@media (hover: hover) {
  .entry .reg:hover .c {
    --x: 0em; --y: 0em; --c: var(--ink);
    transition: transform .45s var(--snap) var(--d), color .2s linear var(--d);
  }
}

@keyframes grain2 {
  0%  { background-position: 0 0, 0 0 }
  20% { background-position: -91px 37px, 140px -203px }
  40% { background-position: 53px -118px, -77px 96px }
  60% { background-position: -147px -61px, 211px 158px }
  80% { background-position: 109px 83px, -182px -44px }
}
@keyframes grain {
  0%  { background-position: 0 0 }
  20% { background-position: -91px 37px }
  40% { background-position: 53px -118px }
  60% { background-position: -147px -61px }
  80% { background-position: 109px 83px }
}

/* strip: a film frame. Black until it scrolls into view (.is-lit, once); then it develops: highlights punch
   through first, shadows fill in last. No grain on photos. The end state is the photo untouched (filters at identity). */
.strip { position: relative; overflow: hidden; background: #000 }
.strip img, .strip video { display: block; width: 100%; height: auto; filter: brightness(0) }
.strip.is-lit img, .strip.is-lit video { animation: develop 1.4s cubic-bezier(.2, .6, .3, 1) forwards }
@keyframes develop {
  0%   { filter: brightness(0)   contrast(1)   saturate(.2) }
  20%  { filter: brightness(.55) contrast(1.8) saturate(.4) }
  55%  { filter: brightness(.92) contrast(1.2) saturate(.85) }
  100% { filter: brightness(1)   contrast(1)   saturate(1) }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; transition-delay: 0s !important; animation: none !important }
  .strip img, .strip video { filter: none; scale: 1 }
}

/* ── inquiry: one form, reachable from everywhere ([data-inquire] opens it; its value pre-picks a category) ── */
html:has(.inq[open]) { overflow: hidden }
.inq {
  position: fixed; inset: 0 0 0 auto; width: min(560px, 100vw); height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0; overflow-y: auto; overscroll-behavior: contain;
  background: var(--paper) url(paper.jpg) 0 0 / 1024px auto; background-blend-mode: multiply; color: var(--ink);
}
.inq[open] { animation: inq-in .45s cubic-bezier(.2, .8, .2, 1) }
@keyframes inq-in { from { translate: 48px 0; opacity: 0 } }   /* slides in from the side it lives on */
.inq::backdrop { background: rgb(22 19 15 / .45) }
.inq-form, .inq-done { display: grid; gap: 28px; padding: 28px clamp(22px, 5vw, 44px) 40px }
.inq-head { display: flex; justify-content: space-between; align-items: start; gap: 16px }
.inq-title { font-size: clamp(2.4rem, 7vw, 3.6rem); font-weight: 400; line-height: 1.05 }
@media (hover: hover) { .inq .reg:hover .c { --x: 0em; --y: 0em; --c: var(--ink); transition: transform .45s var(--snap) var(--d), color .2s linear var(--d) } }
.inq-close, .inq-done button { font: inherit; color: inherit; background: none; border: 0; padding: 6px 0; cursor: pointer; transition: scale 150ms ease-out }
.inq-close { flex-shrink: 0; white-space: nowrap }
.inq-form:focus { outline: 0 }
.inq button:focus-visible, .inq a:focus-visible { outline: 1px solid var(--ink); outline-offset: 4px }
.inq-label, .inq legend { display: block; margin-bottom: 8px; color: var(--grey); font-size: .9375rem }
.inq fieldset { border: 0; padding: 0; margin: 0; min-width: 0 }
.inq-chips { display: flex; flex-wrap: wrap; gap: 8px }
.inq-chips input { position: absolute; opacity: 0; pointer-events: none }
.inq-chips span { display: inline-block; padding: 8px 14px; border: 1px solid var(--ink); cursor: pointer; transition: background .15s, color .15s, scale 150ms ease-out }
.inq-chips span:active { scale: .97 }
.inq-chips input:checked + span { background: var(--ink); color: var(--paper) }
.inq-chips input:focus-visible + span { outline: 1px solid var(--ink); outline-offset: 3px }
.inq input:not([type]), .inq textarea {
  width: 100%; padding: 8px 0; border: 0; border-bottom: 1px solid var(--ink); border-radius: 0;
  background: none; color: inherit; font: 1.25rem/1.4 "EB Garamond", Georgia, serif; outline: 0;
}
.inq textarea { resize: vertical; min-height: 4.5em }
.inq input::placeholder, .inq textarea::placeholder { color: color-mix(in oklab, var(--grey) 75%, transparent) }
.inq input:focus-visible, .inq textarea:focus-visible { border-bottom-width: 2px; margin-bottom: -1px }
.inq .is-bad .inq-label, .inq .is-bad legend { color: var(--wax-r) }
.inq .is-bad input, .inq .is-bad textarea, .inq .is-bad .inq-chips span { border-color: var(--wax-r) }
.inq .is-bad { animation: shake .36s ease-out }
@keyframes shake { 0%, 100% { translate: 0 } 17% { translate: -10px } 33% { translate: 10px } 50% { translate: -6px } 67% { translate: 6px } 83% { translate: -3px } }
.inq-send {
  justify-self: start; padding: 14px 22px; border: 0; background: var(--ink); color: var(--paper);
  font: 1.25rem "EB Garamond", Georgia, serif; cursor: pointer; transition: scale 150ms ease-out;
}
.inq-send:active, .inq-close:active, .inq-done button:active { scale: .97 }
.inq-send span, .inq-cta span { display: inline-block; margin-left: .35em; transition: translate .3s var(--drift) }
.inq-send:hover span, .inq-cta:hover span { translate: 6px 0 }
.inq-done { align-content: start }
.inq-done p { font-size: clamp(1.6rem, 4vw, 2.2rem); line-height: 1.2 }
.inq-done p + p { font-size: 1.125rem; color: var(--grey) }
.inq-done button { justify-self: start; border-bottom: 1px solid currentColor }

/* the small always-there door, after the hero */
.inq-fab {
  position: fixed; right: 18px; bottom: 18px; z-index: 8;
  padding: 10px 18px; background: var(--ink); color: var(--paper); box-shadow: 0 0 0 1px var(--paper);   /* 1px paper ring: reads on the dark band too */
  font-size: 1.0625rem; opacity: 0; scale: .97; pointer-events: none; transition: opacity .3s ease-out, scale .3s ease-out;
}
.inq-fab.is-on { opacity: 1; scale: 1; pointer-events: auto }
.inq-fab.is-on:active { scale: .97 }
html:has(.viewer[open]) .inq-fab, html:has(.inq[open]) .inq-fab { opacity: 0; pointer-events: none }

/* inline doors */
.inq-link { margin-top: 10px; color: var(--grey); font-size: 1rem; border-bottom: 1px solid transparent; transition: color .2s, border-color .2s, scale 150ms ease-out }
.inq-link:hover { color: var(--ink); border-color: currentColor }
@media (max-width: 760px) { .inq { width: 100vw } .inq[open] { animation-name: inq-up } @keyframes inq-up { from { translate: 0 40px; opacity: 0 } } }
