/* ============================================================
   Guest menu: canonical structure, catalog lane (sentence case)
   Design system: DESIGN.md v0.7, tokens vendored in tokens.css
   (adapted per README.md for fixed per-section themes).
   Nothing here invents color, type, spacing, or motion outside it.
   ============================================================ */

@font-face {
  font-family: "Lato";
  src: url("fonts/lato-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Lato";
  src: url("fonts/lato-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* The one clock: state transitions touch paint-cheap properties only. */
*, *::before, *::after {
  transition: background-color var(--t), color var(--t), border-color var(--t);
}

/* ---- Shared column ------------------------------------------ */
.tab-nav,
#content {
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: var(--space-md);
}

/* Tabs centered; a full section-gap separates nav from the menu body. */
.tab-nav {
  display: flex;
  justify-content: center;
  gap: var(--space-lg);
  padding-top: var(--space-lg);
  margin-bottom: var(--space-xl);
}
.tab-link {
  position: relative;
  padding: 0.5em 0;
  font-size: var(--text-title);
  color: var(--muted);
  text-decoration: none;
}
.tab-link::after {
  content: "";
  position: absolute;
  bottom: 4px;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--fg);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-underline);
}
.tab-link:hover { color: var(--fg); }
.tab-link:hover::after,
.tab-link.active::after { transform: scaleX(1); }
.tab-link.active { color: var(--fg); }

/* No-JS: the tabs dead-end, so hide the nav. */
html:not(.js) .tab-nav { display: none; }

/* Status notice: the only aria-live region. Empty = zero height, so the
   region stays in the accessibility tree without reserving space. */
.status {
  margin: 0 auto;
  max-width: var(--measure);
  padding: var(--space-sm) var(--space-md) 0;
  color: var(--muted);
  font-size: var(--text-small);
  font-style: italic;
}
.status:empty { padding: 0; }

main:focus { outline: none; }

/* Skip link: hidden until focused. */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 20;
  padding: 0.5em 1em;
  background: var(--bg);
  color: var(--accent);
  border-right: var(--border-w) solid var(--border);
  border-bottom: var(--border-w) solid var(--border);
}
.skip:focus { left: 0; }

/* ---- Tab panels: one room visible at a time. Coffee centers only
   its section separators (host call); cocktails stay left-aligned
   wine-list rows. ----------------------------------------------- */
.tab-panel { display: none; padding-bottom: var(--space-xl); }
.tab-panel.active { display: block; }
#tab-coffee .sub-label { text-align: center; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.sub-label {
  margin: var(--space-lg) 0 var(--space-sm);
  font-size: var(--text-label);
  font-weight: 400;
  color: var(--muted);
}
.sub-label:first-of-type { margin-top: var(--space-md); }

/* Entry rows: hairline-separated; air between groups, hairlines in lists. */
.menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: var(--border-w) solid var(--border);
}
.row {
  padding: 0.65em 0;
  border-bottom: var(--border-w) solid var(--border);
}

/* Cocktails: wine-list rows — name + variants left, spirit right. */
#tab-cocktails .row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-md);
}
.drink-main { min-width: 0; } /* let long variant lines wrap cleanly */
.drink-spirit {
  flex-shrink: 0;
  color: var(--muted);
  font-size: var(--text-meta);
  text-align: right;
}
.row-name {
  display: block;
  font-size: var(--text-title);
  font-weight: 700;
}
.row-desc {
  display: block;
  margin-top: 0.15em;
  color: var(--muted);
  font-size: var(--text-small);
  line-height: var(--leading-small);
}
.row-meta {
  display: block;
  margin-top: 0.15em;
  color: var(--muted);
  font-size: var(--text-meta);
  line-height: var(--leading-small);
}

.syrup-line {
  margin: var(--space-md) 0 0;
  color: var(--muted);
  font-size: var(--text-meta);
}

/* Milk drinks: a 3-up grid, name directly above its cup diagram.
   The grid block itself is centered on the page (host call). */
.milk-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  margin: var(--space-sm) auto 0;
  max-width: 360px;
}
.milk-cell {
  display: flex;
  flex-direction: column;
}
.milk-name {
  display: block;
  font-size: var(--text-title);
  font-weight: 700;
}
.milk-meta {
  display: block;
  color: var(--muted);
  font-size: var(--text-meta);
}
.milk-cell svg {
  display: block;
  width: 100%;
  height: auto;
  margin-top: auto; /* cup bottoms align across cells regardless of meta lines */
  padding-top: var(--space-xs);
}

.tea-line {
  margin: 0;
  font-size: var(--text-title);
  font-weight: 700;
}

/* ---- Empty / error states: muted ink, italic ------------------ */
.notice {
  margin: var(--space-lg) 0 0;
  color: var(--muted);
  font-size: var(--text-small);
  font-style: italic;
}

noscript p {
  max-width: var(--measure);
  margin: 0 auto;
  padding: var(--space-md);
  color: var(--muted);
  font-size: var(--text-meta);
  font-style: italic;
}

/* ---- Debug panel (?debug only; mono is earned: ids and debug) -- */
.debug {
  margin: 0 0 var(--space-lg);
  text-align: left;
  padding: var(--space-sm) var(--space-md);
  border: var(--border-w) solid var(--border);
  border-radius: var(--radius-panel);
  font-family: var(--font-mono);
  font-size: var(--text-meta);
  color: var(--muted);
}
.debug p { margin: 0.25em 0; }
.debug-title { font-weight: 700; }

/* ---- Entrance: rise 14px and land exactly on rest; one panel
        visible at a time, so 450ms is the whole budget ----------- */
.tab-panel.active { animation: rise var(--t-entrance) cubic-bezier(0.25, 1, 0.5, 1) both; }
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
