/* ==========================================================================
   豪运国际(CN)品牌通道 — 共享外壳样式 /assets/site.css
   1 重置与令牌 · 2 工具类 · 3 命令栏 · 4 按钮 · 5 页脚
   6 通用组件 · 7 响应式 · 8 动效偏好
   ========================================================================== */

/* ---------- 1. 重置与令牌 ---------- */
*, *::before, *::after { box-sizing: border-box; }

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

:root {
  /* 色彩系统 */
  --red: #C8102E;
  --red-deep: #8E0B20;
  --gold: #D4A017;
  --gold-soft: #F2D98A;
  --night: #0B1D3A;
  --night-deep: #060F1F;
  --jade: #F7F5F0;
  --sand: #E4DFD6;
  --ink: #1A1A1A;
  --teal: #1F7A6E;

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

  /* 字号阶梯 */
  --fs-12: .75rem;
  --fs-14: .875rem;
  --fs-16: 1rem;
  --fs-20: 1.25rem;
  --fs-28: 1.75rem;
  --fs-40: 2.5rem;
  --fs-64: 4rem;
  --fs-96: 6rem;
  --fs-132: 8.25rem;

  /* 版式 */
  --wrap: 1280px;
  --gutter: clamp(16px, 4vw, 48px);
  --bar-h: 56px;
  --ease: cubic-bezier(.2, .7, .25, 1);

  /* 当前进度（由 JS 更新） */
  --scroll-p: 0%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--jade);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-16);
  font-weight: 400;
  line-height: 1.8;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main { flex: 1 0 auto; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -.02em;
  color: var(--ink);
  text-wrap: balance;
}

p, ul, ol, dl, figure, blockquote, pre { margin: 0; }
ul, ol { list-style: none; padding: 0; }
img, svg, video { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

::selection {
  background: var(--gold-soft);
  color: var(--night-deep);
}

/* ---------- 2. 工具类 ---------- */
.visually-hidden {
  position: absolute !important;
  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;
}

.shell {
  width: min(calc(100% - var(--gutter) * 2), var(--wrap));
  margin-inline: auto;
}

.stack {
  display: grid;
  gap: clamp(14px, 2vw, 24px);
}

.rule {
  height: 1px;
  border: 0;
  margin-block: clamp(24px, 4vw, 48px);
  background: rgba(11, 29, 58, .14);
}

/* ---------- 3. 命令栏 ---------- */
.skip-link {
  position: absolute;
  left: 50%;
  top: 0;
  z-index: 120;
  transform: translate(-50%, -180%);
  padding: 8px 18px;
  background: var(--gold);
  color: var(--night-deep);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .1em;
  text-decoration: none;
  transition: transform .18s var(--ease);
}
.skip-link:focus { transform: translate(-50%, 0); }

.cmdbar {
  position: sticky;
  top: 0;
  z-index: 90;
  color: var(--jade);
  background-color: var(--night);
  background-image: repeating-linear-gradient(90deg, rgba(247, 245, 240, .045) 0 1px, transparent 1px 34px);
  border-bottom: 1px solid rgba(212, 160, 23, .34);
  transition: box-shadow .25s var(--ease);
}
.cmdbar[data-scrolled] {
  box-shadow: 0 14px 30px -20px rgba(6, 15, 31, .95);
}

.cmdbar__inner {
  width: min(calc(100% - var(--gutter) * 2), var(--wrap));
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  min-height: var(--bar-h);
  padding-block: 7px;
  transition: min-height .2s var(--ease), padding .2s var(--ease);
}

/* 品牌 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  text-decoration: none;
}
.brand__mark {
  position: relative;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  background: var(--red);
  clip-path: polygon(0 0, 100% 0, 100% 68%, 68% 100%, 0 100%);
}
.brand__mark::after {
  content: "";
  position: absolute;
  left: 5px;
  right: 5px;
  top: 50%;
  height: 3px;
  background: var(--gold);
  transform: translateY(-50%) skewX(-20deg);
}
.brand__text { display: flex; flex-direction: column; line-height: 1.12; }
.brand__name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 15px;
  letter-spacing: -.01em;
  color: var(--jade);
  white-space: nowrap;
}
.brand__sub {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .28em;
  color: var(--gold);
  white-space: nowrap;
}
.brand--foot .brand__name { font-size: 20px; }
.brand--foot .brand__sub { font-size: 10px; letter-spacing: .32em; }

.verchip {
  flex: 0 0 auto;
  padding: 2px 7px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .1em;
  color: var(--gold-soft);
  background: rgba(212, 160, 23, .12);
  border: 1px solid rgba(212, 160, 23, .45);
  clip-path: polygon(5px 0, 100% 0, 100% calc(100% - 5px), calc(100% - 5px) 100%, 0 100%, 0 5px);
  white-space: nowrap;
}

/* 索引式导航 */
.nav {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
}
.nav__list {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: nowrap;
}
.nav__item { display: block; }
.nav__link {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 8px 7px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .02em;
  color: rgba(247, 245, 240, .7);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color .16s var(--ease), background-color .16s var(--ease), border-color .16s var(--ease);
}
.nav__idx {
  font-size: 9px;
  letter-spacing: .06em;
  color: var(--gold);
  opacity: .85;
}
.nav__link:hover {
  color: var(--jade);
  background-color: rgba(247, 245, 240, .07);
}
.nav__link[aria-current="page"] {
  color: #ffffff;
  background-color: rgba(200, 16, 46, .18);
  border-bottom-color: var(--red);
}
.nav__link[aria-current="page"] .nav__idx { color: var(--gold-soft); opacity: 1; }

/* 命令栏工具区 */
.cmdbar__tools {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex: 0 0 auto;
}

.find {
  position: relative;
  display: flex;
  align-items: center;
  width: clamp(130px, 16vw, 240px);
  transition: width .2s var(--ease);
}
.find:focus-within { width: clamp(180px, 24vw, 320px); }
.find::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 50%;
  width: 9px;
  height: 9px;
  margin-top: -6px;
  border: 1.5px solid var(--gold);
  border-radius: 50%;
  pointer-events: none;
}
.find::after {
  content: "";
  position: absolute;
  left: 19px;
  top: 50%;
  width: 6px;
  height: 1.5px;
  margin-top: 2px;
  background: var(--gold);
  transform: rotate(45deg);
  transform-origin: 0 50%;
  pointer-events: none;
}
.find__input {
  width: 100%;
  height: 32px;
  padding: 0 10px 0 28px;
  color: var(--jade);
  background: rgba(247, 245, 240, .06);
  border: 1px solid rgba(212, 160, 23, .42);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .04em;
  -webkit-appearance: none;
  appearance: none;
  clip-path: polygon(7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%, 0 7px);
}
.find__input::placeholder { color: rgba(247, 245, 240, .42); }
.find__input:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.find__input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }

.find__hint {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .08em;
  color: var(--gold-soft);
  white-space: nowrap;
}
.find__hint:empty { display: none; }

/* 移动导航按钮 */
.navtoggle {
  display: none;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 12px;
  color: var(--gold-soft);
  background: transparent;
  border: 1px solid rgba(212, 160, 23, .42);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  cursor: pointer;
  clip-path: polygon(7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%, 0 7px);
}
.navtoggle__bars {
  position: relative;
  display: block;
  width: 14px;
  height: 10px;
}
.navtoggle__bars::before,
.navtoggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: currentColor;
}
.navtoggle__bars::before { top: 0; box-shadow: 0 4px 0 currentColor; }
.navtoggle__bars::after { bottom: 0; }
.navtoggle[aria-expanded="true"] {
  color: #ffffff;
  background: rgba(212, 160, 23, .16);
}

/* 刻度与进度 */
.cmdbar__ruler {
  position: relative;
  height: 3px;
  background-color: rgba(6, 15, 31, .55);
  background-image: repeating-linear-gradient(90deg, rgba(247, 245, 240, .16) 0 1px, transparent 1px 30px);
}
.cmdbar__ruler::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--scroll-p, 0%);
  background: linear-gradient(90deg, var(--red), var(--gold));
  transition: width .1s linear;
}

/* ---------- 4. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid transparent;
  cursor: pointer;
  clip-path: polygon(7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%, 0 7px);
  transition: background-color .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
}
.btn--red { background: var(--red); color: #ffffff; }
.btn--red:hover { background: var(--red-deep); }
.btn--ghost {
  color: var(--gold-soft);
  border-color: rgba(212, 160, 23, .55);
  background: transparent;
}
.btn--ghost:hover { background: rgba(212, 160, 23, .14); color: #ffffff; }
.btn--gold { background: var(--gold); color: var(--night-deep); }
.btn--gold:hover { background: var(--gold-soft); }
.btn:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--gold), 0 0 0 2px rgba(212, 160, 23, .45);
}

/* ---------- 5. 页脚 ---------- */
.foot {
  position: relative;
  margin-top: auto;
  color: rgba(247, 245, 240, .76);
  background-color: var(--night);
  background-image: repeating-linear-gradient(115deg, rgba(247, 245, 240, .035) 0 2px, transparent 2px 26px);
  border-top: 1px solid rgba(212, 160, 23, .3);
  font-size: 14px;
}
.foot__wrap {
  width: min(calc(100% - var(--gutter) * 2), var(--wrap));
  margin-inline: auto;
  padding-block: clamp(36px, 6vw, 64px) 22px;
}
.foot__top {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(0, 2fr);
  gap: clamp(24px, 4vw, 56px);
  padding-bottom: clamp(24px, 4vw, 40px);
  border-bottom: 1px solid rgba(247, 245, 240, .12);
}
.foot__brand { display: block; }
.foot__slogan {
  margin-top: 16px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.42;
  letter-spacing: -.01em;
  color: var(--jade);
}
.foot__meta {
  margin-top: 10px;
  max-width: 40ch;
  font-size: 13px;
  line-height: 1.75;
  color: rgba(247, 245, 240, .55);
}
.foot__cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 3vw, 32px);
}
.foot__col { min-width: 0; }
.foot__ctitle {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: .2em;
  color: var(--gold-soft);
}
.foot__ctitle::before {
  content: "";
  flex: 0 0 auto;
  width: 16px;
  height: 2px;
  background: var(--red);
}
.foot__links li + li { margin-top: 2px; }
.foot__links a {
  display: inline-block;
  padding: 4px 0;
  font-size: 13.5px;
  color: rgba(247, 245, 240, .76);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .16s var(--ease), border-color .16s var(--ease);
}
.foot__links a:hover { color: #ffffff; border-bottom-color: var(--gold); }

.foot__contact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px clamp(20px, 4vw, 40px);
  padding-block: clamp(20px, 3vw, 32px);
  border-bottom: 1px solid rgba(247, 245, 240, .12);
}
.foot__cline {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .02em;
  color: rgba(247, 245, 240, .82);
  word-break: break-word;
}
.foot__ckey {
  flex: 0 0 auto;
  padding: 1px 6px;
  font-size: 10px;
  letter-spacing: .16em;
  color: var(--gold);
  border: 1px solid rgba(212, 160, 23, .4);
}
.foot__note {
  grid-column: 1 / -1;
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.9;
  color: rgba(247, 245, 240, .5);
}

.foot__base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  padding-top: 20px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: rgba(247, 245, 240, .5);
}
.foot__filing {
  padding: 2px 8px;
  color: var(--gold-soft);
  border: 1px solid rgba(212, 160, 23, .32);
}

.foot__stamp {
  background: var(--night-deep);
  border-top: 1px solid rgba(212, 160, 23, .22);
}
.foot__stampin {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 24px;
  width: min(calc(100% - var(--gutter) * 2), var(--wrap));
  margin-inline: auto;
  padding-block: 11px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .24em;
  color: rgba(247, 245, 240, .4);
}
.foot__stampin span:last-child { color: rgba(212, 160, 23, .62); }

/* ---------- 6. 通用组件 ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .22em;
  color: var(--red);
  text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 20px; height: 1px; background: currentColor; }

.lede {
  max-width: 62ch;
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.9;
  color: #3a3a38;
}

.prose { max-width: 68ch; }
.prose p + p { margin-top: 1.1em; }
.prose ul { display: grid; gap: .5em; margin-top: 1em; }
.prose li { position: relative; padding-left: 20px; }
.prose li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .85em;
  width: 10px;
  height: 2px;
  background: var(--gold);
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding-block: 20px 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: #7a7468;
}
.crumbs a {
  color: #4a463d;
  text-decoration: none;
  border-bottom: 1px solid rgba(26, 26, 26, .22);
}
.crumbs a:hover { color: var(--red); border-bottom-color: var(--red); }
.crumbs__sep { color: rgba(212, 160, 23, .9); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .12em;
  color: #4a463d;
  background: var(--sand);
  border-left: 2px solid var(--gold);
}
.tag--red {
  color: var(--red-deep);
  background: rgba(200, 16, 46, .1);
  border-left-color: var(--red);
}
.tag--night {
  color: var(--gold-soft);
  background: var(--night);
  border-left-color: var(--gold);
}

.panel {
  --cut: 22px;
  position: relative;
  padding: clamp(18px, 2.4vw, 26px);
  background: #ffffff;
  border: 1px solid rgba(11, 29, 58, .13);
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
}
.panel--sand { background: var(--sand); }
.panel--night {
  color: rgba(247, 245, 240, .82);
  background: var(--night);
  border-color: rgba(212, 160, 23, .3);
}
.panel--night h2,
.panel--night h3,
.panel--night strong { color: #ffffff; }

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

.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 12px;
  border-top: 2px solid var(--red);
}
.stat__num {
  font-family: var(--font-mono);
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1;
  letter-spacing: -.02em;
  color: var(--night);
}
.stat__key {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .16em;
  color: #7a7468;
}

.media {
  --ratio: 16 / 10;
  position: relative;
  aspect-ratio: var(--ratio);
  overflow: hidden;
  background: var(--sand);
  border: 1px solid rgba(11, 29, 58, .14);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%);
}
.media::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(45deg, rgba(11, 29, 58, .07) 0 1px, transparent 1px 12px);
}
.media > img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media--wide { --ratio: 21 / 9; }
.media--tall { --ratio: 4 / 5; }
.media--square { --ratio: 1 / 1; }
.media__cap {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: #7a7468;
}

.reveal { opacity: 1; }
.js .reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
  transition-delay: calc(var(--ri, 0) * 40ms);
}
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- 7. 响应式 ---------- */
@media (max-width: 1080px) {
  .navtoggle { display: inline-flex; }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 3;
    display: none;
    padding: 8px var(--gutter) 20px;
    background: var(--night-deep);
    border-bottom: 1px solid rgba(212, 160, 23, .34);
    box-shadow: 0 30px 44px -26px rgba(6, 15, 31, .95);
    max-height: calc(100vh - var(--bar-h));
    overflow-y: auto;
  }
  .nav[data-open] { display: block; }
  .nav__list {
    flex-direction: column;
    align-items: stretch;
    flex-wrap: nowrap;
  }
  .nav__item { border-bottom: 1px solid rgba(247, 245, 240, .09); }
  .nav__item:last-child { border-bottom: 0; }
  .nav__link {
    display: flex;
    width: 100%;
    padding: 14px 4px;
    font-size: 13px;
    border-bottom: 0;
  }
  .nav__link[aria-current="page"] {
    padding-left: 12px;
    border-left: 3px solid var(--red);
    background: linear-gradient(90deg, rgba(200, 16, 46, .3), transparent 72%);
  }
}

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

  .foot__top { grid-template-columns: minmax(0, 1fr); }
  .foot__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .cmdbar__inner { padding-block: 9px; gap: 10px; }
  .brand { flex: 1 1 auto; min-width: 0; }
  .navtoggle { order: 2; margin-left: auto; }

  .cmdbar__tools {
    order: 3;
    flex: 1 1 100%;
    flex-wrap: wrap;
    gap: 8px;
    margin-left: 0;
  }
  .find { flex: 1 1 100%; width: 100%; }
  .find:focus-within { width: 100%; }
  .cmdbar__tools .btn { flex: 1 1 0; }
  .find__hint { display: none; }

  .cmdbar[data-scrolled] .cmdbar__tools { display: none; }

  .foot__cols { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .foot__base { font-size: 10.5px; letter-spacing: .05em; }
  .foot__stampin { font-size: 10px; letter-spacing: .14em; }
}

/* ---------- 8. 动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  .cmdbar__ruler::after { transition: none; }
}
