/* Jonah Graves: Dead Letters.
   VOICE  dry noir, plain words, a detective's desk at night.
   IDEA   a returned-mail case file: envelopes, postmarks, stamps, typed letters, red evidence string, one desk lamp.
   COLOR  night desk #0e0d0c, case paper #efe6d2, lamp amber #f0b04a, stamp red #ad2a20, postal ink #2c4a6b.
   TYPE   Playfair Display (titles), Source Serif 4 (body, 19px), Courier Prime (typed labels, the grid). All self-hosted, OFL.
   LAYOUT phone first; one column under 760px; bands run full width; content up to 1160px. */

@font-face { font-family: "Playfair Display"; src: url(../fonts/playfair-display-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Playfair Display"; src: url(../fonts/playfair-display-latin-900-normal.woff2) format("woff2"); font-weight: 900; font-display: swap; }
@font-face { font-family: "Courier Prime"; src: url(../fonts/courier-prime-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Courier Prime"; src: url(../fonts/courier-prime-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url(../fonts/source-serif-4-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url(../fonts/source-serif-4-latin-400-italic.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url(../fonts/source-serif-4-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }

:root {
  color-scheme: dark;
  --night: #0e0d0c; --night-2: #181512; --night-3: #221d18; --wood: #2a2219;
  --chalk: #f1eadc; --chalk-2: #cdc3b0;
  --paper: #efe6d2; --paper-2: #e2d4b4; --ink: #1d1915; --ink-2: #4d443a;
  --lamp: #f0b04a; --red: #ad2a20; --red-hi: #ef6a5c; --postal: #2c4a6b; --string: #c23a2e;
  --line: rgba(241, 234, 220, .16);
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --display: "Playfair Display", Georgia, "Times New Roman", serif;
  --type: "Courier Prime", "Courier New", Courier, monospace;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .28 0 0 0 0 .18 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23g)' opacity='.22'/%3E%3C/svg%3E");
  --ease: cubic-bezier(.2, .7, .1, 1);
}
*, *::before, *::after { box-sizing: border-box; min-width: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 16px; -webkit-text-size-adjust: 100%; }
@media (min-width: 900px) { html { scroll-padding-top: 84px; } .top { position: sticky; } }
html.still { scroll-behavior: auto; }
body {
  margin: 0; color: var(--chalk); font: 400 19px/1.6 var(--serif); overflow-x: clip;
  background: radial-gradient(120% 70% at 10% -10%, #2b2117 0, rgba(43, 33, 23, 0) 60%), var(--night);
  padding-bottom: env(safe-area-inset-bottom);
}
img, svg { max-width: 100%; }
img { height: auto; display: block; }
a { color: var(--lamp); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--lamp); outline-offset: 3px; border-radius: 3px; }
.paper :focus-visible, .paper:focus-visible { outline-color: var(--ink); }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; line-height: 1.08; margin: 0 0 .5em; text-wrap: balance; letter-spacing: -.005em; }
h1 { font-size: clamp(2.3rem, 6.4vw, 3.6rem); font-weight: 900; }
h2 { font-size: clamp(2rem, 5vw, 3rem); }
h3 { font-size: 1.4rem; }
p { margin: 0 0 1em; }
cite { font-style: italic; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -80px; z-index: 50; background: var(--lamp); color: var(--ink); padding: 12px 18px; font-weight: 600; border-radius: 4px; }
.skip:focus { top: 12px; }
.wrap { width: min(1160px, 100%); margin-inline: auto; padding-inline: max(20px, 4vw, env(safe-area-inset-left)); position: relative; }
.narrow { width: min(820px, 100%); }
.band { padding-block: clamp(56px, 8vw, 112px); position: relative; z-index: 1; }
.kicker { font-family: var(--type); font-weight: 700; font-size: 1rem; color: var(--lamp); margin: 0 0 .7em; letter-spacing: .02em; }
.kicker span + span::before { content: "·"; margin: 0 .5em; color: var(--chalk-2); }
.lead { font-size: 1.15rem; color: var(--chalk); max-width: 40em; }
.fine { font-size: 18px; color: var(--chalk-2); }
.paper .fine { color: var(--ink-2); }
.paper { background-color: var(--paper); background-image: var(--grain); color: var(--ink); }
.paper a { color: var(--postal); }
.sec-head { margin-bottom: clamp(24px, 4vw, 44px); max-width: 46em; }

/* the lamp: a pool of warm light on the desk. On a computer it follows the pointer (site.js); the still version holds it in place. */
.lamp { position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(560px circle at var(--lx, 22%) var(--ly, 12%), rgba(240, 176, 74, .12), rgba(240, 176, 74, .04) 45%, rgba(0, 0, 0, 0) 70%); }

/* ---------- buttons and fields ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 50px; padding: 10px 22px;
  font: 700 1.05rem/1.2 var(--type); letter-spacing: .01em; border-radius: 4px; border: 2px solid var(--lamp);
  background: transparent; color: var(--chalk); text-decoration: none; cursor: pointer; text-align: center;
  transition: transform .18s var(--ease), background-color .18s, box-shadow .18s; }
.btn { transform: translate(var(--mx, 0px), var(--my, 0px)); }
.btn:hover { transform: translate(var(--mx, 0px), calc(var(--my, 0px) - 1px)); box-shadow: 0 6px 18px rgba(0, 0, 0, .35); }
.btn.mag { transition: transform .25s cubic-bezier(.2, .8, .3, 1.2), background-color .18s, box-shadow .18s; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--lamp); color: var(--ink); }
.btn.ghost { border-color: var(--chalk-2); color: var(--chalk); }
.btn.ink { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn.ghost-ink { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn.small { min-height: 46px; padding: 8px 16px; font-size: 1rem; }
.btn.big { min-height: 58px; font-size: 1.15rem; padding-inline: 28px; }
.btn[aria-disabled="true"], .btn:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset[disabled] { opacity: .62; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font: 700 1rem/1.3 var(--type); }
.opt { font-weight: 400; }
input[type=email], input[type=text] { font: 400 1.1rem/1.3 var(--serif); padding: 12px 14px; min-height: 52px; width: 100%; border-radius: 4px;
  border: 2px solid var(--chalk-2); background: var(--night-2); color: var(--chalk); }
.paper input[type=email], .paper input[type=text] { background: #fbf6ea; color: var(--ink); border-color: var(--ink-2); }
input[aria-invalid="true"] { border-color: var(--red-hi); }
.paper input[aria-invalid="true"] { border-color: var(--red); }
.form-msg { min-height: 0; margin: 12px 0 0; font-weight: 600; }
.form-msg:empty { display: none; }
.form-msg.ok { color: var(--lamp); }
.form-msg.err { color: var(--red-hi); }
.paper .form-msg.ok { color: var(--postal); }
.paper .form-msg.err { color: var(--red); }
.soon { border: 2px dashed currentColor; border-radius: 6px; padding: 14px 16px; margin: 0 0 16px; font-size: 18px; }
.soon p { margin: 0 0 .4em; }
.soon p:last-child { margin: 0; }
.soon-t { font: 700 1.05rem/1.2 var(--type); text-transform: uppercase; letter-spacing: .08em; }
.soon[hidden] { display: none; }

/* ---------- top bar ---------- */
.top { position: relative; top: 0; z-index: 20; background: rgba(14, 13, 12, .92); border-bottom: 1px solid var(--line);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.top-in { display: flex; align-items: center; gap: 12px 20px; min-height: 64px; flex-wrap: wrap; padding-block: 6px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--chalk); text-decoration: none; font: 900 1.25rem/1 var(--display); margin-right: auto; min-height: 44px; }
.brand svg { width: 38px; height: 38px; flex: none; }
.menu ul { list-style: none; display: flex; gap: 4px 18px; margin: 0; padding: 0; flex-wrap: wrap; }
.menu li { flex: none; }
.menu a { color: var(--chalk); text-decoration: none; font: 700 1rem/1 var(--type); padding: 12px 2px; display: inline-block; }
.menu a:hover { color: var(--lamp); text-decoration: underline; }

@media (max-width: 899px) {
  .home .menu { order: 3; width: 100%; }
  .menu a { white-space: nowrap; padding-block: 8px; }
}

/* ---------- hero ---------- */
.hero { padding-block: clamp(28px, 6vw, 84px) clamp(48px, 7vw, 96px); position: relative; z-index: 1; }
.hero-in { display: grid; gap: 28px; }
.hero h1 { margin-bottom: .45em; max-width: 13em; }
.stats { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 4px 0 24px; }
.stats li { display: flex; align-items: baseline; gap: 8px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 4px; background: rgba(24, 21, 18, .8); }
.stats b { font: 900 1.9rem/1 var(--display); color: var(--lamp); }
.stats li > span { font: 700 1rem/1 var(--type); text-transform: uppercase; letter-spacing: .06em; }
.notify { border-top: 1px solid var(--line); padding-top: 20px; max-width: 34em; }
.notify-t { font-size: 1.5rem; margin-bottom: .3em; }
.notify-p { color: var(--chalk-2); font-size: 18px; }
.notify fieldset { display: grid; gap: 0; }
.notify .soon { color: var(--chalk-2); }
.notify .soon a, .notify .soon { overflow-wrap: anywhere; }
.buy { margin-bottom: 22px; }
.buy-t { font: 700 1rem/1.2 var(--type); color: var(--lamp); }
.buy-row { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-art { display: grid; justify-items: center; gap: 0; }
.cover { margin: 0; width: min(62vw, 330px); transform: rotate(-2deg); position: relative; z-index: 2; }
.cover img { border-radius: 3px; box-shadow: 0 28px 50px rgba(0, 0, 0, .6), 0 2px 0 rgba(255, 255, 255, .06); }
@media (min-width: 900px) {
  .hero-in { grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); align-items: start; gap: 48px; }
  .cover { width: min(100%, 340px); }
}
@media (max-width: 899px) {
  .hero-in { grid-template-areas: "copy"; }
  .hero-art { order: -1; }
  .hero-copy { display: contents; }
  .hero-copy > .kicker { order: -3; margin: 0; }
  .hero-copy > h1 { order: -2; margin: 0; }
}

/* ---------- the envelope (opens on tap) ---------- */
.env { width: min(100%, 420px); margin-top: 26px; position: relative; z-index: 3; display: grid; justify-items: center; gap: 14px; }
.env-box { position: relative; width: 100%; aspect-ratio: 16 / 9.4; perspective: 900px; }
.env-back { position: absolute; inset: 0; background: #c9b384; border-radius: 6px; box-shadow: 0 18px 36px rgba(0, 0, 0, .55); }
.env-face { position: absolute; inset: 0; border-radius: 6px; background: #ddc898 var(--grain); color: var(--ink); padding: 16% 6% 6% 8%;
  clip-path: polygon(0 18%, 50% 52%, 100% 18%, 100% 100%, 0 100%); z-index: 2; }
.env-face::before { content: ""; position: absolute; inset: 0; background: linear-gradient(160deg, rgba(255, 255, 255, .25), rgba(0, 0, 0, 0) 40%); pointer-events: none; }
.env-to { position: absolute; left: 9%; bottom: 13%; margin: 0; font: 700 1.15rem/1.25 var(--type); }
.env-small { font-weight: 400; font-size: .9rem; }
.rts { position: absolute; right: 6%; bottom: 10%; font: 700 .9rem/1 var(--type); text-transform: uppercase; letter-spacing: .1em; color: var(--red);
  border: 3px double var(--red); padding: 7px 9px; transform: rotate(-9deg); border-radius: 3px; background: rgba(239, 230, 210, .25); }
.postmark { position: absolute; right: 6%; top: 48%; width: 27%; color: var(--postal); opacity: .85; font-family: var(--type); font-weight: 700; transform: rotate(12deg) translateY(-50%); }
.env-flap { position: absolute; left: 0; right: 0; top: 0; height: 56%; background: #d3bc8b; border-radius: 6px 6px 0 0;
  clip-path: polygon(0 0, 100% 0, 50% 100%); transform-origin: 50% 0; transform: rotateX(0deg); z-index: 4;
  transition: transform .7s var(--ease), z-index 0s .35s; box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .1); }
.env-flap::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, .12)); }
.env-seal { position: absolute; left: 50%; top: 46%; width: 15%; transform: translate(-50%, -50%); z-index: 5; transition: opacity .25s, transform .4s var(--ease); filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .4)); }
.env-seal svg { display: block; width: 100%; height: auto; }
.env.open .env-flap { transform: rotateX(178deg); z-index: 1; }
.env.open .env-seal { opacity: 0; transform: translate(-50%, -80%) scale(.8); }
.env-btn { position: relative; z-index: 3; }
.env-letter { width: 100%; border-radius: 3px; padding: 22px 22px 18px; font: 400 1.05rem/1.55 var(--type); box-shadow: 0 16px 34px rgba(0, 0, 0, .5);
  display: none; transform-origin: 50% 0; }
.env-letter p { margin: 0 0 .7em; }
.env-letter p:last-of-type { margin-bottom: 0; }
.typed p:last-child { text-align: right; font-weight: 700; }
.env.open .env-letter { display: block; animation: letter-out .6s var(--ease) both; }
@keyframes letter-out { from { transform: translateY(-46px) scaleY(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.caret { display: inline-block; width: .55em; height: 1.05em; background: var(--ink); vertical-align: -.15em; margin-left: 1px; }
.skip-type { margin-top: 12px; min-height: 44px; padding: 6px 14px; border: 2px solid var(--ink); background: transparent; color: var(--ink); font: 700 .95rem/1 var(--type); border-radius: 4px; cursor: pointer; }
html:not(.js) .env-letter { display: block; }
html:not(.js) .env-btn, html:not(.js) .env-flap, html:not(.js) .env-seal { display: none; }

/* postmark ink spreads once when it first comes into view */
.js .postmark.ink { animation: ink 1.1s var(--ease) both; }
@keyframes ink { 0% { opacity: 0; filter: blur(6px); transform: rotate(12deg) translateY(-50%) scale(.82); } 60% { opacity: .9; filter: blur(1px); } 100% { opacity: .85; filter: blur(0); transform: rotate(12deg) translateY(-50%) scale(1); } }

/* ---------- red evidence string between sections ---------- */
.string { position: relative; z-index: 1; height: 64px; width: min(1160px, 100% - 40px); margin: 0 auto; }
.string svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.string-line { fill: none; stroke: var(--string); stroke-width: 3; stroke-linecap: round; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 0; }
.js:not(.still) .string:not(.seen) .string-line { stroke-dashoffset: 1; }
.js .string.seen .string-line { transition: stroke-dashoffset 1.6s var(--ease); }
.pin { position: absolute; top: 50%; width: 16px; height: 16px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ff9d8f, var(--red) 60%, #5c140e); box-shadow: 0 3px 4px rgba(0, 0, 0, .5); transform: translate(-50%, -50%); }
.pin-l { left: 1.2%; top: 40%; }
.pin-r { left: 98.8%; top: 30%; }

/* ---------- the free case ---------- */
.casesec .sec-head { max-width: 44em; }
.casefile { position: relative; border-radius: 4px; padding: clamp(18px, 4vw, 40px); box-shadow: 0 30px 60px rgba(0, 0, 0, .55); max-width: 1040px; }
.casefile::before { content: ""; position: absolute; left: clamp(18px, 4vw, 40px); top: -14px; width: 140px; height: 28px; background: var(--paper-2); border-radius: 6px 6px 0 0; z-index: -1; }
.cf-head { display: grid; gap: 4px; border-bottom: 2px solid var(--ink); padding-bottom: 10px; margin-bottom: 14px; }
.cf-no { font: 700 .95rem/1.3 var(--type); margin: 0; color: var(--ink-2); }
.cf-head h3 { font-size: clamp(1.8rem, 4vw, 2.4rem); margin: 0; }
.cf-brief { max-width: 46em; }
.cf-suspects { font-family: var(--type); font-size: 18px; }
.cf-play { display: grid; gap: 22px; align-items: start; }
@media (min-width: 860px) { .cf-play { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 34px; } }
.board-wrap { position: relative; width: 100%; max-width: 560px; aspect-ratio: 1; margin-inline: auto; }
.board { position: absolute; inset: 0; display: grid; grid-template-rows: repeat(var(--n), 1fr); border: 2px solid var(--ink); border-radius: 4px;
  background: #fbf6ea; touch-action: none; user-select: none; -webkit-user-select: none; }
.row { display: grid; grid-template-columns: repeat(var(--n), 1fr); }
.cell { display: grid; place-items: center; font: 700 clamp(1rem, 4.6vw, 1.5rem)/1 var(--type); color: var(--ink); cursor: pointer; position: relative; z-index: 2; border-radius: 4px; }
.cell:focus-visible { outline: 3px solid var(--postal); outline-offset: -3px; }
.cell.sel { background: rgba(240, 176, 74, .55); }
.cell.anchor { box-shadow: inset 0 0 0 3px var(--postal); }
.cell.hint { box-shadow: inset 0 0 0 3px var(--red); }
.cell.left { background: rgba(173, 42, 32, .14); color: var(--red); }
.cell.found { color: var(--ink-2); }
.marks { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.mark { position: absolute; border: 3px solid var(--red); border-radius: 999px; background: rgba(173, 42, 32, .06); }
.js:not(.still) .mark.draw { animation: draw-h .42s var(--ease) both; }
.js:not(.still) .mark.draw.v { animation-name: draw-v; }
@keyframes draw-h { from { clip-path: inset(-4px 100% -4px -4px); } to { clip-path: inset(-4px -4px -4px -4px); } }
@keyframes draw-v { from { clip-path: inset(-4px -4px 100% -4px); } to { clip-path: inset(-4px -4px -4px -4px); } }
.howplay { font-size: 18px; color: var(--ink-2); }
.wordlists { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 18px; }
.wordlists h4 { font: 700 1rem/1.2 var(--type); text-transform: uppercase; letter-spacing: .1em; margin: 0 0 6px; color: var(--ink-2); }
.words { list-style: none; margin: 0 0 12px; padding: 0; font: 700 1.02rem/1.2 var(--type); }
.words li { padding: 5px 0; overflow-wrap: anywhere; }
.words li.got span { text-decoration: line-through; text-decoration-color: var(--red); text-decoration-thickness: 3px; color: var(--ink-2); }
.words li.gone span { background: var(--ink); color: var(--paper); padding: 2px 6px; border-radius: 2px; }
.cf-count { font-weight: 600; }
.cf-tools { display: flex; flex-wrap: wrap; gap: 10px; }
.cf-tools .btn:not(.ghost-ink) { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.cf-hint { margin-top: 12px; font-size: 18px; min-height: 1.6em; }
.cf-answer { margin-top: 26px; border-top: 2px dashed var(--ink-2); padding-top: 18px; }
.cf-left-label { font: 700 1rem/1.2 var(--type); text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); margin-bottom: 8px; }
.leftover { display: flex; flex-wrap: wrap; gap: 4px 14px; font: 700 clamp(1.3rem, 4.4vw, 2rem)/1.1 var(--type); color: var(--red); margin-bottom: 16px; }
.leftover .lw { display: inline-flex; }
.leftover .lc { display: inline-block; min-width: .62em; text-align: center; }
.leftover .lc.wait { visibility: hidden; }
.flyer { position: fixed; z-index: 40; font: 700 1.3rem/1 var(--type); color: var(--red); pointer-events: none; display: grid; place-items: center; margin: 0; }
.verdict { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin: 0 0 14px; }
.verdict div { border: 2px solid var(--ink); border-radius: 4px; padding: 8px 12px; }
.verdict dt { font: 700 .95rem/1.2 var(--type); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); }
.verdict dd { margin: 4px 0 0; font-weight: 600; font-size: 1.1rem; }
.cf-answer { position: relative; }
.stamp { z-index: 6; pointer-events: none; display: none; transform: rotate(-11deg); width: max-content; margin: 4px 0 22px 8px; }
@media (min-width: 860px) { .stamp { position: absolute; right: 12px; top: 8px; margin: 0; } }
.stamp span { display: block; font: 700 clamp(1.6rem, 6vw, 2.8rem)/1 var(--type); text-transform: uppercase; letter-spacing: .08em; color: var(--red);
  border: 5px double var(--red); padding: 10px 18px; border-radius: 6px; background: rgba(239, 230, 210, .55); mix-blend-mode: multiply; }
.stamp.on { display: block; }
.js:not(.still) .stamp.on { animation: thump .5s cubic-bezier(.3, 1.4, .5, 1) both; }
@keyframes thump { 0% { opacity: 0; transform: rotate(-24deg) scale(2.6); } 70% { opacity: 1; transform: rotate(-10deg) scale(.94); } 100% { opacity: 1; transform: rotate(-11deg) scale(1); } }
.js:not(.still) .casefile.thud { animation: thud .32s ease-out .32s both; }
@keyframes thud { 0% { transform: none; } 35% { transform: translateY(4px) rotate(.25deg); } 100% { transform: none; } }
.noscript { color: var(--chalk-2); }
/* cipher: letters settle in the first time the grid comes into view (site case.js) */
.cell.spin { color: var(--ink-2); }

/* ---------- how a case works ---------- */
.steps { list-style: none; counter-reset: s; padding: 0; margin: 0 0 30px; display: grid; gap: 16px; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .how .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.steps li { counter-increment: s; border: 1px solid var(--line); background: rgba(24, 21, 18, .85); border-radius: 4px; padding: 22px 20px 20px; position: relative; }
.steps li::before { content: "Step " counter(s); display: block; font: 700 1rem/1 var(--type); color: var(--lamp); margin-bottom: 12px; }
.steps h3 { font-size: 1.35rem; }
.steps p { margin: 0; color: var(--chalk); }
.redact { font-weight: 600; }
.js .redact { color: transparent; background-image: linear-gradient(#050505, #050505); background-repeat: no-repeat; background-position: 100% 50%; background-size: 100% 100%;
  -webkit-box-decoration-break: clone; box-decoration-break: clone; padding: 0 2px; border-radius: 1px; }
.js .seen .redact { color: inherit; background-size: 0% 100%; transition: background-size .8s var(--ease) calc(.35s + var(--i, 0) * .25s), color .01s linear calc(.55s + var(--i, 0) * .25s); }
.js.still .redact { color: inherit; background-size: 0% 100%; }
.confession { border: 1px solid var(--line); border-radius: 4px; padding: 18px 20px; background: #0a0908; max-width: 720px; }
.conf-label { font: 700 1rem/1 var(--type); color: var(--lamp); text-transform: uppercase; letter-spacing: .12em; margin-bottom: 12px; }
.conf-bars { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.conf-bars span { display: block; height: 22px; width: calc(var(--w) * 1.05em); background: var(--chalk); opacity: .9; border-radius: 1px; }
.conf-note { margin: 0; color: var(--chalk-2); font-size: 18px; }
.levels { margin-top: 22px; color: var(--chalk-2); max-width: 44em; }

/* ---------- look inside ---------- */
.photos { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 16px; }
@media (min-width: 760px) { .photos { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .photos { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.photo { display: grid; gap: 10px; width: 100%; padding: 10px 10px 14px; background: #f6f0e2; border: 0; border-radius: 2px; cursor: zoom-in;
  transform: rotate(var(--t, 0deg)); box-shadow: 0 14px 28px rgba(0, 0, 0, .55); transition: transform .25s var(--ease), box-shadow .25s; color: var(--ink); text-align: left; position: relative; }
.photo::before { content: ""; position: absolute; top: -9px; left: 50%; width: 16px; height: 16px; border-radius: 50%; transform: translateX(-50%);
  background: radial-gradient(circle at 35% 35%, #ff9d8f, var(--red) 60%, #5c140e); box-shadow: 0 2px 3px rgba(0, 0, 0, .5); }
.photo:hover, .photo:focus-visible { transform: rotate(0deg) translateY(-6px); box-shadow: 0 22px 40px rgba(0, 0, 0, .6); }
.photo img { border: 1px solid #d8cdb6; }
.photo-cap { font: 700 .98rem/1.25 var(--type); }
.viewer { border: 0; padding: 0; background: transparent; max-width: min(760px, 96vw); width: 100%; max-height: 96vh; color: var(--chalk); }
.viewer::backdrop { background: rgba(5, 4, 3, .86); }
.viewer-in { background: var(--night-2); border: 1px solid var(--line); border-radius: 6px; padding: 14px; display: grid; gap: 12px; max-height: 96vh; overflow: auto; }
.viewer img { width: 100%; height: auto; max-height: 74vh; object-fit: contain; background: #fbf8f1; }
.viewer-cap { margin: 0; font: 700 1rem/1.3 var(--type); }
.viewer-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.js:not(.still) .viewer[open] .viewer-in { animation: lift .35s var(--ease) both; }
@keyframes lift { from { transform: translateY(18px) rotate(-1deg); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- request slip (bonus) ---------- */
.bonus-in { display: grid; gap: 28px; align-items: start; }
@media (min-width: 900px) { .bonus-in { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; } }
.slip { position: relative; border-radius: 3px; padding: clamp(20px, 4vw, 34px); box-shadow: 0 24px 48px rgba(0, 0, 0, .55); max-width: 560px;
  background-image: var(--grain), repeating-linear-gradient(180deg, rgba(0, 0, 0, 0) 0 37px, rgba(44, 74, 107, .16) 37px 38px); }
.slip::after { content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 9px;
  background: radial-gradient(circle at 6px -1px, transparent 6px, var(--paper) 6.5px) 0 0 / 12px 9px repeat-x; }
.slip-head { border-bottom: 2px solid var(--ink); padding-bottom: 10px; margin-bottom: 14px; padding-right: 30%; }
.slip-org { font: 700 .95rem/1.2 var(--type); text-transform: uppercase; letter-spacing: .1em; margin: 0 0 4px; color: var(--postal); }
.slip-title { font: 900 1.7rem/1.1 var(--display); margin: 0 0 4px; }
.slip-no { font: 400 .95rem/1.2 var(--type); margin: 0; color: var(--ink-2); }
.slip .postmark { top: 16px; right: 12px; width: 98px; transform: rotate(-8deg); }
.js .slip .postmark.ink { animation-name: ink2; }
@keyframes ink2 { 0% { opacity: 0; filter: blur(6px); transform: rotate(-8deg) scale(.82); } 100% { opacity: .85; filter: blur(0); transform: rotate(-8deg) scale(1); } }
.slip-lines { margin: 0 0 16px; display: grid; gap: 6px; }
.slip-lines div { display: grid; grid-template-columns: 8.5em minmax(0, 1fr); gap: 10px; align-items: baseline; border-bottom: 1px dotted var(--ink-2); padding-bottom: 4px; }
.slip-lines dt { font: 700 .95rem/1.3 var(--type); color: var(--ink-2); }
.slip-lines dd { margin: 0; font-weight: 600; }
.slip .soon { color: var(--ink); }
.slip-stamp { position: absolute; right: 22px; bottom: 74px; display: none; transform: rotate(-14deg); pointer-events: none; }
.slip-stamp span { display: block; font: 700 1.8rem/1 var(--type); text-transform: uppercase; letter-spacing: .12em; color: var(--postal); border: 4px solid var(--postal); padding: 8px 14px; border-radius: 50px; background: rgba(239, 230, 210, .6); }
.slip-stamp.on { display: block; }
.js:not(.still) .slip-stamp.on { animation: thump .5s cubic-bezier(.3, 1.4, .5, 1) both; }

/* ---------- testers ---------- */
.testers-in { display: grid; gap: 34px; align-items: start; }
@media (min-width: 900px) { .testers-in { grid-template-columns: 300px minmax(0, 1fr); gap: 56px; } }
.pass { width: min(300px, 100%); aspect-ratio: 5 / 3.3; border-radius: 10px; padding: 18px 20px; background: linear-gradient(150deg, #24303f, #16202c); color: var(--chalk);
  border: 1px solid rgba(255, 255, 255, .14); box-shadow: 0 20px 40px rgba(0, 0, 0, .5); position: relative; overflow: hidden; transform: rotate(-3deg); }
.pass::after { content: ""; position: absolute; right: -30px; bottom: -30px; width: 130px; height: 130px; border-radius: 50%; border: 10px solid rgba(240, 176, 74, .28); }
.pass p { margin: 0; }
.pass-top { font: 700 .9rem/1 var(--type); letter-spacing: .2em; text-transform: uppercase; color: var(--lamp); }
.pass-name { font: 900 1.7rem/1.1 var(--display); margin-top: 18px !important; }
.pass-sub { font: 400 1rem/1.3 var(--type); color: var(--chalk-2); }
.pass-no { font: 700 .9rem/1 var(--type); margin-top: 18px !important; color: var(--chalk-2); }
.ticks { padding-left: 1.2em; margin: 0 0 20px; }
.ticks li { margin-bottom: 6px; }
.ticks li::marker { content: "✓  "; color: var(--lamp); font-weight: 700; }
.paper .ticks li::marker { color: var(--postal); }
.tester-form { max-width: 34em; }
.tester-form .soon { color: var(--chalk-2); }

/* ---------- about + contact ---------- */
.about-in { display: grid; gap: 28px; align-items: center; }
@media (min-width: 820px) { .about-in { grid-template-columns: 350px minmax(0, 1fr); gap: 56px; } }
.about-seal { width: min(240px, 60vw); filter: drop-shadow(0 16px 26px rgba(0, 0, 0, .55)); }
.contact-in { border-radius: 4px; padding: clamp(22px, 4vw, 44px); display: grid; gap: 20px; align-items: center; box-shadow: 0 24px 48px rgba(0, 0, 0, .5); position: relative; }
.contact-in .postmark { position: static; width: 120px; transform: rotate(-10deg); }
.js .contact-in .postmark.ink { animation-name: ink3; }
@keyframes ink3 { 0% { opacity: 0; filter: blur(6px); transform: rotate(-10deg) scale(.82); } 100% { opacity: .85; filter: blur(0); transform: rotate(-10deg) scale(1); } }
@media (min-width: 760px) { .contact-in { grid-template-columns: 140px minmax(0, 1fr); } }
.contact-in h2 { color: var(--ink); }
.mail-btn { color: var(--ink) !important; overflow-wrap: anywhere; word-break: break-word; }
.contact-mail { margin-bottom: .6em; }

/* ---------- footer + phone dock ---------- */
.foot { border-top: 1px solid var(--line); padding: 36px 0 110px; position: relative; z-index: 1; background: rgba(10, 9, 8, .7); }
@media (min-width: 761px) { .foot { padding-bottom: 40px; } }
.foot-in { display: grid; gap: 12px; }
.foot-brand { display: flex; align-items: center; gap: 10px; font: 900 1.2rem/1 var(--display); margin: 0; }
.foot-brand svg { width: 34px; height: 34px; }
.foot-links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 22px; }
.foot-links a { display: inline-block; padding: 10px 0; overflow-wrap: anywhere; }
.legal { margin: 0; color: var(--chalk-2); font-size: 18px; }
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: none; gap: 10px; padding: 10px max(14px, env(safe-area-inset-left)) calc(10px + env(safe-area-inset-bottom));
  background: rgba(14, 13, 12, .96); border-top: 1px solid var(--line); }
.dock .btn { flex: 1; }
.dock .btn[hidden] { display: none; }
@media (max-width: 760px) {
  .js .dock { display: flex; transform: translateY(110%); visibility: hidden; transition: transform .3s var(--ease), visibility 0s .3s; }
  .js .dock.show { transform: none; visibility: visible; transition: transform .3s var(--ease), visibility 0s; }
}

/* ---------- inner pages ---------- */
.page-head { padding-bottom: 24px; }
.tips .wrap { display: grid; gap: 14px; }
.tip { border-radius: 4px; box-shadow: 0 12px 26px rgba(0, 0, 0, .45); }
.tip summary { cursor: pointer; padding: 18px 22px; font: 700 1.3rem/1.25 var(--display); list-style: none; display: flex; justify-content: space-between; gap: 12px; min-height: 44px; }
.tip summary::-webkit-details-marker { display: none; }
.tip summary::after { content: "+"; font: 700 1.5rem/1 var(--type); color: var(--red); }
.tip[open] summary::after { content: "–"; }
.tip ul { margin: 0; padding: 0 22px 20px 44px; }
.tip li { margin-bottom: 8px; }
.back-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.prose-in { border-radius: 4px; padding: clamp(22px, 4vw, 44px); box-shadow: 0 20px 40px rgba(0, 0, 0, .45); }
.prose-in h2 { font-size: 1.5rem; margin-top: 1.2em; }
.prose-in h2:first-child { margin-top: 0; }
.dl-box { border-radius: 4px; padding: 24px; display: grid; gap: 12px; justify-items: start; box-shadow: 0 20px 40px rgba(0, 0, 0, .45); max-width: 34em; }
.dl-box .soon { color: var(--ink); width: 100%; }
.notes-list { grid-template-columns: 1fr !important; }
.notes-list li::before { content: "Note " counter(s); }
.page-head + .band { padding-top: 0; }
.bonus-page .ticks { margin-top: 10px; }
.nf-in { display: grid; gap: 34px; align-items: center; }
@media (min-width: 820px) { .nf-in { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); } }
.nf-env { position: relative; aspect-ratio: 16 / 10; border-radius: 6px; box-shadow: 0 24px 48px rgba(0, 0, 0, .55); width: min(100%, 460px); background-color: #ddc898; }
.rts.big { font-size: clamp(1.1rem, 3.6vw, 1.5rem); right: 8%; top: 18%; bottom: auto; padding: 10px 14px; border-width: 5px; }
.js:not(.still) .rts.big { animation: thump .55s cubic-bezier(.3, 1.4, .5, 1) .4s both; }

/* =====================================================================================
   v2 MOTION. Looping parts run only inside a section marked .inview (motion.js pauses the rest).
   Nothing moves under running text: the night scene and grain sit behind solid panels or in strips.
   No flashing faster than 3 times a second.
   ===================================================================================== */

/* night scene strips (filled by assets/scene when present; a painted sky until then) */
.hero { overflow: hidden; }
.scene { position: absolute; left: 0; right: 0; pointer-events: none; overflow: hidden; z-index: 0;
  background: linear-gradient(180deg, #06080d 0%, #0d1119 55%, rgba(14, 13, 12, 0) 100%); }
.scene-hero { top: 0; height: min(78vh, 640px); }
.scene-hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 45%; background: linear-gradient(180deg, rgba(14, 13, 12, 0), var(--night)); }
.scene canvas, .scene svg.scene-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-copy { position: relative; z-index: 2; }
@media (min-width: 900px) {
  .hero-copy { background: rgba(14, 13, 12, .96); border: 1px solid var(--line); border-radius: 6px; padding: 26px 28px 22px; box-shadow: 0 24px 60px rgba(0, 0, 0, .6); }
}
@media (max-width: 899px) {
  .hero-copy > .lead, .hero-copy > .stats, .hero-copy > .notify, .hero-copy > .buy, .hero-copy > h1, .hero-copy > .kicker { position: relative; z-index: 2; }
  .hero-copy > h1, .hero-copy > .kicker { background: rgba(14, 13, 12, .9); box-shadow: 0 0 0 10px rgba(14, 13, 12, .9); border-radius: 2px; }
  .scene-hero { height: 420px; }
}
.grain { position: absolute; inset: -40px; pointer-events: none; opacity: .07; z-index: 3; will-change: transform, opacity;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E"); }
.inview > .scene .grain { animation: grain-jump .9s steps(6) infinite, projector 5.3s ease-in-out infinite; }
@keyframes grain-jump { 0% { transform: translate(0, 0); } 20% { transform: translate(-14px, 9px); } 40% { transform: translate(11px, -12px); } 60% { transform: translate(-7px, -5px); } 80% { transform: translate(15px, 6px); } 100% { transform: translate(0, 0); } }
@keyframes projector { 0%, 100% { opacity: .06; } 47% { opacity: .07; } 50% { opacity: .1; } 53% { opacity: .065; } }

/* slot-reel stats */
.reel { display: inline-flex; overflow: hidden; height: 1em; line-height: 1; vertical-align: -.05em; }
.reel-col { display: inline-block; height: 1em; overflow: hidden; }
.reel-strip { display: flex; flex-direction: column; transform: translateY(0); }
.reel-strip > span { display: block; height: 1em; line-height: 1; }
.reel.roll .reel-strip { transform: translateY(calc(var(--to) * 1em)); transition: transform 1.6s cubic-bezier(.2, .8, .25, 1.04) var(--dl); }

/* headings that type themselves, then a blinking caret (about once a second) */
h2.typing { position: relative; }
h2.typing .tw-ghost { visibility: hidden; }
h2.typing .tw { position: absolute; inset: 0; }
h2.typing .tw::after { content: ""; display: inline-block; width: .08em; height: .9em; margin-left: .06em; background: var(--lamp); vertical-align: -.08em; }
.contact h2.typing .tw::after { background: var(--red); }
h2.typed .tw::after { animation: caret 1.1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }

/* red-pencil scribble underline on links; ink-fill buttons */
main a:not(.btn):not(.photo), .foot a { text-decoration-color: transparent; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 8' preserveAspectRatio='none'%3E%3Cpath d='M1 5C20 2 34 7 52 4s38-3 66 1' fill='none' stroke='%23e05a4c' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 0 100%; background-size: 100% 6px; padding-bottom: 3px; transition: background-size .35s var(--ease); }
.paper a:not(.btn) { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 8' preserveAspectRatio='none'%3E%3Cpath d='M1 5C20 2 34 7 52 4s38-3 66 1' fill='none' stroke='%23ad2a20' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E"); }
main a:not(.btn):not(.photo):hover, .foot a:hover { animation: scribble .45s var(--ease); }
@keyframes scribble { from { background-size: 0% 6px; } to { background-size: 100% 6px; } }
.btn { position: relative; overflow: hidden; isolation: isolate; }
.btn::before { content: ""; position: absolute; inset: 0; z-index: -1; transform: scaleX(0); transform-origin: 0 50%; transition: transform .38s var(--ease);
  background: rgba(240, 176, 74, .2); border-radius: inherit; }
.btn.primary::before { background: #f7c674; }
.btn.ink::before, .cf-tools .btn:not(.ghost-ink)::before { background: #3a3128; }
.btn.ghost-ink::before { background: rgba(29, 25, 21, .12); }
.btn:hover::before, .btn:focus-visible::before { transform: scaleX(1); }
.btn:disabled::before { display: none; }

/* fingerprint scan line on the sign-up buttons */
.fp-icon { width: 22px; height: 22px; flex: none; }
.btn.scan::after { content: ""; position: absolute; left: 0; right: 0; top: -30%; height: 22%; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .6), rgba(255, 255, 255, 0)); opacity: 0; }
.btn.scan:hover::after, .btn.scan:focus-visible::after { animation: scanline 1.1s ease-in-out infinite; }
.inview .btn.scan:not(:disabled)::after { animation: scanline 2.8s ease-in-out 1.2s infinite; }
@keyframes scanline { 0% { top: -30%; opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { top: 108%; opacity: 0; } }

/* the free case: suspects on strings, lens, ink blots, evidence bag, pencil strike */
.suspects { display: flex; gap: clamp(8px, 2.4vw, 22px); margin: 2px 0 20px; flex-wrap: wrap; perspective: 700px; }
.suspect { position: relative; width: clamp(96px, 26vw, 150px); height: 112px; padding: 0; border: 0; background: none; cursor: pointer; transform-origin: 50% -26px; margin-top: 26px; font: inherit; color: var(--ink); }
.suspect::before { content: ""; position: absolute; left: 50%; top: -26px; width: 2px; height: 28px; background: #8c3a2e; }
.inview .suspect { animation: sway 3.4s ease-in-out var(--d, 0s) infinite alternate; }
@keyframes sway { from { transform: rotate(-3.5deg); } to { transform: rotate(3.5deg); } }
.s-in { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .6s var(--ease); }
.suspect:hover .s-in, .suspect[aria-pressed="true"] .s-in { transform: rotateY(180deg); }
.s-front, .s-back { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border: 2px solid var(--ink); border-radius: 4px; display: grid; place-items: center; align-content: center; gap: 4px; padding: 6px; text-align: center; background: #fbf6ea; box-shadow: 0 8px 14px rgba(0, 0, 0, .25); }
.s-back { transform: rotateY(180deg); background: var(--ink); color: var(--paper); }
.s-pic { width: 40px; height: 40px; border-radius: 50%; background: #d8ccb2; display: grid; place-items: center; font: 900 1.3rem/1 var(--display); }
.s-name { font: 700 .95rem/1.15 var(--type); }
.s-role { font: 700 1rem/1.2 var(--type); }
.s-note { font-size: .9rem; opacity: .85; }
.suspect:focus-visible { outline: 3px solid var(--postal); outline-offset: 4px; }
.lens { position: absolute; left: 0; top: 0; width: 150px; height: 150px; border-radius: 50%; overflow: hidden; pointer-events: none; z-index: 5; opacity: 0;
  border: 6px solid #2b2620; box-shadow: 0 12px 30px rgba(0, 0, 0, .45), inset 0 0 0 2px rgba(255, 255, 255, .5), inset 0 0 26px rgba(240, 176, 74, .25); background: #fbf6ea; transition: opacity .15s; }
.lens.on { opacity: 1; }
.lens::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 38%); }
.lens-inner { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.lens-board { position: absolute; inset: 0; display: grid; grid-template-rows: repeat(var(--n), 1fr); background: #fbf6ea; }
.lrow { display: grid; grid-template-columns: repeat(var(--n), 1fr); }
.lcell { display: grid; place-items: center; font: 700 clamp(1rem, 4.6vw, 1.5rem)/1 var(--type); color: var(--ink); border-radius: 4px; position: relative; z-index: 2; }
.lcell.sel { background: rgba(240, 176, 74, .55); }
.lcell.anchor { box-shadow: inset 0 0 0 3px var(--postal); }
.lcell.hint { box-shadow: inset 0 0 0 3px var(--red); }
.lcell.left { background: rgba(173, 42, 32, .14); color: var(--red); }
.lcell.found { color: var(--ink-2); }
.lmarks { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.lmark { position: absolute; border: 3px solid var(--red); border-radius: 999px; background: rgba(173, 42, 32, .06); }
.blot { position: absolute; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; pointer-events: none; z-index: 4;
  background: radial-gradient(circle, rgba(29, 25, 21, .5) 0, rgba(29, 25, 21, .32) 45%, rgba(29, 25, 21, 0) 70%); animation: blot .8s ease-out forwards; }
@keyframes blot { from { transform: scale(.4); opacity: 1; } to { transform: scale(5.5); opacity: 0; } }
.bag { width: 96px; margin: 4px 0 6px; }
.bag svg { width: 100%; height: auto; overflow: visible; }
.bag-body { fill: rgba(220, 232, 240, .55); stroke: #4d443a; stroke-width: 2.5; }
.bag-top { fill: #c23a2e; }
.bag-zip { stroke: #7a1f17; stroke-width: 2; }
.bag text { font: 700 13px/1 var(--type); fill: #c23a2e; letter-spacing: 1px; }
.bag .bag-n { font-size: 22px; fill: var(--ink); }
.bag.gulp { animation: gulp .4s cubic-bezier(.3, 1.6, .5, 1); transform-origin: 50% 100%; }
@keyframes gulp { 0% { transform: scale(1); } 40% { transform: scale(1.12, .9); } 100% { transform: scale(1); } }
.tag-fly { position: fixed; z-index: 45; pointer-events: none; font: 700 .95rem/1 var(--type); color: var(--paper); background: var(--red); padding: 5px 9px; border-radius: 3px; box-shadow: 0 6px 14px rgba(0, 0, 0, .35); }
.words li.got span { text-decoration: none; position: relative; color: var(--ink-2); }
.words li.got span::after { content: ""; position: absolute; left: -3px; right: -3px; top: 52%; height: 3px; background: var(--red); border-radius: 2px; transform-origin: 0 50%; transform: rotate(-2deg); }
.js:not(.still) .words li.got span::after { animation: strike .45s var(--ease) both; }
@keyframes strike { from { transform: rotate(-2deg) scaleX(0); } to { transform: rotate(-2deg) scaleX(1); } }
.dust { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; -webkit-mask-image: linear-gradient(90deg, transparent 0 58%, #000 78%); mask-image: linear-gradient(90deg, transparent 0 58%, #000 78%); }
.casesec > .wrap { position: relative; z-index: 1; }

/* How a case works: steps slide out of filing-cabinet drawers; the Ledger spins in; the confession bars flicker */
.drawers li { border-top: 6px solid #3a3128; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 10px 20px rgba(0, 0, 0, .35); }
.drawers li::after { content: ""; position: absolute; top: 10px; right: 16px; width: 44px; height: 10px; border-radius: 6px; border: 2px solid #8d7f6a; border-top-color: #b9aa90; }
.js:not(.still) .drawers:not(.seen) li { transform: perspective(700px) translateZ(-120px) translateY(-26px); opacity: 0; }
.js:not(.still) .drawers.seen li { transition: transform .8s cubic-bezier(.2, .9, .25, 1.15), opacity .5s ease; transition-delay: calc(var(--i) * .2s); }
.ledger { max-width: 560px; margin: 0 0 30px; padding: 18px 22px 20px; border-radius: 2px; box-shadow: 0 18px 40px rgba(0, 0, 0, .55); transform: rotate(-1.5deg); }
.lg-mast { font: 900 clamp(1.5rem, 5vw, 2.3rem)/1 var(--display); text-align: center; border-bottom: 3px double var(--ink); padding-bottom: 8px; margin-bottom: 6px; }
.lg-line { display: flex; justify-content: space-between; font: 700 .95rem/1.2 var(--type); border-bottom: 1px solid var(--ink); padding-bottom: 6px; margin-bottom: 12px; text-transform: uppercase; }
.lg-head { font: 900 clamp(1.4rem, 4.4vw, 2rem)/1.1 var(--display); margin-bottom: 8px; text-wrap: balance; }
.lg-sub { margin: 0; }
.js:not(.still) .ledger:not(.seen) { opacity: 0; transform: rotate(-1.5deg) scale(.05); }
.js:not(.still) .ledger.seen { animation: spin-in 1.5s cubic-bezier(.25, .7, .2, 1) both; }
@keyframes spin-in { 0% { transform: rotate(-1080deg) scale(.05); opacity: 0; } 15% { opacity: 1; } 82% { transform: rotate(4deg) scale(1.06); } 100% { transform: rotate(-1.5deg) scale(1); opacity: 1; } }
.inview .conf-bars span { animation: flick 4.2s steps(1) infinite; }
.conf-bars span:nth-child(2n) { animation-delay: -1.3s !important; animation-duration: 5.1s !important; }
.conf-bars span:nth-child(3n) { animation-delay: -2.6s !important; animation-duration: 3.7s !important; }
@keyframes flick { 0%, 100% { opacity: .9; } 46% { opacity: .9; } 47% { opacity: .35; } 50% { opacity: .9; } 78% { opacity: .9; } 79% { opacity: .55; } 82% { opacity: .9; } }
.how { overflow: hidden; }

/* footprints walking along the evidence string */
.steps-walk { position: absolute; left: 6%; right: 6%; bottom: -6px; height: 24px; display: flex; justify-content: space-between; pointer-events: none; }
.foot-p { width: 12px; height: 20px; border-radius: 50% 50% 45% 45%; background: rgba(205, 195, 176, .28); transform: rotate(80deg) translateX(0); opacity: 0; position: relative; }
.foot-p::after { content: ""; position: absolute; left: 2px; right: 2px; bottom: -8px; height: 7px; border-radius: 50%; background: inherit; }
.foot-p.r { transform: rotate(100deg) translateX(-8px); }
.js:not(.still) .string.seen .foot-p { animation: step-in 2.6s ease both; animation-delay: calc(var(--k) * .22s + .4s); }
@keyframes step-in { 0% { opacity: 0; } 12% { opacity: 1; } 70% { opacity: .9; } 100% { opacity: .25; } }
.still .foot-p, html:not(.js) .foot-p { opacity: .25; }

/* Look inside: Polaroids develop, sway on their pins, tilt in 3D */
.photos { perspective: 900px; }
.photo { transform-origin: 50% -6px; transform: rotate(var(--t, 0deg)) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .2s ease-out, box-shadow .25s; }
.photos.inview li:nth-child(odd) .photo:not(.tilting):not(:hover):not(:focus-visible) { animation: pin-sway 4.6s ease-in-out infinite alternate; }
.photos.inview li:nth-child(even) .photo:not(.tilting):not(:hover):not(:focus-visible) { animation: pin-sway 5.4s ease-in-out -2s infinite alternate; }
@keyframes pin-sway { from { transform: rotate(calc(var(--t, 0deg) - 1.6deg)); } to { transform: rotate(calc(var(--t, 0deg) + 1.6deg)); } }
.photo.tilting { transform: rotate(0deg) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-6px) scale(1.03); }
.js:not(.still) .photos:not(.seen) img { filter: brightness(1.9) sepia(.9) blur(3px) contrast(.6); }
.js:not(.still) .photos.seen img { transition: filter 2.6s ease-out; transition-delay: calc(var(--dv, 0) * .25s); }
.photos li:nth-child(2) { --dv: 1; } .photos li:nth-child(3) { --dv: 2; } .photos li:nth-child(4) { --dv: 3; } .photos li:nth-child(5) { --dv: 4; }

/* the request slip: a rubber stamp bobs above it, waiting */
.slip { overflow: visible; }
.rubber { position: absolute; right: 26px; top: -64px; width: 54px; height: 70px; pointer-events: none; will-change: transform; }
.rubber-knob { position: absolute; left: 50%; top: 0; width: 30px; height: 22px; margin-left: -15px; border-radius: 50% 50% 40% 40%; background: radial-gradient(circle at 35% 30%, #8a5a3a, #4a2d1a); }
.rubber-neck { position: absolute; left: 50%; top: 18px; width: 12px; height: 26px; margin-left: -6px; background: #5a3a24; }
.rubber-base { position: absolute; left: 0; right: 0; top: 42px; height: 18px; border-radius: 3px; background: linear-gradient(#6b4a30, #3f2a1a); box-shadow: 0 6px 0 -2px var(--postal); }
.inview .rubber { animation: bob 2.6s ease-in-out infinite alternate; }
@keyframes bob { from { transform: translateY(0) rotate(-6deg); } to { transform: translateY(-10px) rotate(4deg); } }
@media (max-width: 600px) { .rubber { right: 14px; top: -58px; transform: scale(.85); } }

/* testers: a swinging interrogation bulb; the pass's shadow swings the other way */
.interro { position: relative; padding-top: 96px; justify-self: center; }
.bulb { position: absolute; left: 50%; top: -20px; width: 0; height: 0; transform-origin: 0 0; z-index: 2; will-change: transform; }
.cord { position: absolute; left: -1px; top: 0; width: 2px; height: 86px; background: #6d655a; }
.shade { position: absolute; left: -30px; top: 80px; width: 60px; height: 30px; border-radius: 30px 30px 4px 4px; background: linear-gradient(#3a3631, #1d1a17); }
.glow { position: absolute; left: -12px; top: 104px; width: 24px; height: 14px; border-radius: 0 0 14px 14px; background: #ffe6a8; box-shadow: 0 0 22px 8px rgba(255, 214, 140, .55); }
.cone { position: absolute; left: -120px; top: 110px; width: 240px; height: 230px; pointer-events: none;
  background: radial-gradient(ellipse 50% 100% at 50% 0%, rgba(255, 220, 150, .2), rgba(255, 220, 150, .07) 50%, rgba(255, 220, 150, 0) 100%); }
.inview .bulb { animation: swing 3.2s ease-in-out infinite alternate; }
@keyframes swing { from { transform: rotate(9deg); } to { transform: rotate(-9deg); } }
.interro::after { content: ""; position: absolute; left: 8%; right: 8%; bottom: -30px; height: 44px; border-radius: 50%; background: radial-gradient(ellipse at 50% 50%, rgba(0, 0, 0, .7), rgba(0, 0, 0, 0) 70%); z-index: -1; will-change: transform; }
.inview.testers .interro::after, .inview .interro::after { animation: shadow-swing 3.2s ease-in-out infinite alternate; }
@keyframes shadow-swing { from { transform: translateX(-30px) scaleX(1.1); } to { transform: translateX(30px) scaleX(.9); } }
.interro { isolation: isolate; }

/* About: the seal turns and glints, the mug steams, the clock ticks */
.desk { display: grid; justify-items: center; gap: 10px; }
.seal-wrap { position: relative; perspective: 600px; width: min(240px, 60vw); }
.seal-wrap .about-seal { width: 100%; will-change: transform; }
.inview .seal-wrap .about-seal { animation: seal-turn 7s ease-in-out infinite alternate; }
@keyframes seal-turn { from { transform: rotateY(-22deg) rotate(-4deg); } to { transform: rotateY(22deg) rotate(4deg); } }
.glint { position: absolute; inset: 12%; border-radius: 50%; overflow: hidden; pointer-events: none; }
.glint::after { content: ""; position: absolute; top: -20%; bottom: -20%; width: 24%; left: 0; background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 235, 220, .55), rgba(255, 255, 255, 0)); transform: translateX(-180%) skewX(-18deg); will-change: transform; }
.inview .glint::after { animation: glint 4.8s ease-in-out 1s infinite; }
@keyframes glint { 0% { transform: translateX(-180%) skewX(-18deg); } 30%, 100% { transform: translateX(560%) skewX(-18deg); } }
.desk-props { display: flex; align-items: flex-end; gap: 22px; }
.mug { width: 84px; height: auto; }
.steam path { opacity: 0; }
.inview .steam path { animation: steam 3.4s ease-in-out infinite; }
.inview .steam path:nth-child(2) { animation-delay: 1.1s; }
.inview .steam path:nth-child(3) { animation-delay: 2.2s; }
@keyframes steam { 0% { opacity: 0; transform: translateY(10px) scaleX(1); } 30% { opacity: .7; } 100% { opacity: 0; transform: translateY(-16px) scaleX(1.4); } }
.clock { width: 84px; height: auto; }
.clock .h-hour { transform: rotate(var(--h0, 300deg)); transform-origin: 60px 60px; }
.clock .h-min { transform: rotate(var(--m0, 60deg)); transform-origin: 60px 60px; }
.clock .h-sec { transform: rotate(var(--s0, 0deg)); transform-origin: 60px 60px; }
.inview .clock .h-sec { animation: sweep 60s linear infinite; }
.inview .clock .h-min { animation: sweep-m 3600s linear infinite; }
@keyframes sweep { from { transform: rotate(var(--s0, 0deg)); } to { transform: rotate(calc(var(--s0, 0deg) + 360deg)); } }
@media (max-width: 760px) { .inview .clock .h-sec { animation-timing-function: steps(60); } .inview .steam path:nth-child(3) { animation: none; } .inview .clock .h-min { animation: none; } }
@keyframes sweep-m { from { transform: rotate(var(--m0, 0deg)); } to { transform: rotate(calc(var(--m0, 0deg) + 360deg)); } }

/* footer: the night scene strip and a RETURN TO SENDER stamp that thumps in */
.foot { position: relative; overflow: hidden; padding-top: 0; }
.scene-foot { position: relative; height: 200px; }
.scene-foot::after { content: ""; position: absolute; inset: auto 0 0 0; height: 50%; background: linear-gradient(180deg, rgba(10, 9, 8, 0), #0a0908); }
.foot-in { position: relative; z-index: 1; padding-top: 18px; }
.foot-stamp { position: absolute; right: max(20px, 4vw); top: 6px; font: 700 1rem/1 var(--type); text-transform: uppercase; letter-spacing: .1em; color: var(--red-hi);
  border: 3px double var(--red-hi); padding: 8px 10px; border-radius: 3px; transform: rotate(-8deg); opacity: .9; }
.js:not(.still) .foot-stamp:not(.seen) { opacity: 0; }
.js:not(.still) .foot-stamp.seen { animation: thump .55s cubic-bezier(.3, 1.4, .5, 1) .2s both; }
@media (max-width: 600px) { .foot-stamp { position: static; display: inline-block; margin-bottom: 8px; } }

/* phones: the bottom bar's button breathes softly */
.dock.show .pulse { animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(240, 176, 74, .45); } 50% { box-shadow: 0 0 0 8px rgba(240, 176, 74, 0); } }

/* =====================================================================================
   v3 MOTION: cursor, cover tilt, scroll string, parallax, wobble, typewriter, neon name, fan shadow, rain on panels.
   ===================================================================================== */
/* the themed cursor (computers only; html.jg-cursor is set by motion.js, never under reduced motion) */
html.jg-cursor, html.jg-cursor * { cursor: none !important; }
html.jg-cursor input, html.jg-cursor textarea, html.jg-cursor select { cursor: text !important; }
.cur { position: fixed; left: 0; top: 0; z-index: 100; pointer-events: none; }
.cur.hide, .cur.text { opacity: 0; }
.cur-dot { position: fixed; left: -4px; top: -4px; width: 8px; height: 8px; border-radius: 50%; background: var(--lamp); box-shadow: 0 0 0 2px #0e0d0c; }
.cur-ring { position: fixed; left: -19px; top: -19px; width: 38px; height: 38px; border-radius: 50%; border: 3px solid #b48a3c; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35), 0 2px 6px rgba(0, 0, 0, .5);
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .18), rgba(255, 255, 255, 0) 55%); transition: width .18s, height .18s, left .18s, top .18s, border-radius .18s, background-color .18s; }
.cur-ring::after { content: ""; position: absolute; right: -9px; bottom: -9px; width: 12px; height: 4px; background: #8a6a2e; border-radius: 2px; transform: rotate(45deg); }
.cur-label { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font: 700 11px/1 var(--type); color: var(--ink); opacity: 0; text-transform: uppercase; letter-spacing: .08em; }
.cur-cross { position: fixed; left: 0; top: 0; width: 0; height: 0; opacity: 0; }
.cur-cross::before, .cur-cross::after { content: ""; position: absolute; background: var(--red); }
.cur-cross::before { left: -11px; top: -1px; width: 22px; height: 2px; }
.cur-cross::after { left: -1px; top: -11px; width: 2px; height: 22px; }
.cur.pencil .cur-ring { opacity: 0; }
.cur.pencil .cur-dot { width: 4px; height: 4px; left: -2px; top: -2px; background: var(--ink); box-shadow: 0 0 0 1px #fbf6ea; }
.cur.pencil .cur-cross { opacity: 1; }
.cur.stamp .cur-ring { width: 30px; height: 26px; left: -15px; top: -30px; border-radius: 4px 4px 2px 2px; border-color: #6b4a30; background: linear-gradient(#8a5a3a, #4a2d1a); }
.cur.stamp .cur-ring::after { right: auto; left: 50%; bottom: -7px; width: 34px; height: 6px; margin-left: -17px; background: var(--red); transform: none; }
.cur.stamp.down .cur-ring { transform-origin: 50% 100%; scale: .86; }
.cur.open .cur-ring { width: 64px; height: 64px; left: -32px; top: -32px; background: rgba(240, 176, 74, .9); border-color: #8a6a2e; }
.cur.open .cur-label { opacity: 1; }
.cur-trail { position: fixed; inset: 0; z-index: 99; pointer-events: none; }
.splat { position: fixed; z-index: 98; width: 26px; height: 26px; margin: -13px 0 0 -13px; pointer-events: none; border-radius: 46% 54% 50% 50%;
  background: radial-gradient(circle at 50% 50%, rgba(173, 42, 32, .85) 0 38%, rgba(173, 42, 32, 0) 41%), radial-gradient(circle at 18% 30%, rgba(173, 42, 32, .7) 0 14%, rgba(173, 42, 32, 0) 16%), radial-gradient(circle at 80% 72%, rgba(173, 42, 32, .7) 0 12%, rgba(173, 42, 32, 0) 14%);
  animation: splat .8s ease-out forwards; }
@keyframes splat { 0% { transform: scale(.4); opacity: 1; } 25% { transform: scale(1.1); opacity: .95; } 100% { transform: scale(1.25); opacity: 0; } }

/* the hero cover tilts toward the pointer; a sheen sweeps across it */
.hero-art { perspective: 1100px; }
.cover { transform: rotate(-2deg) rotateX(var(--crx, 0deg)) rotateY(var(--cry, 0deg)); transition: transform .35s cubic-bezier(.2, .7, .2, 1); transform-style: preserve-3d; }
.cover.tilt { transition: transform .08s linear; }
.cover::after { content: ""; position: absolute; inset: 0; border-radius: 3px; pointer-events: none; mix-blend-mode: screen;
  background: linear-gradient(105deg, rgba(255, 255, 255, 0) 30%, rgba(255, 244, 220, .32) 48%, rgba(255, 255, 255, 0) 64%) no-repeat; background-size: 260% 100%; background-position: var(--sx, 120%) 0; opacity: .0; transition: opacity .3s; }
.cover.tilt::after { opacity: 1; }
.inview .cover:not(.tilt)::after { animation: sheen 7s ease-in-out 2s infinite; }
@keyframes sheen { 0%, 70% { background-position: 130% 0; opacity: 0; } 72% { opacity: 1; } 92% { background-position: -30% 0; opacity: 1; } 100% { background-position: -30% 0; opacity: 0; } }

/* red-string scroll progress along the top */
.progress { position: fixed; left: 0; right: 0; top: 0; height: 4px; z-index: 60; pointer-events: none; }
.progress-line { position: absolute; left: 0; top: 1px; width: 100%; height: 2px; background: var(--string); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); box-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.progress-pin { position: absolute; top: -3px; left: 0; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ff9d8f, var(--red) 60%, #5c140e);
  transform: translateX(calc(var(--p, 0) * (100vw - 10px))); }

/* parallax shapes at the edges of sections (never behind running text on purpose: they sit in the margins) */
.band { overflow-x: clip; }
.par { position: absolute; z-index: 0; pointer-events: none; will-change: transform; opacity: .07; }
.par-print { right: -70px; top: 8%; width: 260px; height: 320px; border-radius: 50% 50% 46% 46%;
  background: repeating-radial-gradient(ellipse at 50% 60%, transparent 0 9px, #f1eadc 9px 12px); }
.par-print.r { right: auto; left: -90px; top: 20%; }
.par-mark { left: -60px; top: 12%; width: 240px; height: 240px; border-radius: 50%; border: 10px double #f1eadc; }
.par-q { right: -10px; top: 0; font: 900 360px/1 var(--display); color: #f1eadc; opacity: .05; }
@media (max-width: 760px) { .par { display: none; } }

/* wobble on the pins when the pointer passes */
.photo.wob, .suspect.wob { animation: wob .9s ease-out !important; }
@keyframes wob { 0% { rotate: 0deg; } 20% { rotate: 4deg; } 40% { rotate: -3deg; } 60% { rotate: 2deg; } 80% { rotate: -1deg; } 100% { rotate: 0deg; } }

/* the typewriter on Jonah's desk: the carriage slides as it types, then returns */
.typewriter { position: relative; width: 112px; height: 80px; }
.tw-body { position: absolute; left: 6px; right: 6px; bottom: 0; height: 44px; border-radius: 10px 10px 6px 6px; background: linear-gradient(#2c2a27, #151311); box-shadow: 0 8px 14px rgba(0, 0, 0, .45); }
.tw-keys { position: absolute; left: 12px; right: 12px; bottom: 9px; height: 12px; background: radial-gradient(circle, #d8ccb2 0 2.5px, transparent 3px) 0 0 / 9px 6px; opacity: .8; }
.tw-carriage { position: absolute; left: 0; right: 0; top: 4px; height: 36px; }
.tw-roller { position: absolute; left: 0; right: 0; top: 22px; height: 12px; border-radius: 6px; background: linear-gradient(#4a4540, #1d1a17); }
.tw-paper { position: absolute; left: 22px; right: 22px; top: -14px; height: 40px; background: #efe6d2; border-radius: 1px; box-shadow: inset 0 -10px 0 rgba(0, 0, 0, .05);
  background-image: repeating-linear-gradient(180deg, transparent 0 6px, rgba(29, 25, 21, .5) 6px 7px); background-size: 60% 100%; background-repeat: no-repeat; }
.tw-lever { position: absolute; left: -10px; top: 20px; width: 16px; height: 4px; background: #b9aa90; border-radius: 2px; transform: rotate(-24deg); }
.inview .tw-carriage { animation: carriage 9s infinite; }
@keyframes carriage { 0% { transform: translateX(0); animation-timing-function: steps(10); } 64% { transform: translateX(-30px); animation-timing-function: steps(1); }
  70% { transform: translateX(-30px); animation-timing-function: cubic-bezier(.3, 1.4, .5, 1); } 76%, 100% { transform: translateX(0); } }

/* the name in the top bar flickers like a neon sign now and then (a few dips, slower than 3 a second) */
.brand span { text-shadow: 0 0 10px rgba(240, 176, 74, .35); }
.brand span { animation: neon 11s steps(1) infinite; }
@keyframes neon { 0%, 61%, 66%, 69%, 100% { opacity: 1; text-shadow: 0 0 10px rgba(240, 176, 74, .45), 0 0 2px rgba(240, 176, 74, .6); } 62% { opacity: .55; text-shadow: none; } 67% { opacity: .7; text-shadow: none; } }

/* a ceiling fan's shadow turns slowly over the free case desk (on the right, away from the words) */
.casesec { overflow-x: clip; }
.fan { position: absolute; right: -180px; top: -120px; width: 620px; height: 620px; z-index: 0; pointer-events: none; opacity: .28; will-change: transform; }
.fan span { position: absolute; left: 50%; top: 50%; width: 300px; height: 70px; margin: -35px 0 0 0; border-radius: 0 60% 60% 0 / 0 50% 50% 0; background: radial-gradient(ellipse at 30% 50%, rgba(0, 0, 0, .9), rgba(0, 0, 0, .25)); transform-origin: 0 50%; filter: blur(6px); }
.fan span:nth-child(2) { transform: rotate(90deg); } .fan span:nth-child(3) { transform: rotate(180deg); } .fan span:nth-child(4) { transform: rotate(270deg); }
.casesec.inview .fan { animation: fan 26s linear infinite; }
@keyframes fan { to { transform: rotate(360deg); } }
@media (max-width: 760px) { .fan { right: -320px; top: -200px; opacity: .18; } }

/* rain running down a few panels' right edges */
.drip { position: absolute; right: calc(var(--x) - 4px); top: 0; width: 3px; height: 26px; border-radius: 3px; pointer-events: none; z-index: 7; opacity: 0;
  background: linear-gradient(180deg, rgba(200, 220, 235, 0), rgba(220, 235, 245, .75)); }
.inview .drip { animation: drip var(--du) cubic-bezier(.5, 0, .9, .6) var(--dl) infinite; }
@keyframes drip { 0% { transform: translateY(0); opacity: 0; } 10% { opacity: .9; } 85% { opacity: .7; } 100% { transform: translateY(var(--h, 520px)); opacity: 0; } }
.casefile .drip { --h: 900px; } .slip .drip { --h: 560px; } .contact-in .drip { --h: 260px; }

/* the hero envelope nudges now and then, asking to be opened */
.inview .env:not(.open) .env-box { animation: nudge 6s ease-in-out 3s infinite; transform-origin: 50% 100%; }
@keyframes nudge { 0%, 88%, 100% { transform: none; } 91% { transform: rotate(-2.2deg) translateY(-3px); } 94% { transform: rotate(1.8deg); } 97% { transform: rotate(-.8deg); } }

/* pushpins glint */
.photos.inview .photo::before { animation: pin-glint 5s ease-in-out infinite; }
@keyframes pin-glint { 0%, 80%, 100% { box-shadow: 0 2px 3px rgba(0, 0, 0, .5); } 88% { box-shadow: 0 2px 3px rgba(0, 0, 0, .5), 0 0 0 3px rgba(255, 235, 220, .45); } }

/* ---------- the still version: every motion off when the device asks for reduced motion ---------- */
/* =====================================================================
   v4: Jonah's portrait (Austin's painting) in About. A dark wooden frame, a brass plate and the JG seal pressed on its corner.
   Motion (only over the painting, never over his face or any words; paused off screen; none for reduced motion):
   it develops out of the dark when it comes into view, as if the desk lamp switches on; the lamp glow flickers
   gently (lamp at 85% 52%); the lighthouse beam sweeps slowly and rain shimmers, both clipped to the window
   (x 70-100%, y 0-42%, clear of his hair); on a computer the frame tilts toward the pointer (motion.js 4f).
   ===================================================================== */
.desk .portrait { position: relative; margin: 0 0 6px; width: min(350px, 86vw); perspective: 900px; }
.pf-frame { position: relative; padding: 16px 16px 46px; border-radius: 3px;
  background-color: #2b1b0f;
  background-image: repeating-linear-gradient(90deg, rgba(255, 226, 180, .035) 0 1px, rgba(0, 0, 0, 0) 1px 4px, rgba(0, 0, 0, .07) 4px 6px, rgba(0, 0, 0, 0) 6px 11px),
    linear-gradient(135deg, #46301c 0%, #2a1b0f 34%, #3d2816 58%, #1d1209 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 220, 170, .12), inset 0 2px 0 rgba(255, 222, 170, .14), inset 0 -4px 8px rgba(0, 0, 0, .55),
    0 26px 44px rgba(0, 0, 0, .62), 0 4px 10px rgba(0, 0, 0, .5);
  transform: rotateX(var(--prx, 0deg)) rotateY(var(--pry, 0deg)); transition: transform .6s var(--ease); transform-style: preserve-3d; }
.pf-frame.tilt { transition: transform .12s linear; }
.pf-canvas { position: relative; overflow: hidden; background: #0b0907;
  box-shadow: 0 0 0 3px #8c6b33, 0 0 0 4px #24160b, 0 0 0 5px rgba(255, 222, 160, .18); }
.pf-canvas::after { content: ""; position: absolute; inset: 0; z-index: 4; pointer-events: none; box-shadow: inset 0 0 24px rgba(0, 0, 0, .6); }
.pf-img { display: block; width: 100%; height: auto; }
.pf-plate { position: absolute; left: 50%; bottom: 11px; transform: translateX(-50%); margin: 0; padding: 4px 13px 3px; white-space: nowrap; text-align: center;
  font: 600 13px/1.35 var(--serif); letter-spacing: .01em; color: #1f1405; background-color: #c49a48;
  background-image: linear-gradient(180deg, #e6c97c, #c49a48 55%, #b58b3a); border-radius: 2px;
  box-shadow: inset 0 1px 0 rgba(255, 246, 214, .65), inset 0 -1px 0 rgba(70, 46, 12, .55), 0 1px 3px rgba(0, 0, 0, .65); }
.pf-plate::before, .pf-plate::after { content: ""; position: absolute; top: 50%; width: 4px; height: 4px; margin-top: -2px; border-radius: 50%; background: #7a5a22; box-shadow: inset 0 1px 0 rgba(255, 240, 200, .5); }
.pf-plate::before { left: 5px; } .pf-plate::after { right: 5px; }
@media (min-width: 820px) { .pf-plate { font-size: 14px; } }
/* very narrow phones (under 350 px): the role drops to a second line instead of running off the plate */
@media (max-width: 349px) { .pf-frame { padding-bottom: 64px; } .pf-plate { white-space: normal; } .pf-dot { display: none; } .pf-role { display: block; } }
/* the JG seal, pressed on the frame's top-left corner; it still turns and glints */
.pf-frame .pf-seal { position: absolute; top: -26px; left: -24px; width: 96px; z-index: 6; }
.pf-seal .about-seal { width: 100%; filter: drop-shadow(0 5px 6px rgba(0, 0, 0, .65)); }
@media (max-width: 480px) { .pf-frame .pf-seal { width: 78px; top: -20px; left: -14px; } }
/* the lamp glow (gentle flicker: soft dips, a few seconds apart) */
.pf-glow { position: absolute; left: 85%; top: 52%; width: 46%; aspect-ratio: 1; z-index: 1; transform: translate(-50%, -50%); pointer-events: none; opacity: 0; }
.pf-glow::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle, rgba(255, 204, 120, .42) 0, rgba(255, 178, 84, .16) 34%, rgba(255, 160, 60, 0) 66%); }
.portrait.lit .pf-glow { opacity: 1; transition: opacity .9s ease-out .1s; }
.about.inview .portrait.lit .pf-glow::before { animation: pf-flicker 6.4s ease-in-out 1.2s infinite; }
@keyframes pf-flicker { 0%, 100% { opacity: 1; transform: scale(1); } 17% { opacity: .84; } 22% { opacity: .96; } 44% { opacity: .9; transform: scale(1.04); } 51% { opacity: 1; }
  69% { opacity: .82; } 74% { opacity: .95; } 87% { opacity: .9; transform: scale(.98); } }
/* the window: rain shimmer and the lighthouse beam, clipped to the glass */
.pf-win { position: absolute; left: 70%; top: 0; width: 30%; height: 42%; z-index: 2; overflow: hidden; pointer-events: none; opacity: 0; }
.portrait.lit .pf-win { opacity: 1; transition: opacity 1.4s ease-out 1.6s; }
.pf-rain, .pf-rain::before { position: absolute; left: 0; right: 0; top: -90px; height: calc(100% + 90px); opacity: .3;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='90'%3E%3Cg stroke='%23e4ecff' stroke-linecap='round'%3E%3Cpath d='M8 4l-1.4 13' opacity='.7'/%3E%3Cpath d='M27 30l-1.6 16' opacity='.5'/%3E%3Cpath d='M45 9l-1 10' opacity='.6'/%3E%3Cpath d='M53 51l-1.5 15' opacity='.6'/%3E%3Cpath d='M16 58l-1 11' opacity='.45'/%3E%3Cpath d='M37 71l-1.4 13' opacity='.55'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 60px 90px repeat; }
.pf-rain::before { content: ""; top: -70px; height: calc(100% + 160px); opacity: .7; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='46' height='70'%3E%3Cg stroke='%23cfdcff' stroke-width='.8' stroke-linecap='round'%3E%3Cpath d='M5 12l-1 9' opacity='.6'/%3E%3Cpath d='M22 40l-1 10' opacity='.5'/%3E%3Cpath d='M38 3l-.8 8' opacity='.55'/%3E%3Cpath d='M31 57l-1 9' opacity='.45'/%3E%3C/g%3E%3C/svg%3E") 13px 0 / 46px 70px repeat; }
.about.inview .pf-rain { animation: pf-rain .9s linear infinite; }
.about.inview .pf-rain::before { animation: pf-rain2 1.25s linear infinite; }
@keyframes pf-rain { to { transform: translateY(90px); } }
@keyframes pf-rain2 { to { transform: translateY(70px); } }
/* the lighthouse sits at (91%, 21%) of the painting: 70% across and halfway down the window box */
.pf-beam { position: absolute; left: 70%; top: 36%; width: 115%; height: 28%; transform-origin: 0 50%; transform: rotate(186deg);
  clip-path: polygon(0 45%, 100% 0, 100% 100%, 0 55%); background: linear-gradient(90deg, rgba(255, 245, 214, .62), rgba(255, 240, 200, .2) 45%, rgba(255, 240, 200, 0)); opacity: .55; }
.about.inview .pf-beam { animation: pf-sweep 10s linear infinite; }
@keyframes pf-sweep { 0% { transform: rotate(146deg) scaleX(.55); opacity: 0; } 22% { opacity: .5; } 50% { transform: rotate(186deg) scaleX(1); opacity: .9; }
  78% { opacity: .5; } 100% { transform: rotate(226deg) scaleX(.55); opacity: 0; } }
.pf-lantern { position: absolute; left: 70%; top: 50%; width: 18%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 246, 220, .8), rgba(255, 236, 190, 0) 68%); opacity: .55; }
.about.inview .pf-lantern { animation: pf-lantern 10s linear infinite; }
@keyframes pf-lantern { 0%, 100% { opacity: .35; } 50% { opacity: .95; } }
/* the develop (opacity only, so it stays smooth on phones): the room is dark; the lamp clicks on (the dark lifts
   around it first), then the rest of the painting comes up out of the dark */
.pf-dark { position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0;
  background: radial-gradient(circle at 85% 52%, rgba(6, 5, 4, .35) 0, rgba(6, 5, 4, .9) 26%, rgba(6, 5, 4, .97) 46%); }
.pf-dark::before { content: ""; position: absolute; inset: 0; background: rgb(6, 5, 4); opacity: 1; }
.js:not(.still) .portrait:not(.lit) .pf-dark { opacity: 1; }
.js:not(.still) .portrait.lit .pf-dark { transition: opacity 2.6s cubic-bezier(.45, .1, .3, 1) .9s; }
.portrait.lit .pf-dark::before { opacity: 0; transition: opacity .45s ease-out .15s; }
html.still .pf-glow, html.still .pf-win, html.still .pf-dark, html:not(.js) .pf-glow, html:not(.js) .pf-win, html:not(.js) .pf-dark { display: none !important; }
html.still .pf-frame { transform: none; }

html.still *, html.still *::before, html.still *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
html.still .btn:hover, html.still .photo:hover { transform: none; }
html.still .lens, html.still .blot, html.still .tag-fly, html.still .dust, html.still .cur, html.still .cur-trail, html.still .splat, html.still .drip { display: none !important; }
html.still .brand span { animation: none; }
html.still h2 .tw::after { display: none; }
html.still .photo:hover, html.still .photo:focus-visible { transform: rotate(var(--t, 0deg)); }
@media (prefers-reduced-motion: reduce) { html:not(.js) *, html:not(.js) *::before, html:not(.js) *::after { animation: none !important; transition: none !important; } }
@media (forced-colors: active) { .mark { border-color: Highlight; } .cell.sel { background: Highlight; color: HighlightText; } }
