/* =========================================================
   A — Archival Workbench
   bone paper, graphite, restrained red; things you can pick up
   ========================================================= */
[data-theme='workbench'] {
  --bg: #e9dfcb; --bg-2: #ddd0b4; --paper: #f7f0e2; --paper-2: #efe4cf;
  --ink: #1f1b16; --ink-2: #4f463c; --ink-3: #6b6154;
  --accent: #a3271f; --accent-ink: #fff8ee; --accent-text: #962219;
  --line: rgba(31, 27, 22, .18); --line-strong: rgba(31, 27, 22, .5);
  --focus: #0b5cad;
  --font-display: 'Fraunces', 'Source Serif 4', Georgia, serif;
  --font-body: 'Source Serif 4', Georgia, serif;
  --font-label: 'Courier Prime', ui-monospace, monospace;
  --font-hand: 'Courier Prime', 'Courier Prime', monospace;
  --radius: 2px;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .32 0 0 0 0 .24 0 0 0 0 .12 0 0 0 .11 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
}
[data-theme='workbench'] body { background-color: var(--bg); background-image: var(--grain); }
[data-theme='workbench'] .brand__name { font-family: 'Source Serif 4', serif; font-size: .95rem; letter-spacing: .04em; }
[data-theme='workbench'] .btn { font-family: var(--font-label); }

/* ---------------- landing: the desk ---------------- */
.wb-desk {
  position: relative; overflow: hidden;
  min-height: min(880px, calc(100vh - 68px));
  background:
    radial-gradient(120% 90% at 30% 20%, rgba(255, 236, 200, .35), transparent 60%),
    radial-gradient(90% 70% at 85% 90%, rgba(40, 20, 4, .35), transparent 70%),
    repeating-linear-gradient(91deg, rgba(60, 34, 12, .07) 0 2px, transparent 2px 9px),
    linear-gradient(180deg, #8a6a47, #6f5237);
  border-bottom: 1px solid rgba(0, 0, 0, .3);
  isolation: isolate;
}
.wb-desk::before { content: ''; position: absolute; inset: 0; background-image: var(--grain); opacity: .9; mix-blend-mode: multiply; pointer-events: none; z-index: -1; }
.wb-desk__props { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.wb-desk__props > * { pointer-events: auto; }
.wb-desk__hint { position: absolute; right: var(--gutter); bottom: 18px; z-index: 30; font-family: var(--font-hand); font-size: .9rem; color: #f3e6cc; background: rgba(31, 20, 10, .55); padding: .35em .7em; }

.wb-item {
  position: absolute; left: var(--x); top: var(--y); width: var(--w);
  transform: rotate(var(--r, 0deg)) translateZ(0);
  transition: transform .45s var(--ease-out), box-shadow .3s, filter .3s;
  z-index: var(--z, 1);
  touch-action: none; user-select: none; -webkit-user-select: none;
}
.wb-item.is-dragging { transition: none; transform: rotate(calc(var(--r, 0deg) * .5)) scale(1.03); filter: drop-shadow(0 28px 26px rgba(20, 10, 0, .45)); cursor: grabbing; }
.wb-photo { background: #f8f2e6; padding: 10px 10px 34px; box-shadow: var(--shadow); cursor: grab; border: 0; display: block; text-align: left; color: var(--ink); }
.wb-photo:hover { box-shadow: var(--shadow-lift); }
.wb-photo img { width: 100%; height: auto; pointer-events: none; filter: contrast(1.04) saturate(.7) sepia(.12); }
.wb-photo__label { position: absolute; left: 12px; right: 12px; bottom: 8px; font-family: var(--font-hand); font-size: .82rem; color: #3b3027; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wb-tape { position: absolute; width: 86px; height: 26px; background: rgba(238, 226, 190, .72); top: -12px; left: calc(50% - 43px); transform: rotate(-4deg); box-shadow: 0 1px 2px rgba(0,0,0,.15); mix-blend-mode: multiply; }
.wb-tape--corner { left: -20px; top: 8px; transform: rotate(-38deg); width: 70px; }

.wb-note {
  position: absolute; left: var(--x); top: var(--y); width: var(--w); z-index: 20;
  background: var(--paper); background-image: var(--grain), repeating-linear-gradient(180deg, transparent 0 31px, rgba(80, 110, 160, .16) 31px 32px);
  padding: clamp(1.4rem, 3vw, 2.4rem) clamp(1.4rem, 3vw, 2.6rem) clamp(1.6rem, 3vw, 2.4rem) clamp(2rem, 4vw, 3.4rem);
  box-shadow: var(--shadow-lift); transform: rotate(-1.6deg);
}
.wb-note::before { content: ''; position: absolute; left: clamp(1.3rem, 2.6vw, 2.3rem); top: 0; bottom: 0; width: 1.5px; background: rgba(163, 39, 31, .4); }
.wb-note h1 { font-family: var(--font-display); font-size: clamp(2.1rem, 4.6vw, 3.9rem); line-height: 1.02; letter-spacing: -.01em; }
.wb-note .deck { font-family: var(--font-hand); font-size: 1.02rem; margin: 1rem 0 .4rem; color: var(--ink-2); }
.wb-note p.lede { font-size: 1.05rem; margin-bottom: 1.4rem; }
.wb-note__actions { display: flex; flex-wrap: wrap; gap: .7rem; }

.wb-strip { position: absolute; left: var(--x); top: var(--y); width: var(--w); z-index: 2; transform: rotate(var(--r)); pointer-events: none; }
.wb-loupe-tool { position: absolute; z-index: 25; right: 6%; bottom: 8%; width: 120px; transform: rotate(-24deg); pointer-events: none; filter: drop-shadow(0 14px 12px rgba(0,0,0,.4)); }
.wb-pencil { position: absolute; z-index: 3; left: 3%; bottom: 7%; width: 280px; transform: rotate(-12deg); pointer-events: none; filter: drop-shadow(0 6px 5px rgba(0,0,0,.35)); }

/* the loupe that follows the pointer over photographs */
.loupe {
  position: fixed; z-index: 120; width: 190px; height: 190px; border-radius: 50%; pointer-events: none;
  border: 9px solid #2b2119; box-shadow: 0 0 0 2px #c9a46a inset, 0 20px 40px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255,255,255,.2);
  background-repeat: no-repeat; opacity: 0; transform: translate(-50%, -50%) scale(.6); transition: opacity .2s, transform .25s var(--ease-out);
}
.loupe.is-on { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.loupe::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 30% 25%, rgba(255,255,255,.35), transparent 35%); }

/* sections below the desk */
.wb-section { padding: clamp(3rem, 7vw, 6rem) 0 0; }
.wb-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.wb-head h2 { font-family: var(--font-display); font-size: clamp(2rem, 4vw, 3rem); line-height: 1; }
.wb-head p { color: var(--ink-2); max-width: 52ch; }

.wb-drawer { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; perspective: 1200px; }
.wb-card {
  position: relative; background: var(--paper); text-decoration: none; display: flex; flex-direction: column;
  padding: 12px 12px 16px; box-shadow: var(--shadow); border-top: 3px solid transparent;
  transform-origin: 50% 100%; transition: transform .45s var(--ease-out), box-shadow .3s;
  --tilt: 0deg;
}
.wb-card::before { content: attr(data-n); position: absolute; top: -26px; left: 14px; height: 26px; padding: 4px 12px 0; background: var(--paper-2); font-family: var(--font-label); font-size: .78rem; color: var(--accent-text); font-weight: 600; box-shadow: 0 -2px 6px -2px rgba(0,0,0,.15); border-radius: 4px 4px 0 0; }
.wb-card:hover, .wb-card:focus-visible { transform: translateY(-18px) rotate(var(--tilt)); box-shadow: var(--shadow-lift); }
.wb-card__img { aspect-ratio: 1; overflow: hidden; background: #222; margin-bottom: 12px; position: relative; }
.wb-card__img img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.4) sepia(.2) contrast(1.05); transition: transform .8s var(--ease-out); }
.wb-card:hover .wb-card__img img { transform: scale(1.07); }
.wb-card h3 { font-family: var(--font-display); font-size: 1.45rem; line-height: 1; }
.wb-card p { font-size: .92rem; color: var(--ink-2); line-height: 1.4; margin-top: .4rem; flex: 1; }
.wb-card__go { margin-top: .8rem; font-family: var(--font-label); font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text); }
@media (max-width: 1000px) { .wb-drawer { grid-template-columns: repeat(3, 1fr); row-gap: 42px; } }
@media (max-width: 560px) { .wb-drawer { grid-template-columns: repeat(2, 1fr); } }

.wb-feature { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(1.5rem, 4vw, 4rem); align-items: center; }
.wb-feature h2 { font-family: var(--font-display); font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.02; margin: .4rem 0 1rem; }
.wb-feature .actions { display: flex; gap: .7rem; flex-wrap: wrap; margin-top: 1.4rem; }
.contact { background: #17130f; padding: 18px 26px; position: relative; box-shadow: var(--shadow-lift); transform: rotate(.8deg); }
.contact::before, .contact::after { content: ''; position: absolute; left: 6px; right: 6px; height: 12px; background: repeating-linear-gradient(90deg, transparent 0 8px, #e9dfcb 8px 18px, transparent 18px 26px); opacity: .9; }
.contact::before { top: 3px; } .contact::after { bottom: 3px; }
.contact img { width: 100%; filter: sepia(.25) contrast(1.05); }
.contact__meta { display: flex; justify-content: space-between; font-family: var(--font-label); font-size: .7rem; color: #e8c78f; letter-spacing: .1em; margin-top: 8px; }
@media (max-width: 860px) { .wb-feature { grid-template-columns: 1fr; } }

.wb-materials { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.wb-mat { position: relative; background: var(--paper); padding: 1rem .9rem 1.1rem; border: 1px dashed var(--line-strong); min-height: 150px; transition: background .3s, transform .3s var(--ease-out); }
.wb-mat:hover { background: #fffaf0; transform: translateY(-3px); }
.wb-mat svg { width: 46px; height: 46px; color: var(--accent); margin-bottom: .6rem; }
.wb-mat h3 { font-family: var(--font-display); font-size: 1.15rem; }
.wb-mat p { font-family: var(--font-hand); font-size: .84rem; color: var(--ink-2); line-height: 1.4; margin-top: .3rem; }
@media (max-width: 1000px) { .wb-materials { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .wb-materials { grid-template-columns: 1fr 1fr; } }

.wb-method { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: m; }
.wb-method li { counter-increment: m; background: #fffaf0; padding: 1.2rem 1.1rem; box-shadow: var(--shadow); transform: rotate(var(--r, 0deg)); font-family: var(--font-hand); font-size: 1.05rem; line-height: 1.35; position: relative; }
.wb-method li::before { content: counter(m, decimal-leading-zero); display: block; font-family: var(--font-display); font-size: 2.4rem; color: var(--accent-text); line-height: 1; margin-bottom: .4rem; }
.wb-method li::after { content: ''; position: absolute; top: -9px; left: 50%; width: 16px; height: 16px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #e46a5f, #8d1d16); box-shadow: 0 3px 4px rgba(0,0,0,.35); }
@media (max-width: 760px) { .wb-method { grid-template-columns: 1fr 1fr; } }

.wb-slip { margin: clamp(3rem, 7vw, 6rem) auto 0; max-width: 980px; background: var(--paper); padding: clamp(1.8rem, 4vw, 3.2rem); box-shadow: var(--shadow-lift); position: relative; transform: rotate(-.6deg);
  clip-path: polygon(0 3%, 4% 0, 12% 2%, 22% 0, 35% 1.5%, 48% 0, 60% 2%, 74% 0, 86% 1.5%, 100% 0, 99% 50%, 100% 100%, 88% 98%, 74% 100%, 60% 98%, 46% 100%, 30% 98%, 16% 100%, 4% 98%, 0 100%, 1% 50%); }
.wb-slip blockquote { margin: 0; font-family: var(--font-display); font-size: clamp(1.6rem, 3.2vw, 2.6rem); line-height: 1.15; }
.wb-slip blockquote strong { color: var(--accent-text); font-weight: 400; }
.wb-slip cite { display: block; margin-top: 1rem; font-family: var(--font-label); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 400; color: var(--ink-2); }

@media (max-width: 860px) {
  .wb-desk { min-height: 0; padding: 1.5rem 0 2rem; display: grid; gap: 1rem; }
  .wb-note { position: relative; left: auto; top: auto; width: auto; margin: 0 var(--gutter); transform: none; }
  .wb-desk__props { position: relative; height: 340px; margin: 0 var(--gutter); }
  .wb-desk__hint { position: static; margin: 0 var(--gutter); justify-self: start; }
  .wb-pencil, .wb-loupe-tool { display: none; }
}

/* Fraunces (soft) headlines + Source Serif body + Courier Prime typewriter labels */
[data-theme='workbench'] :is(h1, h2, h3, .display, .xp-head__title, .xp-head__n, .reflect__q, .cx-inspect__name, .cn-inspect__name, .fk-q, .fk-rev__kind, .xp-next__title, .cp-q, .cp-verbs, .nb-item__head h2, .nb-n, .tf-quote, .colophon__thesis, .brand__name, .xp-head__q p) { font-weight: 600; letter-spacing: -.012em; }
[data-theme='workbench'] .xp-head__n, [data-theme='workbench'] .nb-n { font-weight: 300; }
[data-theme='workbench'] .wb-note h1 { font-weight: 600; letter-spacing: -.02em; line-height: 1.04; }
[data-theme='workbench'] .brand__name { text-transform: none; font-size: 1.08rem; letter-spacing: -.005em; }
[data-theme='workbench'] .eyebrow, [data-theme='workbench'] .btn, [data-theme='workbench'] .primary__exps a, [data-theme='workbench'] .primary__util > a { font-weight: 700; }
[data-theme='workbench'] .wb-photo__label, [data-theme='workbench'] .wb-method li, [data-theme='workbench'] .wb-mat p { font-weight: 400; }
[data-theme='workbench'] body { font-size: 1.08rem; }
