/* =========================================================
   冠军白菜网 · /assets/site.css
   共享外壳：轨道导航、页脚、通用组件与图片容器
   ========================================================= */

:root {
  --ink: #0F1B2D;
  --ink-2: #16263D;
  --gold: #F2C94C;
  --gold-dim: #D9A93A;
  --green: #2F9E6E;
  --green-deep: #1F6F4E;
  --paper: #F7F5EF;
  --line: #E6E2D6;
  --text: #2B2B2B;
  --muted: #8A93A3;
  --alert: #D96A5B;

  --rail-w: 84px;
  --topbar-h: 62px;
  --maxw: 1240px;
  --ease: cubic-bezier(.22, .68, .24, 1);

  --font-display: "Archivo Narrow", "Oswald", "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Noto Sans Mono CJK SC", monospace;
}

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

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

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  padding-top: var(--topbar-h);
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.8;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; }
a { color: inherit; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
:focus:not(:focus-visible) { outline: none; }

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

/* ---------- 中文排版 ---------- */
h1, h2, h3, h4, .h1, .h2, .h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: condensed;
  letter-spacing: -.02em;
  line-height: 1.15;
  margin: 0 0 .6em;
}

h1, .h1 { font-size: clamp(32px, 5vw, 48px); }
h2, .h2 { font-size: clamp(24px, 3.2vw, 32px); }
h3, .h3 { font-size: clamp(18px, 2.2vw, 22px); letter-spacing: -.01em; }
h4 { font-size: 17px; letter-spacing: 0; }

p { margin: 0 0 1.2em; }
p:last-child { margin-bottom: 0; }

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: .04em;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--green);
  margin: 0 0 16px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
  flex: 0 0 auto;
}

.lede {
  font-size: clamp(16px, 1.6vw, 18px);
  line-height: 1.85;
  color: var(--muted);
  margin: 0;
  max-width: 62ch;
}
.section--paper .lede { color: #5A5F69; }

/* ---------- 布局 ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 56px);
}

.section { padding-block: clamp(48px, 7vw, 96px); }
.section--paper { background: var(--paper); color: var(--text); }
.section--ink { background: var(--ink); color: var(--paper); }
.section--ink-2 { background: var(--ink-2); color: var(--paper); }

.section__head { margin-bottom: clamp(28px, 4vw, 48px); max-width: 64ch; }
.section__title { margin: 0 0 .45em; }

.grid { display: grid; gap: clamp(16px, 2.4vw, 28px); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(228px, 1fr)); }
.grid--12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }

@media (max-width: 719px) {
  .grid--12 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

.rule {
  height: 1px;
  border: 0;
  margin: 0;
  background: var(--line);
}
.section--ink .rule,
.section--ink-2 .rule { background: rgba(247, 245, 239, .14); }

.grid-bg {
  background-image:
    linear-gradient(90deg, rgba(247, 245, 239, .045) 1px, transparent 1px),
    linear-gradient(180deg, rgba(247, 245, 239, .045) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* ---------- 正文块 ---------- */
.prose { max-width: 68ch; }
.prose > *:first-child { margin-top: 0; }
.prose h2 { margin: 1.8em 0 .5em; }
.prose h3 { margin: 1.6em 0 .45em; }
.prose ul, .prose ol { margin: 0 0 1.2em; padding-left: 1.3em; }
.prose li { margin-bottom: .5em; }
.prose a { color: var(--green-deep); text-decoration: underline; text-underline-offset: 3px; }
.section--ink .prose a,
.section--ink-2 .prose a { color: var(--gold); }
.prose code {
  font-family: var(--font-mono);
  font-size: .92em;
  background: rgba(47, 158, 110, .12);
  padding: .1em .35em;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 24px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 0;
  cursor: pointer;
  transition: transform .2s var(--ease), background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn--gold {
  background: var(--gold);
  color: var(--ink);
  border-color: var(--gold-dim);
}
.btn--gold:hover { background: #FBE08A; transform: translateY(-2px); }
.btn--ghost {
  background: transparent;
  color: var(--paper);
  border-color: rgba(247, 245, 239, .35);
}
.btn--ghost:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-2px); }
.btn--outline-dark {
  background: transparent;
  color: var(--ink);
  border-color: rgba(15, 27, 45, .3);
}
.btn--outline-dark:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); transform: translateY(-2px); }
.btn--sm { padding: 9px 16px; font-size: 13px; }

/* ---------- 面包屑 ---------- */
.breadcrumb {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--muted);
}
.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
}
.breadcrumb li { display: inline-flex; align-items: center; gap: 6px; }
.breadcrumb li + li::before { content: "/"; opacity: .45; }
.breadcrumb a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}
.breadcrumb a:hover { color: var(--green); border-bottom-color: currentColor; }
.breadcrumb [aria-current="page"] {
  color: inherit;
  font-weight: 700;
  opacity: 1;
}

/* ---------- 卡片与标签 ---------- */
.card {
  position: relative;
  background: var(--paper);
  color: var(--text);
  border: 1px solid var(--line);
  border-top: 2px solid var(--gold-dim);
  padding: clamp(20px, 2.4vw, 30px);
  transition: transform .24s var(--ease), border-color .24s ease;
}
.card:hover { transform: translateY(-6px); border-color: var(--gold-dim); }
.section--ink .card,
.section--ink-2 .card {
  background: var(--ink-2);
  color: var(--paper);
  border-color: rgba(247, 245, 239, .14);
  border-top-color: var(--gold-dim);
}
.card__title { margin: 0 0 .5em; font-size: clamp(18px, 2vw, 22px); }
.card__meta {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--green);
  margin: 0 0 10px;
}
.section--ink .card__meta,
.section--ink-2 .card__meta { color: var(--green); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 4px 9px;
  border: 1px solid currentColor;
  color: var(--green);
  line-height: 1.4;
}
.tag--gold { color: var(--gold); }
.tag--alert { color: var(--alert); }

.status-dot {
  width: 7px;
  height: 7px;
  display: inline-block;
  border-radius: 50%;
  background: var(--green);
  flex: 0 0 auto;
}
.status-dot--off { background: var(--alert); }

/* ---------- 图片容器 ---------- */
.frame {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  background: var(--ink-2);
  border: 1px solid rgba(242, 201, 76, .24);
}
.frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(90deg, rgba(247, 245, 239, .06) 1px, transparent 1px),
    linear-gradient(180deg, rgba(247, 245, 239, .06) 1px, transparent 1px);
  background-size: 24px 24px;
}
.frame > img,
.frame > picture > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.72) contrast(1.06);
}
.frame--16x9 { aspect-ratio: 16 / 9; }
.frame--4x3 { aspect-ratio: 4 / 3; }
.frame--1x1 { aspect-ratio: 1 / 1; }
.frame--tall { aspect-ratio: 3 / 4; }
.frame--free { aspect-ratio: auto; }

/* =========================================================
   头部外壳
   ========================================================= */

.skip-link {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 200;
  transform: translateY(-130%);
  background: var(--gold);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  padding: 13px 18px;
  text-decoration: none;
  transition: transform .18s var(--ease);
}
.skip-link:focus { transform: translateY(0); }

/* 移动端顶栏 */
.masthead__bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--topbar-h);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
  background: var(--ink);
  border-bottom: 1px solid rgba(242, 201, 76, .24);
}

.masthead__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--paper);
  min-width: 0;
}
.masthead__mark {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  background: var(--gold);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
}
.masthead__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: .01em;
  white-space: nowrap;
}

.masthead__toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  color: var(--gold);
  border: 1px solid rgba(242, 201, 76, .5);
  cursor: pointer;
  font-size: 12px;
  letter-spacing: .12em;
  line-height: 1;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.masthead__toggle:hover { background: rgba(242, 201, 76, .12); }
.masthead__toggle-bars {
  display: grid;
  gap: 3px;
  width: 16px;
  flex: 0 0 auto;
}
.masthead__toggle-bars span {
  display: block;
  height: 1.5px;
  background: currentColor;
  transition: transform .2s var(--ease), opacity .2s ease;
}
.masthead__toggle[aria-expanded="true"] .masthead__toggle-bars span:nth-child(1) { transform: translateY(4.5px) rotate(45deg); }
.masthead__toggle[aria-expanded="true"] .masthead__toggle-bars span:nth-child(2) { opacity: 0; }
.masthead__toggle[aria-expanded="true"] .masthead__toggle-bars span:nth-child(3) { transform: translateY(-4.5px) rotate(-45deg); }

/* 抽屉 / 竖轨 */
.masthead__panel {
  position: fixed;
  top: var(--topbar-h);
  left: 0;
  bottom: 0;
  width: min(330px, 84vw);
  z-index: 99;
  display: flex;
  flex-direction: column;
  background: var(--ink-2);
  border-right: 1px solid rgba(242, 201, 76, .3);
  padding: 6px 0 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
  transform: translateX(-103%);
  visibility: hidden;
  transition: transform .3s var(--ease), visibility .3s;
}
.masthead__panel[data-open] {
  transform: translateX(0);
  visibility: visible;
}

.masthead__scrim {
  position: fixed;
  inset: var(--topbar-h) 0 0 0;
  z-index: 98;
  background: rgba(15, 27, 45, .74);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s;
}
html.nav-open .masthead__scrim { opacity: 1; visibility: visible; }
html.nav-open { overflow: hidden; }

/* 竖轨品牌（仅桌面） */
.rail-brand { display: none; }
.rail-brand__mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: var(--gold);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  position: relative;
}
.rail-brand__mark::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(15, 27, 45, .38);
}
.rail-brand__text {
  font-size: 10px;
  line-height: 1.4;
  letter-spacing: .1em;
  color: var(--muted);
  text-align: center;
}

/* 导航列表 */
.rail-nav { width: 100%; padding: 6px 0; }
.rail-nav__list { list-style: none; margin: 0; padding: 0; }
.rail-nav__item { border-top: 1px solid rgba(247, 245, 239, .07); }
.rail-nav__item:last-child { border-bottom: 1px solid rgba(247, 245, 239, .07); }

.rail-nav__link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 22px;
  color: rgba(247, 245, 239, .8);
  text-decoration: none;
  transition: color .2s ease, background-color .2s ease;
}
.rail-nav__link:hover { color: var(--gold); background: rgba(242, 201, 76, .07); }
.rail-nav__index {
  flex: 0 0 auto;
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--green);
}
.rail-nav__label {
  font-size: 16px;
  letter-spacing: .02em;
  line-height: 1.5;
}
.rail-nav__link[aria-current="page"] {
  background: var(--gold);
  color: var(--ink);
}
.rail-nav__link[aria-current="page"] .rail-nav__index { color: rgba(15, 27, 45, .55); }

/* 竖轨底部 */
.rail-foot {
  margin-top: auto;
  display: grid;
  gap: 12px;
  padding: 18px 22px 4px;
}
.rail-cta {
  display: block;
  text-align: center;
  background: var(--gold);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .06em;
  padding: 13px 10px;
  text-decoration: none;
  border-bottom: 2px solid var(--gold-dim);
  transition: background-color .2s ease, transform .2s var(--ease);
}
.rail-cta:hover { background: #FCE28E; transform: translateY(-2px); }
.rail-meta {
  margin: 0;
  font-size: 10px;
  letter-spacing: .06em;
  color: var(--muted);
  text-align: center;
  word-break: break-all;
}

/* 桌面端：轨道形态 */
@media (min-width: 900px) {
  body { padding-top: 0; padding-left: var(--rail-w); }

  .masthead__bar,
  .masthead__scrim { display: none; }

  .masthead__panel {
    top: 0;
    bottom: 0;
    left: 0;
    width: var(--rail-w);
    align-items: center;
    padding: 16px 0 18px;
    background: var(--ink);
    border-right: 1px solid rgba(242, 201, 76, .16);
    overflow: visible;
    transform: none;
    visibility: visible;
    z-index: 90;
  }
  .masthead__panel::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: repeating-linear-gradient(
      180deg,
      rgba(247, 245, 239, .05) 0 1px,
      transparent 1px 24px
    );
  }
  .masthead__panel > * { position: relative; z-index: 1; }

  .rail-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 4px 4px 14px;
    text-decoration: none;
    color: var(--paper);
    border-bottom: 1px solid rgba(247, 245, 239, .09);
  }

  .rail-nav {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px 0;
  }
  .rail-nav__link {
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 11px 4px;
  }
  .rail-nav__index { font-size: 9px; letter-spacing: .1em; }
  .rail-nav__label {
    font-size: 12px;
    line-height: 1.35;
    text-align: center;
    max-width: 72px;
  }

  .rail-foot { padding: 8px 8px 0; width: 100%; gap: 10px; }
  .rail-cta { font-size: 12px; padding: 10px 4px; letter-spacing: .04em; }
  .rail-meta { font-size: 8px; line-height: 1.55; }
}

/* =========================================================
   页脚
   ========================================================= */

.site-foot {
  position: relative;
  background: var(--ink);
  color: var(--paper);
  border-top: 1px solid rgba(242, 201, 76, .28);
  padding-block: clamp(44px, 6vw, 76px) clamp(24px, 3vw, 36px);
  overflow: hidden;
}
.site-foot::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(90deg, rgba(247, 245, 239, .045) 1px, transparent 1px);
  background-size: var(--rail-w) 100%;
}
.site-foot > .container { position: relative; z-index: 1; }

.site-foot__top {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 2fr);
  gap: clamp(32px, 5vw, 72px);
  padding-bottom: clamp(32px, 4vw, 52px);
  border-bottom: 1px solid rgba(247, 245, 239, .12);
}

.site-foot__logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--paper);
}
.site-foot__mark {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  background: var(--gold);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
}
.site-foot__word {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -.01em;
}
.site-foot__domain {
  margin: 14px 0 0;
  font-size: 12px;
  letter-spacing: .12em;
  color: var(--green);
  word-break: break-all;
}
.site-foot__desc {
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.8;
  color: rgba(247, 245, 239, .62);
  max-width: 44ch;
}

.site-foot__cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 40px);
}
.foot-col__title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 16px;
  line-height: 1.6;
}
.foot-col__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 11px;
}
.foot-col__link {
  display: inline-block;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(247, 245, 239, .78);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  word-break: break-word;
  transition: color .2s ease, border-color .2s ease;
}
.foot-col__link:hover { color: var(--gold); border-bottom-color: var(--gold); }

.site-foot__bottom {
  display: grid;
  gap: 18px;
  padding-top: clamp(24px, 3vw, 36px);
}
.site-foot__contact {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 30px;
  font-size: 13px;
  line-height: 1.8;
  color: rgba(247, 245, 239, .62);
}
.foot-contact {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  max-width: 100%;
}
.foot-contact__key {
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--green);
  flex: 0 0 auto;
}
.foot-contact a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(247, 245, 239, .22);
  word-break: break-all;
  transition: color .2s ease, border-color .2s ease;
}
.foot-contact a:hover { color: var(--gold); border-bottom-color: var(--gold); }

.site-foot__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
}
.site-foot__legal,
.site-foot__copy {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--muted);
  line-height: 1.8;
}

@media (max-width: 860px) {
  .site-foot__top { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 620px) {
  .site-foot__cols { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .site-foot__meta { flex-direction: column; }
}

/* =========================================================
   脚本注入组件
   ========================================================= */

.scroll-progress {
  position: fixed;
  top: var(--topbar-h);
  left: 0;
  right: 0;
  height: 2px;
  z-index: 120;
  pointer-events: none;
  background: rgba(247, 245, 239, .08);
}
.scroll-progress__bar {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--green) 0%, var(--gold) 100%);
}

.to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 95;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background: var(--ink-2);
  color: var(--gold);
  border: 1px solid rgba(242, 201, 76, .45);
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .24s ease, transform .24s var(--ease), visibility .24s, background-color .2s ease, color .2s ease;
}
.to-top.is-shown { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { background: var(--gold); color: var(--ink); }

@media (min-width: 900px) {
  .scroll-progress { top: 0; left: var(--rail-w); }
  .to-top { right: 28px; bottom: 28px; }
}

/* 显现 */
[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .24s ease, transform .24s var(--ease);
}
[data-reveal].is-revealed { opacity: 1; transform: none; }

/* =========================================================
   动效降级
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .card:hover,
  .btn:hover { transform: none; }
}
