/* =============================================================
   Silk & Steel — stylesheet

   Two committed fields:
     · LEATHER  — header, hero, the house, paying, checkout, footer
     · PARCHMENT — the catalogue, the product sheet
   One accent (brass). Oxblood is reserved for the primary action.

   Colour, type and spacing are all tokens. Components read from
   field-scoped variables (--bg / --fg / --rule) so the same card,
   panel or button works on either field without a variant class.
   ============================================================= */

/* ---------------------------------------------------------------
   1. TOKENS
   --------------------------------------------------------------- */
:root {
  /* -- leather field -- */
  --pitch:        #0C0908;
  --pitch-2:      #100B0A;
  --deep:         #070505;
  --leather:      #171110;
  --leather-lift: #201814;

  /* -- parchment field -- */
  --parchment:    #E7DFD2;
  --parchment-2:  #EFE8DC;
  --plate:        #F4EFE6;

  /* -- ink (on parchment) -- */
  --ink:          #191310;
  --ink-2:        #574A40;
  --ink-3:        #857767;

  /* -- bone (on leather) -- */
  --bone:         #EFE8DC;
  --bone-2:       #A2968A;
  --bone-3:       #6E635A;

  /* -- accent -- */
  --brass:        #A67C3D;
  --brass-lit:    #C99E56;
  --brass-deep:   #6F5426;
  --oxblood:      #6E1B26;
  --oxblood-lit:  #8C2735;

  /* legacy aliases — kept so nothing referencing the old names breaks */
  --bone-dim: var(--bone-2);
  --bone-faint: var(--bone-3);
  --line: rgba(239,232,220,.11);
  --card: var(--leather);
  --card-lift: var(--leather-lift);
  --ok: var(--brass-lit);

  /* -- type -- */
  --display: "Bodoni Moda", "Didot", "Playfair Display", Georgia, serif;
  --sans: "Instrument Sans", ui-sans-serif, system-ui, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --t-hero:  clamp(3rem, 9.2vw, 7rem);
  --t-h2:    clamp(2.15rem, 5.6vw, 4.15rem);
  --t-h3:    clamp(1.24rem, 1.1rem + 0.7vw, 1.7rem);
  --t-lede:  clamp(1.02rem, .97rem + .3vw, 1.22rem);
  --t-sm:    .875rem;
  --t-xs:    .795rem;
  --t-label: .675rem;

  /* -- space -- */
  --gut:  clamp(1.15rem, 4vw, 3.75rem);
  --maxw: 1340px;
  --sec-y: clamp(4.25rem, 10vw, 9rem);
  --hdr-h: 4.35rem;

  /* -- form -- */
  --r-s: 2px;
  --r-m: 3px;
  --r-l: 5px;

  /* -- motion -- */
  --out:    cubic-bezier(.23, 1, .32, 1);
  --io:     cubic-bezier(.77, 0, .175, 1);
  --drawer: cubic-bezier(.32, .72, 0, 1);

  /* -- elevation, warm-tinted -- */
  --sh-paper:  0 1px 2px rgba(74,55,38,.08), 0 10px 26px -14px rgba(74,55,38,.26);
  --sh-lift:   0 2px 5px rgba(74,55,38,.10), 0 26px 52px -20px rgba(74,55,38,.38);
  --sh-dark:   0 2px 4px rgba(0,0,0,.5), 0 30px 70px -34px rgba(0,0,0,.95);

  /* -- z scale -- */
  --z-grain: 90;
  --z-hdr: 60;
  --z-drawer: 130;
  --z-modal: 140;
  --z-gate: 200;

  /* default field = leather */
  --bg: var(--pitch);
  --surface: var(--leather);
  --surface-2: var(--leather-lift);
  --fg: var(--bone);
  --fg-2: var(--bone-2);
  --fg-3: var(--bone-3);
  --rule: rgba(239,232,220,.12);
  --rule-2: rgba(239,232,220,.055);
  --mark: rgba(239,232,220,.3);
  --accent: var(--brass);
  --shadow: var(--sh-dark);
}

/* Field scoping. Anything nested inherits the right palette. */
.field--paper,
.modal__panel {
  --bg: var(--parchment);
  --surface: var(--plate);
  --surface-2: var(--parchment-2);
  --fg: var(--ink);
  --fg-2: var(--ink-2);
  --fg-3: var(--ink-3);
  --rule: rgba(25,19,16,.16);
  --rule-2: rgba(25,19,16,.075);
  --mark: rgba(25,19,16,.34);
  --accent: var(--brass-deep);
  --shadow: var(--sh-paper);
}
.field--leather { --bg: var(--pitch); }
.field--deep    { --bg: var(--deep); }

/* ---------------------------------------------------------------
   2. RESET / BASE
   --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--hdr-h) + 1rem);
}

body {
  margin: 0;
  background: var(--pitch);
  color: var(--bone);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.62;
  font-feature-settings: "kern" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
/* No overflow clamp on body: it propagates to the viewport and breaks
   scrolling and sticky. The one thing that can bleed sideways is the
   rotated hero stack, and .hero clips that itself. */
body.is-locked { overflow: hidden; }

img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }
h1, h2, h3, h4, p, ul, ol, dl, dd, dt, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
p { text-wrap: pretty; }
a { color: inherit; }

/* Numerals are always tabular and monospaced. Nothing else is. */
.price, .mono, .ref, .plate__no, .amt, code,
input, textarea { font-variant-numeric: tabular-nums; }

:focus-visible {
  outline: 2px solid var(--brass-lit);
  outline-offset: 3px;
  border-radius: 1px;
}
.field--paper :focus-visible,
.modal__panel :focus-visible { outline-color: var(--brass-deep); }

::selection { background: var(--brass); color: #100B0A; }

.shell { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gut); }

.skip {
  position: fixed; top: .6rem; left: .6rem; z-index: 300;
  transform: translateY(-160%);
  background: var(--bone); color: var(--pitch);
  padding: .7rem 1.1rem; border-radius: var(--r-m);
  font-size: var(--t-xs); font-weight: 500; text-decoration: none;
  transition: transform .22s var(--out);
}
.skip:focus-visible { transform: none; }

/* Paper grain. Fixed layer, never attached to scrolling content. */
.grain {
  position: fixed; inset: 0; z-index: var(--z-grain);
  pointer-events: none; opacity: .5; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.42'/%3E%3C/svg%3E");
}

/* ---------------------------------------------------------------
   3. TYPE PRIMITIVES
   --------------------------------------------------------------- */

/* Small tracked caps. Sans, not mono — mono is reserved for numerals. */
.label {
  font-family: var(--sans);
  font-size: var(--t-label);
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin: 0;
}
.label--brass { color: var(--brass); }
.field--paper .label--brass { color: var(--brass-deep); }

/* Display faces drive Bodoni's optical size axis explicitly — hairlines
   go genuinely thin at hero scale and thicken back up at caption scale. */
.hero h1,
.sec__title,
.gate__mark {
  font-family: var(--display);
  font-weight: 400;
  font-optical-sizing: none;
  font-variation-settings: "opsz" 96;
  letter-spacing: -.022em;
  line-height: .98;
  text-wrap: balance;
}
.card__name,
.panel__h,
.ledger__h,
.step__h,
.drawer__title,
.line__name,
.modal__name {
  font-family: var(--display);
  font-weight: 400;
  font-optical-sizing: none;
  font-variation-settings: "opsz" 16;
  letter-spacing: -.005em;
}

.hero h1 { font-size: var(--t-hero); }
.hero h1 em { font-style: italic; color: var(--brass); }

.sec__title { font-size: var(--t-h2); }

/* ---------------------------------------------------------------
   4. BUTTONS
   --------------------------------------------------------------- */
.btn {
  position: relative;
  display: inline-flex; align-items: center; gap: .8rem;
  padding: .78rem .85rem .78rem 1.45rem;
  border: 1px solid transparent;
  border-radius: var(--r-m);
  font-size: var(--t-xs);
  font-weight: 500;
  letter-spacing: .035em;
  text-decoration: none;
  color: var(--bone);
  background: var(--oxblood);
  transition:
    background-color .24s var(--out),
    border-color .24s var(--out),
    color .24s var(--out),
    transform .16s var(--out),
    box-shadow .24s var(--out);
}
.btn > span { white-space: nowrap; }

.btn__chev {
  flex: none;
  width: 1.6rem; height: 1.6rem;
  border-radius: 50%;
  background: rgba(255,255,255,.13);
  display: grid; place-items: center;
  transition: transform .32s var(--out), background-color .24s var(--out);
}
.btn__chev::before {
  content: "";
  width: .34rem; height: .34rem;
  border-right: 1.25px solid currentColor;
  border-top: 1.25px solid currentColor;
  transform: rotate(45deg) translate(-.5px, .5px);
}

.btn--primary { box-shadow: 0 1px 0 rgba(255,255,255,.07) inset; }
.btn:active { transform: scale(.978); }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }

.btn--quiet {
  background: transparent;
  border-color: var(--rule);
  color: var(--fg);
  padding: .78rem 1.45rem;
}

.btn--wide { width: 100%; justify-content: space-between; }
/* no trailing chevron to push against, so the label centres */
.btn--quiet.btn--wide { justify-content: center; }

.field--paper .btn--quiet,
.modal__panel .btn--quiet { color: var(--ink); }

@media (hover: hover) and (pointer: fine) {
  .btn--primary:hover { background: var(--oxblood-lit); }
  .btn--primary:hover .btn__chev {
    background: rgba(255,255,255,.2);
    transform: translate(2px, -2px);
  }
  .btn--quiet:hover { border-color: var(--accent); background: color-mix(in srgb, var(--fg) 6%, transparent); }
}

.iconbtn {
  width: 2.3rem; height: 2.3rem; flex: none;
  border: 1px solid var(--rule); border-radius: 50%;
  display: grid; place-items: center;
  color: var(--fg-2);
  transition: color .2s var(--out), border-color .2s var(--out), transform .16s var(--out);
}
.iconbtn svg { width: .82rem; height: .82rem; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; }
.iconbtn:hover { color: var(--fg); border-color: var(--accent); }
.iconbtn:active { transform: scale(.94); }

/* ---------------------------------------------------------------
   5. SCROLL REVEAL
   --------------------------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity .78s var(--out),
    transform .78s var(--out);
  transition-delay: calc(var(--i, 0) * 65ms);
}
[data-reveal][data-in] { opacity: 1; transform: none; }

/* ---------------------------------------------------------------
   6. AGE GATE
   --------------------------------------------------------------- */
.gate {
  position: fixed; inset: 0; z-index: var(--z-gate);
  background:
    radial-gradient(ellipse 120% 90% at 50% 0%, #150E0C, transparent 70%),
    var(--pitch);
  display: grid; place-items: center;
  padding: var(--gut);
}
.gate__inner { max-width: 32rem; text-align: center; }
.gate__mark {
  font-size: clamp(2.4rem, 8vw, 3.9rem);
  margin: .8rem 0 0;
}
.gate__rule {
  display: flex; align-items: center; justify-content: center; gap: .8rem;
  margin: 1.7rem auto 1.9rem; width: 9rem;
}
.gate__rule span { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--brass-deep)); }
.gate__rule span:last-child { background: linear-gradient(90deg, var(--brass-deep), transparent); }
.gate__rule i {
  width: 5px; height: 5px; border: 1px solid var(--brass);
  transform: rotate(45deg); flex: none;
}
.gate__copy {
  color: var(--bone-2); font-size: var(--t-sm);
  max-width: 34ch; margin: 0 auto 2.1rem; text-wrap: balance;
}
.gate__row { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; }
.gate__deny {
  border: 1px solid var(--rule); border-radius: var(--r-m);
  color: var(--bone-3); padding: .78rem 1.45rem;
  font-size: var(--t-xs); letter-spacing: .035em;
  transition: color .2s var(--out), border-color .2s var(--out), transform .16s var(--out);
}
.gate__deny:hover { color: var(--bone); border-color: var(--bone-3); }
.gate__deny:active { transform: scale(.978); }

/* ---------------------------------------------------------------
   7. HEADER
   --------------------------------------------------------------- */
.hdr {
  position: sticky; top: 0; z-index: var(--z-hdr);
  background: color-mix(in srgb, var(--pitch) 82%, transparent);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid rgba(239,232,220,.07);
}
.hdr__bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.25rem; height: var(--hdr-h);
}
.brand {
  font-family: var(--display);
  font-optical-sizing: none;
  font-variation-settings: "opsz" 28;
  font-size: 1.42rem;
  letter-spacing: .002em;
  text-decoration: none; color: var(--bone);
  white-space: nowrap;
}
.brand em { font-style: italic; color: var(--brass); }
.brand--ftr { font-size: 1.5rem; display: block; margin-bottom: .85rem; }

.hdr__nav { display: flex; gap: 2rem; }
.hdr__nav a {
  position: relative;
  color: var(--bone-2); text-decoration: none;
  font-size: var(--t-label); font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase;
  transition: color .22s var(--out);
}
.hdr__nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -.45rem;
  height: 1px; background: var(--brass);
  transform: scaleX(0); transform-origin: left;
  transition: transform .38s var(--out);
}
.hdr__nav a:hover { color: var(--bone); }
.hdr__nav a:hover::after { transform: scaleX(1); }

.cartbtn {
  border: 1px solid var(--rule); border-radius: var(--r-m);
  padding: .52rem .58rem .52rem 1rem;
  font-size: var(--t-label); font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--bone-2);
  display: inline-flex; align-items: center; gap: .7rem;
  transition: border-color .22s var(--out), color .22s var(--out), transform .16s var(--out);
}
.cartbtn:hover { border-color: var(--brass-deep); color: var(--bone); }
.cartbtn:active { transform: scale(.97); }
.cartbtn__n {
  font-family: var(--mono); font-size: .7rem; font-weight: 500;
  background: var(--oxblood); color: var(--bone);
  min-width: 1.4rem; height: 1.4rem; border-radius: 50%;
  display: grid; place-items: center; letter-spacing: 0;
}
.cartbtn__n[data-empty="true"] { background: rgba(239,232,220,.09); color: var(--bone-3); }

/* ---------------------------------------------------------------
   8. HERO
   --------------------------------------------------------------- */
.hero {
  position: relative;
  padding: clamp(3.5rem, 11vh, 7.5rem) 0 clamp(2.5rem, 6vh, 4rem);
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 70% at 88% 8%, rgba(110,27,38,.22), transparent 62%),
    radial-gradient(ellipse 60% 55% at 4% 96%, rgba(166,124,61,.10), transparent 64%),
    var(--pitch);
}
.hero__grid {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr);
  gap: clamp(2.5rem, 6vw, 5.5rem); align-items: center;
}
.hero__copy > * + * { margin-top: 1.5rem; }
.hero__lede {
  color: var(--bone-2); font-size: var(--t-lede);
  max-width: 38ch; line-height: 1.58;
}
.hero__cta { display: flex; gap: .7rem; flex-wrap: wrap; margin-top: 2.2rem; }

/* The stack of specimen plates — a preview of the catalogue system,
   dropped on the desk. Populated by app.js. */
.hero__stack {
  position: relative;
  aspect-ratio: 1 / .92;
  max-width: 30rem; width: 100%; margin-left: auto;
}
.hero__plate {
  position: absolute;
  width: 60%;
  background: var(--plate);
  border-radius: var(--r-m);
  box-shadow: var(--sh-dark);
  padding: 6%;
  transition: transform .9s var(--out);
  will-change: transform;
}
.hero__plate::after {
  content: ""; position: absolute; inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(25,19,16,.1), inset 0 1px 0 rgba(255,255,255,.7);
  pointer-events: none;
}
.hero__plate svg { width: 100%; height: auto; color: var(--ink); overflow: visible; }
/* the stack carries the same plate furniture as the catalogue, so the
   hero is a genuine preview of the system rather than a stand-in */
.hero__plate { --mark: rgba(25,19,16,.3); }
.hero__plate .plate__no {
  top: .7rem; left: .8rem; font-size: .5rem; color: var(--ink-3); z-index: 2;
}
.hero__plate .plate__marks { inset: 8px; opacity: .75; }
.hero__plate:nth-child(1) { left: 0;    top: 6%;  transform: rotate(-6.5deg); z-index: 1; }
.hero__plate:nth-child(2) { left: 20%;  top: 30%; transform: rotate(2.5deg);  z-index: 3; width: 64%; }
.hero__plate:nth-child(3) { right: 0;   top: 2%;  transform: rotate(7deg);    z-index: 2; }
@media (hover: hover) and (pointer: fine) {
  .hero:hover .hero__plate:nth-child(1) { transform: rotate(-8.5deg) translate(-3%, -2%); }
  .hero:hover .hero__plate:nth-child(2) { transform: rotate(1.5deg) translateY(-3%); }
  .hero:hover .hero__plate:nth-child(3) { transform: rotate(9deg) translate(3%, -2%); }
}

/* Facts strip */
.facts {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--rule);
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
}
.fact { padding: 1.5rem 1.75rem 0 0; }
.fact + .fact { border-left: 1px solid var(--rule-2); padding-left: 1.75rem; }
.fact dt {
  font-size: var(--t-label); font-weight: 600;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--brass); margin-bottom: .55rem;
}
.fact dd { font-size: var(--t-sm); color: var(--bone-2); max-width: 26ch; }

/* ---------------------------------------------------------------
   9. FIELDS + SECTION HEADS
   --------------------------------------------------------------- */
.field { background: var(--bg); color: var(--fg); position: relative; }
.field--paper {
  padding: var(--sec-y) 0 calc(var(--sec-y) + 1rem);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5), inset 0 -1px 0 rgba(25,19,16,.15);
}
.sec { padding: var(--sec-y) 0; }

.sec__head {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: clamp(1.75rem, 5vw, 4.5rem);
  align-items: end;
  padding-bottom: clamp(2.25rem, 5vw, 3.75rem);
  margin-bottom: clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--rule-2);
}
.sec__head--tight { margin-bottom: 2rem; }
.sec__headL .label { margin-bottom: 1.1rem; }
.sec__note { color: var(--fg-2); font-size: var(--t-sm); max-width: 44ch; line-height: 1.6; }
.sec__rate {
  font-family: var(--mono); font-size: var(--t-label);
  letter-spacing: .06em; color: var(--fg-3); margin-top: .9rem;
}

/* ---------------------------------------------------------------
   10. FILTER BAR
   --------------------------------------------------------------- */
.filterbar {
  position: sticky; top: var(--hdr-h); z-index: 20;
  background: color-mix(in srgb, var(--parchment) 88%, transparent);
  backdrop-filter: blur(14px) saturate(130%);
  -webkit-backdrop-filter: blur(14px) saturate(130%);
  border-top: 1px solid var(--rule-2);
  border-bottom: 1px solid var(--rule-2);
  margin-bottom: clamp(2rem, 4vw, 3.25rem);
}
.filterbar__in {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1.5rem; padding-block: .8rem;
}
/* Ten categories do not fit one desktop row, so they wrap rather than
   scroll out of reach. Below 700px they scroll instead, because two or
   three wrapped rows would swallow a phone screen. */
.filters {
  display: flex; gap: .3rem; flex-wrap: wrap;
  margin: -.35rem 0; padding: .35rem 0;
}
.chip {
  position: relative; white-space: nowrap;
  border: 1px solid transparent; border-radius: 100px;
  padding: .42rem .95rem;
  font-size: var(--t-label); font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-3);
  transition:
    color .22s var(--out), background-color .28s var(--out),
    border-color .22s var(--out), transform .16s var(--out);
}
.chip:hover { color: var(--ink); border-color: var(--rule); }
.chip[aria-pressed="true"] {
  background: var(--ink); color: var(--parchment-2); border-color: var(--ink);
}
.chip:active { transform: scale(.97); }
.filterbar__count {
  font-family: var(--mono); font-size: var(--t-label);
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-3); white-space: nowrap;
  /* sits on the baseline of the first chip row, not the middle of a
     wrapped block */
  padding-top: .78rem;
}

/* ---------------------------------------------------------------
   11. THE SPECIMEN PLATE + PRODUCT CARD
   --------------------------------------------------------------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  column-gap: clamp(1rem, 2vw, 2rem);
  row-gap: clamp(2.4rem, 4vw, 3.6rem);
}

.card {
  position: relative; isolation: isolate;
  display: flex; flex-direction: column;
  text-align: left;
}

/* -- the plate -- */
.card__plate {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--plate);
  border-radius: var(--r-m);
  box-shadow: var(--sh-paper);
  overflow: hidden;
  transition: box-shadow .5s var(--out), transform .5s var(--out);
}
/* inner bevel: a hairline and a top highlight, as on a printed card */
.card__plate::after {
  content: ""; position: absolute; inset: 0; z-index: 4;
  border-radius: inherit; pointer-events: none;
  box-shadow:
    inset 0 0 0 1px rgba(25,19,16,.09),
    inset 0 1px 0 rgba(255,255,255,.75);
}
/* printer's crop marks, drawn as eight hairline segments */
.plate__marks {
  position: absolute; inset: 11px; z-index: 3;
  pointer-events: none;
  transform-origin: center;
  transition: transform .55s var(--out), opacity .4s var(--out);
  opacity: .8;
  background-repeat: no-repeat;
  background-image:
    linear-gradient(var(--mark), var(--mark)), linear-gradient(var(--mark), var(--mark)),
    linear-gradient(var(--mark), var(--mark)), linear-gradient(var(--mark), var(--mark)),
    linear-gradient(var(--mark), var(--mark)), linear-gradient(var(--mark), var(--mark)),
    linear-gradient(var(--mark), var(--mark)), linear-gradient(var(--mark), var(--mark));
  background-size:
    11px 1px, 1px 11px,
    11px 1px, 1px 11px,
    11px 1px, 1px 11px,
    11px 1px, 1px 11px;
  background-position:
    0 0, 0 0,
    100% 0, 100% 0,
    0 100%, 0 100%,
    100% 100%, 100% 100%;
}
.plate__art {
  position: absolute; inset: 0; z-index: 1;
  display: grid; place-items: center;
  /* Definite row, so a single <img> can resolve height:100% and let
     object-fit crop from the centre. Without it the auto row makes the
     height indefinite, the image falls back to its intrinsic ratio and
     overflows top-anchored — clipped off the bottom instead. */
  grid-template-rows: 100%;
  transition: transform .6s var(--out);
}
.plate__art svg {
  width: 88%; height: auto;
  color: var(--ink);
  overflow: visible;
}
.plate__art img { width: 100%; height: 100%; object-fit: cover; }

/* Two-weight ink. The drawings carry no inline stroke widths, so the
   whole library re-weights from these six rules — and the same rules
   serve the card, the product sheet, the bag and the hero stack. */
svg .h { stroke-width: 2.1; }
svg .f { stroke-width: .95; }
svg .x { stroke-width: .6; opacity: .42; }
svg .g { stroke-width: .8; opacity: .3; }
svg .t { fill: rgba(25,19,16,.07); stroke: none; }
svg .s {
  fill: rgba(25,19,16,.14); stroke: none;
  transform-box: fill-box; transform-origin: center;
  transition: transform .6s var(--out), opacity .6s var(--out);
}

/* plate furniture */
.plate__no,
.plate__cat {
  position: absolute; z-index: 5;
  pointer-events: none;
  font-family: var(--mono);
  font-size: .58rem; letter-spacing: .13em;
  color: var(--ink-3);
  text-transform: uppercase;
}
.plate__no { top: .95rem; left: 1.05rem; }
.plate__cat {
  bottom: .9rem; left: 1.05rem; right: 1.05rem;
  font-family: var(--sans); font-weight: 500;
  font-size: .58rem; letter-spacing: .18em;
  color: var(--ink-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.plate__tag {
  position: absolute; z-index: 5;
  pointer-events: none;
  top: .7rem; right: .7rem;
  font-family: var(--sans); font-weight: 600;
  font-size: .56rem; letter-spacing: .14em; text-transform: uppercase;
  /* solid chip — legible over any photograph or drawing */
  color: var(--bone);
  background: rgba(12,9,8,.86);
  border: none;
  padding: .32rem .5rem;
  border-radius: 2px;
}

/* photographs get a scrim so the plate furniture stays legible */
.card__plate--photo .plate__no,
.card__plate--photo .plate__cat { color: rgba(244,239,230,.86); }
.card__plate--photo { --mark: rgba(244,239,230,.5); }
.card__plate--photo .plate__art::after {
  content: ""; position: absolute; inset: 0; z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(12,9,8,.42) 0%, transparent 26%),
    linear-gradient(0deg, rgba(12,9,8,.42) 0%, transparent 24%);
}

/* -- the meta block -- */
.card__meta {
  position: relative;
  padding: 1.05rem .1rem 0; display: flex; flex-direction: column; flex: 1;
}
.card__name {
  font-size: 1.14rem; line-height: 1.28;
  position: relative; display: inline; padding-bottom: 2px;
  background-image: linear-gradient(var(--ink), var(--ink));
  background-size: 0% 1px; background-position: 0 100%; background-repeat: no-repeat;
  transition: background-size .5s var(--out);
}
.card__blurb {
  font-size: var(--t-xs); color: var(--ink-2);
  line-height: 1.55; margin-top: .4rem; flex: 1;
  max-width: 34ch;
}
.card__foot {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1rem; margin-top: 1rem;
  padding-top: .85rem; border-top: 1px solid var(--rule-2);
}
.price {
  font-family: var(--mono); font-size: .95rem; font-weight: 500;
  letter-spacing: -.01em; color: var(--fg);
}
.price__btc {
  display: block; font-size: .655rem; font-weight: 400;
  letter-spacing: .04em; color: var(--fg-3); margin-top: .2rem;
}
.card__cta {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: var(--t-label); font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--brass-deep);
  padding: .2rem 0;
  transition: color .22s var(--out), gap .3s var(--out);
}
.card__cta::before {
  /* Hit area for the meta block, so the accessible name lives on one
     control. It deliberately stops short of the plate: anything laid
     over the photograph would swallow a swipe. The plate carries its
     own click handler instead. */
  content: ""; position: absolute; inset: 0; z-index: 6;
}
.card__cta i {
  width: .62rem; height: 1px; background: currentColor;
  position: relative; display: block;
  transition: transform .35s var(--out);
}
.card__cta i::after {
  content: ""; position: absolute; right: 0; top: 0;
  width: .3rem; height: .3rem;
  border-right: 1px solid currentColor; border-top: 1px solid currentColor;
  transform: rotate(45deg) translate(-.5px, .5px); transform-origin: right top;
}

@media (hover: hover) and (pointer: fine) {
  .card:hover .card__plate { box-shadow: var(--sh-lift); }
  .card:hover .plate__marks { transform: scale(1.045); opacity: .9; }
  .card:hover .plate__art { transform: translateY(-5px); }
  .card:hover .plate__art .s { transform: scale(1.09); opacity: .55; }
  .card:hover .card__name { background-size: 100% 1px; }
  .card:hover .card__cta { color: var(--ink); }
  .card:hover .card__cta i { transform: translateX(3px); }
  .card:hover .card__plate--photo .plate__art { transform: translateY(0) scale(1.035); }
}
.card:has(.card__cta:focus-visible) .card__plate { outline: 2px solid var(--brass-deep); outline-offset: 4px; }
.card:has(.card__cta:focus-visible) .card__cta { outline: none; }
.card:active .card__plate { transform: scale(.992); }

.card--out .card__plate { filter: grayscale(1); opacity: .58; }
.card--out .card__name,
.card--out .card__blurb,
.card--out .price { opacity: .55; }
.card--out .card__cta { color: var(--ink-3); }

/* ---------------------------------------------------------------
   12. THE HOUSE — numbered ledger
   --------------------------------------------------------------- */
.ledger { display: grid; grid-template-columns: 1fr 1fr; gap: 0 clamp(2rem, 5vw, 5rem); }
.ledger__row {
  display: grid; grid-template-columns: 3.25rem 1fr;
  gap: 0 1.5rem;
  padding: 2rem 0;
  border-top: 1px solid var(--rule-2);
}
.ledger__row:nth-child(-n+2) { border-top: none; padding-top: 0; }
.ledger__no {
  font-family: var(--mono); font-size: var(--t-label); font-weight: 500;
  letter-spacing: .1em; color: var(--brass);
  padding-top: .45rem;
}
.ledger__h { font-size: var(--t-h3); line-height: 1.2; }
.ledger__p {
  grid-column: 2; margin-top: .7rem;
  color: var(--fg-2); font-size: var(--t-sm); line-height: 1.66;
  max-width: 46ch;
}

/* ---------------------------------------------------------------
   13. PAYING — three steps
   --------------------------------------------------------------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--rule-2); }
.step { background: var(--bg); padding: 2.25rem clamp(1.25rem, 2.5vw, 2.25rem) 2rem; }
.step:first-child { padding-left: 0; }
.step:last-child { padding-right: 0; }
.step__no {
  font-family: var(--display); font-style: italic;
  font-optical-sizing: none; font-variation-settings: "opsz" 40;
  font-size: 2.1rem; line-height: 1; color: var(--brass);
  display: block; margin-bottom: 1.1rem;
}
.step__h { font-size: var(--t-h3); line-height: 1.22; }
.step__p { margin-top: .8rem; color: var(--fg-2); font-size: var(--t-sm); line-height: 1.66; }

/* ---------------------------------------------------------------
   14. PRODUCT SHEET (modal)
   --------------------------------------------------------------- */
.modal {
  position: fixed; inset: 0; z-index: var(--z-modal);
  display: none; place-items: center;
  padding: clamp(.75rem, 3vw, 2.5rem);
}
.modal[data-open="true"] { display: grid; }
.modal__scrim {
  position: absolute; inset: 0;
  background: rgba(7,5,5,.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fade .28s var(--out);
}
.modal__panel {
  position: relative;
  background: var(--parchment);
  color: var(--ink);
  border-radius: var(--r-l);
  max-width: 60rem; width: 100%;
  max-height: min(88vh, 46rem); overflow-y: auto;
  display: grid; grid-template-columns: 1.02fr 1fr;
  box-shadow: 0 40px 90px -30px rgba(0,0,0,.85);
  animation: sheetIn .34s var(--out);
}
@keyframes fade { from { opacity: 0 } }
@keyframes sheetIn { from { opacity: 0; transform: scale(.965) translateY(10px) } }

.sheet__media {
  position: relative;
  padding: 0;
  background: var(--plate);
  display: grid; place-items: stretch;
  border-right: 1px solid var(--rule-2);
}
.sheet__plate {
  position: relative; width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--plate);
  border-radius: 0;
  overflow: hidden;
}
.sheet__body { padding: clamp(1.5rem, 3vw, 2.75rem); }
.sheet__body .label { margin-bottom: .9rem; }
.modal__name { font-size: clamp(1.65rem, 3.2vw, 2.35rem); line-height: 1.08; margin-bottom: 1rem; }
.modal__desc { color: var(--ink-2); font-size: var(--t-sm); line-height: 1.68; max-width: 46ch; }
.modal__note {
  border-left: 2px solid var(--brass-deep);
  background: rgba(166,124,61,.1);
  padding: .75rem 1rem; border-radius: 0 var(--r-s) var(--r-s) 0;
  font-size: var(--t-xs); color: var(--ink-2); margin: 1.25rem 0;
}
.modal__price {
  font-family: var(--mono); font-size: 1.75rem; font-weight: 500;
  letter-spacing: -.02em;
  margin: 1.6rem 0 0; padding-top: 1.4rem;
  border-top: 1px solid var(--rule-2);
}
.modal__price .price__btc { font-size: .7rem; margin-top: .4rem; letter-spacing: .05em; }
.modal__opts { margin: 1.4rem 0; display: grid; gap: .9rem; }
.modal__cta { margin-top: 1.4rem; }
.modal__close {
  position: absolute; top: 1rem; right: 1rem; z-index: 8;
  width: 2.3rem; height: 2.3rem;
  background: var(--plate);
  border: 1px solid var(--rule); border-radius: 50%;
  display: grid; place-items: center; color: var(--ink-2);
  transition: color .2s var(--out), border-color .2s var(--out), transform .16s var(--out);
}
.modal__close svg { width: .82rem; height: .82rem; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; }
.modal__close:hover { color: var(--ink); border-color: var(--brass-deep); }
.modal__close:active { transform: scale(.94); }

/* ---------------------------------------------------------------
   15. FORM FIELDS
   --------------------------------------------------------------- */
.field-r { display: grid; gap: .42rem; }
.field-r label {
  font-size: var(--t-label); font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; color: var(--fg-3);
}
.field-r input,
.field-r textarea {
  background: color-mix(in srgb, var(--fg) 4%, transparent);
  border: 1px solid var(--rule);
  color: var(--fg);
  padding: .72rem .85rem;
  border-radius: var(--r-s);
  font-family: var(--sans); font-size: .92rem;
  width: 100%;
  transition: border-color .22s var(--out), background-color .22s var(--out);
}
.field-r input::placeholder,
.field-r textarea::placeholder { color: var(--fg-3); opacity: .8; }
.field-r input:hover,
.field-r textarea:hover { border-color: color-mix(in srgb, var(--fg) 26%, transparent); }
.field-r input:focus,
.field-r textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: color-mix(in srgb, var(--fg) 7%, transparent);
}
.field-r input[data-invalid],
.field-r textarea[data-invalid] { border-color: var(--oxblood-lit); }
.field-r textarea { resize: vertical; min-height: 5rem; }

.formgrid { display: grid; gap: 1.05rem; }
.formgrid--2 { grid-template-columns: 1fr 1fr; }

.formerror {
  color: var(--oxblood-lit); font-size: var(--t-xs);
  min-height: 1.3em; margin: 1rem 0 .5rem;
}
.microcopy {
  font-size: .72rem; color: var(--fg-3);
  margin-top: 1rem; text-align: center;
}

/* ---------------------------------------------------------------
   16. CART DRAWER
   --------------------------------------------------------------- */
.drawer { position: fixed; inset: 0; z-index: var(--z-drawer); display: none; }
.drawer[data-open="true"] { display: block; }
.drawer__scrim {
  position: absolute; inset: 0;
  background: rgba(7,5,5,.7);
  backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
  animation: fade .3s var(--out);
}
.drawer__panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(28rem, 100%);
  background: var(--pitch-2);
  border-left: 1px solid var(--rule);
  display: flex; flex-direction: column;
  box-shadow: -30px 0 70px -30px rgba(0,0,0,.9);
  animation: slideIn .42s var(--drawer);
}
@keyframes slideIn { from { transform: translateX(100%) } }

.drawer__head {
  padding: 1.15rem var(--gut);
  border-bottom: 1px solid var(--rule-2);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: var(--hdr-h);
}
.drawer__title { font-size: 1.35rem; }
.drawer__items { flex: 1; overflow-y: auto; padding: 0 var(--gut); }
.drawer__foot { padding: 1.3rem var(--gut) 1.5rem; border-top: 1px solid var(--rule-2); }

.line {
  display: grid; grid-template-columns: 4rem 1fr auto;
  gap: 1rem; padding: 1.15rem 0;
  border-bottom: 1px solid var(--rule-2);
  animation: lineIn .4s var(--out) backwards;
  animation-delay: calc(var(--i, 0) * 45ms);
}
@keyframes lineIn { from { opacity: 0; transform: translateY(10px) } }
.line:last-child { border-bottom: none; }
.line__art {
  width: 4rem; height: 4rem;
  background: var(--plate); border-radius: var(--r-s);
  display: grid; place-items: center; overflow: hidden;
  position: relative;
}
.line__art svg { width: 80%; height: auto; color: var(--ink); overflow: visible; }
/* At 4rem the fine detail turns to mud, so the thumbnail drops it. */
.line__art svg .h { stroke-width: 3.4; }
.line__art svg .f { stroke-width: 1.6; }
.line__art svg .x,
.line__art svg .g,
.line__art svg .s { display: none; }
.line__art img { width: 100%; height: 100%; object-fit: cover; }
.line__name { font-size: 1rem; line-height: 1.25; }
.line__meta {
  font-size: .7rem; color: var(--bone-3); margin-top: .2rem;
  letter-spacing: .01em;
}
.line__right { text-align: right; }

.qty {
  display: inline-flex; align-items: center;
  border: 1px solid var(--rule); border-radius: 100px;
  margin-top: .6rem;
}
.qty button {
  width: 1.85rem; height: 1.7rem;
  color: var(--bone-3); display: grid; place-items: center;
  font-size: .95rem; line-height: 1;
  border-radius: 100px;
  transition: color .2s var(--out), background-color .2s var(--out);
}
.qty button:hover { color: var(--bone); background: rgba(239,232,220,.07); }
.qty button:active { transform: scale(.92); }
.qty span {
  font-family: var(--mono); font-size: .76rem;
  min-width: 1.5rem; text-align: center; color: var(--bone);
}

.totals { display: grid; gap: .55rem; margin-bottom: 1.25rem; }
.totals__row {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 1rem; font-size: var(--t-xs); color: var(--fg-2);
}
.totals__row .price { font-size: var(--t-xs); color: var(--fg-2); }
.totals__row--grand {
  border-top: 1px solid var(--rule); padding-top: .85rem; margin-top: .45rem;
  color: var(--fg); font-size: .95rem;
}
.totals__row--grand .price { font-size: 1.2rem; color: var(--fg); text-align: right; }

.empty {
  text-align: center; padding: 4rem 1rem; color: var(--bone-3);
  font-size: var(--t-sm);
}
.empty::before {
  content: ""; display: block;
  width: 2.75rem; height: 2.75rem; margin: 0 auto 1.1rem;
  border: 1px solid var(--rule); border-radius: 50%;
}

/* ---------------------------------------------------------------
   17. CHECKOUT
   --------------------------------------------------------------- */
.checkout { display: none; padding: clamp(2rem, 6vh, 4rem) 0 6rem; background: var(--pitch); }
.checkout[data-active="true"] { display: block; }
.checkout__grid {
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .9fr);
  gap: clamp(1.5rem, 3.5vw, 3rem); align-items: start;
}
.checkout__main { display: grid; gap: 1.5rem; }

/* Double-bezel: an outer tray with a hairline, an inner core inset in it. */
.panel {
  background: color-mix(in srgb, var(--bone) 4%, transparent);
  border: 1px solid var(--rule-2);
  border-radius: var(--r-l);
  padding: 5px;
}
.panel__in {
  background: var(--surface);
  border-radius: calc(var(--r-l) - 2px);
  padding: clamp(1.4rem, 3vw, 2.25rem);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.045);
}
.panel--summary { position: sticky; top: calc(var(--hdr-h) + 1.5rem); }
.panel__h {
  font-size: 1.4rem; margin-bottom: 1.5rem;
  padding-bottom: 1rem; border-bottom: 1px solid var(--rule-2);
}

.summary__line {
  display: flex; justify-content: space-between; gap: 1.25rem;
  font-size: var(--t-xs); padding: .6rem 0;
  border-bottom: 1px solid var(--rule-2);
}
.summary__line span:first-child { color: var(--fg-2); }
.summary__line .price { font-size: var(--t-xs); }
.panel--summary .totals__row--grand { margin-top: 1.25rem; }

/* ---------------------------------------------------------------
   18. INVOICE — preparation sequence
   --------------------------------------------------------------- */
.mint { text-align: center; padding: 2.75rem 0 2.5rem; }
.mint__ring {
  width: 4.5rem; height: 4.5rem; margin: 0 auto 2rem;
  border-radius: 50%; position: relative;
}
.mint__ring::before,
.mint__ring::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 1px solid var(--rule);
}
.mint__ring::after {
  border-color: transparent; border-top-color: var(--brass);
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg) } }
.mint__steps { display: grid; gap: .6rem; max-width: 21rem; margin: 0 auto; text-align: left; }
.mint__step {
  font-size: var(--t-xs);
  color: var(--fg-3);
  display: flex; align-items: center; gap: .75rem;
  opacity: .35;
  transition: opacity .35s var(--out), color .35s var(--out);
}
.mint__step[data-state="active"] { opacity: 1; color: var(--bone); }
.mint__step[data-state="done"] { opacity: 1; color: var(--brass); }
.mint__dot {
  width: 5px; height: 5px; border-radius: 50%; flex: none;
  background: currentColor;
  transition: transform .35s var(--out);
}
.mint__step[data-state="active"] .mint__dot { transform: scale(1.6); }

/* ---------------------------------------------------------------
   19. INVOICE
   --------------------------------------------------------------- */
.invoice { display: grid; gap: 1.5rem; }
.invoice__head { text-align: center; padding-bottom: .25rem; }
.invoice__head .label { margin-bottom: .6rem; }
.ref {
  font-family: var(--mono); font-size: 1.35rem; font-weight: 500;
  letter-spacing: .2em; color: var(--bone);
}
.invoice__qr {
  background: #F4EFE6; padding: .95rem;
  width: fit-content; margin: 0 auto;
  border-radius: var(--r-m);
  box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, var(--sh-dark);
}
.invoice__qr svg { width: 11.5rem; height: 11.5rem; display: block; }

.amt {
  text-align: center;
  padding: 1.25rem 1rem;
  border-block: 1px solid var(--rule-2);
}
.amt strong {
  display: block;
  font-family: var(--mono); font-weight: 500;
  font-size: clamp(1.3rem, 4vw, 1.8rem);
  letter-spacing: -.02em; color: var(--brass-lit);
}
.amt small {
  display: block; margin-top: .55rem;
  font-size: var(--t-label); font-weight: 600; letter-spacing: .18em;
  text-transform: uppercase; color: var(--fg-3);
}

.copyrow + .copyrow { margin-top: .9rem; }
.copyrow .label { margin-bottom: .45rem; }
.copyfield { display: grid; grid-template-columns: 1fr auto; gap: .4rem; }
.copyfield code {
  font-family: var(--mono); font-size: .76rem;
  background: color-mix(in srgb, var(--bone) 4%, transparent);
  border: 1px solid var(--rule-2);
  padding: .72rem .8rem; border-radius: var(--r-s);
  word-break: break-all; color: var(--bone);
  display: flex; align-items: center; line-height: 1.4;
}
.copyfield button {
  border: 1px solid var(--rule); border-radius: var(--r-s);
  padding: 0 1rem;
  font-size: var(--t-label); font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--bone-2); white-space: nowrap;
  transition: color .2s var(--out), border-color .2s var(--out), transform .16s var(--out);
}
.copyfield button:hover { color: var(--bone); border-color: var(--brass-deep); }
.copyfield button:active { transform: scale(.96); }
.copyfield button[data-copied="true"] { color: var(--brass-lit); border-color: var(--brass-deep); }

.callout {
  border: 1px solid var(--rule-2);
  border-left: 2px solid var(--brass);
  background: rgba(166,124,61,.055);
  padding: 1.1rem 1.2rem;
  border-radius: 0 var(--r-s) var(--r-s) 0;
  font-size: var(--t-xs); color: var(--fg-2); line-height: 1.62;
}
.callout--warn { border-left-color: var(--oxblood-lit); background: rgba(140,39,53,.08); }
.callout strong { color: var(--bone); font-weight: 600; }
.callout ol { margin: .75rem 0 0; padding-left: 1.2rem; list-style: decimal; }
.callout li { margin-bottom: .5rem; }
.callout li::marker { color: var(--brass); font-family: var(--mono); font-size: .72rem; }
.callout a { color: var(--brass-lit); text-underline-offset: 3px; }
.callout__foot { margin-top: .9rem; font-size: .72rem; color: var(--fg-3); }

/* ---------------------------------------------------------------
   20. FOOTER
   --------------------------------------------------------------- */
.ftr {
  background: var(--deep);
  border-top: 1px solid var(--rule-2);
  padding: clamp(3rem, 7vw, 5rem) 0 2.5rem;
  color: var(--bone-3); font-size: var(--t-xs);
}
.ftr__grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  padding-bottom: clamp(2.5rem, 5vw, 3.5rem);
}
.ftr__tag { max-width: 32ch; color: var(--bone-2); line-height: 1.6; }
.ftr .label { margin-bottom: 1.1rem; color: var(--bone-2); }
.ftr ul { display: grid; gap: .55rem; }
.ftr a { color: var(--bone-3); text-decoration: none; transition: color .2s var(--out); }
.ftr a:hover { color: var(--bone); }
.ftr__base {
  border-top: 1px solid var(--rule-2); padding-top: 1.5rem;
  display: flex; justify-content: space-between; gap: 1.25rem; flex-wrap: wrap;
  font-size: .72rem;
}

/* ---------------------------------------------------------------
   21. RESPONSIVE
   --------------------------------------------------------------- */
@media (max-width: 1080px) {
  .ledger { grid-template-columns: 1fr; }
  .ledger__row:nth-child(2) { border-top: 1px solid var(--rule-2); padding-top: 2rem; }
}

@media (max-width: 920px) {
  .hero__grid { grid-template-columns: 1fr; gap: 3rem; }
  .hero__stack { order: -1; max-width: 22rem; margin: 0 auto; }
  .sec__head { grid-template-columns: 1fr; align-items: start; gap: 1.5rem; }
  .sec__headR { max-width: 46ch; }
  .steps { grid-template-columns: 1fr; }
  .step { padding-inline: 0; }
  .checkout__grid { grid-template-columns: 1fr; }
  .panel--summary { position: static; order: -1; }
  .modal__panel { grid-template-columns: 1fr; max-height: 92vh; }
  .sheet__media { border-right: none; border-bottom: 1px solid var(--rule-2); }
  .sheet__plate { max-width: 22rem; }
  .ftr__grid { grid-template-columns: 1fr 1fr; }
  .ftr__brand { grid-column: 1 / -1; }
}

@media (max-width: 700px) {
  /* Brand and bag on the first row, nav wrapped cleanly underneath.
     --hdr-h stays exact because the bar keeps a fixed height — the
     sticky filter bar and scroll-padding both key off it. */
  :root { --hdr-h: 5rem; }
  .hdr__bar {
    flex-wrap: wrap;
    align-content: center;
    row-gap: .15rem;
    column-gap: .75rem;
  }
  .hdr__nav {
    order: 3; width: 100%;
    gap: 1.25rem;
    padding-top: .4rem;
    border-top: 1px solid var(--rule-2);
  }
  .hdr__nav a { font-size: .62rem; letter-spacing: .11em; }
  .hdr__nav a::after { bottom: -.2rem; }
  .facts { grid-template-columns: 1fr; }
  .fact { padding: 1.1rem 0; border-top: 1px solid var(--rule-2); }
  .fact:first-child { border-top: none; }
  .fact + .fact { border-left: none; padding-left: 0; }
  .fact dd { max-width: 40ch; }
  .formgrid--2 { grid-template-columns: 1fr; }
  .filterbar__count { display: none; }
  .filterbar__in { padding-block: .6rem; }
  .filters {
    flex-wrap: nowrap;
    overflow-x: auto; scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    /* the row is scrollable, so it fades out at the edge instead of
       ending on a hard cut that reads as the end of the list */
    mask-image: linear-gradient(90deg, #000 calc(100% - 2.5rem), transparent);
  }
  .filters::-webkit-scrollbar { display: none; }
  .grid { grid-template-columns: repeat(2, 1fr); column-gap: .8rem; row-gap: 2rem; }
  .card__blurb { display: none; }
  .card__name { font-size: 1rem; }
  .card__meta { padding-top: .8rem; }
  .card__foot { flex-direction: column; align-items: flex-start; gap: .5rem; }
  .plate__cat { display: none; }
  .btn--wide { justify-content: center; }
  .ftr__grid { grid-template-columns: 1fr; }
  .ftr__base { flex-direction: column; gap: .5rem; }
}

@media (max-width: 560px) {
  /* keep the rotated plates clear of the viewport edge */
  .hero__stack { max-width: 18.5rem; }
}

@media (max-width: 430px) {
  :root { --hdr-h: 4.7rem; }
  .brand { font-size: 1.22rem; }
  .hdr__nav { gap: .9rem; }
  .hdr__nav a { font-size: .58rem; letter-spacing: .08em; }
  .cartbtn__t { display: none; }
  .cartbtn { padding: .5rem; border-radius: 100px; }
  .grid { column-gap: .7rem; }
  .plate__no { top: .6rem; left: .65rem; font-size: .52rem; }
  .plate__tag { top: .5rem; right: .5rem; font-size: .5rem; padding: .2rem .3rem; }
  .line { grid-template-columns: 3.2rem 1fr auto; gap: .75rem; }
  .line__art { width: 3.2rem; height: 3.2rem; }
  .invoice__qr svg { width: 9.5rem; height: 9.5rem; }
  .copyfield { grid-template-columns: 1fr; }
  .copyfield button { padding: .6rem; }
  .gate__row { flex-direction: column; }
  .gate__row .btn { justify-content: space-between; }
}

/* ---------------------------------------------------------------
   22. MOTION PREFERENCE
   Reduced motion keeps opacity and colour, drops movement.
   --------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    transition-delay: 0ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .hero:hover .hero__plate { transform: none; }
  .hero__plate:nth-child(1) { transform: rotate(-6.5deg); }
  .hero__plate:nth-child(2) { transform: rotate(2.5deg); }
  .hero__plate:nth-child(3) { transform: rotate(7deg); }
  .card:hover .plate__art,
  .card:hover .plate__marks,
  .card:hover .plate__art .s { transform: none; }
  .mint__ring::after { animation: none; border-color: var(--brass); opacity: .5; }
}

/* ---------------------------------------------------------------
   23. PHOTO GALLERY
   Two or more photographs only. A single one stays a bare <img>
   with no controls, exactly as before.
   --------------------------------------------------------------- */
.card__plate { cursor: pointer; }

.gal { position: absolute; inset: 0; touch-action: pan-y; }
.gal__track {
  display: flex; height: 100%; will-change: transform;
  transition: transform .52s var(--out);
}
.gal[data-dragging] .gal__track { transition: none; }
.gal__slide { flex: 0 0 100%; width: 100%; height: 100%; }
.gal__img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  user-select: none; -webkit-user-select: none; -webkit-user-drag: none;
}

.gal__nav {
  position: absolute; top: 50%; z-index: 7;
  width: 2rem; height: 2rem; margin-top: -1rem;
  border-radius: 50%;
  background: rgba(244,239,230,.92); color: var(--ink);
  display: grid; place-items: center;
  opacity: 0; pointer-events: none; transform: scale(.86);
  box-shadow: 0 2px 10px rgba(25,19,16,.3);
  transition: opacity .24s var(--out), transform .24s var(--out), background-color .2s var(--out);
}
.gal__nav svg {
  width: .78rem; height: .78rem; fill: none; stroke: currentColor;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.gal__nav--prev { left: .55rem; }
.gal__nav--next { right: .55rem; }
.gal__nav:disabled { opacity: 0 !important; pointer-events: none !important; }
.gal__nav:active { transform: scale(.94); }
@media (hover: hover) and (pointer: fine) {
  .card__plate:hover .gal__nav:not(:disabled),
  .sheet__plate .gal__nav:not(:disabled) { opacity: 1; pointer-events: auto; transform: none; }
  .gal__nav:hover { background: var(--plate); }
}
.gal__nav:focus-visible { opacity: 1; pointer-events: auto; transform: none; }

.gal__dots {
  position: absolute; z-index: 7; right: 1rem; bottom: .85rem;
  display: flex; gap: .34rem;
}
/* On a card the controls stay out of the way until the piece is being
   looked at: hover on a pointer device, or first swipe/tap on touch.
   The sheet keeps them on, since the user is already viewing. */
.card__plate .gal__dots {
  opacity: 0; pointer-events: none;
  transition: opacity .24s var(--out);
}
.card__plate .gal[data-touched] .gal__dots,
.card__plate .gal:focus-within .gal__dots { opacity: 1; pointer-events: auto; }
@media (hover: hover) and (pointer: fine) {
  .card__plate:hover .gal__dots { opacity: 1; pointer-events: auto; }
}
.gal__dot {
  position: relative; width: .4rem; height: .4rem; padding: 0;
  border-radius: 50%;
  background: rgba(244,239,230,.45);
  box-shadow: 0 0 0 1px rgba(25,19,16,.3);
  transition: background-color .24s var(--out), transform .24s var(--out);
}
.gal__dot::after { content: ""; position: absolute; inset: -.42rem; }
.gal__dot[aria-current="true"] { background: var(--plate); transform: scale(1.35); }
.card__plate--gal .plate__cat { right: 4.4rem; }

/* Photographs fill their frame — card and sheet alike, same crop, same
   4:3 media box as every other product. */
.plate__art > img,
.plate__art .gal__img,
.sheet__plate .gal__img,
.sheet__plate .plate__art > img {
  width: 100%; height: 100%; object-fit: cover;
}
.sheet__plate .plate__art { padding: 0; }
.sheet__plate.card__plate--photo { --mark: rgba(25,19,16,.34); }
.sheet__plate .gal__dot { background: rgba(25,19,16,.18); box-shadow: 0 0 0 1px rgba(25,19,16,.22); }
.sheet__plate .gal__dot[aria-current="true"] { background: var(--ink); }

/* Hero: one photograph, mounted. No gallery, no controls. */
.hero__stack--photo { aspect-ratio: auto; max-width: 26rem; }
.hero__plate--photo {
  position: relative; overflow: hidden;
  width: 100%; aspect-ratio: 4 / 4.15;
  margin: 0; padding: 0; left: auto; right: auto; top: auto;
  transform: rotate(-2.2deg);
  --mark: rgba(244,239,230,.5);
}
/* the piece sits low in the frame, so the crop favours the lower half */
.hero__plate--photo img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 68%;
}
.hero__plate--photo .plate__no,
.hero__plate--photo .plate__cat { color: rgba(244,239,230,.85); z-index: 2; }
.hero__plate--photo .plate__cat {
  position: absolute; bottom: .9rem; left: 1.05rem; right: 1.05rem;
  font-family: var(--sans); font-weight: 500;
  font-size: .58rem; letter-spacing: .18em; text-transform: uppercase;
}
.hero__plate--photo::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(12,9,8,.45) 0%, transparent 24%),
    linear-gradient(0deg, rgba(12,9,8,.5) 0%, transparent 26%);
}
.hero__plate--photo .plate__marks { z-index: 2; }
@media (hover: hover) and (pointer: fine) {
  .hero:hover .hero__plate--photo { transform: rotate(-1.4deg) translateY(-6px); }
}
@media (max-width: 920px) { .hero__plate--photo { aspect-ratio: 4 / 3.6; } }

@media (prefers-reduced-motion: reduce) {
  .gal__track { transition: none !important; }
  .hero:hover .hero__plate--photo { transform: rotate(-2.2deg); }
}

/* Older engines without :has() still get a visible focus ring. */
@supports not selector(:has(*)) {
  .card__cta:focus-visible { outline: 2px solid var(--brass-deep); outline-offset: 3px; }
}
