/* =============================================================================
   BIG MOUTH'S — SITE STRUCTURE (Draft 4 design system)

   Every layout and component rule. Reads the variables in tokens.css (plus
   the few layout variables declared below) and declares no colours of its
   own: npm run check:css fails on a hex, rgb() or hsl() value here, or on a
   var() that neither file declares. Type comes from the type-style classes in
   tokens.css, used directly in the markup (display-1, heading-2, eyebrow…).

   Sections:
     1. Layout variables     6. Favorites        11. Order chooser
     2. Base & skip link     7. Specials         12. Menu page
     3. Buttons & links      8. Story            13. Phone widths
     4. Header & drawer      9. Visit
     5. Sections & hero     10. Footer
   ============================================================================= */

/* 1. LAYOUT VARIABLES ------------------------------------------------------ */
/* --header-h and --tabs-h are measured by menu.js; these are the fallbacks. */
:root {
  --gutter: var(--space-8);
  --header-h: var(--space-22);
  --tabs-h: 0px;
}

/* 2. BASE & SKIP LINK ------------------------------------------------------ */
.skip-link {
  position: absolute; left: -9999px; top: var(--space-4); z-index: 100;
  padding: var(--space-3) var(--space-4); border-radius: var(--radius-sm);
  background: var(--accent); color: var(--accent-ink); font-weight: 700;
}
.skip-link:focus { left: var(--space-4); }
.eyebrow, .tagline, .label { color: var(--ink-muted); }
.eyebrow--accent { color: var(--accent); }

/* 3. BUTTONS & LINKS ------------------------------------------------------- */
/* Primary is Order Online and nothing else. Secondary is the action beside
   it. Text links for in-page navigation. */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 46px; padding: 0 22px; border: 2px solid transparent; border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 700; line-height: 1; white-space: nowrap; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn-lg { height: 54px; padding: 0 30px; font-size: 16px; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 94%, var(--ink)); border-color: color-mix(in srgb, var(--accent) 94%, var(--ink)); }
.btn-secondary { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn-secondary:hover { background: var(--ink); color: var(--surface); }
.btn-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.text-link { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.text-link--strong { font-size: 15px; font-weight: 700; text-underline-offset: 5px; }
.btn-text-accent { color: var(--accent); font-weight: 700; }

/* 4. HEADER & DRAWER ------------------------------------------------------- */
/* Nav · centered logo · phone + Order Online, in a row whose two sides get
   equal shares so the logo stays centered. nav.js measures it and sheds in
   steps (header-fit-1…6); see nav.js. */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--surface); }
.header-inner {
  max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); min-height: var(--space-22);
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: var(--space-4);
}
.header-start { min-width: 0; display: flex; align-items: center; }
.header-end { min-width: 0; display: flex; justify-content: flex-end; }
.header-nav { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) 22px; font-size: 15px; font-weight: 500; }
.header-nav a { padding: var(--space-2) 0; border-bottom: 2px solid transparent; }
.header-nav a:hover { border-bottom-color: var(--line-strong); }
.header-nav a[aria-current="page"] { border-bottom-color: var(--accent); }
.header-actions { display: flex; align-items: center; gap: var(--space-5); }
.header-phone { font-size: 15px; font-weight: 500; white-space: nowrap; }
.brand { display: flex; flex-direction: column; align-items: center; gap: var(--space-1); }
.brand-mark { width: 56px; height: 56px; border-radius: var(--radius-full); object-fit: cover; }
.brand-name { font-size: 12px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; line-height: 1.4; white-space: nowrap; }

.menu-toggle {
  display: none; align-items: center; justify-content: center;
  width: var(--target); height: var(--target); margin-left: calc(-1 * var(--space-2));
  padding: 0; border: 0; background: none; cursor: pointer;
}
.menu-toggle-bars { display: flex; flex-direction: column; gap: 5px; width: 22px; }
.menu-toggle-bars span { display: block; height: 2px; background: var(--ink); border-radius: 1px; transition: transform .2s, opacity .2s; }
.is-nav-open .menu-toggle-bars span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.is-nav-open .menu-toggle-bars span:nth-child(2) { opacity: 0; }
.is-nav-open .menu-toggle-bars span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Measuring needs each side at its natural width; nav.js marks the header
   once it is in charge. Without JavaScript the nav simply wraps. */
.site-header.is-fitted .header-nav,
.site-header.is-fitted .header-actions { width: max-content; flex-wrap: nowrap; flex-shrink: 0; }
.site-header.is-fitted .header-nav a { white-space: nowrap; }
.header-fit-1 .header-nav { column-gap: var(--space-3); }
.header-fit-2 .header-phone { display: none; }
.header-fit-3 .header-nav { display: none; }
.header-fit-3 .menu-toggle { display: inline-flex; }
.header-fit-4 .header-actions .btn { height: 40px; padding: 0 14px; font-size: 14px; }
.header-fit-5 .brand-name { display: none; }
.header-fit-6 .header-inner { padding: 0 var(--space-4); gap: var(--space-2); }
.header-fit-6 .brand-mark { width: var(--target); height: var(--target); }
.header-fit-6 .header-actions .btn { padding: 0 10px; font-size: 13px; }

/* The drawer sits under the header (which stays on top, toggle and all). */
.nav-backdrop {
  position: fixed; inset: 0; z-index: 30; background: var(--scrim);
  opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s;
}
.nav-drawer {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 40; width: min(320px, 85vw);
  padding: calc(var(--space-22) + var(--space-4)) var(--space-6) var(--space-8);
  background: var(--surface); border-right: 1px solid var(--line); overflow-y: auto;
  transform: translateX(-100%); visibility: hidden; transition: transform .25s, visibility .25s;
}
.nav-drawer-links { display: flex; flex-direction: column; }
.nav-drawer-links a { padding: var(--space-3) 0; border-bottom: 1px solid var(--line); font-size: 17px; font-weight: 500; }
.nav-drawer-links a[aria-current="page"] { color: var(--accent); }
.is-nav-open .nav-backdrop { opacity: 1; visibility: visible; }
.is-nav-open .nav-drawer { transform: none; visibility: visible; }

/* 5. SECTIONS & HERO ------------------------------------------------------- */
.section {
  max-width: var(--container); margin: 0 auto; padding: var(--space-16) var(--gutter);
  display: flex; flex-direction: column; align-items: center; gap: var(--space-10);
}
.section-head { display: flex; flex-direction: column; align-items: center; gap: var(--space-3); text-align: center; }
.section-lede { max-width: 600px; color: var(--ink-secondary); }
[id] { scroll-margin-top: var(--header-h); }

.hero {
  max-width: var(--container); margin: 0 auto; padding: var(--space-18) var(--gutter) var(--space-10);
  display: flex; flex-direction: column; align-items: center; gap: var(--space-6); text-align: center;
}
.hero .display-1 { max-width: 900px; }
.hero-lede { max-width: var(--prose); color: var(--ink-secondary); }
.hero .btn-row { padding-top: var(--space-1); }
.hero-image {
  width: 100%; max-width: var(--hero-image); height: auto; aspect-ratio: 1 / 1; margin-top: var(--space-8);
  object-fit: cover; background: var(--surface-muted); border-radius: var(--radius-lg);
}
.hero .tagline { margin-top: var(--space-2); }

.review-line { gap: 14px; text-align: center; }
.review-stars { color: var(--accent); font-size: 20px; letter-spacing: 0.25em; }
.review-line .quote { max-width: 820px; }
.review-attrib { color: var(--ink-muted); }

/* 6. FAVORITES ------------------------------------------------------------- */
.favorites { width: 100%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-8); }
.favorite { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.favorite-photo { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; background: var(--surface-muted); }
/* A card without a tag keeps the line, so names line up across the row. */
.favorite-tag { min-height: 1.4em; margin-top: 10px; color: var(--accent); }
.favorite .body-sm { color: var(--ink-secondary); }
.photo-placeholder {
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-placeholder); font-size: 13px; font-weight: 600;
}

/* 7. SPECIALS -------------------------------------------------------------- */
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-16); align-items: center; }
.specials-board {
  width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: contain;
  background: var(--surface-raised); border: 1px solid var(--line);
}
.split-text { display: flex; flex-direction: column; gap: var(--space-5); min-width: 0; }
/* Flyer hidden for launch: text alone, one centered column. */
.split--board-hidden { grid-template-columns: minmax(0, 1fr); }
.split--board-hidden .specials-board { display: none; }
.split--board-hidden .split-text { width: 100%; max-width: 640px; justify-self: center; }
.split-text .body { color: var(--ink-secondary); }
.split-text .btn { align-self: flex-start; }
.dash-list { padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: 16px; line-height: 1.5; }
.dash-list li { display: flex; gap: var(--space-3); }
.dash-list li::before { content: "—"; color: var(--accent); font-weight: 800; }

/* 8. STORY ----------------------------------------------------------------- */
.story { gap: var(--space-6); text-align: center; }
.story-lede { max-width: 720px; color: var(--ink-secondary); line-height: 1.6; }
.story-columns {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-12);
  max-width: 960px; padding-top: var(--space-4); text-align: left;
}
.story-columns > div { display: flex; flex-direction: column; gap: 10px; }
.story-title { font-size: 18px; font-weight: 700; line-height: 1.3; }
.story-columns .body { color: var(--ink-secondary); font-size: 16px; }

/* 9. VISIT ----------------------------------------------------------------- */
.visit { padding-bottom: var(--space-22); }
.visit-facts { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-8); text-align: center; }
.visit-facts > div { display: flex; flex-direction: column; gap: 6px; }
.visit-fact { font-size: 18px; line-height: 1.5; font-weight: 500; }
.visit-facts .open-status { color: var(--ink-secondary); }
.map-frame { width: 100%; max-width: 880px; aspect-ratio: 16 / 7; background: var(--surface-muted); }
.map-frame iframe { display: block; width: 100%; height: 100%; border: 0; }

/* 10. FOOTER --------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--line); }
.footer-inner {
  max-width: var(--container); margin: 0 auto; padding: var(--space-10) var(--gutter) var(--space-7);
  display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center;
  font-size: 14px; line-height: 1.6; color: var(--ink-secondary);
}
.footer-name { color: var(--ink); font-size: 15px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.footer-meta a { font-weight: 600; }
.footer-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-2) var(--space-5); font-weight: 500; }
/* Both pages share the footer: the link to the page you are on drops out. */
.footer-nav a[aria-current="page"] { display: none; }
.footer-fine { margin-top: var(--space-2); font-size: 12px; color: var(--ink-muted); }
.footer-fine span + span::before { content: " · "; }
.footer-fine a { text-decoration: underline; text-underline-offset: 3px; }

/* 11. ORDER CHOOSER -------------------------------------------------------- */
/* Without JavaScript: a plain panel above the footer. With it (order.js):
   the same panel inside a modal <dialog>. */
.order-chooser {
  max-width: var(--dialog); margin: 0 auto var(--space-16); padding: var(--space-8);
  display: flex; flex-direction: column; gap: var(--space-5);
  border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface);
}
.order-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-4); }
.order-head-text { display: flex; flex-direction: column; gap: 6px; }
.order-head-text .caption { color: var(--ink-muted); }
.order-close {
  flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  width: var(--target); height: var(--target); padding: 0; border: 0; border-radius: var(--radius-sm);
  background: var(--surface-muted); color: var(--ink); cursor: pointer;
}
.order-close[hidden] { display: none; }
.order-group { display: flex; flex-direction: column; gap: 10px; }
.order-row {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-4);
  padding: var(--space-4) var(--space-5); border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm);
  font-size: 16px; font-weight: 700; transition: border-color .15s, background-color .15s;
}
.order-row:hover { border-color: var(--ink); }
.order-row-arrow { color: var(--ink-muted); }
.order-row--pickup { padding: 18px var(--space-5); background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.order-row--pickup:hover { background: color-mix(in srgb, var(--accent) 94%, var(--ink)); border-color: color-mix(in srgb, var(--accent) 94%, var(--ink)); }
.order-row-text { display: flex; flex-direction: column; gap: 2px; }
.order-row-title { font-size: 17px; }
.order-row-sub { font-size: 14px; font-weight: 400; opacity: 0.92; }
.order-row-sub .open-status b { font-weight: 700; }

.order-dialog {
  width: calc(100% - 2 * var(--space-6)); max-width: var(--dialog); padding: 0; border: 0;
  border-radius: var(--radius-md); background: var(--surface); color: var(--ink);
}
.order-dialog::backdrop { background: var(--scrim); }
.order-dialog .order-chooser { margin: 0; border: 0; }
html:has(.order-dialog[open]) { overflow: hidden; }

/* 12. MENU PAGE ------------------------------------------------------------ */
.menu-head {
  max-width: var(--container); margin: 0 auto; padding: var(--space-14) var(--gutter) var(--space-6);
  display: flex; flex-direction: column; align-items: center; gap: var(--space-4); text-align: center;
}
.menu-lede { max-width: 560px; font-size: 18px; line-height: 1.5; color: var(--ink-secondary); }
.menu-hours { color: var(--ink-muted); }

.menu-tabs-bar {
  position: sticky; top: var(--header-h); z-index: 10;
  background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.menu-tabs {
  max-width: var(--container); margin: 0 auto; padding: var(--space-1) var(--gutter);
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0 36px;
}
.menu-tab {
  display: inline-flex; align-items: center; min-height: var(--target); padding: 10px 2px;
  border-bottom: 2px solid transparent; color: var(--ink-muted);
  font-size: 14px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; line-height: 1.4;
}
.menu-tab:hover { color: var(--ink); }
.menu-tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }

.menu-root { max-width: var(--content); margin: 0 auto; padding: var(--space-6) var(--gutter) var(--space-12); }
.menu-group { scroll-margin-top: calc(var(--header-h) + var(--tabs-h)); }
.menu-jump { margin-top: var(--space-6); text-align: center; color: var(--ink-muted); line-height: 2; }
.menu-jump a { margin: 0 var(--space-2); color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.menu-cat {
  padding: var(--space-14) 0 var(--space-6); display: flex; flex-direction: column; gap: var(--space-8);
  scroll-margin-top: calc(var(--header-h) + var(--tabs-h));
}
.menu-cat-head { display: flex; flex-direction: column; align-items: center; gap: var(--space-2); text-align: center; }
.menu-cat-head .caption { max-width: var(--prose); color: var(--ink-muted); }
.menu-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-7) var(--space-14); }
.menu-item { display: flex; align-items: flex-start; gap: var(--space-5); min-width: 0; }
.menu-item-text { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: var(--space-1); }
.menu-item-text .caption { color: var(--ink-secondary); }
.menu-item-thumb {
  flex: 0 0 auto; width: var(--thumb); height: var(--thumb);
  border-radius: var(--radius-sm); object-fit: cover; background: var(--surface-muted);
}

.menu-cta {
  max-width: var(--container); margin: 0 auto; padding: var(--space-12) var(--gutter) var(--space-20);
  display: flex; flex-direction: column; align-items: center; gap: var(--space-4); text-align: center;
  border-top: 1px solid var(--line);
}
.menu-cta .body { color: var(--ink-secondary); }
.menu-cta .btn { margin-top: var(--space-2); }

/* 13. PHONE WIDTHS --------------------------------------------------------- */
@media (max-width: 960px) {
  .favorites { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .split { grid-template-columns: minmax(0, 1fr); gap: var(--space-10); }
  .specials-board { max-width: 480px; justify-self: center; }
}
@media (max-width: 720px) {
  :root { --gutter: var(--space-6); }
  .header-inner { gap: var(--space-3); }
  .section { padding-top: var(--space-12); padding-bottom: var(--space-12); }
  .hero { padding-top: var(--space-12); }
  .display-1 { font-size: clamp(34px, 10vw, 56px); }
  .display-2 { font-size: 44px; }
  .heading-1 { font-size: 32px; }
  .heading-2 { font-size: 26px; }
  .quote { font-size: 22px; }
  .body-lg { font-size: 17px; }
  .story-columns { grid-template-columns: minmax(0, 1fr); gap: var(--space-8); }
  .visit-facts { grid-template-columns: minmax(0, 1fr); gap: var(--space-6); }
  .map-frame { aspect-ratio: 4 / 3; }
  /* One scrollable row: four wrapped tabs would make a three-row sticky bar. */
  .menu-tabs {
    flex-wrap: nowrap; justify-content: flex-start; gap: 0 var(--space-5);
    overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .menu-tabs::-webkit-scrollbar { display: none; }
  .menu-tab { flex: 0 0 auto; white-space: nowrap; }
  .menu-cat { padding-top: var(--space-10); }
  .menu-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .favorites { grid-template-columns: minmax(0, 1fr); }
  .order-chooser { padding: var(--space-6); }
  /* The chooser becomes a bottom sheet. */
  .order-dialog {
    width: 100%; max-width: none; margin: auto 0 0; max-height: 90vh;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
  }
}
