/* ==========================================================================
   188金宝搏手机版 · 共享样式 /assets/site.css
   奶油纸白底 + 深墨黑分区 + 暖金锚点，锐利直角与 1px 细线
   ========================================================================== */

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

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

body,
h1, h2, h3, h4, h5, h6,
p, ul, ol, li, dl, dd, dt,
figure, figcaption, blockquote {
  margin: 0;
  padding: 0;
}

ul, ol { 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; }

/* ---------- 2. 变量 ---------- */
:root {
  /* 色彩令牌 */
  --ink-900: #0B0C0E;
  --ink-700: #1C1F24;
  --paper-50: #F6F1E6;
  --paper-200: #E9E1D0;
  --gold-600: #C08A2E;
  --gold-300: #F0C462;
  --green-500: #4FAF63;
  --blue-500: #2A5BE0;
  --rust-500: #B3442C;
  --gray-400: #7C8087;

  /* 文字透明度层 */
  --ink-text: #0B0C0E;
  --ink-muted: rgba(11, 12, 14, 0.68);
  --ink-faint: rgba(11, 12, 14, 0.45);
  --paper-text: #F6F1E6;
  --paper-muted: rgba(246, 241, 230, 0.7);
  --paper-faint: rgba(246, 241, 230, 0.45);
  --line-light: rgba(11, 12, 14, 0.14);
  --line-dark: rgba(246, 241, 230, 0.14);

  /* 字体 */
  --font-display: "Source Han Sans Heavy", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-serif: "Source Han Serif SC", "Noto Serif SC", "Songti SC", Georgia, serif;
  --font-body: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --font-num: ui-monospace, "SF Mono", "Menlo", "Consolas", Georgia, serif;

  /* 字号阶梯 12 / 14 / 17 / 22 / 32 / 48 / 72 / 96 */
  --fs-12: 12px;
  --fs-14: 14px;
  --fs-17: 17px;
  --fs-22: 22px;
  --fs-32: clamp(24px, 2.4vw, 32px);
  --fs-48: clamp(30px, 3.8vw, 48px);
  --fs-72: clamp(38px, 5.8vw, 72px);
  --fs-96: clamp(46px, 8.4vw, 96px);

  /* 节奏 */
  --gap-block: clamp(64px, 8vw, 128px);
  --gap-tight: clamp(40px, 5vw, 72px);
  --pad-side: clamp(16px, 4vw, 40px);
  --radius-pill: 999px;

  /* 缓动 */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- 3. 中文排版基座 ---------- */
body {
  font-family: var(--font-body);
  font-size: var(--fs-17);
  line-height: 1.75;
  color: var(--ink-text);
  background-color: var(--paper-50);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: 0.01em;
}

p { overflow-wrap: break-word; }

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

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

.site-footer :focus-visible,
.capsule :focus-visible,
.brand:focus-visible,
.nav-toggle:focus-visible,
.tool-search:focus-visible {
  outline-color: var(--gold-300);
}

/* 主内容锚点偏移，避免被固定头部遮挡 */
#main-content {
  display: block;
  padding-top: clamp(84px, 9vw, 104px);
  scroll-margin-top: 110px;
}

/* ---------- 4. 布局容器与网格 ---------- */
.wrap {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding-left: var(--pad-side);
  padding-right: var(--pad-side);
}

.section { padding: var(--gap-block) 0; }
.section--tight { padding: var(--gap-tight) 0; }
.section--paper { background: var(--paper-200); }

.section--ink {
  background: var(--ink-900);
  color: var(--paper-text);
}

.grid {
  display: grid;
  gap: clamp(16px, 2.4vw, 28px);
}

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

.divider {
  height: 1px;
  border: 0;
  background: var(--line-light);
}

.on-ink .divider,
.section--ink .divider {
  background: var(--line-dark);
}

/* ---------- 5. 文字组件 ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-serif);
  font-size: var(--fs-12);
  letter-spacing: 0.22em;
  color: var(--gold-600);
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
}

.h-display {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: var(--fs-96);
  line-height: 1.04;
  letter-spacing: -0.01em;
}

.h1 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: var(--fs-48);
  line-height: 1.14;
}

.h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--fs-32);
  line-height: 1.24;
}

.h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--fs-22);
  line-height: 1.3;
}

.lede {
  font-size: var(--fs-17);
  line-height: 1.8;
  color: var(--ink-muted);
  max-width: 62ch;
}

.muted { color: var(--ink-muted); }

.on-ink .lede,
.section--ink .lede { color: var(--paper-muted); }

.on-ink .muted,
.section--ink .muted { color: var(--paper-muted); }

.on-ink .eyebrow,
.section--ink .eyebrow { color: var(--gold-300); }

.prose {
  max-width: 68ch;
  font-size: var(--fs-17);
  line-height: 1.8;
  color: var(--ink-muted);
  text-align: justify;
  text-justify: inter-ideograph;
}

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

.prose h2 {
  font-size: var(--fs-22);
  color: var(--ink-text);
  margin-top: 2em;
  padding-top: 0.2em;
}

.prose h3 {
  font-size: var(--fs-17);
  color: var(--ink-text);
  margin-top: 1.6em;
}

.prose a {
  color: var(--blue-500);
  border-bottom: 1px solid rgba(42, 91, 224, 0.35);
}

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

.on-ink .prose,
.section--ink .prose { color: var(--paper-muted); }

.on-ink .prose h2,
.on-ink .prose h3,
.on-ink .prose strong,
.section--ink .prose h2,
.section--ink .prose h3,
.section--ink .prose strong { color: var(--paper-text); }

/* ---------- 6. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-size: var(--fs-14);
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
  transition:
    transform 0.24s var(--ease-out),
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.24s var(--ease-out);
}

.btn--gold {
  background: var(--gold-600);
  color: var(--ink-900);
  box-shadow: 0 0 0 1px rgba(240, 196, 98, 0.55);
}

.btn--gold:hover {
  background: var(--gold-300);
  transform: translateY(-2px);
  box-shadow: 0 10px 26px -12px rgba(192, 138, 46, 0.85);
}

.btn--ink {
  background: var(--ink-900);
  color: var(--paper-text);
}

.btn--ink:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px -14px rgba(11, 12, 14, 0.8);
}

.btn--ghost {
  background: transparent;
  border-color: rgba(11, 12, 14, 0.28);
  color: var(--ink-900);
}

.btn--ghost:hover {
  border-color: var(--gold-600);
  color: var(--gold-600);
  transform: translateY(-2px);
}

/* ---------- 7. 头部 ---------- */
.skip-link {
  position: absolute;
  left: 50%;
  top: -120px;
  transform: translateX(-50%);
  z-index: 200;
  padding: 11px 22px;
  border-radius: 0 0 12px 12px;
  background: var(--gold-600);
  color: var(--ink-900);
  font-size: var(--fs-14);
  font-weight: 700;
  letter-spacing: 0.06em;
  transition: top 0.24s var(--ease-out);
}

.skip-link:focus { top: 0; outline: none; }

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 80;
  padding: clamp(12px, 1.6vw, 20px) var(--pad-side);
  pointer-events: none;
  transition: padding 0.32s var(--ease-out);
}

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

.site-header__rail {
  position: relative;
  pointer-events: auto;
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(10px, 1.6vw, 22px);
}

/* 品牌回声章 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 12px;
  border: 1px solid rgba(240, 196, 98, 0.28);
  border-radius: var(--radius-pill);
  background: var(--ink-900);
  color: var(--paper-text);
  transition: border-color 0.24s ease, transform 0.24s var(--ease-out);
}

.brand:hover { border-color: rgba(240, 196, 98, 0.65); }

.brand__glyph {
  position: relative;
  flex: none;
  width: 20px;
  height: 20px;
}

.brand__core {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: var(--gold-300);
}

.brand__ripple {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid var(--gold-300);
  transform: scale(0.32);
  opacity: 0;
  animation: brand-echo 3.2s var(--ease-out) infinite;
}

.brand__ripple:nth-child(2) { animation-delay: 0.8s; }
.brand__ripple:nth-child(3) { animation-delay: 1.6s; }

@keyframes brand-echo {
  0%   { transform: scale(0.3); opacity: 0.85; }
  70%  { opacity: 0.12; }
  100% { transform: scale(1); opacity: 0; }
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.brand__slogan {
  font-family: var(--font-serif);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: rgba(246, 241, 230, 0.6);
  max-height: 18px;
  overflow: hidden;
  transition: opacity 0.26s ease, max-height 0.3s var(--ease-out);
}

/* 悬浮胶囊导航 */
.capsule {
  justify-self: center;
  padding: 5px;
  border: 1px solid rgba(240, 196, 98, 0.22);
  border-radius: var(--radius-pill);
  background: rgba(11, 12, 14, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: padding 0.3s var(--ease-out), background-color 0.3s ease;
}

.capsule__list {
  display: flex;
  align-items: center;
  gap: 2px;
}

.capsule__item { display: flex; }

.capsule__link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 15px;
  border-radius: var(--radius-pill);
  font-size: var(--fs-14);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(246, 241, 230, 0.72);
  white-space: nowrap;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.capsule__link:hover {
  color: var(--gold-300);
  background: rgba(240, 196, 98, 0.1);
}

.capsule__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold-300);
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.2s ease, transform 0.2s var(--ease-out);
}

.capsule__link[aria-current="page"] {
  color: var(--gold-300);
  background: rgba(240, 196, 98, 0.12);
}

.capsule__link[aria-current="page"] .capsule__dot {
  opacity: 1;
  transform: scale(1);
}

/* 右侧工具区 */
.header__tools {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tool-search {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(240, 196, 98, 0.25);
  border-radius: 50%;
  background: var(--ink-900);
  color: var(--paper-text);
  transition: color 0.2s ease, transform 0.24s var(--ease-out), border-color 0.2s ease;
}

.tool-search:hover {
  color: var(--gold-300);
  border-color: rgba(240, 196, 98, 0.6);
  transform: translateY(-2px);
}

.tool-search__icon {
  position: relative;
  width: 13px;
  height: 13px;
  border: 1.6px solid currentColor;
  border-radius: 50%;
}

.tool-search__icon::after {
  content: "";
  position: absolute;
  right: -4px;
  bottom: -3px;
  width: 6px;
  height: 1.6px;
  border-radius: 2px;
  background: currentColor;
  transform: rotate(45deg);
}

.nav-toggle {
  display: none;
  position: relative;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(240, 196, 98, 0.25);
  border-radius: 50%;
  background: var(--ink-900);
}

.nav-toggle__bar {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 1.6px;
  border-radius: 2px;
  background: var(--paper-text);
  transition: transform 0.28s var(--ease-out), opacity 0.2s ease;
}

.nav-toggle__bar:nth-child(1) { transform: translate(-50%, -5px); }
.nav-toggle__bar:nth-child(2) { transform: translate(-50%, 0); }
.nav-toggle__bar:nth-child(3) { transform: translate(-50%, 5px); }

.site-header[data-open="true"] .nav-toggle__bar:nth-child(1) { transform: translate(-50%, 0) rotate(45deg); }
.site-header[data-open="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
.site-header[data-open="true"] .nav-toggle__bar:nth-child(3) { transform: translate(-50%, 0) rotate(-45deg); }

/* 滚动收窄态 */
.site-header.is-condensed { padding-top: 8px; padding-bottom: 8px; }

.site-header.is-condensed .brand__slogan {
  opacity: 0;
  max-height: 0;
}

.site-header.is-condensed .capsule { padding: 3px; }

.site-header.is-condensed .capsule__link { padding: 7px 13px; }

/* ---------- 8. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(64px, 8vw, 120px);
  background: var(--ink-900);
  color: var(--paper-muted);
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(240, 196, 98, 0.55), transparent);
}

.site-footer::after {
  content: "";
  position: absolute;
  right: -140px;
  top: -140px;
  width: 440px;
  height: 440px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240, 196, 98, 0.1), transparent 62%);
  pointer-events: none;
}

.footer__grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.25fr;
  gap: clamp(28px, 4vw, 56px);
  padding: clamp(48px, 6vw, 80px) 0 clamp(32px, 4vw, 48px);
}

.footer__col { min-width: 0; }

.footer__brandcol {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.brand--footer {
  background: transparent;
  border-color: rgba(240, 196, 98, 0.32);
}

.brand--footer:hover { border-color: rgba(240, 196, 98, 0.7); }

.footer__slogan {
  margin-top: 18px;
  font-family: var(--font-serif);
  font-size: 13px;
  letter-spacing: 0.16em;
  color: var(--gold-300);
}

.footer__version {
  margin-top: 10px;
  font-family: var(--font-num);
  font-size: var(--fs-12);
  letter-spacing: 0.14em;
  color: var(--paper-faint);
}

.footer__title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-family: var(--font-display);
  font-size: var(--fs-12);
  font-weight: 800;
  letter-spacing: 0.2em;
  color: var(--gold-300);
}

.footer__title::before {
  content: "";
  width: 14px;
  height: 1px;
  background: var(--gold-600);
}

.footer__list { display: flex; flex-direction: column; }

.footer__link {
  display: inline-block;
  padding: 5px 0;
  font-size: var(--fs-14);
  color: var(--paper-muted);
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.22s var(--ease-out);
}

.footer__link:hover {
  color: var(--gold-300);
  border-color: rgba(240, 196, 98, 0.45);
  transform: translateX(3px);
}

.footer__contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  column-gap: 10px;
  row-gap: 4px;
  padding: 7px 0;
}

.footer__contactkey {
  grid-column: 1 / -1;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--paper-faint);
}

.footer__contactval {
  font-family: var(--font-num);
  font-size: 13px;
  line-height: 1.6;
  color: rgba(246, 241, 230, 0.85);
  overflow-wrap: anywhere;
}

.copy-btn {
  padding: 3px 10px;
  border: 1px solid rgba(240, 196, 98, 0.35);
  border-radius: var(--radius-pill);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--gold-300);
  white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.copy-btn:hover { background: rgba(240, 196, 98, 0.14); }

.copy-btn.is-done {
  background: var(--green-500);
  border-color: var(--green-500);
  color: var(--ink-900);
}

.footer__addr {
  padding: 8px 0 0;
  max-width: 22em;
  font-size: 13px;
  line-height: 1.7;
  color: rgba(246, 241, 230, 0.6);
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
  padding: 20px 0 28px;
  border-top: 1px solid var(--line-dark);
  font-size: var(--fs-12);
  letter-spacing: 0.06em;
  color: var(--paper-faint);
}

.footer__icp { font-family: var(--font-num); }
.footer__note { color: rgba(246, 241, 230, 0.4); }
.footer__copy { margin-left: auto; }

/* ---------- 9. 面包屑 ---------- */
.breadcrumb {
  padding-top: 18px;
  font-size: var(--fs-12);
  letter-spacing: 0.08em;
  color: var(--gray-400);
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

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

.breadcrumb li + li::before {
  content: "/";
  color: rgba(124, 128, 135, 0.6);
}

.breadcrumb a {
  color: var(--gray-400);
  transition: color 0.2s ease;
}

.breadcrumb a:hover { color: var(--gold-600); }

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

/* ---------- 10. 档案卡 ---------- */
.card {
  position: relative;
  padding: clamp(20px, 2.4vw, 30px);
  border: 1px solid var(--line-light);
  background: var(--paper-50);
  transition:
    transform 0.28s var(--ease-out),
    border-color 0.28s ease,
    box-shadow 0.28s var(--ease-out);
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(192, 138, 46, 0.65);
  box-shadow:
    0 20px 42px -26px rgba(11, 12, 14, 0.55),
    0 0 0 1px rgba(192, 138, 46, 0.2);
}

.card__label {
  position: absolute;
  top: 0;
  left: 0;
  transform: translateY(-50%);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: var(--ink-900);
  color: var(--gold-300);
  font-size: 11px;
  letter-spacing: 0.16em;
  white-space: nowrap;
}

.card__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--fs-22);
  line-height: 1.3;
}

.card__body {
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink-muted);
}

.card__meta {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-12);
  letter-spacing: 0.08em;
  color: var(--gray-400);
}

.on-ink .card,
.section--ink .card {
  background: var(--ink-700);
  border-color: var(--line-dark);
  color: var(--paper-text);
}

.on-ink .card__body,
.section--ink .card__body { color: var(--paper-muted); }

.on-ink .card__meta,
.section--ink .card__meta { color: var(--paper-faint); }

.on-ink .card__label,
.section--ink .card__label {
  background: var(--gold-600);
  color: var(--ink-900);
}

/* ---------- 11. 分类标签 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border: 1px solid rgba(11, 12, 14, 0.2);
  border-radius: var(--radius-pill);
  font-size: var(--fs-12);
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--ink-700);
  background: transparent;
}

.tag--gold {
  background: rgba(240, 196, 98, 0.28);
  border-color: rgba(192, 138, 46, 0.55);
  color: var(--ink-900);
}

.tag--green {
  background: var(--green-500);
  border-color: transparent;
  color: var(--ink-900);
}

.tag--blue {
  background: var(--blue-500);
  border-color: transparent;
  color: var(--paper-50);
}

.tag--rust {
  background: var(--rust-500);
  border-color: transparent;
  color: var(--paper-50);
}

.tag--ink {
  background: var(--ink-900);
  border-color: transparent;
  color: var(--gold-300);
}

/* ---------- 12. 图片容器基础规则 ---------- */
.figure { display: block; }

.figure__frame {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid var(--line-light);
  background-color: var(--paper-200);
  background-image:
    repeating-linear-gradient(0deg, rgba(11, 12, 14, 0.05) 0 1px, transparent 1px 28px),
    repeating-linear-gradient(90deg, rgba(11, 12, 14, 0.05) 0 1px, transparent 1px 28px);
}

.figure__frame::after {
  content: "";
  display: block;
  padding-top: 62.5%;
}

.figure--wide .figure__frame::after { padding-top: 42%; }
.figure--square .figure__frame::after { padding-top: 100%; }

.figure__frame > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.figure__caption {
  margin-top: 12px;
  font-family: var(--font-serif);
  font-size: var(--fs-12);
  letter-spacing: 0.14em;
  color: var(--gray-400);
}

.on-ink .figure__frame,
.section--ink .figure__frame {
  border-color: var(--line-dark);
  background-color: var(--ink-700);
  background-image:
    repeating-linear-gradient(0deg, rgba(246, 241, 230, 0.06) 0 1px, transparent 1px 28px),
    repeating-linear-gradient(90deg, rgba(246, 241, 230, 0.06) 0 1px, transparent 1px 28px);
}

.on-ink .figure__caption,
.section--ink .figure__caption { color: var(--paper-faint); }

/* ---------- 13. 滚动动效 ---------- */
.reveal { opacity: 1; transform: none; }

html.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}

html.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

/* ---------- 14. 回到顶部 ---------- */
.to-top {
  position: fixed;
  right: clamp(16px, 3vw, 30px);
  bottom: clamp(16px, 3vw, 30px);
  z-index: 70;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(240, 196, 98, 0.35);
  border-radius: 50%;
  background: var(--ink-900);
  color: var(--gold-300);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease,
    transform 0.3s var(--ease-out),
    background-color 0.2s ease;
}

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.to-top:hover { background: var(--ink-700); }

.to-top__arrow {
  width: 9px;
  height: 9px;
  border-left: 1.8px solid currentColor;
  border-top: 1.8px solid currentColor;
  transform: rotate(45deg) translate(2px, 2px);
}

/* ---------- 15. 响应式 ---------- */
@media (max-width: 1080px) {
  .capsule__link { padding: 9px 12px; font-size: 13px; }
}

@media (max-width: 900px) {
  .site-header__rail {
    grid-template-columns: auto auto;
    justify-content: space-between;
  }

  .nav-toggle { display: block; }

  .capsule {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    max-width: 440px;
    margin: 0 auto;
    padding: 10px;
    border-radius: 22px;
    display: none;
  }

  .site-header[data-open="true"] .capsule { display: block; }

  .capsule__list {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  .capsule__link {
    justify-content: flex-start;
    padding: 13px 16px;
    border-radius: 14px;
    font-size: 15px;
  }

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

  .grid--7-5,
  .grid--5-7,
  .grid--8-4 { grid-template-columns: 1fr; }

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

@media (max-width: 620px) {
  .header__tools .tool-search { display: none; }

  .btn { padding: 9px 15px; font-size: 13px; }

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

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

  .footer__copy { margin-left: 0; }
}

@media (max-width: 420px) {
  .brand__slogan { display: none; }
  .brand__name { font-size: 14px; }
  .btn--gold { padding: 8px 12px; font-size: 12px; }
}

/* ---------- 16. 动效降级 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

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

  html.js .reveal {
    opacity: 1;
    transform: none;
  }

  .brand__ripple { display: none; }
  .card:hover { transform: none; }
  .btn:hover { transform: none; }
  .to-top { transform: none; }
}
