/* ==========================================================================
   滇菜菜谱大全 · 首页样式
   基准：1440px 设计宽，内容容器 1440（左右 34px 内边距）
   视觉基线：03-ui/home-ui-desktop.png（米白纸底 #fef7ed + 墨绿 #274029 + 橄榄 #5a660c + 赭金 #c9a161）
   ========================================================================== */

:root {
  /* 底色层级 */
  --bg: #fef7ed;
  --bg-card: #fbfbf7;
  --bg-warm: #f4e6d1;
  --bg-deep: #274029;

  /* 文字 */
  --ink: #2a221a;
  --ink-strong: #1c120a;
  --ink-muted: #5b5853;
  --ink-faint: #8b8478;
  --ink-invert: #fef7ed;

  /* 滇味色系 */
  --green-deep: #274029;
  --green-mid: #3c5a36;
  --green-table: #435e3c;
  --green-wash: #e8dfc8;
  --accent: #5a660c;
  --accent-soft: #8d971c;
  --gold: #c9a161;
  --gold-soft: #e2c893;

  /* 分隔 */
  --line: rgba(90, 74, 40, 0.16);
  --line-soft: rgba(90, 74, 40, 0.1);
  --line-table: #e3ddce;

  /* 排版 */
  --font-sans: 'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  --container: 1440px;
  --gutter: 34px;
  --header-h: 72px;
  --radius: 5px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: 13.5px;
  line-height: 1.58;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0; }

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

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------------------------------------------------------------- header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--header-h);
  background: var(--bg);
  border-bottom: 1px solid var(--line-soft);
  transition: box-shadow 0.2s ease;
}

.site-header.is-scrolled { box-shadow: 0 4px 18px rgba(60, 48, 24, 0.08); }

.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: var(--header-h);
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.brand { display: inline-flex; align-items: center; gap: 9px; flex: none; }
.brand-mark { width: 26px; height: 26px; color: var(--green-deep); flex: none; }

.brand-name {
  font-size: 19px;
  font-weight: 900;
  letter-spacing: 0.4px;
  color: var(--ink-strong);
  white-space: nowrap;
}

.brand-tag {
  font-size: 9.5px;
  letter-spacing: 1.4px;
  color: var(--ink-faint);
  padding-left: 9px;
  border-left: 1px solid var(--line);
  white-space: nowrap;
}

.nav-label {
  margin-left: 30px;
  font-size: 11px;
  letter-spacing: 1.6px;
  color: var(--ink-faint);
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  flex: 1;
  min-width: 0;
}

.site-nav a {
  font-size: 12.5px;
  color: #4a4038;
  white-space: nowrap;
  padding: 6px 0;
  border-bottom: 1.5px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a[aria-current="page"] {
  color: var(--accent);
  border-bottom-color: var(--accent-soft);
}

.header-cta {
  flex: none;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent);
  border-bottom: 2px solid var(--accent-soft);
  padding: 3px 0 2px;
  margin-left: 8px;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  width: 40px;
  height: 36px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 4px 0;
  background: var(--green-deep);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ------------------------------------------------------------------ hero */
.hero {
  position: relative;
  height: 423px;
  overflow: hidden;
  background: #2a1c10;
  color: #fff;
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 58% 44%;
  filter: brightness(2.7) saturate(1.06);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(24, 16, 6, 0.86) 0%, rgba(24, 16, 6, 0.8) 15%, rgba(24, 16, 6, 0.52) 26%, rgba(26, 18, 8, 0.2) 38%, rgba(30, 22, 10, 0.05) 52%, rgba(30, 22, 10, 0) 68%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  height: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 35px;
}

.hero-copy { max-width: 660px; padding-top: 24px; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  letter-spacing: 2.2px;
  color: #f3ecdc;
}

.eyebrow svg { width: 22px; height: 16px; color: var(--gold-soft); flex: none; }

.eyebrow .eyebrow-cn { letter-spacing: 2px; color: var(--gold-soft); }

.eyebrow-line {
  display: inline-block;
  width: 62px;
  height: 1px;
  margin-left: 2px;
  background: rgba(255, 255, 255, 0.4);
}

.hero h1 {
  margin: 14px 0 0;
  font-size: 66px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 2px;
  text-shadow: 0 2px 26px rgba(0, 0, 0, 0.28);
}

.hero-lead {
  margin-top: 12px;
  font-size: 44px;
  line-height: 1.14;
  font-weight: 900;
  letter-spacing: 0.6px;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.22);
}

.hero-lead .accent { color: var(--gold-soft); }

.hero-desc {
  max-width: 600px;
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.72;
  color: rgba(255, 255, 255, 0.84);
}

.hero-desc + .hero-desc { margin-top: 5px; }

.hero-stats {
  display: flex;
  align-items: center;
  gap: 24px;
  margin: 14px 0 13px;
  font-size: 12px;
  color: #eadfc8;
}

.hero-stats li { display: inline-flex; align-items: center; gap: 7px; }
.hero-stats svg { width: 15px; height: 15px; color: var(--gold-soft); flex: none; }

.hero-actions { display: flex; gap: 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 20px;
  border-radius: var(--radius);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.btn svg { width: 15px; height: 15px; }
.btn:hover { transform: translateY(-1px); }

.btn-primary { background: var(--accent-soft); color: #1c120a; }
.btn-primary:hover { background: var(--gold-soft); }

.btn-ghost { border: 1px solid rgba(255, 255, 255, 0.5); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.14); }

/* --------------------------------------------------------------- section */
.section { position: relative; }

.section-head { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; }

.section-head h2 {
  position: relative;
  padding-left: 40px;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: -0.2px;
  color: var(--ink-strong);
}

.section-head h2::before {
  content: attr(data-num);
  position: absolute;
  left: 0;
  top: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 25px;
  border-radius: 3px;
  background: var(--green-deep);
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.4px;
}

.section-sub {
  flex: 1 1 260px;
  min-width: 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-muted);
}

/* ------------------------------------------------------ category-index */
.cat-section { padding: 14px 0 0; }

.cat-section .section-head { align-items: flex-start; }

.cat-section .section-sub { padding-top: 2px; }

.cat-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 22px;
  margin-top: 12px;
}

.cat-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.cat-thumb {
  width: 100%;
  height: 90px;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-warm);
}

.cat-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.cat-card:hover .cat-thumb img { transform: scale(1.05); }

.cat-top {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-top: 8px;
  width: 100%;
}

.cat-num {
  flex: none;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: var(--accent-soft);
}

.cat-name {
  font-size: 13.5px;
  font-weight: 800;
  line-height: 1.3;
  color: var(--ink-strong);
}

.cat-desc {
  margin-top: 3px;
  font-size: 10.5px;
  line-height: 1.44;
  color: var(--ink-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --------------------------------------------------------- flavor-table */
.flavor-section { padding: 40px 0 0; }

.flavor-section .section-head { row-gap: 0; }
.flavor-section .section-sub { min-width: 0; }

.flavor-table {
  width: 100%;
  margin-top: 30px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 11.5px;
}

.flavor-table thead th {
  height: 45px;
  padding: 0 16px;
  background: var(--green-table);
  color: #f4efe2;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-align: left;
}

.flavor-table thead th:first-child { padding-left: 22px; }

.flavor-table tbody th,
.flavor-table tbody td {
  height: 26px;
  padding: 0 16px;
  text-align: left;
  border-bottom: 1px solid var(--line-table);
  color: #40382c;
  line-height: 1.4;
}

.flavor-table tbody th { padding-left: 22px; font-weight: 800; color: var(--ink-strong); }
.flavor-table tbody tr:nth-child(odd) { background: #f7ebd9; }
.flavor-table tbody tr:nth-child(even) { background: #f2ece1; }
.flavor-table tbody tr:last-child th,
.flavor-table tbody tr:last-child td { border-bottom: 0; }

.flavor-table a { color: var(--accent); border-bottom: 1px solid rgba(90, 102, 12, 0.4); }

/* ------------------------------------------------------ featured dishes */
.featured-section { padding: 58px 0 36px; }

.featured-section .section-head { row-gap: 0; }
.featured-section .section-sub { min-width: 0; }

.featured-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 18px;
}

.dish-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.dish-thumb {
  aspect-ratio: 2 / 1;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-warm);
}

.dish-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.dish-card:hover .dish-thumb img { transform: scale(1.04); }

.dish-body { padding: 18px 0 0; }
.dish-body h3 { font-size: 15.5px; font-weight: 800; color: var(--ink-strong); }

.dish-body p {
  margin-top: 9px;
  font-size: 11.5px;
  line-height: 1.8;
  color: var(--ink-muted);
}

.dish-specs {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 16px;
  font-size: 11px;
  color: #6a6152;
}

.dish-specs .dot { color: #c0b49c; }

/* ------------------------------------------------------------ steps */
.steps-section { padding: 60px 0 6px; }

.steps-section .section-head { row-gap: 0; }
.steps-section .section-sub { min-width: 0; }

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px;
  margin-top: 32px;
}

.step { position: relative; padding-left: 0; }

.step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--green-deep);
  color: var(--gold);
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.4px;
}

.step h3 { margin-top: 15px; font-size: 15px; font-weight: 800; color: var(--ink-strong); line-height: 1.4; }
.step p { margin-top: 7px; font-size: 12px; line-height: 1.72; color: var(--ink-muted); }

/* -------------------------------------------------------- kitchen notes */
.notes-section { padding: 31px 0 28px; }

.notes-section .section-head { row-gap: 0; }
.notes-section .section-sub { min-width: 0; }

.notes-grid {
  display: grid;
  grid-template-columns: 1fr 622px;
  gap: 44px;
  align-items: start;
  margin-top: 18px;
}

.note-item { display: flex; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line-soft); }
.note-item:first-child { padding-top: 0; }
.note-item:last-child { border-bottom: 0; }

.note-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: #fdf8ec;
}

.note-icon svg { width: 16px; height: 16px; }

.note-item h3 { font-size: 14.5px; font-weight: 800; color: var(--ink-strong); line-height: 1.35; }
.note-item p { margin-top: 4px; font-size: 12.5px; line-height: 1.66; color: var(--ink-muted); }

.editorial-panel {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 22px 22px;
  background: #f9ebd5;
  border-radius: var(--radius);
}

.editorial-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 24px;
  height: 24px;
  border: 1.5px solid var(--green-deep);
  border-radius: 50%;
  color: var(--green-deep);
  font-size: 13px;
  font-weight: 800;
  font-style: normal;
}

.editorial-title { font-size: 14px; font-weight: 800; color: var(--ink-strong); margin-bottom: 5px; }
.editorial-panel p { font-size: 11.5px; line-height: 1.72; color: #4e4436; }

/* --------------------------------------------------------------- footer */
.site-footer {
  min-height: 169px;
  padding: 22px 0 20px;
  background: var(--green-deep);
  color: #d9dfcf;
}

.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.footer-top { display: flex; align-items: center; gap: 12px; }
.footer-brand { display: inline-flex; align-items: center; gap: 9px; }
.footer-brand .brand-mark { color: #dfe6d4; width: 24px; height: 24px; }
.footer-brand .brand-name { font-size: 18px; color: #f2f4ea; }
.footer-tag {
  font-size: 9.5px;
  letter-spacing: 1.3px;
  color: #a9b39c;
  padding-left: 9px;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  white-space: nowrap;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  margin-top: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 12px;
  color: #c4cdb8;
}

.footer-label { color: #fff; font-weight: 800; letter-spacing: 1px; }
.footer-nav a { color: #c4cdb8; transition: color 0.15s ease; }
.footer-nav a:hover { color: var(--gold-soft); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 11px;
}

.footer-note { font-size: 11.5px; line-height: 1.7; color: #b0bba3; }
.copyright { font-size: 11.5px; color: #97a389; white-space: nowrap; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1180px) {
  .brand-tag, .nav-label { display: none; }
  .site-nav { gap: 15px; }
  .site-nav a { font-size: 12px; }
  .cat-grid { grid-template-columns: repeat(4, 1fr); }
  .notes-grid { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 980px) {
  .header-inner { gap: 12px; }
  .site-nav { display: none; }
  .site-nav.is-open {
    display: flex;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 6px var(--gutter) 14px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(60, 48, 24, 0.12);
  }
  .site-nav.is-open a { width: 100%; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
  .menu-toggle { display: block; }
  .hero { height: auto; min-height: 430px; padding: 34px 0 34px; }
  .hero-inner { padding: 0 32px; }
  .hero h1 { font-size: 58px; }
  .hero-lead { font-size: 34px; }
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .featured-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .steps { grid-template-columns: repeat(2, 1fr); gap: 24px; }
}

@media (max-width: 640px) {
  .container { padding: 0 18px; }
  .header-inner { padding: 0 18px; }
  .brand-name { font-size: 17px; }
  .hero { padding: 28px 0 30px; }
  .hero-inner { padding: 0 18px; }
  .hero h1 { font-size: 42px; }
  .hero-lead { font-size: 26px; }
  .hero-desc { font-size: 13px; }
  .hero-stats { flex-wrap: wrap; gap: 8px 16px; font-size: 11.5px; margin: 12px 0 12px; }
  .hero-actions { flex-wrap: wrap; }
  .section-head h2 { font-size: 20px; padding-left: 36px; }
  .section-head h2::before { width: 26px; height: 23px; font-size: 11px; }
  .section-sub { flex-basis: 100%; font-size: 11.5px; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .cat-thumb { height: 104px; }
  .featured-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 22px; }
  .flavor-table { font-size: 11px; }
  .flavor-table thead th, .flavor-table tbody th, .flavor-table tbody td { padding: 0 8px; }
  .flavor-table thead th { font-size: 11.5px; height: 38px; }
  .flavor-table-wrap { width: 100%; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .flavor-table { min-width: 560px; }
  .notes-grid { gap: 18px; }
  .footer-nav { gap: 8px 14px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 6px; }
}
