/* ==========================================================================
   沐野家居 MUYE HOME — 全局样式
   ========================================================================== */

/* ---------- 字体（本地化 @font-face） ---------- */
@font-face {
  font-family: 'Noto Serif SC';
  src: url('../fonts/NotoSerifSC-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Noto Serif SC';
  src: url('../fonts/NotoSerifSC-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Noto Sans SC';
  src: url('../fonts/NotoSansSC-300.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Noto Sans SC';
  src: url('../fonts/NotoSansSC-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Noto Sans SC';
  src: url('../fonts/NotoSansSC-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* ---------- 设计变量 ---------- */
:root {
  --bg: #F6F1E8;
  --bg-soft: #EFE8DA;
  --surface: #FBF8F2;
  --ink: #2A2420;
  --ink-2: #6E6356;
  --ink-3: #9C9082;
  --accent: #55624A;
  --accent-deep: #3C4634;
  --accent-soft: #E4E8DB;
  --clay: #B0704E;
  --line: #E2D9C9;
  --white: #FFFFFF;
  --font-serif: 'Noto Serif SC', 'Songti SC', 'STSong', 'SimSun', serif;
  --font-sans: 'Noto Sans SC', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --shadow-card: 0 1px 2px rgba(42,36,32,.05), 0 10px 30px -18px rgba(42,36,32,.18);
  --radius: 14px;
  --container: 1200px;
}

/* ---------- 基础 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.35; }
p { margin: 0 0 1em; }
button { font-family: inherit; cursor: pointer; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 32px; }
::selection { background: var(--accent-soft); }

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

/* 无障碍：动效偏好 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- 通用组件 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 30px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .06em;
  transition: background .25s, color .25s, border-color .25s;
}
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--bg); }
.btn-light { border-color: var(--bg); color: var(--bg); }
.btn-light:hover { background: var(--bg); color: var(--ink); }
.btn .arr { transition: transform .25s; }
.btn:hover .arr { transform: translateX(4px); }
.btn-ghost-light { display: inline-flex; align-items: center; gap: 10px; padding: 14px 30px; border: 1px solid rgba(246,241,232,.55); border-radius: 999px; color: var(--bg); font-size: 15px; font-weight: 500; letter-spacing: .06em; transition: background .25s, color .25s, border-color .25s; }
.btn-ghost-light:hover { background: var(--bg); color: var(--ink); }

/* 轻量入场动效 */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .35em;
  color: var(--accent);
}
.eyebrow::before { content: ''; width: 34px; height: 1px; background: var(--accent); }

.sec { padding: 104px 0; }
.sec-head { max-width: 640px; margin-bottom: 52px; }
.sec-head h2 { font-family: var(--font-serif); font-size: 40px; font-weight: 700; margin: 18px 0 16px; }
.sec-head .lead { color: var(--ink-2); font-weight: 300; font-size: 17px; }
.sec-head.row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; max-width: none; }
.sec-head.row .link-more { flex-shrink: 0; font-size: 14px; color: var(--ink-2); border-bottom: 1px solid var(--ink-3); padding-bottom: 4px; transition: color .2s, border-color .2s; }
.sec-head.row .link-more:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- 顶栏 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 241, 232, .92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 74px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 40px; height: 40px; flex-shrink: 0; }
.brand-name { line-height: 1.15; }
.brand-cn { font-family: var(--font-serif); font-size: 20px; font-weight: 700; letter-spacing: .14em; }
.brand-en { font-size: 11px; letter-spacing: .42em; color: var(--ink-3); margin-top: 2px; }

.main-nav ul { display: flex; gap: 8px; }
.main-nav a {
  display: block;
  padding: 10px 18px;
  font-size: 15px;
  color: var(--ink-2);
  border-radius: 999px;
  transition: color .2s, background .2s;
}
.main-nav a:hover { color: var(--ink); background: var(--bg-soft); }
.main-nav a.active { color: var(--ink); background: var(--accent-soft); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  align-items: center;
  justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 20px; height: 2px; background: var(--ink); position: relative; transition: transform .25s, opacity .25s;
}
.nav-toggle span::before, .nav-toggle span::after { content: ''; position: absolute; left: 0; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-toggle.open span { background: transparent; }
.nav-toggle.open span::before { top: 0; transform: rotate(45deg); }
.nav-toggle.open span::after { top: 0; transform: rotate(-45deg); }

/* ---------- Hero（首页） ---------- */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--bg-soft);
}
.hero-img { position: absolute; inset: 0; }
.hero-img img { width: 100%; height: 100%; object-fit: cover; object-position: center 62%; }
.hero-img::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(42,36,32,0) 30%, rgba(42,36,32,.62) 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-top: 120px;
  padding-bottom: 96px;
  color: var(--bg);
}
.hero-content .eyebrow { color: #E9E2D4; }
.hero-content .eyebrow::before { background: #E9E2D4; }
.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(38px, 6vw, 68px);
  font-weight: 700;
  line-height: 1.25;
  max-width: 720px;
  margin: 22px 0 20px;
  letter-spacing: .04em;
  text-shadow: 0 2px 30px rgba(42,36,32,.35);
}
.hero-sub { font-size: 18px; font-weight: 300; color: #EDE6D8; max-width: 520px; margin-bottom: 36px; }
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }

/* 内页小横幅 */
.page-hero {
  position: relative;
  padding: 110px 0 74px;
  background: var(--accent-deep);
  color: var(--bg);
  overflow: hidden;
}
.page-hero .bgimg { position: absolute; inset: 0; opacity: .28; }
.page-hero .bgimg img { width: 100%; height: 100%; object-fit: cover; }
.page-hero .container { position: relative; z-index: 2; }
.page-hero h1 { font-family: var(--font-serif); font-size: clamp(30px, 4.4vw, 48px); font-weight: 700; margin: 18px 0 12px; letter-spacing: .05em; }
.page-hero .sub { font-weight: 300; color: #D9D0C0; max-width: 560px; }
.page-hero .eyebrow { color: #C9C0AC; }
.page-hero .eyebrow::before { background: #C9C0AC; }

/* ---------- 品牌理念条 ---------- */
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.value-item { display: flex; gap: 20px; }
.value-icon {
  width: 52px; height: 52px; flex-shrink: 0;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  display: flex; align-items: center; justify-content: center;
}
.value-icon svg { width: 26px; height: 26px; }
.value-item h3 { font-size: 19px; font-weight: 500; margin-bottom: 8px; }
.value-item p { font-size: 14.5px; color: var(--ink-2); font-weight: 300; margin: 0; }

/* ---------- 产品卡片 ---------- */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }
.product-card { display: block; }
.product-card .media {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-soft);
  aspect-ratio: 1 / 1;
}
.product-card .media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.6,.2,1); }
.product-card:hover .media img { transform: scale(1.05); }
.product-card .cat-tag {
  position: absolute; top: 14px; left: 14px;
  font-size: 12px; letter-spacing: .18em;
  background: rgba(251,248,242,.9);
  color: var(--ink-2);
  padding: 5px 12px;
  border-radius: 999px;
}
.product-card .info { padding: 16px 2px 0; display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.product-card .name { font-size: 16.5px; font-weight: 500; }
.product-card .price { font-size: 16px; color: var(--clay); font-weight: 500; white-space: nowrap; }
.product-card .desc { font-size: 14px; color: var(--ink-3); font-weight: 300; padding: 2px 2px 0; }

/* ---------- 系列分类卡 ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.cat-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 3 / 3.6;
  display: flex;
  align-items: flex-end;
}
.cat-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.6,.2,1); }
.cat-card:hover img { transform: scale(1.06); }
.cat-card::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(42,36,32,0) 40%, rgba(42,36,32,.72) 100%);
}
.cat-card .cap { position: relative; z-index: 2; padding: 22px; color: var(--bg); width: 100%; }
.cat-card .cap h3 { font-family: var(--font-serif); font-size: 22px; font-weight: 600; letter-spacing: .12em; }
.cat-card .cap p { font-size: 14px; color: #DCD3C2; margin: 6px 0 0; font-weight: 300; }
.cat-card .cap .more { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; margin-top: 12px; color: #EFE9DC; border-bottom: 1px solid rgba(239,233,220,.5); padding-bottom: 3px; }

/* ---------- 图文并排（品牌故事等） ---------- */
.split { display: grid; grid-template-columns: 1.08fr 1fr; gap: 64px; align-items: center; }
.split .media { border-radius: var(--radius); overflow: hidden; }
.split .media img { width: 100%; height: 100%; object-fit: cover; }
.split .body h2 { font-family: var(--font-serif); font-size: 36px; font-weight: 700; margin: 18px 0 20px; line-height: 1.4; }
.split .body p { color: var(--ink-2); font-weight: 300; }
.split .body .btn { margin-top: 12px; }

/* ---------- 品牌动态卡片 ---------- */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.news-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: transform .3s, box-shadow .3s;
  text-align: left;
  width: 100%;
  font: inherit;
  color: inherit;
  padding: 0;
  cursor: pointer;
}
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); }
.news-card .media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg-soft); }
.news-card .media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.6,.2,1); }
.news-card:hover .media img { transform: scale(1.05); }
.news-card .body { padding: 22px 24px 26px; flex: 1; display: flex; flex-direction: column; }
.news-card .meta { font-size: 12.5px; color: var(--ink-3); letter-spacing: .08em; margin-bottom: 10px; }
.news-card .meta .tag { color: var(--accent); margin-right: 12px; }
.news-card .news-title { display: block; font-size: 18px; font-weight: 500; line-height: 1.5; margin-bottom: 10px; }
.news-card .news-summary { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; color: var(--ink-2); font-weight: 300; }

/* ---------- 数据条 ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stat .num { font-family: var(--font-serif); font-size: 46px; font-weight: 700; color: var(--accent-deep); line-height: 1.1; }
.stat .num small { font-size: 18px; }
.stat .lbl { font-size: 13.5px; color: var(--ink-2); letter-spacing: .2em; margin-top: 8px; }

/* ---------- 时间轴 ---------- */
.timeline { display: grid; grid-template-columns: 132px 44px 1fr; row-gap: 0; }
.tl-row { display: contents; }
.tl-year {
  padding: 0 0 52px;
  text-align: right;
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
  color: var(--accent-deep);
  line-height: 1.5;
}
.tl-axis { position: relative; }
.tl-axis::before {
  content: '';
  position: absolute;
  top: 8px; bottom: 8px; left: 50%;
  width: 1px;
  transform: translateX(-50%);
  background: var(--line);
}
.tl-dot {
  position: absolute;
  top: 8px; left: 50%;
  transform: translateX(-50%);
  width: 13px; height: 13px;
  border-radius: 50%;
  background: var(--clay);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 1px var(--clay);
}
.tl-content { padding: 0 0 52px 4px; }
.tl-content h3 { font-size: 19px; font-weight: 500; margin-bottom: 6px; }
.tl-content p { font-size: 14.5px; color: var(--ink-2); font-weight: 300; margin: 0; max-width: 560px; }

/* ---------- 筛选（产品中心） ---------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 44px; }
.filter-btn {
  padding: 10px 22px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  font-size: 14.5px;
  transition: all .2s;
}
.filter-btn:hover { border-color: var(--ink); color: var(--ink); }
.filter-btn.active { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.grid-empty { padding: 60px 0; text-align: center; color: var(--ink-3); }

/* ---------- 产品详情 ---------- */
.detail { padding-top: 64px; padding-bottom: 104px; }
.breadcrumb { font-size: 13px; color: var(--ink-3); margin-bottom: 36px; }
.breadcrumb a:hover { color: var(--accent); }
.detail-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 64px; align-items: start; }
.detail-media { border-radius: var(--radius); overflow: hidden; background: var(--bg-soft); position: sticky; top: 96px; }
.detail-media img { width: 100%; height: auto; }
.detail-info .cat-tag2 {
  display: inline-block;
  font-size: 12.5px;
  letter-spacing: .2em;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 5px 14px;
  margin-bottom: 18px;
}
.detail-info h1 { font-family: var(--font-serif); font-size: 34px; font-weight: 700; margin-bottom: 14px; }
.detail-info .price { font-family: var(--font-serif); font-size: 30px; color: var(--clay); font-weight: 700; margin-bottom: 8px; }
.detail-info .unit { font-size: 14px; color: var(--ink-3); margin-bottom: 22px; }
.detail-info .lead { color: var(--ink-2); font-weight: 300; padding-bottom: 24px; border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.spec-list { display: grid; grid-template-columns: 92px 1fr; row-gap: 12px; font-size: 14.5px; }
.spec-list dt { color: var(--ink-3); font-weight: 300; }
.spec-list dd { margin: 0; }
.detail-actions { display: flex; gap: 14px; margin-top: 34px; flex-wrap: wrap; }
.detail-actions .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }

/* ---------- 品牌动态详情视图 ---------- */
.article-back { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); margin-bottom: 28px; }
.article-back:hover { color: var(--accent); }
.article-view { max-width: 760px; margin: 0 auto; }
.article-view h2 { font-family: var(--font-serif); font-size: 32px; font-weight: 700; line-height: 1.4; margin-bottom: 14px; }
.article-view .meta { font-size: 13.5px; color: var(--ink-3); margin-bottom: 30px; }
.article-view .hero-img2 { border-radius: var(--radius); overflow: hidden; margin-bottom: 32px; }
.article-view .content p { font-size: 16.5px; color: var(--ink-2); font-weight: 300; margin-bottom: 1.4em; }
.article-view .content h3 { font-family: var(--font-serif); font-size: 21px; margin: 2em 0 .8em; }

/* ---------- 底部 ---------- */
.site-footer { background: #262019; color: #CFC6B4; margin-top: 0; }
.footer-main { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 48px; padding: 72px 0 56px; }
.footer-brand .brand-cn { color: #F0EADB; }
.footer-brand .brand-en { color: #8F8674; }
.footer-brand p { font-size: 14px; font-weight: 300; color: #A89E8B; max-width: 300px; margin: 18px 0 0; }
.footer-col h4 { font-size: 14px; font-weight: 500; letter-spacing: .18em; color: #F0EADB; margin-bottom: 18px; }
.footer-col a, .footer-col li { display: block; font-size: 14px; color: #A89E8B; font-weight: 300; margin-bottom: 10px; transition: color .2s; }
.footer-col a:hover { color: #E9E2D4; }
.footer-contact li { display: flex; gap: 10px; margin-bottom: 12px; }
.footer-contact svg { width: 17px; height: 17px; flex-shrink: 0; margin-top: 4px; color: #8F8674; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 22px 0;
  font-size: 12.5px;
  color: #7E7563;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .news-grid { grid-template-columns: repeat(2, 1fr); }
  .split { gap: 40px; }
}

@media (max-width: 900px) {
  .sec { padding: 80px 0; }
  .nav-toggle { display: flex; }
  .main-nav {
    position: fixed;
    top: 74px; left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
  }
  .main-nav.open { max-height: 340px; }
  .main-nav ul { flex-direction: column; gap: 0; padding: 12px 24px 20px; }
  .main-nav a { border-radius: 10px; padding: 14px 16px; }
  .values { grid-template-columns: 1fr; gap: 26px; }
  .split { grid-template-columns: 1fr; }
  .footer-main { grid-template-columns: 1fr 1fr; gap: 36px; }
  .stats { grid-template-columns: repeat(2, 1fr); row-gap: 34px; }
  .timeline { grid-template-columns: 84px 30px 1fr; }
  .detail-grid { grid-template-columns: 1fr; gap: 40px; }
  .detail-media { position: static; }
}

@media (max-width: 600px) {
  .container { padding: 0 20px; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .news-grid { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .sec-head h2 { font-size: 30px; }
  .split .body h2 { font-size: 28px; }
  .hero { min-height: 78vh; }
  .hero-content { padding-top: 90px; padding-bottom: 60px; }
  .sec-head.row .link-more { padding: 8px 0; min-height: 44px; display: inline-flex; align-items: center; }
  .brand { min-height: 44px; }
  .footer-col a, .footer-col li { padding: 10px 0; }
  .footer-main { grid-template-columns: 1fr; }
  .detail-info h1 { font-size: 28px; }
}
