/* Palette and type from the Beer N Gear Taproom (docs/PLAN.md "UI design: the brewery tap-list look"). */
:root {
  --wood-bg: #2b1d14;
  --wood-frame: #5a3a22;
  --wood-line: #6b4a30;
  --chalkboard: #1e2321;
  --chalk: #ece7dc;
  --chalk-soft: #cfc6b4;
  --chalk-dim: #a8a090;
  --chalk-rule: #5c625e;
  --amber: #f0b44c;
  --amber-ink: #7a4f1f;
  --font-display: "Oswald", "Arial Narrow", sans-serif;
  --font-chalk: "Caveat", cursive;
  --font-body: "Work Sans", system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--wood-bg); color: var(--chalk); font-family: var(--font-body); -webkit-text-size-adjust: 100%; }
body {
  min-height: 100vh;
  line-height: 1.5;
  background-image: repeating-linear-gradient(92deg, rgb(0 0 0 / 0.08) 0 2px, transparent 2px 9px, rgb(255 255 255 / 0.015) 9px 10px, transparent 10px 23px);
}
a { color: var(--amber); }
img { max-width: 100%; height: auto; display: block; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--amber); color: var(--wood-bg); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }
.dim { color: var(--chalk-dim); }
.small { font-size: 0.875rem; }
.chalk, .kicker, .quote { font-family: var(--font-chalk); }

/* Header */
.site-header { border-bottom: 4px solid var(--wood-frame); background: rgb(0 0 0 / 0.18); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--chalk); }
.pint { width: 40px; height: 40px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; font-size: 1.35rem; }
.brand-sub { font-family: var(--font-chalk); color: var(--chalk-soft); font-size: 1.3rem; margin-top: 2px; }
.nav { display: flex; gap: 6px; }
.tab {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 4px;
  font-family: var(--font-display); font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.95rem;
  color: var(--chalk-soft); text-decoration: none;
}
.tab:hover { color: var(--chalk); }
.tab[aria-current="page"] { background: var(--amber); color: var(--wood-bg); }
.icon { width: 20px; height: 20px; }
.cart-count:not(:empty) {
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; display: inline-grid; place-items: center;
  background: var(--chalk); color: var(--wood-bg); font-size: 0.8rem; letter-spacing: 0;
}
.notice-bar { margin: 0; text-align: center; padding: 6px 16px; font-size: 0.85rem; color: var(--chalk-soft); background: rgb(0 0 0 / 0.3); border-bottom: 1px dashed var(--wood-line); }

main { padding-top: 24px; padding-bottom: 32px; }

/* Board: chalkboard panel in a wood frame */
.board {
  background: var(--chalkboard); border: 14px solid var(--wood-frame); border-radius: 6px;
  box-shadow: inset 0 0 40px rgb(0 0 0 / 0.45), 0 6px 16px rgb(0 0 0 / 0.35);
}
.board-head { text-align: center; padding: 32px 16px 0; }
.kicker { margin: 0; font-size: 1.5rem; line-height: 1.1; color: var(--chalk-soft); }
.board h1, .board h2 { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; margin: 0; text-wrap: balance; }
.board-head h1 { font-size: clamp(2rem, 6vw, 3rem); }
.count { margin: 4px 0 0; font-size: 0.875rem; color: var(--chalk-dim); letter-spacing: 0.08em; }
.board-body { padding: 24px; }
.empty { text-align: center; color: var(--chalk-soft); }

/* Product grid */
.grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.card { display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: var(--chalk); padding: 12px; border-radius: 6px; border: 2px dashed transparent; height: 100%; }
.card:hover { border-color: var(--chalk-rule); }
.card img { border-radius: 4px; border: 1px solid rgb(236 231 220 / 0.08); }
.row { display: flex; align-items: baseline; gap: 8px; margin: 0; }
.name { font-family: var(--font-display); font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; font-size: 1.1rem; }
.leader { flex: 1; border-bottom: 2px dotted var(--chalk-rule); transform: translateY(-4px); min-width: 16px; }
.price { font-family: var(--font-display); font-weight: 600; color: var(--amber); letter-spacing: 0.05em; white-space: nowrap; }
.quote { font-size: 1.3rem; color: var(--chalk-soft); line-height: 1.1; }

/* Product page */
.crumbs { margin-bottom: 12px; }
.crumbs a { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.1em; text-decoration: none; display: inline-flex; min-height: 44px; align-items: center; }
.product-grid { display: grid; gap: 28px; padding: 24px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
.photo img { width: 100%; border-radius: 4px; }
.buy h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.buy .kicker { font-size: 1.6rem; }
.big-price { font-family: var(--font-display); font-size: 2rem; color: var(--amber); margin: 4px 0 8px; letter-spacing: 0.04em; }
.desc { color: var(--chalk-soft); margin: 0 0 16px; }
.opts { border: 0; margin: 0 0 16px; padding: 0; }
.opt-title {
  font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.15em; color: var(--amber); font-weight: 600;
  padding: 0 0 4px; margin: 0 0 10px; border-bottom: 2px dashed var(--chalk-rule); width: 100%; display: block;
}
.opt-title span { color: var(--chalk-soft); letter-spacing: 0.08em; margin-left: 6px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { position: relative; }
.pill input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pill > span:last-child, .swatch-pill {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; min-width: 52px; justify-content: center; padding: 0 16px;
  border-radius: 999px; border: 2px solid var(--chalk-soft); color: var(--chalk); font-weight: 500;
}
.swatch-pill > span:last-child { border: 0; padding: 0; min-height: 0; min-width: 0; }
.swatch { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--chalk-soft); }
.pill:not(.swatch-pill) input:checked ~ span:last-child { background: var(--chalk); color: var(--wood-bg); border-color: var(--chalk); }
.swatch-pill:has(input:checked) { background: var(--chalk); color: var(--wood-bg); border-color: var(--chalk); }
.swatch-pill:has(input:checked) > span:last-child { background: none; color: var(--wood-bg); }
.pill:has(input:focus-visible) { outline: 3px solid var(--amber); outline-offset: 2px; border-radius: 999px; }
.pill input:disabled ~ span:last-child { opacity: 0.4; text-decoration: line-through; }
.qty-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.qty-row .opt-title { width: auto; border: 0; margin: 0; padding: 0; }
.qty-input, .signup input {
  min-height: 44px; border-radius: 4px; border: 2px solid var(--wood-line); background: var(--chalkboard); color: var(--chalk);
  font: inherit; padding: 0 12px;
}
.qty-input { width: 80px; }
.btn {
  min-height: 48px; padding: 0 22px; border-radius: 4px; border: 0; cursor: pointer;
  font-family: var(--font-display); font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; font-size: 1rem;
}
.btn-amber { background: var(--amber); color: var(--wood-bg); }
.btn-amber:hover { filter: brightness(1.07); }
.btn-dark { background: var(--wood-bg); color: var(--chalk); }
.btn-wide { width: 100%; margin-top: 12px; }
.added { min-height: 1.5em; margin: 10px 0 0; font-family: var(--font-chalk); font-size: 1.35rem; color: var(--chalk-soft); }
.added a { font-family: var(--font-body); font-size: 1rem; margin-left: 6px; }

/* Cart */
.line { display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 2px dashed var(--chalk-rule); }
.line img { width: 72px; height: 72px; border-radius: 4px; }
.line .meta { color: var(--chalk-dim); font-size: 0.9rem; margin: 2px 0 0; }
.line .name a { color: var(--chalk); text-decoration: none; }
.stepper { display: inline-flex; align-items: center; border: 2px solid var(--wood-line); border-radius: 4px; margin-top: 8px; }
.stepper button { width: 44px; height: 40px; background: none; border: 0; color: var(--chalk); font-size: 1.2rem; cursor: pointer; }
.stepper output { min-width: 32px; text-align: center; font-weight: 600; }
.remove { background: none; border: 0; color: var(--chalk-dim); text-decoration: underline; cursor: pointer; font: inherit; font-size: 0.9rem; min-height: 44px; margin-left: 10px; }
.line .price { font-size: 1.15rem; }
.cart-foot { margin-top: 20px; max-width: 420px; margin-left: auto; }
.total .name { font-size: 1.3rem; }
.total .price { font-size: 1.4rem; }

/* Chalk-paper card: the audience's space (Coming soon + sign-up) */
.paper {
  margin: 24px auto 0; max-width: 520px; background: var(--chalk); color: var(--wood-bg);
  border: 10px solid var(--wood-frame); border-radius: 6px; padding: 18px 20px;
}
.paper-kicker { font-family: var(--font-chalk); color: var(--amber-ink); font-size: 1.4rem; margin: 0; line-height: 1.1; }
.paper h2 { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.12em; margin: 0 0 8px; font-size: 1.4rem; color: var(--wood-bg); }
.paper p { margin: 0 0 12px; }
.signup label { display: block; font-weight: 600; margin-bottom: 6px; }
.signup-row { display: flex; gap: 8px; flex-wrap: wrap; }
.signup input { flex: 1 1 200px; background: #fff; color: var(--wood-bg); border-color: #b8ae9a; }
.signup [role="status"] { margin: 8px 0 0; color: var(--amber-ink); font-weight: 600; }

.site-footer { padding: 24px 16px 40px; text-align: center; color: var(--chalk-dim); font-size: 0.9rem; }
.site-footer .chalk { font-size: 1.5rem; color: var(--chalk-soft); margin: 0; }

@media (max-width: 720px) {
  .board { border-width: 10px; }
  .board-body, .product-grid { padding: 16px; }
  .product-grid { grid-template-columns: 1fr; }
  .brand-name { font-size: 1.1rem; }
  .brand-sub { font-size: 1.15rem; }
  .pint { width: 34px; height: 34px; }
  .tab { padding: 0 10px; }
  .tab span:not(.cart-count) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .nav a[href="/"] { display: none; }
  .line { grid-template-columns: 60px 1fr; }
  .line img { width: 60px; height: 60px; }
  .line > .price { grid-column: 2; }
}
