/* ==========================================================================
   粤菜菜谱大全 · style.css
   设计基线：03-ui/home-ui-desktop.png（1024×1536 → 1440×2160）
   分区预算见 03-ui/compare-log.md，勿随手改区块高度
   ========================================================================== */

:root{
  /* 面 */
  --bg: #f7e8d5;
  --surface: #faf2e2;
  --cream: #f9eeda;
  --cream-2: #f0e0c8;

  /* 墨 */
  --ink: #241a10;
  --body: #3d2f22;
  --muted: #6f5c49;
  --muted-2: #867461;
  --ink-invert: #fdf3e6;

  /* 强调 */
  --red: #97241d;
  --red-deep: #7d1a14;
  --red-soft: rgba(151,36,29,.10);
  --line: rgba(36,26,16,.16);
  --line-soft: rgba(36,26,16,.09);
  --shade: rgba(18,8,3,.62);

  /* 尺寸 */
  --wrap: 1368px;
  --gutter: max(36px, calc((100vw - var(--wrap)) / 2));
  /* 出血量：设计宽 1440 下正好到视口右缘，更宽的屏幕上保持在容器外 36px，不跟着视口无限拉伸 */
  --bleed: max(-36px, calc(-1 * (100vw - var(--wrap)) / 2));
  --header-h: 81px;
  --radius: 8px;
  --radius-lg: 12px;
  --pill: 999px;

  --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;
}

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

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

body{
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font: 400 15px/1.75 var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

img{ display: block; max-width: 100%; height: auto; }
a{ color: inherit; text-decoration: none; }
ul,ol,dl{ margin: 0; padding: 0; list-style: none; }
p{ margin: 0; }
h1,h2,h3{ margin: 0; font-family: var(--font-serif); color: var(--ink); font-weight: 700; }

.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;
}

.skip{
  position: absolute; left: -9999px; top: 0; z-index: 40;
  background: var(--ink); color: var(--ink-invert);
  padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip:focus{ left: 0; }

:where(a,button,summary,input):focus-visible{
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

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

/* ------------------------------------------------------------------ header */
.site-header{
  position: sticky; top: 0; z-index: 30;
  height: var(--header-h);
  background: var(--red);
  color: var(--ink-invert);
}
.header-inner{
  height: 100%;
  padding-inline: var(--gutter);
  max-width: none;
  display: flex; align-items: center; gap: 24px;
}
.brand{ display: flex; flex-direction: column; gap: 1px; flex: none; }
.brand-name{
  font-family: var(--font-serif); font-size: 19px; font-weight: 700;
  letter-spacing: .04em; color: var(--ink-invert);
}
.brand-kicker{
  font-size: 10px; letter-spacing: .28em; color: rgba(253,243,230,.66);
}

.nav{ display: flex; align-items: center; gap: 20px; margin-left: 8px; }
.nav a{
  font-size: 13px; color: rgba(253,243,230,.82);
  padding: 4px 0; border-bottom: 1px solid transparent;
  transition: color .18s ease, border-color .18s ease;
  white-space: nowrap;
}
.nav a:hover{ color: #fff; }
.nav a[aria-current="page"]{
  color: #fff; border-bottom-color: rgba(253,243,230,.75);
}

.nav-toggle{
  display: none; margin-left: auto;
  width: 40px; height: 40px; border: 1px solid rgba(253,243,230,.4); border-radius: 8px;
  background: transparent; cursor: pointer; padding: 0;
  flex-direction: column; align-items: center; justify-content: center; gap: 4px;
}
.nav-toggle span{ display: block; width: 16px; height: 1.5px; background: var(--ink-invert); transition: transform .2s ease, opacity .2s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1){ transform: translateY(5.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2){ opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3){ transform: translateY(-5.5px) rotate(-45deg); }

.search{
  margin-left: auto;
  display: flex; align-items: center; gap: 8px;
  height: 34px; padding: 0 14px;
  border: 1px solid rgba(253,243,230,.42);
  border-radius: var(--pill);
  background: rgba(255,255,255,.06);
}
.search svg{ width: 14px; height: 14px; fill: none; stroke: rgba(253,243,230,.7); stroke-width: 1.6; flex: none; }
.search input{
  width: 132px; border: 0; background: transparent; padding: 0;
  font: 400 12px/1 var(--font-sans); color: var(--ink-invert);
}
.search input::placeholder{ color: rgba(253,243,230,.6); }
.search input:focus{ outline: none; }
.search:focus-within{ border-color: rgba(253,243,230,.85); background: rgba(255,255,255,.12); }

/* -------------------------------------------------------------------- hero */
.hero{
  position: relative;
  height: 380px;
  background: #2b1a10;
  overflow: hidden;
  isolation: isolate;
}
.hero::before{
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: url("../images/hero-main.jpg") center 44% / cover no-repeat;
  filter: brightness(1.34) saturate(1.06) contrast(.96);
}
.hero::after{
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(24,12,6,.92) 0%, rgba(26,13,6,.84) 32%, rgba(30,15,7,.30) 60%, rgba(30,15,7,.02) 100%),
    linear-gradient(0deg, rgba(24,12,6,.28) 0%, rgba(24,12,6,0) 48%);
}
.hero-copy{
  height: 100%;
  max-width: none;
  padding: 38px var(--gutter) 8px;
  display: flex; flex-direction: column;
  justify-content: flex-start;
}
.eyebrow{
  font: 500 11px/1.4 var(--font-sans);
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--red);
}
.hero .eyebrow{ color: rgba(253,243,230,.72); }
.hero h1{
  margin-top: 27px;
  max-width: 12.4em;
  font-size: 34px; line-height: 1.55; letter-spacing: .01em;
  color: var(--ink-invert);
}
.hero-lead{
  margin-top: 13px;
  max-width: 33em;
  font-size: 14px; line-height: 1.9;
  color: rgba(253,243,230,.82);
}
.hero-actions{ margin-top: 26px; display: flex; flex-wrap: wrap; gap: 14px; }
.btn{
  display: inline-flex; align-items: center; justify-content: center;
  height: 40px; padding: 0 24px; border-radius: var(--pill);
  font-size: 13px; letter-spacing: .03em;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.btn-solid{ background: var(--ink-invert); color: var(--red-deep); }
.btn-solid:hover{ background: #fff; }
.btn-ghost{ background: transparent; color: var(--ink-invert); border: 1px solid rgba(253,243,230,.55); }
.btn-ghost:hover{ background: rgba(253,243,230,.14); border-color: var(--ink-invert); }

.hero-stats{
  margin-top: 27px;
  display: grid; grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 6px 34px;
  max-width: 660px;
  border-top: 1px solid rgba(253,243,230,.22);
  padding-top: 14px;
}
.hero-stats dt{
  font-size: 12.5px; font-weight: 600; letter-spacing: .02em;
  color: var(--ink-invert);
}
.hero-stats dd{
  margin: 4px 0 0; font-size: 11px; line-height: 1.62;
  color: rgba(253,243,230,.66);
}

/* ----------------------------------------------------------------- section */
.section{
  padding-inline: var(--gutter);
  background: var(--bg);
}

.sec-head.row{
  display: flex; align-items: baseline; gap: 44px;
  flex-wrap: wrap;
}
.sec-head.row h2{
  font-size: 19px; line-height: 1.5; letter-spacing: .01em;
}
.sec-head h2{
  margin-top: 9px;
  font-size: 22px; line-height: 1.42; letter-spacing: .005em;
}
.sec-note{
  margin-top: 16px;
  font-size: 11.5px; line-height: 1.7; color: var(--muted-2);
}
.sec-note.center{ text-align: center; }

/* -------------------------------------------------------------- categories */
.categories{ padding-top: 29px; padding-bottom: 0px; }
.cat-grid{
  margin-top: 16px;
  display: grid; grid-template-columns: repeat(8, minmax(0,1fr)); gap: 0 16px;
}
.cat img{
  width: 100%; aspect-ratio: 3 / 2; object-fit: cover;
  border-radius: var(--radius); background: var(--cream-2);
}
.cat-head{ display: flex; align-items: baseline; gap: 6px; margin-top: 11px; }
.cat-num{
  font: 600 10px/1 var(--font-sans); letter-spacing: .1em; color: var(--red);
}
.cat h3{ font-size: 15px; line-height: 1.25; }
.cat p{ margin-top: 6px; font-size: 11.5px; line-height: 1.72; color: var(--muted); }
.categories .sec-note{ margin-top: 4px; text-align: center; }

/* -------------------------------------------------------------- seasonings */
.seasonings{ padding-top: 2px; padding-bottom: 6px; }
.flavor-grid{
  margin-top: 11px;
  display: grid; grid-template-columns: repeat(9, minmax(0,1fr)); gap: 0 20px;
}
.flavor-grid li{ padding-top: 8px; border-top: 1px solid var(--line); }
.flavor-grid img{
  width: 100%; aspect-ratio: 2.35 / 1; object-fit: cover;
  border-radius: var(--radius); background: var(--cream-2);
}
.flavor-grid h3{ margin-top: 6px; font-size: 14px; letter-spacing: .02em; }
.flavor-grid p{ margin-top: 4px; font-size: 10.5px; line-height: 1.55; color: var(--muted); }
.seasonings .sec-note{ margin-top: 9px; text-align: center; }

/* ---------------------------------------------------------------- featured */
.featured{ padding-top: 4px; padding-bottom: 4px; }
.dish-grid{
  margin-top: 13px;
  display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 0 18px;
}
.dish{ display: block; }
.dish img{
  width: 100%; aspect-ratio: 1.42 / 1; object-fit: cover;
  border-radius: var(--radius); background: var(--cream-2);
  transition: filter .25s ease;
}
.dish:hover img{ filter: brightness(1.07) saturate(1.04); }
.dish h3{ margin-top: 9px; font-size: 12.5px; }
.dish p{ margin-top: 3px; font-size: 10px; line-height: 1.5; color: var(--muted); }

/* -------------------------------------------------------------------- pair */
.pair{ padding-top: 0; padding-bottom: 0; }
.pair-grid{
  display: grid; grid-template-columns: minmax(0,845fr) minmax(0,464fr);
  gap: 60px;
}
.path-list{ margin-top: 12px; display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 0 18px; }
.path-list li{
  padding: 6px 12px 7px;
  background: var(--surface);
  border-left: 2px solid var(--red);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.path-step{ font-size: 10px; letter-spacing: .18em; color: var(--red); }
.path-list h3{ margin-top: 3px; font-size: 13.5px; }
.path-list p{ margin-top: 3px; font-size: 10px; line-height: 1.45; color: var(--muted); }
.path-warn{
  margin-top: 9px;
  font-size: 11px; line-height: 1.72; color: var(--red-deep);
}

.shelf-grid{
  margin-top: 12px;
  display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 0 14px;
}
.shelf-grid li{ padding-top: 10px; border-top: 1px solid var(--line); }
.shelf-grid img{
  width: 100%; aspect-ratio: 1.15 / 1; object-fit: cover;
  border-radius: var(--radius); background: var(--cream-2);
}
.shelf-grid h3{ margin-top: 7px; font-size: 12.5px; }
.shelf-grid p{ margin-top: 3px; font-size: 10px; line-height: 1.45; color: var(--muted); }

/* ------------------------------------------------------------------ triple */
.triple{ padding-top: 0; padding-bottom: 0; }
.triple-grid{
  display: grid;
  grid-template-columns: minmax(0,636fr) minmax(0,391fr) minmax(0,262fr);
  gap: 0 40px;
  align-items: stretch;
  min-height: 363px;
}
.triple-col{ display: flex; flex-direction: column; min-width: 0; }
.tech-grid{
  margin-top: 12px;
  display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 0 24px;
}
.tech-grid img{
  width: 100%; aspect-ratio: 1.15 / 1; object-fit: cover;
  border-radius: var(--radius); background: var(--cream-2);
}
.tech-grid h3{ margin-top: 7px; font-size: 13px; }
.tech-grid p{ margin-top: 3px; font-size: 10px; line-height: 1.42; color: var(--muted); }

.faq-list{ margin-top: 12px; }
.faq-list details{ border-bottom: 1px solid var(--line-soft); }
.faq-list summary{
  cursor: pointer; list-style: none;
  display: flex; align-items: flex-start; gap: 9px;
  padding: 9px 0;
  font-size: 12.5px; line-height: 1.6; color: var(--ink);
  font-family: var(--font-serif); font-weight: 700;
}
.faq-list summary::-webkit-details-marker{ display: none; }
.faq-list summary::before{
  content: "＋"; flex: none; margin-top: 1px;
  font: 600 12px/1.6 var(--font-sans); color: var(--red);
}
.faq-list details[open] summary::before{ content: "－"; }
.faq-list details p{
  margin: 0 0 10px 20px;
  font-size: 11px; line-height: 1.68; color: var(--muted);
}

.scope-list{ margin-top: 10px; display: grid; gap: 6px; }
.scope-list h3{
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif; font-size: 11.5px; font-weight: 600;
  color: var(--red-deep); letter-spacing: .02em;
}
.scope-list p{ margin-top: 2px; font-size: 10.5px; line-height: 1.45; color: var(--muted); }
.scope-photo{ margin: auto var(--bleed) 0 0; padding-top: 16px; }
.scope-photo img{
  width: 100%; height: 149px; object-fit: cover;
  border-radius: var(--radius) 0 0 var(--radius);
  background: var(--cream-2);
}

/* ------------------------------------------------------------------ footer */
.site-footer{
  margin-top: 0;
  background: var(--red);
  color: var(--ink-invert);
  padding: 40px 0 0;
  height: 190px;
}
.footer-inner{
  padding-inline: var(--gutter);
  max-width: none;
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 18px 40px;
  align-items: start;
}
.footer-logo{
  font-family: var(--font-serif); font-size: 18px; font-weight: 700;
  letter-spacing: .05em; color: var(--ink-invert);
}
.footer-line{ margin-top: 7px; font-size: 12px; line-height: 1.7; color: rgba(253,243,230,.72); }
.footer-nav{ display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: flex-end; }
.footer-nav a{ font-size: 12px; color: rgba(253,243,230,.8); }
.footer-nav a:hover{ color: #fff; }
.footer-meta{
  grid-column: 1 / -1;
  margin-top: 34px;
  border-top: 1px solid rgba(253,243,230,.2);
  padding-top: 14px;
  display: flex; justify-content: space-between; gap: 20px;
  font-size: 11px; color: rgba(253,243,230,.62);
}

/* ------------------------------------------------------------- responsive */
@media (max-width: 1180px){
  .cat-grid{ grid-template-columns: repeat(4, minmax(0,1fr)); gap: 26px 16px; }
  .flavor-grid{ grid-template-columns: repeat(5, minmax(0,1fr)); gap: 26px 18px; }
  .dish-grid{ grid-template-columns: repeat(3, minmax(0,1fr)); gap: 26px 18px; }
  .triple-grid{ grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 34px 32px; }
  .tech-grid{ grid-template-columns: repeat(4, minmax(0,1fr)); }
  .scope-photo{ margin-right: 0; }
  .scope-photo img{ border-radius: var(--radius); }
}

@media (max-width: 960px){
  :root{ --header-h: 68px; }
  .site-header{ position: static; }
  .nav{
    position: absolute; left: 0; right: 0; top: var(--header-h);
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--red); padding: 6px 24px 18px;
    border-top: 1px solid rgba(253,243,230,.18);
    display: none;
  }
  .nav.open{ display: flex; }
  .nav a{ padding: 10px 0; width: 100%; border-bottom: 1px solid rgba(253,243,230,.12); }
  .nav-toggle{ display: flex; }
  .search{ margin-left: 0; }
  .search input{ width: 96px; }

  .hero{ height: auto; }
  .hero-copy{ padding-top: 30px; padding-bottom: 30px; }
  .hero h1{ font-size: 27px; line-height: 1.5; }
  .hero-lead{ font-size: 13px; }
  .hero-stats{ grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px 22px; }

  .sec-head.row{ gap: 8px; }
  .sec-head.row h2{ font-size: 18px; }
  .sec-head h2{ font-size: 21px; }

  .pair-grid{ grid-template-columns: minmax(0,1fr); gap: 34px; }
  .triple-grid{ grid-template-columns: minmax(0,1fr); gap: 34px; }
  .site-footer{ height: auto; padding-bottom: 26px; }
  .footer-inner{ grid-template-columns: minmax(0,1fr); }
  .footer-nav{ justify-content: flex-start; }
  .footer-meta{ flex-direction: column; gap: 6px; margin-top: 22px; }
}

@media (max-width: 620px){
  :root{ --gutter: 20px; }
  .header-inner{ gap: 12px; }
  .brand-name{ font-size: 17px; }
  .brand-kicker{ display: none; }
  .search{ display: none; }
  .cat-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); gap: 22px 14px; }
  .flavor-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); gap: 22px 14px; }
  .dish-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); gap: 22px 14px; }
  .path-list{ grid-template-columns: minmax(0,1fr); gap: 10px; }
  .shelf-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); gap: 20px 14px; }
  .tech-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); gap: 20px 14px; }
  .hero h1{ font-size: 23px; }
  .footer-meta{ font-size: 10.5px; }
}

@media (prefers-reduced-motion: reduce){
  *{ animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* skip-link：无障碍跳转链接，默认移出视口，Tab 聚焦时归位 */
.skip-link{position:absolute;left:-9999px;top:0;z-index:200;padding:8px 14px;background:#fff;color:#111;border-radius:6px;font-size:14px;text-decoration:none}
.skip-link:focus{left:8px;top:8px;outline:2px solid currentColor}
