/**
 * 全站页面基线 — 与资讯页 zx.html 统一的字体、导航与区块标题层级
 * 用法：在 site-footer.css 之后引入
 */

:root {
  --header-h: 65px;
  --policy-header-h: 65px;
  /* 科技赛博朋克：深紫黑底 + 青/品红霓虹 */
  --page-bg: #050510;
  --page-bg-elevated: #0b0618;
  --page-text: #f1f5f9;
  --page-body-muted: #94a3b8;
  --page-lead: rgba(226, 232, 240, 0.92);
  --cp-cyan: #22d3ee;
  --cp-cyan-soft: rgba(34, 211, 238, 0.55);
  --cp-fuchsia: #e879f9;
  --cp-magenta: #d946ef;
  --cp-violet: #a855f7;
  --cp-glow-cyan: 0 0 18px rgba(34, 211, 238, 0.45);
  --cp-glow-magenta: 0 0 22px rgba(232, 121, 249, 0.35);
  /* 与一线科技品牌页类似的顺滑曲线（参考 chaocanshu 类站点的克制动效） */
  --ease-smooth: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast: 0.2s;
  --duration-med: 0.32s;
  /* 标题系统：参考头部科技品牌站的强主标题+克制副标题比例 */
  --title-size: clamp(1.74rem, 3.6vw, 2.95rem);
  --title-line: 1.12;
  --title-weight: 800;
  --title-track: 0.01em;
  --subtitle-size: clamp(0.82rem, 1.05vw, 0.92rem);
  --subtitle-line: 1.62;
  --subtitle-weight: 500;
  --subtitle-track: 0.01em;
}

/* 隐藏主文档滚动条（仍可滚轮 / 触控滑动），全站引入 site-page.css 的页面生效 */
html {
  scroll-behavior: smooth;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE / 旧 Edge */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

body {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

/* 正文与资讯页一致：系统字体栈（背景由各页自行指定，避免覆盖首页深蓝底） */
body.site-body {
  color: var(--page-text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.site-bg-black {
  background-color: var(--page-bg);
  background-image:
    linear-gradient(rgba(168, 85, 247, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, 0.04) 1px, transparent 1px),
    radial-gradient(ellipse 100% 70% at 50% -15%, rgba(168, 85, 247, 0.14), transparent 55%),
    radial-gradient(ellipse 60% 45% at 100% 100%, rgba(34, 211, 238, 0.07), transparent 50%);
  background-size: 52px 52px, 52px 52px, 100% 100%, 100% 100%;
  background-attachment: fixed;
}

@media (max-width: 768px) {
  .site-bg-black {
    background-attachment: scroll;
  }
}

::selection {
  background: rgba(34, 211, 238, 0.28);
  color: #f8fafc;
}

/* ========== 顶栏（与 zx 一致） ========== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background-color: rgba(6, 4, 22, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(34, 211, 238, 0.2);
  box-shadow:
    0 0 32px rgba(0, 0, 0, 0.55),
    inset 0 -1px 0 rgba(217, 70, 239, 0.12);
  transition:
    background-color var(--duration-med) var(--ease-standard),
    border-color var(--duration-med) var(--ease-standard),
    box-shadow var(--duration-med) var(--ease-smooth);
}

.site-header--sticky {
  position: sticky;
}

.site-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  padding: 13px max(20px, env(safe-area-inset-right, 0px)) 13px max(20px, env(safe-area-inset-left, 0px));
  padding-top: max(13px, env(safe-area-inset-top, 0px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

@media (min-width: 768px) {
  .site-header-inner {
    padding: 14px max(28px, env(safe-area-inset-right, 0px)) 14px max(28px, env(safe-area-inset-left, 0px));
    padding-top: max(14px, env(safe-area-inset-top, 0px));
  }
}

/* 顶栏 Logo（可点击回首页） */
/* Logo 区：与桌面同一套比例（含 scaleX），手机用 clamp 随屏宽缩放，避免与桌面观感不一致 */
.site-brand-lockup {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: #ffffff;
  flex-shrink: 1;
  min-width: 0;
  max-width: min(240px, 54vw);
  overflow: hidden;
  margin-right: 0.25rem;
  -webkit-tap-highlight-color: transparent;
}

.site-brand-logo {
  height: clamp(36px, 11.2vw, 52px);
  width: auto;
  max-width: 100%;
  max-height: 52px;
  object-fit: contain;
  object-position: left center;
  display: block;
  transform: scaleX(1.06);
  transform-origin: left center;
  filter: drop-shadow(0 0 12px rgba(34, 211, 238, 0.4)) drop-shadow(0 0 20px rgba(168, 85, 247, 0.2));
}

.site-nav {
  display: flex;
  gap: 22px;
  font-size: 15px;
  align-items: center;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

@media (min-width: 1024px) {
  .site-nav {
    gap: 32px;
    font-size: 16px;
  }
}

.site-link {
  position: relative;
  color: #e2e8f0;
  text-decoration: none;
  padding: 0.2rem 0 0.35rem;
  transition: color var(--duration-fast) var(--ease-standard);
  -webkit-tap-highlight-color: transparent;
}

/* 悬停：自中间展开的下划线 */
.site-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 1px;
  background: linear-gradient(90deg, transparent, var(--cp-cyan), var(--cp-fuchsia), transparent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--duration-med) var(--ease-smooth);
  pointer-events: none;
}

.site-link:hover {
  color: #ffffff;
  text-shadow: 0 0 14px rgba(34, 211, 238, 0.35);
}

.site-link:hover::after {
  transform: scaleX(1);
}

.site-link.active {
  color: #67e8f9;
  font-weight: 600;
  text-shadow: var(--cp-glow-cyan);
}

/* 当前页：霓虹下划线 */
.site-link.active::after {
  background: linear-gradient(90deg, var(--cp-cyan), var(--cp-fuchsia));
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.55), 0 0 20px rgba(232, 121, 249, 0.25);
  transform: scaleX(1);
}

.site-lang {
  color: #cbd5e1;
  font-size: 15px;
  transition: color var(--duration-fast) var(--ease-standard);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

@media (min-width: 1024px) {
  .site-lang {
    font-size: 16px;
  }
}

.site-lang:hover {
  color: #f5d0fe;
  text-shadow: 0 0 12px rgba(232, 121, 249, 0.4);
}

/* ========== 页面主标题区（page-head） ========== */
.page-head {
  text-align: center;
  width: 100%;
  max-width: 56rem;
  margin-left: auto;
  margin-right: auto;
}

.page-head-title {
  font-size: var(--title-size);
  font-weight: var(--title-weight);
  line-height: var(--title-line);
  letter-spacing: var(--title-track);
  color: #ffffff;
  margin-bottom: 1rem;
  scroll-margin-top: calc(var(--header-h) + 12px);
  text-shadow: 0 0 24px rgba(34, 211, 238, 0.24), 0 0 36px rgba(168, 85, 247, 0.18);
}

/* 统一主标题令牌：覆盖各页面局部写法差异 */
:where(.hero-title, .product-hero-screen__title, .section-main-title, .page-head-title) {
  font-size: var(--title-size) !important;
  font-weight: var(--title-weight) !important;
  letter-spacing: var(--title-track) !important;
  line-height: var(--title-line) !important;
}

/* 长标题可读性优化：自动平衡换行，避免一行过长 */
.page-head-title--balanced {
  max-width: 22ch;
  margin-left: auto;
  margin-right: auto;
  text-wrap: balance;
}

.page-head-lead {
  font-size: var(--subtitle-size);
  font-weight: var(--subtitle-weight);
  line-height: var(--subtitle-line);
  letter-spacing: var(--subtitle-track);
  color: var(--page-lead);
  margin-bottom: 0;
}

/* 统一副标题令牌：覆盖各页面局部写法差异 */
:where(.hero-subtitle, .product-hero-screen__lead, .section-subtitle, .page-head-lead) {
  font-size: var(--subtitle-size) !important;
  font-weight: var(--subtitle-weight) !important;
  letter-spacing: var(--subtitle-track) !important;
  line-height: var(--subtitle-line) !important;
  color: rgba(226, 232, 240, 0.86) !important;
}

.section-main-title {
  font-size: var(--title-size);
  font-weight: var(--title-weight);
  letter-spacing: var(--title-track);
  line-height: var(--title-line);
  margin-bottom: 1rem;
  text-shadow: 0 0 24px rgba(34, 211, 238, 0.24), 0 0 36px rgba(168, 85, 247, 0.18);
}

.section-subtitle {
  max-width: 46ch;
  margin-left: auto;
  margin-right: auto;
  color: rgba(226, 232, 240, 0.86);
  font-size: var(--subtitle-size);
  line-height: var(--subtitle-line);
  font-weight: var(--subtitle-weight);
  letter-spacing: var(--subtitle-track);
}

.page-head-desc {
  font-size: clamp(0.88rem, 1.55vw, 0.98rem);
  line-height: 1.65;
  color: rgba(156, 163, 175, 0.98);
  max-width: 48rem;
  margin-left: auto;
  margin-right: auto;
  margin-top: 1rem;
}

.page-head-block {
  margin-bottom: clamp(1.5rem, 4vw, 2.75rem);
}

/* 区块小标题（资讯「全国城市招募」层级） */
.section-heading {
  font-size: clamp(1.16rem, 2.15vw, 1.42rem);
  font-weight: 600;
  color: #f8fafc;
  letter-spacing: 0.02em;
  line-height: 1.25;
  text-shadow: 0 0 28px rgba(168, 85, 247, 0.22), 0 0 48px rgba(34, 211, 238, 0.1);
}

/* 首页等非资讯页用的分区大标题（介于 section-heading 与 page-head-title 之间） */
.home-block-title {
  font-size: var(--title-size);
  font-weight: var(--title-weight);
  line-height: var(--title-line);
  letter-spacing: var(--title-track);
}

/* 首页正文 / 卡片说明：与资讯卡片描述一致 */
.text-body-card {
  font-size: 0.875rem;
  line-height: 1.625;
  color: var(--page-body-muted);
}

/* 分屏容器基准（可被各页覆盖 height）— 横向留白略收紧，更紧凑 */
.section-screen {
  min-height: 100vh;
  width: 100%;
  padding-left: clamp(1.1rem, 4.5vw, 4.5rem);
  padding-right: clamp(1.1rem, 4.5vw, 4.5rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Tailwind 的 justify-start 若先于本文件加载会被上面覆盖，须显式还原 */
.section-screen.justify-start {
  justify-content: flex-start;
}

/* 法务 / 长文阅读 */
.site-document {
  font-size: clamp(0.95rem, 1.9vw, 1.0625rem);
  line-height: 1.75;
  color: #d1d5db;
}

.site-document h2 {
  font-size: clamp(1.25rem, 2.4vw, 1.5rem);
  font-weight: 600;
  color: #ffffff;
  margin: 1.75rem 0 0.75rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid rgba(34, 211, 238, 0.35);
  box-shadow: 0 1px 0 0 rgba(217, 70, 239, 0.12);
}

.site-document h3 {
  font-size: clamp(1.05rem, 2vw, 1.125rem);
  font-weight: 600;
  color: #f1f5f9;
  margin: 1.25rem 0 0.5rem;
}

.site-document p,
.site-document li {
  margin-bottom: 0.75rem;
}

.site-document ul {
  padding-left: 1.25rem;
}

/* 隐私/协议等长文页 */
.policy-doc-page .policy-doc-main {
  max-width: 52rem;
}

.policy-doc-page h1.site-doc-title {
  font-size: clamp(2rem, 4.2vw, 3rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: 0.03em;
  color: #ffffff;
}
.policy-doc-page .policy-doc-meta {
  font-size: clamp(0.875rem, 1.8vw, 1rem);
  color: rgba(148, 163, 175, 0.95);
}

/* ========== 响应式：顶栏（与 zx 768 以下一致） ========== */
@media (max-width: 1024px) {
  .section-screen {
    min-height: auto;
    padding: 0 1.25rem;
  }
}

@media (max-width: 768px) {
  /* 小屏整体等比收缩：rem 基准 + 标题令牌，使正文 / Tailwind 字号与桌面比例一致 */
  html {
    font-size: clamp(12.75px, 2.9vw, 16px);
  }

  :root {
    --header-h: 60px;
    --title-size: clamp(1.38rem, 5.35vw, 2.35rem);
    --subtitle-size: clamp(0.74rem, 2.75vw, 0.9rem);
  }

  .site-header-inner {
    padding: 12px max(16px, env(safe-area-inset-right, 0px)) 12px max(16px, env(safe-area-inset-left, 0px));
    padding-top: max(12px, env(safe-area-inset-top, 0px));
  }

  .site-nav {
    gap: clamp(10px, 2.8vw, 16px);
    font-size: clamp(0.8125rem, 2.65vw, 0.9375rem);
  }

  .site-lang {
    font-size: clamp(0.8125rem, 2.65vw, 0.9375rem);
  }

  .site-document {
    font-size: clamp(0.86rem, 2.95vw, 1.05rem);
  }

  .page-head-desc {
    font-size: clamp(0.82rem, 2.7vw, 0.98rem);
  }

  .section-heading {
    font-size: clamp(1.02rem, 3.4vw, 1.38rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .site-header,
  .site-link,
  .site-lang {
    transition: none;
  }

  .site-link::after {
    transition: none;
  }

  .site-bg-black {
    background-attachment: scroll;
  }
}

/* ========== 赛博朋克：协议 / 隐私等长文页 ========== */
body.policy-doc-page.site-body {
  background-color: var(--page-bg);
  background-image:
    linear-gradient(rgba(168, 85, 247, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
}

body.policy-doc-page > header.border-b,
body.policy-doc-page > header:first-of-type {
  background-color: rgba(8, 5, 26, 0.92) !important;
  border-bottom-color: rgba(168, 85, 247, 0.3) !important;
  box-shadow: 0 4px 28px rgba(0, 0, 0, 0.45), inset 0 -1px 0 rgba(34, 211, 238, 0.14);
}

.policy-doc-page .content-box {
  background: rgba(10, 6, 28, 0.75) !important;
  border: 1px solid rgba(34, 211, 238, 0.24) !important;
  box-shadow:
    0 0 0 1px rgba(232, 121, 249, 0.07),
    0 24px 56px rgba(0, 0, 0, 0.55),
    0 0 100px rgba(34, 211, 238, 0.06) !important;
}

.policy-doc-page .important-tip {
  background: rgba(168, 85, 247, 0.1) !important;
  border: 1px solid rgba(34, 211, 238, 0.22) !important;
  border-left: 4px solid var(--cp-fuchsia) !important;
}

.policy-plain-doc .site-document h2:not(.legal-callout-heading) {
  color: #67e8f9 !important;
  text-shadow: 0 0 18px rgba(34, 211, 238, 0.25);
}
