@font-face {
  font-family: "Jost";
  src: url("assets/jost.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}
:root {
  --paper: var(--bi-background);
  --field: var(--bi-brand-3);
  --panel: var(--bi-surface);
  --ink: var(--bi-text);
  --brown: var(--bi-accent);
  --line: var(--bi-neutral-500);
  --error: #9a1f24;
  --gutter: 16px;
  --display: var(--font-display);
  --small: 14px;
  --bar-height: 0px;
  color: var(--ink);
  background: var(--paper);
  font: 18px / 1.5 var(--font-text);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 16px;
}

* { box-sizing: border-box; }
body, figure, h1, h2, h3, p, ol, ul, dl, dd { margin: 0; }
/* --badge-space is the height of Netlify's "Powered by" badge (set in app.mjs), so nothing hides behind it. */
body { background: var(--paper); padding-bottom: calc(var(--bar-height) + var(--badge-space, 0px)); }
img { display: block; width: 100%; height: auto; }
a { color: inherit; text-underline-offset: .2em; }
button, input, textarea, select { color: inherit; font: inherit; }
button { cursor: pointer; }
button, a, label { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button, .button { -webkit-user-select: none; user-select: none; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
[hidden] { display: none !important; }

.sr-only, .skip:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip { position: absolute; z-index: 3; padding: 12px; background: var(--paper); }

h1, h2 { font-family: var(--display); font-weight: var(--font-display-weight); letter-spacing: var(--font-display-tracking); text-transform: uppercase; line-height: 1.1; text-wrap: balance; }
h1 { font-size: clamp(25px, 5vw, 64px); }
h2 { font-size: clamp(28px, 5vw, 40px); }
h3 { font-size: clamp(23px, 4vw, 28px); font-weight: 500; line-height: 1.2; }

/* Welcome screen */
.welcome { display: none; }
[data-view="welcome"] .welcome {
  min-height: 100svh;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 14px;
  padding: 32px var(--gutter) calc(32px + env(safe-area-inset-bottom));
  text-align: center;
}
[data-view="welcome"] #storefront { display: none; }
.welcome img { width: clamp(168px, 46vw, 240px); margin-bottom: 6px; }
.welcome h1 { font-size: clamp(30px, 8.2vw, 48px); }
.welcome h1 span[aria-hidden] { color: var(--line); }
.welcome-languages { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: min(100%, 340px); margin-top: 10px; }
.welcome-languages .button { min-height: 56px; }
.welcome-languages .button:not(.suggested) { color: var(--ink); background: transparent; border-color: var(--brown); }

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 10px 24px;
  border: 2px solid transparent;
  border-radius: 0;
  background: var(--bi-primary);
  color: var(--bi-on-primary);
  text-decoration: none;
  font-weight: 600;
  text-align: center;
  transition: background-color .15s, transform .1s;
}
.button:active { background: var(--ink); transform: scale(.98); }
.button.quiet { background: transparent; color: var(--ink); border-color: var(--brown); }
.button.quiet:active { background: var(--field); }

/* Keep the language controls separate from the logo and headline. */
/* White header band: logo and headline on white, the menu starts on ivory below a thin line. */
.stage {
  background: var(--bi-surface);
  border-bottom: 1px solid var(--bi-border);
  padding: calc(12px + env(safe-area-inset-top)) calc(var(--gutter) + env(safe-area-inset-right)) 26px calc(var(--gutter) + env(safe-area-inset-left));
}
.stage-bar { display: flex; justify-content: end; max-width: 1048px; margin-inline: auto; }
/* The logo leads; the headline is smaller and centered beside it. */
.stage-intro { display: grid; grid-template-columns: clamp(118px, 32vw, 260px) minmax(0, 1fr); align-items: center; gap: clamp(18px, 5vw, 56px); max-width: 820px; margin: 24px auto 0; }
.stage-copy { text-align: center; }
.stage h1 { font-size: clamp(21px, 4vw, 42px); }
.mark { width: 100%; }
.language-picker { display: flex; background: transparent; }
.language-picker button {
  border: 0;
  border-radius: 0;
  background: transparent;
  min-height: 48px;
  min-width: 84px;
  padding: 6px 12px;
  font-size: 15px;
}
.language-picker button[aria-pressed="true"] { color: var(--bi-on-primary); background: var(--bi-primary); font-weight: 600; }
.language-picker button:not([aria-pressed="true"]):active { background: var(--panel); }

/* Reading column */
.column { max-width: 980px; margin-inline: auto; padding: 0 calc(var(--gutter) + env(safe-area-inset-right)) 0 calc(var(--gutter) + env(safe-area-inset-left)); }
.menu, .request { padding-top: 48px; }
.menu { padding-top: 40px; }
/* Line and space between the menu and Preorder Request */
.request { margin-top: 48px; padding-top: 44px; border-top: 1px solid var(--bi-border); }
.lede { margin-top: 10px; }
.items { display: grid; gap: 28px; margin-top: 28px; }
.item { display: grid; grid-template-columns: clamp(86px, 28vw, 112px) minmax(0, 1fr); gap: 14px; align-items: start; }
/* Thin line between menu items */
.item + .item { padding-top: 28px; border-top: 1px solid var(--bi-border); }
.item img { aspect-ratio: 1; object-fit: cover; }
.item-body p { margin-top: 4px; }
.item-control { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.item-control select { width: auto; max-width: 100%; }

.item-feedback { color: var(--bi-text-muted); font-size: 15px; }
.item-feedback:empty { margin: 0; }

@media (max-width: 599px) {
  /* Dropdown and button each take the full width of the text column, stacked. */
  .item-control select {
    flex: 1 1 100%;
    padding-inline: 8px;
    font-size: 16px;
  }
  .item-control .add {
    flex: 1 1 100%;
    min-height: 52px;
    font-size: 16px;
  }
  .group .order-total p:first-child { display: grid; gap: 2px; }
  .group .order-total strong { text-align: left; }
}
.add {
  min-height: 48px;
  padding: 8px 18px;
  border: 1px solid var(--bi-primary);
  border-radius: 0;
  background: var(--bi-primary);
  color: var(--bi-on-primary);
  font-weight: 600;
  transition: background-color .15s;
}
.add:active { background: var(--bi-primary-700); }

/* Preorder request */
.how { margin-top: 14px; padding-left: 1.3em; }
.how li { padding-left: 4px; }
.how li + li { margin-top: 2px; }
/* Pickup and delivery terms: one panel, rows on a phone, three columns on wider screens. */
.options { display: grid; margin: 12px 0 4px; border: 1px solid var(--bi-border); background: var(--panel); }
/* It sits inside the numbered list, so pull it back by the list indent (.how 1.3em + li 4px) to line up with the form boxes. */
.options { margin-left: calc(-1.3em - 4px); margin-top: 16px; }
/* On a phone the cost sits beside the name, and drops under it when both don't fit (long Spanish labels). */
.options > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; align-items: baseline; padding: 14px var(--gutter); }
.option-note { flex: 1 1 100%; }
.options > div + div { border-top: 1px solid var(--bi-border); }
.options dt { font-weight: 600; }
.option-cost { color: var(--bi-primary-700); font-weight: 600; text-align: right; }
.option-note { grid-column: 1 / -1; font-size: 16px; color: var(--bi-text-muted); }
/* A long item name keeps its own line; the price and Remove drop below it, aligned right. */
.order-items li > span:first-child { flex: 1 1 170px; min-width: 0; padding-block: 6px; }
.order-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.order-price { font-variant-numeric: tabular-nums; white-space: nowrap; }
.order-total { display: grid; gap: 4px; }
.order-total strong { font-weight: 600; text-align: right; }
.order-total p:first-child { display: flex; justify-content: space-between; gap: 12px; font-weight: 600; font-size: 20px; font-variant-numeric: tabular-nums; }
.fulfillment-fields { display: grid; gap: 6px; min-width: 0; }
.fulfillment-fields > label { font-weight: 500; }
form { margin-top: 24px; }
fieldset { display: grid; gap: 12px; padding: 0; margin: 0; border: 0; min-width: 0; }
.group { display: grid; gap: 14px; padding: 20px var(--gutter); border: 1px solid var(--bi-border); background: var(--panel); }
.field { display: grid; gap: 6px; min-width: 0; }
.field-pair { display: grid; gap: 14px; }
#delivery-address { gap: 12px; padding-top: 5px; }
#delivery-address legend { font-weight: 600; }
#items-title { scroll-margin-top: 12px; }
.order-items { list-style: none; padding: 0; }
.order-items li { display: flex; flex-wrap: wrap; column-gap: 12px; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--bi-border); }
.order-items button { min-height: 44px; min-width: 52px; border: 0; background: transparent; color: var(--bi-primary-700); text-decoration: underline; }
.field label { font-weight: 500; }
input:not([type="hidden"]):not([type="checkbox"]), textarea, select {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 52px;
  font-size: 17px;
  padding: 12px;
  background: var(--bi-surface);
  border: 1px solid var(--line);
  border-radius: 0;
}
input[type="date"] { text-align: left; }
input[type="date"]::-webkit-date-and-time-value { text-align: left; }
textarea { resize: vertical; }
[aria-invalid="true"]:not([type="checkbox"]) { border: 2px solid var(--error) !important; }
.hint { font-size: var(--small); color: var(--bi-text-muted); }
.error { font-size: 15px; font-weight: 600; color: var(--error); }
.acknowledgment { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; align-items: start; min-height: 48px; cursor: pointer; }
.acknowledgment input { width: 28px; height: 28px; margin: 0; accent-color: var(--brown); }
.submit { width: 100%; min-height: 56px; margin-top: 8px; font-size: 18px; }
.preview-note { margin-bottom: 12px; padding: 12px 14px; background: var(--field); font-size: 15px; }
.form-status { display: grid; gap: 14px; padding: 24px var(--gutter); margin: 0 calc(-1 * var(--gutter)); background: var(--panel); }
.form-status:focus { outline: none; }
.form-status dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 16px; }
.form-status dt { color: var(--brown); }
.form-status dd { font-weight: 500; overflow-wrap: anywhere; }

.site-footer { display: grid; gap: 6px; margin-top: 48px; padding: 24px 0 calc(28px + env(safe-area-inset-bottom)); border-top: 1px solid var(--bi-border); font-size: var(--small); }
.site-footer p:first-child { font-size: 16px; }
.site-footer summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; text-decoration: underline; text-underline-offset: .2em; }
.site-footer summary::-webkit-details-marker { display: none; }
.site-footer ul { padding-left: 18px; }
.site-footer li { padding: 4px 0; }

/* Running request summary: stays in thumb reach on a phone. */
.request-bar {
  position: fixed;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: var(--badge-space, 0px); /* sits just above Netlify's badge when it is shown */
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px calc(var(--gutter) + env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) calc(var(--gutter) + env(safe-area-inset-left));
  background: var(--brown);
  color: var(--paper);
}
.request-bar p { flex: 1; min-width: 0; font-size: 15px; line-height: 1.3; font-weight: 500; }
.request-bar .button { min-height: 48px; padding: 8px 18px; background: var(--paper); color: var(--ink); }
.request-bar .button:active { background: var(--field); }

@media (hover: hover) and (pointer: fine) {
  .button:hover { background: var(--ink); }
  .button.quiet:hover, .welcome-languages .button:not(.suggested):hover { background: var(--field); }
  .add:hover { background: var(--bi-primary-700); }
  .language-picker button:not([aria-pressed="true"]):hover { background: var(--panel); }
  .request-bar .button:hover { background: var(--field); }
}

@media (prefers-reduced-motion: no-preference) {
  .request-bar { animation: bar-in .25s ease; }
  @keyframes bar-in { from { transform: translateY(100%); } }
}
@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  .button, .add { transition: none; }
}

@media (min-width: 600px) {
  :root { --gutter: 32px; }
  .field-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .item { grid-template-columns: 168px minmax(0, 1fr); gap: 24px; }
  .group, .form-status { margin: 0; padding: 28px; }
  .submit { width: auto; padding-inline: 40px; justify-self: start; }
}

@media (min-width: 720px) {
  .options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .options > div { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 4px; padding: 24px 28px; }
  .options > div + div { border-top: 0; border-left: 1px solid var(--bi-border); }
  .option-cost { order: -1; text-align: left; font-size: 22px; line-height: 1.2; }
}

@media (min-width: 960px) {
  :root { --gutter: 48px; }
  .stage { padding-bottom: 42px; }
  .stage-intro { margin-top: 32px; }
  .request-bar { left: auto; right: 24px; width: min(540px, calc(100% - 48px)); }
}

.confirmation { display: grid; gap: 32px; max-width: 820px; margin-inline: auto; padding: 48px var(--gutter); }
.confirmation p { margin: 12px 0; }
