/* =========================================================
   Four's CCT · 四寶茶檔  —  Stylesheet
   A warm, hand drawn Hong Kong cha chaan teng theme.
   Everything is tokenized below; retheme from :root alone.
   ========================================================= */

:root {
  /* ---- Brand palette (sampled from the logo) ---- */
  --cream:        #f7efe1;
  --cream-soft:   #fbf6ec;
  --cream-deep:   #efe2ca;
  --paper:        #fffdf8;

  --ink:          #46311f;   /* cocoa outline & headings */
  --ink-soft:     #6b4e38;
  --ink-faint:    #97755a;

  --cheese:       #ebc873;
  --cheese-deep:  #dfb14e;
  --pig:          #e9c2ab;
  --tiger:        #ecd6a4;
  --dog:          #ecdcc0;

  --terracotta:   #cd6a45;
  --terracotta-d: #b0512d;
  --leaf:         #7a9a5e;

  /* ---- Semantic ---- */
  --bg:        var(--cream);
  --surface:   var(--paper);
  --text:      var(--ink);
  --muted:     var(--ink-soft);
  --line:      #e6d4b4;
  --shadow:    26px 30px 56px -30px rgba(70, 49, 31, .32);
  --shadow-sm: 0 12px 26px -16px rgba(70, 49, 31, .5);

  /* ---- Organic radii: slightly uneven, like a brush pen ---- */
  --r-sm:   14px 16px 15px 17px / 16px 14px 17px 15px;
  --r-md:   22px 26px 23px 27px / 26px 22px 27px 23px;
  --r-lg:   30px 34px 31px 36px / 34px 30px 36px 31px;
  --r-pill: 999px;

  /* ---- Type scale (fluid) ---- */
  --font-display: "Baloo 2", "Noto Sans TC", system-ui, sans-serif;
  --font-body:    "Nunito", "Noto Sans TC", system-ui, sans-serif;
  --fs-hero:  clamp(2.7rem, 6.6vw, 4.75rem);
  --fs-h2:    clamp(1.95rem, 4.6vw, 3.1rem);
  --fs-h3:    clamp(1.5rem, 3.4vw, 2rem);
  --fs-lead:  clamp(1.05rem, 1.9vw, 1.17rem);
  --fs-body:  1rem;
  --fs-small: .9rem;
  --fs-tiny:  .78rem;

  /* ---- Motion ---- */
  --ease-out:    cubic-bezier(.22, .9, .3, 1);
  --ease-spring: cubic-bezier(.34, 1.6, .48, 1);
  --dur-quick:   .18s;
  --dur-soft:    .55s;

  --container: 1160px;
  --header-h:  72px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 12% 18%, rgba(235, 200, 115, .11), transparent 42%),
    radial-gradient(circle at 88% 6%, rgba(233, 194, 171, .15), transparent 40%),
    radial-gradient(rgba(70, 49, 31, .05) 1.4px, transparent 1.4px);
  background-size: auto, auto, 26px 26px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; margin: 0; font-weight: 700; }

.container { width: min(100% - 2.4rem, var(--container)); margin-inline: auto; }

.section { padding: clamp(3.6rem, 8vw, 6.75rem) 0; position: relative; }

/* ------------------- Small type utilities ------------------- */
.eyebrow {
  display: flex; align-items: center; gap: .6rem;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-size: var(--fs-tiny);
  color: var(--terracotta);
  margin: 0 0 1rem;
}
.eyebrow::before {
  content: ""; width: 26px; height: 3px; flex: none;
  background: var(--terracotta); border-radius: 3px;
  transform: rotate(-2deg);
}
.eyebrow--center { justify-content: center; }
.eyebrow--center::after {
  content: ""; width: 26px; height: 3px; flex: none;
  background: var(--terracotta); border-radius: 3px;
  transform: rotate(2deg);
}

.section-title {
  font-size: var(--fs-h2);
  color: var(--ink);
  letter-spacing: -.015em;
  text-wrap: balance;
}
.section-title--center { text-align: center; }

/* hand drawn squiggle under centered titles */
.has-squiggle { position: relative; padding-bottom: 1.15rem; }
.has-squiggle::after {
  content: ""; position: absolute; left: 50%; bottom: 0;
  width: 96px; height: 10px; transform: translateX(-50%);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='10' viewBox='0 0 48 10'%3E%3Cpath d='M0 5 Q 6 0 12 5 T 24 5 T 36 5 T 48 5' fill='none' stroke='%23cd6a45' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-size: 48px 10px;
}

.skip-link {
  position: absolute; left: 50%; transform: translateX(-50%) translateY(-140%);
  top: .55rem; z-index: 300;
  background: var(--ink); color: var(--cream);
  padding: .6rem 1.1rem; border-radius: var(--r-pill);
  font-weight: 700; text-decoration: none;
  transition: transform var(--dur-quick) var(--ease-out);
}
.skip-link:focus { transform: translateX(-50%) translateY(0); }

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

/* ------------------- Scroll progress ------------------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 5px; z-index: 250;
  background: transparent; pointer-events: none;
}
.scroll-progress span {
  display: block; height: 100%; width: 100%;
  transform: scaleX(0); transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--cheese) 0%, var(--cheese-deep) 55%, var(--terracotta) 100%);
  border-radius: 0 3px 3px 0;
}

/* ------------------- Buttons ------------------- */
.btn {
  --btn-bg: var(--cheese);
  position: relative;
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-display); font-weight: 700; font-size: 1.02rem;
  padding: .82rem 1.55rem; border-radius: var(--r-pill);
  text-decoration: none; cursor: pointer; border: 2.5px solid var(--ink);
  background: var(--btn-bg); color: var(--ink);
  box-shadow: 0 5px 0 0 var(--ink);
  transition:
    transform var(--dur-quick) var(--ease-spring),
    box-shadow var(--dur-quick) var(--ease-out),
    background .25s var(--ease-out);
}
.btn:hover  { transform: translateY(-3px) rotate(-.6deg); box-shadow: 0 8px 0 0 var(--ink); }
.btn:active { transform: translateY(3px) scale(.97); box-shadow: 0 1px 0 0 var(--ink); }
.btn--primary:hover { background: var(--cheese-deep); }
.btn--ghost { --btn-bg: var(--paper); }
.btn--ghost:hover { background: var(--cream-soft); }

/* ------------------- Header ------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(247, 239, 225, .84);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 2px solid transparent;
  transition: border-color .3s var(--ease-out), box-shadow .3s var(--ease-out);
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 8px 28px -22px rgba(70,49,31,.65);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-h); gap: 1rem;
}
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; }
.brand-mark {
  height: 42px; width: auto; object-fit: contain; border-radius: 8px;
  transition: transform .35s var(--ease-spring);
}
.brand:hover .brand-mark { transform: rotate(-2deg) scale(1.04); }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-en { font-family: var(--font-display); font-weight: 800; font-size: 1.22rem; color: var(--ink); letter-spacing: -.01em; }
.brand-zh { font-size: .8rem; color: var(--ink-soft); letter-spacing: .22em; }

.main-nav { display: flex; align-items: center; }
.nav-list { list-style: none; display: flex; align-items: center; gap: .3rem; margin: 0; padding: 0; }
.nav-list a {
  position: relative;
  text-decoration: none; font-weight: 700; color: var(--ink-soft);
  padding: .5rem .85rem; border-radius: var(--r-pill);
  transition: color .2s var(--ease-out);
}
.nav-list a:not(.nav-cta)::after {
  content: ""; position: absolute; left: .85rem; right: .85rem; bottom: .28rem;
  height: 2.5px; border-radius: 2px; background: var(--cheese-deep);
  transform: scaleX(0); transform-origin: 0 50%;
  transition: transform .3s var(--ease-out);
}
.nav-list a:not(.nav-cta):hover, .nav-list a.is-active { color: var(--ink); }
.nav-list a:not(.nav-cta):hover::after, .nav-list a.is-active::after { transform: scaleX(1); }

.nav-cta {
  background: var(--cheese); color: var(--ink) !important;
  border: 2px solid var(--ink); box-shadow: 0 3px 0 0 var(--ink);
  transition: transform var(--dur-quick) var(--ease-spring), box-shadow var(--dur-quick) var(--ease-out), background .2s !important;
}
.nav-cta:hover { background: var(--cheese-deep) !important; transform: translateY(-2px); box-shadow: 0 5px 0 0 var(--ink); }
.nav-cta:active { transform: translateY(2px); box-shadow: 0 1px 0 0 var(--ink); }

.nav-toggle {
  display: none; width: 44px; height: 44px; border: 2px solid var(--ink);
  border-radius: var(--r-sm); background: var(--paper); cursor: pointer;
  flex-direction: column; gap: 5px; align-items: center; justify-content: center;
}
.nav-toggle span { width: 22px; height: 2.6px; background: var(--ink); border-radius: 2px; transition: transform .28s var(--ease-spring), opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.6px) rotate(-45deg); }

/* ------------------- Hero ------------------- */
.hero {
  position: relative; overflow: hidden;
  padding-top: clamp(2.2rem, 5vw, 4.2rem);
  padding-bottom: clamp(4.2rem, 9vw, 7.2rem);
}
.hero-inner {
  display: grid; grid-template-columns: 1.05fr .95fr; align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
}

/* copy fades slightly away as you scroll past (parallax) */
.hero-copy {
  max-width: 34rem;
  transform: translateY(calc(var(--para, 0) * -30px));
  opacity: calc(1 - var(--para, 0) * 1.1);
  will-change: transform, opacity;
}
.hero-copy > * { animation: rise .7s var(--ease-out) both; }
.hero-copy > *:nth-child(1) { animation-delay: .05s; }
.hero-copy > *:nth-child(2) { animation-delay: .14s; }
.hero-copy > *:nth-child(3) { animation-delay: .23s; }
.hero-copy > *:nth-child(4) { animation-delay: .32s; }
.hero-copy > *:nth-child(5) { animation-delay: .41s; }

.hero-title {
  font-size: var(--fs-hero); font-weight: 800; color: var(--ink);
  letter-spacing: -.025em; margin-bottom: 1.15rem;
}
.hero-title .hl { position: relative; color: var(--terracotta); white-space: nowrap; }
.hero-title .hl::after {
  content: ""; position: absolute; left: -2%; right: -2%; bottom: .06em; height: .34em;
  background: var(--cheese); border-radius: 50%; z-index: -1; opacity: .55;
  transform: rotate(-1.4deg); transform-origin: 0 100%;
  animation: paint .6s var(--ease-out) .75s both;
}
.hero-sub { font-size: var(--fs-lead); color: var(--muted); margin: 0 0 1.9rem; max-width: 30rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-bottom: 2rem; }
.hero-meta { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.6rem; font-weight: 700; color: var(--ink-soft); }
.hero-meta li { display: flex; align-items: center; gap: .45rem; }
.hero-meta a { text-decoration: none; transition: color .2s; }
.hero-meta a:hover { color: var(--terracotta); }
.hero-meta-ico { font-size: 1.05rem; }

.hero-art {
  position: relative; display: grid; place-items: center;
  perspective: 900px;
  transform: translateY(calc(var(--para, 0) * 44px));
  will-change: transform;
}
.hero-logo {
  width: min(100%, 520px); border-radius: var(--r-lg);
  background: var(--paper); padding: clamp(1rem, 3vw, 2rem);
  border: 3px solid var(--ink);
  box-shadow: var(--shadow);
  rotate: -1.6deg;
  animation: rise .8s var(--ease-out) .2s both;
  transition: transform .25s var(--ease-out);
  will-change: transform;
}
.hero-badge {
  position: absolute; top: -14px; right: 4%; z-index: 2;
  font-family: var(--font-display); font-weight: 800; font-size: 1.5rem;
  color: var(--ink); background: var(--cheese);
  width: 74px; height: 74px; border-radius: 50% 48% 52% 50% / 48% 52% 48% 52%;
  display: grid; place-items: center; border: 3px solid var(--ink);
  box-shadow: var(--shadow-sm);
  animation: bob 4.5s ease-in-out 1s infinite;
  rotate: 9deg;
}

/* steam curling above the logo card */
.hero-steam {
  position: absolute; top: -44px; left: 12%; width: 88px; z-index: 2;
  fill: none; stroke: var(--ink-faint); stroke-width: 5; stroke-linecap: round;
  opacity: .85;
}
.hero-steam path { animation: steam 3s ease-in-out infinite; }
.hero-steam .s2 { animation-delay: .9s; }
.hero-steam .s3 { animation-delay: 1.7s; }

/* soft colour blobs drifting behind everything */
.doodle--steam {
  position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image:
    radial-gradient(circle, var(--cheese) 22%, transparent 23%),
    radial-gradient(circle, var(--pig) 22%, transparent 23%);
  background-size: 220px 220px, 260px 260px;
  background-position: 6% 84%, 92% 22%;
  background-repeat: no-repeat;
  filter: blur(2px);
  transform: translateY(calc(var(--para, 0) * 70px));
  will-change: transform;
}

/* twinkling sparkles */
.sparkle {
  position: absolute; z-index: 1; pointer-events: none;
  fill: var(--cheese); stroke: var(--ink); stroke-width: 1.2;
  animation: twinkle 3.4s ease-in-out infinite;
}
.sparkle--a { width: 26px; top: 16%; left: 44%; }
.sparkle--b { width: 18px; top: 64%; left: 4%; animation-delay: 1.2s; fill: var(--pig); }
.sparkle--c { width: 22px; top: 12%; right: 5%; animation-delay: 2.1s; fill: var(--terracotta); }

/* scalloped edge into the next section */
.wave-divider {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 44px;
  background: radial-gradient(circle at 20px -10px, transparent 22px, var(--cream-soft) 23px) repeat-x;
  background-size: 44px 44px;
}

/* ------------------- Story ------------------- */
.story { background: var(--cream-soft); }
.story-inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.story-copy p { color: var(--muted); font-size: var(--fs-lead); margin: 0 0 1.1rem; }
.story-copy .section-title { margin-bottom: 1.3rem; }

.value-list { list-style: none; margin: 1.7rem 0 0; padding: 0; display: grid; gap: .85rem; }
.value-list li {
  display: flex; flex-direction: column; padding: .9rem 1.15rem;
  background: var(--paper); border: 2px solid var(--line); border-radius: var(--r-md);
  border-left: 6px solid var(--cheese);
  transition: transform .25s var(--ease-spring), border-color .25s, box-shadow .25s;
}
.value-list li:hover {
  transform: translateX(6px);
  border-color: var(--cheese-deep);
  box-shadow: var(--shadow-sm);
}
.value-list strong { font-family: var(--font-display); color: var(--ink); font-size: 1.06rem; }
.value-list span { color: var(--ink-faint); font-size: var(--fs-small); }

.story-card {
  position: relative;
  background: var(--paper); border: 3px solid var(--ink); border-radius: var(--r-lg);
  padding: 2.1rem 1.6rem 1.8rem; text-align: center; box-shadow: var(--shadow-sm);
  rotate: 1.4deg;
  transition: rotate .35s var(--ease-spring), box-shadow .35s var(--ease-out);
}
.story-card:hover { rotate: 0deg; box-shadow: var(--shadow); }

/* washi tape strips pinning the card down */
.story-card::before, .story-card::after {
  content: ""; position: absolute; width: 86px; height: 26px;
  background: rgba(235, 200, 115, .8);
  border: 1.5px dashed rgba(70, 49, 31, .35);
  top: -13px;
}
.story-card::before { left: 8%; transform: rotate(-8deg); }
.story-card::after  { right: 8%; transform: rotate(6deg); }

.mascot-row { display: flex; justify-content: center; align-items: flex-end; gap: .4rem; }
.mascot { width: clamp(52px, 8vw, 72px); height: auto; transition: transform .3s var(--ease-spring); }
.story-card:hover .mascot { animation: hop .55s var(--ease-spring); }
.story-card:hover .mascot:nth-child(2) { animation-delay: .07s; }
.story-card:hover .mascot:nth-child(3) { animation-delay: .14s; }
.story-card:hover .mascot:nth-child(4) { animation-delay: .21s; }

.mascot-caption { font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; color: var(--ink); margin: 1.1rem 0 .3rem; letter-spacing: .04em; }
.mascot-note { color: var(--ink-faint); margin: 0; font-size: var(--fs-small); }

/* ------------------- Highlights ------------------- */
.highlight-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.3rem; margin-top: 2.6rem; }

.highlight-card {
  position: relative;
  background: var(--paper); border: 2.5px solid var(--ink); border-radius: var(--r-lg);
  padding: 1.55rem 1.35rem 1.45rem; box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform .3s var(--ease-spring), box-shadow .3s var(--ease-out);
}
.highlight-card:nth-child(even) { rotate: -1.1deg; }
.highlight-card:nth-child(odd)  { rotate: .9deg; }
.highlight-card:hover, .highlight-card:focus-visible { transform: translateY(-7px); rotate: 0deg; box-shadow: var(--shadow); }
.highlight-card:active { transform: translateY(-2px) scale(.985); }

.highlight-icon {
  width: 64px; height: 64px; display: grid; place-items: center;
  background: var(--cheese); border: 2.5px solid var(--ink);
  border-radius: 52% 48% 50% 50% / 48% 52% 48% 52%;
  margin-bottom: 1.05rem;
}
.highlight-icon svg { width: 38px; height: 38px; transition: transform .3s var(--ease-spring); }
.highlight-card:hover .highlight-icon svg { transform: rotate(-8deg) scale(1.12); }
.highlight-card:nth-child(2) .highlight-icon { background: var(--pig); }
.highlight-card:nth-child(3) .highlight-icon { background: var(--tiger); }
.highlight-card:nth-child(4) .highlight-icon { background: var(--dog); }

.highlight-zh { font-family: var(--font-display); font-weight: 700; font-size: 1.22rem; color: var(--ink); margin: 0 0 .12rem; }
.highlight-en { font-weight: 800; color: var(--ink-soft); margin: 0 0 .5rem; }
.highlight-note { color: var(--ink-faint); font-size: var(--fs-small); margin: 0; }
.highlight-star {
  position: absolute; top: 1rem; right: 1.1rem;
  color: var(--cheese-deep); font-size: 1.15rem;
  transition: transform .3s var(--ease-spring);
}
.highlight-card:hover .highlight-star { transform: rotate(72deg) scale(1.25); }

/* ------------------- Menu ------------------- */
.menu { background: var(--cream-soft); }

.allergen-legend { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin: 1.5rem 0 2rem; }

.tag {
  font-family: var(--font-display); font-weight: 700; font-size: .72rem;
  letter-spacing: .03em; padding: .22rem .62rem; border-radius: var(--r-pill);
  border: 1.6px solid var(--ink); white-space: nowrap; line-height: 1.4;
}
.tag--signature { background: var(--cheese); color: var(--ink); }
.tag--spicy     { background: #f4d8ca; color: var(--terracotta-d); border-color: var(--terracotta-d); }
.tag--peanuts   { background: #efe3cd; color: var(--ink-soft); }
.tag--seafood   { background: #d9e6ea; color: #386a76; border-color: #386a76; }

/* sticky category chips */
.menu-nav {
  display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center;
  position: sticky; top: var(--header-h); z-index: 40;
  padding: .85rem .4rem; margin-bottom: 2rem;
  background: linear-gradient(var(--cream-soft) 72%, transparent);
}
.chip {
  font-family: var(--font-display); font-weight: 700; font-size: .92rem;
  padding: .5rem 1.05rem; border-radius: var(--r-pill);
  border: 2px solid var(--ink); background: var(--paper); color: var(--ink);
  cursor: pointer;
  display: inline-flex; align-items: center; gap: .45rem;
  transition: transform var(--dur-quick) var(--ease-spring), background .22s var(--ease-out), color .22s var(--ease-out), box-shadow .22s;
}
.chip .chip-en { font-size: .78rem; color: var(--ink-faint); font-weight: 600; transition: color .22s; }
.chip:hover { transform: translateY(-2px) rotate(-1deg); box-shadow: 0 4px 0 -1px var(--ink); }
.chip:active { transform: translateY(1px) scale(.96); box-shadow: none; }
.chip.is-active { background: var(--ink); color: var(--cream); animation: pop .35s var(--ease-spring); }
.chip.is-active .chip-en { color: var(--cheese); }

/* panels */
.menu-panel { display: none; }
.menu-panel.is-active { display: block; animation: fade-up .45s var(--ease-out) both; }

.panel-head { display: flex; align-items: baseline; gap: .8rem; flex-wrap: wrap; margin-bottom: .3rem; }
.panel-head h3 { font-size: var(--fs-h3); color: var(--ink); }
.panel-head .panel-en { font-family: var(--font-display); font-weight: 600; color: var(--terracotta); font-size: 1.02rem; letter-spacing: .05em; }
.panel-note {
  background: var(--paper); border: 2px dashed var(--line); border-radius: var(--r-md);
  padding: .85rem 1.15rem; margin: .95rem 0 1.6rem; color: var(--ink-soft); font-size: .96rem;
}
.panel-note .panel-note-zh { display: block; color: var(--ink-faint); font-size: var(--fs-small); margin-top: .2rem; }

.item-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.05rem; }

.menu-item {
  background: var(--paper); border: 2px solid var(--line); border-radius: var(--r-md);
  padding: 1.1rem 1.25rem; display: flex; justify-content: space-between; gap: 1rem;
  transition: border-color .22s var(--ease-out), transform var(--dur-quick) var(--ease-out), box-shadow .22s var(--ease-out);
}
.menu-item:hover { border-color: var(--cheese-deep); transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.menu-item.is-signature { border-left: 6px solid var(--cheese); }

.item-main { min-width: 0; }
.item-name {
  font-family: var(--font-display); font-weight: 700; font-size: 1.07rem;
  color: var(--ink); margin: 0 0 .1rem;
  text-decoration: underline transparent wavy 1.5px;
  text-underline-offset: 4px;
  transition: text-decoration-color .25s var(--ease-out);
}
.menu-item:hover .item-name { text-decoration-color: var(--cheese-deep); }
.item-zh { color: var(--ink-soft); font-size: .96rem; margin: 0 0 .3rem; }
.item-desc { color: var(--ink-faint); font-size: .88rem; margin: .25rem 0 .4rem; line-height: 1.5; }
.item-tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .5rem; }
.item-addon { display: block; color: var(--ink-faint); font-size: .82rem; margin-top: .45rem; font-style: italic; }

.item-price {
  font-family: var(--font-display); font-weight: 800; color: var(--terracotta-d);
  white-space: nowrap; text-align: right; font-size: 1.03rem;
  transition: transform var(--dur-quick) var(--ease-spring);
}
.menu-item:hover .item-price { transform: scale(1.06); }
.item-price small { display: block; font-weight: 700; color: var(--ink-faint); font-size: .8rem; }

.menu-footnote { text-align: center; color: var(--ink-faint); font-size: var(--fs-small); margin-top: 2.5rem; max-width: 44rem; margin-inline: auto; }

/* cross link from the searchable menu to the printed boards */
.menu-boards-cta {
  margin-top: 2.6rem; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
  padding: 1.8rem 1.4rem;
  background: var(--paper); border: 2px dashed var(--line); border-radius: var(--r-lg);
  max-width: 46rem; margin-inline: auto;
}
.menu-boards-cta p { margin: 0; color: var(--ink-soft); font-size: var(--fs-lead); max-width: 32rem; }

/* ------------------- Printed menu page ------------------- */
.page-hero {
  position: relative; overflow: hidden; text-align: center;
  padding: clamp(2.6rem, 6vw, 4.4rem) 0 clamp(3.4rem, 7vw, 5.2rem);
}
.page-hero-title {
  font-size: clamp(2.3rem, 5.4vw, 3.5rem); font-weight: 800; color: var(--ink);
  letter-spacing: -.02em; margin: 0 auto; width: fit-content;
  animation: rise .7s var(--ease-out) both;
}
.page-hero-sub {
  max-width: 40rem; margin: 1.4rem auto 0; color: var(--muted); font-size: var(--fs-lead);
  animation: rise .7s var(--ease-out) .12s both;
}
.page-hero-sub a { color: var(--terracotta); font-weight: 700; text-underline-offset: 3px; }

.boards { background: var(--cream-soft); }
.board-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 2rem; align-items: start; justify-content: center;
}

.menu-board { margin: 0; }
.board-view {
  display: block; width: 100%; padding: 12px; cursor: zoom-in;
  background: var(--paper); border: 3px solid var(--ink); border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
  transition: transform .3s var(--ease-spring), box-shadow .3s var(--ease-out);
}
.menu-board:nth-child(even) .board-view { rotate: -.8deg; }
.menu-board:nth-child(odd)  .board-view { rotate: .6deg; }
.board-view:hover, .board-view:focus-visible { transform: translateY(-6px); rotate: 0deg; box-shadow: var(--shadow); }
.board-view img { width: 100%; height: auto; border-radius: calc(var(--r-md)); display: block; }

.board-zoom {
  position: absolute; left: 50%; bottom: 20px; transform: translate(-50%, 12px);
  background: var(--ink); color: var(--cream);
  font-family: var(--font-display); font-weight: 700; font-size: .9rem;
  padding: .5rem 1.05rem; border-radius: var(--r-pill);
  opacity: 0; transition: opacity .25s var(--ease-out), transform .25s var(--ease-out);
  pointer-events: none; white-space: nowrap;
}
.board-view:hover .board-zoom, .board-view:focus-visible .board-zoom { opacity: 1; transform: translate(-50%, 0); }

.menu-board figcaption { text-align: center; margin-top: 1.05rem; }
.board-title { display: block; font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; color: var(--ink); }
.board-title-zh { display: block; color: var(--ink-faint); font-size: .95rem; margin-top: .1rem; letter-spacing: .04em; }

.boards-note { text-align: center; color: var(--ink-faint); font-size: var(--fs-small); margin-top: 2.6rem; }
.boards-note a { color: var(--terracotta); font-weight: 700; }

/* ------------------- Lightbox ------------------- */
.lightbox {
  position: fixed; inset: 0; z-index: 400;
  display: grid; place-items: center; padding: clamp(1rem, 4vw, 3rem);
  background: rgba(46, 31, 19, .82);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .3s var(--ease-out);
}
.lightbox[hidden] { display: none; }
.lightbox.is-open { opacity: 1; }
.lightbox-inner {
  margin: 0; max-width: 100%; max-height: 100%;
  display: flex; flex-direction: column; align-items: center; gap: .9rem;
  transform: scale(.94); transition: transform .35s var(--ease-spring);
}
.lightbox.is-open .lightbox-inner { transform: scale(1); }
.lightbox-img {
  max-width: min(100%, 900px); max-height: 82vh; width: auto; height: auto;
  border-radius: var(--r-md); border: 3px solid var(--cream);
  box-shadow: 0 30px 70px -20px rgba(0,0,0,.6); background: var(--paper);
}
.lightbox-caption { color: var(--cream); font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; text-align: center; }
.lightbox-close {
  position: absolute; top: clamp(.8rem, 2vw, 1.4rem); right: clamp(.8rem, 2vw, 1.4rem);
  width: 48px; height: 48px; border-radius: 50%; cursor: pointer;
  background: var(--cheese); color: var(--ink); border: 2.5px solid var(--ink);
  font-size: 1.2rem; font-weight: 800; display: grid; place-items: center;
  box-shadow: var(--shadow-sm); transition: transform var(--dur-quick) var(--ease-spring), background .2s;
}
.lightbox-close:hover { transform: rotate(90deg) scale(1.05); background: var(--cheese-deep); }

/* ------------------- Visit ------------------- */
.visit-inner { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(2rem, 5vw, 3.5rem); align-items: center; }
.contact-list { list-style: none; margin: 1.6rem 0 0; padding: 0; display: grid; gap: 1.15rem; }
.contact-list li { display: flex; gap: 1rem; align-items: flex-start; }
.contact-ico {
  flex: none; width: 46px; height: 46px; display: grid; place-items: center;
  background: var(--cheese); border: 2.5px solid var(--ink);
  border-radius: 46% 54% 50% 50% / 52% 48% 52% 48%;
  font-size: 1.2rem;
  transition: transform .3s var(--ease-spring), background .25s;
}
.contact-list li:hover .contact-ico { transform: rotate(-8deg) scale(1.1); background: var(--cheese-deep); }
.contact-list strong { display: block; font-family: var(--font-display); color: var(--ink); font-size: 1.03rem; }
.contact-list a { color: var(--ink-soft); text-decoration: none; font-weight: 700; transition: color .2s; }
.contact-list a:hover { color: var(--terracotta); }
.contact-hint { display: block; color: var(--ink-faint); font-size: .84rem; font-weight: 400; font-style: italic; }

.visit-map {
  position: relative;
  border: 3px solid var(--ink); border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--shadow-sm); background: var(--paper); aspect-ratio: 16 / 11;
  transition: box-shadow .35s var(--ease-out), transform .35s var(--ease-spring);
}
.visit-map:hover { box-shadow: var(--shadow); transform: translateY(-4px); }
.visit-map iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ------------------- Footer ------------------- */
.site-footer { background: var(--ink); color: var(--cream); padding: 3.2rem 0 1.5rem; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; align-items: start; }
.footer-brand { max-width: 22rem; }
.footer-logo {
  width: 84px; border-radius: var(--r-sm); border: 2px solid var(--cream); margin-bottom: .9rem;
  transition: transform .35s var(--ease-spring);
}
.footer-logo:hover { transform: rotate(-4deg) scale(1.05); }
.footer-brand p { color: #e6d6bf; margin: 0; font-size: .96rem; }
.footer-nav { display: flex; flex-direction: column; gap: .55rem; }
.footer-nav a, .footer-contact a {
  position: relative; width: fit-content;
  color: #e6d6bf; text-decoration: none; font-weight: 700;
  transition: color .2s;
}
.footer-nav a::after, .footer-contact a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: var(--cheese); border-radius: 2px;
  transform: scaleX(0); transform-origin: 0 50%;
  transition: transform .28s var(--ease-out);
}
.footer-nav a:hover, .footer-contact a:hover { color: var(--cheese); }
.footer-nav a:hover::after, .footer-contact a:hover::after { transform: scaleX(1); }
.footer-contact { display: flex; flex-direction: column; gap: .55rem; }
.footer-contact span { font-weight: 400; color: #cdb99b; }
.footer-legal { text-align: center; color: #b39c7f; font-size: .84rem; margin: 2.4rem 0 0; border-top: 1px solid rgba(255,255,255,.12); padding-top: 1.4rem; }

/* ------------------- Back to top ------------------- */
.back-to-top {
  position: fixed; right: 1.3rem; bottom: 1.3rem; z-index: 90;
  width: 50px; height: 50px; border-radius: 48% 52% 50% 50% / 52% 48% 52% 48%;
  background: var(--cheese); color: var(--ink); border: 2.5px solid var(--ink);
  display: grid; place-items: center; font-size: 1.4rem; font-weight: 800;
  text-decoration: none; box-shadow: var(--shadow-sm);
  animation: rise .4s var(--ease-out) both;
  transition: transform var(--dur-quick) var(--ease-spring), background .2s;
}
.back-to-top:hover { transform: translateY(-4px) rotate(-6deg); background: var(--cheese-deep); }
.back-to-top:active { transform: translateY(0) scale(.94); }

/* ------------------- Keyframes ------------------- */
@keyframes rise {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes paint {
  from { transform: rotate(-1.4deg) scaleX(0); }
  to   { transform: rotate(-1.4deg) scaleX(1); }
}
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-9px); }
}
@keyframes steam {
  0%   { opacity: 0; transform: translateY(8px) scaleY(.85); }
  35%  { opacity: .9; }
  100% { opacity: 0; transform: translateY(-14px) scaleY(1.08); }
}
@keyframes twinkle {
  0%, 100% { opacity: .25; transform: scale(.7) rotate(0deg); }
  50%      { opacity: 1;   transform: scale(1.15) rotate(24deg); }
}
@keyframes pop {
  0%   { transform: scale(1); }
  55%  { transform: scale(1.09); }
  100% { transform: scale(1); }
}
@keyframes hop {
  0%   { transform: translateY(0); }
  45%  { transform: translateY(-10px) rotate(-3deg); }
  100% { transform: translateY(0); }
}

/* ------------------- Scroll reveal ------------------- */
.reveal {
  opacity: 0; transform: translateY(26px);
  transition:
    opacity var(--dur-soft) var(--ease-out) var(--rd, 0ms),
    transform var(--dur-soft) var(--ease-out) var(--rd, 0ms);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ------------------- Responsive ------------------- */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-copy { max-width: none; margin-inline: auto; }
  .hero-sub { margin-inline: auto; }
  .hero-actions, .hero-meta { justify-content: center; }
  .hero-art { order: -1; }
  .hero-logo { width: min(88%, 440px); }
  .hero-steam { left: 6%; top: -38px; width: 72px; }
  .eyebrow { justify-content: center; }
  .eyebrow::after { content: ""; width: 26px; height: 3px; flex: none; background: var(--terracotta); border-radius: 3px; transform: rotate(2deg); }
  .story-inner, .visit-inner { grid-template-columns: 1fr; }
  .story-card { max-width: 26rem; margin-inline: auto; }
  .highlight-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .nav-list {
    position: absolute; top: calc(var(--header-h) - 6px); right: 1.2rem; left: 1.2rem;
    flex-direction: column; align-items: stretch; gap: .3rem;
    background: var(--paper); border: 2px solid var(--ink); border-radius: var(--r-md);
    padding: .7rem; box-shadow: var(--shadow);
    transform-origin: top; transform: scaleY(.6) translateY(-14px); opacity: 0; pointer-events: none;
    transition: transform .3s var(--ease-spring), opacity .2s var(--ease-out);
  }
  .nav-list.is-open { transform: scaleY(1) translateY(0); opacity: 1; pointer-events: auto; }
  .nav-list a { padding: .7rem 1rem; }
  .nav-list a:not(.nav-cta)::after { display: none; }
  .nav-cta { text-align: center; margin-top: .2rem; }
}

@media (max-width: 620px) {
  .item-grid { grid-template-columns: 1fr; }
  .highlight-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 1.6rem; }
  .menu-nav { top: 0; }
  .sparkle--a { display: none; }
}

@media (max-width: 440px) {
  .brand-mark { height: 34px; }
  .brand-en { font-size: 1.08rem; }
  .brand-zh { font-size: .72rem; letter-spacing: .16em; }
}

@media (max-width: 360px) {
  .brand-text { display: none; }  /* mascot strip alone stays recognizable */
}

/* ------------------- Reduced motion ------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hero-copy, .hero-art, .doodle--steam { transform: none; opacity: 1; }
}
