/* ==========================================================================
   M6看台 · 共享站表  /assets/site.css
   1 重置  2 变量  3 基础排版  4 头部  5 页脚  6 通用组件  7 响应式与偏好
   ========================================================================== */

/* ---------- 1. 重置 ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

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

ul, ol { margin: 0; padding: 0; }
ul[class], ol[class] { list-style: none; }

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

a { color: inherit; }

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

/* ---------- 2. 变量 ---------- */
:root {
  /* 品牌色 */
  --saddle: #3B2A1E;
  --saddle-deep: #2A1D14;
  --concrete: #C9C4BA;
  --cream: #F4EEDF;
  --ink: #1C1720;
  --cyan: #1FE3C2;
  --amber: #E88A1A;
  --rust: #B44A2E;
  --grass: #6F7A66;
  --paper: #FFFDF7;

  /* 边界 */
  --line: rgba(28, 23, 32, .16);
  --line-strong: rgba(28, 23, 32, .34);
  --line-light: rgba(244, 238, 223, .22);

  /* 字体 */
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
               "Source Han Sans SC", "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
  --font-num: ui-monospace, "SFMono-Regular", "SF Mono", Consolas,
              "Liberation Mono", "Courier New", monospace;

  /* 尺度 */
  --rail-w: 0px;
  --content-max: 1180px;
  --gutter: 20px;
  --radius: 2px;

  --shadow-1: 0 1px 0 rgba(28, 23, 32, .05), 0 10px 24px -20px rgba(28, 23, 32, .55);
  --ease: cubic-bezier(.2, .6, .3, 1);
}

@media (min-width: 720px) {
  :root { --gutter: 28px; }
}

@media (min-width: 1000px) {
  :root { --rail-w: 92px; --gutter: 40px; }
}

/* ---------- 3. 基础排版 ---------- */
body {
  min-height: 100vh;
  padding-left: var(--rail-w);
  background-color: var(--cream);
  background-image: radial-gradient(rgba(59, 42, 30, .055) 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--saddle);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: .01em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -.01em;
  color: var(--ink);
}

p { overflow-wrap: break-word; }

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

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.topbar :focus-visible,
.rail :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--cyan);
}

.mainnav :focus-visible {
  outline-color: var(--rust);
}

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

.skip-link {
  position: absolute;
  top: 8px;
  left: 12px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  border-radius: var(--radius);
  transform: translateY(-200%);
  transition: transform .16s var(--ease);
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  outline-color: var(--cyan);
}

/* 左侧品牌轨道 */
.rail {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 80;
  width: var(--rail-w);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0 26px;
  background: var(--saddle);
  border-right: 1px solid rgba(31, 227, 194, .22);
}

.rail__badge {
  font-family: var(--font-num);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  line-height: 1;
  padding: 6px 6px 5px;
  color: var(--ink);
  background: var(--cyan);
  border-radius: var(--radius);
}

.rail__ticks {
  flex: 1 1 auto;
  width: 14px;
  margin: 20px 0;
  color: rgba(244, 238, 223, .32);
  background-image: repeating-linear-gradient(180deg,
    currentColor 0 1px,
    transparent 1px 11px);
}

.rail__mark {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  padding: 12px 3px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .3em;
  color: var(--concrete);
  border-top: 1px solid var(--line-light);
  border-bottom: 1px solid var(--line-light);
}

.rail__meter {
  position: relative;
  width: 3px;
  height: 92px;
  margin-top: 22px;
  background: rgba(244, 238, 223, .18);
  border-radius: 2px;
  overflow: hidden;
}

.rail__meter-fill {
  position: absolute;
  inset: 0 0 auto 0;
  display: block;
  height: 100%;
  background: linear-gradient(180deg, var(--cyan), var(--amber));
  transform: scaleY(0);
  transform-origin: top center;
  will-change: transform;
}

/* 上层信息条 */
.topbar {
  background: var(--saddle);
  color: var(--cream);
  border-bottom: 1px solid var(--saddle-deep);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding: 14px var(--gutter);
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  flex: none;
  text-decoration: none;
  transition: opacity .18s var(--ease);
}

.brand:hover { opacity: .82; }

.brand__mark {
  font-family: var(--font-num);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .05em;
  line-height: 1;
  padding: 4px 6px 5px;
  color: var(--ink);
  background: var(--cyan);
  border-radius: var(--radius);
}

.brand__name {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: .06em;
  color: var(--paper);
}

.topbar__note {
  flex: 1 1 auto;
  display: none;
  font-size: 12.5px;
  letter-spacing: .12em;
  color: rgba(244, 238, 223, .66);
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 移动导航按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  flex: none;
  padding: 9px 13px;
  color: var(--paper);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .14em;
  border: 1px solid rgba(244, 238, 223, .38);
  border-radius: var(--radius);
  cursor: pointer;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}

.nav-toggle:hover {
  color: var(--cyan);
  border-color: var(--cyan);
}

.nav-toggle__bars {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: background-color .18s var(--ease);
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: transform .18s var(--ease);
}

.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }

.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

/* 下层主导航 */
.mainnav {
  background: linear-gradient(180deg, #FCF8EE 0%, var(--cream) 100%);
  border-bottom: 1px solid var(--line-strong);
  box-shadow: 0 1px 0 rgba(28, 23, 32, .06);
}

.mainnav__inner {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding: 0 var(--gutter);
}

.mainnav__list {
  display: flex;
  align-items: stretch;
  flex: 1 1 auto;
  min-width: 0;
  gap: 2px;
}

.mainnav__item { display: flex; }

.mainnav__link {
  position: relative;
  display: flex;
  align-items: center;
  padding: 20px 15px 19px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .03em;
  color: var(--saddle);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color .18s var(--ease), border-color .18s var(--ease), background-color .18s var(--ease);
}

.mainnav__link::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 15px;
  right: 15px;
  height: 3px;
  background: rgba(28, 23, 32, .13);
  transition: background-color .18s var(--ease);
}

.mainnav__link:hover {
  color: var(--ink);
  background: rgba(201, 196, 186, .3);
  border-bottom-color: var(--cyan);
}

.mainnav__link:hover::before { background: var(--cyan); }

.mainnav__link[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--amber);
}

.mainnav__link[aria-current="page"]::before { background: var(--amber); }

.mainnav__cta {
  align-self: center;
  flex: none;
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--paper);
  background: var(--saddle);
  border: 1px solid var(--saddle);
  border-radius: var(--radius);
  text-decoration: none;
  transition: background-color .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
}

.mainnav__cta:hover {
  color: var(--ink);
  background: var(--amber);
  border-color: var(--amber);
}

/* ---------- 5. 页脚 ---------- */
.site-footer {
  margin-top: 72px;
  background: var(--saddle);
  background-image:
    repeating-linear-gradient(90deg, rgba(244, 238, 223, .045) 0 1px, transparent 1px 13px),
    radial-gradient(rgba(31, 227, 194, .07) 1px, transparent 1px);
  background-size: auto, 26px 26px;
  color: var(--cream);
  border-top: 3px solid var(--cyan);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 34px 30px;
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding: 52px var(--gutter) 38px;
}

.footer__col { min-width: 0; }

.footer__col--brand {
  padding-left: 18px;
  border-left: 3px solid var(--cyan);
}

.footer__mark {
  display: inline-block;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: .06em;
  color: var(--paper);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}

.footer__mark:hover {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
}

.footer__tagline {
  margin-top: 12px;
  max-width: 30ch;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(244, 238, 223, .74);
}

.footer__title {
  margin-bottom: 14px;
  font-family: var(--font-num);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .22em;
  color: var(--cyan);
}

.footer__list {
  display: grid;
  gap: 10px;
}

.footer__link {
  display: inline-block;
  font-size: 14px;
  color: var(--cream);
  text-decoration: none;
  border-bottom: 1px solid rgba(244, 238, 223, .28);
  padding-bottom: 1px;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}

.footer__link:hover {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
}

.footer__contact {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(244, 238, 223, .9);
  overflow-wrap: break-word;
}

.footer__note {
  margin-top: 12px;
  font-size: 12.5px;
  line-height: 1.6;
  color: rgba(244, 238, 223, .58);
}

.footer__base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding: 18px var(--gutter) 30px;
  border-top: 1px solid var(--line-light);
  font-size: 12.5px;
  letter-spacing: .04em;
  color: rgba(244, 238, 223, .6);
}

.footer__legal,
.footer__icp { margin: 0; }

.footer__icp {
  font-family: var(--font-num);
  letter-spacing: .06em;
}

/* ---------- 6. 通用组件 ---------- */
.container {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.grid {
  display: grid;
  gap: 20px;
}

.grid--2 { grid-template-columns: 1fr; }

.prose {
  max-width: 68ch;
  font-size: 16px;
  line-height: 1.62;
}

.section { padding-block: 44px; }

.section__head {
  display: grid;
  gap: 8px;
  margin-bottom: 26px;
}

.section__num {
  font-family: var(--font-num);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .24em;
  color: var(--rust);
}

.section__title {
  font-size: clamp(24px, 3.4vw, 38px);
  font-weight: 900;
  color: var(--ink);
  line-height: 1.06;
}

.section__note {
  max-width: 62ch;
  font-size: 14px;
  color: var(--grass);
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-num);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .2em;
  color: var(--grass);
}

.eyebrow--cyan { color: #0F9E88; }
.eyebrow--rust { color: var(--rust); }

.big-num {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--ink);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .03em;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform .18s var(--ease), background-color .18s var(--ease),
              color .18s var(--ease), border-color .18s var(--ease);
}

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

.btn--solid {
  background: var(--saddle);
  color: var(--paper);
  border-color: var(--saddle);
}

.btn--solid:hover {
  background: var(--ink);
  border-color: var(--ink);
}

.btn--stamp {
  background: var(--amber);
  color: var(--ink);
  border-color: var(--amber);
}

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

.btn--ghost {
  background: transparent;
  color: var(--saddle);
  border-color: var(--line-strong);
}

.btn--ghost:hover {
  color: var(--ink);
  background: rgba(31, 227, 194, .14);
  border-color: var(--cyan);
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--grass);
}

.crumbs a {
  color: var(--saddle);
  text-decoration: none;
  border-bottom: 1px solid var(--concrete);
  transition: color .18s var(--ease), border-color .18s var(--ease);
}

.crumbs a:hover {
  color: var(--ink);
  border-bottom-color: var(--cyan);
}

.crumbs [aria-current="page"] {
  color: var(--ink);
  font-weight: 700;
}

.crumbs li { display: inline-flex; align-items: center; gap: 8px; }

.panel {
  position: relative;
  padding: 22px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  transition: transform .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
}

.panel:hover {
  transform: translateY(-2px);
  border-color: var(--cyan);
  box-shadow: 0 1px 0 rgba(28, 23, 32, .05), 0 16px 30px -22px rgba(28, 23, 32, .6);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  font-family: var(--font-num);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--saddle);
  background: rgba(201, 196, 186, .55);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.tick-rule {
  display: block;
  height: 10px;
  color: var(--concrete);
  background-image: repeating-linear-gradient(90deg,
    currentColor 0 1px,
    transparent 1px 12px);
  border: 0;
  margin: 0;
}

/* 图片容器基础规则 */
.media {
  position: relative;
  display: block;
  overflow: hidden;
  margin: 0;
  background: var(--concrete);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.media--wide { aspect-ratio: 21 / 9; }
.media--standard { aspect-ratio: 16 / 10; }
.media--portrait { aspect-ratio: 3 / 4; }
.media--square { aspect-ratio: 1 / 1; }

.media__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.88) contrast(1.03);
}

.media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(90deg,
    rgba(28, 23, 32, .08) 0 1px,
    transparent 1px 5px);
  opacity: .45;
}

.media__caption {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 1;
  margin: 0;
  padding: 6px 12px;
  background: var(--ink);
  color: var(--paper);
  font-size: 12px;
  letter-spacing: .08em;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 7. 响应式 ---------- */
@media (min-width: 560px) {
  .grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

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

@media (min-width: 720px) {
  .topbar__note { display: block; }

  .section { padding-block: 64px; }

  .footer__grid { gap: 40px 32px; padding-top: 62px; }
}

/* 移动端：折叠导航 */
@media (max-width: 719px) {
  .nav-toggle { display: inline-flex; }

  .mainnav {
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    border-bottom-width: 0;
    transition: max-height .22s var(--ease), visibility 0s linear .22s;
  }

  .mainnav[data-open="true"] {
    max-height: 760px;
    visibility: visible;
    border-bottom-width: 1px;
    transition: max-height .22s var(--ease), visibility 0s linear 0s;
  }

  .mainnav__inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 6px var(--gutter) 20px;
  }

  .mainnav__list {
    flex-direction: column;
    width: 100%;
    gap: 0;
  }

  .mainnav__item { display: block; }

  .mainnav__link {
    padding: 14px 12px;
    border-bottom: 1px solid var(--line);
    border-left: 3px solid transparent;
    background: transparent;
  }

  .mainnav__link::before { display: none; }

  .mainnav__link:hover {
    background: rgba(201, 196, 186, .32);
    border-bottom-color: var(--line);
    border-left-color: var(--cyan);
  }

  .mainnav__link[aria-current="page"] {
    background: rgba(232, 138, 26, .1);
    border-bottom-color: var(--line);
    border-left-color: var(--amber);
  }

  .mainnav__cta {
    align-self: stretch;
    justify-content: center;
    margin-top: 16px;
  }
}

@media (min-width: 1000px) {
  .rail { display: flex; }

  .footer__grid { grid-template-columns: 1.25fr 1.45fr .85fr .85fr; }
}

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

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }

  .btn:hover,
  .panel:hover { transform: none; }

  .mainnav { transition: none; }
}
