:root {
  --paper: #f3eee5;
  --paper-2: #e9e2d6;
  --ink: #1f1b16;
  --muted: #7b7266;
  --line: #d9d1c4;
  --accent: #3fe05b;
  --mono: "DM Mono", ui-monospace, Menlo, monospace;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --evf: "Roboto Condensed", "Arial Narrow", sans-serif;
  --side: clamp(16px, 4vw, 56px);
  --gap: clamp(8px, 1.2vw, 16px);
}

* { box-sizing: border-box; }
html { background: var(--paper); }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--paper); color: var(--ink); font: 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
.mono { font-family: var(--mono); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; padding: 22px var(--side) 18px; background: var(--paper);
}
.wordmark { font: 500 20px/1 var(--mono); letter-spacing: -0.02em; text-decoration: none; }
.cursor { display: inline-block; animation: blink 1.05s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.site-nav { display: flex; gap: clamp(16px, 3vw, 28px); font-size: 15px; }
.site-nav a { text-decoration: none; padding-bottom: 2px; border-bottom: 1px solid transparent; }
.site-nav a:hover { color: var(--muted); }
.site-nav a.active { border-bottom-color: var(--ink); }

main { flex: 1; outline: none; }
.page { padding: 12px var(--side) 72px; }
.back {
  display: inline-flex; align-items: center; gap: 9px; margin: 4px 0 0; padding: 4px 0;
  background: none; border: 0; cursor: pointer; font: 13px var(--mono); color: var(--muted);
}
.back::before {
  content: ""; width: 7px; height: 7px; border-left: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg); margin-top: 1px;
}
.back:hover { color: var(--ink); }
.page.home .back { margin-bottom: 14px; }

/* ---------- footer ---------- */
.site-footer {
  display: flex; gap: 20px; flex-wrap: wrap; align-items: center; padding: 24px var(--side) 28px;
  border-top: 1px solid var(--line); margin: 0 var(--side); padding-inline: 0;
  font: 12px var(--mono); color: var(--muted);
}
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--ink); }
.footer-admin { margin-left: auto; opacity: .6; }

/* ---------- justified grid ---------- */
.justified { display: flex; flex-wrap: wrap; gap: var(--gap); min-height: 40px; }
.tile { position: relative; display: block; overflow: hidden; background: var(--paper-2); flex: none; }
.tile img {
  display: block; width: 100%; height: 100%; object-fit: cover; opacity: 0;
  transition: opacity .6s ease, transform .6s cubic-bezier(.2,.8,.2,1);
}
.tile img.loaded { opacity: 1; }
@media (hover: hover) { body:not(.admin) .tile:hover img { transform: scale(1.02); } }

/* ---------- page heads ---------- */
.page-head { display: flex; align-items: baseline; gap: 14px; margin: 18px 0 28px; }
.page-head h1 { margin: 0; font: 500 clamp(30px, 4.4vw, 52px)/1.05 var(--sans); letter-spacing: -0.02em; }
.count { font: 13px var(--mono); color: var(--muted); }
.lede { max-width: 52ch; margin: -12px 0 32px; color: var(--muted); }

/* ---------- work: series covers ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: clamp(20px, 3vw, 40px) var(--gap); margin-top: 18px; }
.card { display: block; text-decoration: none; }
.card-img { aspect-ratio: 4 / 3; overflow: hidden; background: var(--paper-2); }
.card-img img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity .6s ease, transform .8s cubic-bezier(.2,.8,.2,1); }
.card-img img.loaded { opacity: 1; }
@media (hover: hover) { body:not(.admin) .card:hover .card-img img { transform: scale(1.03); } }
.card-meta { display: flex; justify-content: space-between; align-items: baseline; padding-top: 12px; }
.card-title { font-size: 18px; font-weight: 500; }

/* ---------- series chapters ---------- */
.jump { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: -12px 0 36px; }
.jump button { background: none; border: 0; padding: 0; font: 13px var(--mono); color: var(--muted); cursor: pointer; }
.jump button:hover { color: var(--ink); }
.chapter { margin-top: 56px; scroll-margin-top: 80px; }
.chapter-title {
  display: flex; align-items: center; gap: 12px; margin: 0 0 18px; padding-top: 12px; border-top: 1px solid var(--line);
  font: 400 13px var(--mono); color: var(--muted);
}

/* ---------- about ---------- */
.about-body { max-width: 60ch; margin-top: 28px; }
.about-portrait {
  display: block; width: clamp(120px, 18vw, 168px); aspect-ratio: 1; border-radius: 50%; object-fit: cover; object-position: 50% 30%;
  margin-bottom: 28px; background: var(--paper-2); opacity: 0; transition: opacity .5s ease;
}
.about-portrait.loaded { opacity: 1; }
.about-body h1 { font: 500 clamp(28px, 4vw, 44px)/1.1 var(--sans); letter-spacing: -0.02em; margin: 0 0 28px; }
.about-body h1 .mono { font-weight: 400; font-size: .72em; color: var(--muted); letter-spacing: -0.03em; }
.about-body p { font-size: 18px; margin: 0 0 1em; }
.about-links { list-style: none; padding: 0; margin: 32px 0 0; display: flex; gap: 24px; font: 14px var(--mono); }
.hint { color: var(--muted); font-style: italic; }
.missing { padding-top: 80px; color: var(--muted); }

/* ---------- photo view ---------- */
body.viewing .site-header, body.viewing .site-footer { display: none; }
.lightbox {
  position: fixed; inset: 0; z-index: 40; background: var(--paper);
  display: grid; grid-template-columns: 64px 1fr 64px; grid-template-rows: 56px 1fr 64px;
}
.lb-figure { grid-column: 2; grid-row: 2; margin: 0; display: grid; place-items: center; min-height: 0; min-width: 0; overflow: hidden; touch-action: pan-y; }
.lb-figure img { max-width: 100%; max-height: calc(100vh - 120px); max-height: calc(100dvh - 120px); object-fit: contain; opacity: 0; transition: opacity .4s ease; box-shadow: 0 10px 40px rgba(31,27,22,.08); }
.lb-figure img.loaded { opacity: 1; }
.lb-close {
  grid-column: 3; grid-row: 1; justify-self: end; align-self: center; margin-right: var(--side);
  background: none; border: 0; cursor: pointer; font: 13px var(--mono); padding: 8px 0;
}
.lb-prev, .lb-next { grid-row: 2; background: none; border: 0; cursor: pointer; position: relative; }
.lb-prev { grid-column: 1; }
.lb-next { grid-column: 3; }
.lb-prev::after, .lb-next::after {
  content: ""; position: absolute; top: 50%; left: 50%; width: 14px; height: 14px;
  border-left: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); opacity: .55; transition: opacity .2s;
}
.lb-prev::after { transform: translate(-30%, -50%) rotate(45deg); }
.lb-next::after { transform: translate(-70%, -50%) rotate(-135deg); }
.lb-prev:hover::after, .lb-next:hover::after { opacity: 1; }
.lb-foot { grid-column: 1 / -1; grid-row: 3; display: flex; align-items: center; justify-content: center; gap: 24px; }
.buy {
  font: 500 14px var(--sans); text-decoration: none; background: var(--ink); color: var(--paper);
  padding: 10px 20px; border-radius: 99px;
}
.buy:hover { background: #3a332b; }
@media (max-width: 640px) {
  .lightbox { grid-template-columns: 0 1fr 0; }
  .lb-prev, .lb-next { display: none; }
}

/* ---------- intro: the page stays hidden until the shutter opens ---------- */
#intro-cover { display: none; }
html.intro #intro-cover { display: block; position: fixed; inset: 0; z-index: 100; background: #000; }
html.intro body { overflow: hidden; }
html.intro main .tile, html.intro main .card { opacity: 0; }
body.revealed main .tile, body.revealed main .card { animation: rise .8s cubic-bezier(.2,.8,.2,1) both; }
/* between the shutter opening and the name settling into the corner */
body.intro-word main .tile, body.intro-word main .card, body.intro-word .back { opacity: 0; }
body.intro-word .site-header .wordmark { visibility: hidden; }
html.intro .site-nav, html.intro .site-footer, body.intro-word .site-nav, body.intro-word .site-footer { opacity: 0; }
.site-nav, .site-footer { transition: opacity .9s ease .35s; }
.vf-word {
  position: fixed; z-index: 2; margin: 0; white-space: nowrap; transform-origin: 0 0; pointer-events: none;
  font-family: var(--mono); font-weight: 500; line-height: 1; letter-spacing: -0.02em; color: var(--ink);
}
body.revealed main .tile:nth-child(n+2) { animation-delay: 60ms; }
body.revealed main .tile:nth-child(n+3) { animation-delay: 120ms; }
body.revealed main .tile:nth-child(n+4) { animation-delay: 180ms; }
body.revealed main .tile:nth-child(n+5) { animation-delay: 240ms; }
body.revealed main .tile:nth-child(n+6) { animation-delay: 300ms; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.vf { position: fixed; inset: 0; z-index: 101; background: #000; color: #fff; display: grid; place-items: center; font-family: var(--evf); overflow: hidden; }
.vf-screen { position: relative; width: 100%; container-type: inline-size; }
.vf-shot { position: relative; aspect-ratio: 3 / 2; overflow: hidden; background: #000; }
/* phone held upright: the viewfinder turns with it and fills the screen */
.vf.tall .vf-screen { height: 100%; display: flex; flex-direction: column; }
.vf.tall .vf-shot { aspect-ratio: auto; flex: 1; }
/* a deeper bar so the readout clears the Skip button underneath it */
.vf.tall .vf-bar { height: 17cqw; align-items: flex-start; padding-top: 3cqw; }
.vf-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.vf-hud { position: absolute; inset: 0; opacity: 0; text-shadow: 0 0 .25cqw rgba(0,0,0,.7); font-weight: 500; line-height: 1; }
.vf-item { position: absolute; display: flex; align-items: center; gap: .6cqw; white-space: nowrap; }
.vf-item small { font-size: 2.2cqw; }
.vf svg { display: block; overflow: visible; filter: drop-shadow(0 0 .2cqw rgba(0,0,0,.7)); }
.vf-boxed { border: .22cqw solid #fff; padding: .25cqw .5cqw .15cqw; font-weight: 700; box-shadow: 0 0 .25cqw rgba(0,0,0,.5); }
.vf-boxed.fill { background: #fff; color: #111; text-shadow: none; }
.vf-boxed.small { font-size: 2.6cqw; }
.vf-stack { flex-direction: column; align-items: center; gap: .2cqw; display: flex; }
.vf-sub { font-size: 1.9cqw; }
.vf-item.vf-stack .vf-sub { font-size: 2.4cqw; }
.vf-af { position: absolute; width: 7cqw; height: 7cqw; border: .3cqw solid #fff; opacity: 0; box-shadow: 0 0 .3cqw rgba(0,0,0,.6); transform: translate(-50%, -50%); }
.vf-af.ok { border-color: var(--accent); }
.vf-bar { height: 11cqw; display: flex; align-items: center; justify-content: space-around; padding: 0 3cqw; font-size: 4.4cqw; font-weight: 500; opacity: 0; }
.vf-bar b { font-weight: 700; }
.vf-mm { display: flex; align-items: center; gap: 1cqw; }
.vf-fi { width: 5cqw !important; height: 5cqw; }
.vf-fi .dot { fill: none; stroke: #fff; stroke-width: 2.4; }
.vf-fi .arcs { opacity: 0; }
.vf-fi.ok .dot { fill: var(--accent); stroke: var(--accent); }
.vf-fi.ok .arcs { opacity: 1; }
.vf-skip { position: absolute; right: 16px; bottom: 12px; z-index: 5; background: none; border: 0; color: #8a8a8a; font: 12px var(--mono); cursor: pointer; }

/* shutter: matte off-black plastic slats */
.vf-half { position: absolute; left: 0; right: 0; height: 50%; z-index: 3; pointer-events: none; overflow: hidden; }
.vf-half.top { top: 0; }
.vf-half.bot { bottom: 0; }
.vf-slat {
  position: absolute; left: 0; right: 0; height: 31%; visibility: hidden;
  background-color: #242427;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%27160%27 height=%27160%27%3E%3Cfilter id=%27n%27%3E%3CfeTurbulence type=%27fractalNoise%27 baseFrequency=%27.85%27 numOctaves=%272%27 stitchTiles=%27stitch%27/%3E%3CfeColorMatrix values=%270 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .09 0%27/%3E%3C/filter%3E%3Crect width=%27100%25%27 height=%27100%25%27 filter=%27url(%23n)%27/%3E%3C/svg%3E"),
    linear-gradient(100deg, rgba(255,255,255,0) 20%, rgba(255,255,255,.045) 45%, rgba(255,255,255,0) 70%),
    linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,0) 35%, rgba(0,0,0,.18));
}
.vf-half.top .vf-slat { box-shadow: 0 3px 6px rgba(0,0,0,.55), inset 0 -1px 0 rgba(255,255,255,.14); }
.vf-half.bot .vf-slat { box-shadow: 0 -3px 6px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.14); }
.vf-flash { position: absolute; inset: 0; background: #fff; opacity: 0; z-index: 4; pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  .cursor { animation: none; }
  .tile img, .card-img img { transition: none; }
}

/* ---------- print shop (phone first) ---------- */
.compare { max-width: 72ch; margin: -8px 0 32px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.compare summary { cursor: pointer; padding: 12px 0; font: 14px var(--mono); color: var(--ink); }
.compare summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.compare-body { display: grid; gap: 8px 32px; padding: 4px 0 18px; }
@media (min-width: 700px) { .compare-body { grid-template-columns: 1fr 1fr; } .compare-body > p { grid-column: 1 / -1; } }
.compare-kind h3 { margin: 0 0 6px; font: 500 16px var(--sans); }
.compare-kind p { margin: 0 0 8px; }
.muted-small { font-size: 13px; color: var(--muted); }

/* rows of prints at one shared height with even gaps, like the photo grids: each card
   grows in proportion to its photo's shape (--a is width divided by height) */
.print-grid { --row: 300px; display: flex; flex-wrap: wrap; gap: 40px var(--gap); margin-top: 8px; }
@media (min-width: 1100px) { .print-grid { --row: 340px; } }
.print-card { display: flex; flex-direction: column; flex: var(--a) 1 calc(var(--a) * var(--row)); max-width: calc(var(--a) * var(--row) * 1.5); min-width: 0; }
.print-card-img { display: block; }
.print-card-img img { display: block; width: 100%; height: auto; opacity: 0; transition: opacity .6s ease; }
.print-card-img img.loaded { opacity: 1; }
/* one print per row on phones, full width */
@media (max-width: 559px) { .print-card { flex-basis: 100%; max-width: 100%; } }
.print-card-body { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding-top: 14px; }
.print-card-title { margin: 0; font: 500 18px/1.3 var(--sans); }
.print-card-title a { text-decoration: none; }
.print-card-title a:hover { text-decoration: underline; text-underline-offset: 3px; }
.print-card-size { margin: 0; font: 13px var(--mono); color: var(--muted); }
.print-card-price { margin: 2px 0 12px; font-size: 16px; }
.print-card .buy, .print-buy .buy { display: inline-block; border: 0; cursor: pointer; }
.print-buy .buy:disabled { background: var(--paper-2); color: var(--muted); cursor: not-allowed; }
.buy:focus-visible, .print-card a:focus-visible, .shop-links a:focus-visible, .info-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.print-layout { display: grid; grid-template-columns: 1fr; gap: 24px; margin-top: 16px; }
@media (min-width: 900px) { .print-layout { grid-template-columns: minmax(0, 1.25fr) minmax(300px, 1fr); gap: 48px; align-items: start; } .print-figure { position: sticky; top: 80px; } }
.print-figure { margin: 0; }
.print-stage { display: grid; place-items: center; aspect-ratio: 1; padding: 9%; background: var(--paper-2); }
.print-paper { position: relative; background: #fff; box-shadow: 0 10px 28px rgba(31,27,22,.16); transition: box-shadow .25s ease; max-height: 100%; }
.print-paper.framed { box-shadow: 0 0 0 clamp(8px, 1.4vw, 16px) #151412, 0 14px 34px rgba(31,27,22,.28); }
.print-photo { position: absolute; object-fit: cover; opacity: 0; transition: opacity .5s ease; }
.print-photo.loaded { opacity: 1; }
.print-figure figcaption { margin-top: 8px; }

.print-info h1 { margin: 0 0 4px; font: 500 clamp(28px, 4vw, 40px)/1.1 var(--sans); letter-spacing: -0.02em; }
.print-price { margin: 0 0 14px; font-size: 22px; }
.print-desc { margin: 0 0 1em; max-width: 52ch; }
.print-options { margin: 18px 0 16px; display: grid; gap: 18px; }
.opt-group { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; }
.opt-group legend { padding: 0; margin-bottom: 8px; font: 13px var(--mono); color: var(--muted); }
.opt-row { position: relative; display: flex; align-items: stretch; gap: 8px; flex-wrap: wrap; }
.opt { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fbf8f3; cursor: pointer; }
.opt:hover { border-color: var(--muted); }
.opt:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: #fff; }
.opt:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }
.opt input { accent-color: var(--ink); width: 18px; height: 18px; margin: 0; flex: none; }
.opt-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.opt-name { font-size: 15px; }
.opt-meta { font: 12px var(--mono); color: var(--muted); }
.info-btn {
  flex: none; align-self: center; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line);
  background: #fbf8f3; font: italic 600 15px Georgia, serif; color: var(--ink); cursor: pointer;
}
.info-btn[aria-expanded="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.info-pop { flex-basis: 100%; padding: 12px 14px; border-radius: 10px; background: var(--paper-2); font-size: 14px; }
.info-pop p { margin: 0 0 6px; }
.info-pop p:last-child { margin: 0; }
.print-buy { margin: 4px 0 10px; }
.print-guide { margin: 0 0 8px; font-size: 14px; color: var(--muted); max-width: 52ch; }
.print-about { margin-top: 28px; padding-top: 14px; border-top: 1px solid var(--line); }
.print-about h2 { margin: 0 0 10px; font: 400 13px var(--mono); color: var(--muted); }
.print-about-list { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; font-size: 14px; }
.print-about-list dt { color: var(--muted); }
.print-about-list dd { margin: 0; }
.shop-links { list-style: none; padding: 0; margin: 48px 0 0; display: flex; flex-wrap: wrap; gap: 8px 24px; font: 13px var(--mono); }
.print-info .shop-links { margin-top: 28px; }
.shop-links a { color: var(--muted); }
.shop-links a:hover { color: var(--ink); }

.info-page h1 { margin: 18px 0 28px; font: 500 clamp(30px, 4.4vw, 52px)/1.05 var(--sans); letter-spacing: -0.02em; }
.info-section { max-width: 60ch; padding-top: 14px; margin-bottom: 28px; border-top: 1px solid var(--line); }
.info-section h2 { margin: 0 0 8px; font: 400 13px var(--mono); color: var(--muted); }
.info-section p { margin: 0 0 .8em; }
.page [tabindex="-1"]:focus { outline: none; }

/* text still to be written, obvious on purpose */
.todo { outline: 1px dashed #b5652b; outline-offset: 4px; color: #8a4a1c; }
