/* Design tokens */
:root {
  --paper: #F5EEE2;
  --paper-2: #ECE3D4;
  --ink: #3A352F;
  --muted: #6E6558;
  --line: #CDBFAA;
  --bronze: #7F6238;
  --font-mark: "Cormorant Garamond", serif;
  --font-mono: "Courier Prime", "Noto Serif TC", monospace;
  --font-body: "Noto Serif TC", "Courier Prime", serif;
  --wrap: 1080px;
  --gutter: clamp(16px, 4vw, 40px);
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.9;
}
h1, h2, h3, p, ul, ol, dl, dd, dt, figure, blockquote { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
a:hover { color: var(--bronze); }
:focus-visible { outline: 2px solid var(--bronze); outline-offset: 3px; }

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 20;
  padding: 8px 16px;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
  text-decoration: none;
}
.skip:focus { top: 16px; }

/* Poster type: every var(--font-mark) element is set in capitals with tracked spacing */
.wordmark, .poster h1, .tagline, .year, .sub, .foot-mark {
  font-family: var(--font-mark);
  font-weight: 500;
  letter-spacing: .32em;
  padding-left: .32em;
}

/* Header */
.top .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 24px;
}
.wordmark {
  font-size: 20px;
  color: var(--ink);
  text-decoration: none;
}
.nav { display: flex; gap: 28px; }
.nav a { font-family: var(--font-body); font-size: 15px; }
@media (max-width: 639px) {
  .nav { display: none; }
}

/* Hero poster */
.hero { padding-top: clamp(24px, 4vw, 48px); }
.poster {
  max-width: 880px;
  margin: 0 auto clamp(48px, 8vw, 96px);
  background: var(--paper-2);
  border: 1px solid var(--line);
  padding: clamp(12px, 2vw, 20px);
}
.poster-img { overflow: hidden; }
.poster-img img {
  width: 100%;
  aspect-ratio: 2 / 1;
  object-fit: cover;
  height: auto;
}
.poster-text {
  text-align: center;
  padding: clamp(28px, 4.5vw, 56px) clamp(16px, 4vw, 48px) clamp(28px, 5vw, 48px);
}
.poster h1 {
  font-size: clamp(40px, 7vw, 72px);
  line-height: 1.1;
  color: var(--ink);
  overflow-wrap: break-word;
  min-width: 0;
}
.poster .sub { margin-top: 18px; }
.lead {
  font-size: clamp(19px, 2.2vw, 24px);
  line-height: 1.8;
  font-weight: 600;
  margin: 40px 0 8px;
}
.blurb {
  color: var(--muted);
  max-width: 26em;
  margin-inline: auto;
}
.poster hr {
  width: 100%;
  border: 0;
  border-top: 1px solid var(--line);
  margin: 48px 0 20px;
}
.tagline {
  font-size: 13px;
  color: var(--muted);
}
.year {
  font-size: 15px;
  color: var(--ink);
  margin-top: 6px;
}
.caption {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  margin-top: 12px;
}
/* shortcut: the poster's bottom margin is kept for spacing below the card; this pulls the caption back up so it sits under the card */
.poster + .caption {
  margin-top: calc(12px - clamp(48px, 8vw, 96px));
  margin-bottom: clamp(48px, 8vw, 96px);
}

/* Buttons and actions */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.poster .actions {
  justify-content: center;
  margin-top: 32px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 16px;
  text-decoration: none;
}
.btn svg {
  width: 18px;
  height: 18px;
  flex: none;
}
.btn-solid {
  background: var(--ink);
  color: var(--paper);
}
.btn:hover {
  background: var(--ink);
  color: var(--paper);
}
.btn-solid:hover {
  background: var(--bronze);
  border-color: var(--bronze);
  color: var(--paper);
}
@media (prefers-reduced-motion: no-preference) {
  .btn { transition: background-color .2s, color .2s, border-color .2s; }
}

/* Section frame and header */
.band {
  border-top: 1px solid var(--line);
  padding-block: clamp(72px, 12vw, 160px);
}
.head {
  text-align: center;
  margin-bottom: clamp(40px, 6vw, 72px);
}
.num {
  font-family: var(--font-mono);
  color: var(--bronze);
}
.head h2 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: clamp(26px, 3.6vw, 40px);
  letter-spacing: 0;
  margin: 8px 0 14px;
}
.sub {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  margin: 0;
  font-size: 15px;
  color: var(--muted);
}
.sub::before,
.sub::after {
  content: "";
  width: 40px;
  height: 1px;
  background: var(--line);
}
.intro {
  max-width: 34em;
  margin-inline: auto;
  color: var(--muted);
}
.head + .intro { text-align: center; }

/* About */
.prose {
  max-width: 34em;
  margin-inline: auto;
}
.prose p + p { margin-top: 1.2em; }
.facts {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 24px;
  row-gap: 24px;
}
.facts > div {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  text-align: center;
}
.facts dt {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--muted);
}
.facts dd { font-weight: 600; }
.pair {
  margin-top: 72px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
figcaption {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
  margin-top: 8px;
}
@media (max-width: 639px) {
  .facts { grid-template-columns: minmax(0, 1fr); }
  .pair { grid-template-columns: minmax(0, 1fr); }
}

/* Menu */
.legend {
  font-family: var(--font-mono);
  font-size: 14px;
  margin-top: 12px;
  text-align: center;
}
.c {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--bronze);
}
.anchors {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-block: 32px;
  font-family: var(--font-mono);
  font-size: 15px;
}
.cat h3 {
  font-size: 22px;
  font-weight: 600;
  margin-top: 72px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--line);
}
.cat h3 span {
  font-family: var(--font-mono);
  font-weight: 400;
  color: var(--muted);
}
.items {
  list-style: none;
  padding: 0;
}
.item {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  column-gap: 24px;
  padding-block: 18px;
  border-bottom: 1px solid var(--line);
}
.item .mark { grid-column: 1; grid-row: 1; }
.item .name { grid-column: 2; grid-row: 1; }
.item .price { grid-column: 3; grid-row: 1; }
.item .desc { grid-column: 2 / -1; grid-row: 2; }
@media (min-width: 760px) {
  /* fixed price column: each row is its own grid, so auto would shift the description per row */
  .item { grid-template-columns: 24px minmax(0, 5fr) minmax(0, 7fr) 150px; }
  .item .mark,
  .item .name,
  .item .price,
  .item .desc { grid-column: auto; grid-row: auto; }
}
.name .zh {
  display: block;
  font-size: 18px;
  font-weight: 600;
}
.name .en {
  display: block;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--muted);
}
.desc p { margin: 0; }
.desc .desc-zh { font-size: 16px; }
.desc .desc-en {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--muted);
}
.desc .addon {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--bronze);
}
.price {
  font-family: var(--font-mono);
  font-size: 17px;
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.price span { display: block; }
.dish {
  max-width: 520px;
  margin: 48px auto 0;
}
.dish img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  height: auto;
}
.menu-note {
  max-width: 34em;
  margin: 48px auto 0;
}
.small {
  font-size: 15px;
  color: var(--muted);
  margin-top: 16px;
}

/* Photos */
.gallery {
  columns: 3;
  column-gap: 16px;
  margin-top: 40px;
}
.gallery figure {
  break-inside: avoid;
  margin: 0 0 28px;
}
.gallery img { width: 100%; }
@media (max-width: 899px) {
  .gallery { columns: 2; }
}
@media (max-width: 519px) {
  .gallery { columns: 1; }
}

/* Reviews */
.quotes {
  list-style: none;
  padding: 0;
  margin-top: 40px;
  counter-reset: q;
}
.quotes li {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  border-top: 1px solid var(--line);
  padding-block: 28px;
}
.quotes li::before {
  counter-increment: q;
  content: counter(q, decimal-leading-zero);
  font-family: var(--font-mono);
  color: var(--bronze);
}
.quotes blockquote {
  font-size: 18px;
  line-height: 1.9;
  max-width: 36em;
}
.quotes footer {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--muted);
  margin-top: 10px;
}
.more { margin-top: 32px; }

/* Visit */
.info-grid {
  display: grid;
  gap: 16px;
}
@media (min-width: 900px) {
  .info-grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    align-items: start;
  }
}
.info > div {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  border-top: 1px solid var(--line);
  padding-block: 18px;
}
.info dt {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--muted);
}
.info dd { margin: 0; }
.hours-h {
  font-size: 22px;
  font-weight: 600;
  margin-top: 56px;
}
.hours {
  width: 100%;
  border-collapse: collapse;
}
.hours tr { border-top: 1px solid var(--line); }
.hours th,
.hours td { padding: 12px 0; }
.hours th {
  font-weight: 400;
  text-align: left;
}
.hours td {
  text-align: right;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}
.hours .today,
.hours .today th {
  font-weight: 600;
  color: var(--bronze);
}
.hours-note { margin-top: 16px; }
.map {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  height: auto;
  border: 1px solid var(--line);
  filter: grayscale(1) contrast(1.05);
}
@media (max-width: 639px) {
  .map { aspect-ratio: 1 / 1; }
}
.info-grid .actions { margin-top: 16px; }

/* Mobile bottom bar */
.bar { display: none; }
@media (max-width: 639px) {
  body { padding-bottom: 72px; }
  .bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    background: var(--paper);
    border-top: 1px solid var(--line);
  }
  .bar a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 10px 0 calc(10px + env(safe-area-inset-bottom));
    font-family: var(--font-body);
    font-size: 13px;
    text-decoration: none;
  }
  .bar svg {
    width: 20px;
    height: 20px;
  }
}

/* Footer */
.foot {
  border-top: 1px solid var(--line);
  padding-block: 56px;
}
.foot .wrap {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--muted);
}
.foot-mark {
  font-size: 20px;
  color: var(--ink);
}
.foot p + p { margin-top: 8px; }

/* Booking rules */
.rules {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 48px clamp(32px, 6vw, 96px);
  margin-top: 56px;
}
.rule h3 {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.rule ul { margin: 0; padding-left: 1.2em; }
.rule li { margin-bottom: 8px; font-size: 16px; }
.rules-foot { text-align: center; margin-top: 56px; }
.note { text-align: center; color: var(--muted); font-size: 15px; }
@media (max-width: 759px) {
  .rules { grid-template-columns: minmax(0, 1fr); }
}

/* Motion: scroll reveal and a slow settle on the poster photo */
@media (prefers-reduced-motion: no-preference) {
  .js .rv {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .9s ease, transform .9s cubic-bezier(.2, .7, .2, 1);
    transition-delay: var(--d, 0ms);
  }
  .js .rv.from-l { transform: translateX(-48px); }
  .js .rv.from-r { transform: translateX(48px); }
  .js .rv.in { opacity: 1; transform: none; }
  .poster-img img { animation: settle 6s cubic-bezier(.2, .7, .2, 1) both; }
  @keyframes settle { from { transform: scale(1.12); } to { transform: scale(1); } }
  .gallery img { transition: transform 1.2s cubic-bezier(.2, .7, .2, 1); }
  .gallery figure { overflow: hidden; }
  .gallery figure:hover img { transform: scale(1.04); }
}
