/* The menu and wine card pages: built to look like the printed cards from the Fabro app
   (src/lib/wine-pdf.ts). OCR-B headings, Zen Kaku Gothic lines, ink #231f20 on white. */
@font-face { font-family: "OCR-B"; src: url("/shared/fonts/ocrb.otf") format("opentype"); font-display: swap; }
@font-face { font-family: "Zen Kaku"; src: url("/shared/fonts/zen-regular.ttf") format("truetype"); font-display: swap; }

.sheet {
  --ink: #231f20;
  background: #fff;
  color: var(--ink);
  font-family: "Zen Kaku", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  /* The PDFs draw every letter with a thin outline in the ink colour. */
  -webkit-text-stroke: 0.25px var(--ink);
  max-width: 980px;
  margin: 0 auto;
  padding: 40px 32px 32px;
  font-variant-ligatures: none;
}
.sheet h2 {
  font-family: "OCR-B", monospace;
  font-weight: normal;
  font-size: 27px;
  letter-spacing: 0.08em;
  margin: 30px 0 14px;
  line-height: 1.2;
  break-after: avoid;
}
.sheet .group:first-child h2 { margin-top: 0; }

/* One wine per line, the columns of the A4 card: year · name · region · price · grapes.
   The cellar numbers stay off the website. */
.wine {
  display: grid;
  grid-template-columns: 4.2em minmax(0, 23fr) minmax(0, 8fr) 5.6em minmax(0, 16fr);
  column-gap: 8px;
  break-inside: avoid;
}
.wine > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wine .long { font-size: 0.82em; line-height: 1.95; }
.no-grapes .wine { grid-template-columns: 4.2em minmax(0, 24fr) minmax(0, 8fr) 5.6em; }
.no-grapes .wine .grapes { display: none; }

/* Fabro's card is two A5 halves side by side. */
.two-col { columns: 2; column-gap: 56px; max-width: 1240px; }
.two-col .wine { font-size: 13px; }

.sheet .note { font-size: 12px; text-align: center; margin: 36px 0 0; }
.sheet .pointer { font-family: "OCR-B", monospace; text-align: center; font-size: 14px; margin: 36px 0 0; line-height: 1.5; break-inside: avoid; }
.sheet .pointer a { color: inherit; }
.sheet .pdf { display: block; text-align: center; font-size: 12px; margin-top: 20px; color: var(--ink); }
.sheet .loading { text-align: center; padding: 60px 0; }

/* Menu: section headings like the wine card, then dish, description and price. */
.dish { display: grid; grid-template-columns: 1fr auto; column-gap: 16px; margin-bottom: 10px; break-inside: avoid; }
.dish .name { font-size: 16px; }
.dish .desc { grid-column: 1; font-size: 13px; color: #404041; line-height: 1.4; }
.dish .price { white-space: nowrap; font-size: 15px; }

@media (max-width: 760px) {
  .sheet { padding: 28px 16px 24px; font-size: 13px; }
  .sheet h2 { font-size: 22px; margin-top: 26px; }
  .two-col { columns: 1; }
  /* On a phone each wine becomes two lines: year · name · price, then region · grapes. */
  .wine, .no-grapes .wine {
    grid-template-columns: 3.4em minmax(0, 1fr) auto;
    grid-template-areas: "year name price" ". sub sub";
    row-gap: 0;
    padding: 5px 0;
    border-bottom: 1px solid #eee;
    line-height: 1.4;
  }
  .wine .year { grid-area: year; }
  .wine .name { grid-area: name; white-space: normal; }
  .wine .long { font-size: 1em; line-height: 1.4; }
  .wine .price { grid-area: price; text-align: right; }
  .wine .region { grid-area: sub; font-size: 11.5px; white-space: normal; }
  .wine .grapes { display: none; }
  .wine .region[data-grapes]::after { content: " · " attr(data-grapes); }
}

/* Wine card: old parchment like a treasure map. Warm tea-stained paper, mottled blotches,
   a few faint stains and dark burnt edges. All CSS/SVG noise, no images to load. */
.sheet[data-card="wine"] {
  --ink: #2a1d10;
  background-color: #e6cf9c;
  background-image:
    radial-gradient(ellipse 38% 22% at 82% 14%, rgba(140, 90, 30, 0.16), rgba(140, 90, 30, 0) 70%),
    radial-gradient(circle at 14% 46%, rgba(120, 75, 25, 0) 7%, rgba(120, 75, 25, 0.13) 8%, rgba(120, 75, 25, 0) 9.5%),
    radial-gradient(ellipse 30% 18% at 22% 78%, rgba(150, 100, 35, 0.14), rgba(150, 100, 35, 0) 70%),
    radial-gradient(ellipse at center, rgba(250, 232, 190, 0.5) 0%, rgba(250, 232, 190, 0) 55%),
    radial-gradient(ellipse at center, rgba(90, 50, 15, 0) 50%, rgba(90, 50, 15, 0.32) 100%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='300' height='300'><filter id='g'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.3  0 0 0 0 0.2  0 0 0 0 0.08  0 0 0 0.14 0'/></filter><rect width='100%' height='100%' filter='url(%23g)'/></svg>"),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='700' height='700'><filter id='m'><feTurbulence type='fractalNoise' baseFrequency='0.006' numOctaves='4' seed='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.45  0 0 0 0 0.28  0 0 0 0 0.08  0 0 0 0.5 -0.12'/></filter><rect width='100%' height='100%' filter='url(%23m)'/></svg>"),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='600' height='600'><filter id='f'><feTurbulence type='fractalNoise' baseFrequency='0.012 0.05' numOctaves='4' seed='7' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.4  0 0 0 0 0.26  0 0 0 0 0.1  0 0 0 0.14 0'/></filter><rect width='100%' height='100%' filter='url(%23f)'/></svg>");
  background-size: 100% 1400px, 100% 1600px, 100% 1500px, 100% 100%, 100% 100%, 300px 300px, 700px 700px, 600px 600px;
  background-repeat: repeat-y, repeat-y, repeat-y, no-repeat, no-repeat, repeat, repeat, repeat;
  border-radius: 3px 7px 4px 9px / 8px 4px 10px 5px;
  box-shadow:
    inset 0 0 6px 2px rgba(70, 35, 8, 0.55),
    inset 0 0 40px 10px rgba(110, 60, 15, 0.35),
    inset 0 0 120px 30px rgba(130, 80, 25, 0.18),
    0 2px 4px rgba(40, 22, 6, 0.3),
    0 12px 36px rgba(40, 22, 6, 0.35);
}
.sheet[data-card="wine"] h2 { color: #3a2410; }
