/* 春城小馆 Spring City Kitchen — site styles (mobile first) */

/* ---------- Fonts: self-hosted, subset (see tools/build_fonts.py) ---------- */
@font-face { font-family: "SCK Brush"; src: url("/assets/fonts/zhimangxing.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "SCK Serif SC"; src: url("/assets/fonts/notoserifsc.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "SCK Jost"; src: url("/assets/fonts/jost.woff2") format("woff2"); font-weight: 300 600; font-display: swap; }
@font-face { font-family: "SCK Cormorant"; src: url("/assets/fonts/cormorant.woff2") format("woff2"); font-weight: 500 600; font-style: normal; font-display: swap; }

:root {
  --rice: #F6F1E7;      /* 米白 */
  --paper: #FBF8F2;
  --ink: #1C1C1C;       /* 墨黑 */
  --gray: #6B6B6B;
  --line: #E4D9C6;
  --camellia: #C8474B;  /* 山茶红 */
  --camellia-deep: #A9383C;
  --earth: #B5653F;     /* 红土 */
  --leaf: #5E7A5A;      /* 山茶叶 */
  --sand: #EADFCB;
  --zh: "SCK Serif SC", "Songti SC", "Noto Serif CJK SC", serif;
  --en: "SCK Jost", "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  --en-display: "SCK Cormorant", "Cormorant Garamond", Georgia, serif;
  --brush: "SCK Brush", "SCK Serif SC", serif;
  --wrap: 1120px;
  --r: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--rice); color: var(--ink);
  font-family: var(--zh); font-size: 16px; line-height: 1.75;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
html[data-lang="en"] body { font-family: var(--en); font-weight: 400; line-height: 1.65; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.2; }
p { margin: 0; }

/* bilingual switch */
html[data-lang="zh"] .en, html[data-lang="en"] .zh { display: none !important; }

.brush { font-family: var(--brush); font-weight: 400; letter-spacing: .02em; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.wrap--narrow { max-width: 760px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 50; border-radius: 6px; }
.skip:focus { left: 8px; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(246, 241, 231, .92);
  -webkit-backdrop-filter: saturate(1.2) blur(10px); backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid rgba(28, 28, 28, .06);
}
.topbar__inner { display: flex; align-items: center; gap: 16px; height: 60px; }
.brand img { height: 38px; width: auto; }
.topnav { display: none; margin-left: auto; gap: 28px; font-size: 15px; }
.topnav a { text-decoration: none; color: var(--ink); opacity: .78; }
.topnav a:hover { opacity: 1; color: var(--camellia); }
html[data-lang="en"] .topnav { font-family: var(--en); letter-spacing: .08em; text-transform: uppercase; font-size: 13px; }
.lang {
  margin-left: auto; display: inline-flex; align-items: center; gap: 0;
  border: 1px solid rgba(28, 28, 28, .18); border-radius: 999px; background: var(--paper);
  padding: 3px; cursor: pointer; font: 500 13px/1 var(--en); color: var(--gray);
}
.lang__opt { padding: 7px 11px; border-radius: 999px; transition: background .2s, color .2s; }
.lang__opt[data-v="zh"] { font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif; } /* 系统字体：英文访客不必为一个字下载中文字体 */
.lang__opt.is-on { background: var(--ink); color: #fff; }
.lang__sep { display: none; }
.lang:focus-visible { outline: 2px solid var(--camellia); outline-offset: 2px; }

/* ---------- hero (kept compact so the menu shows early on phones) ---------- */
.hero { position: relative; overflow: hidden; padding: 30px 0 46px; }
.hero__bloom {
  position: absolute; right: -70px; top: 6px; width: 230px; height: 230px;
  opacity: .08; pointer-events: none;
}
.hero__inner { position: relative; }
.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; letter-spacing: .18em; color: var(--camellia); font-weight: 600;
}
.kicker::before { content: ""; width: 22px; height: 1px; background: currentColor; }
html[data-lang="en"] .kicker { font-family: var(--en); font-weight: 500; text-transform: uppercase; font-size: 12px; letter-spacing: .14em; }
.hero__title { margin-top: 12px; font-size: 54px; line-height: 1.1; font-weight: 400; }
.hero__title .en { font-family: var(--en-display); font-weight: 500; font-size: 44px; letter-spacing: -.005em; }
html[data-lang="en"] .hero__title { font-size: 44px; line-height: 1.04; }
.hero__lede { margin-top: 12px; max-width: 34em; color: #3a3a3a; font-size: 16px; }
html[data-lang="en"] .hero__lede { font-weight: 300; font-size: 17px; }
.hero__cta { margin-top: 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 24px;
  border-radius: 999px; text-decoration: none; font-weight: 600; font-size: 15px; letter-spacing: .06em;
}
html[data-lang="en"] .btn { font-family: var(--en); font-weight: 500; letter-spacing: .1em; text-transform: uppercase; font-size: 13px; }
.btn--red { background: var(--camellia); color: #fff; box-shadow: 0 6px 18px -8px rgba(200, 71, 75, .7); }
.btn--red:hover { background: var(--camellia-deep); }
.badge { font-size: 13px; color: var(--gray); letter-spacing: .08em; }
html[data-lang="en"] .badge { font-family: var(--en); letter-spacing: .12em; text-transform: uppercase; font-size: 12px; }
.ridge { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 40px; }

/* ---------- section heads ---------- */
section { scroll-margin-top: 64px; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin-bottom: 18px; }
.section-head h2 { font-size: 38px; font-weight: 400; }
.section-head h2 .en { font-family: var(--en-display); font-weight: 500; font-size: 36px; }
.section-sub { color: var(--gray); font-size: 14px; }
.soon {
  display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--camellia-deep);
}
.soon::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--camellia); flex: none; }

/* ---------- menu ---------- */
.menu { background: var(--sand); padding: 26px 0 40px; }
.menu .section-head { margin-bottom: 12px; }
.chips {
  display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 14px; margin: 0 -20px; padding-left: 20px; padding-right: 20px;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; text-decoration: none; padding: 7px 16px; border-radius: 999px; font-size: 14px;
  background: var(--paper); border: 1px solid rgba(28, 28, 28, .1); color: var(--ink);
}
.chip:hover { border-color: var(--camellia); color: var(--camellia); }
html[data-lang="en"] .chip { font-family: var(--en); font-size: 13px; letter-spacing: .04em; }
.menu__grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.card {
  background: var(--paper); border-radius: var(--r); padding: 18px 18px 8px;
  border: 1px solid rgba(28, 28, 28, .06); box-shadow: 0 1px 0 rgba(28, 28, 28, .03);
  scroll-margin-top: 72px;
}
.card__head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.card__title { font-size: 28px; font-weight: 400; color: var(--ink); }
.card__title .en { font-family: var(--en-display); font-weight: 600; font-size: 26px; }
.card__title::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 8px; border-radius: 50%; background: var(--camellia); vertical-align: middle; }
.card__note { font-size: 13px; color: var(--gray); }
.dishes { list-style: none; margin: 0; padding: 0; }
.dish { padding: 12px 0; border-bottom: 1px dashed var(--line); }
.dish:last-child { border-bottom: 0; }
.dish__row { display: flex; align-items: baseline; gap: 8px; }
.dish__name { font-weight: 600; font-size: 16px; }
html[data-lang="en"] .dish__name { font-weight: 500; }
.dish__tag { font-size: 11px; color: var(--camellia); border: 1px solid currentColor; border-radius: 4px; padding: 0 5px; line-height: 1.6; }
.dish__dots { flex: 1; border-bottom: 1px dotted rgba(28, 28, 28, .28); transform: translateY(-4px); min-width: 16px; }
.dish__price { font-family: var(--en); font-weight: 500; font-variant-numeric: tabular-nums; }
.dish__desc { font-size: 13.5px; color: var(--gray); margin-top: 2px; }
.dish.is-placeholder .dish__name, .dish.is-placeholder .dish__price { color: #9a9284; }
.dish.is-placeholder .dish__name { font-weight: 500; }
.dish.is-placeholder .dish__desc { color: #ada597; font-style: normal; }

/* ---------- visit ---------- */
.visit { padding: 40px 0 34px; }
.visit__grid { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.visit__item { background: var(--paper); border-radius: var(--r); padding: 14px 16px; border: 1px solid rgba(28, 28, 28, .06); }
.visit dt { font-size: 12px; letter-spacing: .16em; color: var(--camellia); font-weight: 600; }
html[data-lang="en"] .visit dt { font-family: var(--en); text-transform: uppercase; font-weight: 500; }
.visit dd { margin: 4px 0 0; font-size: 15px; }
.visit dd.tba { color: var(--gray); }

/* ---------- story (collapsible, kept after the menu) ---------- */
.story { padding: 26px 0 50px; border-top: 1px solid var(--line); }
.fold { border-bottom: 1px solid var(--line); }
.fold summary {
  list-style: none; cursor: pointer; padding: 18px 36px 18px 0; position: relative;
  font-size: 19px; font-weight: 600;
}
html[data-lang="en"] .fold summary { font-family: var(--en-display); font-size: 23px; font-weight: 600; }
.fold summary::-webkit-details-marker { display: none; }
.fold summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 12px; height: 12px; margin-top: -8px;
  border-right: 1.5px solid var(--camellia); border-bottom: 1.5px solid var(--camellia);
  transform: rotate(45deg); transition: transform .25s;
}
.fold[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.fold summary:focus-visible { outline: 2px solid var(--camellia); outline-offset: 4px; border-radius: 4px; }
.fold__body { padding: 0 0 22px; color: #333; }
.fold__body p + p { margin-top: 10px; }
html[data-lang="en"] .fold__body { font-weight: 300; font-size: 16.5px; }
.kinds { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.kinds h3 { font-size: 17px; margin-bottom: 4px; color: var(--ink); }
.kinds h3 i { font-style: italic; font-weight: 400; color: var(--gray); font-family: var(--en-display); font-size: 1.05em; }
html[data-lang="en"] .kinds h3 { font-family: var(--en); font-weight: 500; }
.legend { margin-top: 8px; padding: 10px 14px; background: var(--paper); border-left: 3px solid var(--camellia); border-radius: 0 8px 8px 0; font-size: 14.5px; color: #4a4a4a; }

/* ---------- home: culture entry cards ---------- */
.entries { display: grid; gap: 14px; }
.entry { display: grid; grid-template-columns: 112px 1fr; gap: 14px; align-items: center; text-decoration: none; color: var(--ink);
  background: var(--paper); border: 1px solid rgba(28, 28, 28, .06); border-radius: var(--r); overflow: hidden; padding: 10px; }
.entry img { width: 112px; height: 100px; object-fit: cover; border-radius: 9px; }
.entry:hover { border-color: var(--camellia); }
.entry__body { display: grid; gap: 2px; }
.entry__no { font-family: var(--brush); color: var(--camellia); font-size: 18px; line-height: 1; }
.entry__title { font-size: 18px; font-weight: 700; line-height: 1.3; }
html[data-lang="en"] .entry__title { font-family: var(--en-display); font-weight: 600; font-size: 21px; }
.entry__text { font-size: 13.5px; color: var(--gray); line-height: 1.55; }
html[data-lang="en"] .entry__text { font-weight: 300; font-size: 14px; }
.entries__more { margin-top: 16px; }
.entries__more a { color: var(--camellia-deep); font-weight: 600; text-decoration: none; }
html[data-lang="en"] .entries__more a { font-family: var(--en); font-weight: 500; letter-spacing: .06em; text-transform: uppercase; font-size: 13px; }

/* ---------- footer ---------- */
.foot { background: var(--ink); color: #d8d2c6; padding: 34px 0 calc(34px + env(safe-area-inset-bottom)); }
.foot__inner { display: grid; justify-items: center; text-align: center; gap: 6px; }
.foot__icon { width: 40px; height: 40px; margin-bottom: 6px; }
.foot__name { font-size: 15px; color: #fff; letter-spacing: .06em; }
.foot__fine { font-size: 12px; color: #9b968c; font-family: var(--en); }
html[data-lang="zh"] .foot__fine .zh { font-family: var(--zh); }

/* ---------- larger screens ---------- */
@media (min-width: 720px) {
  .wrap { padding: 0 32px; }
  .topbar__inner { height: 72px; }
  .brand img { height: 46px; }
  .topnav { display: flex; }
  .lang { margin-left: 8px; }
  .hero { padding: 64px 0 96px; }
  .hero__bloom { right: 4%; top: 36px; width: 380px; height: 380px; opacity: .09; }
  .hero__title { font-size: 92px; }
  .hero__title .en { font-size: 68px; max-width: 11em; }
  html[data-lang="en"] .hero__title { font-size: 68px; }
  .hero__lede { font-size: 18px; }
  .ridge { height: 80px; }
  .section-head h2 { font-size: 48px; }
  .section-head h2 .en { font-size: 46px; }
  .menu { padding: 48px 0 64px; }
  .chips { margin: 0; padding-left: 0; padding-right: 0; flex-wrap: wrap; }
  .menu__grid { grid-template-columns: 1fr 1fr; gap: 20px; }
  .card { padding: 24px 26px 12px; }
  .visit { padding: 64px 0 56px; }
  .visit__grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .story { padding: 56px 0 80px; }
  .entries { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .entry { grid-template-columns: 1fr; padding: 0; align-items: start; }
  .entry img { width: 100%; height: auto; aspect-ratio: 640 / 422; border-radius: 0; }
  .entry__body { padding: 4px 20px 22px; }
}
