/* Five of the Week: chalkboard theme
   The page is a blackboard in a wooden frame (html = frame, body = board).
   Chalk texture comes from inline SVG noise, so it works offline and from disk. */
:root {
  --slate: #191a1b;   /* blackboard */
  --slate-2: #222425;
  --chalk: #f1eee4;
  --chalk-dim: #c9c7bd;
  --dust: rgba(241, 238, 228, 0.42);
  --yellow: #f6d66b;   /* main accent (was brass) */
  --pink: #f4a6bf;
  --blue: #a8d8ea;
  --green: #bfe39a;
  --lilac: #d9c8f0;    /* smoked serves */
  --wood: #6b4227;
  --wood-dark: #3f2615;

  --display: "Fredericka the Great", "Cabin Sketch", Georgia, serif;
  --script: "Caveat Brush", "Segoe Print", "Bradley Hand", cursive;
  --body: "Patrick Hand", "Segoe Print", "Comic Neue", system-ui, sans-serif;

  /* hand-drawn box corners */
  --wobble: 255px 14px 225px 16px / 16px 225px 14px 255px;
  --wobble-2: 14px 245px 16px 230px / 235px 16px 250px 14px;
  /* gentler version for big boxes, where the above looks bulgy */
  --wobble-lg: 26px 7px 22px 9px / 9px 22px 7px 26px;
  --wobble-lg-2: 8px 24px 10px 20px / 22px 9px 26px 8px;

  /* chalk dust speckle, white at low alpha */
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 .34 0 0 0 -.09'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  /* big cloudy patches: half-erased chalk left on the board */
  --residue: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1600 1000' preserveAspectRatio='none'%3E%3Cfilter id='r'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.0022 .006' numOctaves='4' seed='7'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 .3 0 0 0 -.1'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23r)'/%3E%3C/svg%3E");
  /* lighter speckle for smaller chalk text and chalk lines */
  --chalk-mask-soft: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='s'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.3' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 0 0 0 -.9'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23s)'/%3E%3C/svg%3E");
  /* speckled mask that knocks holes in large chalk lettering */
  --chalk-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='m'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 5 0 0 0 -1.6'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23m)'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }

/* The wooden frame */
html {
  background:
    repeating-linear-gradient(92deg, rgba(0,0,0,0) 0 7px, rgba(0,0,0,.10) 7px 9px, rgba(0,0,0,0) 9px 19px),
    repeating-linear-gradient(88deg, rgba(255,220,180,.05) 0 3px, rgba(0,0,0,0) 3px 23px),
    linear-gradient(90deg, var(--wood-dark), var(--wood) 30%, #7a4c2c 60%, var(--wood-dark));
}

/* The board */
body {
  margin: clamp(10px, 2vw, 24px);
  min-height: calc(100vh - 2 * clamp(10px, 2vw, 24px));
  display: flex; flex-direction: column;
  color: var(--chalk);
  font: 400 1.125rem/1.55 var(--body);
  border-radius: 4px;
  background:
    var(--noise),
    radial-gradient(700px 220px at 18% 22%, rgba(241,238,228,.07), transparent 70%),  /* eraser sweeps */
    radial-gradient(560px 180px at 78% 64%, rgba(241,238,228,.06), transparent 70%),
    radial-gradient(900px 300px at 60% 4%, rgba(241,238,228,.05), transparent 70%),
    linear-gradient(170deg, var(--slate-2), var(--slate) 55%, #1a2420);
  box-shadow:
    inset 0 0 0 1px rgba(0,0,0,.6),
    inset 0 0 90px rgba(0,0,0,.55),
    0 0 0 3px rgba(0,0,0,.35);
  text-shadow: 0 0 1px rgba(241, 238, 228, 0.5), 0 0 6px rgba(241, 238, 228, 0.12);
}
main { flex: 1 0 auto; width: 100%; }
/* half-erased haze, stretched once over the whole board (no tiling seams) */
body { position: relative; isolation: isolate; }
body::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: var(--residue) no-repeat 0 0 / 100% 100%;
}
.masthead, .foot { width: 100%; }

a { color: inherit; }
button { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px dashed var(--yellow);
  outline-offset: 3px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
[hidden] { display: none !important; }

/* Chalk lettering: speckled edges on big type */
.brand, .hero h1, .hero .theme, .recipe h1, .year h2, .az-group h2 {
  -webkit-mask-image: var(--chalk-mask);
          mask-image: var(--chalk-mask);
}

.card h2.label, .kicker, .label, .weeks .th, .sitenav, .more {
  -webkit-mask-image: var(--chalk-mask-soft);
          mask-image: var(--chalk-mask-soft);
}

/* Chalk-drawn boxes: the outline is a pseudo-element so it can be speckled
   like real chalk without speckling the text inside. */
.drink, .card { border-color: transparent !important; }
.drink::after, .card::after {
  content: ""; position: absolute; inset: -2px; pointer-events: none;
  border: 2.5px solid rgba(241, 238, 228, 0.62); border-radius: inherit;
  -webkit-mask-image: var(--chalk-mask-soft);
          mask-image: var(--chalk-mask-soft);
}
.card { position: relative; }

/* ---------- Masthead ---------- */
.masthead {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  max-width: 1180px; margin: 0 auto; padding: 1.4rem 1.5rem 0.6rem;
}
.brand {
  font: 400 1.7rem/1 var(--display);
  text-decoration: none; letter-spacing: 0.02em;
}
.brand span { font: 400 1.5rem/1 var(--script); color: var(--yellow); padding: 0 0.15em; }

.sitenav { display: flex; gap: 1.4rem; font: 400 1.3rem/1 var(--script); }
.sitenav a { text-decoration: none; color: var(--chalk-dim); }
.sitenav a:hover { color: var(--yellow); text-decoration: underline wavy; text-underline-offset: 5px; }

.weeknav { display: flex; gap: 0.5rem; justify-content: flex-end; padding-top: 1rem; }
.weeknav button {
  background: transparent; cursor: pointer;
  border: 2px solid var(--dust); border-radius: var(--wobble);
  padding: 0.3rem 1rem; font: 400 1.25rem/1.2 var(--script);
  transition: border-color .2s, color .2s;
}
.weeknav button:hover { border-color: var(--yellow); color: var(--yellow); }
.weeknav .today[aria-current="true"] { border-color: var(--yellow); color: var(--yellow); }

main { max-width: 1180px; margin: 0 auto; padding: 0 1.5rem 4rem; }

/* ---------- Hero ---------- */
.hero { padding: 3rem 0 2.25rem; max-width: 820px; }
.kicker {
  margin: 0 0 0.4rem; color: var(--yellow);
  font: 400 1.5rem/1.2 var(--script); letter-spacing: 0.02em;
}
.hero h1, .hero .theme {
  margin: 0; font: 400 clamp(2.6rem, 7vw, 5rem)/1.05 var(--display);
  letter-spacing: 0.01em;
}
/* hand-drawn underline under the week's theme */
.hero .theme::after, .recipe h1::after, .hero h1::after {
  content: ""; display: block; width: min(320px, 70%); height: 10px; margin-top: 0.6rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 10' preserveAspectRatio='none'%3E%3Cpath d='M2 6 C 60 2, 120 9, 180 5 S 280 3, 318 6' fill='none' stroke='%23f6d66b' stroke-width='3' stroke-linecap='round' opacity='.85'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
}
.blurb { margin: 1rem 0 0; color: var(--chalk-dim); font-size: 1.3rem; }

/* ---------- Menu cards ---------- */
.menu {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1.6rem;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  counter-reset: drink;
}
.drink {
  position: relative; counter-increment: drink;
  background: rgba(241, 238, 228, 0.025);
  border: 2px solid var(--dust); border-radius: var(--wobble-lg);
  padding: 1.5rem 1.5rem 1.3rem;
  display: flex; flex-direction: column;
  animation: chalk-in .6s both;
}
.drink:nth-child(even) { border-radius: var(--wobble-lg-2); transform: rotate(0.35deg); }
.drink:nth-child(odd) { transform: rotate(-0.3deg); }
.drink:nth-child(2) { animation-delay: .07s; }
.drink:nth-child(3) { animation-delay: .14s; }
.drink:nth-child(4) { animation-delay: .21s; }
.drink:nth-child(5) { animation-delay: .28s; }
@keyframes chalk-in { from { opacity: 0; filter: blur(2px); } to { opacity: 1; filter: none; } }

.drink::before {
  content: counter(drink);
  position: absolute; top: 0.7rem; right: 1.2rem;
  font: 400 2.6rem/1 var(--script); color: var(--dust);
}
.drink h3 { margin: 0 2.5rem 0.45rem 0; font: 400 1.65rem/1.15 var(--display); }
.drink h3 a { text-decoration: none; }
.drink h3 a:hover { color: var(--yellow); }

.meta { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-bottom: 1rem; }
.tag {
  font: 400 1.05rem/1.2 var(--script); letter-spacing: 0.02em;
  padding: 0.05rem 0.6rem; border-radius: var(--wobble);
  border: 1.5px solid var(--dust); color: var(--chalk-dim);
}
.tag.base { border-color: var(--yellow); color: var(--yellow); }
.tag.smoke { border-color: var(--lilac); color: var(--lilac); border-style: dashed; }
.tag.smoke::before { content: "\2668\FE0E"; margin-right: 0.3em; } /* ♨ text style */

.ingredients { list-style: none; margin: 0 0 1rem; padding: 0; }
.ingredients li {
  display: grid; grid-template-columns: 5.5rem 1fr; gap: 0.75rem;
  padding: 0.3rem 0; border-bottom: 2px dotted rgba(241, 238, 228, 0.16);
}
.ingredients li:last-child { border-bottom: 0; }
.amount { color: var(--yellow); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ingredients li.no-amount { grid-template-columns: 1fr; }

.label {
  display: block; margin-bottom: 0.1rem;
  font: 400 1.2rem/1.2 var(--script); color: var(--blue);
}
.method, .garnish { margin: 0 0 0.85rem; }
.note { margin: auto 0 0; padding-top: 0.9rem; color: var(--chalk-dim); font-style: italic; }

.more {
  margin-top: auto; padding-top: 0.6rem; align-self: flex-start;
  color: var(--pink); text-decoration: none; font: 400 1.3rem/1.2 var(--script);
}
.more:hover { text-decoration: underline wavy; text-underline-offset: 4px; }

/* ---------- Year calendar ---------- */
.year { margin-top: 5rem; padding-top: 2.5rem; border-top: 2px dashed var(--dust); }
.year-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem; }
.year h2 { margin: 0; font: 400 2.2rem/1.1 var(--display); }
.search input {
  width: min(320px, 80vw); padding: 0.45rem 1rem;
  background: rgba(0, 0, 0, 0.18); color: var(--chalk);
  border: 2px solid var(--dust); border-radius: var(--wobble);
  font: 400 1.15rem/1.3 var(--body);
}
.search input::placeholder { color: var(--chalk-dim); opacity: .8; }
.search input:focus { outline: none; border-color: var(--yellow); }
.search-results { color: var(--chalk-dim); margin: 1rem 0 0; }

.weeks {
  list-style: none; margin: 1.5rem 0 0; padding: 0;
  display: grid; gap: 0.7rem; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
.weeks a {
  display: block; width: 100%; text-decoration: none; cursor: pointer;
  border: 1.5px solid rgba(241, 238, 228, 0.18); border-radius: var(--wobble-2);
  padding: 0.55rem 0.85rem; transition: border-color .2s, opacity .2s;
}
.weeks li:nth-child(3n) a { border-radius: var(--wobble); }
.weeks a:hover { border-color: var(--yellow); }
.weeks .wk { display: block; font: 400 1.05rem/1.2 var(--script); color: var(--chalk-dim); }
.weeks .th { font-size: 1.1rem; line-height: 1.3; }
.weeks a[aria-current] { border-color: var(--yellow); background: rgba(246, 214, 107, 0.08); }
.weeks a.is-now .wk::after { content: " · now"; color: var(--yellow); }
.weeks a.dim { opacity: 0.25; }
.weeks a.hit { border-color: var(--pink); }

/* Weeks: without JS every week is listed; with JS only one shows */
.week + .week { margin-top: 4rem; }
.js .week + .week { margin-top: 0; }
.js .hero { padding-top: 1.25rem; }

/* ---------- Footer: the chalk ledge ---------- */
.foot {
  max-width: 1180px; margin: 0 auto; padding: 2rem 1.5rem 2.5rem;
  color: var(--chalk-dim); font: 400 1.15rem/1.4 var(--script);
  border-top: 2px dashed var(--dust);
}

/* The wooden chalk ledge along the bottom of the board, with chalk and a duster */
body::after {
  content: ""; display: block; flex: none; height: 30px; margin-top: 1rem;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='30'%3E%3Crect x='10' y='4' width='58' height='9' rx='4.5' fill='%23f1eee4'/%3E%3Crect x='80' y='5' width='34' height='8' rx='4' fill='%23f6d66b'/%3E%3Crect x='124' y='4' width='22' height='9' rx='4.5' fill='%23f4a6bf'/%3E%3Crect x='190' y='2' width='96' height='8' rx='2' fill='%232d1b0e'/%3E%3Crect x='190' y='8' width='96' height='6' rx='1.5' fill='%23b9b4a8'/%3E%3C/svg%3E") no-repeat right 6% top -2px / 300px 30px,
    linear-gradient(180deg, rgba(255,230,200,.25) 0 2px, transparent 2px 11px, rgba(0,0,0,.35) 11px 12px, transparent 12px),
    repeating-linear-gradient(90deg, rgba(0,0,0,0) 0 11px, rgba(0,0,0,.10) 11px 13px, rgba(0,0,0,0) 13px 31px),
    linear-gradient(180deg, #8a5a36, #6b4227 45%, #3f2615);
  box-shadow: 0 -8px 14px -6px rgba(0,0,0,.6);
}

/* ---------- Recipe pages ---------- */
.recipe { padding: 2.5rem 0 1rem; }
.recipe h1 { margin: 0; font: 400 clamp(2.6rem, 7vw, 4.6rem)/1.05 var(--display); letter-spacing: 0.01em; }
.recipe .blurb { max-width: 700px; }
.kicker a { color: inherit; text-decoration: none; }
.kicker a:hover { text-decoration: underline wavy; text-underline-offset: 4px; }
.recipe-grid { display: grid; gap: 1.6rem; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); margin-top: 2.25rem; }
.card {
  background: rgba(241, 238, 228, 0.025);
  border: 2px solid var(--dust); border-radius: var(--wobble-lg);
  padding: 1.5rem;
}
.card + .card { border-radius: var(--wobble-lg-2); }
.card h2.label { margin: 0 0 0.35rem; font-size: 1.45rem; }
.card h2.label:not(:first-child) { margin-top: 1.1rem; }
.card .method { font-size: 1.2rem; }
.card .meta { margin: 1rem 0 0; }
.on-menu a { color: var(--pink); }
.card .smoked { border-left: 2px dashed var(--lilac); padding-left: 0.8rem; }
.card .smoked strong { color: var(--lilac); font-weight: 400; font-family: var(--script); font-size: 1.2em; }

/* Bottles from data/bar.json */
.classic-note, .stock-note { display: block; font: 400 1rem/1.2 var(--script); color: var(--chalk-dim); }
.stock-note { color: var(--pink); }
.stock-banner {
  max-width: 46rem; margin: 1.25rem 0 0; padding: 0.7rem 1rem;
  border: 2px dashed var(--pink); border-radius: var(--wobble);
}
.az-out { font: 400 1rem/1.3 var(--script); color: var(--pink); order: 1; margin-left: auto; }
.az-group li .az-base { order: 2; }
.bar { margin: 0 0 2.75rem; }
.bar .label { font-size: 1.6rem; }
.bottles { list-style: none; padding: 0; margin: 0.5rem 0 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); }
.bottles li {
  border: 2px solid var(--dust); border-radius: var(--wobble-lg);
  padding: 0.8rem 1rem;
}
.bottles li:nth-child(even) { border-radius: var(--wobble-lg-2); }
.bottles strong { font-weight: 400; color: var(--yellow); font-size: 1.2rem; }
.bottle-notes { font-size: 1rem; color: var(--chalk-dim); }

/* A-Z */
.az { columns: 260px; column-gap: 2.5rem; }
.az-group { break-inside: avoid; margin-bottom: 1.75rem; }
.az-group h2 { margin: 0 0 0.3rem; font: 400 2rem/1 var(--display); color: var(--yellow); }
.az-group ul { list-style: none; margin: 0; padding: 0; }
.az-group li { padding: 0.2rem 0; border-bottom: 2px dotted rgba(241, 238, 228, 0.14); display: flex; justify-content: space-between; gap: 1rem; }
.az-group a { text-decoration: none; }
.az-group a:hover { color: var(--yellow); }
.az-base { color: var(--chalk-dim); font: 400 1rem/1.3 var(--script); }

/* ---------- Small screens ---------- */
@media (max-width: 560px) {
  .masthead { flex-direction: column; align-items: flex-start; }
  .hero { padding-top: 2rem; }
  .menu { grid-template-columns: 1fr; }
  .drink, .drink:nth-child(odd), .drink:nth-child(even) { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .drink { animation: none; }
  * { transition: none !important; }
}

/* ---------- Print: plain ink on paper ---------- */
@media print {
  html, body { background: #fff; color: #000; box-shadow: none; text-shadow: none; margin: 0; }
  body::before, body::after, .drink::after, .card::after { display: none; }
  .drink, .card { border-color: #999 !important; }
  * { -webkit-mask-image: none !important; mask-image: none !important; }
  .brand, .hero .theme, .recipe h1, .hero h1 { -webkit-mask-image: none; mask-image: none; }
  .masthead nav, .weeknav, .year, .foot, .more { display: none; }
  .drink, .card { break-inside: avoid; background: none; border-color: #999; transform: none; animation: none; }
  .amount, .kicker, .label, .tag, .tag.base, .tag.smoke, .card .smoked strong, .brand span { color: #000; border-color: #999; }
}
