/* ========================================================
   栖纳滋补 · 设计系统
   温润东方：暖米色 / 赭石 / 胭脂红 / 毛笔感 / 肌理
   ======================================================== */

:root {
  /* ----- 色彩 ----- */
  --paper:        #FBF5EB;   /* 主背景 - 宣纸白 */
  --paper-2:      #F4E9D6;   /* 次背景 - 暖米 */
  --paper-3:      #EBDCC2;   /* 卡片 - 米黄 */
  --linen:        #E2D2B4;   /* 描边米 */
  --line:         #D9C9AB;   /* 分隔线 */
  --line-soft:    #E8DCC4;

  --ink:          #221913;   /* 主文字 - 浓墨 */
  --ink-soft:     #4A3A2E;
  --ink-mute:     #7E6B57;
  --ink-faint:    #A8957D;

  --ochre:        #B66B3D;   /* 赭石 - 主品牌 */
  --ochre-deep:   #8E4F2A;
  --ochre-soft:   #D69A6F;

  --rouge:        #A4322D;   /* 胭脂红 - 强调/印章 */
  --rouge-deep:   #7C1F1B;
  --rouge-soft:   #C56A55;

  --gold:         #B89262;   /* 金 - 礼盒/会员 */
  --gold-soft:    #D9BC8E;

  --jade:         #6F7A52;   /* 茶绿 - 辅助 */
  --jade-soft:    #99A179;

  --bg-deep:      #1F1612;   /* 深色块 - 页脚等 */

  /* ----- 字体 ----- */
  --serif:  "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", serif;
  --sans:   "Noto Sans SC", "PingFang SC", "Microsoft Yahei", system-ui, sans-serif;
  --script: "ZCOOL XiaoWei", var(--serif);
  --en-serif: "Cormorant Garamond", "Times New Roman", serif;

  /* ----- 尺寸 ----- */
  --container: 1240px;
  --radius-s: 4px;
  --radius:   8px;
  --radius-l: 16px;
}

/* ========================================================
   基础重置
   ======================================================== */
*,*::before,*::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { overflow-x: hidden; }
body { overflow-x: hidden; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  font-size: 15px;
  line-height: 1.7;
  letter-spacing: 0.02em;
  /* 宣纸肌理 */
  background-image:
    radial-gradient(circle at 20% 30%, rgba(182,107,61,.04) 0, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(164,50,45,.03) 0, transparent 45%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.55  0 0 0 0 0.45  0 0 0 0 0.32  0 0 0 .08 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-attachment: fixed;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

/* ========================================================
   排版
   ======================================================== */
.serif { font-family: var(--serif); }
.script { font-family: var(--script); }

h1,h2,h3,h4 { font-family: var(--serif); color: var(--ink); margin: 0; line-height: 1.25; font-weight: 500; letter-spacing: .04em; }
h1 { font-size: clamp(40px, 5.4vw, 76px); font-weight: 600; }
h2 { font-size: clamp(28px, 3.4vw, 44px); }
h3 { font-size: 22px; }
h4 { font-size: 17px; }

p { margin: 0 0 1em; color: var(--ink-soft); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--en-serif);
  font-size: 13px; letter-spacing: .35em;
  text-transform: uppercase;
  color: var(--ochre-deep);
}
.eyebrow::before {
  content: ""; width: 28px; height: 1px; background: var(--ochre);
}

.hand-script { font-family: var(--script); font-size: 1.6em; }

/* 印章 / 品牌图形 */
.seal {
  display: inline-flex; align-items: center; justify-content: center;
  width: 60px; height: 60px;
  background: var(--rouge);
  color: var(--paper);
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .08em;
  line-height: 1;
  border-radius: 4px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--rouge), 0 0 0 4px var(--paper), 0 0 0 5px var(--rouge);
  transform: rotate(-3deg);
}
.seal--sm { width: 36px; height: 36px; font-size: 10px; }

/* ========================================================
   容器 / 网格
   ======================================================== */
.container { max-width: var(--container); margin: 0 auto; padding: 0 32px; }
.container-wide { max-width: 1480px; margin: 0 auto; padding: 0 32px; }

section { padding: 96px 0; position: relative; }
section.tight { padding: 64px 0; }

.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; margin-bottom: 56px; flex-wrap: wrap; }
.section-head .title-block { max-width: 640px; }
.section-head h2 { margin-top: 14px; }
.section-head .sub { color: var(--ink-mute); margin-top: 14px; font-size: 15px; }

/* ========================================================
   按钮
   ======================================================== */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 28px;
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: .15em;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  border-radius: 999px;
  transition: all .35s ease;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { background: var(--rouge-deep); border-color: var(--rouge-deep); }

.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }

.btn--rouge { background: var(--rouge); border-color: var(--rouge); }
.btn--rouge:hover { background: var(--rouge-deep); border-color: var(--rouge-deep); }

.btn--ochre { background: var(--ochre); border-color: var(--ochre); }
.btn--ochre:hover { background: var(--ochre-deep); border-color: var(--ochre-deep); }

.btn--small { padding: 10px 18px; font-size: 13px; letter-spacing: .12em; }
.btn--block { width: 100%; justify-content: center; }
.btn--text {
  background: none; border: none; padding: 0; color: var(--ochre-deep);
  border-bottom: 1px solid currentColor; border-radius: 0; letter-spacing: .12em;
}
.btn--text:hover { color: var(--rouge); background: none; }

/* ========================================================
   导航
   ======================================================== */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(251, 245, 235, 0.88);
  border-bottom: 1px solid var(--line-soft);
}
.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 18px 32px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}
.nav-brand { display: flex; align-items: center; gap: 14px; }
.nav-brand .seal { width: 44px; height: 44px; font-size: 12px; }
.nav-brand .brand-name {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: .25em;
  color: var(--ink);
}
.nav-brand .brand-tag {
  display: block;
  font-family: var(--en-serif);
  font-size: 10px;
  letter-spacing: .4em;
  color: var(--ink-mute);
  text-transform: uppercase;
  margin-top: 2px;
}

.nav-links {
  display: flex;
  gap: 36px;
  justify-content: center;
}
.nav-links a {
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: .2em;
  color: var(--ink-soft);
  position: relative;
  padding: 6px 0;
  transition: color .25s;
}
.nav-links a:hover { color: var(--rouge); }
.nav-links a.active { color: var(--ink); }
.nav-links a.active::after {
  content: ""; position: absolute; left: 50%; bottom: -2px;
  transform: translateX(-50%);
  width: 18px; height: 2px; background: var(--rouge);
  border-radius: 1px;
}

.nav-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}
.nav-icon-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent;
  border: 1px solid transparent;
  color: var(--ink);
  position: relative;
  transition: all .25s;
}
.nav-icon-btn:hover { background: var(--paper-2); border-color: var(--line); }
.nav-icon-btn svg { width: 18px; height: 18px; }
.nav-icon-btn .badge {
  position: absolute; top: 4px; right: 4px;
  background: var(--rouge); color: var(--paper);
  font-size: 10px; min-width: 16px; height: 16px;
  border-radius: 8px; padding: 0 4px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--sans); font-weight: 600;
}
.nav-icon-btn .badge:empty { display: none; }

.nav-login {
  font-family: var(--serif);
  font-size: 13px; letter-spacing: .2em;
  color: var(--ink); padding: 8px 18px;
  border: 1px solid var(--ink); border-radius: 999px;
  background: transparent; transition: all .25s;
}
.nav-login:hover { background: var(--ink); color: var(--paper); }
.nav-user {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 16px 6px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
}
.nav-user .avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--ochre); color: var(--paper);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 13px;
}
.nav-user .name { font-size: 13px; color: var(--ink); letter-spacing: .1em; }

/* 汉堡按钮 */
.nav-burger {
  display: none;
  flex-direction: column; justify-content: center; align-items: center; gap: 5px;
  width: 40px; height: 40px;
  background: transparent; border: 1px solid var(--line);
  border-radius: 8px; cursor: pointer; padding: 0; flex-shrink: 0;
}
.nav-burger span {
  display: block; width: 18px; height: 1.5px;
  background: var(--ink); border-radius: 1px;
  transition: all .3s ease;
}
.nav-burger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-burger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* 加盟咨询按钮（导航栏） */
.nav-cta {
  display: inline-flex; align-items: center;
  padding: 9px 20px;
  font-family: var(--serif); font-size: 13px; letter-spacing: .2em;
  background: var(--rouge); color: var(--paper);
  border-radius: 999px; white-space: nowrap;
  transition: background .25s;
}
.nav-cta:hover { background: var(--rouge-deep); }

/* 移动端抽屉 */
.mobile-drawer {
  position: fixed; inset: 0; z-index: 200;
  pointer-events: none; visibility: hidden;
}
.mobile-drawer.open { pointer-events: auto; visibility: visible; }
.mobile-drawer::before {
  content: ""; position: absolute; inset: 0;
  background: rgba(34,25,19,.5);
  opacity: 0; transition: opacity .35s;
  backdrop-filter: blur(3px);
}
.mobile-drawer.open::before { opacity: 1; }
.mobile-drawer-inner {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(340px, 90vw);
  background: var(--paper);
  display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .35s cubic-bezier(.4,0,.2,1);
  overflow-y: auto;
}
.mobile-drawer.open .mobile-drawer-inner { transform: translateX(0); }

.mobile-drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line-soft);
}
.drawer-close {
  width: 36px; height: 36px; border-radius: 50%;
  background: transparent; border: 1px solid var(--line);
  color: var(--ink-soft); font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
}
.drawer-close:hover { background: var(--paper-2); }

.mobile-nav {
  flex: 1;
  display: flex; flex-direction: column;
  padding: 12px 0;
}
.mobile-nav a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 28px;
  font-family: var(--serif); font-size: 16px; letter-spacing: .2em;
  color: var(--ink); border-bottom: 1px solid var(--line-soft);
  transition: color .2s, padding-left .2s;
}
.mobile-nav a:hover { color: var(--rouge); padding-left: 36px; }
.mobile-nav a span { font-family: var(--en-serif); font-size: 11px; letter-spacing: .3em; color: var(--ink-faint); }

.mobile-drawer-foot {
  padding: 24px;
  border-top: 1px solid var(--line-soft);
  display: flex; flex-direction: column; gap: 16px;
}
.m-contact { display: flex; flex-direction: column; gap: 10px; }
.m-row {
  display: flex; justify-content: space-between;
  font-size: 13px; color: var(--ink-mute); letter-spacing: .1em;
}
.m-row b { font-weight: 500; color: var(--ink); }

@media (max-width: 960px) {
  .nav-inner { grid-template-columns: 1fr auto; }
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .nav-burger { display: flex; }
}

/* ========================================================
   页脚
   ======================================================== */
.footer {
  background: var(--bg-deep);
  color: #C9B89A;
  padding: 80px 0 32px;
  margin-top: 80px;
  position: relative;
}
.footer::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--ochre), transparent);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr 1.2fr;
  gap: 56px;
  margin-bottom: 56px;
}
.footer h4 {
  color: #E6D5B5;
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: .3em;
  margin-bottom: 22px;
}
.footer-brand .seal { background: var(--ochre); box-shadow: 0 0 0 2px var(--ochre), 0 0 0 4px var(--bg-deep), 0 0 0 5px var(--ochre); }
.footer-brand .brand-name {
  font-family: var(--serif); font-size: 24px; font-weight: 600;
  letter-spacing: .25em; color: #F0DEBE; margin: 18px 0 10px;
}
.footer-brand p { color: #9D8765; font-size: 13px; line-height: 1.9; }

.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.footer a { color: #9D8765; font-size: 13px; transition: color .25s; }
.footer a:hover { color: var(--gold-soft); }

.footer-contact .qr {
  width: 120px; height: 120px; background: var(--paper); border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-mute); font-size: 11px;
  border: 1px solid var(--ochre-deep);
  margin-top: 12px;
  position: relative;
  background-image:
    repeating-conic-gradient(var(--ink) 0 25%, transparent 0 50%);
  background-size: 8px 8px;
  background-position: center;
}
.footer-contact .qr::after {
  content: "扫码加企微"; position: absolute; bottom: -22px; left: 0; font-size: 11px; color: #7E6B57;
}

.footer-bottom {
  border-top: 1px solid #3A2A1F;
  padding-top: 24px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: #7E6B57; letter-spacing: .1em;
  flex-wrap: wrap; gap: 14px;
}
.footer-bottom a { color: #7E6B57; }
.footer-bottom a:hover { color: var(--gold-soft); }

@media (max-width: 960px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
}

/* ========================================================
   表单
   ======================================================== */
.field { display: flex; flex-direction: column; gap: 8px; }
.field label {
  font-family: var(--serif);
  font-size: 13px; letter-spacing: .2em; color: var(--ink-soft);
}
.field label .req { color: var(--rouge); margin-left: 4px; }
.field input, .field select, .field textarea {
  font-family: var(--sans);
  font-size: 15px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  border-radius: 6px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--ochre);
  box-shadow: 0 0 0 3px rgba(182,107,61,.15);
}
.field textarea { resize: vertical; min-height: 110px; }
.field .hint { font-size: 12px; color: var(--ink-faint); }
.field .err { font-size: 12px; color: var(--rouge); display: none; }
.field.invalid input,
.field.invalid select,
.field.invalid textarea { border-color: var(--rouge); }
.field.invalid .err { display: block; }

.checkbox, .radio {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; color: var(--ink-soft); cursor: pointer;
}
.checkbox input, .radio input { accent-color: var(--ochre); width: 16px; height: 16px; }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px 28px;
}
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 680px) { .form-grid { grid-template-columns: 1fr; } }

/* ========================================================
   卡片 / 通用组件
   ======================================================== */
.card {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-l);
  overflow: hidden;
  transition: transform .35s ease, box-shadow .35s ease, border-color .35s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 30px 60px -30px rgba(60,32,18,.18); border-color: var(--line); }

.tag {
  display: inline-block;
  padding: 4px 10px;
  font-size: 11px;
  letter-spacing: .15em;
  border-radius: 999px;
  background: var(--paper-3);
  color: var(--ochre-deep);
  border: 1px solid var(--linen);
}
.tag--rouge { background: var(--rouge); color: var(--paper); border-color: var(--rouge); }
.tag--gold  { background: var(--gold); color: var(--paper); border-color: var(--gold); }
.tag--jade  { background: var(--jade); color: var(--paper); border-color: var(--jade); }
.tag--ghost { background: transparent; color: var(--ink-mute); border-color: var(--line); }

/* 占位图片框 */
.ph {
  position: relative;
  background:
    repeating-linear-gradient(45deg, rgba(182,107,61,.06) 0 1px, transparent 1px 12px),
    var(--paper-3);
  display: flex; align-items: center; justify-content: center;
  color: var(--ochre-deep);
  font-family: var(--serif);
  font-size: 12px; letter-spacing: .25em;
  text-align: center;
  border: 1px solid var(--linen);
  overflow: hidden;
}
.ph::after {
  content: ""; position: absolute; inset: 12px;
  border: 1px dashed rgba(142, 79, 42, .35);
  border-radius: inherit;
  pointer-events: none;
}
.ph-label { position: relative; z-index: 1; padding: 8px 16px; background: var(--paper); border: 1px solid var(--linen); border-radius: 999px; max-width: 80%; line-height: 1.3; }

/* 印章浮层装饰 */
.deco-seal-corner {
  position: absolute; top: 24px; right: 24px;
  display: flex; flex-direction: column; gap: 6px; align-items: center;
}
.deco-seal-corner .seal { transform: rotate(4deg); }

/* 中式分割线 */
.divider-cn {
  display: flex; align-items: center; gap: 16px; color: var(--ink-faint); margin: 32px 0;
}
.divider-cn::before, .divider-cn::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.divider-cn .dot { width: 6px; height: 6px; background: var(--ochre); border-radius: 50%; }

/* 流式 marquee */
.marquee {
  overflow: hidden; white-space: nowrap;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 18px 0;
  background: var(--paper-2);
}
.marquee-track {
  display: inline-flex; gap: 80px; align-items: center;
  animation: marquee 40s linear infinite;
}
.marquee-track span {
  font-family: var(--serif); font-size: 18px; letter-spacing: .25em; color: var(--ink-soft);
  display: inline-flex; align-items: center; gap: 14px;
}
.marquee-track span::before { content: "•"; color: var(--rouge); }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* hero 装饰 - SVG 云纹 / 圆 / 燕子 */
.deco-circle {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--ochre);
  opacity: .35;
  pointer-events: none;
}

.fade-in { animation: fadeIn .8s ease both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* 模态 */
.modal-mask {
  position: fixed; inset: 0;
  background: rgba(34,25,19,.55);
  display: none;
  align-items: center; justify-content: center;
  z-index: 100;
  backdrop-filter: blur(4px);
  padding: 24px;
}
.modal-mask.open { display: flex; }
.modal {
  background: var(--paper);
  border-radius: var(--radius-l);
  max-width: 520px;
  width: 100%;
  padding: 40px;
  position: relative;
  border: 1px solid var(--line);
  box-shadow: 0 40px 80px -20px rgba(20,10,5,.4);
}
.modal h3 { font-size: 24px; margin-bottom: 8px; }
.modal .close {
  position: absolute; top: 16px; right: 16px;
  width: 32px; height: 32px; border-radius: 50%;
  background: transparent; border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-soft);
}
.modal .close:hover { background: var(--paper-2); }

.toast {
  position: fixed;
  bottom: 32px; left: 50%; transform: translateX(-50%) translateY(40px);
  background: var(--ink); color: var(--paper);
  padding: 14px 24px;
  border-radius: 999px;
  font-family: var(--serif); letter-spacing: .15em; font-size: 14px;
  opacity: 0; transition: all .3s;
  z-index: 200;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Hero shared */
.page-hero {
  padding: 72px 0 56px;
  position: relative;
  overflow: hidden;
}
.page-hero .crumbs {
  font-family: var(--en-serif);
  font-size: 12px; letter-spacing: .35em;
  color: var(--ink-mute); text-transform: uppercase;
  margin-bottom: 14px;
}
.page-hero h1 { font-size: clamp(38px, 4.8vw, 64px); }
.page-hero .lead { font-size: 17px; color: var(--ink-soft); max-width: 640px; margin-top: 18px; }

/* utility */
.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; }
.muted { color: var(--ink-mute); }
.center { text-align: center; }
.hidden { display: none !important; }

/* ========================================================
   全局移动端适配
   ======================================================== */
@media (max-width: 680px) {
  .container, .container-wide { padding: 0 20px; }
  section { padding: 64px 0; }
  section.tight { padding: 44px 0; }
  h1 { font-size: clamp(32px, 8vw, 56px); }
  h2 { font-size: clamp(24px, 6vw, 36px); }
  .section-head { flex-direction: column; align-items: flex-start; gap: 16px; margin-bottom: 36px; }
  .footer-grid { grid-template-columns: 1fr !important; gap: 28px; }
  .footer { padding: 48px 0 24px; margin-top: 48px; }
  .modal { padding: 28px 24px; }
  .page-hero { padding: 48px 0 32px; }
  .page-hero h1 { font-size: clamp(30px, 7vw, 48px); }
}
