/* ═══════════════════════════════════════════════════════════════════════════
   灶前 ZO CHIN — restaurant demo
   ---------------------------------------------------------------------------
   Art direction: a service pass. The page is built like the ticket rail in a
   kitchen — a split hero with the room's live state on the right, then ruled
   ledgers rather than cards, because a menu and a table list are both lists
   that change daily and have to be editable in thirty seconds.

   Deliberately unlike the other demos in the set: it is the only one with a
   sticky action bar, the only one whose hero is a two-column split, and the
   only one that uses a warm oxblood ground. A restaurant page that looked like
   the coffee page would tell a prospect we have one layout.

   This demo keeps its CSS in a FILE rather than inline, because it is a
   multi-page demo — index, menu and booking share it. The single-page demos
   keep their styles inline, which is right for one file and wrong for three.
   ══════════════════════════════════════════════════════════════════════════ */

:root {
  --accent: #7a2f2a;
  --ground: #14100a;
  --ground-2: #1b150d;
  --oxblood: #7a2f2a;
  --oxblood-deep: #4a1d1a;
  --ink: #f5ecd7;
  --ink-dim: #a8977c;
  --rule: rgba(201, 183, 154, 0.16);
  --rule-strong: rgba(201, 183, 154, 0.32);
}

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

body {
  background: var(--ground);
  color: var(--ink);
  font-family: 'Inter', 'PingFang TC', 'Microsoft JhengHei', system-ui, sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.wrap { inline-size: min(100% - 2.5rem, 68rem); margin-inline: auto; }

a { color: inherit; }

/* ── Bar ──────────────────────────────────────────────────────────────────
   Sticky, because on this site the action ("訂枱") has to be reachable from
   anywhere — a person deciding where to eat decides mid-scroll. */
.bar {
  position: sticky;
  inset-block-start: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: .75rem clamp(1.25rem, 4vw, 2.5rem);
  background: color-mix(in oklab, var(--ground) 92%, transparent);
  backdrop-filter: blur(12px);
  border-block-end: 1px solid var(--rule);
}

.brand { text-decoration: none; display: flex; align-items: baseline; gap: .55rem; }
.brand .zh { font-family: 'Noto Serif TC', serif; font-size: 1.3rem; letter-spacing: .12em; }
.brand .en {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: .6rem; letter-spacing: .22em; color: var(--ink-dim);
}

.bar nav { display: none; gap: 1.4rem; margin-inline-start: auto; font-size: .88rem; }
.bar nav a { text-decoration: none; color: var(--ink-dim); }
.bar nav a:hover { color: var(--ds-signal); }

.book {
  margin-inline-start: auto;
  display: inline-flex; align-items: center;
  min-block-size: 44px; padding-inline: 1rem;
  background: var(--ds-signal); color: var(--ds-matrix);
  font-weight: 600; font-size: .85rem; border-radius: 2px; text-decoration: none;
}
.book:hover { background: var(--ds-signal-600); }

@media (min-width: 52rem) {
  .bar nav { display: flex; }
  .book { margin-inline-start: 0; }
}

/* ── Hero ─────────────────────────────────────────────────────────────────
   The right column is not decoration: tonight's table state is the single most
   useful thing on a restaurant's home page, and it goes above the fold. */
.hero {
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  grid-template-columns: 1fr;
  inline-size: min(100% - 2.5rem, 68rem);
  margin-inline: auto;
  padding-block: clamp(2.5rem, 8vw, 5rem);
}

@media (min-width: 56rem) {
  .hero { grid-template-columns: 1.15fr .85fr; align-items: start; }
}

.eyebrow {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: .68rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--ds-signal);
}

.hero h1 {
  font-family: 'Noto Serif TC', serif;
  font-weight: 500;
  font-size: clamp(2.1rem, 8vw, 3.8rem);
  line-height: 1.18;
  margin-block-start: 1rem;
}

.lead { color: var(--ink-dim); margin-block-start: 1.2rem; max-inline-size: 32ch; }

.hero__cta { display: flex; flex-wrap: wrap; gap: .75rem; margin-block-start: 2rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-block-size: 44px; padding-inline: 1.2rem;
  border: 1px solid var(--rule-strong); border-radius: 2px;
  font-size: .9rem; font-weight: 500; text-decoration: none;
  transition: border-color .2s, color .2s, background-color .2s;
}
.btn:hover { border-color: var(--ds-signal); color: var(--ds-signal); }
.btn--primary {
  background: var(--ds-signal); border-color: var(--ds-signal);
  color: var(--ds-matrix); font-weight: 600;
}
.btn--primary:hover { background: var(--ds-signal-600); border-color: var(--ds-signal-600); color: var(--ds-matrix); }

/* Tonight panel — oxblood, the only saturated surface on the site. */
.tonight {
  border: 1px solid var(--rule);
  background: linear-gradient(165deg, var(--oxblood-deep), var(--ground-2) 70%);
  padding: 1.25rem;
}

.tonight h2 {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: .68rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--ds-signal); margin-block-end: .9rem;
}

.slots { list-style: none; }
.slots li {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  padding-block: .55rem; border-block-end: 1px solid var(--rule);
}
.slots .t {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-variant-numeric: tabular-nums; font-size: .95rem;
}
.slots .s { font-size: .8rem; }
.slots .ok { color: var(--ink-dim); }
.slots .last { color: var(--ds-signal); }
/* Not colour alone: a struck-through time also reads as unavailable to anyone
   who cannot separate the two greys. */
.slots .full { color: #8a6a66; }
.slots li:has(.full) .t { text-decoration: line-through; opacity: .6; }

.tonight__note { margin-block-start: .9rem; font-size: .78rem; color: var(--ink-dim); }

/* ── Sections ─────────────────────────────────────────────────────────────── */
section { padding-block: clamp(2.5rem, 7vw, 4.5rem); }

.sec {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: .7rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--ds-signal);
  display: flex; align-items: center; gap: .8rem; margin-block-end: 1.5rem;
}
.sec::after { content: ''; flex: 1; block-size: 1px; background: var(--rule); }

/* Ledger — the market list and the menu share this shape. */
.ledger { list-style: none; border-block-start: 1px solid var(--rule); }
.ledger li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  gap: .3rem 1rem;
  padding-block: .85rem;
  border-block-end: 1px solid var(--rule);
}
.ledger .n {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: .62rem; letter-spacing: .1em; color: var(--ds-signal);
}
.ledger .d { font-family: 'Noto Serif TC', serif; font-size: 1.1rem; }
.ledger .w { grid-column: 2; font-size: .8rem; color: var(--ink-dim); }
.ledger .p {
  grid-row: 1 / span 2; grid-column: 3;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-variant-numeric: tabular-nums; align-self: center;
}

.more { display: inline-block; margin-block-start: 1.2rem; color: var(--ds-signal); text-decoration: none; font-size: .9rem; }
.more:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ── Shops ────────────────────────────────────────────────────────────────── */
.shopgrid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }
.shop { border: 1px solid var(--rule); padding: 1.25rem; background: var(--ground-2); }
.shop h3 { font-family: 'Noto Serif TC', serif; font-weight: 500; font-size: 1.2rem; }
.shop .addr { color: var(--ink-dim); font-size: .85rem; margin-block: .4rem 1rem; }
.shop dl { display: grid; gap: .35rem; }
.shop dl div { display: flex; justify-content: space-between; gap: 1rem; border-block-end: 1px solid var(--rule); padding-block: .3rem; }
.shop dt { font-size: .78rem; color: var(--ink-dim); }
.shop dd { font-size: .85rem; font-variant-numeric: tabular-nums; }

/* ── Close ────────────────────────────────────────────────────────────────── */
.close { background: var(--ground-2); border-block: 1px solid var(--rule); }
.closeline {
  font-family: 'Noto Serif TC', serif;
  font-size: clamp(1.2rem, 4vw, 1.9rem);
  line-height: 1.4; max-inline-size: 26ch; margin-block-end: 1.5rem;
}

.foot { padding-block: 2rem 3rem; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; font-size: .78rem; color: var(--ink-dim); }
.foot a { color: var(--ds-signal); }

/* ── Booking page ─────────────────────────────────────────────────────────── */
.bookgrid { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 56rem) { .bookgrid { grid-template-columns: 1.1fr .9fr; align-items: start; } }

.daytabs { display: flex; flex-wrap: wrap; gap: .4rem; margin-block-end: 1.25rem; }
.daytab {
  border: 1px solid var(--rule-strong); background: none; color: var(--ink);
  min-block-size: 44px; padding-inline: .85rem; border-radius: 2px;
  font: inherit; font-size: .85rem; cursor: pointer;
}
.daytab[aria-pressed='true'] { background: var(--ds-signal); border-color: var(--ds-signal); color: var(--ds-matrix); font-weight: 600; }

/* The slot grid is the point of the page: every time is visible at once, with
   its state, so nobody has to ask "do you have 7 o'clock". */
.slotgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr)); gap: .5rem; }
.slot {
  border: 1px solid var(--rule-strong); background: var(--ground-2); color: var(--ink);
  min-block-size: 58px; border-radius: 2px; font: inherit; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .1rem;
}
.slot .tm { font-family: 'JetBrains Mono', ui-monospace, monospace; font-variant-numeric: tabular-nums; }
.slot .st { font-size: .65rem; color: var(--ink-dim); }
.slot:hover:not([disabled]) { border-color: var(--ds-signal); }
.slot[aria-pressed='true'] { background: var(--ds-signal); border-color: var(--ds-signal); color: var(--ds-matrix); }
.slot[aria-pressed='true'] .st { color: var(--oxblood-deep); }
.slot[disabled] { opacity: .38; cursor: not-allowed; text-decoration: line-through; }

.form { border: 1px solid var(--rule); padding: 1.25rem; background: var(--ground-2); }
.form h2 { font-family: 'Noto Serif TC', serif; font-weight: 500; font-size: 1.25rem; margin-block-end: 1rem; }
.field { display: flex; flex-direction: column; gap: .3rem; margin-block-end: 1rem; }
.field label { font-size: .78rem; color: var(--ink-dim); }
.field input, .field select, .field textarea {
  font: inherit; font-size: 16px;   /* iOS zooms anything smaller on focus */
  background: transparent; color: var(--ink);
  border: 0; border-block-end: 1px solid var(--rule-strong);
  padding-block: .5rem; min-block-size: 44px; border-radius: 0;
}
.field textarea { min-block-size: 5rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-block-end-color: var(--ds-signal); }
.field select option { background: var(--ground-2); }

.summary {
  border: 1px solid rgba(252,186,2,.35); padding: .85rem 1rem; margin-block-end: 1rem;
  font-size: .85rem;
}
.summary strong { color: var(--ds-signal); font-family: 'JetBrains Mono', ui-monospace, monospace; }

.demo-note {
  margin-block-start: 1rem; font-size: .78rem; color: var(--ink-dim);
  border-inline-start: 2px solid var(--rule-strong); padding-inline-start: .75rem;
}

/* ── Menu page ────────────────────────────────────────────────────────────── */
.menuhead { padding-block: clamp(2rem, 6vw, 3.5rem) 1rem; }
.menuhead h1 { font-family: 'Noto Serif TC', serif; font-weight: 500; font-size: clamp(1.8rem, 6vw, 3rem); }
.menuhead p { color: var(--ink-dim); margin-block-start: .6rem; max-inline-size: 40ch; }

.course { margin-block-end: 2.5rem; }
