/* Forma — October pattern book
   Editorial Fashion recipe; texture = dressmaker's pattern tissue (cut lines, notches). */

:root {
  --bg: #F2EFE9;
  --surface: #FAF8F4;
  --ink: #1A1817;
  --muted: #5C5550;
  --accent: #6B2F26;
  --accent-deep: #521F18;
  --accent-ink: #F8F3EC;
  --rule: #CDC5BA;
  --tissue: #A9806A;
  --night: #1C1917;
  --night-raise: #2A2522;
  --night-ink: #EDE6DC;
  --night-muted: #B9AFA4;

  --display: "Bodoni 72", "Didot", "Bodoni Moda", "Bodoni MT", "Playfair Display", "Times New Roman", serif;
  --sans: "Avenir Next", "Avenir", "Montserrat", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --gutter: 48px;
  --max: 1440px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; overflow-x: clip; }
html.is-locked { overflow: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img { display: block; max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p, dl, dd, ol, figure { margin: 0; }
ol { padding: 0; list-style: none; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 16px; top: -80px; z-index: 50;
  padding: 12px 20px; background: var(--ink); color: var(--surface);
  text-decoration: none; font-weight: 600;
}
.skip:focus { top: 16px; }

.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }

.label {
  font: 600 12px/1.4 var(--sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Buttons & links ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 14px 24px;
  border: 1px solid transparent; border-radius: 0;
  font: 600 15px/1.2 var(--sans); letter-spacing: 0.03em;
  text-decoration: none;
  transition: background-color 200ms var(--ease), color 200ms var(--ease), border-color 200ms var(--ease), transform 160ms var(--ease);
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-light { background: var(--night-ink); color: var(--night); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }

.btn-text {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding-block: 12px;
  color: var(--ink); font-weight: 600; font-size: 15px;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px;
  transition: color 200ms var(--ease), text-underline-offset 200ms var(--ease);
}
.btn-text:active { transform: scale(0.97); }
.btn-text:focus-visible { outline: none; text-decoration-thickness: 2px; text-decoration-color: var(--accent); color: var(--accent); }

@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background: var(--accent-deep); }
  .btn-light:hover { background: var(--surface); }
  .btn-ghost:hover { background: var(--ink); color: var(--surface); }
  .btn-text:hover { color: var(--accent); text-underline-offset: 8px; }
}

/* ---------- Masthead ---------- */

.masthead { border-bottom: 1px solid var(--ink); }
.masthead-inner {
  max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter);
  display: flex; align-items: center; gap: 32px; min-height: 76px;
}
.wordmark {
  font: 400 34px/1 var(--display); letter-spacing: -0.02em;
  color: var(--ink); text-decoration: none;
  padding-block: 8px; min-height: 44px; display: inline-flex; align-items: center;
}
.wordmark:active { transform: scale(0.97); }
.masthead-tag { font: italic 400 17px/1.3 var(--display); color: var(--muted); }
.nav { margin-left: auto; display: flex; gap: 4px; }
.nav a {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 10px 14px;
  font-size: 15px; font-weight: 500; color: var(--ink); text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 200ms var(--ease), color 200ms var(--ease);
}
.nav a:active { transform: scale(0.97); }
.nav a:focus-visible { outline-offset: -2px; }
.nav .nav-shortlist { border: 1px solid var(--ink); margin-left: 8px; }
.nav-count {
  min-width: 24px; height: 24px; padding-inline: 6px;
  display: inline-grid; place-items: center;
  background: var(--ink); color: var(--surface);
  font: 500 12px/1 var(--mono);
}
.nav-count.is-filled { background: var(--accent); color: var(--accent-ink); }
@media (hover: hover) and (pointer: fine) {
  .nav a:hover { border-bottom-color: var(--ink); }
  .nav .nav-shortlist:hover { background: var(--ink); color: var(--surface); }
  .nav .nav-shortlist:hover .nav-count { background: var(--surface); color: var(--ink); }
  .wordmark:hover { color: var(--accent); }
}

/* ---------- Hero ---------- */

.hero { padding-block: 32px 0; overflow-x: clip; }
.hero-grid {
  max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter);
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
  grid-template-areas:
    "intro intro intro intro intro plate plate plate plate plate plate plate"
    "title title title title title title title title title facts facts facts";
}

.hero-intro {
  grid-area: intro;
  display: flex; flex-direction: column; justify-content: space-between; gap: 24px;
  padding-right: 24px;
  animation: fade 700ms var(--ease) 120ms both;
}
.deck { font-size: 20px; line-height: 1.55; max-width: 34ch; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }

.hero-plate { grid-area: plate; animation: plate-in 900ms var(--ease) 60ms both; }
.plate-frame { position: relative; padding: 10px; }
.plate-frame::before {
  content: ""; position: absolute; inset: 0;
  border: 1px dashed var(--tissue);
  pointer-events: none;
}
.plate-frame img { width: 100%; height: 300px; object-fit: cover; object-position: 50% 40%; }
.plate figcaption { margin-top: 8px; font-size: 14px; color: var(--muted); line-height: 1.5; }
.fig-no { font: 600 12px/1 var(--mono); letter-spacing: 0.08em; color: var(--ink); margin-right: 8px; text-transform: uppercase; }

.hero-title { grid-area: title; margin-top: 16px; font-weight: 400; }
.hero-lead {
  display: block;
  font: italic 400 clamp(22px, 2.1vw, 30px)/1.15 var(--display);
  letter-spacing: -0.01em;
  margin-left: 0.25em;
  animation: fade 700ms var(--ease) 200ms both;
}
.hero-giant {
  display: block;
  font: 400 clamp(88px, 16.6vw, 262px)/0.92 var(--display);
  letter-spacing: -0.035em;
  margin-left: -0.04em;
  animation: settle 1000ms var(--ease) 260ms both;
}

.hero-facts {
  grid-area: facts; align-self: end;
  border-top: 2px solid var(--ink);
  margin-bottom: 18px;
  animation: fade 700ms var(--ease) 420ms both;
}
.hero-facts div {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding-block: 9px; border-bottom: 1px solid var(--rule);
}
.hero-facts dt { font: 600 11px/1.3 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.hero-facts dd { font: 400 22px/1.2 var(--display); letter-spacing: -0.01em; }

/* ---------- The tape (signature) ---------- */

.season { margin-top: 36px; }
.season-head {
  max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px;
}
.season-hint { display: none; font: 500 12px/1.4 var(--mono); color: var(--muted); }

.tape-wrap { overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; }
.tape {
  --tick: rgba(237, 230, 220, 0.55);
  display: grid;
  grid-template-columns: 96px repeat(31, minmax(38px, 1fr));
  min-width: 1300px;
  padding: 76px var(--gutter);
  animation: unroll 1300ms var(--ease) 380ms both;
}
.day {
  position: relative; height: 56px;
  background:
    linear-gradient(var(--tick), var(--tick)) 0 0 / 1px 20px no-repeat,
    linear-gradient(var(--tick), var(--tick)) 50% 0 / 1px 11px no-repeat,
    linear-gradient(var(--tick), var(--tick)) 25% 0 / 1px 6px no-repeat,
    linear-gradient(var(--tick), var(--tick)) 75% 0 / 1px 6px no-repeat,
    var(--night);
  color: var(--night-muted);
}
.day.is-weekend { background-color: var(--night-raise); color: var(--night-ink); }
.day-num { position: absolute; left: 5px; bottom: 6px; font: 500 12px/1 var(--mono); }
.day-wd { position: absolute; right: 5px; bottom: 6px; font: 500 10px/1 var(--mono); letter-spacing: 0.06em; opacity: 0.8; }
.day-lead {
  display: flex; flex-direction: column; justify-content: center; padding-left: 14px;
  background: var(--night); color: var(--night-ink);
  font: 600 11px/1.3 var(--sans); letter-spacing: 0.14em; text-transform: uppercase;
}
.day-lead span { font: italic 400 20px/1 var(--display); letter-spacing: 0; text-transform: none; }

/* the notch cut into the tape */
.cut {
  position: absolute; left: 50%; width: 16px; height: 14px; margin-left: -8px;
  background: var(--bg);
  transition: transform 220ms var(--ease), background-color 220ms var(--ease);
}
.is-sat .cut { top: -1px; clip-path: polygon(0 0, 100% 0, 50% 100%); transform-origin: 50% 0; }
.is-sun .cut { bottom: -1px; clip-path: polygon(50% 0, 100% 100%, 0 100%); transform-origin: 50% 100%; }

.notch {
  position: absolute; left: calc(50% - 8px); z-index: 1;
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  min-height: 48px; min-width: 120px; padding: 6px 10px 6px 12px;
  background: transparent; border: 0; border-left: 1px solid var(--ink);
  text-align: left; white-space: nowrap; color: var(--ink);
  transition: transform 220ms var(--ease), background-color 200ms var(--ease), color 200ms var(--ease);
  animation: fade 500ms var(--ease) both;
}
.is-sat .notch { bottom: calc(100% + 8px); }
.is-sun .notch { top: calc(100% + 8px); }
.notch::after {
  content: ""; position: absolute; left: -1px; width: 1px; height: 9px; background: var(--ink);
}
.is-sat .notch::after { top: 100%; }
.is-sun .notch::after { bottom: 100%; }
.notch-no { font: 500 11px/1.2 var(--mono); letter-spacing: 0.08em; color: var(--muted); }
.notch-title { font: italic 400 18px/1.15 var(--display); }
.notch-saved {
  display: none; margin-top: 2px;
  font: 600 10px/1 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent);
}
.notch:active { transform: scale(0.97); }
.notch:focus-visible { outline-offset: 0; background: var(--surface); }

.is-lit .notch { background: var(--surface); }
.is-sat.is-lit .notch { transform: translateY(-4px); }
.is-sun.is-lit .notch { transform: translateY(4px); }
.is-lit .cut { transform: scale(1.5); }
.is-saved .cut { background: var(--accent); }
.is-saved .notch-saved { display: block; }
.is-saved .notch { border-left-color: var(--accent); }
.is-muted .notch { color: var(--muted); }
.is-muted .notch-title { text-decoration: line-through; text-decoration-thickness: 1px; }
.is-muted .cut { background: var(--night-muted); }

.day[data-n="1"] .notch { animation-delay: 1000ms; }
.day[data-n="2"] .notch { animation-delay: 1080ms; }
.day[data-n="3"] .notch { animation-delay: 1160ms; }
.day[data-n="4"] .notch { animation-delay: 1240ms; }
.day[data-n="5"] .notch { animation-delay: 1320ms; }
.day[data-n="6"] .notch { animation-delay: 1400ms; }

@media (hover: hover) and (pointer: fine) {
  .notch:hover { background: var(--surface); }
  .is-sat .notch:hover { transform: translateY(-4px); }
  .is-sun .notch:hover { transform: translateY(4px); }
  .notch:hover .notch-title { color: var(--accent); }
}

/* ---------- Workshops ---------- */

.workshops { padding-block: 96px 112px; }
.section-head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: 12px; margin-bottom: 40px; }
.section-head .label { grid-column: 1 / -1; }
.section-title {
  grid-column: 1 / 8;
  font: 400 clamp(42px, 5.4vw, 80px)/1 var(--display);
  letter-spacing: -0.03em;
}
.section-title:focus { outline: none; }
.section-title:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.section-sub { grid-column: 8 / -1; align-self: end; color: var(--muted); max-width: 44ch; }

.toolbar {
  position: sticky; top: 0; z-index: 4;
  display: grid; grid-template-columns: minmax(0, 1fr) 240px auto auto;
  align-items: end; gap: 16px 24px;
  padding-block: 16px 20px;
  background: var(--bg);
  border-top: 2px solid var(--ink);
}
.field { display: grid; gap: 6px; }
.field label { font: 600 12px/1.4 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.field input, .field select {
  width: 100%; min-height: 52px; padding: 12px 16px;
  font-size: 17px;
  background: var(--surface); border: 1px solid var(--ink); border-radius: 0;
  transition: border-color 200ms var(--ease), box-shadow 200ms var(--ease);
}
.field input::placeholder { color: var(--muted); }
.field input:focus-visible, .field select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.field select { appearance: none; padding-right: 44px; cursor: pointer; }
.select-wrap { position: relative; }
.select-wrap::after {
  content: ""; position: absolute; right: 18px; top: 50%; width: 8px; height: 8px; margin-top: -6px;
  border-right: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink);
  transform: rotate(45deg); pointer-events: none;
}
.field select:active { transform: scale(0.99); }

.toggle {
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 52px; padding: 12px 20px;
  background: transparent; border: 1px solid var(--ink); border-radius: 0;
  font-size: 15px; font-weight: 600;
  transition: background-color 200ms var(--ease), color 200ms var(--ease), transform 160ms var(--ease);
}
.toggle:active { transform: scale(0.97); }
.toggle-box {
  position: relative; width: 18px; height: 18px; border: 1.5px solid currentColor;
  transition: background-color 200ms var(--ease);
}
.toggle[aria-pressed="true"] { background: var(--ink); color: var(--surface); }
.toggle[aria-pressed="true"] .toggle-box { background: var(--surface); }
.toggle[aria-pressed="true"] .toggle-box::after {
  content: ""; position: absolute; left: 4.5px; top: 1px; width: 5px; height: 10px;
  border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg);
}
.toggle-count { font: 500 13px/1 var(--mono); }
.result-count { justify-self: end; padding-bottom: 14px; font: 500 13px/1.4 var(--mono); color: var(--muted); }
@media (hover: hover) and (pointer: fine) {
  .field input:hover, .field select:hover { box-shadow: inset 0 -2px 0 var(--ink); }
  .toggle:hover { background: var(--surface); }
  .toggle[aria-pressed="true"]:hover { background: #33302D; }
}

/* ledger rows */
.ledger { border-top: 1px solid var(--ink); }
.row {
  position: relative;
  display: grid;
  grid-template-columns: 76px 232px minmax(0, 1fr) 272px 132px;
  grid-template-areas: "no img main specs act";
  column-gap: 32px; align-items: start;
  padding: 28px 16px;
  border-bottom: 1px solid var(--rule);
  transition: background-color 220ms var(--ease);
  animation: fade 360ms var(--ease) both;
}
.row::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: repeating-linear-gradient(90deg, var(--accent) 0 8px, transparent 8px 14px);
  transform: scaleX(0); transform-origin: 0 50%;
  transition: transform 300ms var(--ease);
}
.row-no { grid-area: no; font: italic 400 52px/0.9 var(--display); letter-spacing: -0.03em; }
.row-img { grid-area: img; aspect-ratio: 4 / 3; overflow: hidden; background: var(--rule); }
.row-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 300ms var(--ease); }
.row-main { grid-area: main; display: grid; gap: 8px; }
.row-cat { font: 600 12px/1.4 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.row-title { font: 400 clamp(30px, 2.6vw, 38px)/1.05 var(--display); letter-spacing: -0.02em; }
.row-summary { color: var(--muted); max-width: 50ch; font-size: 16px; line-height: 1.6; }
.row-specs { grid-area: specs; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 20px; padding-top: 4px; }
.row-specs dt, .env-spec th { font: 600 11px/1.3 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.row-specs dd { font: 500 15px/1.4 var(--mono); margin-top: 2px; }
.row-act { grid-area: act; display: grid; gap: 12px; justify-items: end; align-self: center; }
.row-open {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 48px; padding: 12px 18px;
  background: transparent; border: 1px solid var(--ink); border-radius: 0;
  font-size: 15px; font-weight: 600;
  transition: background-color 200ms var(--ease), color 200ms var(--ease), transform 160ms var(--ease);
}
/* stretched hit area: the whole row opens the envelope. Press feedback stays
   colour-only so the hit area never shrinks between mousedown and mouseup. */
.row-open::before { content: ""; position: absolute; inset: 0; z-index: 1; }
.row-open:active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.row:has(.row-open:focus-visible) { outline: 2px solid var(--accent); outline-offset: -2px; }
.row-saved {
  display: none;
  font: 600 11px/1 var(--sans); letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); border: 1px solid var(--accent); padding: 6px 8px;
}
.row.is-saved .row-saved { display: inline-block; }
.row.is-saved .row-no { color: var(--accent); }

.row:focus-within { background: var(--surface); }
.row:focus-within::after { transform: scaleX(1); }
.row:active .row-open { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
@media (hover: hover) and (pointer: fine) {
  .row:hover { background: var(--surface); }
  .row:hover::after { transform: scaleX(1); }
  .row:hover .row-img img { transform: scale(1.02); }
  .row:hover .row-open { background: var(--ink); color: var(--surface); }
}

/* photo crops so the shared images read differently */
[data-crop="clay-and-coffee"] img { object-position: 22% 70%; }
[data-crop="handbuilt-home"] img { object-position: 88% 20%; }
[data-crop="paint-the-afternoon"] img { object-position: 35% 25%; }
[data-crop="color-and-company"] img { object-position: 75% 80%; }
[data-crop="wild-stems"] img { object-position: 55% 60%; }
[data-crop="sourdough-sunday"] img { object-position: 55% 50%; }

.empty {
  margin-top: 32px; padding: 48px;
  display: grid; justify-items: start; gap: 12px;
  border: 1px solid var(--ink); background: var(--surface);
}
.empty-title { font: italic 400 clamp(32px, 3.4vw, 48px)/1.05 var(--display); letter-spacing: -0.02em; }
.empty-text { color: var(--muted); max-width: 52ch; margin-bottom: 12px; }

/* ---------- Shortlist band ---------- */

.shortlist { background: var(--night); color: var(--night-ink); padding-block: 128px; }
.shortlist :focus-visible { outline-color: var(--night-ink); }
.shortlist-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: 40px; }
.shortlist-head { grid-column: 1 / 6; display: grid; gap: 16px; align-content: start; }
.label-night { color: var(--night-muted); }
.shortlist .section-title { grid-column: auto; }
.shortlist-summary { color: var(--night-muted); max-width: 40ch; }
.shortlist-body { grid-column: 7 / -1; display: grid; gap: 32px; align-content: start; }

.slips { display: grid; gap: 12px; }
.slip {
  position: relative;
  display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; align-items: center; gap: 8px 20px;
  padding: 16px 16px 16px 20px;
  border: 1px dashed rgba(237, 230, 220, 0.45);
  animation: slip-in 260ms var(--ease) both;
  transition: border-color 200ms var(--ease), background-color 200ms var(--ease);
}
.slip-date { font: 500 13px/1.4 var(--mono); color: var(--night-muted); }
.slip-title { font: 400 26px/1.1 var(--display); letter-spacing: -0.01em; }
.slip-meta { display: block; margin-top: 4px; font: 500 13px/1.4 var(--mono); color: var(--night-muted); }
.slip-actions { display: flex; gap: 8px; }
.slip-btn {
  min-height: 44px; padding: 10px 14px;
  background: transparent; color: var(--night-ink);
  border: 1px solid rgba(237, 230, 220, 0.5); border-radius: 0;
  font-size: 14px; font-weight: 600;
  transition: background-color 200ms var(--ease), color 200ms var(--ease), transform 160ms var(--ease);
}
.slip-btn:active { transform: scale(0.97); }
.slip-empty {
  padding: 28px 20px; border: 1px dashed rgba(237, 230, 220, 0.35);
  font: italic 400 22px/1.3 var(--display); color: var(--night-muted);
}
.shortlist-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; border-top: 1px solid rgba(237, 230, 220, 0.3); padding-top: 24px; }
.total { display: grid; gap: 4px; }
.total-label { font: 600 12px/1.4 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--night-muted); }
.total-value { font: 400 30px/1.1 var(--display); }
@media (hover: hover) and (pointer: fine) {
  .slip:hover { border-color: var(--night-ink); background: var(--night-raise); }
  .slip-btn:hover { background: var(--night-ink); color: var(--night); }
}

/* ---------- Makers ---------- */

.makers { padding-block: 96px 128px; }
.makers-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: 40px; }
.makers-head { grid-column: 1 / 6; display: grid; gap: 20px; align-content: start; }
.makers-title { font: italic 400 clamp(40px, 4.4vw, 66px)/1.02 var(--display); letter-spacing: -0.03em; }
.makers-text { color: var(--muted); max-width: 40ch; }
.makers-list { grid-column: 7 / -1; border-top: 2px solid var(--ink); }
.maker {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 24px;
  padding: 22px 12px; border-bottom: 1px solid var(--rule);
  transition: background-color 200ms var(--ease);
}
.maker-name { font: 400 32px/1.1 var(--display); letter-spacing: -0.02em; }
.maker-work { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 20px; }
.maker-link {
  min-height: 44px; padding: 10px 0;
  background: none; border: 0;
  font-size: 16px; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px;
  transition: color 200ms var(--ease);
}
.maker-link .mono { font: 500 12px/1 var(--mono); color: var(--muted); margin-right: 6px; text-decoration: none; display: inline-block; }
.maker-link:active { transform: scale(0.97); }
.maker-link:focus-visible { outline: none; color: var(--accent); text-decoration-thickness: 2px; }
.maker-filter {
  align-self: center; min-height: 44px; padding: 10px 16px;
  background: transparent; border: 1px solid var(--ink); border-radius: 0;
  font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  transition: background-color 200ms var(--ease), color 200ms var(--ease), transform 160ms var(--ease);
}
.maker-filter:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
  .maker:hover { background: var(--surface); }
  .maker-link:hover { color: var(--accent); }
  .maker-filter:hover { background: var(--ink); color: var(--surface); }
}

/* ---------- Colophon ---------- */

.colophon { border-top: 2px solid var(--ink); padding-block: 48px 56px; }
.colophon-grid { display: grid; grid-template-columns: 3fr 4fr 4fr auto; gap: 24px; align-items: start; }
.colophon-mark { font: 400 48px/1 var(--display); letter-spacing: -0.03em; }
.colophon-text { font-size: 15px; color: var(--muted); max-width: 40ch; }
.colophon-text a { color: var(--ink); display: inline-block; padding-block: 11px; margin-block: -11px; text-underline-offset: 4px; }
.colophon-text a:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
  .colophon-text a:hover { color: var(--accent); }
}

/* ---------- Detail: the pattern envelope ---------- */

.envelope {
  width: min(1080px, calc(100vw - 48px));
  max-width: none; max-height: calc(100dvh - 48px);
  padding: 0; border: 1px solid var(--ink); border-radius: 0;
  background: var(--surface); color: var(--ink);
  overflow: auto; overscroll-behavior: contain;
}
.envelope[open] { animation: env-in 240ms var(--ease) both; }
.envelope::backdrop { background: rgba(26, 24, 23, 0.6); }

.env-inner { display: grid; grid-template-columns: 5fr 6fr; min-height: 560px; }
.env-figure { position: relative; padding: 18px; background: var(--bg); }
.env-figure::before {
  content: ""; position: absolute; inset: 9px; border: 1px dashed var(--tissue); pointer-events: none;
}
.env-scissors { position: absolute; left: 28px; top: 0; width: 20px; height: 20px; color: var(--tissue); background: var(--bg); }
button.btn-text { background: none; border: 0; padding-inline: 0; cursor: pointer; }
.env-figure img { width: 100%; height: 100%; min-height: 420px; object-fit: cover; }
.env-no {
  position: absolute; left: 28px; bottom: 28px;
  padding: 10px 14px; background: var(--surface); color: var(--ink);
  font: italic 400 40px/1 var(--display); letter-spacing: -0.03em;
}
.env-stamp {
  position: absolute; right: 28px; top: 28px;
  padding: 8px 12px; border: 2px solid var(--accent); background: var(--surface); color: var(--accent);
  font: 600 12px/1.2 var(--sans); letter-spacing: 0.14em; text-transform: uppercase;
  transform: rotate(-4deg);
}
.env-stamp.is-new { animation: stamp 260ms var(--ease) both; }

.env-body { display: flex; flex-direction: column; gap: 20px; padding: 32px 40px 36px; }
.env-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.env-close {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 10px 14px;
  background: var(--surface); border: 1px solid var(--ink); border-radius: 0;
  font-size: 14px; font-weight: 600;
  transition: background-color 200ms var(--ease), color 200ms var(--ease), transform 160ms var(--ease);
}
.env-close svg { width: 14px; height: 14px; }
.env-close:active { transform: scale(0.97); }
.env-title { font: 400 clamp(40px, 4.6vw, 64px)/1 var(--display); letter-spacing: -0.03em; }
.env-text { font-size: 19px; line-height: 1.6; max-width: 46ch; }
.env-spec { width: 100%; border-collapse: collapse; border-top: 2px solid var(--ink); }
.env-spec caption { text-align: left; padding-bottom: 8px; font: 600 12px/1.4 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.env-spec th, .env-spec td { padding: 10px 0; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: baseline; }
.env-spec th { width: 34%; font-weight: 600; }
.env-spec td { font: 500 15px/1.45 var(--mono); }
.env-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: auto; padding-top: 8px; }
.save { min-width: 240px; }
.save svg { width: 16px; height: 16px; }
.save[aria-pressed="true"] { background: var(--surface); color: var(--accent); border-color: var(--accent); }
.env-note { font-size: 14px; color: var(--muted); max-width: 30ch; }
.env-back { margin-left: auto; }
@media (hover: hover) and (pointer: fine) {
  .env-close:hover { background: var(--ink); color: var(--surface); }
  .save[aria-pressed="true"]:hover { background: var(--accent); color: var(--accent-ink); }
}

/* ---------- Motion ---------- */

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes settle { from { opacity: 0; transform: translateY(0.12em); } to { opacity: 1; transform: none; } }
@keyframes plate-in { from { opacity: 0; clip-path: inset(0 0 100% 0); } to { opacity: 1; clip-path: inset(0 0 0 0); } }
@keyframes unroll { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes env-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes slip-in { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: none; } }
@keyframes stamp { from { opacity: 0; transform: rotate(-4deg) scale(1.3); } to { opacity: 1; transform: rotate(-4deg) scale(1); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-giant, .envelope[open], .slip, .row, .hero-plate, .env-stamp.is-new { animation: fade 200ms linear both; }
  .tape { animation: none; }
  .notch { animation-delay: 0ms !important; }
  .row::after, .row-img img, .notch, .cut, .btn, .toggle, .row-open, .slip-btn, .env-close, .maker-filter { transition-property: opacity, background-color, color, border-color; }
  .is-lit .cut { transform: none; }
  .is-sat.is-lit .notch, .is-sun.is-lit .notch { transform: none; }
  .btn:active, .toggle:active, .slip-btn:active, .notch:active, .env-close:active,
  .maker-filter:active, .maker-link:active, .btn-text:active, .nav a:active { transform: none; }
}
@media (prefers-reduced-motion: reduce) and (hover: hover) and (pointer: fine) {
  .row:hover .row-img img, .is-sat .notch:hover, .is-sun .notch:hover { transform: none; }
}

/* ---------- Responsive ---------- */

@media (max-width: 1280px) {
  .row {
    grid-template-columns: 56px 200px minmax(0, 1fr);
    grid-template-areas:
      "no img main"
      "no img specs"
      "no img act";
    row-gap: 16px;
  }
  .row-no { font-size: 40px; }
  .row-specs { grid-template-columns: repeat(4, auto); justify-content: start; }
  .row-act { justify-items: start; grid-auto-flow: column; align-items: center; }
  .toolbar { grid-template-columns: minmax(0, 1fr) 220px auto; }
  .result-count { grid-column: 1 / -1; justify-self: start; padding: 0; }
}

@media (max-width: 900px) {
  :root { --gutter: 20px; }
  .masthead-inner { flex-wrap: wrap; gap: 0 16px; padding-top: 8px; }
  .masthead-tag { font-size: 15px; }
  .nav {
    order: 3; flex: 0 0 calc(100% + 2 * var(--gutter)); margin-inline: calc(-1 * var(--gutter));
    padding-inline: var(--gutter) 32px;
    overflow-x: auto; scrollbar-width: none; white-space: nowrap;
    border-top: 1px solid var(--rule);
    mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
  }
  .nav a { padding-inline: 12px; flex: none; }
  .nav a:first-child { padding-left: 0; }

  .hero { padding-top: 20px; }
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "title" "intro" "plate" "facts";
    row-gap: 28px;
  }
  .hero-title { margin-top: 0; }
  .hero-lead { margin-left: 0.1em; }
  .hero-intro { padding-right: 0; }
  .deck { font-size: 18px; }
  .plate-frame img { height: 220px; }
  .hero-facts { margin-bottom: 0; }

  .season-hint { display: block; }
  .tape { min-width: 1260px; }

  .workshops { padding-block: 64px 80px; }
  .section-title, .section-sub { grid-column: 1 / -1; }
  .toolbar { position: static; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
  .field-search { grid-column: 1 / -1; }
  .toggle { justify-content: center; }
  .result-count { grid-column: 1 / -1; }

  .shortlist { padding-block: 80px; }
  .shortlist-head, .shortlist-body, .makers-head, .makers-list { grid-column: 1 / -1; }
  .makers { padding-block: 72px 96px; }
  .colophon-grid { grid-template-columns: 1fr; }

  .envelope { width: 100vw; max-height: 100dvh; height: 100dvh; margin: 0; border: 0; }
  .env-inner { grid-template-columns: 1fr; min-height: 0; }
  .env-figure img { min-height: 0; height: 240px; }
  .env-body { padding: 24px 20px 32px; }
  .env-top { position: sticky; top: 0; z-index: 2; margin: -24px -20px 0; padding: 12px 20px; background: var(--surface); border-bottom: 1px solid var(--rule); }
  .env-no { font-size: 30px; left: 24px; bottom: 24px; }
  .env-text { font-size: 18px; }
  .save { flex: 1 1 100%; }
  .env-back { margin-left: 0; }
}

@media (max-width: 640px) {
  .row {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "img" "main" "specs" "act";
    padding-inline: 0; row-gap: 16px;
  }
  .row-no {
    grid-area: img; z-index: 1; align-self: start; justify-self: start;
    padding: 8px 12px; background: var(--surface); font-size: 30px;
  }
  .row-img { aspect-ratio: 16 / 10; }
  .row-specs { grid-template-columns: 1fr 1fr; }
  .row-act { grid-auto-flow: row; justify-items: stretch; }
  .row-open { justify-content: center; }
  .row.is-saved .row-saved { justify-self: start; }
  .slip { grid-template-columns: minmax(0, 1fr); }
  .slip-actions .slip-btn { flex: 1; }
  .empty { padding: 28px 20px; }
  .masthead-tag { display: none; }
}
