/* case.css: the case-study pages, the index and the 404. Black, cream ink, Geist Mono for the
   words, Instrument Serif for the titles, hairlines between numbered sections. Screenshots are
   gradient-mapped to the palette (black, deep red, orange, cream) by the SVG filters in each
   page; "true colour" takes the filter off. */
/* fonts, self-hosted (Geist Mono and Instrument Serif, SIL Open Font License). Geist Mono is
   one variable file per subset; symbols2 holds the box-drawing glyphs the atlas uses */
@font-face { font-family: "Geist Mono"; font-style: normal; font-weight: 400 600; font-display: swap; src: url(../fonts/geist-mono-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Geist Mono"; font-style: normal; font-weight: 400 600; font-display: swap; src: url(../fonts/geist-mono-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Geist Mono"; font-style: normal; font-weight: 400 600; font-display: swap; src: url(../fonts/geist-mono-symbols2.woff2) format("woff2"); unicode-range: U+2000-2001, U+2004-2008, U+200A, U+23B8-23BD, U+2500-259F; }
@font-face { font-family: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/instrument-serif-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/instrument-serif-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap; src: url(../fonts/instrument-serif-italic-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap; src: url(../fonts/instrument-serif-italic-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root { --ink: #efe6da; --soft: rgba(239, 230, 218, 0.78); --dim: rgba(239, 230, 218, 0.52); --faint: rgba(239, 230, 218, 0.34); --rule: rgba(255, 255, 255, 0.09); --rose: #a54657; --fire: #ff8c26; --red: #9e1f0d; --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace; --serif: "Instrument Serif", "Times New Roman", serif; }
* { box-sizing: border-box; }
html { background: #000; color-scheme: dark; }
body { margin: 0; background: #000; color: var(--ink); font-family: var(--mono); font-size: 13px; line-height: 1.7; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
:focus-visible { outline: 1px solid var(--rose); outline-offset: 3px; }
::selection { background: rgba(165, 70, 87, 0.55); color: #fff; }
a { color: var(--ink); text-underline-offset: 3px; text-decoration-color: rgba(239, 230, 218, 0.3); }
a:hover { color: var(--fire); text-decoration-color: var(--fire); }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.sep { color: var(--faint); }
.dim { color: var(--dim); }

.top { max-width: 760px; margin: 0 auto; padding: 28px 16px 0; display: flex; justify-content: space-between; gap: 16px; font-size: 12px; }
.top a { text-decoration: none; border-bottom: 1px solid rgba(239, 230, 218, 0.3); padding-bottom: 1px; }
.top a:first-child::before { content: "\2190\00a0"; color: var(--dim); }
main { max-width: 760px; margin: 0 auto; padding: 56px 16px 72px; }

/* the opening: motif, kicker, name, the film's words */
.motif { margin: 0 0 32px; font: 500 12px/1.25 var(--mono); white-space: pre; overflow: hidden; color: var(--fire);
  background: linear-gradient(180deg, #efe6da 0%, #ff8c26 45%, #9e1f0d 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.kicker { font-size: 11px; letter-spacing: 0.04em; color: var(--dim); margin: 0; }
h1 { font: italic 400 clamp(52px, 12vw, 96px) / 0.95 var(--serif); letter-spacing: -0.015em; margin: 10px 0 20px; }
.headline { font: 400 clamp(26px, 4.6vw, 36px) / 1.1 var(--serif); margin: 0 0 16px; max-width: 24ch; }
.line { color: var(--soft); margin: 0; max-width: 62ch; }
.number { font-size: 12px; margin: 20px 0 0; padding-left: 10px; border-left: 1px solid var(--rose); }
.links { font-size: 12px; margin: 22px 0 0; color: var(--dim); }
.links a { text-decoration: none; border-bottom: 1px solid rgba(239, 230, 218, 0.3); padding-bottom: 1px; }
.links a[target]::after { content: "\00a0\2197"; color: var(--dim); }

/* numbered sections, divided by hairlines */
.sec { display: grid; grid-template-columns: 13em 1fr; gap: 6px 24px; margin-top: 44px; padding-top: 18px; border-top: 1px solid var(--rule); }
.sec:first-of-type { margin-top: 64px; }
.sec h2 { grid-column: 1; margin: 0; font: 400 22px/1.15 var(--serif); }
.sec h2 .n { display: block; font: 400 11px/1.6 var(--mono); letter-spacing: 0.04em; color: var(--rose); margin-bottom: 4px; }
.sec > :not(h2) { grid-column: 2; }
.sec p { margin: 0 0 12px; color: var(--soft); max-width: 60ch; }
.sec ul { margin: 0; padding: 0; list-style: none; color: var(--soft); }
.sec li { padding: 7px 0; border-bottom: 1px solid var(--rule); }
.sec li:first-child { padding-top: 0; }
.sec li::before { content: "\00b7\00a0\00a0"; color: var(--fire); }
.sec figure { grid-column: 1 / -1; }

/* figures: screenshots in the palette, the Kenchi plan */
figure { margin: 28px 0 8px; }
.frame { position: relative; border: 1px solid var(--rule); background: #000; }
figcaption { margin-top: 10px; font-size: 11px; color: var(--dim); display: flex; justify-content: space-between; align-items: baseline; gap: 6px 16px; }
.shot.narrow { max-width: 360px; }
.shot img { display: block; width: 100%; height: auto; filter: url(#ink); transition: filter 0.4s; }
.shot.inv img { filter: url(#ink-inv); }
.shot.raw img { filter: none; }
/* the toggles sit at the right of the caption row, never over the picture */
.toggle {
  flex: none; font: 400 11px var(--mono); letter-spacing: 0.02em;
  color: var(--ink); background: #000; border: 1px solid rgba(239, 230, 218, 0.22); padding: 5px 9px; cursor: pointer;
}
.toggle[aria-pressed="true"] { border-color: var(--rose); color: #fff; }
.toggle:hover { color: var(--fire); }
.plan .frame { padding: 20px; }
.plan-lines { display: block; width: 100%; height: auto; }
.plan-lines path { fill: none; vector-effect: non-scaling-stroke; stroke-linecap: square; }
.plan-lines .wl { stroke: var(--ink); stroke-width: 1.2; }
.plan-lines .op { stroke: var(--fire); stroke-width: 0.9; }
.plan-lines .it { stroke: rgba(239, 230, 218, 0.3); stroke-width: 0.8; }
.plan-lines .lb { font: 400 0.2px var(--mono); fill: var(--dim); text-anchor: middle; dominant-baseline: middle; letter-spacing: 0.01px; }
.plan-ascii { margin: 0; font: 500 clamp(6px, calc((100vw - 74px) / 44), 11px) / 1.2 var(--mono); white-space: pre; color: var(--soft); overflow: hidden; }
.plan.ascii .plan-lines { display: none; }

/* previous / next, and the footer */
.pn { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 72px; padding-top: 18px; border-top: 1px solid var(--rule); }
.pn a { text-decoration: none; }
.pn .k { display: block; font-size: 11px; color: var(--dim); }
.pn .t { display: block; font: 400 26px/1.15 var(--serif); }
.pn .next { text-align: right; }
.foot { width: min(728px, calc(100% - 32px)); margin: 0 auto; padding: 24px 0 48px; border-top: 1px solid var(--rule); font-size: 12px; color: var(--dim); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.foot p { margin: 0; }
.foot .name { font: italic 400 20px var(--serif); text-decoration: none; margin-right: 8px; }

/* the index page */
.work { list-style: none; margin: 56px 0 0; padding: 0; border-top: 1px solid var(--rule); }
.work li { border-bottom: 1px solid var(--rule); }
.work a { display: grid; grid-template-columns: 3em 1fr; gap: 2px 12px; padding: 18px 0; text-decoration: none; }
.work .n { grid-row: span 2; font-size: 11px; color: var(--rose); padding-top: 8px; }
.work .t { font: 400 30px/1.1 var(--serif); }
.work .d { color: var(--dim); font-size: 12px; max-width: 64ch; }
.work a:hover .t { color: var(--fire); }

/* the 404 */
.nf main { padding-top: 12vh; }
.nf .motif { font-size: 14px; }

@media (max-width: 640px) {
  body { font-size: 12.5px; }
  main { padding-top: 40px; }
  .sec { grid-template-columns: 1fr; margin-top: 44px; }
  .sec > :not(h2) { grid-column: 1; }
  .sec h2 { margin-bottom: 8px; }
  .motif { font-size: 10px; }
  .pn .t { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) { .shot img { transition: none; } }

/* an ASCII figure, for the projects without screenshots */
.ascii-fig .frame { padding: 22px 20px; overflow-x: auto; }
.ascii-fig pre { margin: 0; font: 500 12px/1.35 var(--mono); color: var(--soft); white-space: pre; }
.plan-lines .lb { paint-order: stroke; stroke: #000; stroke-width: 0.07px; stroke-linejoin: round; }
@media (max-width: 640px) { .ascii-fig pre { font-size: clamp(7px, calc((100vw - 74px) / 34), 12px); } }
