/* ==========================================================================
   汇赢国际 · 共享站级样式表  /assets/site.css
   1. Reset  2. 变量  3. 基础排版  4. 通用组件  5. 头部  6. 页脚  7. 动效
   ========================================================================== */

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

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

body {
  margin: 0;
  background: var(--mist);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, p, figure, blockquote, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; }
a { color: var(--indigo); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--cinnabar); }
table { border-collapse: collapse; width: 100%; }

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

/* ---------- 2. 变量 ---------- */
:root {
  /* 色盘 */
  --ink: #0B1D33;
  --ink-2: #112A46;
  --silver: #C9D3DD;
  --mist: #F4F7FA;
  --silver-2: #E6EBF0;
  --indigo: #1F4E79;
  --terra: #2F7D6D;
  --electric: #4FD1C5;
  --cinnabar: #C2410C;
  --cinnabar-deep: #A3360A;
  --charcoal: #0A0F16;

  /* 字体 */
  --font-head: "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC", "Noto Sans SC", "Microsoft YaHei", "Heiti SC", system-ui, sans-serif;
  --font-body: "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC", "Noto Sans SC", "Microsoft YaHei", system-ui, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, "Liberation Mono", "Courier New", monospace;

  /* 尺寸 */
  --shell: 1320px;
  --gutter: clamp(20px, 4vw, 56px);
  --header-h: 78px;
  --hair: 1px;
  --radius: 3px;
  --ease: cubic-bezier(.22, .7, .3, 1);
}

/* ---------- 3. 基础排版 ---------- */
.display {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  line-height: 1.04;
  letter-spacing: -.015em;
}

.h2 {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.16;
  letter-spacing: -.01em;
  margin: 0 0 .55em;
}

.h3 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(1.06rem, 1.6vw, 1.28rem);
  line-height: 1.4;
  margin: 0 0 .45em;
}

.lede {
  font-size: clamp(1rem, 1.35vw, 1.15rem);
  line-height: 1.78;
  color: rgba(11, 29, 51, .78);
  max-width: 62ch;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .65em;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--terra);
  margin-bottom: 1.1em;
}

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

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

/* ---------- 4. 通用组件 ---------- */
.container {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: clamp(48px, 7vw, 104px);
  position: relative;
}

.section--dark { background: var(--ink); color: var(--mist); }
.section--mist { background: var(--mist); color: var(--ink); }
.section--silver { background: var(--silver-2); color: var(--ink); }

.section--dark .lede { color: rgba(244, 247, 250, .8); }
.section--dark .h2,
.section--dark .h3,
.section--dark .display { color: var(--mist); }
.section--dark .eyebrow { color: var(--electric); }
.section--dark a { color: var(--electric); }
.section--dark a:hover { color: #8FF0E6; }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55em;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: .94rem;
  line-height: 1;
  letter-spacing: .02em;
  padding: .95em 1.35em;
  border: var(--hair) solid transparent;
  border-radius: var(--radius);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .22s var(--ease), color .22s var(--ease),
              border-color .22s var(--ease), transform .22s var(--ease),
              box-shadow .22s var(--ease);
}

.btn--primary {
  background: var(--cinnabar);
  color: #fff;
  box-shadow: 0 12px 26px -18px rgba(194, 65, 12, .95);
}
.btn--primary:hover {
  background: var(--cinnabar-deep);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 16px 30px -18px rgba(194, 65, 12, .95);
}

.btn--ghost {
  background: transparent;
  border-color: rgba(201, 211, 221, .38);
  color: var(--silver);
}
.btn--ghost:hover {
  border-color: var(--electric);
  color: var(--electric);
  background: rgba(79, 209, 197, .08);
}

.btn--light {
  background: var(--mist);
  color: var(--ink);
  border-color: var(--mist);
}
.btn--light:hover {
  background: #fff;
  color: var(--ink);
  transform: translateY(-1px);
}

/* 网格 */
.grid {
  display: grid;
  gap: clamp(16px, 2.2vw, 28px);
}
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }

/* 卡片 */
.card {
  position: relative;
  background: #fff;
  border: var(--hair) solid var(--silver-2);
  border-radius: var(--radius);
  padding: clamp(20px, 2.4vw, 30px);
  box-shadow: 0 1px 0 rgba(11, 29, 51, .03), 0 22px 44px -40px rgba(11, 29, 51, .6);
}

.card--dark {
  background: var(--ink-2);
  border-color: rgba(201, 211, 221, .16);
  color: var(--mist);
  box-shadow: 0 22px 44px -40px rgba(0, 0, 0, .9);
}

.card__index {
  display: block;
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .2em;
  color: var(--cinnabar);
  margin-bottom: .9em;
}

.card--dark .card__index { color: var(--electric); }

/* 标签 */
.tag {
  display: inline-flex;
  align-items: center;
  gap: .4em;
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: .42em .72em;
  border: var(--hair) solid currentColor;
  border-radius: 2px;
  color: var(--indigo);
  line-height: 1;
}
.tag--electric { color: var(--terra); }
.section--dark .tag { color: var(--electric); }

/* 面包屑 */
.breadcrumbs {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .12em;
  color: rgba(11, 29, 51, .55);
  padding-block: 18px;
}
.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: .5em;
  margin: 0;
  padding: 0;
}
.breadcrumbs li { display: inline-flex; align-items: center; }
.breadcrumbs li + li::before {
  content: "/";
  margin-right: .5em;
  opacity: .5;
}
.breadcrumbs a { color: inherit; text-decoration: none; }
.breadcrumbs a:hover { color: var(--cinnabar); }
.breadcrumbs [aria-current="page"] { color: var(--ink); }
.section--dark .breadcrumbs { color: rgba(201, 211, 221, .6); }
.section--dark .breadcrumbs [aria-current="page"] { color: var(--mist); }

/* 图片容器基础规则（页面阶段内嵌 img 使用） */
.figure {
  position: relative;
  display: block;
  margin: 0;
  overflow: hidden;
  border: var(--hair) solid rgba(201, 211, 221, .18);
  border-radius: var(--radius);
  background:
    linear-gradient(155deg, rgba(79, 209, 197, .16) 0%, transparent 42%),
    linear-gradient(200deg, var(--indigo) 0%, var(--ink-2) 52%, var(--terra) 100%);
  isolation: isolate;
}

.figure::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(132deg, rgba(244, 247, 250, .09) 0 1px, transparent 1px 20px);
  pointer-events: none;
  z-index: 1;
}

.figure__img {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.figure__caption {
  position: absolute;
  z-index: 3;
  left: 0; right: 0; bottom: 0;
  padding: .8em 1em;
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .12em;
  color: var(--mist);
  background: linear-gradient(180deg, transparent, rgba(10, 15, 22, .82));
}

.figure--16x9 { aspect-ratio: 16 / 9; }
.figure--4x3  { aspect-ratio: 4 / 3; }
.figure--1x1  { aspect-ratio: 1 / 1; }
.figure--wide { aspect-ratio: 21 / 9; }

/* 焦点可见 */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--electric);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- 5. 头部 ---------- */
.skip-link {
  position: absolute;
  left: 50%;
  top: 0;
  z-index: 200;
  transform: translate(-50%, -160%);
  background: var(--electric);
  color: var(--ink);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: .88rem;
  padding: .78em 1.25em;
  border-radius: 0 0 var(--radius) var(--radius);
  text-decoration: none;
  transition: transform .22s var(--ease);
}
.skip-link:focus,
.skip-link:focus-visible {
  transform: translate(-50%, 0);
  color: var(--ink);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  color: var(--mist);
  background-color: var(--ink);
  background-image: linear-gradient(180deg, rgba(11, 29, 51, .97) 0%, rgba(11, 29, 51, .74) 100%);
  border-bottom: var(--hair) solid rgba(201, 211, 221, .14);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: background-color .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease);
}

.site-header.is-scrolled {
  background-image: none;
  background-color: var(--ink);
  border-bottom-color: rgba(201, 211, 221, .24);
  box-shadow: 0 18px 42px -30px rgba(0, 0, 0, .95);
}

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

/* 品牌 */
.brand {
  order: 1;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  color: var(--mist);
  text-decoration: none;
}
.brand:hover { color: var(--mist); }

.brand-mark {
  display: inline-grid;
  grid-auto-flow: column;
  align-items: end;
  gap: 3px;
  height: 26px;
  flex: 0 0 auto;
}

.brand-mark__ridge {
  display: block;
  width: 4px;
  border-radius: 1px;
  background: linear-gradient(180deg, var(--electric) 0%, var(--terra) 100%);
}
.brand-mark__ridge:nth-child(1) { height: 11px; opacity: .68; }
.brand-mark__ridge:nth-child(2) { height: 22px; }
.brand-mark__ridge:nth-child(3) { height: 16px; opacity: .86; }

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

.brand-name {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.06rem;
  letter-spacing: .1em;
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: .64rem;
  letter-spacing: .2em;
  color: var(--silver);
  opacity: .72;
  text-transform: uppercase;
}

/* 桌面导航 */
.primary-nav {
  order: 2;
  margin-inline-start: auto;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(4px, 1.4vw, 22px);
}

.nav-item { display: flex; }

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 12px 2px;
  color: var(--silver);
  font-size: .93rem;
  text-decoration: none;
  white-space: nowrap;
  transition: color .2s var(--ease);
}

.nav-index {
  font-family: var(--font-mono);
  font-size: .6rem;
  letter-spacing: .08em;
  color: var(--electric);
  opacity: .5;
  transition: opacity .2s var(--ease);
}

.nav-label { display: inline-block; }

.nav-link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 4px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform .3s var(--ease);
}

.nav-link:hover { color: var(--mist); }
.nav-link:hover::after { transform: scaleX(1); }
.nav-link:hover .nav-index { opacity: 1; }

.nav-link[aria-current="page"] { color: var(--mist); }
.nav-link[aria-current="page"] .nav-index { opacity: 1; color: var(--electric); }
.nav-link[aria-current="page"]::after {
  transform: scaleX(1);
  background: var(--electric);
  height: 2px;
}

/* 移动按钮 */
.nav-toggle {
  order: 3;
  display: none;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  background: transparent;
  border: var(--hair) solid rgba(201, 211, 221, .3);
  border-radius: 2px;
  color: var(--mist);
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .18em;
  cursor: pointer;
  transition: border-color .2s var(--ease), color .2s var(--ease);
}
.nav-toggle:hover { border-color: var(--electric); color: var(--electric); }

.nav-toggle__glyph {
  display: inline-flex;
  flex-direction: column;
  justify-content: space-between;
  width: 16px;
  height: 12px;
}
.nav-toggle__glyph span {
  display: block;
  height: 1.5px;
  background: currentColor;
  transition: transform .26s var(--ease), opacity .2s var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__glyph span:nth-child(1) { transform: translateY(5.25px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__glyph span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__glyph span:nth-child(3) { transform: translateY(-5.25px) rotate(-45deg); }

.nav-toggle__text { line-height: 1; }

/* 头部行动位 */
.header-actions {
  order: 4;
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.header-cta { font-size: .88rem; padding: .82em 1.15em; }

/* 阅读进度轨 */
.header-progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--electric) 0%, var(--terra) 100%);
  transform: scaleX(0);
  transform-origin: 0 50%;
  pointer-events: none;
  will-change: transform;
}

/* ---------- 6. 页脚 ---------- */
.site-footer {
  position: relative;
  overflow: hidden;
  color: var(--silver);
  padding-top: clamp(52px, 7vw, 96px);
  background:
    radial-gradient(1100px 380px at 10% -12%, rgba(31, 78, 121, .62), transparent 68%),
    radial-gradient(880px 340px at 94% -4%, rgba(47, 125, 109, .3), transparent 66%),
    var(--charcoal);
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 160px;
  background: repeating-linear-gradient(108deg, rgba(79, 209, 197, .13) 0 1px, transparent 1px 42px);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, transparent 100%);
  pointer-events: none;
}

.footer-inner {
  position: relative;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 58px);
  padding-bottom: clamp(34px, 4.5vw, 58px);
}

.footer-brand__link {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--mist);
  text-decoration: none;
}
.footer-brand__link:hover { color: var(--mist); }

.footer-brand__name {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.16rem;
  letter-spacing: .12em;
}

.footer-brand__line {
  margin: .95em 0 1.5em;
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .18em;
  color: rgba(201, 211, 221, .6);
  text-transform: uppercase;
}

.footer-contact {
  display: grid;
  gap: 13px;
  max-width: 36ch;
}

.footer-contact li {
  display: grid;
  gap: 2px;
  padding-left: 12px;
  border-left: var(--hair) solid rgba(79, 209, 197, .28);
}

.footer-contact__k {
  font-family: var(--font-mono);
  font-size: .62rem;
  letter-spacing: .2em;
  color: var(--electric);
  opacity: .82;
  text-transform: uppercase;
}

.footer-contact__v {
  font-size: .9rem;
  line-height: 1.62;
  color: rgba(201, 211, 221, .86);
}

.footer-col__title {
  margin: 0 0 1.15em;
  font-family: var(--font-mono);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .22em;
  color: var(--mist);
  text-transform: uppercase;
}

.footer-links {
  display: grid;
  gap: 11px;
}

.footer-links a {
  position: relative;
  display: inline-block;
  color: rgba(201, 211, 221, .82);
  font-size: .92rem;
  text-decoration: none;
  transition: color .2s var(--ease);
}

.footer-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: var(--electric);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform .28s var(--ease);
}

.footer-links a:hover { color: var(--mist); }
.footer-links a:hover::after { transform: scaleX(1); }

.footer-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 28px;
  padding: 20px 0 26px;
  border-top: var(--hair) solid rgba(201, 211, 221, .14);
  font-size: .78rem;
  color: rgba(201, 211, 221, .62);
}

.footer-base__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 26px;
}

.footer-base__copy {
  margin: 0;
  font-family: var(--font-mono);
  letter-spacing: .06em;
}

/* ---------- 7. 显现动效 ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity .72s var(--ease),
    transform .72s var(--ease);
  transition-delay: calc(var(--d, 0) * 75ms);
}

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

/* ---------- 8. 响应式 ---------- */
@media (max-width: 1120px) {
  :root { --header-h: 66px; }

  .nav-toggle { display: inline-flex; margin-inline-start: auto; }

  .primary-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-inline-start: 0;
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    background: var(--charcoal);
    border-bottom: var(--hair) solid rgba(201, 211, 221, .18);
    box-shadow: 0 34px 64px -34px rgba(0, 0, 0, .95);
    transition: max-height .38s var(--ease), visibility .38s var(--ease);
  }

  .primary-nav[data-open="true"] {
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    visibility: visible;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 26px;
  }

  .nav-item {
    border-bottom: var(--hair) solid rgba(201, 211, 221, .1);
  }

  .nav-link {
    display: flex;
    align-items: baseline;
    padding: 15px 4px;
    font-size: 1rem;
  }

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

  .nav-link[aria-current="page"] {
    color: var(--electric);
    box-shadow: inset 3px 0 0 var(--electric);
    padding-inline-start: 12px;
  }

  .header-actions { margin-inline-start: 0; }
}

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

@media (max-width: 640px) {
  .header-cta { font-size: .8rem; padding: .7em .9em; }
  .footer-base { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 560px) {
  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 30px; }
}

@media (max-width: 480px) {
  .brand-sub { display: none; }
  .header-cta { display: none; }
  .nav-toggle__text { display: none; }
  .nav-toggle { padding: 9px 10px; }
}

/* ---------- 9. 减动效 ---------- */
@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;
  }

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

  .btn--primary:hover,
  .btn--light:hover { transform: none; }
}
