/* ─────────────────────────────────────────────────────────────────────
   Umami — "Ink & Seal". Read the header comment in index.html first.

   Palette, measured off their logo PNG:
     ink    #16140F   the brush script           (on paper 17.6:1)
     paper  #FAF8F4   warm white ground
     shell  #F2EEE6   the one tinted band        (ink on it 16.1:1)
     seal   #F8D820   the gold seal — FILL ONLY  (on paper 1.4:1, never text)
     muted  #5E5A52   secondary text             (on paper 6.6:1, shell 6.0:1)
   ───────────────────────────────────────────────────────────────────── */

:root {
  --ink: #16140f;
  --paper: #faf8f4;
  --shell: #f2eee6;
  --seal: #f8d820;
  --muted: #5e5a52;
  --rule: #dcd6cb;

  --f-display: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --f-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-zh: "Noto Serif TC", "Songti TC", "PMingLiU", serif;

  --t-mega: clamp(2.6rem, 1.6rem + 4.2vw, 4.6rem);
  --t-h2: clamp(2rem, 1.5rem + 2.2vw, 3rem);
  --t-h3: clamp(1.6rem, 1.35rem + 1vw, 2rem);
  --t-body: 1.0625rem;
  --t-small: 0.9375rem;

  --wrap: 1180px;
  --gut: clamp(16px, 4vw, 40px);
  --head-h: 72px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--t-body) / 1.6 var(--f-body);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-underline-offset: 3px; }

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  border-radius: 2px;
}

[lang="zh-Hant"] { font-family: var(--f-zh); }
[lang="zh-Hans"] { font-family: "Noto Serif SC", "Songti SC", "SimSun", serif; }

/* Chinese modes (lang.js). Cormorant and Figtree have no CJK glyphs, so
   name the fallback rather than leave it to the system: headings get the
   Noto serif for the script in use. Noto Serif SC is only ever requested
   in 普通话 mode (Google Fonts serves it by unicode-range, on use). */
:root[lang="zh-Hant-HK"] { --f-display: "Cormorant Garamond", "Noto Serif TC", "Songti TC", serif; }
:root[lang="zh-Hans-CN"] { --f-display: "Cormorant Garamond", "Noto Serif SC", "Songti SC", serif; }
:root[lang^="zh"] .hero__title { letter-spacing: .02em; line-height: 1.2; max-width: none; font-size: clamp(2rem, 1.2rem + 2.6vw, 3.4rem); }
/* Chinese has no italic; a slanted system face reads as a mistake. */
:root[lang^="zh"] .fish__note { font-style: normal; }

/* Section anchors land below the sticky header, not under it. */
[id] { scroll-margin-top: calc(var(--head-h) + 12px); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 12px; top: -60px;
  z-index: 20;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
}
.skip:focus { top: 12px; }

/* ── Buttons ─────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  font: 600 1rem / 1 var(--f-body);
  text-decoration: none;
  transition: background-color .15s, color .15s;
}
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink:hover { background: #33302a; border-color: #33302a; }
.btn--line { background: transparent; color: var(--ink); }
.btn--line:hover { background: var(--ink); color: var(--paper); }

/* The seal: a small gold square after every kicker — the logo's own
   accent, used as a fill and nowhere as text. */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  font: 700 1rem / 1 var(--f-zh);
  letter-spacing: .18em;
  color: var(--ink);
}
/* The seal from the logo itself (images/seal.webp, cut from
   masters/logo.png): gold, darker rim, carved characters. Same 0.69
   proportion as on the logo, sized to sit against the kicker's cap
   height. */
.kicker::after {
  content: "";
  width: 13px; height: 19px;
  background: url("images/seal.webp") center / contain no-repeat;
}

/* ── Header ──────────────────────────────────────────────────────────── */

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgb(250 248 244 / .94);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--rule);
}
.top__in {
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: var(--wrap);
  height: var(--head-h);
  margin: 0 auto;
  padding: 0 var(--gut);
}
.top__logo img { width: 150px; }
.top__nav {
  display: flex;
  gap: 28px;
  margin-left: auto;
  font-weight: 500;
}
.top__nav a { text-decoration: none; }
.top__nav a:hover { text-decoration: underline; }
.top__order { min-height: 42px; padding: 0 20px; }

/* EN · 廣東話 · 普通话 — lang.js / script.js. The selected one is ink. */
.lang { display: flex; gap: 2px; align-items: center; }
.lang button {
  font: 600 .8125rem var(--f-body);
  padding: 6px 9px; min-height: 36px;
  border: 0; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--muted);
}
.lang button[lang="zh-Hant"] { font-family: var(--f-zh); }
.lang button[lang="zh-Hans"] { font-family: "Noto Serif SC", "Songti SC", serif; }
.lang button:hover { color: var(--ink); }
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.top__order .short { display: none; }

/* Below 720px the section links go; the Order button NEVER does — a phone
   with no way to order for 4,000px is the Kojima round-seven lesson. */
@media (max-width: 720px) {
  .top__nav { display: none; }
  .lang { margin-left: auto; }
  .top__logo img { width: 124px; }
}
/* Phones: the language row stays in the header (the only navigation up
   there), so the logo and the buttons give up a little room. */
@media (max-width: 480px) {
  .top__in { gap: 10px; }
  .top__logo img { width: 96px; }
  .lang button { padding: 6px 7px; font-size: .75rem; }
  .top__order { padding: 0 14px; }
}
@media (max-width: 480px) {
  .top__order .long { display: none; }
  .top__order .short { display: inline; }
}

/* ── Hero ────────────────────────────────────────────────────────────── */

.hero {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(32px, 6vw, 80px) var(--gut) clamp(40px, 6vw, 88px);
}
.hero__title {
  margin: 0 0 20px;
  font: 600 var(--t-mega) / 1.02 var(--f-display);
  letter-spacing: -.01em;
  max-width: 13ch;
}
.hero__lede {
  margin: 0 0 32px;
  max-width: 46ch;
  color: var(--muted);
  font-size: 1.125rem;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__photo { margin: 0; }
/* A cut-out on transparency: it floats on the paper — no crop, no frame. */
.hero__photo img { width: 100%; max-width: 700px; margin-inline: auto; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .hero__title { max-width: none; }
  .hero__photo { order: -1; }
  .hero__photo img { max-width: 520px; }
}
/* Phones: "Order for collection" sat at ~825px on an 844px screen. A
   shorter photo, a smaller lede and less air put it on the first screen. */
@media (max-width: 600px) {
  .hero { padding-top: 16px; gap: 16px; }
  .hero__photo img { max-width: 300px; }
  .hero__title { margin-bottom: 12px; }
  .hero__lede { font-size: 1rem; margin-bottom: 20px; }
}

/* ── The fish ────────────────────────────────────────────────────────── */

.fish {
  background: var(--shell);
  border-block: 1px solid var(--rule);
}
.fish__list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gut);
  list-style: none;
}
.fish__list li {
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 28px 8px;
  text-align: center;
}
.fish__list li + li { border-left: 1px solid var(--rule); }
.fish__zh { font-size: 1.75rem; font-weight: 700; line-height: 1.2; }
.fish__en { font-weight: 600; }
.fish__note { font-size: var(--t-small); color: var(--muted); font-style: italic; }

/* Phones: one row of five, not a 2-column grid with an orphan — that
   took ~390px of screen before the menu began. The note goes; the
   Chinese and the English are what a customer is scanning for. */
@media (max-width: 760px) {
  .fish__list { padding: 0 8px; }
  .fish__list li { padding: 14px 2px; gap: 0; }
  .fish__zh { font-size: 1.125rem; }
  .fish__en { font-size: .75rem; font-weight: 500; line-height: 1.25; }
  .fish__note { display: none; }
}

/* ── Section heads ───────────────────────────────────────────────────── */

.section-head { max-width: 640px; margin: 0 0 clamp(28px, 4vw, 48px); }
.section-head h2,
.room h2 {
  margin: 0 0 12px;
  font: 600 var(--t-h2) / 1.05 var(--f-display);
}
.section-head__lede { margin: 0; color: var(--muted); }

/* ── Menu ────────────────────────────────────────────────────────────── */

.menu,
.visit {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(56px, 8vw, 104px) var(--gut);
}

.course {
  padding: clamp(32px, 4vw, 48px) 0;
  border-top: 1px solid var(--rule);
}

.course__head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-bottom: 8px;
}
.course__head h3 {
  margin: 0;
  font: 600 var(--t-h3) / 1.1 var(--f-display);
}
.course__zh { font-size: 1.125rem; font-weight: 500; color: var(--muted); }

/* The photos are cut-outs on transparency, so they sit straight on the
   paper — no card, no frame, no shadow (a border would draw a box around
   nothing, the Ramen Hassaku lesson). */
.dishes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (max-width: 520px) {
  .dishes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 16px; }
}
.dish__img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  margin-bottom: 2px;
}
.dish__name { margin: 0 0 2px; font-weight: 600; font-size: 1.0625rem; line-height: 1.35; }
.dish__name [lang] {
  display: block;
  margin-top: 2px;
  font-weight: 500;
  font-size: 1rem;
}
.dish__desc { margin: 0; color: var(--muted); font-size: var(--t-small); }
@media (max-width: 520px) {
  .dish__name { font-size: 1rem; }
  .dish__desc { font-size: .875rem; }
}

.extras {
  margin-top: 28px;
  padding: 18px 20px;
  background: var(--shell);
  border-left: 3px solid var(--seal);
}
.extras__head { margin: 0 0 10px; font-weight: 600; }
.extras__head [lang] { margin-left: 6px; color: var(--muted); font-weight: 500; }
.extras__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.extras__list li { display: flex; align-items: center; gap: 10px; font-size: var(--t-small); }
.extras__list img { width: 56px; height: 56px; object-fit: contain; }
.extras__list [lang] { color: var(--muted); }

/* Menu section links — plain text with dots between, no pills. */
.jump {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 0;
  margin: 0 0 clamp(20px, 3vw, 32px);
  font-size: var(--t-small);
}
.jump a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-underline-offset: 4px;
  white-space: nowrap;
}
.jump a:hover { text-decoration-color: var(--ink); }
.jump a [lang] { color: var(--muted); margin-left: 2px; }
.jump a + a::before {
  content: "·";
  display: inline-block;
  margin: 0 12px;
  color: var(--muted);
  text-decoration: none;
}
/* Phones: the dotted row wraps with dots starting lines. Two tidy
   columns instead, English over Chinese. */
@media (max-width: 600px) {
  .jump { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
  .jump a { white-space: normal; }
  .jump a [lang] { display: block; margin: 0; }
  .jump a + a::before { content: none; }
}


/* ── The room ────────────────────────────────────────────────────────── */

.room {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(48px, 7vw, 88px) var(--gut);
  border-top: 1px solid var(--rule);
}
/* Text left, photo right on wide screens (Weslie, 29 Sept). Phones keep
   the photo first, above the words. */
@media (min-width: 761px) {
  .room__text { order: -1; }
}
.room__photo { margin: 0; }
.room__photo img { width: 100%; max-width: 480px; margin-inline: auto; }
.room__text p:not(.kicker) { max-width: 46ch; margin: 0; color: var(--muted); font-size: 1.125rem; }
@media (max-width: 760px) {
  .room { grid-template-columns: 1fr; }
  .room__photo img { max-width: 360px; }
}

/* ── Visit ───────────────────────────────────────────────────────────── */

.visit { border-top: 1px solid var(--rule); }
/* Details on the left (address, hours, order), the map on the right.
   Stacks on phones with the map last. */
.visit__layout {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: stretch;
}
.visit__info {
  min-width: 0;
  display: grid;
  gap: 28px;
  margin: 0;
}
.visit__info dt {
  margin-bottom: 6px;
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.visit__info dd { margin: 0; font-size: 1.0625rem; }
.visit__info address { font-style: normal; margin-bottom: 8px; }
.visit__map { font-size: var(--t-small); }
.visit__hours table { border-collapse: collapse; width: 100%; max-width: 320px; font-size: 1rem; }
.visit__hours th { text-align: left; font-weight: 500; padding: 3px 16px 3px 0; }
.visit__hours td { text-align: right; padding: 3px 0; color: var(--muted); }
/* Today's row: bold ink and a seal-gold bar — the gold as a fill, never
   as text (it is ~1.4:1 on paper). */
.visit__hours tr.is-today th,
.visit__hours tr.is-today td { color: var(--ink); font-weight: 600; }
/* Today is marked with the logo's seal (images/seal.webp, as on the
   kickers), just after the day name. It was in the left margin, but a
   phone's 16px gutter clipped it. */
.visit__hours tr.is-today th::after {
  content: "";
  display: inline-block;
  width: 11px; height: 16px;
  margin-left: 8px;
  vertical-align: -2px;
  background: url("images/seal.webp") center / contain no-repeat;
}
.visit__order .btn { margin-top: 4px; }
.visit__note { margin: 10px 0 0; font-size: var(--t-small); color: var(--muted); max-width: 32ch; }
.visit__now { margin: 0 0 8px; font-size: var(--t-small); color: var(--muted); }
.visit__now:empty { display: none; }
.visit__now.is-open { color: var(--ink); font-weight: 600; }
@media (max-width: 860px) {
  .visit__layout { grid-template-columns: 1fr; }
  .mapbox { min-height: 0; aspect-ratio: 500 / 380; }
}

/* ── Map (scripts/umami-map.py) ── the site's own ink and paper; the pin
   is ink with the logo's gold seal as its head. */
.mapbox {
  position: relative;
  min-width: 0;
  width: 100%;
  margin: 0;
  min-height: 420px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  overflow: hidden;
  background: var(--paper);
}
.map { display: block; width: 100%; height: 100%; }
.map .m-ground { fill: var(--paper); }
.map .m-grn { fill: #e9ebdf; }
.map .m-park { fill: #efebe3; }
.map .m-water { fill: none; stroke: #c9d6de; stroke-width: 4; }
.map .m-bld { fill: #e8e3d9; stroke: #ddd7cb; stroke-width: .6; }
.map .m-umami { fill: var(--ink); }
.map .m-foot { fill: none; stroke: #d7d1c5; stroke-width: 1.5; stroke-dasharray: 3 3; }
.map .m-case { fill: none; stroke: #d6cfc2; stroke-linecap: round; stroke-linejoin: round; }
.map .m-road { fill: none; stroke: #fff; stroke-linecap: round; stroke-linejoin: round; }
.map .m-st {
  font: 600 11px var(--f-body);
  letter-spacing: .06em;
  text-transform: uppercase;
  fill: var(--muted);
  paint-order: stroke;
  stroke: var(--paper);
  stroke-width: 4px;
  text-anchor: middle;
  dominant-baseline: middle;
}
.map .m-p rect { fill: var(--paper); stroke: var(--muted); stroke-width: 1.2; }
.map .m-p text { font: 700 12px var(--f-body); fill: var(--muted); }
.map .m-north path { fill: var(--ink); }
.map .m-north text { font: 600 11px var(--f-body); fill: var(--ink); }
.map .m-pinbody { fill: var(--ink); }
.map .m-pinseal { fill: var(--seal); }
.map .m-tag { fill: var(--ink); }
.map .m-tagtxt { font: 600 15px var(--f-body); fill: var(--paper); }
.map .m-tagzh { font-family: var(--f-zh); font-weight: 700; }
.map__credit {
  position: absolute;
  right: 0; bottom: 0;
  padding: 3px 8px;
  font-size: .6875rem;
  color: var(--muted);
  background: rgb(250 248 244 / .9);
  border-top-left-radius: 4px;
}
.map__credit a { color: inherit; }
@media (max-width: 600px) {
  /* A squarer frame on phones: the map only has to answer "which door". */
  .mapbox { aspect-ratio: 1 / 1; }
  .map .m-minor { display: none; }
}

/* ── Footer ──────────────────────────────────────────────────────────── */

.foot {
  padding: clamp(48px, 7vw, 80px) var(--gut) 28px;
  background: var(--shell);
  border-top: 1px solid var(--rule);
}
.foot__in {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: 32px;
  max-width: var(--wrap);
  margin: 0 auto;
}
.foot__logo { width: 170px; margin-bottom: 14px; }
.foot p { margin: 0; color: var(--muted); line-height: 1.7; }
.foot__h {
  margin: 0 0 10px;
  font: 600 .8125rem var(--f-body);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink);
}
.foot__btn { min-height: 44px; padding: 0 20px; }
.foot__small {
  max-width: var(--wrap);
  margin: 40px auto 0 !important;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  font-size: .875rem;
}
.foot__small a { color: inherit; }
@media (max-width: 860px) {
  .foot__in { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot__brand { grid-column: 1 / -1; }
}
@media (max-width: 420px) {
  .foot__in { grid-template-columns: 1fr; }
}
