/* ============================================================
   泛亚官网 · /assets/site.css
   共享外壳：品牌轨道 + 双层导航 + 坐标分区页脚
   ============================================================ */

/* ---------- reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

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

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

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

button {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
}

/* ---------- tokens ---------- */
:root {
  --ink: #0b1f3a;
  --ink-2: #122b4e;
  --orange: #ff6a2a;
  --cyan: #2de0c0;
  --grid: #8a97a8;
  --mist: #f4f7fa;
  --paper: #ffffff;
  --gold: #d6a84b;
  --silver: #b9c3ce;
  --bronze: #b9794a;
  --warn: #ffd24a;

  --line-soft: rgba(11, 31, 58, 0.12);
  --line-dark: rgba(45, 224, 192, 0.22);
  --on-dark: rgba(244, 247, 250, 0.74);

  --font-sans: "Noto Sans SC", "Source Han Sans SC", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system,
    "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace,
    "SFMono-Regular", Menlo, Consolas, monospace;

  --rail-w: 104px;
  --shell: 1240px;
  --scroll: 0%;

  --grid-img: linear-gradient(rgba(45, 224, 192, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(45, 224, 192, 0.07) 1px, transparent 1px);
}

/* ---------- base ---------- */
body {
  padding-left: var(--rail-w);
  background: var(--mist);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.8;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  font-weight: 900;
  line-height: 1.14;
  letter-spacing: 0.02em;
}

h1 {
  font-size: clamp(40px, 6vw, 84px);
  line-height: 1.06;
}

h2 {
  font-size: clamp(26px, 3.4vw, 40px);
  line-height: 1.16;
}

h3 {
  font-size: clamp(19px, 2vw, 24px);
  line-height: 1.3;
}

p {
  margin-block: 0 0.9em;
}

a {
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

strong {
  font-weight: 800;
}

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

.visually-hidden {
  position: absolute;
  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;
}

/* ---------- skip link ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: calc(var(--rail-w) + 10px);
  z-index: 200;
  padding: 10px 18px;
  background: var(--cyan);
  color: var(--ink);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform 0.18s ease;
}

.skip-link:focus {
  transform: none;
}

/* ---------- header shell ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  display: block;
}

/* ---------- brand rail ---------- */
.brand-rail {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--rail-w);
  z-index: 95;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0 22px;
  background-color: var(--ink-2);
  background-image: var(--grid-img);
  background-size: 26px 26px;
  border-right: 1px solid var(--line-dark);
}

.rail-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  text-decoration: none;
}

.rail-cross {
  position: relative;
  display: block;
  width: 26px;
  height: 26px;
  border: 1px solid var(--cyan);
  opacity: 0.85;
}

.rail-cross::before,
.rail-cross::after {
  content: "";
  position: absolute;
  background: var(--orange);
}

.rail-cross::before {
  left: 50%;
  top: -7px;
  bottom: -7px;
  width: 1px;
  transform: translateX(-50%);
}

.rail-cross::after {
  top: 50%;
  left: -7px;
  right: -7px;
  height: 1px;
  transform: translateY(-50%);
}

.rail-name {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.rail-word {
  writing-mode: vertical-rl;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.34em;
  color: #fff;
}

.rail-latin {
  writing-mode: vertical-rl;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.42em;
  color: var(--cyan);
}

.rail-meta {
  margin: 0;
  writing-mode: vertical-rl;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  line-height: 1.6;
  color: rgba(244, 247, 250, 0.42);
}

/* ---------- header main ---------- */
.header-main {
  display: block;
}

.utility-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 34px;
  padding-inline: clamp(16px, 3vw, 32px);
  background: var(--ink-2);
  color: var(--on-dark);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
}

.utility-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.utility-dot {
  flex: none;
  width: 6px;
  height: 6px;
  background: var(--cyan);
  box-shadow: 0 0 0 3px rgba(45, 224, 192, 0.18);
}

.utility-coord {
  margin: 0;
  color: rgba(244, 247, 250, 0.5);
  white-space: nowrap;
}

.nav-bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  height: 62px;
  padding-inline: clamp(16px, 3vw, 32px);
  background: rgba(11, 31, 58, 0.97);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line-dark);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.8vw, 28px);
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 4px 2px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(244, 247, 250, 0.7);
  text-decoration: none;
  transition: color 0.18s ease;
}

.nav-link::before {
  content: "";
  width: 5px;
  height: 5px;
  margin-right: 8px;
  background: var(--cyan);
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: #fff;
}

.nav-link[aria-current="page"] {
  color: #fff;
}

.nav-link[aria-current="page"]::before {
  opacity: 1;
  transform: none;
}

.nav-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 2px;
  background: var(--orange);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid rgba(244, 247, 250, 0.28);
  border-radius: 2px;
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--mist);
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.site-header[data-open] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.site-header[data-open] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.site-header[data-open] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- scroll meter ---------- */
.scroll-meter {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  height: 2px;
  background: rgba(244, 247, 250, 0.1);
  pointer-events: none;
}

.scroll-meter-fill {
  display: block;
  height: 100%;
  width: var(--scroll);
  background: linear-gradient(90deg, var(--cyan), var(--orange));
  transition: width 0.12s linear;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease,
    border-color 0.18s ease, transform 0.18s ease;
}

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

.btn--primary {
  background: var(--orange);
  color: var(--ink);
  border-color: var(--orange);
}

.btn--primary:hover {
  background: #ff8347;
  border-color: #ff8347;
}

.btn--outline {
  background: transparent;
  color: var(--ink);
  border-color: rgba(11, 31, 58, 0.4);
}

.btn--outline:hover {
  border-color: var(--ink);
  background: rgba(11, 31, 58, 0.05);
}

.btn--ghost {
  background: transparent;
  color: var(--mist);
  border-color: rgba(244, 247, 250, 0.34);
}

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

.btn--small {
  padding: 7px 16px;
  font-size: 13px;
  letter-spacing: 0.06em;
}

/* ---------- layout ---------- */
.wrap {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 56px);
}

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

.section--dark {
  background: var(--ink);
  color: var(--on-dark);
}

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

.section-head {
  display: grid;
  gap: 14px;
  max-width: 74ch;
  margin-bottom: clamp(24px, 4vw, 44px);
}

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

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
}

.section--dark .eyebrow {
  color: var(--cyan);
}

.index-num {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(30px, 4vw, 52px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.04em;
  color: var(--grid);
}

.section--dark .index-num {
  color: var(--cyan);
}

.lead {
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.85;
  color: rgba(11, 31, 58, 0.82);
}

.section--dark .lead {
  color: rgba(244, 247, 250, 0.8);
}

.rule {
  height: 0;
  margin: 0;
  border: 0;
  border-top: 1px solid var(--line-soft);
}

.section--dark .rule {
  border-top-color: var(--line-dark);
}

/* ---------- grid ---------- */
.grid {
  display: grid;
  gap: clamp(20px, 3vw, 40px);
  align-items: start;
}

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

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

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

/* ---------- layers ---------- */
.panel {
  background: var(--paper);
  padding: clamp(20px, 3vw, 34px);
  border-top: 3px solid var(--orange);
}

.glass {
  background: rgba(18, 43, 78, 0.55);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line-dark);
  color: var(--mist);
  padding: clamp(18px, 2.6vw, 30px);
}

.glass a {
  color: var(--cyan);
}

/* ---------- breadcrumb ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  padding-block: 18px 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--grid);
}

.breadcrumb-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  color: var(--grid);
}

.breadcrumb-link {
  color: rgba(11, 31, 58, 0.72);
  text-decoration: none;
  border-bottom: 1px solid rgba(11, 31, 58, 0.22);
}

.breadcrumb-link:hover {
  color: var(--ink);
  border-bottom-color: var(--orange);
}

.breadcrumb-current {
  color: var(--ink);
  font-weight: 500;
}

/* ---------- table ---------- */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--paper);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.6;
}

.data-table caption {
  padding-bottom: 10px;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--grid);
}

.data-table th {
  padding: 12px 14px;
  text-align: left;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  white-space: nowrap;
  background: var(--ink-2);
  color: var(--mist);
}

.data-table td {
  padding: 12px 14px;
  vertical-align: top;
  border-bottom: 1px solid var(--line-soft);
}

.data-table tbody tr:nth-child(even) {
  background: rgba(11, 31, 58, 0.028);
}

.data-table .num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

/* ---------- tags & tiers ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border: 1px solid currentColor;
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  line-height: 1.6;
}

.tag--beta {
  background: var(--warn);
  border-color: var(--warn);
  color: var(--ink);
  font-weight: 700;
}

.tier {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 2px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.7;
}

.tier--gold {
  background: var(--gold);
  color: var(--ink);
}

.tier--silver {
  background: var(--silver);
  color: var(--ink);
}

.tier--bronze {
  background: var(--bronze);
  color: #fff;
}

/* ---------- media frame ---------- */
.media-frame {
  position: relative;
  display: block;
  overflow: hidden;
  width: 100%;
  background-color: rgba(18, 43, 78, 0.06);
  background-image: linear-gradient(
      rgba(138, 151, 168, 0.28) 1px,
      transparent 1px
    ),
    linear-gradient(90deg, rgba(138, 151, 168, 0.28) 1px, transparent 1px);
  background-size: 32px 32px;
}

.media-frame img,
.media-frame picture,
.media-frame svg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.media-frame--square {
  aspect-ratio: 1 / 1;
}

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

/* ---------- prose ---------- */
.prose {
  max-width: 68ch;
  font-size: 16.5px;
  line-height: 1.9;
}

.prose h2 {
  margin-top: 1.8em;
  margin-bottom: 0.5em;
  font-size: clamp(21px, 2.2vw, 27px);
}

.prose h3 {
  margin-top: 1.5em;
  margin-bottom: 0.4em;
  font-size: 18px;
}

.prose p {
  margin-bottom: 1.1em;
}

.prose ul,
.prose ol {
  margin-bottom: 1.2em;
  padding-left: 1.3em;
}

.prose ul li {
  list-style: square;
  margin-bottom: 0.4em;
}

.prose ol li {
  list-style: decimal;
  margin-bottom: 0.4em;
}

.prose a {
  color: var(--ink);
  border-bottom: 1px solid var(--orange);
  text-decoration: none;
}

/* ---------- footer ---------- */
.site-footer {
  position: relative;
  padding: clamp(44px, 6vw, 84px) clamp(20px, 4vw, 56px) 0;
  background-color: var(--ink);
  background-image: var(--grid-img);
  background-size: 40px 40px;
  color: var(--on-dark);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: clamp(26px, 4vw, 52px);
  max-width: var(--shell);
  margin-inline: auto;
}

.footer-zone {
  min-width: 0;
}

.footer-kicker {
  margin: 0 0 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--cyan);
}

.footer-claim {
  margin: 0;
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 900;
  line-height: 1.28;
  letter-spacing: 0.02em;
  color: #fff;
}

.footer-desc {
  margin: 14px 0 22px;
  font-size: 14px;
  line-height: 1.8;
  color: rgba(244, 247, 250, 0.6);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.footer-nav a {
  font-size: 14px;
  font-weight: 600;
  color: rgba(244, 247, 250, 0.74);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.footer-nav a:hover,
.footer-nav a:focus-visible {
  color: #fff;
  border-bottom-color: var(--orange);
}

.footer-title {
  margin: 0 0 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-dark);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: #fff;
}

.footer-links {
  display: grid;
  gap: 10px;
  font-size: 14px;
  line-height: 1.7;
}

.footer-links a {
  color: rgba(244, 247, 250, 0.72);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: #fff;
  border-bottom-color: var(--orange);
}

.footer-links--plain li {
  color: rgba(244, 247, 250, 0.78);
  font-size: 13.5px;
}

.footer-label {
  display: block;
  margin-bottom: 2px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: rgba(244, 247, 250, 0.42);
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 28px;
  max-width: var(--shell);
  margin: clamp(32px, 5vw, 56px) auto 0;
  padding: 18px 0 26px;
  border-top: 1px solid var(--line-dark);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: rgba(244, 247, 250, 0.48);
}

.footer-copy,
.footer-note {
  margin: 0;
}

/* ---------- responsive : tablet ---------- */
@media (max-width: 1120px) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

/* ---------- responsive : mobile nav ---------- */
@media (max-width: 960px) {
  body {
    padding-left: 0;
  }

  .skip-link {
    left: 10px;
  }

  .brand-rail {
    position: static;
    width: 100%;
    height: 56px;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 14px;
    padding: 0 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line-dark);
  }

  .rail-mark {
    width: 24px;
    height: 24px;
  }

  .rail-cross {
    width: 16px;
    height: 16px;
  }

  .rail-cross::before {
    top: -4px;
    bottom: -4px;
  }

  .rail-cross::after {
    left: -4px;
    right: -4px;
  }

  .rail-name {
    flex-direction: row;
    align-items: baseline;
    gap: 10px;
  }

  .rail-word {
    writing-mode: horizontal-tb;
    font-size: 18px;
    letter-spacing: 0.14em;
  }

  .rail-latin {
    writing-mode: horizontal-tb;
    font-size: 10px;
    letter-spacing: 0.3em;
  }

  .rail-meta {
    margin-left: auto;
    writing-mode: horizontal-tb;
    text-align: right;
    font-size: 9px;
  }

  .rail-meta br {
    display: none;
  }

  .utility-bar {
    display: none;
  }

  .nav-bar {
    height: 56px;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 80;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-height: 72vh;
    overflow-y: auto;
    padding: 6px 0;
    background: var(--ink);
    border-top: 1px solid var(--line-dark);
    border-bottom: 1px solid var(--line-dark);
    box-shadow: 0 22px 40px rgba(11, 31, 58, 0.45);
  }

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

  .nav-link {
    width: 100%;
    min-height: 48px;
    padding: 0 20px;
    font-size: 16px;
  }

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

  .nav-link[aria-current="page"] {
    background: rgba(45, 224, 192, 0.09);
    box-shadow: inset 3px 0 0 var(--orange);
  }

  .nav-toggle {
    display: flex;
  }
}

/* ---------- responsive : small ---------- */
@media (max-width: 680px) {
  body {
    font-size: 16px;
  }

  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .footer-base {
    flex-direction: column;
  }

  .btn {
    padding: 11px 18px;
    font-size: 14px;
  }

  .btn--small {
    padding: 7px 13px;
    font-size: 12.5px;
  }
}

/* ---------- motion preferences ---------- */
@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-meter-fill {
    transition: none;
  }

  .btn:hover {
    transform: none;
  }
}
