:root {
  --paper: #ffffff;
  --paper-deep: #f6f3f0;
  --ink: #161413;
  --ink-soft: #57524e;
  --rule: #e6e1dc;
  --red: #c8202f;         /* the Minetta Tavern / Carbone match-head red */
  --red-bright: #ef4a4f;  /* for red on the black band */
  --match: var(--red);
  --match-dark: #9e1622;
  --white: #ffffff;

  /* Script for big headings only; anything small stays in the sans */
  --serif: "Parisienne", "Snell Roundhand", cursive;
  --sans: "Work Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-header.scrolled { border-bottom-color: var(--rule); }

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.wordmark {
  font: 400 1.8rem/1 var(--serif);
  text-decoration: none;
}

.nav { display: flex; gap: 28px; align-items: center; }
.nav a {
  font-size: .92rem;
  text-decoration: none;
  color: var(--ink-soft);
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav .btn { color: var(--white); }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  font: inherit;
  font-size: .92rem;
  color: var(--ink);
  cursor: pointer;
  padding: 8px 0;
}

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav {
    display: none;
    position: absolute;
    top: 68px; left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    padding: 8px var(--gutter) 20px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 10px 0; font-size: 1.05rem; }
  .nav .btn { margin-top: 8px; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  padding: .7em 1.25em;
  border-radius: 999px;
  background: var(--match);
  color: var(--white);
  font: 500 .95rem/1 var(--sans);
  text-decoration: none;
  border: 1px solid var(--match);
  cursor: pointer;
  transition: background .15s, transform .15s;
}
.btn:hover { background: var(--match-dark); border-color: var(--match-dark); }
.btn:active { transform: translateY(1px); }

.btn.ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn.ghost:hover { background: var(--ink); color: var(--paper); }

.btn.small { padding: .55em 1em; font-size: .85rem; }

/* ---------- Type ---------- */

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.15;
  margin: 0;
}
h3 { font-family: var(--sans); font-weight: 500; letter-spacing: -0.01em; }

.eyebrow {
  font: 500 .75rem/1 var(--sans);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--match);
  margin: 0 0 14px;
}

.lede { font-size: 1.15rem; color: var(--ink-soft); max-width: 34em; }

section { padding: clamp(64px, 10vw, 120px) 0; }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.section-head h2 { font-size: clamp(2.6rem, 6vw, 4rem); }
.section-head p { margin: 12px 0 0; color: var(--ink-soft); max-width: 32em; }

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

.hero { padding: clamp(32px, 6vw, 72px) 0 clamp(48px, 8vw, 96px); }

.hero .wrap {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}

.hero h1 {
  font-size: clamp(3.2rem, 8.5vw, 6.4rem);
}
.hero h1 em { font-style: normal; color: var(--red); }

.hero .lede { margin: 24px 0 32px; }

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* The cover: four paintings tossed loosely on the table, kept small enough
   to fit on the first screen. The images have transparent backgrounds, so
   they can overlap and cast real shadows. */
.hero-collage {
  position: relative;
  aspect-ratio: 1 / 1;
  width: 100%;
  max-width: 420px;
  justify-self: center;
}
.hero-collage a {
  position: absolute;
  display: block;
  transition: transform .35s cubic-bezier(.2, .8, .2, 1);
}
.hero-collage img {
  width: 100%;
  filter: drop-shadow(0 12px 16px rgba(22, 20, 19, .18));
}
.hero-collage .c-carbone { left: 0;   top: 6%;  width: 50%; z-index: 2; transform: rotate(-13deg); }
.hero-collage .c-llama   { right: 2%; top: 0;   width: 42%; z-index: 1; transform: rotate(11deg); }
.hero-collage .c-minetta { left: 6%;  top: 56%; width: 50%; z-index: 3; transform: rotate(8deg); }
.hero-collage .c-primi   { right: 0;  top: 48%; width: 42%; z-index: 4; transform: rotate(-16deg); }
.hero-collage a:hover { z-index: 5; }
.hero-collage .c-carbone:hover { transform: rotate(-9deg) translateY(-8px) scale(1.04); }
.hero-collage .c-llama:hover   { transform: rotate(7deg) translateY(-8px) scale(1.04); }
.hero-collage .c-minetta:hover { transform: rotate(4deg) translateY(-8px) scale(1.04); }
.hero-collage .c-primi:hover   { transform: rotate(-11deg) translateY(-8px) scale(1.04); }

/* Rotated paintings can poke past their box; never let that widen the page */
.hero { overflow-x: clip; }

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-collage { width: 72%; max-width: 320px; margin: 24px auto 0; }
}

/* ---------- Matchbook wall ---------- */

.wall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 8px 16px;
}

.book {
  position: relative;
  display: block;
  text-decoration: none;
}
.book img {
  mix-blend-mode: multiply;
  transition: transform .35s cubic-bezier(.2, .8, .2, 1);
}
.book:nth-child(3n+1) img { transform: rotate(-2deg); }
.book:nth-child(3n+2) img { transform: rotate(1.5deg); }
.book:nth-child(5n) img { transform: rotate(-.5deg); }
.book:hover img, .book:focus-visible img { transform: rotate(0) scale(1.08); }

.book .label {
  position: absolute;
  left: 0; right: 0; bottom: 6%;
  text-align: center;
  font-size: .8rem;
  color: var(--ink-soft);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .2s, transform .2s;
}
.book:hover .label, .book:focus-visible .label { opacity: 1; transform: none; }

@media (hover: none) {
  .book .label { opacity: 1; transform: none; }
}

.book[hidden] { display: none; }
.wall-more { display: flex; justify-content: center; margin-top: 32px; }
.wall-more .btn[hidden] { display: none; }

/* ---------- Mix & Match band ---------- */

.band { background: var(--ink); color: var(--white); }
.band .eyebrow { color: var(--red-bright); }
.band .steps li { border-top-color: #3a3634; }
.band .steps li::before { color: var(--red-bright); }
.band .steps p { color: #bdb6b0; }
.band .btn.ghost { color: var(--white); border-color: var(--white); }
.band .btn.ghost:hover { background: var(--white); color: var(--ink); }

.steps {
  list-style: none;
  padding: 0;
  margin: 48px 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  counter-reset: step;
}
.steps li { counter-increment: step; border-top: 1px solid var(--rule); padding-top: 20px; }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font: 400 2.6rem/1 var(--serif);
  color: var(--red);
  margin-bottom: 14px;
}
.steps h3 { font-size: 1.35rem; margin-bottom: 8px; }
.steps p { margin: 0; color: var(--ink-soft); }

@media (max-width: 760px) {
  .steps { grid-template-columns: 1fr; gap: 24px; }
}

/* ---------- Prints ---------- */

.prints {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 40px);
}
.print { text-decoration: none; }
.print .frame {
  background: var(--white);
  padding: clamp(10px, 1.6vw, 20px);
  box-shadow: 0 1px 0 var(--rule), 0 18px 40px -20px rgba(31, 27, 22, .35);
  transition: transform .3s cubic-bezier(.2, .8, .2, 1), box-shadow .3s;
}
.print .frame img { aspect-ratio: 4 / 5; width: 100%; object-fit: contain; }
.print:hover .frame { transform: translateY(-4px); box-shadow: 0 1px 0 var(--rule), 0 28px 50px -20px rgba(31, 27, 22, .4); }
.print .meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 14px;
  gap: 12px;
}
.print .meta h3 { font-size: 1.15rem; }
.print .meta span { font-size: .85rem; color: var(--match); white-space: nowrap; }

@media (max-width: 860px) { .prints { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .prints { grid-template-columns: 1fr; } }

/* ---------- Commissions ---------- */

.commission { background: var(--paper-deep); }
.commission .wrap {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}
.commission img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 76% 50%;
  border-radius: 4px;
  filter: grayscale(1); /* delete this line to show the photo in color */
}
.commission h2 { font-size: clamp(2.6rem, 6vw, 4rem); margin-bottom: 20px; }
.commission ul { padding-left: 1.1em; color: var(--ink-soft); margin: 20px 0 32px; }
.commission li { margin-bottom: 6px; }
.commission .email {
  display: inline-block;
  margin-top: 16px;
  font-size: .95rem;
  color: var(--ink-soft);
}

@media (max-width: 760px) {
  .commission .wrap { grid-template-columns: 1fr; }
  .commission img { max-height: 420px; }
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 48px 0;
  border-top: 1px solid var(--rule);
  font-size: .9rem;
  color: var(--ink-soft);
}
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.site-footer nav { display: flex; gap: 24px; flex-wrap: wrap; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--ink); }

/* ---------- Mix & Match page ---------- */

.mm-hero { padding-bottom: 24px; }
.mm-hero .wrap { display: block; }
.mm-hero h1 { font-size: clamp(3.2rem, 8.5vw, 6rem); }
.mm-hero h1 em { font-style: normal; color: var(--red); }
.mm-hero .lede { margin-top: 20px; }

/* Full-bleed strip of the whole collection. On narrow screens it keeps its
   height and scrolls sideways instead of shrinking to a sliver. */
.strip {
  margin: 40px 0 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.strip::-webkit-scrollbar { display: none; }
.strip img {
  width: 100%;
  min-width: 900px;
  max-width: none;
  mix-blend-mode: multiply;
}

.mm-steps { margin: 24px 0 0; }
.mm-steps li { border-top-color: var(--rule); }
.mm-steps li::before { color: var(--red); }
.mm-steps p { color: var(--ink-soft); }

.menu-section { padding-top: 48px; padding-bottom: 160px; }

.menu-tools {
  position: sticky;
  top: 68px;
  z-index: 10;
  background: var(--paper);
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 32px;
}

.search {
  width: 100%;
  font: 400 1.05rem var(--sans);
  padding: 14px 18px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
}
.search:focus { outline: 2px solid var(--match); outline-offset: 1px; border-color: transparent; }

.chips {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  font: 500 .85rem/1 var(--sans);
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.region { margin-bottom: 48px; }
.region h2 {
  font-size: 2.1rem;
  margin-bottom: 16px;
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.region h2 small { font: 400 .85rem var(--sans); color: var(--ink-soft); letter-spacing: 0; }

.items {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 4 220px;
  column-gap: 32px;
}
.items li { break-inside: avoid; }

.item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  cursor: pointer;
  border-bottom: 1px dotted var(--rule);
  user-select: none;
}
.item input { position: absolute; opacity: 0; pointer-events: none; }
.item .box {
  flex: none;
  width: 18px; height: 18px;
  border: 1.5px solid var(--ink-soft);
  border-radius: 4px;
  display: grid;
  place-items: center;
  transition: background .12s, border-color .12s;
}
.item input:checked + .box { background: var(--match); border-color: var(--match); }
.item input:checked + .box::after {
  content: "";
  width: 5px; height: 9px;
  border: solid var(--white);
  border-width: 0 2px 2px 0;
  transform: translateY(-1px) rotate(45deg);
}
.item input:focus-visible + .box { outline: 2px solid var(--match); outline-offset: 2px; }
.item .name { flex: 1; }
.item .thumb {
  width: 44px; height: 44px;
  margin: -6px 0;
  mix-blend-mode: multiply;
  flex: none;
}

.empty { color: var(--ink-soft); font-style: italic; }

.custom-note {
  margin-top: 24px;
  padding: 28px;
  background: var(--paper-deep);
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.custom-note h3 { font-size: 1.5rem; margin-bottom: 4px; }
.custom-note p { margin: 0; color: var(--ink-soft); }

/* Selection tray */
.tray {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translate(-50%, 140%);
  width: min(720px, calc(100% - 32px));
  background: var(--ink);
  color: var(--paper);
  border-radius: 16px;
  padding: 14px 14px 14px 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, .45);
  transition: transform .35s cubic-bezier(.2, .8, .2, 1);
  z-index: 30;
}
.tray.show { transform: translate(-50%, 0); }
.tray .count { font: 500 1.2rem/1 var(--sans); white-space: nowrap; }
.tray .picked {
  flex: 1;
  min-width: 0;
  font-size: .85rem;
  color: #c9bfae;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tray .actions { display: flex; gap: 8px; }
.tray .btn { white-space: nowrap; }
.tray .btn.ghost { color: var(--paper); border-color: #6b6155; }
.tray .btn.ghost:hover { background: var(--paper); color: var(--ink); }

@media (max-width: 600px) {
  .tray { flex-wrap: wrap; padding: 14px 16px; }
  .tray .picked { flex-basis: 100%; order: 3; }
  .tray .actions { margin-left: auto; }
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 110px;
  transform: translateX(-50%);
  background: var(--match);
  color: var(--white);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: .9rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
  z-index: 40;
}
.toast.show { opacity: 1; }

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

.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s, transform .7s cubic-bezier(.2, .8, .2, 1); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
