/* ===== 变量 ===== */
:root {
  --color-bg: #faf7f2;
  --color-bg-warm: #f5efe6;
  --color-ink: #2c2c2c;
  --color-ink-light: #5a5a5a;
  --color-ink-muted: #8a8a8a;
  --color-celadon: #6b8f71;
  --color-celadon-dark: #4a6b50;
  --color-gold: #c9a962;
  --color-gold-light: #e8d5a3;
  --color-accent: #d4845c;
  --color-white: #ffffff;
  --color-tag-dark: #2c2c2c;
  --color-tag-hot: #fff3e6;
  --color-tag-hot-text: #e07a2e;
  --font-serif: 'Songti SC', 'STSong', 'SimSun', serif;
  --font-sans: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans CJK SC', sans-serif;
  --header-h: 52px;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 4px 24px rgba(44, 44, 44, 0.08);
  --shadow-lg: 0 8px 40px rgba(44, 44, 44, 0.12);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== 重置 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.7;
  color: var(--color-ink);
  background: var(--color-bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
strong { font-weight: 600; color: var(--color-ink); }

.container {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== 顶部导航 ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(250, 247, 242, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(201, 169, 98, 0.15);
  transition: background var(--transition), box-shadow var(--transition);
}
.site-header.scrolled {
  background: rgba(250, 247, 242, 0.95);
  box-shadow: var(--shadow);
}
.header-inner {
  max-width: 480px;
  margin: 0 auto;
  height: 100%;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.brand-main {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 700;
  color: var(--color-ink);
  letter-spacing: 0.05em;
}
.brand-sub {
  font-family: var(--font-serif);
  font-size: 13px;
  color: var(--color-celadon-dark);
  letter-spacing: 0.1em;
}
.nav-links {
  display: flex;
  gap: 16px;
}
.nav-links a {
  font-size: 13px;
  color: var(--color-ink-light);
  transition: color var(--transition);
}
.nav-links a:hover { color: var(--color-celadon-dark); }

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100svh;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  padding-bottom: 60px;
  touch-action: pan-y;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.hero-bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}
.hero-distort-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.hero.distorting .hero-distort-canvas {
  opacity: 1;
}
.hero-water-canvas {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  touch-action: none;
  pointer-events: auto;
}
.hero.revealed .hero-water-canvas {
  pointer-events: none;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(44, 44, 44, 0.15) 0%,
    rgba(44, 44, 44, 0.35) 50%,
    rgba(44, 44, 44, 0.75) 100%
  );
}
.hero-content {
  position: relative;
  z-index: 4;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 0 24px;
  color: var(--color-white);
  pointer-events: none;
  transition: opacity 0.6s ease, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.hero-content a {
  pointer-events: auto;
}
.hero.parting .hero-content {
  opacity: 0;
  transform: translateY(-24px);
}
.hero-badge {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.12em;
  padding: 4px 12px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 20px;
  margin-bottom: 16px;
  backdrop-filter: blur(4px);
}
.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(36px, 10vw, 48px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}
.title-dot {
  color: var(--color-gold-light);
  margin: 0 4px;
}
.hero-tagline {
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--color-gold-light);
  letter-spacing: 0.2em;
  margin-bottom: 12px;
}
.hero-desc {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 28px;
  max-width: 280px;
}

/* 滑动提示 */
.hero-swipe-hint {
  position: absolute;
  bottom: 72px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  text-align: center;
  pointer-events: none;
  transition: opacity 0.5s ease;
}
.hero-swipe-hint p {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.15em;
  margin-top: 10px;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
}
.swipe-ripple {
  display: block;
  width: 36px;
  height: 36px;
  margin: 0 auto;
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  position: relative;
  animation: swipe-ripple-pulse 2.2s ease-in-out infinite;
}
.swipe-ripple::before {
  content: '';
  position: absolute;
  inset: -8px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  animation: swipe-ripple-pulse 2.2s ease-in-out 0.4s infinite;
}
.swipe-ripple::after {
  content: '↑';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
  animation: swipe-finger-up 2.2s ease-in-out infinite;
}
@keyframes swipe-ripple-pulse {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.15); opacity: 0.5; }
}
@keyframes swipe-finger-up {
  0%, 100% { transform: translateY(4px); opacity: 0.6; }
  50% { transform: translateY(-4px); opacity: 1; }
}
.hero.parting .hero-swipe-hint,
.hero.revealed .hero-swipe-hint {
  opacity: 0;
}

.hero-scroll {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  transition: opacity 0.5s ease;
}
.hero.parting .hero-scroll,
.hero.revealed .hero-scroll {
  opacity: 0;
}
.hero-scroll span {
  display: block;
  width: 20px;
  height: 32px;
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  border-radius: 10px;
  position: relative;
}
.hero-scroll span::after {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 6px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 2px;
  animation: scroll-dot 2s infinite;
}
@keyframes scroll-dot {
  0%, 100% { opacity: 1; top: 6px; }
  50% { opacity: 0.3; top: 14px; }
}

/* ===== 通用 Section ===== */
.section {
  padding: 64px 0;
}
.section-header {
  text-align: center;
  margin-bottom: 40px;
}
.section-label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: 8px;
}
.section-label.light { color: var(--color-gold-light); }
.section-header h2 {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}
.section-intro {
  font-size: 14px;
  color: var(--color-ink-muted);
  max-width: 320px;
  margin: 0 auto;
}

/* ===== 创办故事 ===== */
.story { background: var(--color-white); }
.story-timeline {
  position: relative;
  padding-left: 20px;
}
.story-timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(to bottom, var(--color-gold-light), var(--color-celadon));
}
.story-block {
  position: relative;
  padding-left: 24px;
  margin-bottom: 40px;
}
.story-block:last-child { margin-bottom: 0; }
.story-block::before {
  content: '';
  position: absolute;
  left: -25px;
  top: 8px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-gold);
  border: 2px solid var(--color-white);
  box-shadow: 0 0 0 2px var(--color-gold-light);
}
.story-year {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--color-celadon-dark);
  margin-bottom: 8px;
  letter-spacing: 0.05em;
}
.story-body h3 {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 10px;
  letter-spacing: 0.04em;
}
.story-body p {
  font-size: 14px;
  color: var(--color-ink-light);
  margin-bottom: 10px;
}
.story-body p:last-child { margin-bottom: 0; }
.story-body em {
  font-style: normal;
  color: var(--color-celadon-dark);
  font-family: var(--font-serif);
}

/* ===== 文化 ===== */
.culture {
  position: relative;
  min-height: 360px;
  display: flex;
  align-items: center;
  padding: 80px 0;
}
.culture-bg {
  position: absolute;
  inset: 0;
}
.culture-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.culture-overlay {
  position: absolute;
  inset: 0;
  background: rgba(44, 44, 44, 0.72);
}
.culture-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--color-white);
}
.culture-content h2 {
  font-family: var(--font-serif);
  font-size: 26px;
  margin-bottom: 20px;
  letter-spacing: 0.06em;
}
.culture-content blockquote {
  font-family: var(--font-serif);
  font-size: 15px;
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 28px;
  font-style: normal;
}
.culture-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.culture-tags span {
  font-size: 12px;
  padding: 6px 14px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  letter-spacing: 0.06em;
}

/* ===== 招牌菜 ===== */
.dishes { background: var(--color-bg); }

.dish-feature {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  margin-bottom: 24px;
}
.dish-feature-img {
  aspect-ratio: 16 / 10;
  overflow: hidden;
}
#dish-feature-stack {
  width: 100%;
  height: 100%;
  min-height: 200px;
  background: linear-gradient(135deg, #f0ebe3 0%, #e8dfd2 100%);
}

/* 招牌菜主推卡片堆（无需构建工具的纯原生实现） */
#dish-feature-stack.dish-stack {
  position: relative;
  overflow: hidden;
  touch-action: pan-y;
}
#dish-feature-stack .dish-stack-card {
  position: absolute;
  inset: 0;
  border-radius: 0;
  overflow: hidden;
  transform-origin: 50% 60%;
  transition: transform 0.35s ease, opacity 0.25s ease;
  will-change: transform, opacity;
}
#dish-feature-stack .dish-stack-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
#dish-feature-stack .dish-stack-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 12px;
  line-height: 1;
  padding: 7px 10px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  pointer-events: none;
}
.dish-feature-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 10px 0 2px;
  background: var(--color-white);
}
.dish-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid #1f1f1f;
  background: transparent;
  transition: transform 0.2s ease, background-color 0.2s ease;
}
.dish-dot.active {
  background: #1f1f1f;
  transform: scale(1.05);
}
.dish-feature-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.dish-feature-body { padding: 20px; }
.dish-feature-body h3 {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  margin: 8px 0;
  letter-spacing: 0.04em;
}
.dish-quote {
  font-size: 13px;
  color: var(--color-ink-muted);
  margin-bottom: 16px;
}

.dish-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tag {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 500;
}
.tag-primary { background: var(--color-accent); color: var(--color-white); }
.tag-dark { background: var(--color-tag-dark); color: var(--color-white); }
.tag-new { background: var(--color-celadon); color: var(--color-white); }
.tag-hot {
  background: var(--color-tag-hot);
  color: var(--color-tag-hot-text);
}

.dish-wiki {
  display: flex;
  gap: 10px;
  padding: 14px;
  background: var(--color-bg-warm);
  border-radius: var(--radius);
  margin-top: 12px;
}
.dish-wiki.compact {
  padding: 10px 12px;
  margin-top: 10px;
}
.dish-wiki.compact p {
  font-size: 12px;
  color: var(--color-ink-light);
  line-height: 1.6;
}
.wiki-icon { font-size: 16px; flex-shrink: 0; }
.dish-wiki strong {
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
  color: var(--color-ink);
}
.dish-wiki p {
  font-size: 13px;
  color: var(--color-ink-light);
  line-height: 1.65;
}

.dish-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dish-card {
  display: flex;
  gap: 14px;
  background: var(--color-white);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
  transition: transform var(--transition);
}
.dish-card:active { transform: scale(0.99); }
.dish-card-img {
  flex-shrink: 0;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  overflow: hidden;
}
.dish-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.dish-card-body { flex: 1; min-width: 0; }
.dish-card-body h3 {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 600;
  margin: 6px 0 4px;
}
.dish-card-body > p {
  font-size: 13px;
  color: var(--color-ink-muted);
  line-height: 1.5;
}

.dishes-note {
  text-align: center;
  font-size: 12px;
  color: var(--color-ink-muted);
  margin-top: 32px;
}

/* ===== 环境 ===== */
.environment { background: var(--color-white); }
.env-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 28px;
}
.env-item {
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}
.env-item-large {
  grid-column: 1 / -1;
}
.env-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.env-item-large img { aspect-ratio: 16 / 10; }
.env-item figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px 12px 10px;
  font-size: 11px;
  color: var(--color-white);
  background: linear-gradient(transparent, rgba(0,0,0,0.6));
  letter-spacing: 0.04em;
}
.env-features {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.env-feature {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--color-ink-light);
  padding: 8px 14px;
  background: var(--color-bg);
  border-radius: 20px;
}
.env-icon { font-size: 15px; }

/* ===== 联系 ===== */
.contact { background: var(--color-bg-warm); }
.contact-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-lg);
}
.contact-row {
  margin-bottom: 20px;
}
.contact-row:last-of-type { margin-bottom: 28px; }
.contact-label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--color-gold);
  text-transform: uppercase;
  margin-bottom: 4px;
}
.contact-row p {
  font-size: 15px;
  color: var(--color-ink);
  line-height: 1.6;
}
.contact-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 28px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: transform var(--transition), opacity var(--transition);
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: var(--color-celadon-dark);
  color: var(--color-white);
}
.btn-secondary {
  background: transparent;
  color: var(--color-ink);
  border: 1.5px solid var(--color-gold-light);
}

/* ===== Footer ===== */
.site-footer {
  padding: 40px 0 48px;
  text-align: center;
  background: var(--color-ink);
  color: rgba(255, 255, 255, 0.7);
}
.footer-brand {
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--color-white);
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}
.footer-slogan {
  font-family: var(--font-serif);
  font-size: 13px;
  color: var(--color-gold-light);
  letter-spacing: 0.15em;
  margin-bottom: 16px;
}
.footer-demo {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
}

/* ===== 滚动动画 ===== */
/* 无 JS（如 file:// 双击打开）时保持可见；有 JS 再启用渐入 */
html.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
html.js .reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== 安全区 ===== */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .site-footer { padding-bottom: calc(48px + env(safe-area-inset-bottom)); }
  .hero { padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
}
