/* ==========================================================================
   大快发三官网 · 共享样式 /assets/site.css
   视觉基调：藏红近单色 + 鎏金单点强调 + 纸张叠层 + 印刷描边
   ========================================================================== */

/* ---------- 1. 设计变量 ---------- */
:root {
  --crimson-deep: #6B1A1A;
  --crimson: #8E2A22;
  --crimson-soft: #B4482F;
  --gold: #C9A227;
  --gold-light: #E8C86A;
  --teal: #1F5F5B;
  --flag-green: #3E8E86;
  --flag-blue: #2E6FA8;
  --paper: #F6F1E7;
  --paper-2: #EDE4D4;
  --ink: #2A2320;
  --ink-soft: #6B6157;

  --rail-w: 268px;
  --rail-h: 64px;
  --gap: 24px;
  --radius: 2px;
  --ease: cubic-bezier(.22, .61, .36, 1);

  --sheet: 7px 7px 0 var(--paper-2), 7px 7px 0 1px rgba(107, 26, 26, .16);
  --sheet-sm: 4px 4px 0 var(--paper-2), 4px 4px 0 1px rgba(107, 26, 26, .14);

  --font-sans: "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-serif: "Source Han Serif SC", "Noto Serif SC", "Songti SC", "SimSun", serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* ---------- 2. Reset 与基础 ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.85;
  color: var(--ink);
  background-color: var(--paper);
  background-image: repeating-linear-gradient(0deg, rgba(107, 26, 26, .028) 0 1px, transparent 1px 28px);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.is-nav-open { overflow: hidden; }

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

ul,
ol { margin: 0; padding: 0; }

a {
  color: var(--flag-blue);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

button { font-family: inherit; }

::selection {
  background: rgba(201, 162, 39, .38);
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--flag-blue);
  outline-offset: 3px;
}

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

/* ---------- 3. 中文排版 ---------- */
h1, h2, h3, h4 {
  margin: 0 0 .6em;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -.01em;
  color: var(--ink);
}

h1 { font-size: clamp(34px, 5vw, 64px); }
h2 { font-size: clamp(26px, 3.4vw, 42px); }
h3 { font-size: clamp(19px, 2vw, 24px); font-weight: 700; }
h4 { font-size: 17px; font-weight: 700; }

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

strong { font-weight: 700; }

.display {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 900;
  font-size: clamp(44px, 7vw, 112px);
  line-height: .94;
  letter-spacing: -.02em;
  color: var(--ink);
}

.display em {
  font-family: var(--font-serif);
  font-weight: 300;
  font-style: normal;
  letter-spacing: -.01em;
  color: var(--crimson);
}

.lede {
  max-width: 34em;
  margin: 0;
  font-size: 17px;
  line-height: 1.85;
  color: var(--ink-soft);
}

.eyebrow {
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

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

.section-num {
  display: block;
  margin: 0 0 -.28em;
  font-family: var(--font-mono);
  font-size: clamp(72px, 10vw, 150px);
  font-weight: 300;
  line-height: .8;
  letter-spacing: -.04em;
  color: rgba(107, 26, 26, .18);
}

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

.grid {
  display: grid;
  gap: var(--gap);
}

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

.rule {
  height: 0;
  margin: 0;
  border: 0;
  border-top: 1px solid rgba(107, 26, 26, .25);
}

.rule--gold { border-top-color: rgba(201, 162, 39, .7); }

.plate {
  position: relative;
  padding: clamp(20px, 3vw, 44px);
  background: var(--paper);
  border: 2px solid var(--crimson);
}

.tick-rule {
  height: 10px;
  border-bottom: 1px solid rgba(107, 26, 26, .3);
  background-image: repeating-linear-gradient(90deg, rgba(107, 26, 26, .45) 0 1px, transparent 1px 14px);
  background-size: auto 6px;
  background-position: left bottom;
  background-repeat: repeat-x;
}

#main-content {
  display: block;
  min-height: 50vh;
  padding-top: 24px;
  scroll-margin-top: 84px;
}

/* ---------- 5. 按钮 / 标签 / 面包屑 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 26px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .06em;
  line-height: 1.4;
  text-decoration: none;
  cursor: pointer;
  border: 1.5px solid var(--crimson-deep);
  border-radius: var(--radius);
  background: var(--crimson-deep);
  color: var(--paper);
  box-shadow: 5px 5px 0 rgba(107, 26, 26, .16);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background-color .18s var(--ease), color .18s var(--ease);
}

.btn:hover {
  background: var(--crimson);
  transform: translate(-1px, -1px);
  box-shadow: 7px 7px 0 rgba(107, 26, 26, .2);
}

.btn:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 rgba(107, 26, 26, .18); }

.btn--ghost {
  background: transparent;
  color: var(--crimson-deep);
  border-color: var(--crimson-deep);
}

.btn--ghost:hover { background: rgba(107, 26, 26, .07); color: var(--crimson); }

.btn--gold {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--crimson-deep);
  box-shadow: 5px 5px 0 rgba(201, 162, 39, .3);
}

.btn--gold:hover { background: var(--gold-light); box-shadow: 7px 7px 0 rgba(201, 162, 39, .38); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.65;
  letter-spacing: .04em;
  border: 1px solid rgba(107, 26, 26, .35);
  border-radius: var(--radius);
  background: var(--paper-2);
  color: var(--ink);
  white-space: nowrap;
}

.tag--ok { border-color: var(--flag-green); background: rgba(62, 142, 134, .12); color: #2A635C; font-weight: 700; }
.tag--info { border-color: var(--flag-blue); background: rgba(46, 111, 168, .1); color: #1F5279; }
.tag--gold { border-color: var(--gold); background: rgba(201, 162, 39, .18); color: #6E5609; font-weight: 700; }

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--ink-soft);
}

.breadcrumb li { display: flex; align-items: center; gap: 10px; }
.breadcrumb li + li::before { content: "/"; color: rgba(107, 26, 26, .35); }
.breadcrumb a { color: var(--ink-soft); text-decoration: none; border-bottom: 1px solid rgba(107, 26, 26, .25); }
.breadcrumb a:hover { color: var(--crimson); border-bottom-color: var(--gold); }

/* ---------- 6. 卡片与图片容器 ---------- */
.card {
  position: relative;
  min-width: 0;
  padding: 26px;
  background: var(--paper);
  border: 1px solid rgba(107, 26, 26, .35);
  border-radius: var(--radius);
  box-shadow: var(--sheet-sm);
}

.card__title {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.5;
}

.media-frame {
  position: relative;
  display: block;
  overflow: hidden;
  width: 100%;
  background: var(--paper-2);
  border: 1px solid rgba(107, 26, 26, .35);
  border-radius: var(--radius);
  box-shadow: var(--sheet-sm);
}

.media-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-frame--pad { padding: 10px; background: var(--paper); }
.media-frame--pad img { border: 1px solid rgba(107, 26, 26, .22); }

.media-frame--4x3 { aspect-ratio: 4 / 3; }
.media-frame--16x9 { aspect-ratio: 16 / 9; }
.media-frame--1x1 { aspect-ratio: 1 / 1; }
.media-frame--3x4 { aspect-ratio: 3 / 4; }

.media-frame__slot {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 180px;
  padding: 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--ink-soft);
  text-align: center;
  background-image: repeating-linear-gradient(135deg, rgba(107, 26, 26, .07) 0 1px, transparent 1px 10px);
}

/* ---------- 7. 进入视口显现 ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .32s var(--ease), transform .32s var(--ease);
}

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

/* ---------- 8. 头部：侧边轨道 ---------- */
.skip-link {
  position: fixed;
  top: -120px;
  left: 12px;
  z-index: 99;
  padding: 12px 20px;
  font-size: 14px;
  letter-spacing: .06em;
  text-decoration: none;
  color: var(--paper);
  background: var(--crimson-deep);
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  transition: top .18s var(--ease);
}

.skip-link:focus { top: 12px; }

.read-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 70;
  height: 2px;
  background: rgba(107, 26, 26, .14);
  pointer-events: none;
}

.read-progress__bar {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 60;
  display: flex;
  width: var(--rail-w);
}

.rail {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  padding: 26px 20px 20px;
  color: var(--paper);
  background-color: var(--crimson-deep);
  background-image: repeating-linear-gradient(180deg, rgba(232, 200, 106, .07) 0 1px, transparent 1px 96px);
  border-right: 1px solid rgba(201, 162, 39, .35);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand__mark {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  color: var(--gold-light);
  border: 1.5px solid var(--gold);
  border-radius: var(--radius);
  box-shadow: 3px 3px 0 rgba(201, 162, 39, .22);
}

.brand__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.brand__name {
  font-size: 16px;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: .14em;
  color: var(--paper);
}

.brand__ver {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: .06em;
  color: var(--gold-light);
  opacity: .85;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  font-family: inherit;
  font-size: 12px;
  letter-spacing: .14em;
  color: var(--paper);
  background: transparent;
  border: 1px solid rgba(232, 200, 106, .5);
  border-radius: var(--radius);
  cursor: pointer;
}

.nav-toggle__bars { display: inline-flex; flex-direction: column; gap: 4px; width: 16px; }

.nav-toggle__bars i {
  display: block;
  height: 1.5px;
  background: var(--gold-light);
  transition: transform .2s var(--ease);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:first-child { transform: translateY(2.75px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:last-child { transform: translateY(-2.75px) rotate(-45deg); }

.site-nav {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  margin-top: 34px;
  overflow-y: auto;
}

.site-nav__eyebrow {
  margin: 0 0 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(246, 241, 231, .5);
}

.site-nav__list { list-style: none; }

.site-nav__link {
  position: relative;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: baseline;
  gap: 8px;
  padding: 11px 6px 11px 10px;
  font-size: 14px;
  letter-spacing: .04em;
  color: rgba(246, 241, 231, .66);
  text-decoration: none;
  border-top: 1px solid rgba(246, 241, 231, .12);
  transition: color .2s var(--ease), background-color .2s var(--ease);
}

.site-nav__link::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 0;
  height: 0;
  background: var(--gold);
  transform: translateY(-50%);
  transition: width .2s var(--ease), height .2s var(--ease);
}

.site-nav__link:hover,
.site-nav__link:focus-visible {
  color: var(--paper);
  background: rgba(201, 162, 39, .1);
}

.site-nav__link:hover::before,
.site-nav__link:focus-visible::before { width: 3px; height: 16px; }

.site-nav__num {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .04em;
  color: rgba(232, 200, 106, .7);
}

.site-nav__label { display: block; min-width: 0; }

.site-nav__link[aria-current="page"] {
  color: var(--paper);
  background: rgba(201, 162, 39, .16);
}

.site-nav__link[aria-current="page"]::before { width: 3px; height: 22px; }
.site-nav__link[aria-current="page"] .site-nav__num { color: var(--gold-light); opacity: 1; }
.site-nav__link[aria-current="page"] .site-nav__label { font-weight: 700; letter-spacing: .06em; }

.rail__foot {
  margin-top: auto;
  padding-top: 18px;
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.8;
  letter-spacing: .08em;
  color: rgba(246, 241, 231, .45);
  border-top: 1px solid rgba(201, 162, 39, .28);
}

.rail__foot-line { display: block; }

.header-tools {
  position: fixed;
  top: 14px;
  right: 20px;
  z-index: 58;
  display: flex;
  gap: 8px;
}

.tool-link {
  display: inline-block;
  padding: 8px 14px;
  font-size: 12px;
  letter-spacing: .1em;
  text-decoration: none;
  color: var(--crimson-deep);
  background: var(--paper);
  border: 1px solid rgba(107, 26, 26, .55);
  border-radius: var(--radius);
  box-shadow: 3px 3px 0 rgba(107, 26, 26, .14);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background-color .18s var(--ease), color .18s var(--ease);
}

.tool-link:hover {
  background: var(--crimson-deep);
  color: var(--gold-light);
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 rgba(107, 26, 26, .22);
}

.tool-link--accent {
  background: var(--crimson-deep);
  color: var(--gold-light);
  border-color: var(--crimson-deep);
}

.tool-link--accent:hover { background: var(--crimson); }

/* ---------- 9. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(48px, 8vw, 104px);
  color: var(--paper);
  background-color: var(--crimson-deep);
  background-image: repeating-linear-gradient(180deg, rgba(232, 200, 106, .05) 0 1px, transparent 1px 72px);
  border-top: 2px solid var(--gold);
}

.footer-inner {
  max-width: 1180px;
  margin-inline: auto;
  padding: clamp(40px, 6vw, 68px) clamp(20px, 4vw, 56px) 26px;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr 1fr;
  gap: clamp(24px, 3vw, 44px);
  align-items: start;
}

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

.footer-brand__name {
  margin: 0 0 10px;
  font-size: 26px;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: .12em;
  color: var(--paper);
}

.footer-brand__meta {
  margin: 0 0 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.9;
  letter-spacing: .05em;
  color: rgba(246, 241, 231, .62);
}

.footer-brand__stamp {
  display: inline-block;
  padding: 5px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--gold-light);
  border: 1px solid rgba(232, 200, 106, .55);
  border-radius: var(--radius);
}

.footer-col { min-width: 0; }
.footer-col--entry { margin-top: 0; }
.footer-col--help { margin-top: 28px; }
.footer-col--terms { margin-top: 56px; }

.footer-heading {
  margin: 0 0 14px;
  padding-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold-light);
  border-bottom: 1px solid rgba(201, 162, 39, .35);
}

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

.footer-list a {
  font-size: 14px;
  letter-spacing: .03em;
  color: rgba(246, 241, 231, .76);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}

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

.footer-contact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px 32px;
  margin-top: clamp(32px, 4vw, 52px);
  padding-top: 22px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.9;
  letter-spacing: .05em;
  color: rgba(246, 241, 231, .72);
  border-top: 1px solid rgba(201, 162, 39, .3);
}

.footer-contact__item { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.footer-contact__label { margin-right: 8px; color: var(--gold-light); }

.footer-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 28px;
  margin-top: 26px;
  padding-top: 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .05em;
  color: rgba(246, 241, 231, .5);
  border-top: 1px solid rgba(246, 241, 231, .16);
}

.footer-base__legal,
.footer-base__copy { margin: 0; }

/* ---------- 10. 桌面端 ---------- */
@media (min-width: 1024px) {
  body { padding-left: var(--rail-w); }
  .read-progress { left: var(--rail-w); }
  #main-content { padding-top: 44px; }
  .skip-link { left: calc(var(--rail-w) + 12px); }
}

/* ---------- 11. 平板与手机 ---------- */
@media (max-width: 1023px) {
  .site-header {
    position: sticky;
    top: 0;
    left: auto;
    bottom: auto;
    width: 100%;
    height: var(--rail-h);
    z-index: 60;
  }

  .rail {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    height: var(--rail-h);
    padding: 0 18px;
    background-image: none;
    border-right: 0;
    border-bottom: 1px solid rgba(201, 162, 39, .35);
  }

  .brand__mark { width: 32px; height: 32px; font-size: 17px; }
  .brand__name { font-size: 14px; letter-spacing: .1em; }
  .brand__ver { font-size: 10px; }

  .nav-toggle { display: inline-flex; }

  .site-nav {
    position: fixed;
    inset: var(--rail-h) 0 0 0;
    z-index: 59;
    margin-top: 0;
    padding: 26px 22px 44px;
    overflow-y: auto;
    background-color: var(--crimson-deep);
    background-image: repeating-linear-gradient(180deg, rgba(232, 200, 106, .06) 0 1px, transparent 1px 88px);
    border-top: 1px solid rgba(201, 162, 39, .3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity .24s var(--ease), transform .24s var(--ease), visibility .24s linear;
  }

  .site-nav[data-open] {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .site-nav__eyebrow { font-size: 11px; margin-bottom: 14px; }

  .site-nav__link {
    grid-template-columns: 34px minmax(0, 1fr);
    padding: 15px 8px 15px 12px;
    font-size: 16px;
    border-top-color: rgba(246, 241, 231, .16);
  }

  .site-nav__num { font-size: 11px; }

  .rail__foot { display: none; }

  .header-tools { display: none; }

  .footer-top { grid-template-columns: 1fr 1fr; gap: 30px 24px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-col--entry { grid-column: 1; margin-top: 0; }
  .footer-col--help { grid-column: 2; margin-top: 18px; }
  .footer-col--terms { grid-column: 1; margin-top: 0; }

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

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

  .plate { padding: 18px; }

  .footer-contact { grid-template-columns: minmax(0, 1fr); gap: 10px; }
}

@media (max-width: 560px) {
  .footer-top { grid-template-columns: minmax(0, 1fr); }
  .footer-col--entry,
  .footer-col--help,
  .footer-col--terms { grid-column: 1; margin-top: 0; }
  .footer-brand__name { font-size: 22px; }
  .footer-base { justify-content: flex-start; }
}

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

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

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

  .btn:hover,
  .tool-link:hover { transform: none; }
}
