/* ==========================================================================
   爱赢官网 · 全站共享样式 /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, figure, blockquote, dl, dd { margin: 0; }

ul, ol { margin: 0; padding: 0; }
ul[class], ol[class] { list-style: none; }

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

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

button { background: none; border: 0; }

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

/* ---------- 2. Tokens ---------- */
:root {
  /* 色板 */
  --snow: #7FB8C4;
  --snow-soft: #D9EBEE;
  --snow-zone: #E3EFF1;
  --deep-snow: #2F6F7A;
  --red: #8E1F2F;
  --red-deep: #731624;
  --wine: #5A1520;
  --gold: #E08A2E;
  --gold-ink: #9A5A12;
  --sand-gold: #C7A35A;
  --desert: #F2E9DA;
  --warm: #FBF7EF;
  --poplar: #4F7A5A;
  --ink: #153239;
  --muted: #6B8387;

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

  /* 度量 */
  --max: 1440px;
  --pad: clamp(20px, 4vw, 72px);
  --radius-s: 8px;
  --radius-m: 16px;
  --radius-l: 28px;
  --ease: cubic-bezier(.2, .7, .3, 1);

  /* 线 */
  --hair-ink: rgba(21, 50, 57, .12);
  --hair-light: rgba(251, 247, 239, .16);
}

/* ---------- 3. 基础排版 ---------- */
body {
  font-family: var(--font-body);
  font-size: clamp(17px, 1.05vw + 15px, 18px);
  line-height: 1.75;
  color: var(--ink);
  background: var(--warm);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -.022em;
  text-wrap: balance;
}

h1 { font-size: clamp(40px, 5.4vw, 56px); }
h2 { font-size: clamp(26px, 3vw, 32px); }
h3 { font-size: clamp(20px, 2vw, 24px); letter-spacing: -.014em; }
h4 { font-size: clamp(18px, 1.6vw, 20px); letter-spacing: -.008em; }

p { text-wrap: pretty; }

a { color: var(--deep-snow); }

strong, b { font-weight: 700; }

::selection {
  background: var(--snow);
  color: var(--ink);
}

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

#main-content { scroll-margin-top: 104px; }

/* ---------- 4. 工具类 ---------- */
.sr-only {
  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;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: .04em;
}

.display-xl {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(56px, 9vw, 144px);
  line-height: .92;
  letter-spacing: -.05em;
  font-variant-numeric: tabular-nums;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .18em;
  color: var(--deep-snow);
  margin-bottom: 14px;
}

.lead {
  font-size: clamp(18px, 1.55vw, 21px);
  line-height: 1.72;
  max-width: 58ch;
  color: var(--ink);
}

/* ---------- 5. 布局容器与分区 ---------- */
.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.container--narrow { max-width: 1000px; }
.container--text { max-width: 82ch; }

.section { padding-block: clamp(52px, 7vw, 96px); }
.section--tight { padding-block: clamp(32px, 4.5vw, 56px); }

.zone-desert { background: var(--desert); }
.zone-warm { background: var(--warm); }
.zone-snow { background: var(--snow-zone); }
.zone-wine { background: var(--wine); color: var(--warm); }

.grid {
  display: grid;
  gap: clamp(18px, 2.6vw, 36px);
}

.grid--split { grid-template-columns: minmax(0, 38fr) minmax(0, 62fr); }
.grid--halves { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--thirds { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ---------- 6. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  padding: 13px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .01em;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color .16s var(--ease),
    color .16s var(--ease),
    border-color .16s var(--ease),
    box-shadow .16s var(--ease);
}

.btn--primary {
  background: var(--red);
  color: var(--warm);
}
.btn--primary:hover { background: var(--red-deep); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: rgba(21, 50, 57, .26);
}
.btn--ghost:hover {
  border-color: var(--deep-snow);
  color: var(--deep-snow);
  background: rgba(127, 184, 196, .14);
}

.btn--snow {
  background: var(--snow);
  color: var(--ink);
  border-color: transparent;
}
.btn--snow:hover {
  background: var(--warm);
  color: var(--wine);
}

/* ---------- 7. 面包屑 ---------- */
.breadcrumbs {
  margin-bottom: clamp(20px, 2.6vw, 32px);
}
.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--muted);
}
.breadcrumbs li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.breadcrumbs li + li::before {
  content: "／";
  color: var(--sand-gold);
}
.breadcrumbs a {
  color: var(--deep-snow);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .15s var(--ease);
}
.breadcrumbs a:hover { border-bottom-color: var(--deep-snow); }

/* ---------- 8. 标签 / 正文流 / 图片容器 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .08em;
  background: rgba(127, 184, 196, .22);
  color: var(--deep-snow);
}
.tag--red { background: rgba(142, 31, 47, .1); color: var(--red); }
.tag--gold { background: rgba(224, 138, 46, .16); color: var(--gold-ink); }
.tag--green { background: rgba(79, 122, 90, .16); color: var(--poplar); }

.prose { max-width: 76ch; }
.prose > * + * { margin-top: 1.1em; }
.prose p { margin: 0; }
.prose h2, .prose h3 { margin-top: 1.8em; }
.prose a {
  color: var(--deep-snow);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.prose a:hover { color: var(--red); }
.prose ul, .prose ol {
  padding-left: 1.4em;
  list-style: disc;
}
.prose ol { list-style: decimal; }
.prose li + li { margin-top: .45em; }

/* 可复用响应式图片容器 */
.media-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-l);
  background: var(--desert);
  border: 1px solid var(--hair-ink);
  isolation: isolate;
}
.media-frame > img,
.media-frame > picture > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-frame:empty::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    135deg,
    rgba(127, 184, 196, .2) 0 12px,
    transparent 12px 26px
  );
}
.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(251, 247, 239, .4);
  pointer-events: none;
  z-index: 1;
}
.media-frame--16x9 { aspect-ratio: 16 / 9; }
.media-frame--4x3 { aspect-ratio: 4 / 3; }
.media-frame--1x1 { aspect-ratio: 1 / 1; }
.media-frame--wide { aspect-ratio: 21 / 9; }

/* ---------- 9. Skip link ---------- */
.skip-link {
  position: fixed;
  top: -120px;
  left: clamp(16px, 4vw, 32px);
  z-index: 300;
  padding: 11px 20px;
  border-radius: 0 0 14px 14px;
  background: var(--ink);
  color: var(--warm);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: top .18s var(--ease);
}
.skip-link:focus { top: 0; }

/* ---------- 10. 悬浮胶囊头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  padding-block: 14px;
  background: rgba(251, 247, 239, .82);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
  backdrop-filter: blur(14px) saturate(1.15);
  transition:
    padding-block .2s var(--ease),
    background-color .2s var(--ease);
}
.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--snow) 18%,
    var(--deep-snow) 50%,
    var(--snow) 82%,
    transparent 100%
  );
  opacity: .3;
  transition: opacity .2s var(--ease);
}
.site-header[data-scrolled="true"] {
  padding-block: 8px;
  background: rgba(251, 247, 239, .96);
}
.site-header[data-scrolled="true"]::after { opacity: .95; }

.header-shell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(10px, 1.8vw, 24px);
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--pad);
}

/* 品牌浮岛 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 16px 6px 6px;
  border-radius: 999px;
  background: var(--warm);
  border: 1px solid var(--hair-ink);
  color: var(--ink);
  text-decoration: none;
  flex: 0 0 auto;
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
}
.brand:hover {
  border-color: rgba(47, 111, 122, .45);
  box-shadow: 0 0 0 3px rgba(127, 184, 196, .18);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 11px;
  border-radius: 48% 52% 44% 56% / 54% 46% 58% 42%;
  background: var(--wine);
  color: var(--warm);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .02em;
  white-space: nowrap;
}
.brand-mark--lg {
  height: 46px;
  padding: 0 14px;
  font-size: 16px;
  background: var(--snow);
  color: var(--wine);
}

.brand-line {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--muted);
  white-space: nowrap;
}

/* 中浮岛导航 */
.nav-pill {
  display: flex;
  align-items: center;
  padding: 5px;
  border-radius: 999px;
  background: rgba(127, 184, 196, .18);
  border: 1px solid rgba(47, 111, 122, .16);
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  display: block;
  padding: 9px 15px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .16s var(--ease), color .16s var(--ease);
}
.nav-link:hover {
  background: var(--deep-snow);
  color: var(--warm);
}
.nav-link[aria-current="page"] {
  background: var(--wine);
  color: var(--warm);
  font-weight: 700;
}

/* 右尾舱 */
.header-tail {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.version-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border-radius: 6px;
  border: 1px dashed rgba(142, 31, 47, .42);
  background: rgba(142, 31, 47, .05);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--red);
  white-space: nowrap;
}
.version-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(224, 138, 46, .18);
}

.header-cta {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--red);
  color: var(--warm);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .16s var(--ease), box-shadow .16s var(--ease);
}
.header-cta:hover {
  background: var(--red-deep);
  box-shadow: 0 0 0 3px rgba(142, 31, 47, .14);
}

/* 移动端汉堡 */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 14px;
  border: 1px solid var(--hair-ink);
  background: var(--warm);
  cursor: pointer;
  transition: border-color .16s var(--ease), background-color .16s var(--ease);
}
.nav-toggle:hover { border-color: var(--deep-snow); }
.nav-toggle-bars {
  display: grid;
  gap: 5px;
  width: 18px;
}
.nav-toggle-bar {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform .18s var(--ease), opacity .18s var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:first-child {
  transform: translateY(3.5px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:last-child {
  transform: translateY(-3.5px) rotate(-45deg);
}

/* ---------- 11. 页脚：天山地平线 ---------- */
.site-footer {
  position: relative;
  overflow: hidden;
  margin-top: clamp(48px, 6vw, 88px);
  padding-block: clamp(56px, 7vw, 92px) clamp(26px, 3.6vw, 40px);
  background: var(--wine);
  color: rgba(251, 247, 239, .82);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: -16%;
  right: -10%;
  width: min(620px, 72vw);
  aspect-ratio: 1 / 1;
  background: radial-gradient(
    circle at 42% 42%,
    rgba(127, 184, 196, .26),
    rgba(127, 184, 196, 0) 68%
  );
  border-radius: 48% 52% 60% 40% / 54% 42% 58% 46%;
  pointer-events: none;
}

.footer-ridge {
  position: absolute;
  inset: 0 0 auto 0;
  height: clamp(80px, 11vw, 148px);
  background: linear-gradient(
    180deg,
    rgba(127, 184, 196, .34),
    rgba(127, 184, 196, 0) 88%
  );
  clip-path: polygon(
    0% 100%, 7% 58%, 13% 76%, 22% 30%, 31% 70%, 40% 44%,
    52% 78%, 61% 38%, 72% 68%, 81% 50%, 90% 74%, 100% 56%,
    100% 100%
  );
  opacity: .55;
  pointer-events: none;
}

.footer-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px 32px;
  padding-bottom: clamp(22px, 3vw, 34px);
  border-bottom: 1px solid var(--hair-light);
}

.footer-brand {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-tagline {
  font-family: var(--font-display);
  font-size: clamp(18px, 2vw, 25px);
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: -.014em;
  color: var(--warm);
  max-width: 26ch;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 56px);
  padding-block: clamp(26px, 4vw, 44px);
}

.footer-col-title {
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .16em;
  color: var(--sand-gold);
}

.footer-links {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-link {
  position: relative;
  display: inline-block;
  font-size: 15px;
  line-height: 1.5;
  color: rgba(251, 247, 239, .82);
  text-decoration: none;
  transition: color .15s var(--ease);
}
.footer-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: var(--snow);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .18s var(--ease);
}
.footer-link:hover { color: var(--warm); }
.footer-link:hover::after { transform: scaleX(1); }

.footer-contact {
  display: grid;
  gap: 14px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-contact-item { font-size: 15px; line-height: 1.55; }
.footer-contact-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--snow);
  margin-bottom: 2px;
}
.footer-value {
  color: var(--warm);
  overflow-wrap: anywhere;
}

.footer-note {
  margin-top: 16px;
  max-width: 32ch;
  font-size: 13px;
  line-height: 1.7;
  color: rgba(251, 247, 239, .58);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 24px;
  padding-top: clamp(18px, 3vw, 26px);
  border-top: 1px solid var(--hair-light);
  font-size: 13px;
  color: rgba(251, 247, 239, .6);
}
.footer-legal {
  font-family: var(--font-mono);
  letter-spacing: .06em;
  font-size: 12px;
}

/* 回到顶部浮钮 */
.to-top {
  position: fixed;
  right: clamp(16px, 3vw, 32px);
  bottom: clamp(16px, 3vw, 32px);
  z-index: 80;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 17px;
  border-radius: 999px;
  border: 1px solid rgba(127, 184, 196, .45);
  background: rgba(21, 50, 57, .93);
  color: var(--snow);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .1em;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition:
    opacity .18s var(--ease),
    transform .18s var(--ease),
    visibility .18s linear,
    background-color .18s var(--ease),
    border-color .18s var(--ease);
}
.to-top[data-visible="true"] {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.to-top:hover {
  background: var(--ink);
  border-color: var(--snow);
}

/* ---------- 12. 响应式 ---------- */
@media (max-width: 1100px) {
  .nav-toggle { display: inline-flex; }

  .nav-pill {
    position: absolute;
    top: calc(100% + 10px);
    left: var(--pad);
    right: var(--pad);
    z-index: 95;
    display: block;
    padding: 10px;
    border-radius: 22px;
    background: var(--warm);
    border: 1px solid var(--hair-ink);
    box-shadow: 0 26px 48px -30px rgba(21, 50, 57, .55);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(.985);
    transform-origin: top center;
    transition:
      opacity .18s var(--ease),
      transform .18s var(--ease),
      visibility .18s linear;
  }
  .nav-pill[data-open="true"] {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
  }
  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }
  .nav-link {
    padding: 13px 16px;
    border-radius: 14px;
    font-size: 16px;
  }
  .nav-link[aria-current="page"] { border-radius: 14px; }
}

@media (max-width: 900px) {
  .grid--split,
  .grid--halves,
  .grid--thirds {
    grid-template-columns: minmax(0, 1fr);
  }
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .version-badge { display: none; }
}

@media (max-width: 620px) {
  .brand-line { display: none; }
  .brand { padding: 6px 14px 6px 6px; }
}

@media (max-width: 540px) {
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-top { align-items: flex-start; }
  .footer-tagline { font-size: 18px; max-width: 100%; }
  .footer-bottom { gap: 8px 16px; }
  .to-top { padding: 10px 14px; }
}

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

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }

  .nav-pill,
  .to-top,
  .footer-link::after {
    transform: none !important;
  }
  .footer-link::after { display: none; }
}
