/* ========================================================
   Menu page — two-column, Forno-reference layout
   (design arrangement only; fonts/content are Marks' own)
   ======================================================== */

.menu-page {
  max-width: 1320px;
  margin: 0 auto;
  padding: 9rem var(--pad) 5rem;
}

/* ---------- Menu tabs (Food / Drinks) ---------- */
.menu-tabs {
  display: flex;
  justify-content: center;
  gap: 0;
  max-width: 360px;
  margin: 0 auto 4rem;
  border: 1px solid var(--line);
  padding: 0.35rem;
  background: var(--bg);
}

.menu-tab {
  flex: 1;
  text-align: center;
  padding: 0.85rem 1.25rem;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink-soft);
  transition: background 0.25s ease, color 0.25s ease;
}

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

.menu-tab.is-active {
  background: var(--gold-deep);
  color: #fff;
}

/* ---------- Menu layout ---------- */
.menu-grid {
  display: flex;
  flex-direction: column;
  gap: clamp(3.5rem, 6vw, 5.5rem);
}

/* Paired-row: two sections side-by-side with a centered vertical rule */
.pair-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: clamp(2.5rem, 5vw, 4.5rem);
  row-gap: clamp(3.5rem, 6vw, 5rem);
  position: relative;
}

.pair-row::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: var(--line);
  transform: translateX(-50%);
}

/* Triple-row: three sections side-by-side with two vertical rules */
.triple-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  column-gap: clamp(1.75rem, 3.5vw, 3rem);
  row-gap: clamp(3rem, 5vw, 4.5rem);
  position: relative;
}

.triple-row::before,
.triple-row::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--line);
}

.triple-row::before {
  left: calc(33.333% - 0.5px);
}

.triple-row::after {
  left: calc(66.666% - 0.5px);
}

@media (max-width: 720px) {
  .triple-row {
    grid-template-columns: 1fr 1fr;
  }
  .triple-row::after {
    display: none;
  }
  .triple-row::before {
    left: 50%;
    transform: translateX(-50%);
  }
}

/* Full-width section — centered title, two-column dish list */
.cat-full {
  text-align: center;
  padding: 0.5rem clamp(1rem, 5vw, 4rem);
}

.cat-full .cat-head {
  text-align: center;
  font-size: clamp(1.4rem, 2.4vw, 1.85rem);
  letter-spacing: 0.3em;
}

.cat-full .cat-lede {
  text-align: center;
  margin: 0.4rem auto 1.75rem;
  max-width: 540px;
}

.cat-full .cat-dishes {
  text-align: left;
}

@media (min-width: 760px) {
  .cat-full .cat-dishes {
    column-count: 2;
    column-gap: clamp(2rem, 4vw, 3.5rem);
  }
  .cat-full .cat-dishes .d {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .cat-full .cat-dishes .d + .d {
    border-top: 0;
  }
}

/* ---------- Category ---------- */
.cat {
  display: flex;
  flex-direction: column;
  break-inside: avoid;
}

.cat-head {
  margin: 0 0 0.35rem;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.35rem, 2vw, 1.65rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
}

.cat-lede {
  margin: 0 0 1.5rem;
  font-size: 0.82rem;
  color: var(--muted);
  font-style: italic;
  letter-spacing: 0.02em;
}

.cat-sub {
  margin: 1.75rem 0 0.75rem;
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold-deep);
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}

.cat-sub::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 1px;
  background: var(--gold);
  transform: translateY(-3px);
}

.cat-sub-meta {
  font-weight: 300;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  color: var(--muted);
  text-transform: none;
  font-style: italic;
}

/* ---------- Dishes ---------- */
.cat-dishes {
  list-style: none;
  padding: 0;
  margin: 0;
}

.d {
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
  padding: 0.55rem 0;
  line-height: 1.55;
}

.d + .d {
  border-top: 1px dotted rgba(20, 20, 20, 0.08);
}

.d-line {
  flex: 1;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.d-name {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.d-desc {
  color: var(--ink);
  font-weight: 300;
}

.d-price {
  flex-shrink: 0;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--ink);
  min-width: 2rem;
  text-align: right;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

/* Compact dish rows (nigiri, sashimi, sides) */
.dishes-compact .d {
  padding: 0.35rem 0;
}

.dishes-compact .d-line {
  font-size: 0.88rem;
}

.dishes-compact .d-name {
  font-size: 0.9rem;
}

/* Two-column dish list (used for Maki Signature, Mocktails, etc.).
   Applies at all widths — splits a long list into two columns inside
   whatever cell it sits in (full-width cat-full or pair-row cell). */
.dishes-2col {
  column-count: 2;
  column-gap: clamp(1rem, 2.5vw, 2rem);
}

.dishes-2col .d {
  break-inside: avoid;
  page-break-inside: avoid;
}

.dishes-2col .d + .d {
  border-top: 0;
}

/* ---------- Spirits table (Whisky, Cognac, Gin/Vodka, Tequila, Champagne) ----------
   Columns: name | shot | bottle (bottle is the outermost right column).
   The header row is placed INSIDE the same <ul> as a <li class="d-spirit-head">
   so it inherits the exact same width as the data rows below it. */
.spirits-list {
  list-style: none;
}

.spirits-list .d-spirit-head,
.spirits-list .d.d-spirit {
  display: grid;
  /* rem (not em) so column widths stay identical across the header row
     (which has a smaller font-size) and the data rows below it. */
  grid-template-columns: minmax(0, 1fr) 4rem 6rem;
  gap: 0 1.25rem;
}

.d-spirit-head {
  padding: 0.5rem 0 0.45rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--sans);
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

.d-spirit-head span {
  font-size: 0.62rem;
}

.d-spirit-head span:nth-child(2),
.d-spirit-head span:nth-child(3) {
  text-align: right;
  /* Trailing letter-spacing leaves a phantom gap after the last letter that
     right-aligned data values don't have. Pull the visible right edge over
     by the same amount so SHOT/BOTTLE labels sit flush with the prices below. */
  margin-right: -0.24em;
}

.d-spirit-head + .d {
  border-top: 0;
}

.d.d-spirit {
  align-items: baseline;
  padding: 0.55rem 0;
  line-height: 1.45;
}

.d-spirit .d-name {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.92rem;
  color: var(--ink);
  letter-spacing: 0.005em;
  min-width: 0;
}

.d-spirit .d-meta {
  margin-left: 0.5rem;
}

.d-spirit .d-bottle,
.d-spirit .d-shot {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--ink);
  text-align: right;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

/* Empty cells render as a faint dash so the table reads cleanly */
.d-spirit .d-bottle:empty::after,
.d-spirit .d-shot:empty::after {
  content: "—";
  color: var(--muted);
  opacity: 0.5;
}

@media (max-width: 480px) {
  .spirits-list .d-spirit-head,
  .spirits-list .d.d-spirit {
    grid-template-columns: minmax(0, 1fr) 2.75rem 4.5rem;
    gap: 0 0.75rem;
  }

  .d-spirit .d-name {
    font-size: 0.82rem;
  }

  .d-spirit .d-bottle,
  .d-spirit .d-shot {
    font-size: 0.8rem;
  }
}

/* Narrow phones — spirits tables don't fit two-up. Collapse any pair-row
   that contains a spirits table to a single column so name + shot + bottle
   actually have room, and hide that row's vertical divider. */
@media (max-width: 600px) {
  .pair-row:has(.spirits-list) {
    grid-template-columns: 1fr;
  }
  .pair-row:has(.spirits-list)::before {
    display: none;
  }
}

/* Full-width spirits list keeps a single column instead of splitting,
   so the bottle/shot header row stays at the top and rows align under it. */
.cat-full .spirits-list {
  column-count: 1 !important;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 0;
}

.cat-full > .cat-sub {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Inline markers ---------- */
.d-tag {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.08rem 0.38rem;
  font-family: var(--sans);
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--muted);
  border: 1px solid currentColor;
  border-radius: 2px;
  text-transform: uppercase;
  transform: translateY(-2px);
  line-height: 1.3;
  vertical-align: middle;
}

.d-tag + .d-tag {
  margin-left: 0.25rem;
}

.d-tag.tag-v {
  color: #6a7a3a;
}

.d-meta {
  display: inline-block;
  margin-left: 0.5rem;
  font-family: var(--sans);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-deep);
  font-weight: 400;
  transform: translateY(-1px);
}

/* spicy/sig per-row markers + legend removed */

/* Marks Signatures — gold-highlighted treatment */
.cat-signatures {
  padding: 2rem 2rem 1.5rem;
  background: var(--bg-alt);
  border-left: 2px solid var(--gold);
}

.cat-signatures .cat-head {
  margin-top: 0;
  color: var(--gold-deep);
}

.cat-signatures .cat-lede {
  color: var(--ink-soft);
}

/* When Marks Signatures is full-width centered, swap the left rule for
   top + bottom gold rules so the layout reads symmetrically. */
.cat-full.cat-signatures {
  border-left: 0;
  border-top: 1px solid var(--gold);
  border-bottom: 1px solid var(--gold);
  padding: 2.5rem clamp(1.25rem, 5vw, 4rem) 2rem;
  max-width: 960px;
  margin: 0 auto;
}

.cat-full.cat-signatures .cat-head {
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  letter-spacing: 0.32em;
}

/* Center each signature dish — name+meta on top, desc below, price
   beneath, all stacked and centered. Looks like a centerpiece tile
   rather than a left-aligned row. */
.cat-full.cat-signatures .cat-dishes {
  text-align: center;
}

.cat-full.cat-signatures .d {
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 1rem 0;
  text-align: center;
}

.cat-full.cat-signatures .d-line {
  flex: 0 1 auto;
  text-align: center;
}

.cat-full.cat-signatures .d-desc {
  display: block;
  margin-top: 0.25rem;
}

.cat-full.cat-signatures .d-price {
  min-width: 0;
  text-align: center;
}

@media (max-width: 680px) {
  .cat-full.cat-signatures {
    padding: 1.5rem 1rem 1rem;
  }

  .cat-full.cat-signatures .d {
    padding: 0.75rem 0;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  /* Override the mobile .d-line flex defaults so the name + meta + desc
     all center inside the signature row instead of left-aligning. */
  .cat-full.cat-signatures .d-line {
    justify-content: center;
    text-align: center;
    flex-basis: auto;
    width: 100%;
  }

  .cat-full.cat-signatures .d-name {
    text-align: center;
  }

  .cat-full.cat-signatures .d-desc {
    text-align: center;
  }

  /* Override the mobile .d-price align-self: flex-start so the price
     sits centered under the description instead of pulling left. */
  .cat-full.cat-signatures .d-price {
    align-self: center;
    text-align: center;
    min-width: 0;
  }
}

/* Category divider — sits above a paired row to group sections under
   a common banner like "Mains" or "Sushi". */
.menu-cat-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1rem, 3vw, 2rem);
  margin: 1.5rem auto -0.5rem;
  width: 100%;
}

.menu-cat-divider::before,
.menu-cat-divider::after {
  content: "";
  flex: 1;
  max-width: 180px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold) 30%, var(--gold) 70%, transparent);
  opacity: 0.7;
}

.menu-cat-divider h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold-deep);
  text-align: center;
}

/* ---------- Responsive ----------
   Two-column layout is preserved at every viewport so the
   printed-menu feel is consistent. Below each breakpoint
   we progressively tighten the grid, type and row layout
   to keep columns readable.
   ------------------------------------------------------ */

/* Tablet — narrower column gap, slightly smaller type */
@media (max-width: 960px) {
  .menu-page {
    padding: 8rem 2.5rem 4rem;
  }

  .menu-grid {
    gap: 3.25rem;
  }

  .cat-head {
    font-size: 1.1rem;
    letter-spacing: 0.18em;
  }

  .cat-lede {
    font-size: 0.78rem;
  }

  .d {
    gap: 0.85rem;
  }

  .d-line,
  .d-name {
    font-size: 0.88rem;
  }

  .d-desc {
    font-size: 0.86rem;
  }

  .d-price {
    font-size: 0.85rem;
  }

  .cat-signatures {
    padding: 1.5rem 1.25rem 1rem;
  }
}

/* Phone landscape / small tablet — description wraps below the
   name+price row so the two-column grid stays consistent */
@media (max-width: 680px) {
  .menu-page {
    padding: 7rem 2rem 3rem;
  }

  .menu-grid {
    gap: 2.5rem;
  }

  .cat-head {
    font-size: 0.95rem;
    letter-spacing: 0.16em;
    line-height: 1.3;
  }

  .cat-lede {
    font-size: 0.72rem;
    margin-bottom: 1rem;
  }

  .cat-sub {
    font-size: 0.62rem;
    letter-spacing: 0.2em;
    margin-top: 1.25rem;
  }

  .cat-sub-meta {
    display: none;
  }

  /* dish row: .d is flex row (name-line | price).
     .d-line is a nested flex-wrap container so the description
     flows to its own line below the name + inline markers. */
  .d {
    align-items: baseline;
    gap: 0.25rem 0.6rem;
    padding: 0.65rem 0;
  }

  .d-line {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.15rem 0.3rem;
    font-size: 0.82rem;
    line-height: 1.4;
  }

  .d-name {
    font-size: 0.82rem;
  }

  .d-tag,
  .d-meta {
    margin-left: 0;
    flex: 0 0 auto;
  }

  .d-desc {
    display: block;
    flex-basis: 100%;
    font-size: 0.76rem;
    line-height: 1.45;
    margin-top: 0.2rem;
    color: var(--muted);
  }

  .d-price {
    align-self: flex-start;
    font-size: 0.8rem;
    min-width: auto;
  }

  .dishes-compact .d-desc {
    display: none; /* keep nigiri/sashimi tight on mobile */
  }

  .cat-signatures {
    padding: 1.25rem 1rem 0.75rem;
  }
}

/* ---------- Back-to-top (mobile only) ----------
   Hidden on desktop; on phones it fades in once the page is scrolled
   past ~600px and smooth-scrolls to the top on tap. */
.back-to-top {
  display: none;
  position: fixed;
  right: 1.5rem;
  bottom: 2rem;
  z-index: 40;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--gold-deep);
  background: var(--gold-deep);
  color: #fff;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  box-shadow: 0 4px 14px rgba(20, 20, 20, 0.18);
  -webkit-tap-highlight-color: transparent;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

@media (max-width: 680px) {
  .back-to-top {
    display: flex;
  }
}

/* Very narrow phones — keep two columns, minimum comfortable size */
@media (max-width: 420px) {
  .menu-page {
    padding: 6.5rem 1.5rem 2.5rem;
  }

  .menu-grid {
    gap: 2rem;
  }

  .cat-head {
    font-size: 0.82rem;
    letter-spacing: 0.12em;
  }

  .cat-lede {
    display: none;
  }

  .d-line,
  .d-name {
    font-size: 0.76rem;
  }

  .d-desc {
    font-size: 0.7rem;
  }

  .d-price {
    font-size: 0.74rem;
  }

  .d-tag {
    font-size: 0.5rem;
    padding: 0.05rem 0.28rem;
  }
}
