/* Bodega North LV, paper ticket */
:root {
  --paper: #f3ead8;
  --paper-2: #e7dcc6;
  --ink: #16120e;
  --ink-soft: #3a342c;
  --mute: #6a6156;
  --stamp: #b42318;
  --stamp-soft: #c94a3d;
  --rule: rgba(22, 18, 14, 0.22);
  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.45;
  min-height: 100%;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }

.skip {
  position: absolute;
  left: -999px;
  top: 0;
}
.skip:focus {
  left: 8px;
  top: 8px;
  z-index: 20;
  background: var(--paper);
  border: 2px solid var(--ink);
  padding: 0.4rem 0.6rem;
}

/* paper grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 8;
  opacity: 0.18;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.09  0 0 0 0 0.07  0 0 0 0 0.05  0 0 0 0.55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 7;
  box-shadow: inset 0 0 140px rgba(70, 40, 16, 0.12);
}

.page {
  width: min(1080px, calc(100% - 1.25rem));
  margin: 0.7rem auto 5.5rem;
  position: relative;
  z-index: 1;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  box-shadow: 0 0 0 6px var(--paper), 0 0 0 7.5px var(--ink);
}

.stripe {
  height: 10px;
  background: var(--stamp);
}

.deals {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
  padding: 0.45rem 0.8rem;
  border-bottom: 1px solid var(--ink);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.deals b { color: var(--stamp); font-weight: 600; }
.deals .today { color: var(--stamp); text-decoration: underline; text-underline-offset: 2px; }

.mast {
  position: relative;
  padding: 1.1rem 0.9rem 0.9rem;
  border-bottom: 1px solid var(--ink);
}
.kicker {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute);
}
.wordmark {
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-weight: 800;
  font-size: clamp(3.4rem, 16vw, 7.4rem);
  line-height: 0.82;
  letter-spacing: -0.03em;
  margin: 0.35rem 0 0.1rem;
}
.place {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1rem, 3.4vw, 1.45rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin: 0 0 0.65rem;
}
.lede {
  max-width: 28rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
  margin: 0 0 0.85rem;
}

.stamp {
  position: absolute;
  right: 0.7rem;
  top: 2.4rem;
  width: 6.4rem;
  height: 6.4rem;
  border: 3px solid var(--stamp);
  border-radius: 50%;
  color: var(--stamp);
  display: grid;
  place-items: center;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.2;
  transform: rotate(-13deg);
  box-shadow: inset 0 0 0 2px var(--stamp);
  background: rgba(243, 234, 216, 0.55);
  pointer-events: none;
}
.stamp span { display: block; padding: 0 0.4rem; }

.meta {
  display: grid;
  gap: 0.2rem;
  font-size: 0.78rem;
  color: var(--ink-soft);
}
.meta a { text-decoration: underline; text-underline-offset: 2px; }
.meta strong { color: var(--ink); font-weight: 600; }
.open-pill {
  display: inline-block;
  margin-top: 0.45rem;
  border: 1px solid var(--ink);
  padding: 0.1rem 0.4rem;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.open-pill.is-open { border-color: var(--stamp); color: var(--stamp); }
.open-pill.is-closed { opacity: 0.7; }

.cta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: 0.9rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.65rem 0.8rem;
  border: 2px solid var(--ink);
  background: var(--paper);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  font-weight: 600;
}
.btn:focus-visible { outline: 3px solid var(--stamp); outline-offset: 2px; }
.btn-primary { background: var(--stamp); color: var(--paper); border-color: var(--stamp); }
.btn-ghost:hover, .btn-primary:hover { filter: brightness(0.96); }
.btn[disabled], .btn.is-busy {
  opacity: 0.55;
  cursor: wait;
}

.hours-bar {
  padding: 0.45rem 0.9rem;
  border-bottom: 1px solid var(--ink);
  font-size: 0.75rem;
  letter-spacing: 0.03em;
}

.menu-grid {
  display: grid;
  gap: 0;
}
.col {
  padding: 1rem 0.9rem 1.2rem;
  border-bottom: 1px solid var(--ink);
}
.col:last-child { border-bottom: 0; }

.sec { margin: 0 0 1.35rem; }
.sec:last-child { margin-bottom: 0; }
.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0 0 0.45rem;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 0.2rem;
}
.sec-head h2 {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0;
}
.sec-head .tag {
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mute);
}
.art {
  margin: 0.55rem 0 0.7rem;
}
.art img {
  width: 100%;
  background: transparent;
}

.item { margin: 0.55rem 0; }
.item-top {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}
.item-name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: 0.01em;
}
.lead {
  flex: 1;
  border-bottom: 1px dotted rgba(22, 18, 14, 0.4);
  min-width: 1.25rem;
  transform: translateY(-0.18em);
}
.item-price {
  font-variant-numeric: tabular-nums;
  font-size: 0.92rem;
  font-weight: 500;
  white-space: nowrap;
}
.item p {
  margin: 0.15rem 0 0;
  font-size: 0.72rem;
  color: var(--mute);
  max-width: 34rem;
}
.badge {
  color: var(--stamp);
  border: 1px solid var(--stamp);
  padding: 0 0.28rem;
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  white-space: nowrap;
}

.note {
  font-size: 0.75rem;
  color: var(--ink-soft);
  margin: 0.7rem 0 0;
}

.foot {
  padding: 1rem 0.9rem 1.3rem;
  border-top: 1px solid var(--ink);
  display: grid;
  gap: 0.55rem;
}
.foot h2 {
  font-family: var(--serif);
  font-size: 1.05rem;
  margin: 0 0 0.2rem;
}
.fine {
  font-size: 0.7rem;
  color: var(--mute);
}

.mobile-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 6;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  background: var(--paper);
  border-top: 2px solid var(--ink);
  padding: 0.45rem 0.6rem calc(0.45rem + env(safe-area-inset-bottom));
}
.mobile-cta .btn { min-height: 44px; }

@media (min-width: 880px) {
  .page { margin: 1.25rem auto 2rem; }
  .mast { padding: 1.3rem 1.3rem 1.1rem; }
  .stamp { right: 1.4rem; top: 1.6rem; width: 7.2rem; height: 7.2rem; font-size: 0.74rem; }
  .menu-grid { grid-template-columns: 1fr 1fr 1fr; }
  .col {
    border-bottom: 0;
    border-right: 1px solid var(--ink);
    padding: 1.15rem 1.1rem 1.4rem;
  }
  .col:last-child { border-right: 0; }
  .mobile-cta { display: none; }
  .cta-row { max-width: 26rem; }
}

/* ORDER PAGE */
.order-layout {
  display: grid;
}
.board { padding: 0.85rem 0.8rem 7rem; }
.board-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: baseline;
  margin-bottom: 0.75rem;
}
.board-head h1 {
  font-family: var(--serif);
  font-size: 1.6rem;
  margin: 0;
}
.cat-block { margin: 1.1rem 0 1.4rem; }
.cat-block h2 {
  font-family: var(--serif);
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 2px solid var(--ink);
  margin: 0 0 0.35rem;
  padding-bottom: 0.15rem;
}
.sku {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem 0.7rem;
  padding: 0.55rem 0;
  border-bottom: 1px dotted var(--rule);
  width: 100%;
  background: none;
  border-left: 0;
  border-right: 0;
  border-top: 0;
  text-align: left;
}
.sku:focus-visible { outline: 2px solid var(--stamp); outline-offset: 2px; }
.sku .nm {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.02rem;
}
.sku .ds {
  grid-column: 1 / -1;
  font-size: 0.72rem;
  color: var(--mute);
}
.sku.sold { opacity: 0.45; cursor: not-allowed; }
.sku .pr { font-variant-numeric: tabular-nums; }

.ticket {
  background: var(--paper);
  border-top: 2px solid var(--ink);
}
.ticket-inner { padding: 0.85rem 0.85rem 1.1rem; }
.ticket h2 {
  font-family: var(--serif);
  font-size: 1.2rem;
  margin: 0 0 0.4rem;
}
.line {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 0.4rem;
  align-items: center;
  padding: 0.35rem 0;
  border-bottom: 1px dotted var(--rule);
  font-size: 0.86rem;
}
.qty {
  display: inline-flex;
  border: 1px solid var(--ink);
}
.qty button {
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
}
.qty span {
  min-width: 1.2rem;
  text-align: center;
  line-height: 28px;
  font-variant-numeric: tabular-nums;
}
.empty { color: var(--mute); font-size: 0.85rem; }

.form { display: grid; gap: 0.55rem; margin-top: 0.8rem; }
label { display: grid; gap: 0.2rem; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; }
input, textarea, select {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--ink);
  padding: 0.45rem 0.1rem;
  border-radius: 0;
}
input:focus, textarea:focus { outline: none; border-bottom-width: 2px; }
.types { display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem; }
.types label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--ink);
  padding: 0.45rem 0.5rem;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.85rem;
}
.total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 0.7rem 0;
  font-family: var(--serif);
  font-size: 1.25rem;
}
.msg {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
}
.msg.err { color: var(--stamp); }
.confirm {
  border: 2px solid var(--ink);
  padding: 0.8rem;
  margin-top: 0.6rem;
}
.confirm strong {
  font-family: var(--serif);
  font-size: 1.6rem;
  display: block;
}

.cart-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 6;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  background: var(--paper);
  border-top: 2px solid var(--ink);
  padding: 0.5rem 0.7rem calc(0.5rem + env(safe-area-inset-bottom));
}
.cart-bar .btn { min-height: 44px; padding-inline: 1rem; }

body.ticket-open .ticket {
  position: fixed;
  inset: 0;
  z-index: 9;
  overflow: auto;
  border-top: 0;
}
body.ticket-open .cart-bar { display: none; }

.status { min-height: 1.2rem; color: var(--mute); font-size: 0.8rem; }

@media (min-width: 900px) {
  .order-layout { grid-template-columns: 1.35fr 0.9fr; }
  .board { padding: 1rem 1.1rem 1.4rem; border-right: 1px solid var(--ink); }
  .ticket { border-top: 0; position: sticky; top: 0; align-self: start; max-height: 100vh; overflow: auto; }
  .cart-bar { display: none; }
  body.ticket-open .ticket { position: sticky; inset: auto; }
}

@media print {
  body::before, body::after, .mobile-cta, .cart-bar, .cta-row, .stripe { display: none !important; }
  .page { box-shadow: none; margin: 0; width: 100%; }
}

@media (max-width: 879px) {
  .lede, .meta { max-width: calc(100% - 5.6rem); }
  .stamp { top: 1.5rem; width: 5.5rem; height: 5.5rem; font-size: 0.6rem; }
  .close-ticket { display: none; }
  body.ticket-open .close-ticket { display: inline-flex; margin-bottom: 0.7rem; }
}
@media (min-width: 880px) {
  .close-ticket { display: none !important; }
}

.mast-compact .wordmark { font-size: clamp(2.2rem, 10vw, 3.6rem); }
.mast-compact .stamp { width: 5.2rem; height: 5.2rem; font-size: 0.58rem; top: 1.2rem; }
.mast-compact .lede, .mast-compact .meta { max-width: calc(100% - 5.4rem); }
