/* ============================================================
   ÉKO '77 — MENU page
   Loaded after style.css. Only what the design system lacks:
   a masthead, a sticky section rail, and the long list itself.
   ============================================================ */

:root {
  /* JS measures the two bars and overwrites these; the fallbacks
     are the real heights so anchors land correctly before it runs */
  --head-h: 62px;
  --nav-h:  50px;
}

/* the header is fixed and always solid here — there is no hero to sit on */
.menu-page { padding-top: var(--head-h); }

/* ============================================================
   MASTHEAD — the one block between the header and the food
   ============================================================ */

.mast {
  padding-block: clamp(34px, 5vw, 62px) clamp(26px, 3.4vw, 40px);
  border-bottom: 1px solid var(--rule-soft);
}
.mast__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(20px, 4vw, 64px);
  align-items: end;
}
.mast__title .whisper { margin-bottom: 10px; }
.mast h1.display { font-size: clamp(30px, 4.6vw, 54px); }

.mast__lede {
  font-family: var(--serif);
  font-size: clamp(17px, 1.5vw, 19px);
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0;
  max-width: 46ch;
}
.mast__lede a {
  border-bottom: 1px solid var(--rule);
  transition: border-color .25s ease;
}
.mast__lede a:hover { border-bottom-color: var(--ink); }

.mast__notes {
  list-style: none;
  margin: 18px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--rule-soft);
  display: grid;
  gap: 8px;
}
.mast__notes li {
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.55;
  letter-spacing: .015em;
  color: var(--ink-3);
}
.mast__link {
  color: var(--green-deep);
  font-weight: 600;
  border-bottom: 1px solid rgba(4, 82, 54, .35);
  transition: border-color .25s ease;
}
.mast__link:hover { border-bottom-color: var(--green-deep); }

/* ============================================================
   STICKY SECTION RAIL
   ============================================================ */

.secnav {
  position: sticky;
  top: var(--head-h);
  z-index: 40;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  box-shadow: 0 8px 18px -18px rgba(28, 25, 23, .6);
}

.secnav__rail {
  display: flex;
  align-items: stretch;
  gap: clamp(14px, 2vw, 28px);
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gut);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}
.secnav__rail::-webkit-scrollbar { display: none; }

.secnav__rail a {
  position: relative;
  flex: none;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  padding-block: 16px;
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--ink-3);
  transition: color .25s ease;
}
.secnav__rail a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: var(--green);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .34s cubic-bezier(.2,.7,.3,1);
}
.secnav__rail a:hover { color: var(--ink); }
.secnav__rail a.is-on { color: var(--ink); }
.secnav__rail a.is-on::after { transform: scaleX(1); }

/* ============================================================
   THE LIST
   ============================================================ */

.menu-body { padding-block: clamp(40px, 5.5vw, 72px) clamp(48px, 6vw, 84px); }

/* two classes, so this beats the design system's `section[id]` default (84px)
   — otherwise a clicked section lands underneath the two sticky bars */
.menu-body .msec { scroll-margin-top: calc(var(--head-h) + var(--nav-h) + 12px); }
.msec + .msec { margin-top: clamp(44px, 5.5vw, 76px); }

.msec__head {
  display: flex;
  align-items: baseline;
  gap: clamp(14px, 2vw, 24px);
  margin-bottom: clamp(16px, 2vw, 24px);
}
.msec__name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(21px, 2.5vw, 30px);
  line-height: 1.1;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin: 0;
  flex: none;
}
.msec__rule { flex: 1; height: 1px; background: var(--rule); }

/* two typographic columns on wide screens, one on a phone */
.menu-list { column-gap: clamp(34px, 5vw, 84px); }
@media (min-width: 860px) {
  .menu-list { columns: 2; }
  .menu-list .dish, .menu-list .twin-head { break-inside: avoid; }
}

/* .dish comes from the design system; these are the extras this page needs */
.dish__price { white-space: nowrap; }
.menu-list .dish:last-child { border-bottom: 1px dotted var(--rule); }

/* a dish that is also served another way, at another price */
.dish__alt {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 5px;
  padding-left: 14px;
  border-left: 1px solid var(--rule-soft);
}
.dish__alt-name {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--ink-3);
}
.dish__alt-price {
  font-family: var(--serif);
  font-size: 14px;
  color: var(--ink-3);
  white-space: nowrap;
}
.dish__alt .dish__leader { transform: translateY(-3px); }

/* --- juice: two prices a row, glass and litre --- */
.menu-list--twin { max-width: 540px; }
@media (min-width: 860px) { .menu-list--twin { columns: 1; } }

.twin-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding-bottom: 6px;
}
/* the header row only needs the spacer, not a leader running to nothing */
.twin-head .dish__leader { border-bottom-color: transparent; }
.twin-head__cell {
  width: 62px;
  text-align: right;
  font-family: var(--sans);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.dish--twin .dish__price {
  width: 62px;
  text-align: right;
}
/* the per-price label is for narrow screens, where the head row is dropped */
.dish--twin .dish__price i { display: none; }

@media (max-width: 560px) {
  .twin-head { display: none; }
  .dish--twin .dish__price {
    width: auto;
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
  }
  .dish--twin .dish__price + .dish__price { margin-left: 16px; }
  .dish--twin .dish__price i {
    display: inline;
    font-family: var(--sans);
    font-style: normal;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--ink-3);
  }
}

/* ============================================================
   PLATES BETWEEN COURSES
   ============================================================ */

.menu-plate { margin: 0; }
.menu-plate--wide { margin-top: clamp(26px, 3.4vw, 40px); }
.menu-plate--wide .plate img { aspect-ratio: 16 / 8; }

.menu-plates {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 2.4vw, 28px);
  margin-top: clamp(26px, 3.4vw, 40px);
}
.menu-plates .plate img { aspect-ratio: 4 / 3.4; }

/* ============================================================
   BAR DIVIDER
   ============================================================ */

.bar-mark {
  text-align: center;
  margin-top: clamp(52px, 7vw, 92px);
}
.bar-mark .label { margin-top: 14px; color: var(--ink-3); }
.bar-mark + .msec { margin-top: clamp(26px, 3vw, 40px); }

/* ============================================================
   CLOSING
   ============================================================ */

.menu-close__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: clamp(20px, 3vw, 40px);
}
.menu-close .display { margin-top: 12px; }
.menu-close__note {
  font-family: var(--serif);
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--ink-2);
  margin: 12px 0 0;
  max-width: 44ch;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1080px) {
  .mast__inner { grid-template-columns: 1fr; align-items: start; gap: 22px; }
  .mast__lede { max-width: none; }
}

@media (max-width: 900px) {
  /* thumbs need real targets — the rail chips become 44px boxes */
  .secnav__rail { gap: 0; }
  .secnav__rail a {
    padding: 15px clamp(12px, 3.2vw, 18px);
    min-height: 46px;
    font-size: 11px;
  }
  .secnav__rail a:first-child { margin-left: calc(clamp(12px, 3.2vw, 18px) * -1); }
  .secnav__rail a::after { left: clamp(12px, 3.2vw, 18px); right: clamp(12px, 3.2vw, 18px); }
  .secnav__rail a:first-child::after { left: 0; }

  /* every link a thumb aims at gets a 44px box */
  .mast__link { display: inline-flex; align-items: center; min-height: 44px; }
  .site-head .wordmark { display: inline-flex; align-items: center; min-height: 44px; padding-block: 0; }
  .site-head .book-pill { display: inline-flex; align-items: center; min-height: 44px; }
  .foot__col li a, .foot__col .addr-block a { min-height: 44px; align-items: center; display: inline-flex; }
  .foot__bottom nav a { min-height: 44px; align-items: center; display: inline-flex; }

  .menu-close__inner { display: block; }
  .menu-close .btn-row { margin-top: 24px; }
  .menu-close .btn { flex: 1 1 240px; text-align: center; }
}

@media (max-width: 700px) {
  .menu-plates { grid-template-columns: 1fr; max-width: 520px; }
  .menu-plates .plate img { aspect-ratio: 4 / 3.2; }
  .menu-plate--wide .plate img { aspect-ratio: 4 / 3.2; }
}

@media (max-width: 560px) {
  .mast { padding-top: 30px; }
  .msec__name { letter-spacing: .1em; }
  .dish__name { font-size: 18px; }
  .dish__desc { font-size: 14px; }
}

/* the fade tells a thumb the rail keeps going */
@media (max-width: 860px) {
  .secnav {
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 34px), transparent 100%);
          mask-image: linear-gradient(90deg, #000 calc(100% - 34px), transparent 100%);
  }
}

@media (max-width: 1080px) {
  .mast__link { display: inline-flex; align-items: center; min-height: 44px; }
}
