/* style.css — 赣菜菜谱大全 首页
   设计基准 1440px；模块高度按 03-ui/home-ui-desktop.png 量稿预算落位（见 03-ui/compare-log.md）。
   排版：标题衬线（宋），正文黑体；砖红 #a81818 为唯一强调色。 */

:root {
  /* 底色 */
  --bg: #fbf3eb;
  --bg-header: #f8ede4;
  --bg-warm: #f7dbb9;
  --bg-row: #f6ebdd;

  /* 文字 */
  --ink: #281305;
  --ink-soft: #5b4436;
  --ink-muted: #8a7362;
  --ink-invert: #fdf6ec;

  /* 强调 */
  --accent: #a81818;
  --accent-deep: #961d14;
  --accent-footer: #951d14;

  /* 线条 */
  --line: #e6d8c9;

  /* 排版 */
  --font-serif: 'Songti SC',SimSun,'Noto Serif SC',Georgia,serif;
  --font-sans: 'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;

  /* 尺寸 */
  --wrap: 1440px;
  --gutter: 40px;
  --header-h: 84px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

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: 14px;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; text-decoration: none; }

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  margin: 0;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

p { margin: 0; }

ul, ol { margin: 0; padding: 0; list-style: none; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 10px 18px;
  z-index: 99;
}
.skip-link:focus { left: 12px; top: 12px; }

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

/* ---------------------------------------------------------------- header 0–84 */
.site-header {
  height: var(--header-h);
  background: var(--bg-header);
  position: sticky;
  top: 0;
  z-index: 40;
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex-shrink: 0;
  line-height: 1.1;
}
.brand-name {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.05em;
}
.brand-en {
  font-size: 8.5px;
  letter-spacing: 0.24em;
  color: var(--ink-muted);
  margin-top: 4px;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
  font-size: 13px;
}
.primary-nav a {
  position: relative;
  padding: 3px 0;
  color: var(--ink-soft);
  white-space: nowrap;
}
.primary-nav a:hover { color: var(--accent); }
.primary-nav a[aria-current="page"] { color: var(--accent); }
.primary-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--accent);
}

.header-cta {
  flex-shrink: 0;
  background: var(--accent);
  color: #fdf6ec;
  font-size: 12.5px;
  letter-spacing: 0.08em;
  padding: 9px 22px;
  border-radius: 1px;
}
.header-cta:hover { background: var(--accent-deep); }

/* ------------------------------------------------------------------ hero 84–508 */
.hero {
  position: relative;
  height: 424px;
  overflow: hidden;
  isolation: isolate;
}
.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 58%;
  filter: brightness(1.9) saturate(1.02);
  z-index: -2;
}
.hero-veil {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(30, 14, 6, 0.68) 0%, rgba(30, 14, 6, 0.5) 34%, rgba(30, 14, 6, 0.04) 60%, rgba(30, 14, 6, 0.12) 100%),
    linear-gradient(180deg, rgba(24, 11, 5, 0.1) 0%, rgba(24, 11, 5, 0) 40%, rgba(24, 11, 5, 0.3) 100%);
}

.hero-inner {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 28px 90px 0;
}

.hero-copy {
  width: 700px;
  max-width: 100%;
  margin-left: 11px;
  color: var(--ink-invert);
}
.hero-eyebrow {
  font-size: 10px;
  letter-spacing: 0.34em;
  color: #e0bd99;
  margin-bottom: 12px;
}
.hero-kicker {
  font-family: var(--font-serif);
  font-size: 25px;
  line-height: 1.2;
  letter-spacing: 0.18em;
  color: #f6e2cd;
  margin-bottom: 6px;
}
.hero h1 {
  font-size: 66px;
  line-height: 1.06;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}
.hero-punch {
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.5;
  letter-spacing: 0.05em;
  color: #fbe9d6;
  margin-bottom: 12px;
  max-width: 660px;
}
.hero-lede {
  font-size: 13px;
  line-height: 1.9;
  color: rgba(253, 242, 228, 0.88);
  max-width: 690px;
  margin-top: 0;
}

.hero-bar {
  position: absolute;
  left: 90px;
  right: 90px;
  bottom: 24px;
  height: 52px;
  background: var(--bg-warm);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 22px;
}
.hero-stats {
  display: flex;
  align-items: center;
  gap: 34px;
  font-size: 12px;
  color: #4a3320;
}
.hero-stats em {
  font-family: var(--font-serif);
  font-style: normal;
  font-size: 19px;
  color: var(--accent);
  margin-right: 5px;
  vertical-align: -2px;
}
.hero-actions { display: flex; align-items: center; gap: 10px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 20px;
  font-size: 12.5px;
  letter-spacing: 0.06em;
  border-radius: 1px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn-solid { background: var(--accent); color: #fdf6ec; }
.btn-solid:hover { background: var(--accent-deep); }
.btn-line { border-color: rgba(58, 29, 12, 0.45); color: #3a1d0c; }
.btn-line:hover { border-color: var(--accent); color: var(--accent); }

/* --------------------------------------------------------------- catalog 508–885 */
.catalog { padding-top: 20px; padding-bottom: 59px; }

.catalog-head {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 16px;
}
.catalog-head h2 {
  font-size: 27px;
  letter-spacing: 0.06em;
  padding-bottom: 10px;
  margin-bottom: 12px;
  position: relative;
}
.catalog-head h2::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 34px;
  height: 2px;
  margin-left: -17px;
  background: var(--accent);
}
.catalog-head p {
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1.8;
}

.cat-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 40px;
  align-items: start;
}

.cat-card { display: flex; flex-direction: column; }
.cat-num {
  font-family: var(--font-serif);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.12em;
  line-height: 1;
}
.cat-name {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-top: 5px;
  margin-bottom: 8px;
}
.cat-thumb {
  display: block;
  overflow: hidden;
  aspect-ratio: 1.8 / 1;
  background: var(--bg-row);
  border-radius: 2px;
}
.cat-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}
.cat-card:hover .cat-thumb img { transform: scale(1.05); }
.cat-desc {
  font-size: 11.5px;
  line-height: 1.66;
  color: var(--ink-soft);
  margin-top: 9px;
}

/* ---------------------------------------------------------------- method 885–1230 */
.method { padding-top: 0; }

.method-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
  padding: 6px 0 8px;
}
.method-head h2 {
  font-size: 24px;
  letter-spacing: 0.06em;
  margin-bottom: 7px;
}
.method-head p {
  font-size: 11.5px;
  color: var(--ink-soft);
  line-height: 1.75;
}

.method-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 12.5px;
}
.method-table col:nth-child(1) { width: 16%; }
.method-table col:nth-child(2) { width: 28%; }
.method-table col:nth-child(3) { width: 30%; }
.method-table col:nth-child(4) { width: 26%; }
.method-table thead th {
  background: var(--accent-deep);
  color: #fdf3e7;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-align: left;
  height: 38px;
  padding: 0 24px;
}
.method-table thead th:first-child { padding-left: var(--gutter); }
.method-table thead th:last-child { padding-right: var(--gutter); }
.method-table tbody th,
.method-table tbody td {
  text-align: left;
  height: 36px;
  padding: 5px 24px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  vertical-align: middle;
  line-height: 1.35;
}
.method-table tbody th:first-child,
.method-table tbody td:first-child { padding-left: var(--gutter); }
.method-table tbody th:last-child,
.method-table tbody td:last-child { padding-right: var(--gutter); }
.method-table tbody th {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  letter-spacing: 0.1em;
}
.method-table tbody tr:hover { background: var(--bg-row); }

/* -------------------------------------------------------------- featured 1230–1560 */
.featured { padding-top: 18px; }

.section-head {
  text-align: center;
  margin: 0 auto 39px;
  max-width: 780px;
}
.section-head h2 {
  font-size: 22px;
  color: var(--accent);
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}
.section-head p {
  font-size: 11.5px;
  color: var(--ink-soft);
  line-height: 1.75;
}

.dish-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.dish-card { display: flex; flex-direction: column; }
.dish-thumb {
  display: block;
  overflow: hidden;
  aspect-ratio: 10 / 3.2;
  background: var(--bg-row);
  border-radius: 2px;
}
.dish-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.dish-card:hover .dish-thumb img { transform: scale(1.05); }
.dish-body { display: flex; flex-direction: column; padding-top: 16px; min-height: 105px; }
.dish-name {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}
.dish-desc {
  font-size: 11.5px;
  line-height: 1.72;
  color: var(--ink-soft);
}
.dish-spec {
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.04em;
  margin-top: 8px;
}
.dish-card:hover .dish-name { color: var(--accent); }

/* ----------------------------------------------------------------- steps 1560–1780 */
.steps { padding-top: 30px; }

.step-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 42px;
  padding-top: 8px;
}
.step-num {
  font-family: var(--font-serif);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.16em;
  display: block;
  line-height: 1;
}
.step h3 {
  font-size: 15px;
  letter-spacing: 0.05em;
  margin: 9px 0 7px;
}
.step p {
  font-size: 11.5px;
  line-height: 1.72;
  color: var(--ink-soft);
}

/* ------------------------------------------------------- notes + editorial 1780–2034 */
.notes-band {
  display: grid;
  grid-template-columns: 460px 30px 240px 20px minmax(0, 1fr);
  column-gap: 0;
  padding-top: 36px;
  align-items: start;
}

.notes { grid-column: 1; }
.notes h2 {
  font-size: 17px;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 7px;
}
.notes-lede {
  font-size: 10.5px;
  color: var(--ink-muted);
  line-height: 1.7;
  margin-bottom: 10px;
}
.note-list { display: flex; flex-direction: column; gap: 6px; }
.note-list h3 {
  font-size: 12px;
  letter-spacing: 0.02em;
  margin-bottom: 1px;
}
.note-list p {
  font-size: 10px;
  line-height: 1.6;
  color: var(--ink-soft);
}

.notes-photo { grid-column: 3; margin: 0; }
.notes-photo img {
  width: 100%;
  height: auto;
  aspect-ratio: 24 / 17;
  object-fit: cover;
  border-radius: 2px;
}

.editorial { grid-column: 5; }
.editorial h2 {
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: 12px;
  margin-bottom: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin-bottom: 8px;
}
.editorial p {
  font-size: 10.5px;
  line-height: 1.75;
  color: var(--ink-muted);
}
.editorial-links {
  grid-column: 1 / -1;
  display: flex;
  gap: 26px;
  justify-content: flex-start;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin-top: 16px;
}
.editorial-links a {
  font-size: 11.5px;
  color: var(--accent);
  border-bottom: 1px solid rgba(168, 24, 24, 0.3);
  padding-bottom: 1px;
}
.editorial-links a:hover { border-bottom-color: var(--accent); }

/* ---------------------------------------------------------------- footer 2034–2160 */
.site-footer {
  margin-top: 26px;
  background: var(--accent-footer);
  color: var(--ink-invert);
  padding: 16px 0 10px;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 22px 32px;
}
.footer-col {
  flex: 1 1 180px;
  min-width: 170px;
}
.footer-brand {
  font-family: var(--font-serif);
  font-size: 18px;
  letter-spacing: 0.08em;
}
.footer-brand strong { font-weight: 600; }
.footer-en {
  font-size: 8.5px;
  letter-spacing: 0.3em;
  color: rgba(253, 246, 236, 0.6);
  margin-top: 6px;
}
.footer-col h2 {
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: 10px;
  letter-spacing: 0.22em;
  font-weight: 600;
  color: rgba(253, 246, 236, 0.58);
  margin-bottom: 8px;
}
.footer-col a {
  display: block;
  font-size: 11.5px;
  line-height: 1.95;
  color: rgba(253, 246, 236, 0.9);
}
.footer-col a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.footer-note {
  font-size: 10.5px;
  color: rgba(253, 246, 236, 0.68);
  line-height: 1.75;
}
.footer-icp {
  margin-top: 6px;
  font-size: 10.5px;
  color: rgba(253, 246, 236, 0.68);
}
.footer-legal {
  border-top: 1px solid rgba(253, 246, 236, 0.18);
  margin-top: 14px;
  padding-top: 10px;
  font-size: 10px;
  color: rgba(253, 246, 236, 0.6);
}

/* ------------------------------------------------------------ responsive */
@media (max-width: 1280px) {
  .hero h1 { font-size: 46px; }
  .cat-grid { gap: 24px; }
  .cat-name { font-size: 15px; }
}

@media (max-width: 1024px) {
  :root { --gutter: 26px; }
  .primary-nav { gap: 14px; font-size: 12.5px; }
  .header-cta { padding: 8px 16px; }
  .hero { height: auto; min-height: 380px; }
  .hero-inner { padding: 28px 0 92px; }
  .hero-copy { margin-left: 0; }
  .hero-lede { font-size: 12.5px; }
  .hero-bar { left: 26px; right: 26px; height: auto; padding: 12px 18px; flex-direction: column; align-items: flex-start; gap: 10px; }
  .hero-stats { gap: 20px; flex-wrap: wrap; }
  .cat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .dish-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dish-thumb { aspect-ratio: 16 / 6; }
  .step-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  .notes-band { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 26px; }
  .notes { grid-column: 1 / -1; }
  .notes-photo { grid-column: 1; margin-top: 18px; }
  .editorial { grid-column: 2; margin-top: 18px; align-self: start; }
  .editorial p { font-size: 11.5px; }
  .footer-col { flex: 1 1 40%; }
}

@media (max-width: 900px) {
  /* 无汉堡按钮：导航常显，横向滚动容纳全部二级分类 */
  .site-header { height: auto; min-height: var(--header-h); }
  .header-inner {
    height: auto;
    min-height: var(--header-h);
    flex-wrap: wrap;
    padding-top: 10px;
    padding-bottom: 10px;
    gap: 8px 16px;
  }
  .primary-nav {
    order: 3;
    width: 100%;
    margin-left: 0;
    gap: 16px;
    font-size: 12.5px;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }
  .primary-nav::-webkit-scrollbar { height: 0; }
  .header-cta { margin-left: auto; }
}

@media (max-width: 768px) {
  .hero h1 { font-size: 38px; }
  .hero-punch { font-size: 15px; }
  .hero-copy { width: 100%; }
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .method-table { font-size: 11.5px; }
  .method-table thead th { height: 40px; padding: 0 10px; font-size: 12px; }
  .method-table tbody th, .method-table tbody td { height: auto; padding: 8px 10px; }
  .method-table thead th:first-child, .method-table tbody th:first-child, .method-table tbody td:first-child { padding-left: 10px; }
  .method-table thead th:last-child, .method-table tbody td:last-child { padding-right: 10px; }
  .section-head h2 { font-size: 18px; }
  .catalog-head h2 { font-size: 22px; }
  .notes-band { grid-template-columns: minmax(0, 1fr); }
  .notes, .notes-photo, .editorial { grid-column: 1 / -1; }
  .notes-photo { margin-top: 18px; }
  .editorial { margin-top: 18px; }
  .footer-inner { flex-direction: column; gap: 18px; }
  .footer-col { flex: 1 1 100%; min-width: 0; }
}

@media (max-width: 480px) {
  :root { --gutter: 18px; }
  .hero h1 { font-size: 31px; }
  .dish-grid, .step-grid, .cat-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-stats { flex-direction: column; align-items: flex-start; gap: 4px; }
  .hero-bar { left: 18px; right: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}
