/* =====================================================================
   jx-xtm.com · 许昌漯河八大员证书咨询网
   base.css —— 全站设计系统（统一导航 / 页脚 / 色彩 / 动效 / 通用组件）
   风格：轻户外穿搭 · 米白 + 浅绿 + 浅卡其 · 矩阵灵动排布
   技术：纯 CSS3，无框架，无第三方依赖
   ===================================================================== */

/* ============ 1. 设计变量 ============ */
:root {
  /* 色板：米白 */
  --cream-50: #FDFBF5;
  --cream-100: #FAF6EC;
  --cream-200: #F4EEDD;
  --cream-300: #ECE3CD;
  /* 色板：浅卡其 */
  --khaki-100: #EAE0C4;
  --khaki-200: #DCCBA4;
  --khaki-300: #C8B184;
  --khaki-400: #AE9667;
  /* 色板：浅绿 */
  --green-100: #EAF0E4;
  --green-200: #D3E1CA;
  --green-300: #B1C9A6;
  --green-400: #8DB27F;
  --green-500: #67975B;
  --green-600: #4E7A45;
  --green-700: #3A5F34;
  /* 文字 */
  --ink-900: #2E2D26;
  --ink-700: #55524A;
  --ink-500: #7D7A6E;
  --ink-300: #A7A393;
  /* 线条与底 */
  --line: #E6DEC9;
  --line-soft: #EFE9D6;
  --white: #FFFFFF;
  /* 阴影 */
  --shadow-sm: 0 2px 12px rgba(78, 72, 54, .08);
  --shadow-md: 0 12px 32px rgba(78, 72, 54, .12);
  --shadow-lg: 0 26px 64px rgba(78, 72, 54, .16);
  /* 圆角 */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 36px;
  /* 字体 */
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", sans-serif;
  /* 尺寸 */
  --nav-h: 76px;
  --container: 1200px;
  --gutter: 24px;
}

/* ============ 2. 重置与基础 ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink-700);
  background-color: var(--cream-100);
  /* 织物般的细点纹理（轻户外帆布质感） */
  background-image: radial-gradient(rgba(78, 72, 54, .045) 1px, transparent 1px);
  background-size: 26px 26px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color .25s ease; }
ul, ol { list-style: none; }
button { font-family: inherit; border: none; background: none; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 1rem; }
h1, h2, h3, h4 { color: var(--ink-900); line-height: 1.35; font-weight: 700; }
em, i { font-style: normal; }
::selection { background: var(--green-300); color: var(--ink-900); }

/* 滚动条 */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--cream-200); }
::-webkit-scrollbar-thumb { background: var(--khaki-200); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--khaki-300); }

/* ============ 3. 布局工具 ============ */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.section { position: relative; padding: 84px 0; }
.section-tight { padding: 56px 0; }
.section-alt { background-color: var(--cream-200); }
.section-green { background-color: var(--green-100); }
.section-khaki { background-color: var(--khaki-100); }

/* 板块头 */
.sec-head { max-width: 720px; margin: 0 auto 52px; text-align: center; position: relative; }
.sec-head.left { margin-left: 0; text-align: left; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; letter-spacing: 3px; color: var(--green-600);
  background: var(--green-100); border: 1px solid var(--green-200);
  padding: 6px 14px; border-radius: 999px; margin-bottom: 16px;
}
.eyebrow::before { content: ""; width: 6px; height: 6px; background: var(--green-500); border-radius: 50%; }
.sec-head h2 { font-size: clamp(28px, 3.4vw, 40px); letter-spacing: 2px; }
.sec-head h2 em { color: var(--green-600); }
.sec-head .sub { margin-top: 14px; color: var(--ink-500); font-size: 15px; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 30px; border-radius: 999px; font-size: 15px; font-weight: 600;
  border: 2px solid transparent; cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease, color .25s ease, border-color .25s ease;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary { background: var(--green-600); color: var(--cream-50); box-shadow: 0 8px 22px rgba(78, 122, 69, .35); }
.btn-primary:hover { background: var(--green-700); transform: translateY(-2px); box-shadow: 0 12px 28px rgba(78, 122, 69, .42); }
.btn-khaki { background: var(--khaki-200); color: var(--ink-900); }
.btn-khaki:hover { background: var(--khaki-300); transform: translateY(-2px); }
.btn-ghost { border-color: var(--green-500); color: var(--green-600); background: transparent; }
.btn-ghost:hover { background: var(--green-100); transform: translateY(-2px); }
.btn-light { background: var(--cream-50); color: var(--green-700); }
.btn-light:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn svg { width: 18px; height: 18px; }

/* 标签 */
.tag {
  display: inline-block; font-size: 12px; padding: 4px 12px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--ink-500); background: var(--cream-50);
}
.tag.green { border-color: var(--green-300); color: var(--green-600); background: var(--green-100); }
.tag.khaki { border-color: var(--khaki-200); color: var(--khaki-400); background: var(--khaki-100); }

/* 菱形点缀（矩阵灵动的核心符号） */
.diamond {
  width: 14px; height: 14px; transform: rotate(45deg);
  background: var(--green-300); border-radius: 3px; flex: none;
}
.diamond.khaki { background: var(--khaki-200); }
.diamond.line { background: transparent; border: 2px solid var(--green-400); }

/* 通用卡片 */
.card {
  background: var(--cream-50); border: 1px solid var(--line-soft);
  border-radius: var(--radius-md); box-shadow: var(--shadow-sm);
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: var(--green-200); }

/* 网格助手 */
.grid { display: grid; gap: var(--gutter); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ============ 4. 顶部导航（全站统一） ============ */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  height: var(--nav-h);
  display: flex; align-items: center;
  background: transparent;
  transition: background .35s ease, box-shadow .35s ease, backdrop-filter .35s ease;
}
.site-header.scrolled {
  background: rgba(250, 246, 236, .94);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 6px 24px rgba(78, 72, 54, .10);
  border-bottom: 1px solid var(--line-soft);
}
.header-inner { display: flex; align-items: center; flex-wrap: nowrap; gap: 20px; height: 100%; }

/* 品牌 */
.brand { display: flex; align-items: center; gap: 12px; flex: none; }
.brand-mark { width: 46px; height: 46px; border-radius: 14px; box-shadow: var(--shadow-sm); }
.brand-name { display: flex; flex-direction: column; line-height: 1.25; }
.brand-name strong { font-size: 19px; color: var(--ink-900); letter-spacing: 2px; font-weight: 800; }
.brand-name em { font-size: 11.5px; color: var(--green-600); letter-spacing: 1px; margin-top: 2px; }

/* 导航列表 */
.site-nav { margin-left: auto; }
.nav-list { display: flex; align-items: center; flex-wrap: nowrap; gap: 4px; }
.nav-list > li { position: relative; flex: none; }
.nav-list > li > a {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 10px 12px; font-size: 15px; font-weight: 600; color: var(--ink-700);
  border-radius: 10px; position: relative; white-space: nowrap;
}
.nav-list > li > a::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 4px; height: 2px;
  background: var(--green-500); border-radius: 2px;
  transform: scaleX(0); transform-origin: left; transition: transform .3s ease;
}
.nav-list > li > a:hover { color: var(--green-600); }
.nav-list > li > a:hover::after,
.nav-list > li > a.active::after { transform: scaleX(1); }
.nav-list > li > a.active { color: var(--green-600); }
.nav-list > li.has-drop > a::before {
  content: ""; width: 6px; height: 6px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor;
  transform: rotate(45deg) translateY(-2px); opacity: .7;
}

/* 下拉面板 */
.drop-panel {
  position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%) translateY(8px);
  min-width: 200px; padding: 12px; background: var(--cream-50);
  border: 1px solid var(--line-soft); border-radius: var(--radius-md);
  box-shadow: var(--shadow-md); opacity: 0; visibility: hidden;
  transition: opacity .28s ease, transform .28s ease, visibility .28s;
}
.drop-panel::before {
  content: ""; position: absolute; top: -8px; left: 50%; transform: translateX(-50%) rotate(45deg);
  width: 14px; height: 14px; background: var(--cream-50); border-left: 1px solid var(--line-soft); border-top: 1px solid var(--line-soft);
}
.nav-list > li:hover .drop-panel,
.nav-list > li:focus-within .drop-panel { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.drop-list li a, .drop-grid li a {
  display: block; padding: 9px 14px; border-radius: 8px; font-size: 14px; color: var(--ink-700);
  transition: background .2s ease, color .2s ease, padding-left .2s ease;
}
.drop-list li a:hover, .drop-grid li a:hover { background: var(--green-100); color: var(--green-700); padding-left: 18px; }
.drop-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px; width: 320px; }

/* 电话 CTA */
.header-tel {
  display: inline-flex; align-items: center; gap: 10px; flex: none;
  padding: 8px 18px; border-radius: 999px; background: var(--green-600); color: var(--cream-50);
  box-shadow: 0 6px 18px rgba(78, 122, 69, .35);
  transition: background .25s ease, transform .25s ease;
}
.header-tel:hover { background: var(--green-700); transform: translateY(-2px); }
.header-tel svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.header-tel span { display: flex; flex-direction: column; line-height: 1.2; }
.header-tel em { font-size: 11px; opacity: .85; letter-spacing: 1px; }
.header-tel strong { font-size: 15px; letter-spacing: .5px; }

/* 汉堡按钮 */
.nav-toggle { display: none; width: 44px; height: 44px; border-radius: 10px; flex-direction: column; align-items: center; justify-content: center; gap: 5px; background: var(--cream-200); }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--ink-900); border-radius: 2px; transition: transform .3s ease, opacity .3s ease; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* 移动端菜单 */
.mobile-menu {
  position: fixed; top: var(--nav-h); left: 0; right: 0; z-index: 890;
  background: var(--cream-50); border-bottom: 1px solid var(--line-soft);
  box-shadow: var(--shadow-md); padding: 18px var(--gutter) 26px;
  transform: translateY(-16px); opacity: 0; visibility: hidden;
  transition: transform .32s ease, opacity .32s ease, visibility .32s;
  max-height: calc(100vh - var(--nav-h)); overflow-y: auto;
}
.mobile-menu.open { transform: none; opacity: 1; visibility: visible; }
.mobile-menu .m-group { margin-bottom: 14px; }
.mobile-menu .m-group > a { display: block; font-weight: 700; color: var(--ink-900); font-size: 16px; padding: 8px 4px; border-bottom: 1px dashed var(--line); }
.mobile-menu .m-sub { display: flex; flex-wrap: wrap; gap: 6px 0; padding: 6px 0 2px 10px; }
.mobile-menu .m-sub a { font-size: 13.5px; color: var(--ink-500); padding: 3px 12px 3px 0; margin-right: 10px; }
.mobile-menu .m-sub a:hover { color: var(--green-600); }
.m-tel { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 14px; padding: 13px; border-radius: 999px; background: var(--green-600); color: var(--cream-50); font-weight: 700; }

/* ============ 5. 页脚（全站统一） ============ */
.site-footer { background: var(--green-700); color: rgba(253, 251, 245, .82); margin-top: 0; }
.footer-top {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 44px;
  padding: 64px 0 48px;
}
.f-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.f-logo img { width: 52px; height: 52px; border-radius: 14px; }
.f-logo strong { display: block; color: var(--cream-50); font-size: 19px; letter-spacing: 2px; }
.f-logo em { font-size: 12px; color: var(--green-200); letter-spacing: 1px; }
.f-col h4 {
  color: var(--cream-50); font-size: 15px; letter-spacing: 2px; margin-bottom: 18px;
  padding-bottom: 10px; border-bottom: 1px dashed rgba(209, 225, 202, .35);
}
.f-col ul li { margin-bottom: 10px; }
.f-col ul a { color: rgba(253, 251, 245, .78); font-size: 14px; transition: color .2s ease, padding-left .2s ease; }
.f-col ul a:hover { color: var(--cream-50); padding-left: 6px; }
.f-contact li { font-size: 14px; }
.f-contact a { color: rgba(253, 251, 245, .9); }
.f-brand > p { font-size: 14px; line-height: 1.9; }
.f-loc { margin-top: 12px; font-size: 13px; color: var(--green-200); display: flex; align-items: center; gap: 8px; }
.f-loc::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--khaki-200); }
.f-btn {
  display: inline-flex; margin-top: 16px; padding: 10px 24px; border-radius: 999px;
  background: var(--khaki-200); color: var(--ink-900); font-size: 14px; font-weight: 600;
  transition: background .25s ease, transform .25s ease;
}
.f-btn:hover { background: var(--khaki-100); transform: translateY(-2px); }
.footer-bottom { border-top: 1px solid rgba(209, 225, 202, .22); padding: 20px 0; }
.footer-bottom .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.footer-bottom p { font-size: 13px; color: rgba(253, 251, 245, .6); }
.footer-bottom .icp { color: rgba(253, 251, 245, .55); }

/* ============ 6. 动效 ============ */
/* 页面进入过渡 */
.main-enter { animation: pageIn .55s ease both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* 滚动渐入 */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: .08s; }
.reveal[data-d="2"] { transition-delay: .16s; }
.reveal[data-d="3"] { transition-delay: .24s; }
.reveal[data-d="4"] { transition-delay: .32s; }
.reveal[data-d="5"] { transition-delay: .40s; }

/* 数字上浮 */
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.float-y { animation: floatY 5s ease-in-out infinite; }

/* 无障碍跳转链接 */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 9999;
  background: var(--green-600); color: #fff; padding: 10px 18px; border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }

/* 返回顶部 */
.to-top {
  position: fixed; right: 26px; bottom: 30px; z-index: 800;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--green-600); color: var(--cream-50);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md); opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity .3s ease, transform .3s ease, visibility .3s, background .25s ease;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--green-700); }
.to-top svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 2; fill: none; }

/* 灵动点缀：错落菱形网格底纹 */
.dot-grid-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.dot-grid-bg i { position: absolute; width: 10px; height: 10px; border: 2px solid var(--green-300); transform: rotate(45deg); border-radius: 2px; }

/* 面包屑（内页统一） */
.crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-500); margin-bottom: 26px; }
.crumb a { color: var(--ink-500); transition: color .2s ease; }
.crumb a:hover { color: var(--green-600); }
.crumb .sep { color: var(--khaki-300); }
.crumb .cur { color: var(--green-600); font-weight: 600; }

/* ============ 7. 表单（全站统一风格） ============ */
.form-field { margin-bottom: 18px; }
.form-field label { display: block; font-size: 13.5px; color: var(--ink-700); margin-bottom: 8px; font-weight: 600; }
.form-field label em { color: var(--green-600); }
.form-field input, .form-field select, .form-field textarea {
  width: 100%; padding: 12px 16px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--line); background: var(--cream-50); color: var(--ink-900);
  transition: border-color .25s ease, box-shadow .25s ease;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: none; border-color: var(--green-400); box-shadow: 0 0 0 3px rgba(141, 178, 127, .25);
}
.form-tip { font-size: 12px; color: var(--ink-300); margin-top: 6px; }
.form-msg { display: none; margin-top: 14px; padding: 12px 16px; border-radius: var(--radius-sm); font-size: 14px; }
.form-msg.ok { display: block; background: var(--green-100); color: var(--green-700); border: 1px solid var(--green-300); }
.form-msg.err { display: block; background: #FBEAEA; color: #A04545; border: 1px solid #E8C4C4; }

/* ============ 8. 响应式 ============ */
@media (max-width: 1199px) {
  .site-nav { display: none; }
  .header-tel { display: none; }
  .nav-toggle { display: inline-flex; margin-left: auto; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 36px; }
}
@media (max-width: 767px) {
  :root { --nav-h: 64px; --gutter: 18px; }
  .section { padding: 56px 0; }
  .sec-head { margin-bottom: 36px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; gap: 30px; padding: 44px 0 36px; }
  .brand-mark { width: 40px; height: 40px; }
  .brand-name strong { font-size: 16px; }
  .brand-name em { font-size: 10.5px; }
  .to-top { right: 16px; bottom: 20px; width: 42px; height: 42px; }
}

/* 动效偏好减弱 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}
