@font-face {
  font-family: "Newsreader";
  src: url("assets/newsreader-roman.woff2") format("woff2");
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("assets/newsreader-italic.woff2") format("woff2");
  font-style: italic;
  font-display: swap;
}

:root {
  --forest: #17241b;
  --forest-soft: #304333;
  --ivory: #f7f1e6;
  --ink: #20211d;
  --muted: #62645c;
  --gold: #b58a4b;
  --hairline: #d4c8b4;
  --canvas: #1c1f1c;
  --sheet-w: 297mm;
  --sheet-h: 210mm;
  --header-h: 34.46mm;
  --footer-h: 12.5mm;
}

* { box-sizing: border-box; }
html { background: var(--canvas); }
body { margin: 0; color: var(--ink); background: var(--canvas); font-family: Arial, Helvetica, sans-serif; }

.preview-toolbar {
  width: min(var(--sheet-w), calc(100% - 32px));
  margin: 16px auto 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: #d8d2c4;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.preview-toolbar > div { display: grid; gap: 4px; }
.fit-summary { font-size: 10px; letter-spacing: 0.035em; }
.fit-summary[data-state="fit"] { color: #8fc49c; }
.fit-summary[data-state="near"] { color: #e0b273; }
.fit-summary[data-state="overflow"] { color: #f08a7e; font-weight: 700; }
.preview-toolbar button {
  appearance: none;
  border: 1px solid #c8a260;
  background: var(--forest);
  color: var(--ivory);
  padding: 10px 16px;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}
.preview-toolbar button:disabled { cursor: not-allowed; opacity: 0.42; }
.preview-toolbar button:not(:disabled):hover,
.preview-toolbar button:not(:disabled):focus-visible { background: #25382a; outline: 2px solid #fff; outline-offset: 2px; }
.overflow-warning {
  width: min(var(--sheet-w), calc(100% - 32px));
  margin: 0 auto 10px;
  padding: 10px 14px;
  border: 1px solid #a64a3c;
  background: #fff2ef;
  color: #7b2e24;
  font-size: 13px;
}

.menu-sheet {
  position: relative;
  isolation: isolate;
  width: var(--sheet-w);
  height: var(--sheet-h);
  margin: 0 auto 32px;
  overflow: hidden;
  background: var(--ivory);
  box-shadow: 0 18px 50px rgb(22 29 23 / 18%);
  display: grid;
  grid-template-rows: var(--header-h) minmax(0, 1fr) var(--footer-h);
}
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.embedded-preview { position: relative; min-width: 1180px; padding-top: 36px; }
.embedded-preview .menu-sheet { margin: 0 auto; box-shadow: none; }
.embedded-preview .menu-sheet:not(.is-active) {
  position: absolute;
  top: 36px;
  left: -200vw;
  visibility: hidden;
}
.preview-sheet-switcher {
  position: absolute;
  z-index: 20;
  top: 0;
  left: 50%;
  height: 36px;
  display: flex;
  align-items: center;
  gap: 6px;
  transform: translateX(-50%);
}
.preview-sheet-switcher button {
  padding: 5px 10px;
  border: 1px solid #6d706b;
  border-radius: 999px;
  color: #d9ddd8;
  background: #30332f;
  font: 700 11px Arial, sans-serif;
  cursor: pointer;
}
.preview-sheet-switcher button[aria-pressed="true"] { color: #182019; background: #e9e2d4; border-color: #e9e2d4; }

/* ---------- Background botanicals ---------- */
.botanical-layer {
  position: absolute;
  z-index: 1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.botanical-wash {
  position: absolute;
  inset: var(--header-h) 0 0;
  width: 100%;
  height: calc(100% - var(--header-h));
  object-fit: fill;
  opacity: 0.55;
  mix-blend-mode: multiply;
}
.botanical {
  position: absolute;
  height: auto;
  opacity: 0.14;
  filter: grayscale(1) sepia(0.25) contrast(0.85);
  mix-blend-mode: multiply;
}
.botanical--low-center { left: 30%; bottom: 6mm; width: 118mm; }

/* ---------- Masthead ---------- */
.masthead {
  position: relative;
  z-index: 3;
  margin: 0 -1px;
  height: var(--header-h);
  color: var(--ivory);
  background: #1a2a1c url("assets/header-clean.png") center / 100% 100% no-repeat;
}
.header-crest {
  position: absolute;
  z-index: 6;
  left: 130.47mm;
  top: 23.51mm;
  width: 36.85mm;
  height: auto;
  pointer-events: none;
}
.masthead-title {
  position: absolute;
  left: 2.7%;
  width: 38.3%;
  top: 0;
  height: 100%;
  text-align: center;
}
.masthead h1 {
  position: absolute;
  left: 0;
  right: 0;
  top: 9.3mm;
  margin: 0;
  font-family: "Newsreader", Georgia, serif;
  color: #f6efdf;
  font-size: 10.1mm;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.02em;
  font-variant-caps: small-caps;
  white-space: nowrap;
}
.masthead-note {
  position: absolute;
  left: 0;
  right: 0;
  top: 24.3mm;
  margin: 0;
  color: #b9a57c;
  font-size: 1.95mm;
  line-height: 1;
  letter-spacing: 0.27em;
  text-transform: uppercase;
  white-space: nowrap;
}
.masthead-meta {
  position: absolute;
  left: 71%;
  width: 28%;
  top: 0;
  height: 100%;
  text-align: center;
}
.masthead-meta p { margin: 0; text-transform: uppercase; }
.masthead-dateline {
  position: absolute;
  left: 0;
  right: 0;
  top: 15mm;
  color: #f1e8d6;
  font-family: "Newsreader", Georgia, serif;
  font-size: 3.4mm;
  letter-spacing: 0.12em;
  white-space: nowrap;
}
/* Right side shows location only */
.masthead-meta #menu-date,
.masthead-meta .dateline-sep,
.masthead-meta .collection-note { display: none; }
.masthead-meta .collection-note {
  position: absolute;
  left: 0;
  right: 0;
  top: 17.6mm;
  color: #c7a86c;
  font-size: 1.85mm;
  line-height: 1.75;
  letter-spacing: 0.32em;
  white-space: pre-line;
}

/* ---------- Tiers ---------- */
.tiers {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-height: 0;
  padding: 3.6mm 5mm 2mm;
}
.tier {
  --accent: var(--gold);
  --product-pad: 1.45mm;
  --detail-gap: 0.75mm;
  --name-size: 4.15mm;
  --detail-size: 3.25mm;
  --notes-size: 3.05mm;
  position: relative;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto minmax(0, 1fr);
  padding: 0 3mm;
}
.tier + .tier::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.5mm;
  bottom: 1mm;
  border-left: 0.2mm solid #c9b58f;
}
.tier:first-child { padding-left: 0; }
.tier:last-child { padding-right: 0; }
.tier[data-density="1"] { --product-pad: 1.1mm; --detail-gap: 0.55mm; }
.tier[data-density="2"] { --product-pad: 0.75mm; --detail-gap: 0.4mm; }
.tier[data-density="3"] { --product-pad: 0.55mm; --detail-gap: 0.3mm; --name-size: 3.9mm; --detail-size: 3mm; --notes-size: 2.8mm; }
.tier[data-density="4"] { --product-pad: 0.4mm; --detail-gap: 0.25mm; --name-size: 3.7mm; --detail-size: 2.8mm; --notes-size: 2.6mm; }
.tier-header { text-align: center; }
.tier-accent {
  position: relative;
  height: 0.9mm;
  margin: 0 2.5mm 2.7mm;
  background: none;
}
/* Solid bars on each side of the ornament (no gradients: some PDF viewers mis-render them) */
.tier-accent::before,
.tier-accent::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: calc(50% - 3.4mm);
  background-color: var(--accent);
}
.tier-accent::before { left: 0; }
.tier-accent::after { right: 0; }
.tier-accent span {
  position: absolute;
  top: 50%;
  left: 50%;
  color: var(--accent);
  font-size: 4.4mm;
  line-height: 1;
  transform: translate(-50%, -52%);
}
.tier h2 {
  margin: 0;
  padding: 0 1mm 2.6mm;
  border-bottom: 0.2mm solid var(--hairline);
  font-family: "Newsreader", Georgia, serif;
  font-size: 4.8mm;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.012em;
  text-transform: uppercase;
  white-space: nowrap;
}
.prices {
  display: grid;
  grid-template-columns: repeat(var(--price-count, 4), minmax(0, 1fr));
  margin-bottom: 0.5mm;
  padding: 2.2mm 0 2.4mm;
  border-bottom: 0.2mm solid var(--hairline);
  background-color: var(--accent-tint, rgba(181, 138, 75, 0.07));
}
.price { min-width: 0; text-align: center; }
.price + .price { border-left: 0.15mm solid var(--accent-line, rgba(181, 138, 75, 0.25)); }
.price-weight, .price-value { display: block; white-space: nowrap; }
.price-weight { color: #55564f; font-size: 2.75mm; text-transform: uppercase; }
.price-value { margin-top: 1.1mm; font-size: 3.2mm; letter-spacing: -0.01em; }
.price-per { display: block; margin-top: 0.7mm; color: #6d6e66; font-size: 2.6mm; white-space: nowrap; }
.price-per:empty { visibility: hidden; }
[data-menu="preroll"] .price-per { font-size: 2.2mm; }
.products { min-height: 0; display: flex; flex-direction: column; }
.product {
  min-height: 0;
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--product-pad) 0.8mm;
  border-bottom: 0.18mm solid #ddd1bd;
  break-inside: avoid;
  page-break-inside: avoid;
}
.product:last-child { border-bottom: 0; }
.product-title-row { display: flex; gap: 2mm; align-items: baseline; justify-content: space-between; }
.product h3 {
  min-width: 0;
  margin: 0;
  font-family: "Newsreader", Georgia, serif;
  font-size: calc(var(--name-size) * var(--fit, 1));
  white-space: nowrap;
  font-weight: 700;
  line-height: 1.02;
  color: #161713;
}
.product[data-name-fit="one-line"] h3 {
  font-size: calc(min(var(--name-size), 3.5mm) * var(--fit, 1));
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.thc {
  flex: 0 0 auto;
  color: var(--accent);
  font-family: "Newsreader", Georgia, serif;
  font-size: calc(var(--detail-size) * 0.95);
  font-style: italic;
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.thc small {
  margin-right: 0.6mm;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.62em;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.08em;
  vertical-align: 0.12em;
}
.lineage, .notes { margin: var(--detail-gap) 0 0; line-height: 1.1; }
.lineage { color: #2c2d27; font-family: "Newsreader", Georgia, serif; font-size: calc(var(--detail-size) * var(--fit, 1)); font-style: italic; white-space: nowrap; }
.notes { color: #55564f; font-size: calc(var(--notes-size) * var(--fit, 1)); white-space: nowrap; }
/* Text that still does not fit at 82% wraps instead of being cut off */
.product .is-wrapped { white-space: normal; line-height: 1.18; }

/* ---------- Footer ---------- */
.menu-footer {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 1fr 145mm 1fr;
  align-items: center;
  margin: 0 20mm;
  padding: 0;
  border-top: 0.2mm solid #cdbb98;
  color: #6d5f45;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}
.menu-footer > p { margin: 0; font-size: 2.1mm; line-height: 1; white-space: nowrap; }
.menu-footer > p:first-child { padding-left: 0; text-align: right; padding-right: 3mm; }
.menu-footer > p:last-child { padding-right: 0; text-align: left; padding-left: 3mm; }
.footer-wordmark { text-align: center; }
.footer-rule {
  display: grid;
  grid-template-columns: 1fr auto auto auto 1fr;
  align-items: center;
  gap: 2.4mm;
  color: #a88a57;
}
.footer-rule i { height: 0; border-top: 0.2mm solid #b89e70; }
.footer-rule span { font-size: 2.2mm; }
.footer-rule strong {
  color: #9a7a45;
  font-family: "Newsreader", Georgia, serif;
  font-size: 4.3mm;
  font-weight: 500;
  letter-spacing: 0.55em;
  margin-right: -0.55em;
  white-space: nowrap;
}
.footer-wordmark small { display: block; margin-top: 1.4mm; font-size: 1.75mm; color: #55564f; letter-spacing: 0.26em; }
.footer-wordmark small span { color: #a88a57; margin: 0 2mm; }
/* ---------- Pre-roll menu ---------- */
[data-menu="preroll"] .masthead { background: #2b2a28 url("assets/header-clean-charcoal.png") center / 100% 100% no-repeat; }
.masthead h1 { left: 0; right: 0; overflow: visible; }
.product--roll { justify-content: center; }
.roll-type {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: baseline;
  gap: 2mm;
  margin: var(--detail-gap) 0 0;
  min-width: 0;
}
.roll-strain {
  flex: 0 0 auto;
  color: #6d5f45;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1.85mm;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.roll-strain:empty { display: none; }
.roll-type .lineage {
  margin: 0;
  min-width: 0;
  white-space: nowrap;
}
.roll-lineage {
  min-width: 0;
  color: #2c2d27;
  font-family: "Newsreader", Georgia, serif;
  font-size: calc(var(--detail-size) * var(--fit, 1));
  font-style: italic;
  white-space: nowrap;
}
.roll-type .lineage.is-wrapped,
.roll-lineage.is-wrapped {
  white-space: normal;
  overflow-wrap: normal;
}
[data-menu="preroll"] .price-weight { font-size: 2.3mm; letter-spacing: -0.03em; }
[data-menu="preroll"] .price-value { font-size: 3mm; letter-spacing: -0.02em; }
.menu-footer--promise { display: flex; justify-content: center; }
.promise-items {
  display: flex;
  align-items: center;
  gap: 5mm;
  text-transform: none;
  letter-spacing: 0.02em;
}
.promise-items .promise-label { margin: 0; font-size: 1.9mm; color: #9a7a45; letter-spacing: 0.3em; text-transform: uppercase; }
.promise-items i { font-style: normal; color: #a88a57; font-size: 2.2mm; }
.promise-items p { margin: 0; display: flex; align-items: baseline; gap: 2.2mm; white-space: nowrap; }
.promise-items strong {
  color: #9a7a45;
  font-family: "Newsreader", Georgia, serif;
  font-size: 3.4mm;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}
.promise-items span { color: #55564f; font-size: 2mm; }
.load-error { grid-column: 1 / -1; margin: 20mm auto; color: #872f25; }

@page { size: A4 landscape; margin: 0; }
@media print {
  html, body { width: var(--sheet-w); height: var(--sheet-h); background: #fff; }
  body { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .preview-toolbar, .overflow-warning { display: none !important; }
  .menu-sheet { width: var(--sheet-w); height: var(--sheet-h); margin: 0; box-shadow: none; break-after: page; page-break-after: always; }
  .menu-sheet:last-of-type { break-after: auto; page-break-after: auto; }
}
