/* =========================================================
   久赢平台 · 共享样式 /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, li, dl, dt, dd, figure, blockquote, hr {
  margin: 0;
}

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

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

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

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

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

hr { border: 0; border-top: 1px solid var(--line); }

/* ---------- tokens ---------- */
:root {
  --c-deep: #0B1B33;
  --c-deep-dark: #07111F;
  --c-silver: #C7D2E4;
  --c-orange: #FF6B2C;
  --c-cyan: #3DD9C0;
  --c-green: #7CE38B;
  --c-red: #FF4D6D;
  --c-paper: #F5F7FB;
  --c-gray: #8698B2;

  --line: rgba(199, 210, 228, 0.16);
  --line-strong: rgba(199, 210, 228, 0.30);
  --glow-a: rgba(61, 217, 192, 0.28);
  --glow-b: rgba(255, 107, 44, 0.20);

  --font-display: "Space Grotesk", "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", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --rail-h: 30px;
  --radius-s: 10px;
  --radius-m: 16px;
  --radius-l: 24px;
  --radius-pill: 999px;

  --shell: 1240px;
  --pad: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- base ---------- */
body {
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  color: var(--c-silver);
  background-color: var(--c-deep);
  background-image:
    radial-gradient(1100px 640px at 88% -8%, rgba(61, 217, 192, 0.13), transparent 62%),
    radial-gradient(880px 600px at 2% 18%, rgba(255, 107, 44, 0.10), transparent 60%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  padding-top: calc(var(--rail-h) + 96px);
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.42;
  background-image: radial-gradient(rgba(199, 210, 228, 0.10) 1px, transparent 1px);
  background-size: 4px 4px;
}

main,
.skip-link,
.param-strip,
.site-header,
.site-footer {
  position: relative;
  z-index: 1;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.18;
  color: var(--c-paper);
}

::selection {
  background: rgba(255, 107, 44, 0.35);
  color: var(--c-paper);
}

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

/* ---------- shell ---------- */
.shell {
  width: 100%;
  max-width: calc(var(--shell) + var(--pad) * 2);
  margin-inline: auto;
  padding-inline: var(--pad);
}

/* ---------- skip link ---------- */
.skip-link {
  position: fixed;
  top: 8px;
  left: 50%;
  z-index: 100;
  transform: translate(-50%, -180%);
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  background: var(--c-orange);
  color: #180800;
  font-weight: 700;
  font-size: 14px;
  transition: transform 0.22s var(--ease);
}

.skip-link:focus {
  transform: translate(-50%, 0);
}

/* ---------- param strip ---------- */
.param-strip {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 70;
  height: var(--rail-h);
  background: rgba(7, 17, 31, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.param-strip__inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 22px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--c-gray);
  white-space: nowrap;
  overflow: hidden;
}

.param-strip__item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
}

.param-strip__item--end {
  margin-left: auto;
  color: var(--c-orange);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
}

.param-strip__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-green);
  box-shadow: 0 0 0 4px rgba(124, 227, 139, 0.16);
  animation: pulse 2.4s var(--ease) infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.read-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: rgba(199, 210, 228, 0.10);
}

.read-progress__bar {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--c-cyan), var(--c-orange));
  box-shadow: 0 0 14px rgba(255, 107, 44, 0.55);
}

/* ---------- header ---------- */
.site-header {
  position: fixed;
  top: var(--rail-h);
  left: 0;
  right: 0;
  z-index: 60;
  padding-top: 14px;
  pointer-events: none;
}

.nav-shell {
  pointer-events: auto;
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(var(--shell), calc(100% - var(--pad) * 2));
  margin-inline: auto;
  padding: 10px 12px 10px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(11, 27, 51, 0.92), rgba(7, 17, 31, 0.88));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow:
    0 24px 50px -28px rgba(0, 0, 0, 0.95),
    inset 0 1px 0 rgba(199, 210, 228, 0.06);
}

/* ---------- brand ---------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.brand__mark {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: 0;
  color: var(--c-deep-dark);
  background: linear-gradient(140deg, var(--c-cyan), var(--c-orange));
  box-shadow: 0 8px 20px -10px rgba(61, 217, 192, 0.9);
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.02em;
  color: var(--c-paper);
}

.brand__note {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-gray);
}

.brand--footer .brand__name { font-size: 19px; }
.brand--footer .brand__mark { width: 38px; height: 38px; flex-basis: 38px; font-size: 19px; }

/* ---------- nav ---------- */
.site-nav {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: 2px;
}

.site-nav__link {
  position: relative;
  display: block;
  padding: 9px 13px;
  border-radius: var(--radius-pill);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--c-silver);
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.site-nav__link::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 3px;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--c-orange);
  transform: translateX(-50%);
  transition: width 0.26s var(--ease);
}

.site-nav__link:hover {
  color: var(--c-paper);
  background: rgba(199, 210, 228, 0.07);
}

.site-nav__link[aria-current="page"] {
  color: var(--c-paper);
  background: rgba(255, 107, 44, 0.13);
}

.site-nav__link[aria-current="page"]::after { width: 16px; }

.site-nav__foot { display: none; }

/* ---------- nav actions ---------- */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  transition:
    transform 0.2s var(--ease),
    background-color 0.2s var(--ease),
    border-color 0.2s var(--ease),
    color 0.2s var(--ease);
}

.btn--solid {
  background: var(--c-orange);
  color: #180800;
  box-shadow: 0 14px 28px -16px rgba(255, 107, 44, 0.95);
}

.btn--solid:hover {
  background: #ff8149;
  transform: translateY(-1px);
}

.btn--ghost {
  border-color: var(--line-strong);
  color: var(--c-silver);
}

.btn--ghost:hover {
  border-color: var(--c-cyan);
  color: var(--c-paper);
  background: rgba(61, 217, 192, 0.10);
}

.btn--sm {
  padding: 8px 14px;
  font-size: 13px;
}

.btn--block { width: 100%; }

/* ---------- nav toggle ---------- */
.nav-toggle {
  display: none;
  margin-left: auto;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: rgba(199, 210, 228, 0.05);
}

.nav-toggle__bar {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--c-silver);
  transition: transform 0.22s var(--ease), opacity 0.22s var(--ease);
}

.nav-toggle__bar + .nav-toggle__bar { margin-top: 4px; }

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ---------- tags ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong);
  background: rgba(199, 210, 228, 0.05);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  line-height: 1.5;
  color: var(--c-silver);
}

.tag--orange { color: var(--c-orange); border-color: rgba(255, 107, 44, 0.42); background: rgba(255, 107, 44, 0.10); }
.tag--cyan   { color: var(--c-cyan);   border-color: rgba(61, 217, 192, 0.42); background: rgba(61, 217, 192, 0.10); }
.tag--green  { color: var(--c-green);  border-color: rgba(124, 227, 139, 0.42); background: rgba(124, 227, 139, 0.10); }
.tag--red    { color: var(--c-red);    border-color: rgba(255, 77, 109, 0.42); background: rgba(255, 77, 109, 0.10); }

/* ---------- section rhythm ---------- */
.section {
  position: relative;
  margin-top: clamp(56px, 8vw, 104px);
  scroll-margin-top: 132px;
}

.section__head {
  display: grid;
  gap: 12px;
  margin-bottom: clamp(24px, 4vw, 40px);
}

.section__index {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c-orange);
  transition: color 0.3s var(--ease), opacity 0.3s var(--ease);
}

.js-on [data-section] .section__index { opacity: 0.55; }
[data-section].is-current .section__index { opacity: 1; color: var(--c-orange); }

.section__title {
  font-size: clamp(26px, 3.6vw, 38px);
}

.section__lead {
  max-width: 62ch;
  font-size: 16.5px;
  color: var(--c-gray);
}

/* ---------- panels ---------- */
.panel {
  position: relative;
  padding: clamp(20px, 3vw, 32px);
  border-radius: var(--radius-m);
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(11, 27, 51, 0.86), rgba(7, 17, 31, 0.90));
  box-shadow: 0 26px 50px -36px rgba(0, 0, 0, 0.95);
}

.panel--paper {
  background: var(--c-paper);
  border-color: rgba(11, 27, 51, 0.10);
  color: var(--c-deep);
  box-shadow:
    0 1px 0 rgba(11, 27, 51, 0.06),
    0 30px 56px -38px rgba(0, 0, 0, 0.85);
}

.panel--paper h2,
.panel--paper h3,
.panel--paper h4 { color: var(--c-deep); }

.panel__label {
  display: inline-block;
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-gray);
}

.panel--paper .panel__label { color: rgba(11, 27, 51, 0.55); }

/* ---------- stats ---------- */
.stat { display: grid; gap: 8px; }

.stat__value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--c-paper);
  font-variant-numeric: tabular-nums;
}

.stat__unit {
  margin-left: 6px;
  font-family: var(--font-mono);
  font-size: 0.42em;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--c-orange);
}

.stat__key {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-gray);
}

/* ---------- grids ---------- */
.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--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ---------- rule ---------- */
.rule {
  height: 1px;
  border: 0;
  background: linear-gradient(90deg, var(--line-strong), transparent);
}

/* ---------- figure ---------- */
.figure {
  display: grid;
  gap: 10px;
  margin: 0;
}

.figure__frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-m);
  border: 1px solid var(--line);
  aspect-ratio: 16 / 10;
  background:
    radial-gradient(120% 100% at 8% 0%, var(--glow-a), transparent 60%),
    radial-gradient(120% 110% at 96% 100%, var(--glow-b), transparent 62%),
    var(--c-deep-dark);
}

.figure__frame img,
.figure__frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.figure--tall .figure__frame { aspect-ratio: 4 / 5; }
.figure--wide .figure__frame { aspect-ratio: 21 / 9; }

.figure__cap {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--c-gray);
}

/* ---------- prose ---------- */
.prose {
  max-width: 74ch;
  color: var(--c-silver);
}

.prose h2 {
  margin-top: 2em;
  font-size: clamp(22px, 2.6vw, 30px);
}

.prose h3 {
  margin-top: 1.6em;
  font-size: clamp(18px, 2vw, 22px);
}

.prose p { margin-top: 1em; }

.prose ul,
.prose ol {
  margin-top: 1em;
  padding-left: 1.3em;
  display: grid;
  gap: 0.5em;
  list-style: disc;
}

.prose ol { list-style: decimal; }

.prose li::marker { color: var(--c-orange); }

.prose strong { color: var(--c-paper); font-weight: 600; }

.prose a {
  color: var(--c-cyan);
  border-bottom: 1px solid rgba(61, 217, 192, 0.4);
}

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

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

.breadcrumb a { color: var(--c-gray); transition: color 0.18s var(--ease); }
.breadcrumb a:hover { color: var(--c-cyan); }
.breadcrumb__sep { color: rgba(134, 152, 178, 0.5); }
.breadcrumb [aria-current="page"] { color: var(--c-silver); }

/* ---------- reveal ---------- */
html.js-on [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

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

/* ---------- footer ---------- */
.site-footer {
  margin-top: clamp(64px, 10vw, 120px);
  padding-block: clamp(40px, 6vw, 72px) 28px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(7, 17, 31, 0.35), var(--c-deep-dark) 42%);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.4fr;
  gap: clamp(24px, 4vw, 56px);
}

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

.footer-col--brand { max-width: 42ch; }

.footer-summary {
  margin-top: 16px;
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--c-gray);
}

.footer-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.footer-heading {
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-gray);
}

.footer-list {
  display: grid;
  gap: 10px;
}

.footer-list a {
  font-size: 14.5px;
  color: var(--c-silver);
  border-bottom: 1px solid transparent;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}

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

.footer-contact__list { display: grid; gap: 12px; }

.footer-contact__row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.footer-contact__key {
  padding-top: 4px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-gray);
}

.footer-contact__val {
  font-size: 14px;
  line-height: 1.7;
  color: var(--c-silver);
  overflow-wrap: anywhere;
}

.footer-base {
  margin-top: clamp(32px, 5vw, 56px);
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--c-gray);
}

.footer-legal { flex: 0 0 auto; }

.footer-note {
  flex: 1 1 280px;
  font-family: var(--font-body);
  font-size: 13px;
  letter-spacing: 0;
  line-height: 1.7;
}

.footer-fixed-entry { margin-left: auto; flex: 0 0 auto; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .footer-col--brand { grid-column: 1 / -1; max-width: 58ch; }
}

@media (max-width: 980px) {
  body { padding-top: calc(var(--rail-h) + 82px); }

  .site-nav {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    display: none;
    flex: none;
    flex-direction: column;
    justify-content: flex-start;
    padding: 14px;
    border-radius: var(--radius-l);
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(11, 27, 51, 0.98), rgba(7, 17, 31, 0.98));
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 32px 64px -34px rgba(0, 0, 0, 0.95);
  }

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

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }

  .site-nav__link {
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 15px;
  }

  .site-nav__link::after { display: none; }

  .site-nav__link[aria-current="page"] {
    background: rgba(255, 107, 44, 0.14);
    box-shadow: inset 3px 0 0 var(--c-orange);
  }

  .site-nav__foot {
    display: grid;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
  }

  .nav-actions { display: none; }
  .nav-toggle { display: block; }

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

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

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

@media (max-width: 720px) {
  .param-strip__item--hide-sm { display: none; }
  .param-strip__inner { gap: 16px; }

  .brand__note { letter-spacing: 0.12em; }
  .nav-shell { padding-left: 14px; }

  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-fixed-entry { margin-left: 0; width: 100%; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .grid--2,
  .grid--3,
  .grid--4 { grid-template-columns: minmax(0, 1fr); }
  .brand__note { display: none; }
}

/* ---------- 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;
  }

  html.js-on [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .param-strip__dot { animation: none; }
}
