:root {
  --paper: #cdb48c;
  --ink: #1b2f9e;
  --pink: #ff48b0;
  --till: #fbfaf5;
  --tape: #e9dcae;
  --slab: 'Alfa Slab One', Georgia, serif;
  --type: 'Courier Prime', 'Courier New', monospace;
  --gutter: clamp(16px, 4vw, 48px);
  --cx-bg: #e6d8bd;
  --cx-surface: #dcc9a6;
  --cx-text: var(--ink);
  --cx-muted: #33407f;
  --cx-line: var(--ink);
  --cx-accent: var(--ink);
  --cx-on-accent: #f4ead6;
  --cx-radius: 2px;
  --cx-font: var(--type);
  --cx-head-font: var(--slab);
  --cx-head-weight: 400;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font: 400 1.0625rem/1.55 var(--type);
  background-color: var(--paper);
  /* kraft fibre speckle */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' seed='4'/%3E%3CfeColorMatrix values='0 0 0 0 .28 0 0 0 0 .2 0 0 0 0 .1 0 0 0 .5 -.12'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
main { display: block; outline: none; min-height: 60vh; }
a { color: inherit; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

.top {
  display: flex;
  gap: 24px;
  align-items: baseline;
  padding: 16px var(--gutter);
}
.top .mark { margin-right: auto; font-family: var(--slab); text-decoration: none; font-size: 1.125rem; }

/* The poster: two inks that never quite line up. */
.poster { padding: clamp(8px, 2vw, 24px) var(--gutter) clamp(40px, 6vw, 72px); }
.slab {
  margin: 0;
  font: 400 clamp(3rem, 19.6vw, 22rem)/0.86 var(--slab);
  letter-spacing: -0.01em;
}
.slab span { position: relative; display: block; isolation: isolate; width: fit-content; }
.slab span::before {
  content: attr(data-ink);
  position: absolute;
  inset: 0;
  z-index: -1;
  color: var(--pink);
  transform: translate(0.035em, 0.035em);
  animation: settle 1.1s cubic-bezier(.2, .7, .2, 1) both;
}
@keyframes settle { from { transform: translate(0, 0); } }

.poster-foot { display: flex; flex-wrap: wrap; gap: 24px 48px; align-items: center; justify-content: space-between; margin-top: clamp(24px, 4vw, 40px); }
.lede { margin: 0; max-width: 46ch; font-size: 1.25rem; line-height: 1.45; }
.stamp {
  display: inline-block;
  padding: 12px 22px;
  border: 3px solid var(--ink);
  border-radius: 4px;
  font-family: var(--slab);
  text-decoration: none;
  transform: rotate(-3deg);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 1.0625rem;
}
.stamp:hover { background: var(--pink); }

.shelf { padding: 0 var(--gutter) clamp(48px, 8vw, 96px); scroll-margin-top: 16px; }
.shelf h2 { margin: 0; font: 400 clamp(2.25rem, 7vw, 5rem)/1 var(--slab); }
.sections { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 16px 0 32px; padding: 0; list-style: none; }
.sections a[aria-current] { background: var(--pink); text-decoration: none; padding: 0 6px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 40px 28px; }
.item { display: block; text-decoration: none; position: relative; }

/* Every photo is overprinted in one ink. White drops out to the paper. */
.print { display: block; aspect-ratio: 1; background: var(--ink); mix-blend-mode: multiply; }
.print img { display: block; width: 100%; height: 100%; object-fit: contain; background: #fff; filter: grayscale(1) contrast(1.2); mix-blend-mode: screen; }
.item:hover .print, .item:focus-visible .print { background: #fff; }
.item:hover .print img, .item:focus-visible .print img { filter: none; mix-blend-mode: normal; }

/* A menu line: name, dot leaders, price. */
.menu-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; margin-top: 10px; }
.menu-line .name { flex: 1 1 100%; overflow-wrap: break-word; }
.menu-line .dots { flex: 1; min-width: 16px; border-bottom: 2px dotted currentColor; transform: translateY(-4px); }
.menu-line .price { white-space: nowrap; font-weight: 700; }
.chip {
  position: absolute;
  top: 8px;
  left: 0;
  padding: 2px 8px;
  background: var(--pink);
  color: var(--ink);
  font-weight: 700;
  transform: rotate(-4deg);
  max-width: 90%;
}

.quip {
  grid-column: span 2;
  display: flex;
  align-items: center;
  padding: 24px;
  background: var(--pink);
  mix-blend-mode: multiply;
  font: 400 clamp(1.625rem, 3.2vw, 2.75rem)/1.05 var(--slab);
}
@media (max-width: 560px) { .quip { grid-column: auto; } }

/* Product page: the one place you see the real colours, taped to the page. */
.detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 72px); padding: 24px var(--gutter) clamp(48px, 8vw, 96px); align-items: start; }
.taped { position: relative; margin: 16px 0 0; padding: 14px; background: #fff; transform: rotate(-1.2deg); box-shadow: 1px 2px 0 rgb(70 50 20 / 0.35); }
.taped::before {
  content: '';
  position: absolute;
  top: -14px;
  left: 50%;
  width: 120px;
  height: 30px;
  background: var(--tape);
  opacity: 0.85;
  transform: translateX(-50%) rotate(2deg);
}
.taped img { display: block; width: 100%; aspect-ratio: 1; object-fit: contain; }
.back { display: inline-block; margin-bottom: 12px; }
.detail h1 { margin: 0; font: 400 clamp(2.125rem, 5vw, 4rem)/1.02 var(--slab); overflow-wrap: break-word; }
.big-price { margin: 16px 0 0; font-size: 1.625rem; font-weight: 700; }
.big-price s { font-weight: 400; font-size: 1.0625rem; margin-left: 8px; }
fieldset { border: 0; padding: 0; margin: 24px 0 0; }
legend { padding: 0; margin-bottom: 8px; font-weight: 700; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { min-height: 44px; padding: 8px 14px; font: inherit; color: var(--ink); background: transparent; border: 2px dashed var(--ink); border-radius: 2px; cursor: pointer; }
.opt[aria-pressed='true'] { background: var(--ink); color: var(--paper); border-style: solid; }
.stock { margin: 16px 0; }
.buy { margin-top: 8px; min-height: 48px; }
.buy[disabled] { opacity: 0.55; cursor: not-allowed; transform: none; background: transparent; }
.buy-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.till-go { margin-top: 16px; --cx-accent: #20242e; --cx-on-accent: #fbfaf5; }
.notice { min-height: 1.6em; margin: 16px 0 0; font-weight: 700; }
.desc { margin-top: 32px; }
.desc p { margin: 0 0 12px; max-width: 60ch; }

/* The bag is a till receipt. */
.bag { display: flex; flex-direction: column; align-items: center; padding: 24px 16px clamp(48px, 8vw, 96px); }
.receipt {
  width: min(100%, 520px);
  padding: 32px 24px 44px;
  background: var(--till);
  color: #20242e;
  transform: rotate(0.5deg);
  mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 16px 100%;
}
.receipt h1 { margin: 0; text-align: center; font: 400 1.75rem/1.1 var(--slab); }
.receipt .sub { margin: 4px 0 20px; text-align: center; }
.receipt ul { margin: 0; padding: 16px 0; list-style: none; border-block: 2px dashed currentColor; }
.receipt li { padding: 8px 0; }
.receipt li a { font-weight: 700; }
.row { display: flex; justify-content: space-between; gap: 16px; }
.qty { display: flex; align-items: center; gap: 4px; margin-top: 4px; }
.qty button { width: 44px; height: 44px; font: inherit; font-weight: 700; color: inherit; background: none; border: 2px solid currentColor; cursor: pointer; }
.qty span { min-width: 2.5ch; text-align: center; }
.total { padding-top: 16px; font-size: 1.375rem; font-weight: 700; }
.receipt .small { margin: 20px 0 0; text-align: center; }

.state { padding: clamp(48px, 10vw, 120px) var(--gutter); }
.state h1 { margin: 0 0 12px; font: 400 clamp(2rem, 5vw, 3.5rem)/1.05 var(--slab); }

.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; padding: 24px var(--gutter) 40px; border-top: 3px solid var(--ink); }
.foot p { margin: 0; max-width: 60ch; }

@media (max-width: 760px) {
  .detail { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .slab span::before { animation: none; }
}
