/* =========================================================
   华体登录指南 · /assets/site.css
   共享外壳：reset / 变量 / 中文排版 / 头部 / 页脚 / 通用组件
   ========================================================= */

/* ---------- 1. RESET ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body,
h1, h2, h3, h4,
p, ul, ol, figure, blockquote { margin: 0; }

ul, ol { padding: 0; list-style: none; }

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

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

button, input, select, textarea { font: inherit; color: inherit; }

/* ---------- 2. 设计变量 ---------- */
:root {
  /* 品牌色 */
  --blue: #1B3A6B;
  --blue-deep: #0E2244;
  --red: #D7263D;
  --red-deep: #A81D30;
  --lime: #C7F464;
  --white: #FFFFFF;
  --mist: #E8EEF7;
  --steel: #6B7C93;
  --ink: #141B26;

  /* 玻璃层 */
  --glass-white: rgba(255, 255, 255, 0.12);
  --glass-blue: rgba(27, 58, 107, 0.72);

  /* 字体 */
  --font-sans: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
               system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Courier New", monospace;

  /* 尺寸 */
  --shell: min(1180px, 92vw);
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-pill: 999px;

  --shadow-1: 0 10px 30px rgba(14, 34, 68, 0.10);
  --shadow-2: 0 24px 60px rgba(14, 34, 68, 0.20);

  --ease: cubic-bezier(0.22, 0.68, 0.32, 1);
  --nav-h: 68px;
}

/* ---------- 3. 基础排版（中文优先） ---------- */
body {
  font-family: var(--font-sans);
  font-size: clamp(16px, 1.02vw, 17px);
  line-height: 1.7;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-sans);
  line-height: 1.14;
  letter-spacing: -0.02em;
  font-weight: 800;
  color: inherit;
}

h1 { font-size: clamp(2.5rem, 7vw, 5.2rem); font-weight: 900; letter-spacing: -0.04em; }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.75rem); }
h3 { font-size: clamp(1.15rem, 1.8vw, 1.45rem); }

p { line-height: 1.75; }

::selection { background: var(--lime); color: var(--blue-deep); }

:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- 4. 跳转链接 ---------- */
.skip-link {
  position: fixed;
  left: clamp(12px, 3vw, 28px);
  top: -120px;
  z-index: 999;
  padding: 12px 22px;
  border-radius: var(--r-pill);
  background: var(--lime);
  color: var(--blue-deep);
  font-weight: 800;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  box-shadow: var(--shadow-2);
  transition: top 0.22s var(--ease);
}
.skip-link:focus,
.skip-link:focus-visible { top: 14px; }

/* ---------- 5. 头部：悬浮命令栏 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  color: #fff;
  background: var(--glass-blue);
  border-bottom: 1px solid var(--glass-white);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  transition: background 0.28s var(--ease), box-shadow 0.28s var(--ease);
}

.site-header.is-scrolled {
  background: rgba(14, 34, 68, 0.92);
  box-shadow: 0 14px 34px rgba(14, 34, 68, 0.34);
}

.site-header__inner {
  width: var(--shell);
  margin-inline: auto;
  min-height: var(--nav-h);
  padding-block: 10px;
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.6vw, 22px);
}

/* 品牌 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--red) 0%, var(--red-deep) 100%);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  clip-path: polygon(0 0, 100% 0, 100% 68%, 78% 100%, 0 100%);
  box-shadow: 0 8px 20px rgba(215, 38, 61, 0.36);
}

.brand__text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.brand__name {
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: #fff;
  white-space: nowrap;
}

.brand__tagline {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.62);
  white-space: nowrap;
}

/* 命令栏导航 */
.site-nav { margin-left: auto; }

.site-nav__list {
  display: flex;
  align-items: center;
  gap: clamp(2px, 0.7vw, 10px);
}

.site-nav__link {
  display: inline-flex;
  align-items: baseline;
  gap: 0.45em;
  padding: 0.5em 0.7em;
  border-radius: var(--r-pill);
  font-size: 0.92rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.82);
  transition: color 0.18s var(--ease), background 0.18s var(--ease);
}

.site-nav__index {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--steel);
  transition: color 0.18s var(--ease);
}

.site-nav__link:hover {
  color: #fff;
  background: var(--glass-white);
}
.site-nav__link:hover .site-nav__index { color: var(--lime); }

.site-nav__link[aria-current="page"] {
  color: #fff;
  background: rgba(255, 255, 255, 0.10);
  box-shadow: inset 0 -2px 0 var(--red);
}
.site-nav__link[aria-current="page"] .site-nav__index { color: var(--lime); }

/* 动作区 */
.site-header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

/* 移动导航按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.55em;
  padding: 0.6em 1em;
  background: transparent;
  border: 1px solid var(--glass-white);
  border-radius: var(--r-pill);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.18s var(--ease);
}
.nav-toggle:hover { background: var(--glass-white); }

.nav-toggle__bars {
  position: relative;
  display: block;
  width: 18px;
  height: 12px;
}
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  transition: transform 0.24s var(--ease), opacity 0.24s var(--ease);
}
.nav-toggle__bars::before { top: 0; }
.nav-toggle__bars::after { bottom: 0; }

.site-header[data-open="true"] .nav-toggle__bars::before { transform: translateY(5px) rotate(45deg); }
.site-header[data-open="true"] .nav-toggle__bars::after { transform: translateY(-5px) rotate(-45deg); }

/* 滚动进度条 */
.scroll-progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 2px;
  transform: scaleX(var(--progress, 0));
  transform-origin: left center;
  background: linear-gradient(90deg, var(--lime) 0%, var(--red) 70%, var(--red-deep) 100%);
  pointer-events: none;
}

/* ---------- 6. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(48px, 8vw, 110px);
  color: rgba(255, 255, 255, 0.78);
  background-color: var(--blue-deep);
  background-image:
    radial-gradient(760px 340px at 88% -14%, rgba(215, 38, 61, 0.38), transparent 70%),
    radial-gradient(600px 320px at 2% 112%, rgba(199, 244, 100, 0.10), transparent 70%);
  overflow: hidden;
}

.footer__strip {
  height: 6px;
  background: linear-gradient(90deg, var(--red) 0 34%, var(--lime) 34% 42%, var(--glass-white) 42% 100%);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.15fr 1.9fr 1fr;
  gap: clamp(28px, 4vw, 56px);
  padding-block: clamp(38px, 6vw, 72px);
}

.footer__brand { display: flex; flex-direction: column; gap: 14px; }

.footer__logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.footer__mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  background: var(--red);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  clip-path: polygon(0 0, 100% 0, 100% 68%, 76% 100%, 0 100%);
}

.footer__brand-name {
  font-size: 1.02rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.01em;
}

.footer__tagline {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.6;
}

.footer__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.footer__chip {
  padding: 4px 12px;
  border: 1px solid var(--glass-white);
  border-radius: var(--r-pill);
  font-size: 0.74rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.78);
}

.footer__cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 2.4vw, 30px);
}

.footer__col { display: flex; flex-direction: column; gap: 12px; }

.footer__col-title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--lime);
}

.footer__links { display: flex; flex-direction: column; gap: 9px; }

.footer__link {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.76);
  transition: color 0.18s var(--ease), padding-left 0.18s var(--ease);
}
.footer__link:hover {
  color: #fff;
  padding-left: 6px;
}

.footer__contact { display: flex; flex-direction: column; gap: 12px; }

.footer__contact-list { display: flex; flex-direction: column; gap: 10px; }

.footer__contact-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-left: 12px;
  border-left: 2px solid rgba(215, 38, 61, 0.7);
}

.footer__contact-label {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  color: var(--steel);
}

.footer__contact-value {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.9);
  word-break: break-word;
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
  padding-block: clamp(16px, 2.4vw, 26px);
  border-top: 1px solid var(--glass-white);
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.58);
}

.footer__copyright { font-weight: 700; color: rgba(255, 255, 255, 0.85); }

.footer__icp { font-family: var(--font-mono); letter-spacing: 0.04em; }

.footer__note { flex: 1 1 260px; min-width: 0; }

/* ---------- 7. 通用布局 ---------- */
.container {
  width: var(--shell);
  margin-inline: auto;
}

.section { padding-block: clamp(56px, 9vw, 120px); }
.section--mist { background: var(--mist); }
.section--blue { background: var(--blue); color: #fff; }
.section--deep { background: var(--blue-deep); color: #fff; }

.section--blue .eyebrow,
.section--deep .eyebrow { color: var(--lime); }
.section--blue .eyebrow::before,
.section--deep .eyebrow::before { background: var(--lime); }

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--stack-gap, clamp(16px, 2vw, 26px));
}

.divider {
  height: 3px;
  border: 0;
  background: linear-gradient(90deg, var(--red) 0 30%, var(--lime) 30% 38%, var(--mist) 38% 100%);
}

/* ---------- 8. 文字组件 ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.65em;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red);
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--red);
}

.section-title {
  font-size: clamp(1.75rem, 3.6vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.14;
}

.lead {
  font-size: clamp(1.02rem, 1.5vw, 1.22rem);
  line-height: 1.7;
  color: #3a4658;
  max-width: 62ch;
}
.section--blue .lead,
.section--deep .lead { color: rgba(255, 255, 255, 0.82); }

.prose {
  max-width: 68ch;
  display: flex;
  flex-direction: column;
  gap: 1em;
}
.prose p { color: #2c3546; }
.section--blue .prose p,
.section--deep .prose p { color: rgba(255, 255, 255, 0.8); }

/* ---------- 9. 网格与卡片 ---------- */
.grid {
  display: grid;
  gap: clamp(16px, 2.4vw, 28px);
}
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: clamp(20px, 3vw, 32px);
  background: #fff;
  border: 1px solid var(--mist);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
}

.card--glass {
  background: var(--glass-white);
  border-color: var(--glass-white);
  color: #fff;
  box-shadow: none;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  background: var(--mist);
  color: var(--blue);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.tag--lime { background: var(--lime); color: var(--blue-deep); }
.tag--red { background: var(--red); color: #fff; }

/* ---------- 10. 按钮 ---------- */
.btn {
  --btn-bg: var(--blue);
  --btn-fg: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.72em 1.4em;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.18s var(--ease), background 0.18s var(--ease),
              box-shadow 0.18s var(--ease), color 0.18s var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-1); }
.btn:active { transform: translateY(0); }

.btn--accent { --btn-bg: var(--lime); --btn-fg: var(--blue-deep); }
.btn--accent:hover { --btn-bg: #d8ff7f; box-shadow: 0 12px 26px rgba(199, 244, 100, 0.34); }

.btn--red { --btn-bg: var(--red); }
.btn--red:hover { --btn-bg: var(--red-deep); }

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: #fff;
  border-color: var(--glass-white);
}
.btn--ghost:hover { --btn-bg: var(--glass-white); }

/* ---------- 11. 面包屑 ---------- */
.breadcrumb { padding-block: clamp(14px, 2vw, 22px); }

.breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--steel);
}

.breadcrumb__item { display: inline-flex; align-items: center; gap: 0.5rem; }
.breadcrumb__item + .breadcrumb__item::before {
  content: "/";
  color: var(--steel);
  opacity: 0.55;
}

.breadcrumb__link {
  color: var(--steel);
  border-bottom: 1px solid transparent;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}
.breadcrumb__link:hover { color: var(--red); border-color: var(--red); }

/* ---------- 12. 图片容器基础规则（页面阶段放图） ---------- */
.img-frame {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  border-radius: var(--r-lg);
  background:
    linear-gradient(140deg, var(--blue) 0%, var(--blue-deep) 58%, var(--red-deep) 170%);
  isolation: isolate;
}
.img-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, rgba(14, 34, 68, 0.55) 0%, transparent 55%);
  pointer-events: none;
}
.img-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.img-frame--wide { aspect-ratio: 16 / 9; }
.img-frame--tall { aspect-ratio: 4 / 5; }
.img-frame--square { aspect-ratio: 1 / 1; }

.img-frame__tag {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 2;
  padding: 4px 12px;
  border-radius: var(--r-pill);
  background: rgba(14, 34, 68, 0.78);
  color: var(--lime);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

/* ---------- 13. 可展开内容组 ---------- */
.accordion { display: grid; gap: 12px; }

.accordion__item {
  background: #fff;
  border: 1px solid var(--mist);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: border-color 0.22s var(--ease), box-shadow 0.22s var(--ease);
}
.accordion__item[data-open="true"] {
  border-color: rgba(215, 38, 61, 0.5);
  box-shadow: var(--shadow-1);
}

.accordion__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  background: none;
  border: 0;
  text-align: left;
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.45;
  color: var(--blue-deep);
  cursor: pointer;
}

.accordion__no {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--red);
  flex: 0 0 auto;
}

.accordion__icon {
  position: relative;
  margin-left: auto;
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--mist);
  transition: background 0.22s var(--ease);
}
.accordion__icon::before,
.accordion__icon::after {
  content: "";
  position: absolute;
  background: var(--blue);
}
.accordion__icon::before { width: 12px; height: 2px; }
.accordion__icon::after { width: 2px; height: 12px; transition: transform 0.24s var(--ease), opacity 0.24s var(--ease); }

.accordion__item[data-open="true"] .accordion__icon { background: var(--lime); }
.accordion__item[data-open="true"] .accordion__icon::after { transform: scaleY(0); opacity: 0; }

.accordion__panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.34s var(--ease);
}
.accordion__item[data-open="true"] .accordion__panel { max-height: 40rem; }

.accordion__body {
  padding: 0 20px 22px;
  color: #3a4658;
  line-height: 1.75;
}

/* ---------- 14. 滚动显现 ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- 15. 响应式 ---------- */
@media (max-width: 1080px) {
  .brand__tagline { display: none; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__contact { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  :root { --nav-h: 62px; }

  .nav-toggle { display: inline-flex; }

  .site-nav {
    position: fixed;
    inset: 0;
    z-index: 70;
    margin-left: 0;
    padding: calc(var(--nav-h) + 34px) clamp(20px, 7vw, 48px) 48px;
    background: linear-gradient(165deg, rgba(14, 34, 68, 0.985) 0%, rgba(27, 58, 107, 0.985) 100%);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.26s var(--ease), transform 0.26s var(--ease), visibility 0.26s;
  }

  .site-header[data-open="true"] .site-nav {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .site-nav__link {
    padding: 16px 4px;
    border-radius: 0;
    border-bottom: 1px solid var(--glass-white);
    font-size: clamp(1.3rem, 5vw, 1.7rem);
    font-weight: 800;
    letter-spacing: -0.02em;
  }

  .site-nav__index { font-size: 0.8rem; }

  .site-nav__link[aria-current="page"] {
    background: transparent;
    box-shadow: none;
    color: var(--lime);
  }
  .site-nav__link[aria-current="page"] .site-nav__index { color: var(--lime); }

  html.is-nav-open { overflow: hidden; }
}

@media (max-width: 720px) {
  .footer__grid { grid-template-columns: 1fr; }
  .footer__cols { grid-template-columns: 1fr 1fr; }
  .footer__contact { grid-column: auto; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 520px) {
  .brand__name { font-size: 0.94rem; }
  .site-header__actions .btn--accent { padding: 0.62em 1em; font-size: 0.84rem; }
  .footer__cols { grid-template-columns: 1fr; }
}

/* ---------- 16. 无障碍动效降级 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0ms !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .btn:hover { transform: none; }
}
