/* The Canon: the shop wears the plates' own grammar. Two grounds, three typefaces,
   tracked mono labels, hairline rules, and one accent per ground. */

@font-face { font-family: "Cormorant Garamond"; font-weight: 300; font-display: swap; src: url("/fonts/CormorantGaramond-300.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-weight: 400; font-display: swap; src: url("/fonts/CormorantGaramond-400.woff2") format("woff2"); }
@font-face { font-family: "EB Garamond"; font-weight: 400; font-display: swap; src: url("/fonts/EBGaramond-400.woff2") format("woff2"); }
@font-face { font-family: "EB Garamond"; font-weight: 400; font-style: italic; font-display: swap; src: url("/fonts/EBGaramond-400-Italic.woff2") format("woff2"); }
@font-face { font-family: "EB Garamond"; font-weight: 500; font-display: swap; src: url("/fonts/EBGaramond-500.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url("/fonts/IBMPlexMono-400.woff2") format("woff2"); }

:root {
  --paper: #F2EDE3;
  --paper-ink: #1E1D1B;
  --paper-muted: #7A746A;
  --paper-rule: #CFC7B8;
  --night: #0E1216;
  --night-ink: #ECE6D9;
  --night-muted: #8D8A84;
  --night-rule: #2E3338;
  --vermilion: #C9392B;
  --gold: #ECC277;
  --wall: #E6E2DA;

  --ground: var(--paper);
  --ink: var(--paper-ink);
  --muted: var(--paper-muted);
  --rule: var(--paper-rule);
  --accent: var(--vermilion);
  --accent-ink: #FFF8EF;

  --display: "Cormorant Garamond", "Cormorant", Garamond, serif;
  --text: "EB Garamond", Garamond, "Times New Roman", serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --gutter: clamp(16px, 4vw, 48px);
  --measure: 34em;
}

.ground-night {
  --ground: var(--night);
  --ink: var(--night-ink);
  --muted: var(--night-muted);
  --rule: var(--night-rule);
  --accent: var(--gold);
  --accent-ink: var(--night);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--paper-ink);
  font: 400 1.1875rem/1.55 var(--text);
  font-variant-numeric: oldstyle-nums proportional-nums;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
body.ground-night { background: var(--paper); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
code { font: 400 0.72rem/1.4 var(--mono); letter-spacing: 0.06em; }
[hidden] { display: none !important; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--paper-ink); color: var(--paper); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

/* labels: the plates' tracked mono */
.label, .site-nav a, .market button, .btn, .section-title, legend.label, caption.label, .choice-sub {
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.label { color: var(--muted); margin: 0 0 0.6em; }

/* prices: both currencies are in the markup; show the chosen one */
[data-market="GB"] .m-US, [data-market="US"] .m-GB { display: none; }

/* ---------------------------------------------------------------- header */
.site-head {
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
  padding: 20px var(--gutter);
  border-bottom: 1px solid var(--paper-rule);
}
.wordmark {
  font: 300 1.75rem/1 var(--display);
  letter-spacing: 0.02em;
  text-decoration: none;
  margin-right: auto;
}
.wordmark:hover { color: inherit; }
.site-nav { display: flex; gap: 22px; align-items: center; }
.site-nav a { text-decoration: none; color: var(--paper-ink); }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--vermilion); }
.cart-count { margin-left: 0.5em; }
.cart-count::before { content: "("; } .cart-count::after { content: ")"; }
.market { display: flex; border: 1px solid var(--paper-rule); }
.market button {
  background: none; border: 0; padding: 7px 10px; cursor: pointer; color: var(--paper-muted);
}
.market button[aria-pressed="true"] { background: var(--paper-ink); color: var(--paper); }

@media (max-width: 640px) {
  .site-head { gap: 14px 18px; }
  .wordmark { width: 100%; }
  .site-nav { gap: 16px; margin-right: auto; }
}

/* ---------------------------------------------------------------- shared */
main { display: block; }
.section-title { color: var(--muted); margin: 0 0 28px; padding-bottom: 12px; border-bottom: 1px solid var(--rule); }
.page-title { font: 300 clamp(2.4rem, 5vw, 3.6rem)/1.05 var(--display); margin: 0 0 0.5em; }
.lede { font-size: 1.3rem; line-height: 1.5; }
.note { color: var(--muted); font-style: italic; }
.btn {
  display: inline-block; cursor: pointer;
  background: var(--accent); color: var(--accent-ink);
  border: 0; padding: 16px 28px; min-width: 14em;
  transition: filter 0.15s;
}
.btn:hover { filter: brightness(1.08); color: var(--accent-ink); }
.btn:disabled { opacity: 0.5; cursor: wait; }
.btn-quiet { background: none; color: var(--ink); border: 1px solid var(--rule); min-width: 0; padding: 10px 14px; }

.price-table { border-collapse: collapse; width: 100%; font-variant-numeric: lining-nums tabular-nums; }
.price-table caption { text-align: left; color: var(--muted); padding-bottom: 10px; }
.price-table th, .price-table td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--rule); vertical-align: baseline; }
.price-table thead th { font: 400 0.6875rem var(--mono); letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.price-table tbody th { font-weight: 400; }
.price-table .sub { display: block; color: var(--muted); font-size: 0.9rem; }
.price-table td.mm { color: var(--muted); font-size: 0.95rem; }

/* ---------------------------------------------------------------- home */
.hero { background: var(--wall); padding: 0 0 56px; }
.hero picture img { width: 100%; }
.hero-text { max-width: 46rem; margin: 0 auto; padding: 8px var(--gutter) 0; text-align: center; }
.hero h1 { font: 300 clamp(1.9rem, 3.6vw, 2.9rem)/1.15 var(--display); margin: 0 0 0.5em; }
.hero .lede { color: #4a4640; margin: 0; }

.folio, .set, .index { padding: 72px var(--gutter) 0; max-width: 1240px; margin: 0 auto; }
.plate-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 56px 40px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.plate-card { display: block; text-decoration: none; }
.plate-card:hover { color: inherit; }
.card-frame { background: var(--wall); padding: 9%; margin-bottom: 18px; transition: background 0.2s; }
.plate-card:hover .card-frame { background: #DDD8CF; }
.card-frame img, .card-frame .plate-card-blank { box-shadow: 0 0 0 7px #2B2A28, 3px 6px 0 7px rgba(0,0,0,0.08); }
.card-title { font: 400 1.6rem/1.15 var(--display); margin: 0 0 4px; }
.card-meta { margin: 0; color: var(--paper-muted); font-size: 1rem; }
.card-hook { font-style: italic; margin: 8px 0 10px; }
.card-price { margin: 0; font: 400 0.75rem var(--mono); letter-spacing: 0.12em; color: var(--paper-muted); }
.plate-card-blank {
  aspect-ratio: 5 / 7; background: var(--ground); color: var(--rule);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
}
.blank-numeral { font: 300 5rem/1 var(--display); }
.is-forthcoming .card-title, .is-forthcoming .card-hook { color: var(--paper-muted); }

.set { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.set-text p { max-width: var(--measure); }
.set-form { display: grid; gap: 18px; margin-top: 24px; }
@media (max-width: 800px) { .set { grid-template-columns: 1fr; } }

.index-note { max-width: var(--measure); color: var(--paper-muted); font-style: italic; margin-top: -12px; }
.numeral-index { list-style: none; margin: 28px 0 96px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0 32px; }
.numeral-index li { display: flex; gap: 14px; align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--paper-rule); color: var(--paper-muted); }
.numeral-index li a { display: contents; text-decoration: none; }
.numeral-index .numeral { font: 400 0.75rem var(--mono); letter-spacing: 0.12em; min-width: 4.2em; }
.numeral-index .index-title { font-size: 1.02rem; line-height: 1.3; }
.numeral-index li.is-lit { color: var(--paper-ink); }
.numeral-index li.is-lit .numeral { color: var(--vermilion); }
.numeral-index li.is-lit a:hover .index-title { color: var(--vermilion); }

/* ---------------------------------------------------------------- plate page */
.plate-hero {
  background: var(--ground); color: var(--ink);
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr); gap: clamp(32px, 5vw, 80px);
  padding: clamp(32px, 5vw, 72px) var(--gutter);
}
.plate-figure img { width: 100%; max-width: 760px; margin: 0 auto; box-shadow: 0 1px 0 var(--rule), 0 18px 40px rgba(0,0,0,0.12); }
.ground-night .plate-figure img { box-shadow: 0 0 0 1px var(--rule); }
.plate-info { max-width: 30rem; }
.numeral-line { margin: 18px 0 0; }
.numeral-line .numeral { font: 400 1.9rem/1 var(--display); }
.numeral-line .of { font: 400 1.05rem var(--display); color: var(--muted); }
.plate-title { font: 300 clamp(2.4rem, 4.4vw, 3.7rem)/1.02 var(--display); margin: 10px 0 12px; }
.plate-meta { margin: 0; color: var(--muted); }
.hook { font-style: italic; font-size: 1.3rem; line-height: 1.4; margin: 18px 0; }
.ground-chip { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: 0.98rem; margin: 0 0 28px; }
.swatch { width: 18px; height: 18px; flex: none; }
.swatch-paper { background: var(--paper); box-shadow: inset 0 0 0 1px var(--paper-rule); }
.swatch-night { background: var(--night); box-shadow: inset 0 0 0 1px #444b52; }

.choices { border: 0; margin: 0 0 20px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5em, 1fr)); gap: 8px; }
.choices legend { padding: 0; margin-bottom: 10px; color: var(--muted); }
.choice { position: relative; display: block; cursor: pointer; border: 1px solid var(--rule); padding: 10px 12px; }
.choice input { position: absolute; opacity: 0; }
.choice-main { display: block; font-size: 1.05rem; line-height: 1.2; }
.choice-sub { display: block; color: var(--muted); font-size: 0.6rem; letter-spacing: 0.12em; margin-top: 4px; }
.choice:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.choice:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.choice:has(input:disabled) { opacity: 0.4; cursor: not-allowed; }
.buy-price { font: 400 2rem/1 var(--display); margin: 8px 0 18px; font-variant-numeric: lining-nums; }
.buy-price .incl { font: 400 0.65rem var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); vertical-align: middle; margin-left: 8px; }
.buy-added { margin: 12px 0 0; }
.edition { color: var(--muted); font-size: 0.95rem; margin: 18px 0 0; }
.edition code { display: block; margin-top: 6px; color: var(--ink); }

.plate-body {
  max-width: 1240px; margin: 0 auto; padding: 72px var(--gutter) 24px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 56px 72px;
}
.details { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.detail { margin: 0; }
.detail img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.detail figcaption { color: var(--paper-muted); font-size: 0.98rem; font-style: italic; margin-top: 10px; }
.story .subtitle { font-style: italic; color: var(--paper-muted); }
.story .blurb { font-size: 1.22rem; line-height: 1.6; }
.computed, .credit { color: var(--paper-muted); font-size: 1rem; }
.spec-list { list-style: none; padding: 0; margin: 24px 0 0; }
.spec-list li { padding: 8px 0; border-bottom: 1px solid var(--paper-rule); font-size: 1.02rem; }
.spec-list strong { font-weight: 500; }

.plate-nav {
  max-width: 1240px; margin: 0 auto; padding: 32px var(--gutter) 96px;
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 24px; align-items: center;
}
.neighbour { text-decoration: none; font-size: 1.05rem; }
.neighbour .label { display: block; }
.plate-nav > :last-child { text-align: right; }
.neighbour.is-forthcoming { color: var(--paper-muted); }
.numeral-strip { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 9px; margin: 0; padding: 0; max-width: 420px; font: 400 0.62rem var(--mono); letter-spacing: 0.08em; color: var(--paper-rule); }
.numeral-strip .is-lit { color: var(--paper-muted); }
.numeral-strip .is-here { color: var(--vermilion); }

@media (max-width: 960px) {
  .plate-hero { grid-template-columns: 1fr; }
  .plate-info { max-width: 36rem; }
  .plate-body { grid-template-columns: 1fr; }
  .details { grid-template-columns: 1fr; }
  .plate-nav { grid-template-columns: 1fr 1fr; }
  .numeral-strip { grid-column: 1 / -1; grid-row: 2; max-width: none; }
}

/* ---------------------------------------------------------------- cart */
.cart-page { max-width: 960px; margin: 0 auto; padding: 56px var(--gutter) 96px; }
.cart-lines { list-style: none; margin: 0 0 32px; padding: 0; border-top: 1px solid var(--paper-rule); }
.cart-line { display: grid; grid-template-columns: 84px 1fr auto; gap: 20px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--paper-rule); }
.cart-line img { width: 84px; box-shadow: 0 0 0 1px var(--paper-rule); }
.cart-line .set-thumb { width: 84px; aspect-ratio: 5/7; background: var(--wall); display: flex; align-items: center; justify-content: center; font: 300 1.6rem var(--display); color: var(--paper-muted); }
.line-title { font: 400 1.35rem/1.15 var(--display); margin: 0; }
.line-title a { text-decoration: none; }
.line-desc { color: var(--paper-muted); margin: 2px 0 0; font-size: 1rem; }
.line-code { margin-top: 4px; color: var(--paper-muted); }
.line-side { text-align: right; }
.line-price { font-variant-numeric: lining-nums tabular-nums; margin: 0 0 8px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--paper-rule); }
.qty button { background: none; border: 0; width: 32px; height: 32px; cursor: pointer; font: 400 1.1rem var(--text); color: var(--paper-ink); }
.qty span { min-width: 1.6em; text-align: center; font-variant-numeric: lining-nums; }
.remove { display: block; margin: 8px 0 0 auto; background: none; border: 0; padding: 0; color: var(--paper-muted); cursor: pointer; font: 400 0.6rem var(--mono); letter-spacing: 0.16em; text-transform: uppercase; }
.remove:hover { color: var(--vermilion); }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; font: 300 2rem var(--display); margin: 0 0 8px; font-variant-numeric: lining-nums; }
.cart-ship { color: var(--paper-muted); margin: 0 0 28px; }
.cart-error { color: var(--vermilion); }
@media (max-width: 560px) {
  .cart-line { grid-template-columns: 64px 1fr; }
  .cart-line img, .cart-line .set-thumb { width: 64px; }
  .line-side { grid-column: 2; text-align: left; display: flex; gap: 16px; align-items: center; }
  .line-side .line-price { margin: 0; }
  .remove { margin: 0; }
}

/* ---------------------------------------------------------------- prose */
.prose { max-width: 40rem; margin: 0 auto; padding: 56px var(--gutter) 96px; }
.prose h2 { font: 400 1.6rem/1.2 var(--display); margin: 1.8em 0 0.4em; }
.prose ul { padding-left: 1.1em; }
.prose li { margin: 0.3em 0; }
.prose .form-text { margin: 1em 0; padding: 4px 20px; border-left: 2px solid var(--paper-rule); color: #3b3833; }
.thanks [data-order-root] ul { list-style: none; padding: 0; border-top: 1px solid var(--paper-rule); }
.thanks [data-order-root] li { padding: 10px 0; border-bottom: 1px solid var(--paper-rule); }

/* ---------------------------------------------------------------- footer */
.site-foot { background: var(--night); color: var(--night-muted); padding: 56px var(--gutter) 64px; }
.foot-mark { font: 300 1.6rem var(--display); color: var(--night-ink); margin-bottom: 18px; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-bottom: 24px; }
.site-foot nav a { color: var(--night-ink); text-decoration: none; font-size: 1rem; }
.site-foot nav a:hover { color: var(--gold); }
.site-foot p { margin: 0 0 6px; font-size: 0.92rem; }
