* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ink: #111111;
  --red: #a5321d;
  --grey: #8a8a8a;
  --font: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --receipt: "VT323", "Courier New", monospace;
  --bg-image: url("assets/bg.png");
}

html, body {
  height: 100%;
}

body {
  font-family: var(--font);
  color: var(--ink);
  background: #2a2622;
  overflow: hidden;
}

/* The photo lives on a fixed layer so it stays put while the page
   scrolls on mobile (iOS ignores background-attachment: fixed).
   Sized with lvh (large viewport) so it does NOT resize — and the
   image does not zoom — when Safari's URL bar collapses. */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100lvh;
  z-index: -1;
  background: var(--bg-image) center / cover no-repeat;
}

/* White menu card — the only scrollable element on desktop.
   Everything inside is set in the receipt font. */
.menu-panel {
  position: fixed;
  top: 28px;
  left: 28px;
  bottom: 56px;
  width: min(420px, calc(100vw - 56px));
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
  font-family: var(--receipt);
}

/* Torn-receipt edges above and below the card: a 144px tile of
   irregular teeth (varying heights, one blunted, one half torn off)
   so the repeat doesn't read as mechanical.
   background-repeat: round fits a whole number of teeth to the width. */
.menu-panel::before,
.menu-panel::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 10px;
  background-size: 144px 10px;
  background-repeat: round no-repeat;
  pointer-events: none;
}

.menu-panel::before {
  top: -10px;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='144'%20height='10'%3E%3Cpath%20d='M0%2010L5%203L10%2010L16%201.5L22%2010L28%204.5L33%2010L39%202L46%2010L52%205.5L57%2010L61%201.4L65%201L70%2010L76%203.5L81%2010L87%202.5L94%2010L99%207.2L104%2010L110%201.8L117%2010L123%204L129%2010L136%202.2L144%2010Z'%20fill='%23ffffff'/%3E%3C/svg%3E");
}

.menu-panel::after {
  bottom: -10px;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='144'%20height='10'%3E%3Cpath%20d='M0%200L5%207L10%200L16%208.5L22%200L28%205.5L33%200L39%208L46%200L52%204.5L57%200L61%208.6L65%209L70%200L76%206.5L81%200L87%207.5L94%200L99%202.8L104%200L110%208.2L117%200L123%206L129%200L136%207.8L144%200Z'%20fill='%23ffffff'/%3E%3C/svg%3E");
  background-position: 60px 0;
}

.panel-scroll {
  position: relative;
  background: #ffffff;
  height: 100%;
  overflow-y: auto;
  padding: 0 30px 40px;
  -webkit-overflow-scrolling: touch;
}

.panel-logo {
  display: block;
  width: min(200px, 58%);
  margin: 30px auto 26px;
  cursor: pointer;
}

/* Menu tabs — stick to the top while the menus scroll */
.menu-tabs {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  background: #ffffff;
  padding: 14px 0 10px;
  margin-bottom: 8px;
}

.menu-tab {
  font-family: var(--receipt);
  font-size: 21px;
  font-weight: 400;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  background: none;
  border: none;
  padding: 0 0 2px;
  cursor: pointer;
  color: var(--grey);
  white-space: nowrap;
}

.menu-tab.active {
  color: var(--ink);
  border-bottom: 2px solid var(--ink);
}

.menu-tab:hover { color: var(--ink); }

/* One block per menu, all in a single scroll; dashed receipt rules */
.menu-block + .menu-block {
  margin-top: 40px;
  border-top: 2px dashed #b8b8b8;
  padding-top: 24px;
}

/* Schedule line + serving badge */
.panel-meta {
  min-height: 20px;
  margin-bottom: 22px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
}

.panel-meta .sched {
  font-size: 15px;
  font-weight: 400;
  color: var(--grey);
  letter-spacing: 0.5px;
}

.serving-now {
  font-size: 13px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #ffffff;
  background: var(--red);
  border-radius: 999px;
  padding: 2px 10px 1px;
}

/* Menu content */
.menu-section + .menu-section { margin-top: 26px; }

.menu-section-title {
  font-family: var(--receipt);
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #6b6b6b;
  margin-bottom: 8px;
}

.menu-items { list-style: none; }

.menu-items .item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  font-size: 21px;
  font-weight: 400;
  padding: 5px 0;
}

.item-name { flex: 1 1 auto; }

.item-price { flex: 0 0 auto; }

.hidden { display: none !important; }

/* About / contact views inside the panel */
.back-link {
  font-family: var(--receipt);
  font-size: 16px;
  color: var(--grey);
  background: none;
  border: none;
  cursor: pointer;
  padding: 16px 0 0;
  margin-bottom: 18px;
  display: block;
}

.back-link:hover { color: var(--ink); }

.page-title {
  font-family: var(--receipt);
  font-size: 26px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 14px;
}

.page-text p {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
}

.page-text p + p { margin-top: 12px; }

/* Receipt-style about box at the bottom of the menu: dashed frame with
   a dotted inner rule, text in the receipt font */
.about-box {
  margin-top: 40px;
  border: 2px dashed #b0b0b0;
  outline: 1px dotted #c8c8c8;
  outline-offset: -7px;
  padding: 18px 20px;
  font-family: var(--receipt);
}

.about-box p {
  font-size: 19px;
  line-height: 1.45;
}

.about-box p + p { margin-top: 10px; }

/* Receipt sign-off at the bottom of the card */
.panel-thanks {
  display: block;
  width: min(200px, 58%);
  margin: 36px auto 8px;
  border-top: 2px dashed #b8b8b8;
  padding-top: 26px;
}

/* Corner links on the photo */
.corner-links {
  position: fixed;
  right: 26px;
  bottom: 20px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  gap: 8px;
}

.corner-links button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 2px;
  text-shadow: inherit;
}

.corner-links button:hover { text-decoration: underline; }

.corner-links a {
  color: inherit;
  text-decoration: none;
  padding: 4px 2px;
  text-shadow: inherit;
}

.corner-links a:hover { text-decoration: underline; }

.credit {
  position: fixed;
  left: 28px;
  bottom: 20px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.75);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}

.credit a { color: inherit; }

/* Phone: the page itself scrolls. The card starts low with just the
   logo peeking over the photo; scrolling up reveals the whole menu. */
@media (max-width: 700px) {
  html, body {
    height: auto;
    overflow: visible;
  }

  .menu-panel {
    position: relative;
    top: auto;
    left: auto;
    bottom: auto;
    width: auto;
    margin: calc(100dvh - 172px) 14px 0;
    box-shadow: 0 -18px 50px rgba(0, 0, 0, 0.4);
  }

  .panel-scroll {
    height: auto;
    overflow: visible;
    /* flow-root keeps the logo's top margin INSIDE the card (without it
       the margin collapses out and the logo pins to the card's top) */
    display: flow-root;
    padding: 0 20px 36px;
  }

  .panel-logo {
    width: min(180px, 55%);
    margin: 38px auto 22px;
    /* stays above the tabs' white shield */
    position: relative;
    z-index: 6;
  }

  .panel-thanks { width: min(180px, 55%); }

  /* White shield extending above the pinned tabs so scrolled items
     can't ghost through the translucent iOS status bar */
  .menu-tabs::before {
    content: "";
    position: absolute;
    left: -20px;
    right: -20px;
    top: -110px;
    height: 110px;
    background: #ffffff;
    z-index: -1;
  }

  .menu-tab { font-size: 19px; }
  .menu-items .item { font-size: 20px; }

  /* Links + credit flow after the card, left-aligned, links on top */
  .corner-links {
    position: static;
    justify-content: flex-start;
    padding: 18px 16px 0;
  }

  .credit {
    position: static;
    padding: 6px 16px calc(22px + env(safe-area-inset-bottom));
  }
}
