/* Bootleggers website layout. Colors live in theme.css. */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
body.intro-on { overflow: hidden; }
a { color: var(--link); text-decoration: none; }
a:hover, a:focus-visible { color: var(--link-hover); text-decoration: underline; }
img { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }

/* Background layer */
.bg { position: fixed; inset: 0; z-index: 0; display: grid; place-items: center; pointer-events: none; overflow: hidden; background: var(--bg); }
.bg-still { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity 3s ease; }

/* Intro */
.intro { position: fixed; inset: 0; z-index: 50; background: #000; transition: opacity .5s ease; }
.intro video { width: 100%; height: 100%; object-fit: contain; }
.intro.fade { opacity: 0; }
.intro.gone { display: none; }
.intro-skip { position: absolute; right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); background: rgba(0,0,0,.5); color: var(--text); border: 1px solid var(--line); border-radius: 99px; padding: 8px 16px; font: inherit; font-size: 14px; cursor: pointer; }

/* Page content fades in after the intro */
.top, main, .foot { position: relative; z-index: 1; transition: opacity 1.2s ease; }
body.intro-on .top, body.intro-on main, body.intro-on .foot { opacity: 0; }

/* Header */
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px; padding: 10px max(16px, env(safe-area-inset-left)); background: var(--nav-bg); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top-logo img, .top-logo video { height: 40px; width: auto; display: block; }
.top-logo video { aspect-ratio: var(--logo-ratio, 491 / 166); object-fit: contain; background: transparent; }
.top-logo .logo-loop { height: 52px; --logo-ratio: 456 / 240; border-radius: 6px; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { color: var(--text); padding: 8px 12px; border-radius: 99px; font-weight: 600; font-size: 15px; }
.nav a:hover, .nav a:focus-visible { background: var(--surface-2); color: var(--link); text-decoration: none; }
.nav a.on { color: var(--on-pastel); background: var(--nav-active); }
.icon-btn, .cart-btn { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; }
.icon-btn .snd-x { display: none; }
.icon-btn[aria-pressed="false"] .snd-x { display: inline; }
.icon-btn[aria-pressed="false"] { color: var(--muted); }
.cart-btn { background: var(--action); color: var(--on-pastel); border: 0; }
.cart-count { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 99px; background: var(--text); color: var(--bg); font-size: 12px; font-weight: 700; display: grid; place-items: center; }
@media (max-width: 560px) {
  .top { flex-wrap: wrap; }
  .nav { order: 5; width: 100%; margin: 0; justify-content: space-between; }
  .nav a { padding: 6px 10px; font-size: 14px; }
  .icon-btn { margin-left: auto; }
}

/* Sections */
main { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
section { padding: 56px 0; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.1; margin: 0 0 12px; }
h2 { font-size: clamp(28px, 4vw, 40px); }
.hero { min-height: calc(100svh - 64px); display: flex; flex-direction: column; justify-content: center; padding: 40px 0; }
.hero h1 { font-size: clamp(40px, 8vw, 84px); text-shadow: 0 2px 24px rgba(0,0,0,.8); }
.eyebrow { color: var(--badge); letter-spacing: .14em; text-transform: uppercase; font-size: 13px; font-weight: 700; margin: 0 0 10px; }
.lede { font-size: 19px; color: var(--text); max-width: 34ch; margin: 0 0 24px; text-shadow: 0 1px 12px rgba(0,0,0,.9); }
.hero .lede { max-width: 640px; text-shadow: 0 1px 12px rgba(0,0,0,.9); }
.hero .lede.small { font-size: .95em; opacity: .85; margin-top: 0; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.fine { color: var(--muted); font-size: 14px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 22px; border: 0; border-radius: 99px; background: var(--action); color: var(--on-pastel); font: 700 16px var(--font); cursor: pointer; text-decoration: none; }
.btn:hover, .btn:focus-visible { color: var(--on-pastel); text-decoration: none; filter: brightness(1.06); }
.btn.alt { background: var(--action-2); }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .5; cursor: default; }

/* Menu */
.tabs { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 14px; scrollbar-width: none; position: sticky; top: 72px; z-index: 5; background: linear-gradient(var(--bg) 80%, transparent); }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 99px; padding: 8px 14px; font: 600 14px var(--font); cursor: pointer; }
.tab[aria-selected="true"] { background: var(--sec, var(--action)); color: var(--on-pastel); border-color: transparent; }
.menu-sec { margin: 8px 0 32px; }
.menu-sec h3 { display: inline-block; font-size: 22px; background: var(--sec); color: var(--on-pastel); padding: 6px 14px; border-radius: var(--radius-sm); }
.menu-sec .note { color: var(--muted); font-size: 14px; margin: -4px 0 10px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.item { display: flex; flex-direction: column; text-align: left; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; padding: 0; font: inherit; cursor: pointer; transition: border-color .15s, transform .15s; }
.item:hover, .item:focus-visible { border-color: var(--sec); transform: translateY(-2px); }
.item.static { cursor: default; }
.item.static:hover { transform: none; border-color: var(--line); }
.item .ph { aspect-ratio: 4/3; width: 100%; object-fit: cover; background: var(--surface-2); display: block; }
.item .ph.blank { display: grid; place-items: center; color: var(--on-pastel); background: var(--sec); font: 700 18px var(--font-display); padding: 12px; text-align: center; }
.item .body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.item .nm { font-weight: 700; }
.item .ds { color: var(--muted); font-size: 14px; }
.item .row { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 6px; }
.item .pr { color: var(--price); font-weight: 700; }
.item .add { background: var(--sec); color: var(--on-pastel); border-radius: 99px; padding: 3px 12px; font-size: 14px; font-weight: 700; }
.item .din { color: var(--muted); font-size: 13px; }
.item.out { opacity: .45; cursor: not-allowed; }
.sauces { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.sauce { display: flex; justify-content: space-between; gap: 8px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.sauce:hover, .sauce:focus-visible { border-color: var(--sec); }
.sauce .pr { color: var(--price); font-weight: 700; }

.dinein { margin: 8px 0 32px; padding: 18px 20px; border-radius: var(--radius); border: 2px solid var(--sec); background: var(--surface); max-width: 640px; }
.dinein h3 { display: inline-block; font-size: 22px; background: var(--sec); color: var(--on-pastel); padding: 6px 14px; border-radius: var(--radius-sm); }
.dinein p { margin: 0; font-size: 17px; }

/* Order section */
.order-wrap .panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; max-width: 640px; }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 99px; padding: 4px; margin-bottom: 16px; }
.seg button { border: 0; background: transparent; color: var(--text); font: 700 15px var(--font); padding: 8px 20px; border-radius: 99px; cursor: pointer; }
.seg button[aria-selected="true"] { background: var(--action-2); color: var(--on-pastel); }
.partners { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 12px; }

/* Visit */
.visit-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.card h4 { margin: 0 0 8px; color: var(--badge); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; }
.card table { border-collapse: collapse; }
.card td { padding: 2px 12px 2px 0; white-space: nowrap; }

.foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 24px 20px calc(24px + env(safe-area-inset-bottom)); color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); background: rgba(0,0,0,.6); }

/* Dialogs */
dialog { color: var(--text); background: var(--surface); border: 1px solid var(--line); padding: 0; }
dialog::backdrop { background: rgba(0,0,0,.7); }
.sheet { width: min(480px, calc(100vw - 24px)); border-radius: 18px; max-height: calc(100svh - 24px); overflow-y: auto; }
/* Dish changes (WEB-021): choice chips and No / Add / Extra toppings */
.choice .lab, .tops .lab { font-weight: 700; margin: 4px 0 8px; }
.choice small, .tops small { color: var(--muted); font-weight: 400; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { border: 1px solid var(--line); background: var(--surface-2); color: var(--text); border-radius: 99px; padding: 8px 14px; font: 600 14px var(--font); cursor: pointer; }
.opt[aria-pressed="true"] { background: var(--action); color: var(--on-pastel); border-color: var(--action); }
.tops details { margin-top: 6px; }
.tops summary { cursor: pointer; font-weight: 700; padding: 6px 0; color: var(--link); }
.tp { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.tp .tb { display: inline-flex; gap: 6px; }
.tp .tb button { min-width: 58px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); border-radius: 99px; padding: 6px 10px; font: 600 13px var(--font); cursor: pointer; }
.tp .tb button.on.k-no { background: var(--pastel-rose); color: var(--on-pastel); border-color: var(--pastel-rose); }
.tp .tb button.on.k-add, .tp .tb button.on.k-extra { background: var(--pastel-mint); color: var(--on-pastel); border-color: var(--pastel-mint); }
.chg b { font-weight: 800; }
.chg-no b { color: var(--pastel-rose); }
.chg-add b, .chg-extra b { color: var(--pastel-mint); }
.lines .edit { all: unset; cursor: pointer; font-weight: 700; }
.lines .edit:focus-visible { outline: 2px solid var(--link); border-radius: 4px; }
.lines .chg-hint { font-weight: 400; font-size: 12px; color: var(--link); margin-left: 6px; }
.lines .mods { color: var(--text); }
.sheet-in { padding: 20px; position: relative; display: flex; flex-direction: column; gap: 12px; }
.sheet-in.center { text-align: center; align-items: center; }
.x { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border-radius: 99px; border: 0; background: rgba(0,0,0,.6); color: var(--text); font-size: 22px; line-height: 1; cursor: pointer; z-index: 2; }
.dish-photo { width: calc(100% + 40px); margin: -20px -20px 0; aspect-ratio: 4/3; object-fit: cover; border-radius: 18px 18px 0 0; background: var(--surface-2); }
.dish-desc { color: var(--muted); margin: -6px 0 0; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); }
.field input, .field textarea, .field select { font: 16px var(--font); color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--link); outline: none; }
.qty-row { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 99px; }
.qty button { width: 40px; height: 40px; border: 0; background: transparent; color: var(--text); font-size: 20px; cursor: pointer; }
.qty output { min-width: 28px; text-align: center; font-weight: 700; }
.lines .qty { justify-self: start; }
.qty.sm button { width: 32px; height: 32px; font-size: 17px; }

.drawer { margin: 0 0 0 auto; height: 100%; max-height: 100%; width: min(440px, 100vw); border-radius: 18px 0 0 18px; border-right: 0; }
.drawer-in { padding: 18px 20px 28px; display: flex; flex-direction: column; gap: 14px; min-height: 100%; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; }
.drawer-head .x { position: static; }
.drawer-head h3 { margin: 0; }
.lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.lines li { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.lines .nm { font-weight: 700; }
.lines .nt { color: var(--muted); font-size: 13px; grid-column: 1; }
.lines .pr { color: var(--price); font-weight: 700; text-align: right; }
.lines .empty { color: var(--muted); border: 0; display: block; }
.totals { display: grid; grid-template-columns: 1fr auto; gap: 4px; font-size: 15px; }
.totals .t { font-weight: 800; font-size: 18px; }
.checkout { display: flex; flex-direction: column; gap: 12px; border-top: 1px solid var(--line); padding-top: 14px; }
.checkout h4 { margin: 0; }
.pay { margin: 0; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text); font-size: 14px; }
.err { color: var(--pastel-rose); min-height: 1em; margin: 0; font-size: 14px; }
.test-note { background: var(--pastel-butter); color: var(--on-pastel); padding: 10px 12px; border-radius: var(--radius-sm); font-size: 14px; }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0; background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 99px; font-weight: 700; z-index: 100; transition: opacity .2s, transform .2s; pointer-events: none; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bg-still, .intro, .top, main, .foot { transition: none; }
}

/* Phones: the header wraps to two rows */
@media (max-width: 560px) {
  html { scroll-padding-top: 160px; }
  .tabs { top: 104px; }
  .top-logo .logo-loop { height: 40px; }
  .hero { min-height: 72svh; }
}
/* Preview banner while ordering is in test mode (WEB-022) */
.preview-bar { position: relative; z-index: 11; background: var(--pastel-butter); color: var(--on-pastel); text-align: center; font: 600 13px var(--font); padding: 6px 12px; }
/* The guest's order status under the header (WEB-006) */
.order-bar { position: sticky; top: 72px; z-index: 9; display: flex; align-items: center; justify-content: center; gap: 10px; text-align: center; font: 600 14px var(--font); padding: 8px 12px; background: var(--pastel-sky); color: var(--on-pastel); }
.order-bar.s-accepted { background: var(--pastel-butter); }
.order-bar.s-ready { background: var(--pastel-mint); }
.order-bar.s-declined, .order-bar.s-canceled { background: var(--pastel-rose); }
@media (max-width: 560px) { .order-bar { top: 106px; } }
.order-bar[hidden] { display: none; }
.order-bar .x { border: 0; background: rgba(0,0,0,.12); color: inherit; width: 26px; height: 26px; border-radius: 99px; font-size: 17px; line-height: 1; cursor: pointer; flex: none; }
.order-bar.s-picked { background: var(--pastel-lilac); }
