/* ==========================================================================
   金年汇官网 · /assets/site.css
   共享层：reset / 变量 / 中文排版 / 头部 / 页脚 / 通用组件
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--paper);
}

body,
h1, h2, h3, h4, h5,
p, figure, blockquote, dl, dd,
ul, ol { 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;
  padding: 0;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

table { border-collapse: collapse; width: 100%; }

/* ---------- 2. 设计变量 ---------- */
:root {
  /* 主色板 */
  --paper: #F3EADB;
  --snow: #FCFAF4;
  --ink: #132238;
  --ink-soft: #3A4A60;
  --crimson: #A93426;
  --crimson-deep: #8C2A1E;
  --gold: #C0953F;
  --sky: #2B6692;
  --butter: #E6B34A;
  --barley: #9A795A;
  --black: #0B0D10;
  --line: #D8D2C4;
  --jade: #2F6B5A;

  /* 字体 */
  --font-display: 'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', 'Noto Serif Tibetan', serif;
  --font-body: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-mono: 'IBM Plex Mono', 'Roboto Mono', ui-monospace, 'SFMono-Regular', monospace;

  /* 形状与材质 */
  --radius-pill: 999px;
  --radius-card: 18px;
  --radius-sm: 12px;
  --shadow-soft: 0 18px 40px -30px rgba(19, 34, 56, .62);
  --shadow-lift: 0 26px 52px -30px rgba(19, 34, 56, .55);
  --hairline: 1px solid var(--line);

  /* 节奏 */
  --ease: cubic-bezier(.22, .7, .3, 1);
  --gutter: 24px;
  --shell-max: 1240px;
}

/* ---------- 3. 中文排版与蓝图底网格 ---------- */
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.85;
  color: var(--ink);
  background: transparent;
  letter-spacing: .012em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    90deg,
    rgba(216, 210, 196, .62) 0,
    rgba(216, 210, 196, .62) 1px,
    transparent 1px,
    transparent 120px
  );
}

main { display: block; min-height: 50vh; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: -.008em;
  color: var(--ink);
  text-wrap: balance;
}

strong { font-weight: 700; color: var(--ink); }

::selection {
  background: rgba(169, 52, 38, .18);
  color: var(--ink);
}

/* 焦点可见 */
:focus-visible {
  outline: 2px solid var(--sky);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- 4. 布局壳 ---------- */
.shell {
  width: min(var(--shell-max), calc(100% - 48px));
  margin-inline: auto;
}

.container-narrow {
  width: min(760px, 100%);
  margin-inline: auto;
}

.section { padding-block: 64px; }
.section--tight { padding-block: 40px; }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 18px;
  margin-bottom: 28px;
}

.section-num {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .16em;
  color: var(--gold);
}

.section-title {
  font-size: clamp(26px, 3.4vw, 40px);
  font-weight: 900;
}

.lede {
  font-size: 17px;
  line-height: 1.95;
  color: var(--ink-soft);
  max-width: 62ch;
}

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

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--gold);
  flex-shrink: 0;
}

.divider-gold {
  height: 1px;
  border: 0;
  background: linear-gradient(90deg, var(--gold), rgba(192, 149, 63, 0));
  margin-block: 32px;
}

.stack > * + * { margin-top: 1em; }

/* ---------- 5. 网格 ---------- */
.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gutter);
}

@media (min-width: 900px) {
  .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-9  { grid-column: span 9; }
  .span-12 { grid-column: span 12; }
}

/* ---------- 6. Skip link ---------- */
.skip-link {
  position: fixed;
  left: 50%;
  top: -80px;
  transform: translateX(-50%);
  z-index: 200;
  padding: 11px 22px;
  border-radius: 0 0 12px 12px;
  background: var(--ink);
  color: var(--snow);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .04em;
  box-shadow: var(--shadow-lift);
  transition: top .24s var(--ease);
}

.skip-link:focus,
.skip-link:focus-visible {
  top: 0;
  outline-offset: -4px;
}

/* ---------- 7. 头部：悬浮胶囊浮岛 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 16px 0 10px;
  background: transparent;
  transition: padding .3s var(--ease);
}

/* 顶部柔化遮罩，避免内容从浮岛上方缝隙里露出 */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    var(--paper) 0%,
    var(--paper) 58%,
    rgba(243, 234, 219, 0) 100%
  );
}

.header-shell {
  display: flex;
  align-items: center;
  gap: 18px;
  width: min(var(--shell-max), calc(100% - 40px));
  margin-inline: auto;
  padding: 9px 12px 9px 18px;
  border: var(--hairline);
  border-radius: var(--radius-pill);
  background: rgba(252, 250, 244, .93);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .8),
    0 14px 34px -24px rgba(19, 34, 56, .7);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
  backdrop-filter: blur(14px) saturate(1.15);
  transition: padding .3s var(--ease), box-shadow .3s var(--ease);
}

.site-header.is-condensed { padding-top: 8px; }
.site-header.is-condensed .header-shell {
  padding-block: 6px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .8),
    0 18px 38px -24px rgba(19, 34, 56, .78);
}

/* 品牌 */
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
  padding-right: 16px;
  border-right: var(--hairline);
}

.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--snow);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  overflow: hidden;
  flex-shrink: 0;
}

.brand-mark::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--crimson) 0 33%,
    var(--butter) 33% 66%,
    var(--gold) 66% 100%
  );
}

.brand-text { display: block; }

.brand-name {
  display: block;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: .02em;
  color: var(--ink);
  white-space: nowrap;
}

.brand-sub {
  display: block;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: .22em;
  color: var(--barley);
  white-space: nowrap;
}

/* 导航 */
.site-nav {
  flex: 1 1 auto;
  min-width: 0;
}

.nav-list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.nav-item { display: block; }

.nav-link {
  position: relative;
  display: block;
  padding: 9px 13px;
  border-radius: var(--radius-pill);
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--ink-soft);
  white-space: nowrap;
  transition: color .18s ease, background-color .18s ease;
}

.nav-link:hover {
  color: var(--ink);
  background: rgba(19, 34, 56, .055);
}

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

.nav-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 3px;
  width: 16px;
  height: 2px;
  margin-left: -8px;
  border-radius: 2px;
  background: var(--crimson);
}

/* 工具区 */
.header-tools {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
}

.tool-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border: var(--hairline);
  border-radius: var(--radius-pill);
  background: var(--paper);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  transition: border-color .18s ease, color .18s ease, background-color .18s ease;
}

.tool-link:hover {
  border-color: var(--sky);
  color: var(--sky);
  background: var(--snow);
}

.tool-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--crimson);
  box-shadow: 0 0 0 3px rgba(169, 52, 38, .16);
  flex-shrink: 0;
}

.update-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .02em;
  color: var(--barley);
  white-space: nowrap;
}

.update-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--butter);
  box-shadow: 0 0 0 3px rgba(230, 179, 74, .22);
  flex-shrink: 0;
}

/* 移动端按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border: var(--hairline);
  border-radius: 50%;
  background: var(--paper);
  transition: background-color .18s ease, border-color .18s ease;
}

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

.nav-toggle-bar {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform .26s var(--ease), opacity .18s ease;
}

.site-header[data-open] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-header[data-open] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.site-header[data-open] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- 8. 头部响应式 ---------- */
@media (max-width: 1180px) {
  .update-badge { display: none; }
}

@media (max-width: 1024px) {
  .nav-link { padding: 9px 10px; font-size: 14px; }
  .brand { padding-right: 12px; }
}

@media (max-width: 960px) {
  .site-header { padding: 10px 0 8px; }

  .header-shell {
    flex-wrap: wrap;
    gap: 10px;
    padding: 8px 10px 8px 12px;
    border-radius: 22px;
  }

  .brand {
    order: 1;
    flex: 1 1 auto;
    min-width: 0;
    padding-right: 0;
    border-right: 0;
  }

  .brand-sub { display: none; }

  .header-tools {
    order: 2;
    margin-left: auto;
    gap: 8px;
  }

  .tool-link { padding: 7px 11px; font-size: 12.5px; }

  .nav-toggle {
    order: 3;
    display: flex;
  }

  .site-nav {
    order: 4;
    flex: 1 1 100%;
    display: none;
    min-width: 0;
  }

  .site-header[data-open] .site-nav { display: block; }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    margin-top: 4px;
    padding-top: 10px;
    border-top: var(--hairline);
  }

  .nav-link {
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    font-size: 16px;
    text-align: left;
  }

  .nav-link[aria-current="page"] {
    padding-left: 26px;
    background: var(--paper);
  }

  .nav-link[aria-current="page"]::after {
    left: 12px;
    margin-left: 0;
    bottom: auto;
    top: 50%;
    width: 4px;
    height: 16px;
    margin-top: -8px;
    border-radius: 2px;
  }
}

@media (max-width: 420px) {
  .tool-link { padding: 7px 10px; font-size: 12px; }
  .brand-mark { width: 30px; height: 30px; font-size: 14px; }
  .brand-name { font-size: 15.5px; }
}

/* ---------- 9. 页脚 ---------- */
.site-footer {
  position: relative;
  z-index: 1;
  margin-top: 88px;
  padding: 60px 0 26px;
  background: var(--ink);
  color: #E8DFCE;
  border-top: 3px solid var(--gold);
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    90deg,
    rgba(252, 250, 244, .06) 0,
    rgba(252, 250, 244, .06) 1px,
    transparent 1px,
    transparent 118px
  );
}

.footer-shell {
  position: relative;
  z-index: 1;
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.55fr);
  gap: 56px;
  align-items: start;
}

/* 品牌列 */
.footer-brand-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.footer-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--gold);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  flex-shrink: 0;
}

.footer-brand-name {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 900;
  letter-spacing: .03em;
  color: var(--snow);
}

.footer-summary {
  margin-top: 18px;
  max-width: 40ch;
  font-size: 14.5px;
  line-height: 1.95;
  color: rgba(252, 250, 244, .72);
}

.footer-flags {
  display: flex;
  gap: 6px;
  margin-top: 26px;
  height: 4px;
}

.footer-flag {
  display: block;
  width: 34px;
  height: 4px;
  border-radius: 2px;
}

.footer-flag:nth-child(1) { background: var(--crimson); }
.footer-flag:nth-child(2) { background: var(--butter); }
.footer-flag:nth-child(3) { background: var(--sky); }
.footer-flag:nth-child(4) { background: var(--barley); }

/* 三栏导航 */
.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}

.footer-col-title {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(252, 250, 244, .14);
}

.footer-links li + li { margin-top: 4px; }

.footer-links a {
  display: inline-block;
  padding: 3px 0;
  font-size: 14.5px;
  line-height: 1.75;
  color: rgba(252, 250, 244, .78);
  border-bottom: 1px solid transparent;
  transition: color .18s ease, border-color .18s ease;
}

.footer-links a:hover {
  color: var(--butter);
  border-bottom-color: rgba(230, 179, 74, .55);
}

/* 联系信息 */
.footer-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 40px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(252, 250, 244, .16);
}

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

.contact-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(192, 149, 63, .95);
}

.contact-value {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(252, 250, 244, .9);
  word-break: break-word;
}

/* 底栏 */
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid rgba(252, 250, 244, .16);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .02em;
  color: rgba(232, 223, 206, .6);
}

.footer-legal { white-space: nowrap; }

.footer-legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}

.footer-legal-links a {
  color: rgba(232, 223, 206, .72);
  border-bottom: 1px solid transparent;
  transition: color .18s ease, border-color .18s ease;
}

.footer-legal-links a:hover {
  color: var(--butter);
  border-bottom-color: rgba(230, 179, 74, .55);
}

.footer-copy { white-space: nowrap; }

/* 页脚响应式 */
@media (max-width: 960px) {
  .site-footer { margin-top: 64px; padding-top: 48px; }
  .footer-top {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }
  .footer-summary { max-width: none; }
}

@media (max-width: 680px) {
  .footer-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px 20px;
  }
  .footer-contact { gap: 14px 28px; margin-top: 36px; }
  .footer-bottom {
    justify-content: flex-start;
    gap: 10px 18px;
  }
}

/* ---------- 10. 通用按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 26px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: .02em;
  white-space: nowrap;
  cursor: pointer;
  transition:
    transform .2s var(--ease),
    background-color .2s ease,
    color .2s ease,
    border-color .2s ease,
    box-shadow .2s ease;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--crimson);
  color: var(--snow);
  box-shadow: 0 12px 26px -18px rgba(169, 52, 38, .95);
}

.btn-primary:hover { background: var(--crimson-deep); }

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

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

.btn-gold {
  background: var(--gold);
  color: var(--ink);
  box-shadow: 0 12px 26px -18px rgba(192, 149, 63, .95);
}

.btn-gold:hover { background: #B0862F; }

.btn-arrow::after {
  content: "→";
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1;
  transition: transform .2s var(--ease);
}

.btn-arrow:hover::after { transform: translateX(4px); }

/* ---------- 11. 面包屑 ---------- */
.breadcrumb { padding: 26px 0 0; }

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

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

.breadcrumb li + li::before {
  content: "/";
  color: var(--line);
  font-family: var(--font-mono);
}

.breadcrumb a {
  color: var(--barley);
  border-bottom: 1px solid transparent;
  transition: color .18s ease, border-color .18s ease;
}

.breadcrumb a:hover {
  color: var(--sky);
  border-bottom-color: rgba(43, 102, 146, .45);
}

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

/* ---------- 12. 正文排版 ---------- */
.prose {
  max-width: 68ch;
  font-size: 17px;
  line-height: 1.95;
  color: var(--ink-soft);
}

.prose > * + * { margin-top: 1.05em; }

.prose h2 {
  margin-top: 1.9em;
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 900;
  letter-spacing: -.006em;
}

.prose h3 {
  margin-top: 1.6em;
  font-size: 19px;
  font-weight: 700;
}

.prose ul { margin: 1em 0; }

.prose li {
  position: relative;
  padding-left: 22px;
  margin: .5em 0;
}

.prose li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .82em;
  width: 9px;
  height: 2px;
  background: var(--gold);
}

.prose a,
.link-underline {
  color: var(--sky);
  border-bottom: 1px solid rgba(43, 102, 146, .38);
  transition: color .18s ease, border-color .18s ease;
}

.prose a:hover,
.link-underline:hover {
  color: var(--crimson);
  border-bottom-color: rgba(169, 52, 38, .55);
}

.prose blockquote {
  padding-left: 20px;
  border-left: 3px solid var(--gold);
  font-family: var(--font-display);
  font-size: 19px;
  line-height: 1.8;
  color: var(--ink);
}

.prose code {
  font-family: var(--font-mono);
  font-size: .92em;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(19, 34, 56, .06);
  color: var(--ink);
}

/* ---------- 13. 面板 / 标签 ---------- */
.panel {
  border: var(--hairline);
  border-radius: var(--radius-card);
  background: var(--snow);
  box-shadow: var(--shadow-soft);
}

.panel-pad { padding: 26px; }

@media (max-width: 640px) {
  .panel-pad { padding: 20px; }
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border: var(--hairline);
  border-radius: var(--radius-pill);
  background: var(--snow);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--barley);
  white-space: nowrap;
}

.tag-gold {
  border-color: rgba(192, 149, 63, .5);
  background: rgba(230, 179, 74, .14);
  color: #8A6820;
}

.tag-sky {
  border-color: rgba(43, 102, 146, .35);
  background: rgba(43, 102, 146, .1);
  color: var(--sky);
}

.tag-jade {
  border-color: rgba(47, 107, 90, .35);
  background: rgba(47, 107, 90, .1);
  color: var(--jade);
}

.tag-crimson {
  border-color: rgba(169, 52, 38, .35);
  background: rgba(169, 52, 38, .1);
  color: var(--crimson);
}

/* ---------- 14. 图片容器（页面阶段放雪山 / 经幡 / 设备 mockup） ---------- */
.media-frame {
  position: relative;
  display: block;
  overflow: hidden;
  width: 100%;
  border: var(--hairline);
  border-radius: var(--radius-card);
  background: var(--snow);
  box-shadow: var(--shadow-soft);
  aspect-ratio: 16 / 9;
}

.media-frame > img,
.media-frame > picture > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

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

/* 叠在图片上的文字底板 */
.media-frame .media-caption {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: rgba(252, 250, 244, .92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink);
}

/* ---------- 15. 滚动显现 / 进度 ---------- */
.reveal-ready [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .38s var(--ease), transform .38s var(--ease);
  will-change: opacity, transform;
}

.reveal-ready [data-reveal].is-visible {
  opacity: 1;
  transform: none;
  will-change: auto;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--crimson), var(--butter) 55%, var(--gold));
  z-index: 120;
  pointer-events: none;
}

/* ---------- 16. 动效偏好 ---------- */
@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;
  }

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

  .btn:hover { transform: none; }
}

/* ---------- 17. 打印 ---------- */
@media print {
  body::before,
  .scroll-progress,
  .site-header::before { display: none; }

  .site-header { position: static; }
  .site-footer { background: none; color: var(--ink); border-top: 1px solid var(--line); }
}
