@font-face {
  font-family: 'Barlow Condensed';
  src: url('/fonts/barlow-condensed-800.ttf') format('truetype');
  font-weight: 800;
  font-display: swap;
}

:root {
  --tomate: #b8151b;
  --tomate-escuro: #9a0f14;
  --mostarda: #ffc629;
  --tinta: #231f1a;
  --papel: #fffdf7;
  --giz: #f4eee2;
  --linha: #ddd5c6;
  --borda: #7b7366;
  --cinza: #5c554b;
  --couve: #1b6440;
  --display: 'Barlow Condensed', 'Arial Narrow', Arial, sans-serif;
  --texto: Arial, Helvetica, sans-serif;
  --tabs-h: 52px;
  --brand-h: 54px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-padding-top: calc(var(--tabs-h) + 16px);
  scroll-padding-bottom: 150px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--papel);
  color: var(--tinta);
  font: 400 1rem/1.5 var(--texto);
}

h1, h2, h3, p, ul, ol, fieldset { margin: 0; padding: 0; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

h1, h2 { font-family: var(--display); font-weight: 800; line-height: 1.05; }
h1 { font-size: clamp(2.5rem, 9vw, 3.5rem); }
h2 { font-size: 1.875rem; }
h3 { font-size: 1.0625rem; line-height: 1.3; }
h1:focus, h2:focus { outline: none; }

.shell { width: 100%; max-width: 1080px; margin-inline: auto; padding-inline: 16px; }

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.ico { width: 1.25em; height: 1.25em; flex: none; }

:focus-visible {
  outline: 3px solid var(--tinta);
  outline-offset: 2px;
  box-shadow: 0 0 0 2px #fff;
}

.skip {
  position: absolute;
  left: 8px;
  top: -80px;
  z-index: 30;
  padding: 10px 16px;
  background: var(--tinta);
  color: #fff;
  font-weight: 700;
}
.skip:focus { top: 8px; }

.sim {
  padding: 6px 16px;
  background: var(--tinta);
  color: #fff;
  font-size: .875rem;
  text-align: center;
}

/* Cabeçalho: no celular a marca rola e as abas ficam presas ao topo.
   display: contents deixa a barra fixa relativa ao body, mantendo o landmark. */
.top { display: contents; }
.masthead {
  position: sticky;
  top: calc(-1 * var(--brand-h));
  z-index: 10;
  background: var(--papel);
  border-bottom: 2px solid var(--tinta);
}
.masthead__brand { height: var(--brand-h); display: flex; align-items: center; }
.brand {
  font: 800 1.75rem/1 var(--display);
  color: var(--tomate);
  text-decoration: none;
}
.brand span { color: var(--tinta); }

.tabs { display: grid; grid-template-columns: 1fr 1.1fr 1.3fr; height: var(--tabs-h); margin-inline: -16px; }
.tabs a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  color: var(--tinta);
  font-size: .9375rem;
  text-decoration: none;
}
.tabs a:hover { background: var(--giz); }
.tabs a[aria-current='page'] { font-weight: 700; }
.tabs a[aria-current='page']::after {
  content: '';
  position: absolute;
  inset: auto 8px 0;
  height: 5px;
  background: var(--tomate);
}
.count {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding-inline: 6px;
  border-radius: 12px;
  background: var(--tomate);
  color: #fff;
  font-size: .875rem;
  font-weight: 700;
}
.count.bump { animation: bump .28s ease-out; }
@keyframes bump { 40% { transform: scale(1.18); } }

main { flex: 1; padding-block: 20px 40px; }
body.has-dock main { padding-bottom: 110px; }

.step { margin-bottom: 4px; color: var(--cinza); font-size: .9375rem; }

/* Botões: um padrão para as quatro telas. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 9px 16px;
  border: 2px solid transparent;
  border-radius: 6px;
  background: none;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
}
.btn--primary { background: var(--tomate); color: #fff; }
.btn--primary:hover { background: var(--tomate-escuro); }
.btn--primary[aria-disabled='true'] { background: var(--cinza); cursor: progress; }
.btn--ghost { margin-top: 12px; padding-left: 10px; border-color: var(--tinta); color: var(--tinta); }
.btn--ghost:hover { background: var(--giz); }
.btn--quiet { padding-inline: 10px; color: var(--tomate); text-decoration: underline; text-underline-offset: 3px; }
.btn--quiet:hover { background: var(--giz); }
.btn--big { min-height: 54px; padding-inline: 24px; font-size: 1.125rem; }
.btn--wide { width: 100%; }

.price { font: 800 1.625rem/1 var(--display); white-space: nowrap; }

/* Início: cartaz de oferta. */
.poster {
  position: relative;
  margin: -20px -16px 0;
  padding: 16px 16px 20px;
  background: var(--mostarda);
  overflow: hidden;
}
.poster .step { color: var(--tinta); }
.poster h1 {
  color: var(--tomate-escuro);
  font-size: clamp(2.625rem, 13vw, 4.75rem);
  line-height: .96;
  text-transform: uppercase;
}
.poster h1 span { display: block; }
.poster__lead { max-width: 34ch; margin-block: 10px 14px; font-size: 1.0625rem; }
.burst {
  --s: 8.75rem;
  position: absolute;
  top: 12px;
  right: 10px;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: var(--s);
  height: var(--s);
  background: var(--tomate);
  color: #fff;
  font-size: .8125rem;
  line-height: 1.15;
  text-align: center;
  transform: rotate(8deg);
  clip-path: polygon(50% 0, 60% 10%, 73% 4%, 78% 17%, 92% 16%, 90% 30%, 100% 38%, 93% 50%, 100% 62%, 90% 70%, 92% 84%, 78% 83%, 73% 96%, 60% 90%, 50% 100%, 40% 90%, 27% 96%, 22% 83%, 8% 84%, 10% 70%, 0 62%, 7% 50%, 0 38%, 10% 30%, 8% 16%, 22% 17%, 27% 4%, 40% 10%);
}
.burst span { max-width: 6em; }
.burst strong { font: 800 1.75rem/1.05 var(--display); }

.home-grid { display: grid; gap: 28px; margin-top: 24px; }
.home-grid h2 { margin-bottom: 10px; }
.preview li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0 12px;
  padding-block: 10px;
  border-top: 1px solid var(--linha);
}
.preview li:last-child { border-bottom: 1px solid var(--linha); }
.preview__name { font-weight: 700; }
.preview__desc { grid-row: 2; color: var(--cinza); font-size: .9375rem; }
.preview .price { grid-row: 1 / span 2; grid-column: 2; align-self: center; }
.how { counter-reset: how; }
.how li {
  counter-increment: how;
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 10px;
  align-items: center;
  padding-block: 8px;
}
.how li::before {
  content: counter(how);
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--mostarda);
  font: 800 1.375rem/1 var(--display);
}

/* Cardápio */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  padding: 8px 14px;
  border: 2px solid var(--tinta);
  border-radius: 22px;
  background: var(--papel);
  font-weight: 700;
}
.chip:hover { background: var(--giz); }
.chip .ico { display: none; width: 1.05em; height: 1.05em; }
.chip[aria-pressed='true'] { background: var(--tinta); color: #fff; }
.chip[aria-pressed='true'] .ico { display: block; }
.result { margin-block: 12px 4px; color: var(--cinza); font-size: .9375rem; }

#menu-list section { margin-top: 16px; }
#menu-list h2 { padding-bottom: 6px; border-bottom: 3px solid var(--tinta); }
.item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 12px;
  padding-block: 14px;
  border-bottom: 1px solid var(--linha);
}
.item__text p { color: var(--cinza); font-size: .9375rem; }
.item__text .item__prep { display: flex; align-items: center; gap: 4px; margin-top: 2px; }
.item__act { grid-column: 1 / -1; display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.tag {
  margin-right: auto;
  padding: 4px 10px;
  border-radius: 4px;
  background: var(--mostarda);
  font-size: .9375rem;
  font-weight: 700;
}

/* Barra inferior: total sempre à vista durante a escolha. */
.dock { position: fixed; inset: auto 0 0; z-index: 9; pointer-events: none; }
.dock__in { display: flex; flex-direction: column; gap: 6px; padding-bottom: 10px; }
.toast {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 9px 12px;
  border-radius: 6px;
  background: var(--couve);
  color: #fff;
  font-size: .9375rem;
  font-weight: 700;
  animation: rise .18s ease-out;
}
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
.dock__cart {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
  padding: 8px 14px;
  border-radius: 6px;
  background: var(--tomate);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 -2px 0 var(--papel), 0 0 0 2px var(--papel);
}
.dock__cart:hover { background: var(--tomate-escuro); }
.dock__label { display: inline-flex; align-items: center; gap: 8px; }
.dock__sum { text-align: right; }

/* Carrinho */
.cart-grid { display: grid; gap: 24px; margin-top: 20px; }
.lines { border-top: 3px solid var(--tinta); margin-top: 8px; }
.line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 12px;
  align-items: center;
  padding-block: 12px;
  border-bottom: 1px solid var(--linha);
}
.line__head { grid-column: 1 / -1; }
.line__unit { color: var(--cinza); font-size: .9375rem; }
.line__sub { text-align: right; }
.line__sub span { display: block; color: var(--cinza); font-size: .875rem; line-height: 1.2; }
.line__sub strong { font: 800 1.5rem/1.1 var(--display); }
.line .btn--quiet { grid-column: 1 / -1; justify-self: end; }
.qty { display: inline-flex; align-items: center; width: max-content; }
.qty__btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 2px solid var(--tinta);
  border-radius: 6px;
  background: var(--papel);
}
.qty__btn:hover { background: var(--giz); }
.qty__btn[aria-disabled='true'] { border-color: var(--borda); color: var(--borda); cursor: not-allowed; }
.qty__n { min-width: 38px; text-align: center; font-size: 1.125rem; font-weight: 700; }

.undo {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 12px;
  margin-top: 10px;
  padding: 4px 4px 4px 12px;
  border-left: 5px solid var(--mostarda);
  background: var(--giz);
}

.empty {
  margin-top: 20px;
  padding: 24px 16px;
  border: 2px dashed var(--borda);
  border-radius: 6px;
  text-align: center;
}
.empty p { margin-block: 8px 16px; }

.checkout { padding: 16px; border-radius: 6px; background: var(--giz); align-self: start; }
.pay { margin-top: 10px; padding: 12px; border: 2px solid transparent; border-radius: 6px; margin-inline: -12px; }
.pay legend { padding: 0; font-weight: 700; float: left; width: 100%; margin-bottom: 8px; }
.legend-note { font-weight: 400; }
.pay__opt {
  clear: both;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  margin-bottom: 6px;
  padding: 7px 12px;
  border: 2px solid var(--borda);
  border-radius: 6px;
  background: var(--papel);
  cursor: pointer;
}
.pay__opt:hover { border-color: var(--tinta); }
.pay__opt:has(:checked) { border-color: var(--tinta); box-shadow: inset 0 0 0 1px var(--tinta); }
.pay__opt input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--tomate); }
.pay__opt span { display: flex; flex-direction: column; }
.pay__opt small { color: var(--cinza); font-size: .875rem; line-height: 1.3; }
.pay--error { border-color: var(--tomate); background: #fff; }
.error { display: flex; gap: 6px; color: var(--tomate); font-weight: 700; }
.error:empty { display: none; }

.sum { margin-block: 8px 12px; }
.sum__total { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-top: 10px; border-top: 3px solid var(--tinta); font-weight: 700; }
.sum__total small { font-size: .9375rem; font-weight: 400; }
.sum__total strong { font: 800 2.25rem/1 var(--display); }
.sum__pickup { display: flex; align-items: center; gap: 6px; margin-top: 4px; color: var(--cinza); font-size: .9375rem; }

/* Confirmação: comanda de balcão. */
.done { display: flex; align-items: center; gap: 10px; color: var(--couve); }
.done .ico { padding: 6px; width: 1em; height: 1em; box-sizing: content-box; border-radius: 50%; background: var(--couve); color: #fff; font-size: .75em; }
.confirm-grid { display: grid; gap: 24px; margin-top: 16px; }
.ticket {
  --dente: 10px;
  padding: 24px 18px;
  background: var(--mostarda);
  text-align: center;
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / calc(2 * var(--dente)) 51% repeat-x, conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / calc(2 * var(--dente)) 51% repeat-x;
  mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / calc(2 * var(--dente)) 51% repeat-x, conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / calc(2 * var(--dente)) 51% repeat-x;
}
.ticket h2 { font: 700 1rem/1.3 var(--texto); }
.ticket h2 small { font-size: 1em; font-weight: 400; }
.ticket__n { color: var(--tomate-escuro); font: 800 clamp(5.5rem, 28vw, 8.5rem)/1 var(--display); letter-spacing: .01em; }
.ticket__when { margin-top: 6px; padding-top: 10px; border-top: 2px dashed var(--tinta); font-weight: 700; }
.ticket__when span { display: block; }
.ticket__when strong { font: 800 3rem/1 var(--display); }
.receipt ul { margin-top: 8px; border-top: 3px solid var(--tinta); }
.receipt li { display: flex; justify-content: space-between; gap: 12px; padding-block: 8px; border-bottom: 1px solid var(--linha); }
.receipt li span:last-child { white-space: nowrap; }
.receipt__total { display: flex; align-items: baseline; justify-content: space-between; margin-top: 8px; font-weight: 700; }
.receipt__total strong { font: 800 2.25rem/1 var(--display); }
.receipt__note { margin-block: 2px 16px; color: var(--cinza); font-size: .9375rem; }

.foot { padding-block: 14px; border-top: 1px solid var(--linha); color: var(--cinza); font-size: .875rem; }
body.has-dock .foot { padding-bottom: 84px; }

.notfound { padding-block: 48px; }
.notfound p { margin-block: 8px 16px; }

@media (max-width: 359px) {
  .tabs { grid-template-columns: .9fr 1.1fr 1.35fr; }
  .tabs a { gap: 4px; font-size: .875rem; }
  .count { min-width: 22px; height: 22px; padding-inline: 4px; }
}

@media (min-width: 480px) {
  .burst { display: flex; }
  .poster h1 { max-width: calc(100% - 9.5rem); }
}

@media (min-width: 760px) {
  html { scroll-padding-top: 90px; }
  .masthead { top: 0; }
  .masthead__in { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
  .tabs { display: flex; gap: 4px; margin: 0; height: var(--brand-h); }
  .tabs a { padding-inline: 14px; font-size: 1rem; }
  .poster { margin-inline: 0; margin-top: 0; padding: 32px 40px; border-radius: 6px; }
  .poster h1 { max-width: calc(100% - 12.5rem); }
  .burst { --s: 12.5rem; top: 50%; right: 32px; margin-top: -6.25rem; font-size: 1rem; }
  .burst strong { font-size: 2.5rem; }
  .home-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  #menu-list .menu { display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; }
  .cart-grid { grid-template-columns: 1.25fr 1fr; gap: 40px; }
  .line { grid-template-columns: 1fr auto auto; }
  .line__head { grid-column: 1; }
  .line .btn--quiet { grid-column: 3; }
  .line__sub { grid-column: 3; grid-row: 1; }
  .qty { grid-column: 2; grid-row: 1; }
  .line .btn--quiet { grid-row: 2; }
  .checkout { position: sticky; top: 76px; }
  .confirm-grid { grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
  .dock__in { max-width: 520px; margin-right: max(16px, calc((100vw - 1080px) / 2 + 16px)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

@media (forced-colors: active) {
  .tabs a[aria-current='page']::after { background: CanvasText; }
  .chip[aria-pressed='true'] { outline: 2px solid Highlight; }
}
