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

:root{
  /* 面 */
  --bg: #fdf6e9;
  --surface: #fbf4e6;
  --surface-2: #f8efdb;
  --paper: #fefbf2;

  /* 墨 */
  --ink: #1b1a11;
  --body: #453f33;
  --muted: #6b6152;
  --muted-2: #8a8070;

  /* 强调 */
  --green: #274127;
  --green-deep: #1d331d;
  --green-soft: #335e39;
  --amber: #8a4a12;
  --amber-soft: #b4741f;
  --line: rgba(27,26,17,.14);
  --line-soft: rgba(27,26,17,.08);

  /* 尺寸 */
  --wrap: 1376px;
  --header-h: 79px;
  --radius-sm: 6px;
  --radius: 10px;
  --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;
  --shadow: 0 18px 40px -34px rgba(27,26,17,.5);
}

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

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

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

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

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

h1,h2,h3,h4{
  font-family: var(--font-serif);
  color: var(--ink);
  font-weight: 700;
  letter-spacing: .01em;
  margin: 0;
  line-height: 1.28;
}

p{ margin: 0; }

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

button{ font: inherit; color: inherit; }

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

.skip{
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 10px 16px;
  background: var(--green);
  color: #f6efdf;
  z-index: 200;
}
.skip:focus{ left: 12px; top: 12px; }

.wrap{
  width: min(var(--wrap), calc(100% - 80px));
  margin: 0 auto;
}

.eyebrow{
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--amber);
  font-weight: 600;
  margin: 0 0 10px;
}
.eyebrow-cn{
  letter-spacing: .06em;
  font-family: var(--font-serif);
  text-transform: none;
  font-size: 12px;
}

/* ==========================================================================
   M0 site-header
   ========================================================================== */

.site-header{
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.site-header.is-stuck{
  border-bottom-color: var(--line-soft);
  box-shadow: 0 10px 24px -22px rgba(27,26,17,.6);
}

.header-inner{
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 26px;
}

.brand{
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex: none;
}
.brand-name{
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: .02em;
}
.brand-kicker{
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--amber);
  border-left: 1px solid var(--line);
  padding-left: 10px;
}

.nav{
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
  font-size: 14px;
  color: var(--body);
}
.nav a{
  position: relative;
  padding: 6px 0;
  white-space: nowrap;
  transition: color .18s ease;
}
.nav a::after{
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--amber);
  transition: right .2s ease;
}
.nav a:hover{ color: var(--ink); }
.nav a:hover::after{ right: 0; }
.nav a[aria-current="page"]{ color: var(--ink); font-weight: 600; }
.nav a[aria-current="page"]::after{ right: 0; background: var(--green); }

.search{
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 232px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  background: var(--paper);
  transition: border-color .18s ease, background .18s ease;
}
.search:focus-within{ border-color: var(--green); background: #fff; }
.search svg{
  width: 14px;
  height: 14px;
  flex: none;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.6;
}
.search input{
  border: 0;
  background: transparent;
  font-size: 13px;
  color: var(--ink);
  width: 100%;
  outline: none;
}
.search input::placeholder{ color: var(--muted-2); }

.nav-toggle{
  display: none;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  background: transparent;
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
}
.nav-toggle span{
  display: block;
  width: 16px;
  height: 1.5px;
  background: var(--ink);
}

/* ==========================================================================
   M1 hero
   ========================================================================== */

.hero{
  padding: 0;
}
.hero-inner{
  position: relative;
  height: 371px;
  overflow: hidden;
  background: var(--green-deep);
}
.hero-photo{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
}
.hero-inner::after{
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(12,20,12,.55), rgba(12,20,12,.18) 42%, rgba(12,20,12,.55));
  pointer-events: none;
}
.hero-panel{
  position: absolute;
  left: calc(50% - 45px);
  transform: translateX(-50%);
  top: 10px;
  bottom: 0;
  width: 734px;
  max-width: calc(100% - 48px);
  background: var(--bg);
  padding: 20px 44px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  z-index: 2;
}
.hero-panel .eyebrow{ margin-bottom: 8px; }
.hero h1{
  font-size: 41px;
  line-height: 1.3;
  margin-bottom: 10px;
}
.hero-lead{
  font-size: 14px;
  line-height: 1.66;
  color: var(--body);
  max-width: 610px;
}
.hero-actions{
  display: flex;
  gap: 14px;
  margin-top: 16px;
}
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 22px;
  border-radius: var(--pill);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: .02em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}
.btn-solid{ background: var(--green); color: #f6efdf; }
.btn-solid:hover{ background: var(--green-soft); transform: translateY(-1px); }
.btn-ghost{ border-color: rgba(27,26,17,.35); color: var(--ink); }
.btn-ghost:hover{ border-color: var(--green); background: rgba(39,65,39,.06); }

.hero-stats{
  display: flex;
  gap: 0;
  margin-top: auto;
  padding-top: 16px;
  width: 100%;
  justify-content: center;
}
.hero-stats div{
  flex: 1 1 0;
  font-family: var(--font-serif);
  font-size: 13px;
  color: var(--ink);
  padding: 0 8px;
  border-left: 1px solid var(--line);
  line-height: 1.4;
}
.hero-stats div:first-child{ border-left: 0; }

/* ==========================================================================
   通用区块头
   ========================================================================== */

.section{ position: relative; }

.sec-head{
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-bottom: 16px;
}
.sec-head .eyebrow{ margin: 0; }
.sec-title{ display: block; }
.sec-title .eyebrow{ display: block; }
.footer-bottom{ justify-content: flex-start; }
.sec-head h2{
  font-size: 29px;
  line-height: 1.34;
}

.note.note-left{ text-align: left; }
.note{
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--muted);
  text-align: center;
  letter-spacing: .01em;
}

/* ==========================================================================
   M2 category-index
   ========================================================================== */

.categories{
  margin-top: 23px;
  padding: 0;
}
.cat-grid{
  display: grid;
  grid-template-columns: repeat(7, minmax(0,1fr));
  gap: 13px;
}
.cat{
  display: flex;
  flex-direction: column;
}
.cat img{
  width: 100%;
  height: 148px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.cat-head{
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 7px 0 3px;
}
.cat-num{
  font-family: var(--font-serif);
  font-size: 11px;
  color: var(--amber);
  letter-spacing: .06em;
}
.cat h3{
  font-size: 15px;
  line-height: 1.3;
}
.cat p{
  font-size: 12.5px;
  line-height: 1.66;
  color: var(--muted);
}
.cat a{ display: block; }
.cat a:hover h3{ color: var(--green); }

/* ==========================================================================
   M3 flavor-atlas
   ========================================================================== */

.flavor{
  margin-top: 8px;
}
.flavor-grid{
  display: grid;
  grid-template-columns: repeat(8, minmax(0,1fr));
  gap: 12px;
}
.flavor-item img{
  width: 100%;
  height: 85px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.flavor-name{
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin: 5px 0 2px;
}
.flavor-num{
  font-family: var(--font-serif);
  font-size: 10.5px;
  color: var(--amber);
}
.flavor-name h3{
  font-size: 13.5px;
  line-height: 1.3;
  font-family: var(--font-serif);
}
.flavor-item p{
  font-size: 11px;
  line-height: 1.58;
  color: var(--muted);
}
.flavor-item a:hover h3{ color: var(--green); }

/* ==========================================================================
   M4 featured-dishes
   ========================================================================== */

.featured{
  margin-top: 8px;
}
.featured-grid{
  display: grid;
  grid-template-columns: repeat(6, minmax(0,1fr));
  gap: 14px;
}
.dish-card img{
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.dish-card h3{
  font-size: 14.5px;
  margin: 7px 0 3px;
}
.dish-card p{
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
}
.dish-card a:hover h3{ color: var(--green); }

/* ==========================================================================
   M5 kitchen-path + M6 seasoning-shelf（同一行左右并排）
   ========================================================================== */

.duo{
  margin-top: 17px;
  display: grid;
  grid-template-columns: 55.4fr 43.4fr;
  gap: 22px;
}

.path-steps{
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 18px;
}
.path-step{
  border-top: 1px solid var(--line);
  padding-top: 8px;
}
.path-step .step-no{
  display: block;
  font-family: var(--font-serif);
  font-size: 12px;
  color: var(--amber);
  margin-bottom: 4px;
}
.path-step h3{
  font-size: 14px;
  margin-bottom: 4px;
}
.path-step p{
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
}
.path-warn{
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--body);
  padding-left: 12px;
  border-left: 2px solid var(--amber);
}

.pantry-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 10px 14px;
}
.pantry-item{
  display: grid;
  grid-template-columns: 88px minmax(0,1fr);
  gap: 10px;
  align-items: start;
}
.pantry-item img{
  width: 88px;
  height: 62px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.pantry-item h3{
  font-size: 13.5px;
  margin-bottom: 2px;
}
.pantry-item p{
  font-size: 10.5px;
  line-height: 1.5;
  color: var(--muted);
}
.pantry-tail{
  margin-top: 9px;
  font-size: 11.5px;
  color: var(--muted);
}

/* ==========================================================================
   M7 technique-strip + M8 faq（同一行左右并排）
   ========================================================================== */

.duo-2{
  margin-top: 15px;
  display: grid;
  grid-template-columns: 60fr 34fr;
  gap: 22px;
}

.tech-grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 12px;
}
.tech-item img{
  width: 100%;
  height: 78px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.tech-item h3{
  font-size: 13px;
  margin: 6px 0 2px;
}
.tech-item p{
  font-size: 10px;
  line-height: 1.5;
  color: var(--muted);
}
.tech-tail{
  margin-top: 9px;
  font-size: 11.5px;
  color: var(--muted);
}

.faq-list{
  border-top: 1px solid var(--line);
}
.faq-item{
  border-bottom: 1px solid var(--line);
}
.faq-item summary{
  cursor: pointer;
  list-style: none;
  padding: 7px 26px 7px 0;
  position: relative;
  font-size: 13px;
  color: var(--ink);
  font-family: var(--font-serif);
  font-weight: 600;
  transition: color .18s ease;
}
.faq-item summary::-webkit-details-marker{ display: none; }
.faq-item summary::after{
  content: "+";
  position: absolute;
  right: 2px;
  top: 50%;
  transform: translateY(-50%);
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: 15px;
  color: var(--amber);
  transition: transform .2s ease;
}
.faq-item[open] summary::after{ content: "−"; }
.faq-item summary:hover{ color: var(--green); }
.faq-item p{
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted);
  padding: 0 12px 12px 0;
}

/* ==========================================================================
   M9 scope-note
   ========================================================================== */

.scope{
  margin-top: 28px;
}
.scope-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 26px;
  margin-top: 18px;
}
.scope-item h3{
  font-size: 14px;
  margin-bottom: 6px;
}
.scope-item p{
  font-size: 13px;
  line-height: 1.92;
  color: var(--muted);
}

/* ==========================================================================
   M10 site-footer
   ========================================================================== */

.site-footer{
  margin-top: 4px;
  background: var(--green);
  color: #e9e3cf;
  padding: 20px 0 16px;
}
.footer-top{
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 32px;
  align-items: start;
}
.footer-brand .brand-name{ color: #f6efdf; font-size: 19px; }
.footer-brand p{
  margin-top: 6px;
  font-size: 12.5px;
  line-height: 1.72;
  color: rgba(246,239,223,.78);
  max-width: 460px;
}
.footer-links{
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 6px 18px;
  font-size: 12.5px;
  padding-top: 4px;
}
.footer-links a{
  color: rgba(246,239,223,.82);
  transition: color .18s ease;
}
.footer-links a:hover{ color: #fff; text-decoration: underline; }
.footer-bottom{
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid rgba(246,239,223,.2);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: 11.5px;
  color: rgba(246,239,223,.66);
}

/* ==========================================================================
   响应式：≤1200 / ≤1024 / ≤768 / ≤560
   ========================================================================== */

@media (max-width: 1200px){
  .wrap{ width: min(var(--wrap), calc(100% - 56px)); }
  .cat-grid{ grid-template-columns: repeat(4, minmax(0,1fr)); }
  .flavor-grid{ grid-template-columns: repeat(4, minmax(0,1fr)); }
  .featured-grid{ grid-template-columns: repeat(3, minmax(0,1fr)); }
  .duo{ grid-template-columns: 1fr; gap: 26px; }
  .duo-2{ grid-template-columns: 1fr; gap: 26px; }
  .nav{ gap: 14px; font-size: 13px; }
  .search{ width: 180px; }
}

@media (max-width: 1024px){
  :root{ --header-h: 64px; }
  .header-inner{ gap: 14px; }
  .nav{
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: var(--header-h);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 8px 28px 16px;
    box-shadow: var(--shadow);
  }
  .nav.is-open{ display: flex; }
  .nav a{ padding: 9px 0; width: 100%; border-bottom: 1px solid var(--line-soft); }
  .nav a::after{ display: none; }
  .nav-toggle{ display: flex; margin-left: auto; }
  .search{ width: 160px; }
  .hero-panel{ width: auto; left: 24px; right: 24px; transform: none; padding: 22px 26px; }
  .hero h1{ font-size: 32px; }
  .scope-grid{ grid-template-columns: 1fr 1fr; }
  .footer-top{ grid-template-columns: 1fr; gap: 22px; }
}

@media (max-width: 768px){
  body{ font-size: 14px; }
  .wrap{ width: calc(100% - 40px); }
  .brand-kicker{ display: none; }
  .search{ display: none; }
  .hero-inner{ height: auto; }
  .hero-photo{ position: relative; height: 220px; inset: auto; }
  .hero-panel{
    position: relative;
    left: auto; right: auto; top: auto; bottom: auto;
    width: auto;
    margin: -28px 16px 0;
    padding: 22px 20px 20px;
    box-shadow: var(--shadow);
  }
  .hero h1{ font-size: 26px; }
  .hero-lead{ font-size: 13.5px; }
  .hero-stats{ flex-wrap: wrap; gap: 8px 0; }
  .hero-stats div{ flex: 1 1 46%; border-left: 0; font-size: 12px; }
  .cat-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
  .flavor-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
  .featured-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
  .tech-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
  .path-steps{ grid-template-columns: 1fr; gap: 14px; }
  .pantry-grid{ grid-template-columns: 1fr; }
  .scope-grid{ grid-template-columns: 1fr; gap: 18px; }
  .footer-links{ grid-template-columns: repeat(2, minmax(0,1fr)); }
  .footer-bottom{ flex-direction: column; gap: 6px; }
  .sec-head h2{ font-size: 21px; }
}

@media (max-width: 420px){
  .hero h1{ font-size: 22px; }
  .cat-grid{ grid-template-columns: 1fr; }
  .featured-grid{ grid-template-columns: 1fr; }
}

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

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