:root {
  --bg: #fff8ed;
  --bg-2: #fff3dc;
  --surface: #ffffff;
  --text: #2c1a0b;
  --text-light: #6b4c35;
  --primary: #c0571e;
  --primary-dark: #9a4314;
  --secondary: #8c5e3c;
  --accent: #d4a05d;
  --border: #ecdcc5;
  --shadow: 0 12px 28px rgba(44, 26, 11, 0.08);
  --shadow-hover: 0 20px 40px rgba(44, 26, 11, 0.14);
  --radius: 18px;
  --radius-sm: 10px;
  --container: 1200px;
  --header-h: 72px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

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

.container {
  width: min(92%, var(--container));
  margin-inline: auto;
}

/* 导航 */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition: background 0.3s, box-shadow 0.3s;
  background: rgba(255, 248, 237, 0);
}

.site-header.scrolled {
  background: rgba(255, 248, 237, 0.96);
  box-shadow: 0 2px 18px rgba(44, 26, 11, 0.08);
  backdrop-filter: blur(8px);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", "SimSun", serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
}

.main-nav ul {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.main-nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  position: relative;
  padding: 0.4rem 0;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.25s;
}

.main-nav a:hover::after,
.main-nav a.active::after { width: 100%; }

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  width: 44px;
  height: 44px;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.menu-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  text-align: center;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 0%, var(--bg-2), var(--bg) 60%);
}

.grain {
  position: absolute;
  inset: 0;
  opacity: 0.18;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 20% 30%, var(--accent) 0, transparent 3px),
    radial-gradient(circle at 70% 20%, var(--primary) 0, transparent 2px),
    radial-gradient(circle at 40% 80%, var(--secondary) 0, transparent 3px);
  background-size: 90px 90px;
}

.hero-inner {
  position: relative;
  z-index: 2;
  padding-top: var(--header-h);
  max-width: 780px;
}

.eyebrow {
  font-size: clamp(0.75rem, 1vw, 0.85rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 1rem;
}

.hero h1 {
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", "SimSun", serif;
  font-size: clamp(2.5rem, 6vw, 4.2rem);
  line-height: 1.2;
  margin-bottom: 1.2rem;
  color: var(--text);
}

.lead {
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  color: var(--text-light);
  max-width: 620px;
  margin-inline: auto;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.7rem 1.8rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  cursor: pointer;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn-outline {
  background: transparent;
  border-color: var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-2px);
}

.hero-decor {
  position: absolute;
  right: 6%;
  bottom: 6%;
  width: min(34vw, 340px);
  opacity: 0.14;
  pointer-events: none;
  transform: rotate(-12deg);
}

/* 数据条 */
.stats {
  background: var(--surface);
  border-block: 1px solid var(--border);
  padding-block: 3rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  text-align: center;
}

.stat-item strong {
  display: block;
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", "SimSun", serif;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  color: var(--primary);
  line-height: 1.1;
}

.stat-item span {
  font-size: 0.9rem;
  color: var(--text-light);
}

/* 通用区块 */
section {
  padding-block: clamp(4rem, 8vw, 6rem);
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin-inline: auto;
  margin-bottom: 3rem;
}

.section-header.light h2,
.section-header.light p { color: var(--surface); }
.section-header.light .eyebrow { color: var(--accent); }

.section-header h2 {
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", "SimSun", serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: 0.8rem;
}

.section-header p {
  color: var(--text-light);
  font-size: 1.05rem;
}

/* 产品中心 */
.category-tabs {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.tab {
  padding: 0.55rem 1.3rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-light);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

.tab:hover { border-color: var(--primary); color: var(--primary); }
.tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.6rem;
}

.product-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}

.product-card.hidden { display: none; }

.product-img {
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #fff4e3, #fffaf0);
  display: grid;
  place-items: center;
  padding: 1.2rem;
}

.product-img img {
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 8px 14px rgba(44, 26, 11, 0.12));
}

.product-body {
  padding: 1.2rem 1.4rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-body h3 {
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", "SimSun", serif;
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
}

.product-body p {
  font-size: 0.88rem;
  color: var(--text-light);
  margin-bottom: 0.8rem;
  flex: 1;
}

.tag {
  align-self: flex-start;
  font-size: 0.75rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: var(--bg-2);
  color: var(--primary-dark);
  font-weight: 600;
}

/* 工艺流程 */
.process {
  background:
    linear-gradient(rgba(44, 26, 11, 0.82), rgba(44, 26, 11, 0.88)),
    url("../images/cone-large.png") center / cover no-repeat;
  position: relative;
}

.process-track {
  display: flex;
  gap: 1.2rem;
  justify-content: center;
  flex-wrap: wrap;
}

.process-step {
  flex: 1 1 170px;
  max-width: 210px;
  background: rgba(255, 248, 237, 0.08);
  border: 1px solid rgba(255, 248, 237, 0.18);
  border-radius: var(--radius);
  padding: 1.8rem 1.4rem;
  text-align: center;
  color: var(--surface);
  backdrop-filter: blur(4px);
}

.step-num {
  display: inline-block;
  width: 42px;
  height: 42px;
  line-height: 42px;
  border-radius: 50%;
  background: var(--primary);
  font-weight: 700;
  margin-bottom: 1rem;
}

.process-step h3 {
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", "SimSun", serif;
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
}

.process-step p {
  font-size: 0.88rem;
  opacity: 0.85;
}

/* 品质认证 */
.cert-group + .cert-group { margin-top: 2.5rem; }

.cert-group-title {
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", "SimSun", serif;
  font-size: 1.2rem;
  color: var(--text);
  margin-bottom: 1.2rem;
  padding-left: 0.9rem;
  border-left: 4px solid var(--primary);
}

.cert-gallery {
  display: grid;
  gap: 1.2rem;
}

.cert-landscape {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.cert-portrait {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  max-width: 720px;
}

.cert-thumb {
  margin: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  background: var(--surface);
  transition: transform 0.3s, box-shadow 0.3s;
}

.cert-thumb:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.cert-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cert-landscape .cert-thumb { aspect-ratio: 4 / 3; }
.cert-portrait .cert-thumb { aspect-ratio: 3 / 4; }

/* 品牌故事 */
.story { background: var(--surface); }

.story-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  align-items: center;
}

.story-visual {
  background: var(--bg-2);
  border-radius: var(--radius);
  padding: 2rem;
  display: grid;
  place-items: center;
}

.story-visual img {
  max-height: 420px;
  filter: drop-shadow(0 14px 24px rgba(44, 26, 11, 0.14));
}

.story-content h2 {
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", "SimSun", serif;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  margin-bottom: 1rem;
}

.story-content p {
  color: var(--text-light);
  margin-bottom: 1rem;
}

.story-list {
  list-style: none;
  margin-top: 1.5rem;
}

.story-list li {
  padding-left: 1.6rem;
  position: relative;
  margin-bottom: 0.7rem;
  color: var(--text);
  font-weight: 500;
}

.story-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
}

/* 联系我们 */
.contact-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem;
}

.contact-list div {
  padding: 1.6rem 1.4rem;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
}

.contact-list div:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.contact-list dt {
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.4rem;
}

.contact-list dd {
  font-size: 1rem;
  color: var(--text);
}

.contact-list dd a { word-break: break-all; }
.contact-list a:hover { color: var(--primary); text-decoration: underline; }

/* 页脚 */
.site-footer {
  background: var(--text);
  color: rgba(255, 248, 237, 0.8);
  padding-block: 4rem 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer-brand .logo { color: var(--surface); margin-bottom: 0.8rem; }

.footer-links h4,
.footer-contact h4 {
  color: var(--surface);
  font-size: 1rem;
  margin-bottom: 1rem;
}

.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 0.45rem; }
.footer-links a:hover,
.footer-contact a:hover { color: var(--accent); }

.footer-bottom {
  border-top: 1px solid rgba(255, 248, 237, 0.12);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.88rem;
}

/* 灯箱 */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.92);
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.lightbox.open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox img {
  max-width: 92vw;
  max-height: 86vh;
  border-radius: var(--radius-sm);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.8rem;
  cursor: pointer;
  transition: background 0.2s;
}

.lightbox-close:hover { background: rgba(255, 255, 255, 0.28); }

/* 响应式 */
@media (max-width: 1023px) {
  .story-grid { grid-template-columns: 1fr; gap: 2.5rem; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); }

  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767px) {
  :root { --header-h: 64px; }

  .menu-toggle { display: flex; }

  .main-nav {
    position: fixed;
    inset: var(--header-h) 0 0 0;
    background: rgba(255, 248, 237, 0.98);
    backdrop-filter: blur(10px);
    transform: translateX(100%);
    transition: transform 0.3s;
  }

  .main-nav.open { transform: translateX(0); }

  .main-nav ul {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 1.5rem;
  }

  .main-nav a { font-size: 1.25rem; }

  .hero-decor { display: none; }

  .product-grid { grid-template-columns: 1fr; }

  .process-step { flex: 1 1 100%; max-width: 100%; }

  .cert-landscape,
  .cert-portrait { grid-template-columns: repeat(2, 1fr); }

  .stats-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; }

  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 375px) {
  .hero h1 { font-size: 2.1rem; }
  .stats-grid { grid-template-columns: 1fr; }
}

/* 减少动画 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
