/* =========================================================
   超凡国际中心 · 共享样式 /assets/site.css
   重置 → 变量 → 排版 → 头部 → 页脚 → 通用组件 → 响应式
   ========================================================= */

/* ---------- 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, dl, dd, figure, blockquote {
  margin: 0;
}

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

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

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

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

img { height: auto; }

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

/* ---------- tokens ---------- */
:root {
  --ink: #0B1B2B;
  --panel: #102A3F;
  --rail: #16324A;
  --wire: #1F4A63;
  --cyan: #22D3E0;
  --amber: #F2A93B;
  --ember: #E2603F;
  --paper: #F3EDE2;
  --paper-2: #E4D9C6;
  --muted: #9FB3C8;
  --black: #1A1F26;

  --rail-w: 272px;
  --bar-h: 68px;
  --radius: 2px;

  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Source Han Sans SC", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas,
    "Courier New", monospace;
}

/* ---------- base / typography ---------- */
body {
  min-height: 100vh;
  background-color: var(--ink);
  background-image:
    linear-gradient(rgba(31, 74, 99, 0.26) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 74, 99, 0.26) 1px, transparent 1px);
  background-size: 96px 96px;
  background-attachment: fixed;
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, .h1 {
  font-size: clamp(1.9rem, 4.2vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.12;
}

h2, .h2 {
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.26;
}

h3, .h3 {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.42;
}

h4, .h4 {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
}

p { max-width: 74ch; }

strong, b { font-weight: 700; }

::selection {
  background: var(--cyan);
  color: #04202a;
}

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

/* ---------- utilities ---------- */
.wrap {
  width: 100%;
  max-width: 1160px;
  margin-inline: auto;
  padding-inline: 20px;
}

.section {
  padding-block: clamp(40px, 6.5vw, 82px);
}

.section + .section {
  border-top: 1px solid var(--wire);
}

.stack > * + * {
  margin-top: var(--stack-gap, 16px);
}

.rule {
  height: 1px;
  border: 0;
  background: var(--wire);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cyan);
}

.eyebrow::before {
  content: "";
  width: 20px;
  height: 1px;
  background: currentColor;
  flex: none;
}

.lede {
  font-size: 17px;
  line-height: 1.8;
  color: var(--muted);
}

.muted { color: var(--muted); }

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

.caption {
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--muted);
}

/* ---------- grid ---------- */
.grid {
  display: grid;
  gap: 20px;
}

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

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.3;
  color: var(--paper);
  background: transparent;
  border: 1px solid var(--wire);
  border-radius: var(--radius);
  transition: background-color 0.2s ease, border-color 0.2s ease,
    color 0.2s ease;
}

.btn:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.btn--primary {
  background: var(--amber);
  border-color: var(--amber);
  color: #1A1206;
}

.btn--primary:hover {
  background: #FFBE4D;
  border-color: #FFBE4D;
  color: #1A1206;
}

.btn--ghost {
  border-color: var(--cyan);
  color: var(--cyan);
}

.btn--ghost:hover {
  background: rgba(34, 211, 224, 0.12);
  color: var(--cyan);
}

/* ---------- panels & paper ---------- */
.panel {
  background: var(--panel);
  border: 1px solid var(--wire);
  border-radius: var(--radius);
  padding: 24px;
}

.panel--accent {
  border-color: rgba(242, 169, 59, 0.62);
  box-shadow: inset 0 0 0 1px rgba(242, 169, 59, 0.12);
}

.paper-block {
  position: relative;
  background: var(--paper);
  color: var(--black);
  border: 1px solid var(--paper-2);
  border-radius: var(--radius);
  padding: clamp(22px, 4vw, 42px);
  box-shadow: 7px 7px 0 rgba(31, 74, 99, 0.5);
}

.paper-block h2,
.paper-block h3 { color: var(--black); }

.paper-block p { color: #2A2F36; }

.paper-block a {
  color: #0E5A73;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.paper-block a:hover { color: #0B3D4F; }

/* ---------- tags ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  line-height: 1.6;
  color: var(--cyan);
  background: rgba(34, 211, 224, 0.07);
  border: 1px solid rgba(34, 211, 224, 0.45);
  border-radius: 999px;
  white-space: nowrap;
}

.tag--amber {
  color: var(--amber);
  background: rgba(242, 169, 59, 0.08);
  border-color: rgba(242, 169, 59, 0.5);
}

.tag--ember {
  color: var(--ember);
  background: rgba(226, 96, 63, 0.08);
  border-color: rgba(226, 96, 63, 0.5);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.breadcrumb a {
  color: var(--muted);
  border-bottom: 1px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.breadcrumb a:hover {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
}

.breadcrumb span[aria-hidden="true"] { color: var(--wire); }

.breadcrumb [aria-current] { color: var(--paper); }

/* ---------- figure frames ---------- */
.figure-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--wire);
  border-radius: var(--radius);
  aspect-ratio: 16 / 9;
  background-color: var(--panel);
  background-image:
    radial-gradient(circle at 18% 22%, rgba(34, 211, 224, 0.16), transparent 58%),
    radial-gradient(circle at 88% 82%, rgba(242, 169, 59, 0.12), transparent 55%),
    repeating-linear-gradient(0deg, rgba(31, 74, 99, 0.5) 0 1px, transparent 1px 26px),
    repeating-linear-gradient(90deg, rgba(31, 74, 99, 0.5) 0 1px, transparent 1px 26px);
}

.figure-frame::after {
  content: "";
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 34px;
  height: 1px;
  background: var(--cyan);
  opacity: 0.7;
}

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

.figure-frame--wide { aspect-ratio: 21 / 9; }
.figure-frame--square { aspect-ratio: 1 / 1; }
.figure-frame--tall { aspect-ratio: 3 / 4; }

/* =========================================================
   头部
   ========================================================= */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 700;
  color: #1A1206;
  background: var(--amber);
  border-radius: var(--radius);
  transform: translateY(-200%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--rail);
  border-bottom: 1px solid var(--wire);
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    180deg,
    rgba(31, 74, 99, 0.34) 0 1px,
    transparent 1px 96px
  );
  opacity: 0.55;
  pointer-events: none;
}

/* 品牌区 */
.rail-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 16px;
  min-height: 58px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  position: relative;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(34, 211, 224, 0.78);
  border-radius: 50%;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(34, 211, 224, 0.22),
    rgba(11, 27, 43, 0) 68%
  );
  box-shadow: inset 0 0 0 1px rgba(11, 27, 43, 0.85),
    0 0 18px rgba(34, 211, 224, 0.16);
}

.brand-mark::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid var(--amber);
  border-radius: 50%;
  opacity: 0.9;
}

.brand-mark::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1px;
  height: 152%;
  background: linear-gradient(
    180deg,
    transparent,
    rgba(34, 211, 224, 0.85),
    transparent
  );
  transform: translate(-50%, -50%);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.brand-name {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--paper);
  white-space: nowrap;
}

.brand-note {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  line-height: 1.3;
  color: var(--muted);
  white-space: nowrap;
}

/* 移动端索引按钮 */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--muted);
  border: 1px solid var(--wire);
  border-radius: var(--radius);
  transition: border-color 0.2s ease, color 0.2s ease;
}

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

.nav-toggle-bars {
  position: relative;
  display: block;
  width: 16px;
  height: 10px;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.22s ease, top 0.22s ease;
}

.nav-toggle-bars::before { top: 0; }
.nav-toggle-bars::after { top: 100%; }

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before {
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after {
  top: 50%;
  transform: translateY(-50%) rotate(-45deg);
}

/* 索引轨道 */
.rail-nav {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  width: min(86vw, 322px);
  padding: 26px 18px 40px;
  background: var(--rail);
  border-right: 1px solid var(--wire);
  box-shadow: 26px 0 60px rgba(4, 12, 20, 0.55);
  overflow-y: auto;
  transform: translateX(-104%);
  visibility: hidden;
  transition: transform 0.28s ease, visibility 0.28s ease;
}

.rail-nav[data-open] {
  transform: translateX(0);
  visibility: visible;
}

.rail-title {
  padding-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cyan);
}

.rail-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid rgba(31, 74, 99, 0.72);
}

.rail-item + .rail-item {
  border-top: 1px dashed rgba(31, 74, 99, 0.55);
}

.rail-link {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 13px 14px 13px 16px;
  font-size: 14px;
  letter-spacing: 0.06em;
  color: var(--muted);
  transition: color 0.2s ease, background-color 0.2s ease;
}

.rail-link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  bottom: 9px;
  width: 2px;
  background: var(--cyan);
  transform: scaleY(0);
  transform-origin: top center;
  transition: transform 0.24s ease;
}

.rail-link:hover {
  color: var(--paper);
  background: rgba(34, 211, 224, 0.07);
}

.rail-link:hover::before { transform: scaleY(1); }

.rail-link[aria-current="page"] {
  color: var(--paper);
  background: rgba(34, 211, 224, 0.11);
}

.rail-link[aria-current="page"]::before {
  transform: scaleY(1);
  background: var(--cyan);
}

.rail-num {
  flex: none;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ember);
  opacity: 0.9;
}

.rail-label {
  min-width: 0;
}

.rail-hint {
  margin-top: auto;
  padding: 18px 16px 0;
  font-size: 12px;
  line-height: 1.65;
  color: rgba(159, 179, 200, 0.72);
  border-top: 1px dashed rgba(31, 74, 99, 0.8);
}

/* 查询条 */
.query-bar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px 12px;
}

.query-label {
  display: none;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.query-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--amber);
  background: rgba(242, 169, 59, 0.09);
  border: 1px solid var(--amber);
  border-radius: 999px;
  transition: background-color 0.2s ease, color 0.2s ease,
    box-shadow 0.2s ease;
}

.query-cta:hover {
  background: var(--amber);
  color: #1A1206;
  box-shadow: 0 0 0 4px rgba(242, 169, 59, 0.16);
}

.query-note {
  display: none;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.query-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.1s linear;
}

/* 主内容锚点 */
#main-content {
  display: block;
  scroll-margin-top: 96px;
}

/* =========================================================
   页脚
   ========================================================= */
.site-footer {
  position: relative;
  z-index: 2;
  margin-top: clamp(48px, 8vw, 96px);
  border-top: 1px solid var(--wire);
  background: linear-gradient(
    180deg,
    rgba(16, 42, 63, 0.9),
    rgba(11, 27, 43, 1) 72%
  );
}

.footer-inner {
  width: 100%;
  max-width: 1160px;
  margin-inline: auto;
  padding: 46px 20px 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  padding-bottom: 30px;
  border-bottom: 1px dashed rgba(31, 74, 99, 0.9);
}

.footer-mark {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.25;
  color: var(--paper);
}

.footer-note {
  margin-top: 7px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.footer-region {
  margin-top: 14px;
  max-width: 28ch;
  font-size: 12.5px;
  line-height: 1.7;
  color: rgba(159, 179, 200, 0.72);
}

.footer-col-title {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--cyan);
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-link {
  display: inline-block;
  font-size: 14px;
  color: var(--muted);
  transition: color 0.18s ease, padding-left 0.18s ease;
}

.footer-link:hover {
  color: var(--paper);
  padding-left: 6px;
}

.footer-meta {
  display: grid;
  gap: 10px;
  padding-top: 24px;
  font-size: 12.5px;
  line-height: 1.7;
  color: rgba(159, 179, 200, 0.78);
}

.footer-contact {
  font-size: 13px;
  color: var(--muted);
}

.footer-address {
  color: rgba(159, 179, 200, 0.7);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
}

.footer-legal a {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding-bottom: 2px;
  border-bottom: 1px solid var(--wire);
  transition: color 0.18s ease, border-color 0.18s ease;
}

.footer-legal a:hover {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: rgba(159, 179, 200, 0.6);
}

/* 返回顶部 */
.to-top {
  position: fixed;
  right: 18px;
  bottom: 20px;
  z-index: 70;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  font-size: 16px;
  line-height: 1;
  color: var(--cyan);
  background: rgba(16, 42, 63, 0.94);
  border: 1px solid var(--cyan);
  border-radius: var(--radius);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease,
    visibility 0.25s ease, background-color 0.2s ease, color 0.2s ease;
}

.to-top.is-shown {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.to-top:hover {
  background: var(--cyan);
  color: #04202a;
}

/* =========================================================
   滚动显现协议
   ========================================================= */
[data-reveal].reveal-init {
  opacity: 0;
  transform: translateY(14px);
}

[data-reveal].reveal-init.is-visible {
  opacity: 1;
  transform: none;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

/* =========================================================
   响应式
   ========================================================= */
@media (min-width: 640px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px 24px;
  }

  .footer-brand { grid-column: 1 / -1; }

  .query-bar {
    padding: 0 20px 12px;
    gap: 12px;
  }

  .query-cta {
    flex: 0 0 auto;
    font-size: 15px;
    padding: 10px 20px;
  }

  .query-note {
    display: block;
    margin-left: auto;
  }
}

@media (min-width: 1024px) {
  body {
    padding-left: var(--rail-w);
    background-size: 112px 112px;
  }

  #main-content {
    padding-top: calc(var(--bar-h) + 14px);
    scroll-margin-top: calc(var(--bar-h) + 20px);
  }

  .site-header {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--rail-w);
    display: flex;
    flex-direction: column;
    border-bottom: 0;
    border-right: 1px solid var(--wire);
    overflow-y: auto;
    overflow-x: hidden;
  }

  .rail-head {
    flex: none;
    padding: 24px 20px 20px;
    min-height: 0;
    border-bottom: 1px solid var(--wire);
  }

  .nav-toggle { display: none; }

  .rail-nav {
    position: static;
    flex: 1 1 auto;
    width: auto;
    padding: 20px 14px 26px;
    background: transparent;
    border-right: 0;
    box-shadow: none;
    overflow: visible;
    transform: none;
    visibility: visible;
    transition: none;
  }

  .rail-link {
    padding: 12px 14px 12px 16px;
  }

  .query-bar {
    position: fixed;
    top: 0;
    left: var(--rail-w);
    right: 0;
    z-index: 55;
    height: var(--bar-h);
    padding: 0 32px;
    gap: 18px;
    background: rgba(11, 27, 43, 0.94);
    border-bottom: 1px solid var(--wire);
  }

  .query-label { display: block; }

  .query-cta {
    font-size: 16px;
    padding: 10px 22px;
  }

  .query-note {
    display: block;
    margin-left: auto;
  }

  .query-progress { bottom: -1px; }

  .footer-grid {
    grid-template-columns: 1.6fr repeat(3, 1fr);
    gap: 36px 28px;
  }

  .footer-brand { grid-column: auto; }

  .footer-inner { padding: 54px 24px 34px; }

  .wrap { padding-inline: 24px; }

  .to-top {
    right: 28px;
    bottom: 28px;
  }
}

@media (max-width: 1023px) {
  body[data-nav-open] { overflow: hidden; }
}

/* =========================================================
   无障碍：减少动态
   ========================================================= */
@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;
  }

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

  .rail-link::before { transition: none; }
  .to-top { transform: none; }
}
