/* ==========================================================================
   万博体育 · 共享 Site Kit — /assets/site.css
   01 Reset · 02 Tokens · 03 Base · 04 Typography · 05 Layout
   06 Components · 07 Header · 08 Footer · 09 Responsive · 10 Motion
   ========================================================================== */

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

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

h1, h2, h3, h4, h5, h6, p, figure, blockquote, ul, ol, dl, dd { margin: 0; }

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

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

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

a { color: inherit; }

/* ---------- 02 Tokens ---------- */
:root {
  --ink: #060B1E;
  --ink-2: #0E1633;
  --ink-3: #1B1240;
  --cyan: #00E5D0;
  --orange: #FF6A00;
  --paper: #F4E9D8;
  --white: #E8EEF9;
  --mist: #9AA6C4;
  --steel: #2A3A66;
  --magenta: #FF3B6B;

  --rail-w: 128px;
  --gutter: clamp(20px, 5vw, 72px);
  --maxw: 1180px;

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

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --radius: 16px;
}

/* ---------- 03 Base ---------- */
html {
  background-color: var(--ink);
  background-image:
    radial-gradient(115% 70% at 88% -8%, #1B1240 0%, rgba(27, 18, 64, 0) 58%),
    radial-gradient(85% 60% at -10% 105%, rgba(0, 229, 208, 0.07) 0%, rgba(0, 229, 208, 0) 70%);
  background-attachment: fixed;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: transparent;
  color: var(--white);
  font-family: var(--font-display);
  font-size: clamp(15px, 1.05vw, 17px);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

/* ---------- 04 Typography ---------- */
.mono { font-family: var(--font-mono); letter-spacing: 0.06em; }

.display {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(56px, 11vw, 148px);
  line-height: 0.86;
  letter-spacing: -0.045em;
  color: var(--paper);
  text-wrap: balance;
}

.display--xl { font-size: clamp(72px, 17vw, 200px); }

.sec-title {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(26px, 3.4vw, 40px);
  line-height: 1.18;
  letter-spacing: 0.02em;
  color: var(--white);
  text-wrap: balance;
}

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

.eyebrow::before { content: ""; display: block; width: 22px; height: 2px; background: var(--cyan); }

.lede {
  margin: 0;
  max-width: 56ch;
  font-size: clamp(15px, 1.3vw, 18px);
  line-height: 1.8;
  color: var(--mist);
}

.prose { max-width: 68ch; font-size: 16px; line-height: 1.8; color: var(--white); }
.prose p { margin-block: 0 1.1em; }
.prose h2,
.prose h3 {
  margin-block: 1.8em 0.7em;
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.3;
  color: var(--paper);
}
.prose h2 { font-size: clamp(22px, 2.4vw, 30px); }
.prose h3 { font-size: clamp(18px, 1.8vw, 22px); }
.prose ul,
.prose ol { margin-block: 0 1.1em; padding-inline-start: 1.2em; list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin-block: 0.35em; }
.prose a { color: var(--cyan); text-decoration: none; border-bottom: 1px solid rgba(0, 229, 208, 0.4); }
.prose a:hover { border-bottom-color: var(--cyan); }

/* ---------- 05 Layout ---------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.span-3,
.span-4,
.span-5,
.span-6,
.span-7,
.span-8,
.span-12 { grid-column: 1 / -1; }

/* ---------- 06 Components ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease),
    border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.btn--primary { background: var(--orange); color: var(--ink); }
.btn--primary:hover { background: #FF8534; transform: translateY(-1px); }

.btn--ghost { background: transparent; color: var(--white); border-color: var(--steel); }
.btn--ghost:hover { border-color: var(--cyan); color: var(--cyan); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border: 1px solid rgba(154, 166, 196, 0.35);
  border-radius: 999px;
  background: rgba(14, 22, 51, 0.7);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--mist);
}

.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(--mist);
}

.breadcrumb a { color: var(--mist); text-decoration: none; transition: color 0.2s var(--ease); }
.breadcrumb a:hover { color: var(--cyan); }
.breadcrumb__sep { color: var(--steel); }

.slab {
  position: relative;
  padding: clamp(24px, 3.4vw, 44px);
  background: var(--ink-2);
  border: 1px solid var(--steel);
  border-radius: var(--radius) var(--radius) var(--radius) 4px;
}

.slab--paper { background: var(--paper); color: var(--ink); border-color: transparent; }
.slab--paper .sec-title,
.slab--paper .prose { color: var(--ink); }
.slab--paper .display { color: var(--ink); }
.slab--paper .lede { color: rgba(6, 11, 30, 0.74); }
.slab--paper .eyebrow { color: var(--ink); }
.slab--paper .eyebrow::before { background: var(--ink); }
.slab--paper .tag {
  background: transparent;
  border-color: rgba(6, 11, 30, 0.25);
  color: rgba(6, 11, 30, 0.75);
}
.slab--paper .prose a { color: var(--ink); border-bottom-color: rgba(6, 11, 30, 0.4); }

.slab--cut {
  border-radius: 0;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 34px), calc(100% - 34px) 100%, 0 100%);
}

.figure { display: flex; flex-direction: column; gap: 10px; margin: 0; }

.figure__img {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--steel);
  border-radius: var(--radius) var(--radius) var(--radius) 4px;
  background: linear-gradient(135deg, #0E1633 0%, #1B1240 52%, #060B1E 100%);
}

.figure__img:empty::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(70% 90% at 80% 20%, rgba(0, 229, 208, 0.26), transparent 62%),
    radial-gradient(60% 70% at 10% 90%, rgba(255, 106, 0, 0.22), transparent 66%),
    repeating-linear-gradient(115deg, rgba(244, 233, 216, 0.06) 0 2px, transparent 2px 14px);
}

.figure__img > img { width: 100%; height: 100%; object-fit: cover; }

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

/* ---------- 07 Header ---------- */
.site-head { position: relative; z-index: 50; }

.skip-link {
  position: fixed;
  top: 10px;
  inset-inline-start: 10px;
  z-index: 300;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--cyan);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform 0.2s var(--ease);
}

.skip-link:focus-visible { transform: translateY(0); outline-offset: 4px; }

.rail {
  position: fixed;
  inset-block: 0;
  inset-inline-start: 0;
  z-index: 70;
  display: flex;
  flex-direction: column;
  width: var(--rail-w);
  padding-block-start: 18px;
  overflow: hidden;
  background: linear-gradient(180deg, #0E1633 0%, #0A1128 58%, #0E1633 100%);
  border-inline-end: 1px solid var(--steel);
  box-shadow: inset -1px 0 0 rgba(0, 229, 208, 0.16);
}

.rail__top { flex: 0 0 auto; padding: 0 8px 14px; }

.rail__brand { display: flex; flex-direction: column; align-items: center; gap: 8px; text-decoration: none; }

.rail__brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background: var(--orange);
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  clip-path: polygon(0 0, 100% 0, 100% 68%, 68% 100%, 0 100%);
}

.rail__brand-name {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--mist);
  transition: color 0.2s var(--ease);
}
.rail__brand:hover .rail__brand-name { color: var(--cyan); }

.rail__nav { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: center; gap: 2px; min-height: 0; }

.rail__item { position: relative; }

.rail__link {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 10px 6px;
  font-size: 12.5px;
  line-height: 1.25;
  color: var(--mist);
  text-decoration: none;
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.rail__link::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  inset-block: 16%;
  width: 2px;
  background: var(--cyan);
  transform: scaleY(0);
  transform-origin: top center;
  transition: transform 0.3s var(--ease);
}

.rail__link:hover { color: var(--white); background: rgba(0, 229, 208, 0.06); }
.rail__link[aria-current="page"] { color: var(--paper); background: rgba(0, 229, 208, 0.08); }
.rail__link[aria-current="page"]::after,
.rail__link:focus-visible::after { transform: scaleY(1); }

.rail__index {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--mist);
  opacity: 0.6;
  transition: color 0.2s var(--ease), opacity 0.2s var(--ease);
}
.rail__link[aria-current="page"] .rail__index { color: var(--cyan); opacity: 1; }
.rail__label { font-weight: 500; }

.rail__foot { flex: 0 0 auto; padding: 14px 8px 22px; border-block-start: 1px solid rgba(42, 58, 102, 0.9); }
.rail__version { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.rail__version-num { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.06em; color: var(--cyan); }
.rail__meta { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.2em; color: var(--mist); }

.rail__progress {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 3px;
  background: rgba(42, 58, 102, 0.9);
  overflow: hidden;
}
.rail__progress > span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.12s linear;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--steel);
  border-radius: 10px;
  background: rgba(6, 11, 30, 0.6);
  cursor: pointer;
}

.nav-toggle__bars { display: flex; flex-direction: column; gap: 4px; width: 20px; }
.nav-toggle__bars i {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--white);
  transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.drawer {
  position: fixed;
  inset-block: 0;
  inset-inline-end: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  width: min(330px, 88vw);
  overflow-y: auto;
  background: #0B122A;
  border-inline-start: 1px solid var(--steel);
  transform: translateX(104%);
  visibility: hidden;
  transition: transform 0.34s var(--ease), visibility 0s linear 0.34s;
}

.drawer[data-open="true"] {
  transform: translateX(0);
  visibility: visible;
  transition: transform 0.34s var(--ease), visibility 0s;
}

.drawer__scrim {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(6, 11, 30, 0.74);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease);
}
.drawer__scrim[data-open="true"] { opacity: 1; pointer-events: auto; }

.drawer__head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-block-end: 1px solid var(--steel);
  background: #0B122A;
}

.drawer__title { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.18em; color: var(--mist); }

.drawer__close {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--steel);
  border-radius: 10px;
  color: var(--white);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.drawer__close:hover { border-color: var(--cyan); color: var(--cyan); }

.drawer__nav { display: flex; flex-direction: column; padding-block: 8px; }

.drawer__link {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 14px 18px;
  border-inline-start: 2px solid transparent;
  font-size: 17px;
  font-weight: 500;
  color: var(--white);
  text-decoration: none;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}
.drawer__link:hover { background: rgba(0, 229, 208, 0.06); color: var(--cyan); }
.drawer__link[aria-current="page"] {
  background: rgba(0, 229, 208, 0.08);
  border-inline-start-color: var(--cyan);
  color: var(--cyan);
}
.drawer__index { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; color: var(--mist); }

.drawer__foot {
  margin-block-start: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  border-block-start: 1px solid var(--steel);
}
.drawer__note {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.7;
  letter-spacing: 0.04em;
  color: var(--mist);
  word-break: break-all;
}

/* ---------- 08 Footer ---------- */
.foot {
  position: relative;
  overflow: hidden;
  padding: clamp(44px, 7vw, 88px) 0 28px;
  background: linear-gradient(180deg, #060B1E 0%, #0A1026 42%, #0E1633 100%);
  border-block-start: 1px solid var(--steel);
}

.foot::before {
  content: "";
  position: absolute;
  inset-block-start: 0;
  inset-inline: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--orange) 0 18%, var(--cyan) 18% 42%, var(--steel) 42% 100%);
  opacity: 0.9;
}

.foot__inner {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.foot__top {
  display: grid;
  grid-template-columns: 1.15fr 2fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
  padding-block-end: clamp(30px, 4vw, 52px);
}

.foot__brand { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }

.foot__logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--white);
  text-decoration: none;
}

.foot__logo-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  background: var(--orange);
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  clip-path: polygon(0 0, 100% 0, 100% 68%, 68% 100%, 0 100%);
}

.foot__badge {
  display: inline-block;
  padding: 3px 10px;
  border: 1px solid rgba(0, 229, 208, 0.42);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--cyan);
}

.foot__line { max-width: 34ch; font-size: 14px; line-height: 1.8; color: var(--mist); }

.foot__cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 26px 20px; }
.foot__col { min-width: 0; }
.foot__col-title {
  margin-block-end: 12px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mist);
}
.foot__links { display: flex; flex-direction: column; gap: 9px; }

.foot__link {
  display: inline-block;
  font-size: 14px;
  line-height: 1.5;
  color: var(--white);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.foot__link:hover { color: var(--cyan); border-bottom-color: var(--cyan); }

.foot__contact {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
  padding-block: 18px;
  border-block-start: 1px solid rgba(42, 58, 102, 0.75);
  font-size: 13px;
  line-height: 1.7;
  color: var(--mist);
}
.foot__contact span { word-break: break-word; }

.foot__legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  padding-block-start: 18px;
  border-block-start: 1px solid rgba(42, 58, 102, 0.75);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--mist);
}
.foot__legal .foot__link {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--mist);
}

/* ---------- 09 Responsive ---------- */
@media (min-width: 720px) {
  .grid { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 24px; }
  .span-3 { grid-column: span 3; }
  .span-4 { grid-column: span 4; }
  .span-5 { grid-column: span 5; }
  .span-6 { grid-column: span 6; }
  .span-7 { grid-column: span 7; }
  .span-8 { grid-column: span 8; }
  .span-12 { grid-column: 1 / -1; }
  .foot__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 24px; }
}

@media (min-width: 900px) {
  body { padding-inline-start: var(--rail-w); }
}

@media (min-width: 1100px) {
  .grid { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 32px; }
  .span-3 { grid-column: span 3; }
  .span-4 { grid-column: span 4; }
  .span-5 { grid-column: span 5; }
  .span-6 { grid-column: span 6; }
  .span-7 { grid-column: span 7; }
  .span-8 { grid-column: span 8; }
  .span-12 { grid-column: span 12; }
  .foot__cols { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 899px) {
  .site-head { position: sticky; top: 0; z-index: 60; }

  .rail {
    position: static;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    width: auto;
    height: 60px;
    padding: 0 64px 0 16px;
    overflow: visible;
    border-inline-end: 0;
    border-block-end: 1px solid var(--steel);
    background: #0B122A;
    box-shadow: none;
  }

  .rail__top { flex: 0 0 auto; padding: 0; }
  .rail__brand { flex-direction: row; align-items: center; gap: 10px; }
  .rail__brand-mark { width: 30px; height: 30px; font-size: 14px; }
  .rail__brand-name { font-size: 13px; letter-spacing: 0.14em; color: var(--white); }

  .rail__nav,
  .rail__foot { display: none; }

  .rail__progress { height: 2px; background: transparent; }

  .nav-toggle {
    position: absolute;
    top: 8px;
    inset-inline-end: 12px;
    z-index: 5;
    display: inline-flex;
  }

  .drawer__scrim { top: 60px; }
  body.nav-open { overflow: hidden; }

  .foot__top { grid-template-columns: 1fr; }
  .foot__line { max-width: 44ch; }
}

@media (max-width: 560px) {
  .foot__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; }
  .foot__contact { flex-direction: column; gap: 6px; }
}

@media (min-width: 900px) {
  .drawer,
  .drawer__scrim { display: none; }
}

/* ---------- 10 Motion ---------- */
.has-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.has-reveal [data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

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

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

  .rail__progress > span { transition: none; }
}
