/* Riverwoods ordering. Phones first, 360px up. Built for bright sun and gloves. */

@font-face { font-family: 'Arvo'; font-weight: 700; font-display: swap; src: url('/fonts/arvo-700.woff2') format('woff2'); }
@font-face { font-family: 'Cabin'; font-weight: 400; font-display: swap; src: url('/fonts/cabin-400.woff2') format('woff2'); }
@font-face { font-family: 'Cabin'; font-weight: 600; font-display: swap; src: url('/fonts/cabin-600.woff2') format('woff2'); }

:root {
  --green: #2C3A2A;
  --green-deep: #1F2A1E;
  --green-soft: #3F4F3B;
  --gold: #E8B84A;
  --cream: #F3F4EC;
  --paper: #FCFCF8;
  --ink: #171C15;
  --ink-soft: #3F483B;
  --rule: #C7CBB9;
  --danger: #8F1A10;
  --danger-bg: #FBE9E5;
  --notice-bg: #F8E9BE;

  --slab: 'Arvo', Rockwell, 'Roboto Slab', Georgia, serif;
  --sans: 'Cabin', 'Trebuchet MS', 'Segoe UI', system-ui, sans-serif;

  --gutter: 16px;
  --tap: 48px;
  --measure: 640px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --ease-out: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 400 17px/1.45 var(--sans);
  overflow-x: hidden;
  min-height: 100dvh;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
a { color: inherit; }
main:focus { outline: none; }
svg { display: block; }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.masthead :focus-visible, .bar :focus-visible, .ticket :focus-visible { outline-color: var(--gold); }

.skip {
  position: absolute; left: 8px; top: -60px; z-index: 50;
  background: var(--paper); padding: 12px 16px; border-radius: 8px;
}
.skip:focus { top: 8px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

/* ---------- Masthead: forest panel with the pine line from the logo ---------- */
.masthead {
  background: var(--green) url('/treeline.svg') repeat-x left bottom / 480px 44px;
  color: var(--cream);
  padding: max(16px, env(safe-area-inset-top)) var(--gutter) 56px;
}
.masthead > * { max-width: calc(var(--measure) - 2 * var(--gutter)); margin-inline: auto; }
.masthead-brand { display: flex; align-items: center; gap: 12px; }
.logo { width: 72px; height: 72px; flex: none; }
.brand-name { font-weight: 600; font-size: 18px; line-height: 1.2; }
.brand-place { font-size: 16px; line-height: 1.3; color: #DDE0D2; }
.headline {
  font: 700 clamp(28px, 8.2vw, 38px)/1.14 var(--slab);
  margin-top: 16px;
  text-wrap: balance;
}
.masthead.no-headline .headline { display: none; }
.masthead.compact { padding-bottom: 14px; background-image: none; }
.masthead.compact .logo { width: 48px; height: 48px; }
.masthead.compact .brand-place { display: none; }
.masthead.compact .headline { display: none; }

/* ---------- Layout ---------- */
.page { max-width: var(--measure); margin-inline: auto; padding-inline: var(--gutter); }
.notice {
  background: var(--notice-bg); padding: 12px 14px; border-radius: 8px; margin-top: 16px;
  border-left: 5px solid var(--green);
}
.notice.error { background: var(--danger-bg); border-left-color: var(--danger); color: var(--danger); font-weight: 600; }

/* ---------- Skeleton shown before the menu arrives ---------- */
.skeleton { max-width: var(--measure); margin-inline: auto; padding: 8px var(--gutter); }
.skeleton-tabs { height: 48px; border-radius: 8px; background: #DFE1D3; margin-bottom: 20px; }
.skeleton-row { height: 58px; border-radius: 8px; background: #E7E9DC; margin-bottom: 18px; }

/* ---------- Category tabs ---------- */
.tabs {
  position: sticky; top: 0; z-index: 10;
  background: var(--cream);
  border-bottom: 1px solid var(--rule);
}
.tabs-inner {
  display: flex; gap: 6px;
  max-width: var(--measure); margin-inline: auto;
  padding: 8px var(--gutter);
  overflow-x: auto; scrollbar-width: none;
}
.tabs-inner::-webkit-scrollbar { display: none; }
.tab {
  flex: 1 0 auto;
  min-height: var(--tap); padding: 0 14px;
  border: 0; border-radius: 8px;
  background: transparent; color: var(--ink);
  font-weight: 600; font-size: 17px; white-space: nowrap;
  transition: background-color .15s, color .15s;
}
.tab[aria-current="true"] { background: var(--green); color: var(--gold); }

/* ---------- Menu rows ---------- */
.menu { padding-bottom: 8px; }
.section { scroll-margin-top: 66px; padding-top: 22px; }
.section-title { font: 700 22px/1.2 var(--slab); padding-bottom: 6px; border-bottom: 2px solid var(--green); }

.row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  grid-template-areas: "art text ctl" "art desc desc";
  column-gap: 12px;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid var(--rule);
}
.row-art { grid-area: art; width: 48px; height: 48px; align-self: start; }
.row-art svg, .row-art img { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; }
.row-text { grid-area: text; min-width: 0; }
.row-name { font: 600 18px/1.25 var(--sans); }
.row-price { font-size: 17px; line-height: 1.3; font-variant-numeric: tabular-nums; }
.row-desc { grid-area: desc; font-size: 16px; line-height: 1.35; color: var(--ink-soft); margin-top: 4px; }
.row-ctl { grid-area: ctl; }

.row.is-sold-out .row-art { filter: grayscale(1); opacity: .55; }
.row.is-sold-out .row-name, .row.is-sold-out .row-price { color: #596154; }
.row.is-sold-out .row-price { text-decoration: line-through; }
.sold-out { font-weight: 600; font-size: 16px; color: var(--ink-soft); padding: 4px 10px; border: 1.5px solid #6B7365; border-radius: 6px; white-space: nowrap; }

/* ---------- Add button and stepper ---------- */
.round {
  display: grid; place-items: center;
  width: var(--tap); height: var(--tap);
  border: 0; border-radius: 12px;
  background: var(--green); color: var(--cream);
  transition: transform .1s, background-color .15s;
}
.round:active { transform: scale(.94); background: var(--green-deep); }
.round svg { width: 22px; height: 22px; }
.round.light { background: #E2E5D5; color: var(--ink); }
.stepper { display: flex; align-items: center; }
.count {
  min-width: 34px; text-align: center;
  font: 700 19px/1 var(--slab);
  font-variant-numeric: tabular-nums;
}

/* ---------- Sticky bottom action bar ---------- */
.bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  background: var(--green); color: var(--cream);
  padding: 10px var(--gutter) calc(10px + var(--safe-bottom));
  box-shadow: 0 -2px 0 var(--green-deep);
}
.bar-inner { max-width: calc(var(--measure) - 2 * var(--gutter)); margin-inline: auto; }
.bar-row { display: flex; align-items: center; gap: 14px; }
.bar-sum { flex: none; min-width: 84px; line-height: 1.2; }
.bar-total { font: 700 21px/1.15 var(--slab); font-variant-numeric: tabular-nums; }
.bar-count { font-size: 15px; color: #DDE0D2; }
.cta {
  flex: 1; display: block; width: 100%;
  min-height: 56px; padding: 8px 16px;
  border: 0; border-radius: 12px;
  background: var(--gold); color: var(--ink);
  font: 700 19px/1.2 var(--slab); text-align: center;
  transition: transform .1s, background-color .15s;
}
.cta:active:not(:disabled) { transform: scale(.98); background: #D9A838; }
.cta:disabled { background: var(--green-soft); color: #E4E7D9; font: 600 17px/1.2 var(--sans); cursor: default; }
.cta[aria-busy="true"]:disabled { background: var(--gold); color: var(--ink); font: 700 19px/1.2 var(--slab); }
.bar-legal { margin-top: 8px; font-size: 15px; line-height: 1.3; text-align: center; color: #E4E7D9; }
.bar-legal a { padding: 4px 0; color: var(--cream); }
.bar-error { margin-bottom: 8px; color: var(--gold); font-weight: 600; line-height: 1.3; }
body.has-bar { padding-bottom: calc(96px + var(--safe-bottom)); }
body.has-tall-bar { padding-bottom: calc(136px + var(--safe-bottom)); }
body.keyboard-open .bar { display: none; }

.spinner {
  display: inline-block; width: 18px; height: 18px; margin-right: 8px; vertical-align: -3px;
  border: 3px solid currentColor; border-right-color: transparent; border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Bottom sheet ---------- */
.sheet {
  position: fixed; inset: auto 0 0 0; margin: 0;
  width: 100%; max-width: var(--measure); margin-inline: auto;
  max-height: 85dvh; overflow-y: auto;
  border: 0; border-radius: 18px 18px 0 0;
  background: var(--cream); color: var(--ink);
  padding: 18px var(--gutter) calc(14px + var(--safe-bottom));
}
.sheet[open] { animation: sheet-up .22s var(--ease-out); }
.sheet::backdrop { background: rgba(23, 28, 21, .62); }
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
.sheet-title { font: 700 24px/1.2 var(--slab); }
.sheet-sub { color: var(--ink-soft); margin-top: 2px; }
.sheet-options { margin: 12px 0 14px; border-top: 1px solid var(--rule); }
.option {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 68px; padding: 8px 0; border-bottom: 1px solid var(--rule);
}
.option-pick {
  flex: 1; min-height: 52px; text-align: left; background: none; border: 0; padding: 0;
}
.option-name { display: block; font-weight: 600; font-size: 19px; line-height: 1.25; }
.option-price { display: block; font-size: 17px; font-variant-numeric: tabular-nums; }
.sheet-done {
  width: 100%; min-height: 54px; border-radius: 12px;
  background: none; border: 2px solid var(--green); color: var(--ink);
  font: 700 18px/1 var(--slab);
}

/* ---------- Checkout ---------- */
.back {
  display: inline-flex; align-items: center; gap: 4px;
  min-height: var(--tap); padding: 0 8px 0 0; margin-top: 8px;
  background: none; border: 0; font-weight: 600; text-decoration: underline; text-underline-offset: 3px;
}
.back svg { width: 20px; height: 20px; }
.page-title { font: 700 30px/1.15 var(--slab); }
.group { margin-top: 24px; }
.group-title { font: 700 21px/1.2 var(--slab); margin-bottom: 10px; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; }

.choice {
  display: flex; align-items: center; gap: 12px;
  min-height: 68px; padding: 10px 14px; margin-bottom: 8px;
  background: var(--paper);
  border: 2px solid var(--rule); border-radius: 12px;
  cursor: pointer;
}
.choice input { width: 24px; height: 24px; flex: none; margin: 0; accent-color: var(--green); }
.choice:has(input:checked) { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.choice-title { display: block; font-weight: 600; font-size: 18px; line-height: 1.25; }
.choice-sub { display: block; color: var(--ink-soft); font-size: 16px; line-height: 1.3; }

.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; margin-bottom: 4px; }
.input {
  display: block; width: 100%; min-height: 54px; padding: 10px 14px;
  background: var(--paper);
  border: 2px solid #6B7365; border-radius: 10px;
  font-size: 18px; /* 16px or more stops iPhones zooming in */
}
.input:focus { border-color: var(--green); outline: 2px solid var(--green); outline-offset: 0; }
.input[aria-invalid="true"] { border-color: var(--danger); }
.field-error { color: var(--danger); font-weight: 600; font-size: 16px; margin-top: 4px; }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.summary-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.link-button {
  min-height: var(--tap); padding: 0 0 0 12px; background: none; border: 0;
  font-weight: 600; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap;
}
.line { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 4px; padding: 8px 0; border-top: 1px solid var(--rule); }
.line-qty { font-weight: 600; font-variant-numeric: tabular-nums; }
.line-name { font-weight: 600; overflow-wrap: anywhere; }
.line-detail { font-weight: 400; }
.line-cost, .money { font-variant-numeric: tabular-nums; }
.totals { border-top: 2px solid var(--ink); padding-top: 8px; }
.totals div { display: flex; justify-content: space-between; gap: 12px; padding: 2px 0; }
.totals dd { font-variant-numeric: tabular-nums; }
.totals .grand { font: 700 22px/1.3 var(--slab); padding-top: 4px; }
.pay-line { margin-top: 12px; font-weight: 600; }

/* ---------- Confirmation: the clubhouse ticket, the one loud moment ---------- */
.ticket {
  margin-top: 16px;
  background: var(--green); color: var(--cream);
  border-radius: 16px;
  overflow: hidden;
}
.ticket.fresh { animation: ticket-in .32s var(--ease-out); }
@keyframes ticket-in { from { transform: translateY(14px) scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
.ticket-top { padding: 20px 20px 18px; text-align: center; }
.ticket-label { font-size: 18px; }
.ticket-number {
  font: 700 clamp(76px, 25vw, 112px)/1 var(--slab);
  color: var(--gold);
  letter-spacing: -.01em;
  margin: 4px 0 8px;
  font-variant-numeric: lining-nums;
}
.ticket-show { font-size: 19px; font-weight: 600; }
.ticket-stub {
  position: relative;
  border-top: 3px dashed #8D9A85;
  padding: 16px 20px 20px; text-align: center;
}
.ticket-stub::before, .ticket-stub::after {
  content: ''; position: absolute; top: -13px;
  width: 24px; height: 24px; border-radius: 50%; background: var(--cream);
}
.ticket-stub::before { left: -12px; }
.ticket-stub::after { right: -12px; }
.ticket-pickup-label { font-size: 17px; }
.ticket-pickup { font: 700 30px/1.2 var(--slab); }
.ticket-where { font-size: 17px; }
.confirm-pay { margin-top: 20px; padding: 14px; text-align: center; font: 700 20px/1.3 var(--slab); border: 2px solid var(--green); border-radius: 12px; }
.confirm-placed { margin-top: 12px; color: var(--ink-soft); font-size: 16px; }
.new-order { display: block; width: 100%; min-height: 54px; margin-top: 20px; border-radius: 12px; background: none; border: 2px solid var(--green); font: 700 18px/1 var(--slab); }

.last-order {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: var(--measure); margin-inline: auto;
  padding: 4px var(--gutter);
  background: var(--notice-bg);
}
.last-order-wrap { background: var(--notice-bg); }

/* ---------- Kitchen closed ---------- */
.closed { padding-top: 24px; }
.closed .notice { margin: 0 0 20px; }
.closed-title { font: 700 clamp(34px, 10vw, 44px)/1.1 var(--slab); }
.closed-when { font: 700 22px/1.3 var(--slab); margin-top: 12px; text-wrap: balance; }
.closed-copy { margin-top: 10px; }
.hours-table { margin-top: 20px; border-top: 2px solid var(--green); }
.hours-table div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.hours-table dt { font-weight: 600; }
.hours-table dd { text-align: right; font-variant-numeric: tabular-nums; }

.retry { padding-top: 32px; text-align: left; }
.retry .cta { margin-top: 16px; }

/* ---------- Footer ---------- */
.foot {
  max-width: var(--measure); margin-inline: auto;
  padding: 20px var(--gutter) 24px;
  display: flex; flex-wrap: wrap; gap: 4px 20px; align-items: center;
  font-size: 16px; color: var(--ink-soft);
}
.foot a { display: inline-block; padding: 12px 0; color: var(--ink); text-underline-offset: 3px; }

/* ---------- Terms and Privacy ---------- */
.legal { padding-block: 20px 40px; }
.legal h1 { font: 700 32px/1.15 var(--slab); }
.legal .updated { color: var(--ink-soft); margin-top: 6px; }
.legal h2 { font: 700 21px/1.25 var(--slab); margin-top: 28px; }
.legal p { margin-top: 10px; max-width: 68ch; }
.legal ul { margin-top: 10px; padding-left: 20px; list-style: disc; max-width: 68ch; }
.legal li { margin-top: 8px; }
.legal a { text-underline-offset: 3px; font-weight: 600; }
.legal a[href^="tel"] { display: inline-block; padding: 6px 0; }
.legal-home { display: inline-block; padding: 12px 0; font-weight: 600; text-underline-offset: 3px; }

@media (min-width: 768px) {
  .masthead { padding-inline: 24px; }
  .sheet { border-radius: 18px; bottom: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .spinner { animation-duration: 1.6s !important; }
}
