/* ============================================================
   赢宝主页 · 共享样式 /assets/site.css
   骨架：左侧品牌轨道 + 分置顶部栏 + 深赭红页脚
   ============================================================ */

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

:root {
  --red: #C1121F;
  --red-deep: #6E0A12;
  --red-mist: #F7E9EA;
  --cyan: #0E6E6B;
  --cyan-deep: #073B3A;
  --cyan-mist: #E4F1F0;
  --gold: #C9A227;
  --gold-mist: #F6EDD6;
  --ink: #14161A;
  --paper: #FCFBF9;
  --gray: #6B7077;
  --line: rgba(20, 22, 26, 0.11);
  --line-mid: rgba(20, 22, 26, 0.22);
  --line-strong: rgba(20, 22, 26, 0.40);

  --rail-w: 88px;
  --header-h: 72px;

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

  --ease: cubic-bezier(0.22, 0.68, 0.24, 1);
  --t: 220ms;
}

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

body {
  margin: 0;
  padding-top: var(--header-h);
  padding-left: var(--rail-w);
  font-family: var(--sans);
  font-weight: 500;
  font-size: 17px;
  line-height: 1.9;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    linear-gradient(to right, rgba(20, 22, 26, 0.028) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(20, 22, 26, 0.028) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4 {
  margin: 0 0 0.55em;
  font-weight: 900;
  line-height: 1.22;
  letter-spacing: -0.02em;
  color: var(--ink);
}

h1 { font-size: clamp(40px, 6.2vw, 72px); }
h2 { font-size: clamp(28px, 3.6vw, 52px); }
h3 { font-size: clamp(22px, 2.2vw, 28px); }
h4 { font-size: 19px; }

p { margin: 0 0 1.1em; }
ul, ol { margin: 0 0 1.1em; padding-left: 1.35em; }
li { margin-bottom: 0.35em; }

a {
  color: var(--cyan);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover { color: var(--red); }

strong { font-weight: 900; }

code, kbd, samp, .mono {
  font-family: var(--mono);
  font-size: 0.86em;
  letter-spacing: 0.02em;
}

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

::selection { background: var(--red); color: #fff; }

/* ---------- 焦点与可访问性 ---------- */
:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}
.site-footer :focus-visible,
.section--dark :focus-visible,
.section--deep :focus-visible,
.rail-mark:focus-visible {
  outline-color: var(--gold);
}
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 999;
  padding: 12px 20px;
  background: var(--red);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform var(--t) var(--ease);
}
.skip-link:focus {
  transform: translateY(0);
  color: #fff;
}

/* ---------- 布局工具 ---------- */
.wrap {
  width: min(1320px, 100%);
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 56px);
}
.wrap--narrow { width: min(920px, 100%); }

.section {
  position: relative;
  padding-block: clamp(56px, 7vw, 110px);
}
.section + .section { border-top: 1px solid var(--line); }
.section--mist { background: var(--cyan-mist); }
.section--red-mist { background: var(--red-mist); }
.section--gold-mist { background: var(--gold-mist); }
.section--dark { background: var(--cyan-deep); color: rgba(246, 250, 249, 0.9); }
.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4 { color: #fff; }
.section--dark a { color: #9FD8D5; }
.section--dark a:hover { color: var(--gold-mist); }
.section--deep { background: var(--red-deep); color: rgba(252, 240, 240, 0.9); }
.section--deep h1,
.section--deep h2,
.section--deep h3 { color: #fff; }
.section--deep a { color: var(--gold-mist); }

/* ---------- 排版组件 ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--red);
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
}
.section--dark .eyebrow,
.section--deep .eyebrow { color: var(--gold-mist); }

.lede {
  max-width: 34em;
  font-size: clamp(17px, 1.9vw, 21px);
  line-height: 1.85;
  color: var(--ink);
}
.section--dark .lede,
.section--deep .lede { color: rgba(255, 255, 255, 0.86); }

.prose { max-width: 44em; }
.prose p { max-width: 38em; }
.prose h2, .prose h3 { margin-top: 1.6em; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 0;
  background: none;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--t) var(--ease),
              color var(--t) var(--ease),
              border-color var(--t) var(--ease);
}
.btn--primary { background: var(--red); color: #fff; }
.btn--primary:hover, .btn--primary:focus-visible { background: var(--red-deep); color: #fff; }
.btn--cyan { background: var(--cyan); color: #fff; }
.btn--cyan:hover, .btn--cyan:focus-visible { background: var(--cyan-deep); color: #fff; }
.btn--ghost { border-color: var(--line-mid); color: var(--ink); }
.btn--ghost:hover, .btn--ghost:focus-visible { border-color: var(--red); color: var(--red); background: var(--red-mist); }
.btn--gold { background: var(--gold); color: var(--ink); }
.btn--gold:hover, .btn--gold:focus-visible { background: #B08E1F; color: var(--ink); }
.btn--block { width: 100%; }
.section--dark .btn--ghost,
.section--deep .btn--ghost { border-color: rgba(255, 255, 255, 0.4); color: #fff; }
.section--dark .btn--ghost:hover,
.section--deep .btn--ghost:hover { border-color: var(--gold-mist); color: var(--gold-mist); background: rgba(255, 255, 255, 0.06); }

/* ---------- 标签 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 2px 10px;
  border: 1px solid var(--line-mid);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--gray);
  background: var(--paper);
}
.tag--red { border-color: var(--red); color: var(--red); background: var(--red-mist); }
.tag--cyan { border-color: var(--cyan); color: var(--cyan); background: var(--cyan-mist); }
.tag--gold { border-color: var(--gold); color: #7A6114; background: var(--gold-mist); }

/* ---------- 面包屑 ---------- */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--gray);
}
.crumbs li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.crumbs li + li::before { content: "/"; color: var(--line-strong); }
.crumbs a { color: var(--gray); text-decoration: none; }
.crumbs a:hover { color: var(--red); text-decoration: underline; }
.crumbs [aria-current="page"] { color: var(--ink); font-weight: 700; }

/* ---------- 图片容器（页面阶段放置占位/插画） ---------- */
.figure {
  display: block;
  margin: 0;
  border: 1px solid var(--line-mid);
  background: var(--paper);
  overflow: hidden;
}
.figure__frame {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background:
    linear-gradient(135deg, rgba(14, 110, 107, 0.10), rgba(193, 18, 31, 0.06));
}
.figure__frame img,
.figure__frame svg,
.figure__frame picture {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.figure--wide .figure__frame { aspect-ratio: 21 / 9; }
.figure--tall .figure__frame { aspect-ratio: 3 / 4; }
.figure--square .figure__frame { aspect-ratio: 1 / 1; }
.figure--map .figure__frame { aspect-ratio: 4 / 3; }

.figure--placeholder .figure__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(14, 110, 107, 0.16) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(14, 110, 107, 0.16) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}
.figure__caption {
  display: block;
  padding: 10px 14px;
  border-top: 1px solid var(--line-mid);
  background: var(--paper);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--gray);
}

/* ============================================================
   头部
   ============================================================ */
.site-header {
  position: relative;
  z-index: 80;
}

/* --- 左侧品牌轨道 --- */
.brand-rail {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--rail-w);
  z-index: 80;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 14px 0 18px;
  background: var(--paper);
  border-right: 1px solid var(--line);
}

.rail-mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  background: var(--red);
  color: #fff;
  text-decoration: none;
  transition: background-color var(--t) var(--ease), color var(--t) var(--ease);
}
.rail-mark__seal {
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
}
.rail-mark:hover { background: var(--red-deep); color: var(--gold-mist); }

.rail-meter {
  flex: 1 1 auto;
  min-height: 64px;
  display: flex;
  justify-content: center;
  width: 100%;
}
.rail-meter__track {
  position: relative;
  width: 2px;
  height: 100%;
  background-color: var(--line-mid);
  overflow: hidden;
}
.rail-meter__track::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(20, 22, 26, 0.28) 0 1px,
    transparent 1px 10px
  );
  pointer-events: none;
}
.rail-meter__fill {
  position: absolute;
  inset: 0;
  background: var(--red);
  transform: scaleY(0);
  transform-origin: top center;
  transition: transform 120ms linear;
}

.rail-status {
  flex: none;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}
.rail-status__num {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  color: var(--red);
  letter-spacing: 0.04em;
}
.rail-status__label {
  font-size: 10px;
  line-height: 1.35;
  letter-spacing: 0.02em;
  color: var(--gray);
  max-width: 74px;
}

.rail-top {
  flex: none;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line-mid);
  background: transparent;
  color: var(--gray);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t) var(--ease),
              visibility var(--t) var(--ease),
              border-color var(--t) var(--ease),
              color var(--t) var(--ease);
}
.rail-top.is-on { opacity: 1; visibility: visible; }
.rail-top:hover { border-color: var(--red); color: var(--red); }

/* --- 顶部横栏 --- */
.top-bar {
  position: fixed;
  top: 0;
  left: var(--rail-w);
  right: 0;
  height: var(--header-h);
  z-index: 75;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 clamp(16px, 2.6vw, 40px);
  background: rgba(252, 251, 249, 0.95);
  border-bottom: 1px solid var(--line);
}

.site-title {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  transition: color var(--t) var(--ease);
}
.site-title__seal {
  display: none;
  width: 28px;
  height: 28px;
  place-items: center;
  background: var(--red);
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
}
.site-title__name {
  font-size: 19px;
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 1;
}
.site-title__sub {
  padding-left: 10px;
  border-left: 1px solid var(--line-mid);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--gray);
  line-height: 1;
}
.site-title:hover { color: var(--red); }

.top-index {
  margin: 0 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--gray);
  white-space: nowrap;
  opacity: 0;
  transition: opacity var(--t) var(--ease);
}
.top-index.is-on { opacity: 1; }
.top-index__num { color: var(--red); font-weight: 700; }
.top-index__sep { color: var(--line-strong); }
.top-index__label { color: var(--ink); }

/* --- 移动端触发按钮 --- */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin-left: auto;
  padding: 0 14px;
  border: 1px solid var(--line-mid);
  background: transparent;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color var(--t) var(--ease), color var(--t) var(--ease);
}
.nav-toggle:hover { border-color: var(--red); color: var(--red); }
.nav-toggle__bars {
  display: grid;
  gap: 5px;
  width: 18px;
}
.nav-toggle__bars i {
  display: block;
  height: 1.5px;
  background: currentColor;
  transition: opacity var(--t) var(--ease), transform var(--t) var(--ease);
}
.nav-toggle[aria-expanded="true"] { border-color: var(--red); color: var(--red); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:first-child { transform: translateY(3.25px); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:last-child { transform: translateY(-3.25px); }

/* --- 主导航 --- */
.site-nav {
  flex: none;
  display: flex;
  align-items: center;
  gap: clamp(4px, 1vw, 16px);
}
.site-nav__list {
  display: flex;
  align-items: center;
  gap: clamp(0px, 0.6vw, 8px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav__list li { margin: 0; }
.site-nav__list a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: color var(--t) var(--ease);
}
.site-nav__list a::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 6px;
  height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--t) var(--ease);
}
.site-nav__list a:hover { color: var(--red); }
.site-nav__list a:hover::after { transform: scaleX(1); }
.site-nav__list a[aria-current="page"] { color: var(--red); }
.site-nav__list a[aria-current="page"]::after { transform: scaleX(1); }

.site-nav__cta { flex: none; margin-left: clamp(4px, 1vw, 14px); }

/* --- 移动端遮罩 --- */
.nav-scrim {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  z-index: 70;
  background: rgba(7, 59, 58, 0.46);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms var(--ease);
}
.nav-scrim.is-on { opacity: 1; pointer-events: auto; }

/* ============================================================
   页脚
   ============================================================ */
.site-footer {
  background: var(--red-deep);
  color: rgba(243, 231, 230, 0.86);
  border-top: 3px solid var(--red);
}

.footer-inner {
  width: min(1320px, 100%);
  margin-inline: auto;
  padding: clamp(44px, 5.6vw, 84px) clamp(20px, 4vw, 56px) clamp(30px, 3.6vw, 48px);
  display: grid;
  grid-template-columns: minmax(200px, 1fr) minmax(0, 2.7fr);
  gap: clamp(32px, 5vw, 80px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.footer-brand__seal {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  background: var(--red);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
}
.footer-brand__name {
  margin: 0;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.01em;
  color: #fff;
}
.footer-brand__meta {
  margin: 0;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.9;
  letter-spacing: 0.04em;
  color: rgba(243, 231, 230, 0.62);
}
.footer-brand__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer-brand__tags li { margin: 0; }
.footer-tag {
  padding: 4px 9px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--gold-mist);
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 40px);
}
.footer-col__title {
  display: inline-block;
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--gold);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--gold-mist);
}
.footer-col ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}
.footer-col li { margin: 0; }
.footer-col a {
  color: rgba(243, 231, 230, 0.82);
  font-size: 15px;
  line-height: 1.7;
  text-decoration: none;
  word-break: break-word;
  transition: color var(--t) var(--ease);
}
.footer-col a:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.footer-base {
  width: min(1320px, 100%);
  margin-inline: auto;
  padding: 20px clamp(20px, 4vw, 56px) 32px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 28px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: rgba(243, 231, 230, 0.62);
}
.footer-legal { margin: 0; }
.footer-copy { margin: 0 0 0 auto; }
.footer-apple {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--gold);
  color: var(--gold-mist);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
  text-decoration: none;
  transition: background-color var(--t) var(--ease), color var(--t) var(--ease);
}
.footer-apple:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--red-deep);
}

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1180px) {
  .site-nav__list a { padding: 0 9px; font-size: 14px; }
  .site-nav__list a::after { left: 9px; right: 9px; }
  .top-index { display: none; }
}

@media (max-width: 900px) {
  :root { --rail-w: 0px; }

  body { padding-left: 0; background-size: 48px 48px; }

  .brand-rail { display: none; }
  .top-bar { left: 0; gap: 12px; }
  .site-title__seal { display: grid; }
  .site-title__sub { display: none; }
  .top-index { display: none; }
  .nav-toggle { display: inline-flex; }

  .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    z-index: 74;
    display: block;
    padding: 0 clamp(16px, 5vw, 32px);
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    transition: max-height 260ms var(--ease), visibility 0s linear 280ms;
  }
  .site-nav[data-open="true"] {
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    visibility: visible;
    padding-bottom: 26px;
    transition: max-height 260ms var(--ease), visibility 0s linear 0s;
  }
  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-top: 10px;
  }
  .site-nav__list li + li { border-top: 1px solid var(--line); }
  .site-nav__list a {
    justify-content: space-between;
    width: 100%;
    padding: 14px 4px;
    font-size: 17px;
  }
  .site-nav__list a::after { display: none; }
  .site-nav__list a[aria-current="page"]::before {
    content: "当前";
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    color: var(--red);
  }
  .site-nav__cta { width: 100%; margin: 20px 0 0; }
}

@media (min-width: 901px) {
  .nav-scrim { display: none; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-base { flex-direction: column; align-items: flex-start; }
  .footer-copy { margin-left: 0; }
}

@media (max-width: 420px) {
  .footer-cols { grid-template-columns: 1fr; }
  .site-title__name { font-size: 17px; }
}

/* ============================================================
   减少动态
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
  .rail-meter__fill { transition: none; }
  .site-nav { transition: none; }
}
