/* =========================================================
   杏运平台官网 — /assets/site.css
   共享外壳：设计令牌 / 排版 / 头部 / 页脚 / 通用组件
   ========================================================= */

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

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

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

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

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

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

table {
  border-collapse: collapse;
  width: 100%;
}

/* ---------- 2. 设计令牌 ---------- */
:root {
  /* 色彩 */
  --apricot-primary: #F28C28;
  --forest-deep: #1F3D2B;
  --apricot-wash: #FFF3E0;
  --tech-blue: #2F6FED;
  --clay-orange: #C96612;
  --moss-tint: #DFE8E0;
  --stone-gray: #6F746E;
  --ink-black: #16201A;
  --status-green: #3F7D4E;
  --alert-red: #B23A2E;
  --paper: #FFFBF5;

  /* 语义别名 */
  --bg: var(--paper);
  --text: var(--ink-black);
  --muted: var(--stone-gray);
  --line: rgba(31, 61, 43, 0.14);
  --line-strong: rgba(31, 61, 43, 0.3);
  --line-light: rgba(255, 243, 224, 0.18);

  /* 字体 */
  --font-title: "Source Han Sans SC", "Noto Sans SC", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: "Source Han Sans SC", "Noto Sans SC", Inter, "PingFang SC",
    "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular,
    Menlo, Consolas, monospace;

  /* 布局 */
  --wrap: 1240px;
  --wrap-narrow: 880px;
  --gutter: clamp(20px, 5vw, 56px);
  --header-h: 78px;
  --radius: 0px;
}

@media (max-width: 959px) {
  :root { --header-h: 64px; }
}

/* ---------- 3. 基础排版 ---------- */
body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, .h1,
h2, .h2,
h3, .h3,
h4, .h4 {
  font-family: var(--font-title);
  font-weight: 800;
  color: var(--forest-deep);
  letter-spacing: -0.012em;
  text-wrap: balance;
}

h1, .h1 {
  font-size: clamp(2.125rem, 4.2vw, 3rem);   /* 34 → 48 */
  line-height: 1.14;
}

h2, .h2 {
  font-size: clamp(1.625rem, 3vw, 2rem);     /* 26 → 32 */
  line-height: 1.22;
}

h3, .h3 {
  font-size: clamp(1.125rem, 1.6vw, 1.25rem);/* 18 → 20 */
  line-height: 1.45;
  letter-spacing: 0;
}

h4, .h4 {
  font-size: 1rem;
  line-height: 1.5;
  letter-spacing: 0.01em;
}

p { text-wrap: pretty; }

strong, b { font-weight: 700; color: var(--forest-deep); }

.mono {
  font-family: var(--font-mono);
  font-feature-settings: "tnum" 1;
  letter-spacing: 0.02em;
}

.link {
  color: var(--tech-blue);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.link:hover { color: var(--clay-orange); }

.lead {
  font-size: clamp(1rem, 1.3vw, 1.125rem);
  line-height: 1.85;
  color: rgba(22, 32, 26, 0.8);
  max-width: 64ch;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--clay-orange);
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
  flex: 0 0 auto;
}

.index-num {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  line-height: 1;
  font-weight: 500;
  color: var(--apricot-primary);
  letter-spacing: -0.02em;
}

.index-num--xl {
  font-size: clamp(2.5rem, 5.5vw, 4.5rem);
  color: var(--apricot-primary);
}

.rule {
  height: 1px;
  border: 0;
  background: var(--line);
  margin-block: clamp(24px, 3vw, 40px);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------- 4. 布局容器 ---------- */
.container {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container-narrow {
  width: 100%;
  max-width: var(--wrap-narrow);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(56px, 7vw, 110px); }
.section--tight { padding-block: clamp(32px, 4vw, 60px); }
.section--wash { background-color: var(--apricot-wash); }
.section--moss { background-color: var(--moss-tint); }

.section--forest {
  background-color: var(--forest-deep);
  color: rgba(255, 243, 224, 0.86);
}

.section--forest h1,
.section--forest h2,
.section--forest h3,
.section--forest .h1,
.section--forest .h2,
.section--forest .h3 { color: #fff; }

.section--forest .lead { color: rgba(255, 243, 224, 0.82); }
.section--forest .eyebrow { color: var(--apricot-primary); }
.section--forest .rule { background: var(--line-light); }

.section-head {
  max-width: 62ch;
  margin-bottom: clamp(28px, 4vw, 52px);
}

.section-head > * + * { margin-top: 16px; }

.grid { display: grid; gap: clamp(16px, 2.2vw, 28px); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--asym { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }

@media (max-width: 900px) {
  .grid--2,
  .grid--3,
  .grid--asym { grid-template-columns: minmax(0, 1fr); }
}

.main-offset { padding-top: calc(var(--header-h) + clamp(24px, 4vw, 56px)); }

#main-content { scroll-margin-top: calc(var(--header-h) + 16px); }

/* ---------- 5. 通用组件 ---------- */
/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  font-family: var(--font-title);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-align: center;
  border: 1px solid transparent;
  border-radius: var(--radius);
  transition: background-color 0.2s ease, color 0.2s ease,
    border-color 0.2s ease, transform 0.2s ease;
}

.btn-primary {
  background-color: var(--apricot-primary);
  border-color: var(--apricot-primary);
  color: var(--forest-deep);
}

.btn-primary:hover {
  background-color: var(--clay-orange);
  border-color: var(--clay-orange);
  color: #fff;
}

.btn-secondary {
  background-color: transparent;
  border-color: var(--line-strong);
  color: var(--forest-deep);
}

.btn-secondary:hover {
  background-color: rgba(31, 61, 43, 0.07);
  border-color: var(--forest-deep);
}

.btn-ghost {
  background-color: transparent;
  border-color: rgba(255, 243, 224, 0.42);
  color: var(--apricot-wash);
}

.btn-ghost:hover {
  border-color: var(--apricot-primary);
  color: var(--apricot-primary);
}

.btn:active { transform: translateY(1px); }

/* 状态标签 */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.04em;
  color: var(--forest-deep);
  background-color: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--line-strong);
}

.tag::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  background: currentColor;
}

.tag--ok {
  color: var(--status-green);
  border-color: rgba(63, 125, 78, 0.42);
  background-color: rgba(63, 125, 78, 0.08);
}

.tag--alert {
  color: var(--alert-red);
  border-color: rgba(178, 58, 46, 0.42);
  background-color: rgba(178, 58, 46, 0.07);
}

.tag--info {
  color: var(--tech-blue);
  border-color: rgba(47, 111, 237, 0.36);
  background-color: rgba(47, 111, 237, 0.07);
}

.tag--wait {
  color: var(--clay-orange);
  border-color: rgba(201, 102, 18, 0.4);
  background-color: rgba(242, 140, 40, 0.1);
}

/* 卡片 */
.card {
  position: relative;
  padding: clamp(20px, 2.4vw, 32px);
  background-color: #fff;
  border: 1px solid var(--line);
}

.card--wash {
  background-color: var(--apricot-wash);
  border-color: rgba(201, 102, 18, 0.2);
}

.card--moss {
  background-color: var(--moss-tint);
  border-color: rgba(31, 61, 43, 0.1);
}

/* 面包屑 */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.breadcrumb li { display: inline-flex; align-items: center; gap: 8px; }

.breadcrumb li + li::before {
  content: "/";
  color: rgba(111, 116, 110, 0.6);
}

.breadcrumb a:hover {
  color: var(--tech-blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.breadcrumb [aria-current="page"] { color: var(--forest-deep); }

/* 图片容器基础规则（页面阶段放入 <img>） */
.media-frame {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background-color: var(--moss-tint);
  border: 1px solid var(--line);
}

.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-frame--wide { aspect-ratio: 16 / 9; }
.media-frame--tall { aspect-ratio: 3 / 4; }

.media-frame--diagonal {
  clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
}

.media-frame--placeholder::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    45deg,
    rgba(31, 61, 43, 0.07) 0 2px,
    transparent 2px 14px
  );
}

.media-caption {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}

/* 进入视口显现 */
[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ---------- 6. 头部 ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background-color: var(--forest-deep);
  color: var(--apricot-wash);
  border-bottom: 1px solid var(--line-light);
  transition: background-color 0.3s ease, border-color 0.3s ease,
    box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}

.site-header[data-header-state="solid"] {
  box-shadow: 0 14px 30px -26px rgba(22, 32, 26, 0.9);
}

.site-header[data-header-state="overlay"] {
  background-color: transparent;
  background-image: linear-gradient(
    180deg,
    rgba(22, 32, 26, 0.62) 0%,
    rgba(22, 32, 26, 0.22) 62%,
    rgba(22, 32, 26, 0) 100%
  );
  border-bottom-color: rgba(255, 243, 224, 0.1);
  box-shadow: none;
}

.skip-link {
  position: absolute;
  top: -80px;
  left: 16px;
  z-index: 200;
  padding: 12px 20px;
  font-family: var(--font-title);
  font-size: 14px;
  font-weight: 700;
  color: var(--forest-deep);
  background-color: var(--apricot-wash);
  border: 2px solid var(--apricot-primary);
  transition: top 0.18s ease;
}

.skip-link:focus { top: 12px; }

.header-inner {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.2vw, 32px);
  width: 100%;
  max-width: 1360px;
  min-height: var(--header-h);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  font-family: var(--font-title);
  font-size: 19px;
  font-weight: 800;
  line-height: 1;
  color: var(--forest-deep);
  background-color: var(--apricot-primary);
}

.brand-mark--footer {
  width: 30px;
  height: 30px;
  font-size: 16px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.brand-name {
  font-family: var(--font-title);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #fff;
}

.brand-tagline {
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: rgba(255, 243, 224, 0.66);
  white-space: nowrap;
}

/* 导航轴 */
.site-nav {
  display: flex;
  align-items: stretch;
  align-self: stretch;
  margin-inline-start: auto;
}

.nav-axis {
  display: flex;
  align-items: stretch;
  height: 100%;
}

.nav-item { display: flex; }

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 13px;
  font-size: 13.5px;
  line-height: 1.2;
  color: rgba(255, 243, 224, 0.82);
  transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: 0;
  height: 2px;
  background-color: var(--apricot-primary);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.24s ease;
}

.nav-link:hover {
  color: #fff;
  background-color: rgba(255, 243, 224, 0.07);
}

.nav-link:hover::after { transform: scaleX(1); }

.nav-num {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(242, 140, 40, 0.9);
}

.nav-label { white-space: nowrap; }

.nav-link[aria-current="page"] {
  color: #fff;
  background-color: rgba(255, 243, 224, 0.08);
}

.nav-link[aria-current="page"]::after { transform: scaleX(1); }

.nav-link[aria-current="page"] .nav-num { color: var(--apricot-primary); }

.nav-note {
  display: none;
  font-size: 12.5px;
  line-height: 1.7;
  color: rgba(255, 243, 224, 0.62);
}

.nav-cta { display: none; }

/* 头部右侧 */
.header-utility {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.header-cta {
  padding: 10px 18px;
  font-size: 14px;
}

/* 移动导航按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  color: var(--apricot-wash);
  border: 1px solid rgba(255, 243, 224, 0.32);
  transition: border-color 0.2s ease, color 0.2s ease;
}

.nav-toggle:hover {
  border-color: var(--apricot-primary);
  color: var(--apricot-primary);
}

.nav-toggle-icon {
  position: relative;
  display: block;
  width: 18px;
  height: 12px;
  flex: 0 0 auto;
}

.nav-toggle-bar {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: currentColor;
  transition: transform 0.24s ease, opacity 0.18s ease;
}

.nav-toggle-bar:nth-child(1) { top: 0; }
.nav-toggle-bar:nth-child(2) { top: 5px; }
.nav-toggle-bar:nth-child(3) { top: 10px; }

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}

/* 滚动进度 */
.scroll-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background-color: rgba(255, 243, 224, 0.12);
  pointer-events: none;
}

.scroll-progress-bar {
  display: block;
  width: 0;
  height: 100%;
  background-color: var(--apricot-primary);
}

/* 头部断点 */
@media (max-width: 1180px) {
  .brand-tagline { display: none; }
  .nav-link { padding: 10px 9px; font-size: 13px; }
  .nav-link::after { left: 9px; right: 9px; }
}

@media (max-width: 959px) {
  .nav-toggle { display: inline-flex; }
  .header-cta { display: none; }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-inline-start: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 8px var(--gutter) 24px;
    background-color: var(--forest-deep);
    border-bottom: 1px solid var(--line-light);
    box-shadow: 0 24px 40px -30px rgba(0, 0, 0, 0.85);
    max-height: calc(100vh - var(--header-h) - 16px);
    overflow-y: auto;
  }

  .site-nav[data-open] { display: flex; }

  .nav-axis {
    flex-direction: column;
    height: auto;
  }

  .nav-item { display: block; }

  .nav-item + .nav-item {
    border-top: 1px solid rgba(255, 243, 224, 0.12);
  }

  .nav-link {
    justify-content: flex-start;
    gap: 16px;
    padding: 15px 4px;
    font-size: 16px;
  }

  .nav-link::after { display: none; }

  .nav-num {
    width: 26px;
    flex: 0 0 auto;
    font-size: 12px;
  }

  .nav-note {
    display: block;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px dashed rgba(255, 243, 224, 0.22);
  }

  .nav-cta {
    display: inline-flex;
    align-self: flex-start;
    margin-top: 18px;
  }
}

/* ---------- 7. 页脚 ---------- */
.site-footer {
  margin-top: clamp(48px, 6vw, 96px);
  background-color: var(--forest-deep);
  background-image: repeating-linear-gradient(
    180deg,
    rgba(255, 243, 224, 0.05) 0 1px,
    transparent 1px 56px
  );
  color: rgba(255, 243, 224, 0.82);
  border-top: 3px solid var(--apricot-primary);
}

.footer-inner {
  padding-block: clamp(44px, 6vw, 84px) 0;
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)) minmax(0, 1.25fr);
  gap: clamp(26px, 3.4vw, 52px);
}

.footer-brand-name {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-title);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #fff;
}

.footer-brand-summary {
  margin-top: 16px;
  max-width: 36ch;
  font-size: 14px;
  line-height: 1.85;
  color: rgba(255, 243, 224, 0.72);
}

.footer-col-title {
  position: relative;
  margin-bottom: 16px;
  font-family: var(--font-title);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fff;
}

.footer-col-title::before {
  content: "";
  display: block;
  width: 24px;
  height: 2px;
  margin-bottom: 12px;
  background-color: var(--apricot-primary);
}

.footer-links li + li { margin-top: 10px; }

.footer-links a {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 243, 224, 0.76);
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--apricot-primary);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.footer-contact-item + .footer-contact-item { margin-top: 14px; }

.footer-contact-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: rgba(242, 140, 40, 0.92);
}

.footer-contact-value {
  display: block;
  margin-top: 3px;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 243, 224, 0.88);
  word-break: break-word;
}

.footer-service-note {
  margin-top: 18px;
  padding-top: 16px;
  font-size: 12.5px;
  line-height: 1.75;
  color: rgba(255, 243, 224, 0.58);
  border-top: 1px solid rgba(255, 243, 224, 0.14);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  margin-top: clamp(34px, 4.5vw, 64px);
  padding-block: 22px;
  font-size: 13px;
  color: rgba(255, 243, 224, 0.6);
  border-top: 1px solid rgba(255, 243, 224, 0.16);
}

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

.footer-legal-copy { letter-spacing: 0.04em; }

@media (max-width: 1100px) {
  .footer-top { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
  .footer-brand-summary { max-width: 56ch; }
}

@media (max-width: 700px) {
  .footer-top { grid-template-columns: minmax(0, 1fr); }
  .footer-legal { flex-direction: column; align-items: flex-start; }
}

/* ---------- 8. 焦点与动效降级 ---------- */
:where(a, button, [tabindex]):focus-visible {
  outline: 2px solid var(--tech-blue);
  outline-offset: 3px;
  box-shadow: 0 0 0 5px rgba(242, 140, 40, 0.32);
}

.site-header :where(a, button):focus-visible {
  outline-color: var(--apricot-wash);
  box-shadow: 0 0 0 5px rgba(242, 140, 40, 0.42);
}

@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;
    scroll-behavior: auto !important;
  }

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

  .nav-link::after { transition: none; }
}
