/* Tin Roof Drawing Office: site.css
   Demo site by BOUW. Fictional studio. One stylesheet, built from the Web Library (04 - Shared Resources/Web Library).
   Concept: two inks, slightly off. Everything prints in riso blue and mint on cool paper, and every drawing sits a few
   pixels out of register until you touch it. Hex colours live only in the token block. Light only (it's paper).
   Radius 0 everywhere; chips are the only rounded thing.

   Contents
   1. Tokens (site) + library token contract
   2. Motion tokens                        lib: motion-tokens@v1 (tuned: a 280ms registration step)
   3. Fonts
   4. Base, reset, a11y                    lib: base@v1 (reset and helpers only)
   5. Type, double-printed headings
   6. Demo bar                             lib: demo-bar@v1
   7. Nav + mobile menu                    lib: nav@v1 (restyled: two-ink underline, drawn rule, clip-path panel)
   8. Buttons and links                    lib: button@v1 (restyled: square, misregistered mint plate)
   9. Two-ink artwork and registration     (signature 1)
   10. Print-shop devices: grain, crop marks, colour bar
   11. Hero                                (signature 2: print-in)
   12. Selected work and the label fan
   13. What we draw: chips
   14. Prices and how it runs              lib: menu-list@v1 (restyled)
   15. Sample review on the shelf
   16. Close band and footer               lib: footer@v1 (restyled)
   17. Work page and filter                (signature 3 with the view transition)
   18. Contact form                        lib: form@v1 (restyled)
   19. 404
   20. View transitions                    lib: view-transitions@v1
   21. Breakpoints
   22. Reduced motion */

/* 1. Tokens ---------------------------------------------------------------- */
:root {
  color-scheme: light;
  --paper: #F3F4F0;          /* cool riso paper */
  --sheet: #E6E9E1;          /* the press sheet under the work: muted 5.55:1, blue 6.27:1, ink 14.3:1 */
  --stock: #FBFBF8;          /* label stock and art cards */
  --ink: #15182B;
  --blue: #1F44C9;           /* paper on blue 6.97:1 */
  --mint: #7FD6CC;           /* decorative only on paper (1.53:1); ink on mint 10.35:1 */
  --muted: #565A6E;          /* 6.17:1 on paper; NOT on mint (4.02:1) */
  --on-blue-soft: #C9D3F5;   /* small text on blue 5.17:1 */
  --error: #B0263A;
  --shade: rgb(21 24 43 / 0.32);
  --rule: rgb(21 24 43 / 0.18);

  /* library token contract */
  --bg: var(--paper);
  --fg: var(--ink);
  --accent: var(--blue);
  --on-accent: var(--paper);
  --surface: var(--sheet);
  --line: var(--rule);
  --danger: var(--error);
  --on-media: var(--paper);

  --font-display: "Shrikhand", "Cooper Black", Georgia, serif;
  --font-body: "Figtree", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2.5rem;
  --space-6: 4rem;
  --space-7: 7rem;
  --space-section: clamp(4rem, 2rem + 6vw, 8rem);
  --gutter: clamp(1rem, 0.3rem + 3vw, 3rem);
  --measure: 60ch;
  --max: 82rem;

  --step--1: 0.875rem;
  --step-0: 1.125rem;
  --step-1: 1.375rem;
  --step-2: clamp(2rem, 1.4rem + 2.4vw, 3rem);
  --step-3: clamp(2.75rem, 1rem + 6vw, 6rem);

  --radius: 0;
  --radius-chip: 20px;
}

/* 2. Motion tokens --------------------------------------------------------- */
/* lib: motion-tokens@v1 (tuned)
   --ease-out     settle: things arriving (print-in, filter close-up, page reveal)
   --ease-in-out  travel: between two states (menu panel, view transitions)
   --ease-press   snap: direct feedback (registration, hover, press)
   --dur-0 120ms  leaving (filter fade-out)   --dur-1 200ms  hover, underline, grid close-up
   --dur-reg 280ms  the registration snap     --dur-2 450ms  menu, page settle   --dur-3 700ms  hero print-in total
   Only transform, opacity and clip-path move. Section 22 zeroes everything for reduced motion. */
:root {
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-press: cubic-bezier(0.2, 0, 0, 1);
  --dur-0: 120ms;
  --dur-1: 200ms;
  --dur-reg: 280ms;
  --dur-2: 450ms;
  --dur-3: 700ms;
  --stagger: 60ms;
  --ease: var(--ease-out);
}

/* 3. Fonts: self-hosted Latin subsets, OFL (see /fonts/LICENSES.md) ------- */
@font-face { font-family: "Shrikhand"; src: url("/demos/tin-roof-drawing-office/fonts/shrikhand.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("/demos/tin-roof-drawing-office/fonts/figtree-var.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }

/* 4. Base ------------------------------------------------------------------ */
/* lib: base@v1 (reset and a11y helpers) */
*, ::before, ::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0; min-height: 100svh;
  background: var(--paper); color: var(--ink);
  font: 400 var(--step-0) / 1.6 var(--font-body);
  font-kerning: normal; -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, figure, blockquote, dl, dd, ol, ul { margin: 0; }
h1, h2, h3 { font-weight: 400; line-height: 1.1; text-wrap: balance; }
p, li, dd { text-wrap: pretty; }
:where(ul[role="list"], ol[role="list"]) { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
a { color: var(--blue); text-decoration-thickness: 2px; text-underline-offset: 0.22em; text-decoration-color: var(--mint); }
a:hover { text-decoration-color: var(--blue); }
[hidden] { display: none !important; }
::selection { background: var(--mint); color: var(--ink); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; left: var(--space-3); top: var(--space-3); z-index: 100;
  padding: var(--space-2) var(--space-3); background: var(--ink); color: var(--paper);
  font: 700 var(--step--1) / 1.4 var(--font-body); text-decoration: none; transform: translateY(-200%);
}
.skip-link:focus { transform: none; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
:target { scroll-margin-top: 6rem; }
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }

/* 5. Type ------------------------------------------------------------------ */
/* Double print: the real heading is blue; a duplicate in mint sits 4px right, 3px down behind it.
   The duplicate is generated content with an empty alternative (content: attr() / ""), so screen readers
   and contrast checks only ever meet the blue text. It never moves. */
.dp { position: relative; isolation: isolate; color: var(--blue); font-family: var(--font-display); }
.dp::before {
  content: attr(data-print) / ""; position: absolute; inset: 0; z-index: -1;
  color: var(--dp, var(--mint)); transform: translate(0.045em, 0.035em); pointer-events: none; /* scales with the type: 4/3px at the H1, about 1px at the quote */
}
.h1 { font-size: var(--step-3); line-height: 1.05; padding-bottom: 0.12em; letter-spacing: -0.005em; }
.h2 { font-size: var(--step-2); line-height: 1.08; padding-bottom: 0.12em; }
.lede { max-width: 34ch; font-size: clamp(1.125rem, 1rem + 0.4vw, 1.3125rem); line-height: 1.5; }
.body { max-width: var(--measure); }
.small { font-size: var(--step--1); line-height: 1.5; color: var(--muted); }
.caption { font: 500 var(--step--1) / 1.5 var(--font-body); color: var(--muted); }
.tag {
  display: inline-block; padding: 0.15em 0.6em; border-radius: var(--radius-chip);
  background: var(--mint); color: var(--ink); font: 700 0.8125rem / 1.5 var(--font-body);
}

/* 6. Demo bar -------------------------------------------------------------- */
/* lib: demo-bar@v1 */
.demo-bar { position: relative; z-index: 60; padding: 0.45rem var(--gutter); background: var(--ink); color: var(--paper); font: 500 0.8125rem / 1.4 var(--font-body); text-align: center; }
.demo-bar a { color: inherit; font-weight: 700; text-decoration-color: var(--mint); }
.demo-bar a:focus-visible { outline-color: var(--mint); }
.demo-bar__short { display: none; }

/* 7. Nav ------------------------------------------------------------------- */
/* lib: nav@v1 (restyled). The rule under the bar draws in once you scroll (JS adds .is-scrolled);
   link underlines print in two inks, the mint one landing a beat later. */
.nav { position: sticky; top: 0; z-index: 50; background: var(--grain), var(--paper); view-transition-name: nav; }
.nav::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--ink);
  transform: scaleX(0); transform-origin: left; transition: transform var(--dur-2) var(--ease-in-out);
}
.nav.is-scrolled::after { transform: scaleX(1); }
.nav__in { display: flex; align-items: center; gap: var(--space-5); max-width: var(--max); min-height: 4.25rem; margin-inline: auto; padding-inline: var(--gutter); }
.nav__brand {
  margin-right: auto; font: 400 1.25rem / 1 var(--font-display); color: var(--blue); text-decoration: none; white-space: nowrap;
  padding-block: 0.4rem 0.55rem; view-transition-name: brand;
}
.nav__menu ul { display: flex; align-items: center; gap: var(--space-5); }
.nav__link { position: relative; display: inline-block; padding-block: 0.5rem; font: 600 1rem / 1 var(--font-body); color: var(--ink); text-decoration: none; }
.nav__link::before, .nav__link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0.1rem; height: 3px;
  transform: scaleX(0); transform-origin: left;
}
.nav__link::before { background: var(--mint); translate: 3px 2px; transition: transform var(--dur-reg) var(--ease-press) 60ms; }
.nav__link::after { background: var(--blue); transition: transform var(--dur-1) var(--ease-press); }
.nav__link:hover::before, .nav__link:hover::after, .nav__link:focus-visible::before, .nav__link:focus-visible::after,
.nav__link[aria-current="page"]::before, .nav__link[aria-current="page"]::after { transform: scaleX(1); }
.nav__toggle { display: none; place-items: center; width: 2.75rem; height: 2.75rem; margin-right: -0.5rem; border: 0; background: transparent; cursor: pointer; }
.nav__bars, .nav__bars::before { display: block; width: 1.4rem; height: 2.5px; background: var(--ink); transition: transform var(--dur-2) var(--ease-in-out); }
.nav__bars { position: relative; transform: translateY(-0.22rem); }
.nav__bars::before { content: ""; position: absolute; top: 0.44rem; background: var(--blue); }
.nav__toggle[aria-expanded="true"] .nav__bars { transform: rotate(45deg); }
.nav__toggle[aria-expanded="true"] .nav__bars::before { transform: translateY(-0.44rem) rotate(-90deg); }

/* 8. Buttons and links ----------------------------------------------------- */
/* lib: button@v1 (restyled). The face is ::after; a mint plate (::before) prints 5px right, 4px down.
   Hover pulls the plate into register under the face; press pushes the whole button in. */
.btn {
  position: relative; isolation: isolate; display: inline-flex; align-items: center; justify-content: center;
  min-height: 3rem; padding: 0.85em 1.5em; border: 0; border-radius: 0; background: transparent;
  color: var(--paper); font: 700 1rem / 1 var(--font-body); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform var(--dur-1) var(--ease-press);
}
.btn::before, .btn::after { content: ""; position: absolute; inset: 0; }
.btn::before { z-index: -2; background: var(--mint); transform: translate(5px, 4px); transition: transform var(--dur-reg) var(--ease-press); }
.btn::after { z-index: -1; background: var(--blue); }
.btn:hover::before, .btn:focus-visible::before { transform: translate(0, 0); }
.btn:active { transform: scale(0.97); }
.btn--paper { color: var(--blue); }
.btn--paper::after { background: var(--paper); }
.btn--paper:focus-visible { outline-color: var(--paper); }
.link {
  font-weight: 700; color: var(--blue); text-decoration: underline 2px var(--mint); text-underline-offset: 0.3em;
  transition: text-underline-offset var(--dur-1) var(--ease-press);
}
.link:hover { text-decoration-color: var(--blue); text-underline-offset: 0.2em; }
.acts { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-5); }

/* 9. Two-ink artwork: signature 1, registration ----------------------------- */
/* Every artwork is two stacked static SVGs, one per ink, multiplied over an opaque card (blend needs it).
   At rest the mint plate sits --rx/--ry out (6-9px, seeded per artwork, so the snap reads at card size). Hovering or focusing its card brings it
   into register over 280ms; for everyone, JS prints each card into register once as 60% of it enters view; leaving with the pointer
   drops it back out, so hover replays it. On touch it registers while in view. Reduced motion: rests at offset. */
.art { position: relative; isolation: isolate; overflow: clip; background: var(--grain), var(--paper); } /* ink can't print off the sheet */
.art img { width: 100%; height: auto; }
.art picture { display: contents; }
.art__mint { position: absolute; inset: 0; mix-blend-mode: multiply; transform: translate(var(--rx, 7px), var(--ry, 5px)); }
@media (prefers-reduced-motion: no-preference) {
  .art__mint { transition: transform var(--dur-reg) var(--ease-press); }
  .reg:hover .art__mint, .reg:focus-visible .art__mint, .reg.is-reg .art__mint, .reg:focus-within .art__mint { transform: translate(0, 0); }
}
.art--stock { background: var(--stock); }

/* 10. Print-shop devices ---------------------------------------------------- */
/* Grain: paper tooth printed into each surface as a tiled background (no fixed layer, no filter on a scroller).
   Art cards stay clean stock so the riso grain inside each drawing reads. */
:root {
  --grain: 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='.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .08 0 0 0 0 .09 0 0 0 0 .17 0 0 0 -1.5 .82'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.38'/%3E%3C/svg%3E");
}
body { background: var(--grain), var(--paper); }
/* Crop marks outside a card's trim: add .marks to any positioned block */
.marks { position: relative; }
.marks::after {
  --m: 12px; --g: 18px; --c: var(--muted);
  content: ""; position: absolute; inset: calc(-1 * var(--g)); pointer-events: none;
  background:
    linear-gradient(var(--c) 0 0) 0 var(--g) / var(--m) 1px,
    linear-gradient(var(--c) 0 0) var(--g) 0 / 1px var(--m),
    linear-gradient(var(--c) 0 0) 100% var(--g) / var(--m) 1px,
    linear-gradient(var(--c) 0 0) calc(100% - var(--g)) 0 / 1px var(--m),
    linear-gradient(var(--c) 0 0) 0 calc(100% - var(--g)) / var(--m) 1px,
    linear-gradient(var(--c) 0 0) var(--g) 100% / 1px var(--m),
    linear-gradient(var(--c) 0 0) 100% calc(100% - var(--g)) / var(--m) 1px,
    linear-gradient(var(--c) 0 0) calc(100% - var(--g)) 100% / 1px var(--m);
  background-repeat: no-repeat;
}
/* Colour bar: the control strip at the head of a press sheet. Blue, mint, the overlap, two halftones, a target. */
.cbar { display: flex; align-items: center; gap: 6px; height: 2.25rem; }
.cbar i { display: block; width: 18px; height: 12px; }
.cbar i:nth-child(1) { background: var(--blue); }
.cbar i:nth-child(2) { background: var(--mint); }
.cbar i:nth-child(3) { background: var(--blue); position: relative; isolation: isolate; }
.cbar i:nth-child(3)::after { content: ""; position: absolute; inset: 0; background: var(--mint); mix-blend-mode: multiply; }
.cbar i:nth-child(4) { background: radial-gradient(circle, var(--blue) 1.2px, transparent 1.6px) 0 0 / 4px 4px; }
.cbar i:nth-child(5) { background: radial-gradient(circle, var(--mint) 1.4px, transparent 1.8px) 0 0 / 4px 4px; }
.cbar b {
  width: 16px; height: 16px; margin-left: 6px; border: 1.5px solid var(--ink); border-radius: 50%;
  background: linear-gradient(var(--ink) 0 0) center / 1.5px 100% no-repeat, linear-gradient(var(--ink) 0 0) center / 100% 1.5px no-repeat;
}
.cbar span { margin-left: auto; font: 600 0.75rem / 1 var(--font-body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

/* 11. Hero: signature 2, the print-in ------------------------------------- */
.hero {
  --side: max(var(--gutter), (100% - var(--max)) / 2 + var(--gutter));
  display: grid; grid-template-columns: var(--side) repeat(12, minmax(0, 1fr)) var(--side);
  align-items: center; column-gap: 0; padding-block: clamp(2rem, 1rem + 3vw, 4rem) clamp(3rem, 2rem + 4vw, 6rem);
  min-height: min(46rem, calc(100svh - 6.5rem));
}
.hero__text { grid-column: 2 / 8; grid-row: 1; position: relative; z-index: 1; display: grid; gap: var(--space-4); padding-right: var(--space-4); }
.hero .h1 { font-size: clamp(2.75rem, 0.9rem + 3.6vw, 4.25rem); max-width: 15ch; }
.hero__art { grid-column: 8 / -1; grid-row: 1; overflow: clip; }
/* Blue is never animated (it is the LCP image). The mint plate follows 220ms later from 12px out of register
   to its resting offset: the print order of a two-colour riso job. 700ms in all. */
@media (prefers-reduced-motion: no-preference) {
  .js .print-in .art__mint { animation: print-in 480ms var(--ease-out) 220ms both; }
}
@keyframes print-in {
  from { opacity: 0; transform: translate(calc(var(--rx) + 12px), calc(var(--ry) + 9px)); }
}

/* 12. Selected work -------------------------------------------------------- */
.sheet { position: relative; background: var(--grain), var(--sheet); padding-block: 0 var(--space-section); }
.sheet__bar { border-bottom: 1px solid var(--rule); margin-bottom: clamp(2.5rem, 1.5rem + 3vw, 4.5rem); }
.sel__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(2.5rem, 1.5rem + 2.5vw, 4rem) var(--gutter); margin-top: var(--space-5); }
.sel__a1 { grid-column: 1 / 8; grid-row: 1 / 3; }
.sel__a4 { grid-column: 8 / -1; grid-row: 1; }
.sel__a2 { grid-column: 9 / -1; grid-row: 2; }
.sel__foot { margin-top: var(--space-6); }
.sel__a4 .tile__card { padding: 0.5rem; }
.tile { display: grid; grid-template-rows: 1fr auto; gap: var(--space-4); color: inherit; text-decoration: none; }
.tile__card { display: grid; place-items: center; padding: clamp(1.25rem, 0.5rem + 2vw, 2.25rem); background: var(--stock); }
.tile__card .art { width: 100%; }
.tile__card .art { background: var(--stock); }
.tile__title { font: 700 1.125rem / 1.35 var(--font-body); color: var(--ink); }
.tile__title span { background: linear-gradient(var(--mint) 0 0) 0 100% / 0 0.35em no-repeat; transition: background-size var(--dur-reg) var(--ease-press); }
.tile:hover .tile__title span, .tile:focus-visible .tile__title span { background-size: 100% 0.35em; }
.tile__cap { margin-top: var(--space-1); max-width: 46ch; font-size: 1rem; color: var(--muted); }
.tile:focus-visible { outline-offset: 6px; }

/* The label series as a hand of cards. Each label is its own two-ink artwork on label stock. */
.fan { position: relative; width: 100%; aspect-ratio: 1160 / 1610; }
.fan .art { position: absolute; width: 58%; background: var(--stock); box-shadow: 0 1px 0 var(--rule), 0 22px 30px -22px var(--shade); }
.fan .art:nth-child(1) { left: 2%; top: 1.5%; rotate: -6deg; }
.fan .art:nth-child(2) { left: 20%; top: 21%; }
.fan .art:nth-child(3) { left: 39%; top: 42%; rotate: 5deg; }
.fan--wide { aspect-ratio: 2 / 1; }
.fan--wide .art { width: 30%; }
.fan--wide .art:nth-child(1) { left: 6%; top: 9%; }
.fan--wide .art:nth-child(2) { left: 35%; top: 4%; }
.fan--wide .art:nth-child(3) { left: 64%; top: 9%; }

/* 13. What we draw: chips -------------------------------------------------- */
.draw { padding-block: var(--space-section); }
.draw__head { display: grid; gap: var(--space-4); }
.rule2 { position: relative; height: 3px; background: var(--blue); margin-bottom: var(--space-5); }
.rule2::before { content: ""; position: absolute; inset: 0; background: var(--mint); transform: translate(6px, 5px); z-index: -1; }
.proofs {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(15rem, 1fr); gap: var(--space-4);
  margin: var(--space-5) calc(-1 * var(--gutter)) 0; padding: var(--space-2) var(--gutter) var(--space-4);
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); scrollbar-width: thin; scrollbar-color: var(--blue) transparent;
}
/* five proofs pulled from the drawer: stock, a crop of the real piece, the name underlined in mint */
.proof { scroll-snap-align: start; display: grid; align-content: start; gap: var(--space-3); padding: 0 0 var(--space-4); background: var(--stock); color: var(--ink); box-shadow: 0 1px 0 var(--rule), 0 14px 22px -16px var(--shade); }
.proof:nth-child(odd) { rotate: -0.6deg; }
.proof:nth-child(even) { rotate: 0.5deg; translate: 0 6px; }
.proof__crop { padding: 10px 10px 0; }
.proof__crop .art { height: 7.5rem; background: var(--stock); }
.proof__crop .art img { height: 100%; object-fit: cover; object-position: var(--op); }
.proof h3, .proof p { padding-inline: var(--space-4); }
.proof h3 { margin-top: var(--space-2); font: 700 1.125rem / 1.3 var(--font-body); }
.proof h3 span { text-decoration: underline 0.3em var(--mint); text-underline-offset: -0.12em; text-decoration-skip-ink: none; }
.proof p { font-size: 1rem; line-height: 1.5; }
@media (min-width: 64rem) {
  .proofs { grid-auto-flow: row; grid-template-columns: 1.35fr 1fr 1fr 1fr 1.35fr; overflow: visible; margin-inline: 0; padding-inline: 0; }
}

/* 14. Prices and how it runs ---------------------------------------------- */
.prices { position: relative; isolation: isolate; padding-block: var(--space-section); }
.prices::before { content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; left: 0; width: 50%; background: var(--grain), var(--mint); }
.prices__in { display: grid; grid-template-columns: 1fr 1fr; gap: calc(var(--gutter) * 2); }
.prices__left { display: grid; align-content: start; gap: var(--space-5); padding-right: var(--gutter); }
.prices .dp { --dp: var(--paper); }
/* lib: menu-list@v1 (restyled: Figtree 500 names, blue prices, ink dotted leaders) */
.menu__items { display: grid; gap: var(--space-3); margin: 0; padding: 0; list-style: none; max-width: 30rem; }
.menu__row { display: flex; align-items: baseline; gap: var(--space-2); font-weight: 500; }
.menu__row::after { content: ""; order: 1; flex: 1; min-width: 1rem; border-bottom: 2px dotted var(--ink); transform: translateY(-0.3em); opacity: 0.55; }
.menu__price { order: 2; color: var(--blue); font-weight: 700; font-variant-numeric: lining-nums tabular-nums; white-space: nowrap; }
.prices__note { max-width: 30rem; font-size: 1rem; line-height: 1.5; }
.steps { display: grid; gap: var(--space-5); margin: 0; padding: var(--space-5) 0 0; border-top: 2px solid var(--ink); list-style: none; align-content: start; align-self: center; }
.step { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: var(--space-4); align-items: start; }
.step__proof { position: relative; padding: 6px; background: var(--stock); box-shadow: 0 1px 0 var(--rule), 0 10px 16px -12px var(--shade); }
.step__proof img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.step__proof .art { background: var(--stock); }
.step:nth-child(4) .art__mint { transform: none; } /* handed over: in register */
.step h3 { font: 700 1.25rem / 1.3 var(--font-body); color: var(--blue); }
.step p { margin-top: var(--space-1); max-width: 40ch; font-size: 1.0625rem; }

/* 15. Sample review on the shelf ------------------------------------------ */
.review { position: relative; isolation: isolate; padding-block: var(--space-6) clamp(4rem, 3rem + 3vw, 6rem); overflow: clip; }
.review__in { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: center; }
.review__fig { grid-column: 1 / 8; display: grid; gap: var(--space-4); justify-items: start; margin: 0; }
.review__fig blockquote { margin: 0; }
.review__fig blockquote p { font-size: 1.75rem; line-height: 1.25; max-width: 30ch; }
.review__who { font-weight: 500; color: var(--muted); }
/* the shelf: the three labels, on their bottles; the halftone field sits behind them only */
.review__shelf { grid-column: 8 / -1; position: relative; isolation: isolate; padding-top: var(--space-5); }
.review__shelf::before {
  content: ""; position: absolute; inset: 0 -4% 10px; z-index: -1;
  background: radial-gradient(circle, var(--mint) 2.1px, transparent 2.5px) 0 0 / 11px 11px;
  -webkit-mask-image: radial-gradient(ellipse 72% 72% at 50% 58%, #000 30%, transparent 78%);
  mask-image: radial-gradient(ellipse 72% 72% at 50% 58%, #000 30%, transparent 78%); /* centred on all three bottles */
}
.bottles { display: flex; justify-content: center; align-items: flex-end; }
.bottles .art { flex: none; width: 44%; margin-inline: -6.5%; background: none; } /* no card: the bottles stand on the shelf */
.shelf { height: 14px; background: var(--blue); position: relative; margin-top: -1px; }
.shelf::before { content: ""; position: absolute; inset: 0; background: var(--mint); transform: translate(5px, 4px); z-index: -1; }

/* 16. Close band and footer ------------------------------------------------ */
.close { position: relative; background: var(--grain), var(--blue); color: var(--paper); box-shadow: 12px -8px 0 var(--mint); margin-top: 8px; }
.close__in { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: var(--space-5); padding-block: clamp(3.5rem, 2rem + 5vw, 6.5rem); }
.close .dp { color: var(--paper); }
.close .dp::before { --dp: var(--mint); opacity: 0.85; }
.close p { margin-top: var(--space-3); max-width: 44ch; color: var(--paper); }
/* lib: footer@v1 (restyled: paper, small, one row) */
.footer { padding-block: var(--space-6) var(--space-5); font-size: 1rem; }
.footer__top { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: var(--space-5); padding-bottom: var(--space-5); border-bottom: 2px solid var(--ink); }
.footer__mark { font: 400 1.5rem / 1.1 var(--font-display); color: var(--blue); text-decoration: none; justify-self: start; }
.footer__h { margin-bottom: var(--space-1); font: 700 0.8125rem / 1.4 var(--font-body); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.footer__note { padding-top: var(--space-4); font-size: var(--step--1); color: var(--muted); }
.footer__note a { color: inherit; }

/* 17. Work page ------------------------------------------------------------ */
.page-head { padding-block: clamp(2.5rem, 1.5rem + 3vw, 4.5rem) var(--space-5); display: grid; gap: var(--space-4); }
.filter { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: var(--space-4) 0 0; padding: 0; border: 0; }
.filter legend { margin-bottom: var(--space-2); font-weight: 700; font-size: 1rem; }
.filter label {
  display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 1.1rem; border: 2px solid var(--ink); border-radius: var(--radius-chip);
  font: 600 1rem / 1 var(--font-body); cursor: pointer; transition: background-color var(--dur-1) var(--ease-press), border-color var(--dur-1) var(--ease-press);
}
.filter label:hover { background: color-mix(in srgb, var(--mint) 35%, var(--paper)); }
.filter input:checked + label { background: var(--mint); border-color: var(--mint); }
.filter input:focus-visible + label { outline: 3px solid var(--blue); outline-offset: 2px; }
.drawer { background: var(--grain), var(--sheet); padding-block: 0 var(--space-section); }
.works { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-flow: dense; gap: clamp(3rem, 2rem + 3vw, 5rem) var(--gutter); }
.piece { display: grid; grid-column: span 6; grid-template-rows: auto; align-content: start; gap: var(--space-4); }
.piece--7 { grid-column: span 7; }
.piece--5 { grid-column: span 5; }
.piece__text { display: grid; gap: var(--space-4); align-content: start; }
.piece--split { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: var(--gutter); align-items: start; }
.piece--split .legend__list { columns: 2; }
.piece__title a { color: inherit; text-decoration: none; background: linear-gradient(var(--mint) 0 0) 0 100% / 0 0.35em no-repeat; transition: background-size var(--dur-reg) var(--ease-press); }
.piece:hover .piece__title a, .piece__title a:focus-visible { background-size: 100% 0.35em; }
.piece--wide { grid-column: 1 / -1; }
.legend { display: grid; gap: var(--space-2); padding-top: var(--space-4); border-top: 2px solid var(--ink); }
.legend__h { font: 700 0.8125rem / 1.4 var(--font-body); letter-spacing: 0.06em; text-transform: uppercase; color: var(--blue); }
.legend__list { columns: 2; column-gap: var(--gutter); margin: var(--space-2) 0 0; padding-left: 1.75em; font-size: 1rem; line-height: 1.75; font-variant-numeric: tabular-nums; }
.legend__list li::marker { font-weight: 700; color: var(--blue); }
.piece__card { display: grid; place-items: center; padding: clamp(1.25rem, 0.5rem + 3vw, 3.5rem); background: var(--stock); }
.piece--wide .piece__card { padding-inline: clamp(1rem, 0.5rem + 5vw, 8rem); }
.piece__card > .art, .piece__card > .fan, .piece__card > .spots { width: 100%; }
.piece__title { font: 700 clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem) / 1.25 var(--font-body); color: var(--ink); }
.facts { display: grid; gap: var(--space-3); }
.piece--wide:not(.piece--split) .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gutter); }
.facts dt { font: 700 0.8125rem / 1.4 var(--font-body); letter-spacing: 0.06em; text-transform: uppercase; color: var(--blue); }
.facts dd { margin-top: var(--space-1); font-size: 1.0625rem; line-height: 1.55; max-width: 48ch; }
.spots { display: grid; grid-template-columns: 1fr 1fr; gap: 6%; }
.works__empty { grid-column: 1 / -1; padding: var(--space-6) 0; font: 400 var(--step-2) / 1.1 var(--font-display); color: var(--blue); }
/* Without JS the radios still filter, through :has(); browsers without :has() show everything */
.no-js main:has(#k-labels:checked) .piece:not([data-kind~="labels"]) { display: none; }
.no-js main:has(#k-books:checked) .piece:not([data-kind~="books"]) { display: none; }
.no-js main:has(#k-maps:checked) .piece:not([data-kind~="maps"]) { display: none; }
.no-js main:has(#k-editorial:checked) .piece:not([data-kind~="editorial"]) { display: none; }
.no-js main:has(#k-patterns:checked) .piece:not([data-kind~="patterns"]) { display: none; }

/* 18. Contact form --------------------------------------------------------- */
.contact { display: grid; grid-template-columns: 4fr 8fr; gap: clamp(2.5rem, 1rem + 5vw, 6rem); padding-block: clamp(2.5rem, 1.5rem + 3vw, 4.5rem) var(--space-section); }
.contact__side { display: grid; align-content: start; align-self: start; gap: var(--space-4); position: sticky; top: 6rem; } /* stays beside the job sheet */
.contact__side .h1 { font-size: clamp(2.75rem, 1.6rem + 2.2vw, 3.75rem); }
.helps { margin: 0; padding-left: 1.2em; display: grid; gap: var(--space-2); font-size: 1.0625rem; }
.helps li::marker { color: var(--blue); }
/* the form is a job sheet: press-sheet surface, colour bar across its head, crop marks at its corners */
.jobsheet { position: relative; padding: 0 clamp(1.25rem, 0.5rem + 3vw, 3rem) clamp(2rem, 1rem + 3vw, 3.5rem); background: var(--grain), var(--sheet); }
.jobsheet__bar { margin-inline: calc(-1 * clamp(1.25rem, 0.5rem + 3vw, 3rem)); padding-inline: clamp(1.25rem, 0.5rem + 3vw, 3rem); margin-bottom: var(--space-5); border-bottom: 1px solid var(--rule); }
.jobsheet .field input, .jobsheet .field select, .jobsheet .field textarea { background: var(--stock); }
/* lib: form@v1 (restyled: Figtree 500 labels above, 2px ink borders all round, radius 0, blue focus ring) */
.form { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-5) var(--space-4); align-content: start; }
.field { display: grid; align-content: start; gap: var(--space-2); }
.field--full { grid-column: 1 / -1; }
.field > label { font: 500 1rem / 1.3 var(--font-body); }
.field .opt { color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 3rem; padding: 0.6rem 0.8rem; border: 2px solid var(--ink); border-radius: 0;
  background: var(--stock); color: var(--ink); font: 400 1.0625rem / 1.4 var(--font-body); appearance: none;
}
.field textarea { min-height: 10rem; resize: vertical; }
.select { position: relative; }
.select::after { content: ""; position: absolute; right: 1rem; top: 50%; width: 0.55rem; height: 0.55rem; pointer-events: none; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: translateY(-70%) rotate(45deg); }
.select select { padding-right: 2.5rem; cursor: pointer; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.field__hint { font-size: 0.9375rem; line-height: 1.45; color: var(--muted); }
.field__error { font-size: 0.9375rem; line-height: 1.45; font-weight: 700; color: var(--error); }
.field__warn { padding: 0.5rem 0.75rem; border-left: 4px solid var(--blue); background: color-mix(in srgb, var(--mint) 30%, var(--paper)); font-size: 0.9375rem; line-height: 1.45; }
.field [aria-invalid="true"] { border-color: var(--error); }
.form__summary { grid-column: 1 / -1; padding: var(--space-3) var(--space-4); border-left: 4px solid var(--error); color: var(--error); font-weight: 700; background: var(--stock); }
.form__foot { grid-column: 1 / -1; display: grid; gap: var(--space-3); justify-items: start; }
.form__hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.success { display: grid; gap: var(--space-4); align-content: start; }
.success .art { max-width: 40rem; }
.success h2:focus { outline: none; }
.success .h2 { max-width: 20ch; }

/* 19. 404 ------------------------------------------------------------------- */
.lost { display: grid; grid-template-columns: 5fr 7fr; gap: var(--gutter); align-items: center; padding-block: var(--space-section); min-height: 60svh; }
.lost .art { width: min(22rem, 100%); justify-self: center; }
.lost__text { display: grid; gap: var(--space-4); }

/* 20. View transitions ----------------------------------------------------- */
/* lib: view-transitions@v1. Pages cross-fade; the nav and wordmark hold still; a home tile's artwork
   flies into its place on the work page (names set at navigation time in site.js and the work page <head>). */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}
::view-transition-group(*) { animation-duration: var(--dur-2); animation-timing-function: var(--ease-in-out); }
::view-transition-group(art) { animation-duration: 620ms; }
::view-transition-old(art), ::view-transition-new(art) { height: 100%; object-fit: contain; }
::view-transition-old(root) { animation: 240ms var(--ease-in-out) both vt-out; }
::view-transition-new(root) { animation: 420ms var(--ease-out) 60ms both vt-in; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }

/* 21. Breakpoints ---------------------------------------------------------- */
@media (max-width: 64rem) {
  .sel__a1 { grid-column: 1 / -1; grid-row: auto; }
  .sel__a1 .tile__card { padding-inline: 12%; }
  .sel__a4 { grid-column: 1 / 7; grid-row: auto; }
  .sel__a2 { grid-column: 7 / -1; grid-row: auto; }
  .prices { padding-top: 0; }
  .prices::before { display: none; }
  .prices__in { grid-template-columns: minmax(0, 1fr); gap: var(--space-6); }
  .prices__left { margin-inline: calc(-1 * var(--gutter)); padding: var(--space-section) var(--gutter) var(--space-6); background: var(--grain), var(--mint); }
  .footer__top { grid-template-columns: 1fr 1fr; }
  .footer__mark { grid-column: 1 / -1; }
  .contact { grid-template-columns: 1fr; }
  .contact__side { position: static; }
}
@media (max-width: 52rem) and (scripting: enabled) {
  .nav__menu {
    position: absolute; top: 100%; left: 0; right: 0; padding: var(--space-3) var(--gutter) var(--space-5);
    background: var(--paper); border-bottom: 2px solid var(--ink);
    visibility: hidden; clip-path: inset(0 0 100% 0);
    transition: clip-path var(--dur-2) var(--ease-in-out), visibility 0s var(--dur-2);
  }
  .nav__menu.is-open { visibility: visible; clip-path: inset(0 0 -10px 0); transition-delay: 0s; }
  .nav__menu ul { flex-direction: column; align-items: stretch; gap: 0; }
  .nav__menu li { opacity: 0; transform: translateY(0.75rem); transition: opacity var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-out); }
  .nav__menu.is-open li { opacity: 1; transform: none; }
  .nav__menu.is-open li:nth-child(2) { transition-delay: var(--stagger); }
  .nav__menu.is-open li:nth-child(3) { transition-delay: calc(var(--stagger) * 2); }
  .nav__menu li:not(:last-child) { border-bottom: 1px solid var(--rule); }
  .nav__link { display: block; padding-block: 1rem; font: 400 2rem / 1.1 var(--font-display); color: var(--blue); }
  .nav__link::before, .nav__link::after { bottom: 0.6rem; right: auto; width: 2.5rem; }
  .nav__menu .btn { margin-top: var(--space-4); width: 100%; }
  .nav__toggle { display: grid; }
}
@media (max-width: 52rem) and (scripting: none) {
  .nav__in { flex-wrap: wrap; padding-block: var(--space-2); }
  .nav__menu { flex: 1 0 100%; }
}
@media (max-width: 47.99rem) {
  .demo-bar__long { display: none; }
  .marks::after { --g: 12px; --m: 8px; } /* crop marks stay inside a 16px gutter */
  .demo-bar__short { display: inline; }
  .nav__in { min-height: 3.75rem; }
  .hero { grid-template-columns: var(--gutter) minmax(0, 1fr) var(--gutter); padding-top: 0; min-height: 0; }
  .hero__art { grid-column: 1 / -1; grid-row: 1; aspect-ratio: 5 / 4; }
  .hero__art img { height: 100%; object-fit: cover; object-position: 30% 60%; }
  .hero__text { grid-column: 2; grid-row: 2; padding: var(--space-4) 0 0; gap: var(--space-3); }
  .hero .h1 { font-size: clamp(2.25rem, 1.2rem + 4.6vw, 2.75rem); }
  .lede { font-size: 1.0625rem; }
  .sel__grid { grid-template-columns: minmax(0, 1fr); }
  .sel__a1, .sel__a4, .sel__a2 { grid-column: 1; }
  .sel__a1 .tile__card { padding-inline: var(--space-4); }
  .proofs { grid-auto-columns: 78%; }
  .review__in { grid-template-columns: minmax(0, 1fr); row-gap: var(--space-5); }
  .review__fig, .review__shelf { grid-column: 1; }
  .review__shelf { padding-top: 0; justify-self: center; width: min(22rem, 100%); }
  .review__fig blockquote p { max-width: none; font-size: 1.35rem; line-height: 1.3; letter-spacing: -0.02em; } /* three lines at 390 */
  .close__in { grid-template-columns: 1fr; }
  .footer__top { grid-template-columns: 1fr; gap: var(--space-4); }
  .works { grid-template-columns: minmax(0, 1fr); }
  .piece, .piece--7, .piece--5 { grid-column: 1 / -1; }
  .piece--split { grid-template-columns: minmax(0, 1fr); row-gap: var(--space-4); }
  .piece--wide:not(.piece--split) .facts { grid-template-columns: 1fr; gap: var(--space-3); }
  .fan--wide { aspect-ratio: 1160 / 1610; }
  .fan--wide .art { width: 58%; }
  .fan--wide .art:nth-child(1) { left: 2%; top: 1.5%; }
  .fan--wide .art:nth-child(2) { left: 20%; top: 21%; }
  .fan--wide .art:nth-child(3) { left: 39%; top: 42%; }
  .form { grid-template-columns: minmax(0, 1fr); }
  .lost { grid-template-columns: 1fr; }
  .step { grid-template-columns: 4.5rem minmax(0, 1fr); gap: var(--space-3); }
}
@media (max-width: 22.5rem) {
  .review__fig blockquote p { letter-spacing: -0.01em; } /* four lines here anyway (accepted); open the counters */
  .nav__brand { font-size: 1.0625rem; }
}

/* 22. Reduced motion: everything rests, nothing travels ------------------- */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; }
}
