/* ==========================================================================
   qwnn.cn 全站全局样式表（唯一）
   风格：中式人文 · 竹青 + 米白 + 墨黑 · 虚实叠加通透立体
   禁止：内联样式、外部字体/CDN、框架
   所有页面仅引用本文件 + css/<本页>.css，页面私有样式放后者
   ========================================================================== */

/* ---------- 1. 设计令牌（:root 变量，全站统一引用） ---------- */
:root {
  /* 竹青色系 */
  --bamboo: #567b4e;        /* 竹青主色 */
  --bamboo-deep: #3f5f3a;   /* 竹青深（topbar、按压态） */
  --bamboo-light: #87a67f;  /* 竹青浅（hover、点缀） */
  --bamboo-mist: #e8efe5;   /* 竹青雾（极浅底、标签底） */

  /* 米白色系 */
  --rice: #f6f2e9;          /* 米白主背景 */
  --rice-deep: #efe8d8;     /* 米白深（分区块底） */
  --paper: #fbfaf6;         /* 纸白（卡片、表单底） */

  /* 墨黑色系 */
  --ink: #23241f;           /* 墨黑主文字 */
  --ink-soft: #4a4c44;      /* 墨灰（次要文字） */

  /* 线条 */
  --line: rgba(35, 36, 31, .14);

  /* 字体（禁止外部字体） */
  --font-title: Georgia, "Songti SC", "STSong", "SimSun", serif;
  --font-body: "PingFang SC", "Microsoft YaHei", sans-serif;

  /* 尺寸与圆角 */
  --container-w: 1200px;
  --radius: 10px;
  --radius-lg: 18px;

  /* 阴影：分层投影营造通透立体感 */
  --shadow-sm: 0 1px 3px rgba(35, 36, 31, .06);
  --shadow-md: 0 8px 24px rgba(35, 36, 31, .08);
  --shadow-lg: 0 18px 48px rgba(35, 36, 31, .12);
  --shadow-navbar: 0 6px 20px rgba(35, 36, 31, .10);

  /* 动效 */
  --ease: cubic-bezier(.22, .61, .36, 1);
  --dur: .6s;
}

/* ---------- 2. Reset 与基础排版 ---------- */
*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.8;
  color: var(--ink);
  background: var(--rice);
  /* 页面载入渐显 */
  animation: pageIn .7s var(--ease) both;
}

@keyframes pageIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
}
h1 { font-size: 2.6rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.2rem; }
h5 { font-size: 1.05rem; }
h6 { font-size: .95rem; }

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

a {
  color: var(--bamboo);
  text-decoration: none;
  transition: color .25s var(--ease);
}
a:hover { color: var(--bamboo-deep); }

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

ul, ol { list-style: none; }

figure { margin: 0; }
figcaption { font-size: .85rem; color: var(--ink-soft); margin-top: .4em; }

hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

::selection { background: var(--bamboo); color: #fff; }

/* ---------- 3. 容器与栅格工具类 ---------- */
.container {
  width: 100%;
  max-width: var(--container-w);
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.grid-2, .grid-3, .grid-4 {
  display: grid;
  gap: 28px;
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* 区块纵向留白 */
.section { padding: 80px 0; }
.section-tight { padding: 56px 0; }

/* ---------- 4. 顶部信息条 .topbar ---------- */
.topbar {
  background: var(--bamboo-deep);
  color: var(--rice);
  font-size: .78rem;
  letter-spacing: .02em;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 34px;
  flex-wrap: wrap;
}
.topbar a { color: var(--rice); opacity: .92; }
.topbar a:hover { color: #fff; opacity: 1; }
.topbar .topbar-left,
.topbar .topbar-right { display: inline-flex; gap: 18px; align-items: center; }
.topbar .sep { opacity: .4; }

/* ---------- 5. 固定导航 .navbar ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(246, 242, 233, .82);   /* 初始半透明米白 */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: background .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
/* 滚动后：米白实底 + 墨黑描边 + 投影 */
body.scrolled .navbar,
.navbar.scrolled {
  background: var(--rice);
  border-bottom-color: var(--line);
  box-shadow: var(--shadow-navbar);
}
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

/* logo 区 */
.navbar .logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
/* logo.png 真实宽高待 IMAGE_MANIFEST.md 确认后更新，此处给合理占位 */
.navbar .logo img {
  height: 40px; width: auto;
}
.navbar .logo .logo-text {
  font-family: var(--font-title);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: .04em;
}
.navbar .logo .logo-text em { color: var(--bamboo); font-style: normal; }

/* 一级菜单 */
.nav-menu { display: flex; align-items: center; gap: 4px; }
.nav-menu > li { position: relative; }
.nav-menu > li > a {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
  font-size: .95rem;
  color: var(--ink);
  position: relative;
}
/* hover 下划线生长动效 */
.nav-menu > li > a::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px;
  bottom: 4px;
  height: 2px;
  background: var(--bamboo);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease);
}
.nav-menu > li > a:hover::after,
.nav-menu > li > a.active::after { transform: scaleX(1); }

/* 当前页激活态：竹青底 */
.nav-menu > li > a.active {
  background: var(--bamboo);
  color: #fff;
  border-radius: 6px;
}
.nav-menu > li > a.active::after { display: none; }

/* 下拉箭头 */
.nav-menu .caret {
  width: 10px; height: 10px;
  stroke: currentColor;
  transition: transform .3s var(--ease);
}
li.dropdown:hover > a .caret,
li.dropdown.open > a .caret { transform: rotate(180deg); }

/* 下拉面板 */
.dropdown-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 220px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s;
}
li.dropdown:hover > .dropdown-panel,
li.dropdown.open > .dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown-panel a {
  display: block;
  padding: 9px 14px;
  font-size: .9rem;
  color: var(--ink-soft);
  border-radius: 6px;
}
.dropdown-panel a:hover {
  background: var(--bamboo-mist);
  color: var(--bamboo-deep);
}
.dropdown-panel .dropdown-all {
  border-top: 1px solid var(--line);
  margin-top: 6px;
  color: var(--bamboo);
  font-weight: 600;
}

/* 联系我们按钮（菜单末项） */
.nav-menu > li > a.btn-primary {
  color: #fff;
  padding: 9px 20px;
}
.nav-menu > li > a.btn-primary::after { display: none; }

/* 汉堡按钮（移动端） */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  padding: 10px;
}
.hamburger span {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .3s var(--ease), opacity .3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- 6. 页脚 .footer ---------- */
.footer {
  background: var(--ink);
  color: rgba(246, 242, 233, .85);
  padding: 64px 0 0;
  margin-top: 80px;
}
.footer h4 {
  color: var(--rice);
  margin-bottom: 18px;
  font-size: 1.05rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 48px;
}
.footer .footer-about p {
  color: rgba(246, 242, 233, .65);
  font-size: .9rem;
  margin: 14px 0;
}
.footer .footer-slogan {
  font-family: var(--font-title);
  color: var(--bamboo-light);
  font-size: .95rem;
  border-left: 3px solid var(--bamboo);
  padding-left: 12px;
}
/* 页脚 logo 区（墨底反白） */
.footer .footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.footer .footer-logo .logo-text {
  font-family: var(--font-title);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--rice);
}
.footer-links li { margin-bottom: 10px; }
.footer-links a {
  color: rgba(246, 242, 233, .75);
  font-size: .9rem;
}
.footer-links a:hover { color: #fff; padding-left: 4px; }

/* 联系方式栏 */
.footer-contact li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
  font-size: .9rem;
}
.footer-contact svg {
  width: 18px; height: 18px;
  stroke: var(--bamboo-light);
  flex-shrink: 0;
  margin-top: 5px;
}
.footer-contact a { color: rgba(246, 242, 233, .85); }
.footer-contact a:hover { color: #fff; }

/* 底部版权条 */
.footer-bottom {
  border-top: 1px solid rgba(246, 242, 233, .12);
  padding: 18px 0;
  text-align: center;
  font-size: .78rem;
  color: rgba(246, 242, 233, .55);
}
.footer-bottom a { color: rgba(246, 242, 233, .65); }
.footer-bottom a:hover { color: #fff; }

/* ---------- 7. 通用组件 ---------- */

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 999px;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .3s var(--ease);
  font-family: var(--font-body);
}
.btn-primary {
  background: var(--bamboo);
  color: #fff;
  box-shadow: 0 6px 16px rgba(86, 123, 78, .35);
}
.btn-primary:hover {
  background: var(--bamboo-deep);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(86, 123, 78, .4);
}
.btn-outline {
  background: transparent;
  color: var(--bamboo);
  border-color: var(--bamboo);
}
.btn-outline:hover {
  background: var(--bamboo);
  color: #fff;
}
.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
}
.btn-ghost:hover { color: var(--bamboo); background: var(--bamboo-mist); }

/* 小节标题：衬线大标题 + 竹青短线 + 副标题 */
.section-head { text-align: center; margin-bottom: 48px; }
.section-head .eyebrow {
  display: inline-block;
  font-size: .8rem;
  letter-spacing: .2em;
  color: var(--bamboo);
  margin-bottom: 10px;
}
.section-head h2 { margin-bottom: 12px; }
.section-head .bar {
  width: 48px; height: 3px;
  background: var(--bamboo);
  margin: 0 auto 16px;
  border-radius: 2px;
}
.section-head .sub {
  font-size: .95rem;
  color: var(--ink-soft);
  max-width: 640px;
  margin: 0 auto;
}
/* 左对齐变体 */
.section-head.left { text-align: left; }
.section-head.left .bar { margin-left: 0; }

/* 徽标 */
.tag {
  display: inline-block;
  padding: 3px 12px;
  font-size: .75rem;
  border-radius: 999px;
  background: var(--bamboo-mist);
  color: var(--bamboo-deep);
  border: 1px solid rgba(86, 123, 78, .25);
}
.tag-warm { background: var(--rice-deep); color: var(--ink-soft); border-color: var(--line); }

/* 卡片 */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.card-hover:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.card h3, .card h4 { margin-bottom: 10px; }
.card p { font-size: .92rem; margin-bottom: 0; }
.card .card-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--bamboo-mist);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.card .card-icon svg { width: 26px; height: 26px; stroke: var(--bamboo); }

/* 面包屑 */
.crumb {
  font-size: .85rem;
  color: var(--ink-soft);
  padding: 18px 0;
}
.crumb a { color: var(--ink-soft); }
.crumb a:hover { color: var(--bamboo); }
.crumb .sep { margin: 0 8px; opacity: .5; }
.crumb .current { color: var(--bamboo); }

/* 表单控件 */
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: .9rem;
  margin-bottom: 8px;
  color: var(--ink);
  font-weight: 600;
}
input[type="text"],
input[type="tel"],
input[type="email"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 12px 16px;
  font-size: .95rem;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--bamboo);
  box-shadow: 0 0 0 3px rgba(86, 123, 78, .15);
}
textarea { min-height: 120px; resize: vertical; }
.checkbox-row { display: flex; align-items: center; gap: 8px; font-size: .88rem; color: var(--ink-soft); }
.checkbox-row input { width: auto; }

/* FAQ <details> */
details.faq {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
}
details.faq summary {
  padding: 16px 20px;
  cursor: pointer;
  font-weight: 600;
  font-size: .95rem;
  list-style: none;
  position: relative;
  padding-right: 40px;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
  content: "+";
  position: absolute;
  right: 18px; top: 50%;
  transform: translateY(-50%);
  color: var(--bamboo);
  font-size: 1.2rem;
  transition: transform .3s var(--ease);
}
details.faq[open] summary::after { transform: translateY(-50%) rotate(45deg); }
details.faq .faq-body {
  padding: 0 20px 18px;
  font-size: .9rem;
  color: var(--ink-soft);
}

/* 数字统计 */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}
.stats .stat-num {
  font-family: var(--font-title);
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--bamboo);
  line-height: 1.1;
}
.stats .stat-label {
  font-size: .88rem;
  color: var(--ink-soft);
  margin-top: 6px;
}

/* 引言 */
.quote {
  font-family: var(--font-title);
  font-size: 1.2rem;
  line-height: 2;
  color: var(--ink);
  padding: 24px 32px;
  border-left: 4px solid var(--bamboo);
  background: var(--bamboo-mist);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.quote cite {
  display: block;
  font-size: .85rem;
  font-style: normal;
  color: var(--ink-soft);
  margin-top: 10px;
}

/* 流程节点 */
.steps { counter-reset: step; }
.step {
  position: relative;
  padding: 28px 28px 28px 80px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
}
.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 24px; top: 28px;
  font-family: var(--font-title);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--bamboo);
}
.step h4 { margin-bottom: 6px; }
.step p { font-size: .9rem; margin: 0; }

/* ---------- 8. 滚动渐入动画 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
/* 减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  body { animation: none; }
}

/* ---------- 9. 返回顶部 ---------- */
.back-top {
  position: fixed;
  right: 28px; bottom: 28px;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--bamboo);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all .3s var(--ease);
  z-index: 900;
}
.back-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-top:hover { background: var(--bamboo-deep); }
.back-top svg { width: 20px; height: 20px; stroke: #fff; }

/* ---------- 10. 响应式断点 ---------- */

/* ≤992px */
@media (max-width: 992px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  h1 { font-size: 2.1rem; }
  h2 { font-size: 1.7rem; }

  /* 汉堡菜单展开 */
  .hamburger { display: flex; }
  .nav-menu {
    position: fixed;
    top: 0; right: 0;
    width: 320px; max-width: 85vw;
    height: 100vh;
    background: var(--rice);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 88px 20px 20px;
    box-shadow: -8px 0 30px rgba(35, 36, 31, .15);
    transform: translateX(100%);
    transition: transform .35s var(--ease);
    overflow-y: auto;
  }
  .nav-menu.open { transform: translateX(0); }
  .nav-menu > li > a { padding: 14px 12px; border-bottom: 1px solid var(--line); }
  .nav-menu > li > a::after { display: none; }

  /* 移动端下拉变手风琴 */
  .dropdown-panel {
    position: static;
    opacity: 1; visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    display: none;
    padding-left: 18px;
  }
  li.dropdown.open > .dropdown-panel { display: block; }
}

/* ≤768px */
@media (max-width: 768px) {
  .section { padding: 56px 0; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .topbar .topbar-right { display: none; }   /* topbar 精简 */
  .topbar .container { justify-content: center; }
  .step { padding-left: 24px; }
  .step::before { position: static; display: block; margin-bottom: 8px; }
}

/* ≤480px */
@media (max-width: 480px) {
  .container { padding-left: 16px; padding-right: 16px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .btn { padding: 10px 22px; font-size: .9rem; }
  h1 { font-size: 1.8rem; }
  .navbar .logo .logo-text { font-size: 1.1rem; }
}
