/* ============================================================
   百老汇牛牛局 · 全站共享样式 /assets/site.css
   1 重置  2 变量  3 基础排版  4 工具层  5 头部  6 页脚
   7 通用组件  8 媒体容器  9 动效  10 响应式
   ============================================================ */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 118px;
}

body,
h1, h2, h3, h4, h5,
p, ul, ol, li, figure, figcaption, blockquote, dl, dd {
  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;
}

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

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

/* ---------- 2 变量 ---------- */
:root {
  /* 品牌色板 */
  --navy: #0A1B33;
  --navy-deep: #071324;
  --gold: #D8A63C;
  --cream: #F5EEE2;
  --ink: #191310;
  --violet: #7C4DDB;
  --coral: #F0654A;
  --slate: #55708C;
  --cool-white: #FBF7F0;
  --gold-light: #F1DCA9;
  --coral-light: #FFD8CD;

  /* 字体 */
  --font-display: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", serif;
  --font-body: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "IBM Plex Mono", "JetBrains Mono", "Cascadia Mono", Menlo, Consolas, monospace;

  /* 尺度与节奏 */
  --shell-max: 1180px;
  --shell-pad: clamp(16px, 4vw, 40px);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --line-gold: rgba(216, 166, 60, 0.26);
  --line-dim: rgba(216, 166, 60, 0.14);

  --shadow-soft: 0 16px 34px -30px rgba(0, 0, 0, 0.9);
  --shadow-lift: 0 30px 60px -34px rgba(0, 0, 0, 0.95);

  --ease-stage: cubic-bezier(0.22, 0.8, 0.2, 1);
}

/* ---------- 3 基础排版 ---------- */
body {
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: clamp(16px, 0.35vw + 15px, 17.5px);
  line-height: 1.85;
  letter-spacing: 0.01em;
  color: var(--cool-white);
  background-color: var(--navy);
  background-image:
    radial-gradient(120% 62% at 84% -12%, rgba(124, 77, 219, 0.22), transparent 62%),
    radial-gradient(96% 54% at -12% 14%, rgba(216, 166, 60, 0.16), transparent 64%),
    linear-gradient(180deg, #0A1B33 0%, #08172B 50%, #061021 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: 0.02em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.4rem, 6vw, 5.2rem); line-height: 1.08; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.6rem); }
h3 { font-size: clamp(1.15rem, 1.8vw, 1.5rem); }
h4 { font-size: 1.02rem; }

p { text-wrap: pretty; }

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

::selection {
  background: rgba(216, 166, 60, 0.35);
  color: var(--cool-white);
}

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

/* ---------- 4 工具层 ---------- */
.shell {
  width: 100%;
  max-width: var(--shell-max);
  margin: 0 auto;
  padding-inline: var(--shell-pad);
}

.section {
  position: relative;
  padding-block: clamp(64px, 9vw, 122px);
}

.section--navy {
  background: linear-gradient(180deg, rgba(7, 19, 36, 0.9), rgba(10, 27, 51, 0.55));
  color: var(--cool-white);
}

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

.section--paper h1,
.section--paper h2,
.section--paper h3,
.section--paper h4 { color: var(--ink); }

.section--paper strong { color: #7A3C12; }

.section--paper .lede { color: rgba(25, 19, 16, 0.74); }

.section--paper .eyebrow { color: #8A5A16; }

.section--paper .chapter-num {
  color: transparent;
  -webkit-text-stroke-color: rgba(25, 19, 16, 0.4);
}

.section--paper .num { color: #8A3B1C; }

.section--paper .rule {
  background: linear-gradient(90deg, rgba(25, 19, 16, 0.28), rgba(25, 19, 16, 0.05) 62%, transparent);
}

.section--paper .card {
  background: #FFFCF5;
  border-color: rgba(25, 19, 16, 0.12);
  box-shadow: 0 18px 36px -32px rgba(25, 19, 16, 0.55);
}

.section--paper .card:hover { border-color: rgba(216, 166, 60, 0.7); }

.section-band {
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--gold) 0%, var(--violet) 56%, var(--coral) 100%);
  opacity: 0.92;
}

.spotlight {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.spotlight::before {
  content: "";
  position: absolute;
  top: -14%;
  left: var(--spot-x, -8%);
  width: min(72vw, 740px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(216, 166, 60, 0.22) 0%, rgba(216, 166, 60, 0.07) 42%, transparent 68%);
  filter: blur(6px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.72em;
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  color: var(--gold);
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent);
}

.display-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 6vw, 5.2rem);
  line-height: 1.08;
  letter-spacing: 0.02em;
}

.lede {
  max-width: 62ch;
  font-size: clamp(1rem, 1.2vw, 1.13rem);
  line-height: 1.9;
  color: rgba(251, 247, 240, 0.75);
}

.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  color: var(--gold-light);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.42em;
  padding: 0.22em 0.72em;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(240, 101, 74, 0.45);
  background: rgba(240, 101, 74, 0.12);
  color: var(--coral-light);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  line-height: 1.7;
}

.section--paper .chip {
  border-color: rgba(240, 101, 74, 0.5);
  background: var(--coral-light);
  color: #8A2E18;
}

.chapter-num {
  display: block;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(3rem, 10vw, 9rem);
  line-height: 0.82;
  letter-spacing: -0.02em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(216, 166, 60, 0.65);
}

.chapter-num--solid {
  color: var(--gold);
  -webkit-text-stroke: 0;
}

.rule {
  height: 1px;
  border: 0;
  background: linear-gradient(90deg, rgba(216, 166, 60, 0.5), rgba(85, 112, 140, 0.28) 60%, transparent);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--stack-gap, 18px);
}

.cluster {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.grid {
  display: grid;
  gap: clamp(18px, 2.6vw, 32px);
}

.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 258px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 208px), 1fr)); }

.prose {
  max-width: 68ch;
}

.prose p { margin-bottom: 1.1em; }

.prose > :last-child { margin-bottom: 0; }

.prose h2,
.prose h3 {
  margin: 1.7em 0 0.6em;
}

.prose ul,
.prose ol {
  margin: 0 0 1.1em;
  padding-left: 1.15em;
}

.prose ul li {
  position: relative;
  padding-left: 0.9em;
}

.prose ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.85em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0.7;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* 面包屑 */
.breadcrumbs {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--slate);
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5em;
}

.breadcrumbs li {
  display: inline-flex;
  align-items: center;
}

.breadcrumbs li::after {
  content: "/";
  margin-left: 0.5em;
  color: rgba(216, 166, 60, 0.5);
}

.breadcrumbs li:last-child::after { display: none; }

.breadcrumbs a {
  color: var(--gold-light);
  transition: color 0.22s var(--ease-stage);
}

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

.section--paper .breadcrumbs { color: rgba(25, 19, 16, 0.6); }
.section--paper .breadcrumbs a { color: #8A5A16; }
.section--paper .breadcrumbs li::after { color: rgba(25, 19, 16, 0.3); }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  padding: 0.78em 1.5em;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  line-height: 1.5;
  cursor: pointer;
  transition: background-color 0.25s var(--ease-stage), color 0.25s var(--ease-stage),
    border-color 0.25s var(--ease-stage), box-shadow 0.25s var(--ease-stage);
}

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

.btn--gold:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
  box-shadow: 0 12px 26px -18px rgba(216, 166, 60, 0.9);
}

.btn--ghost {
  border-color: rgba(216, 166, 60, 0.55);
  color: var(--gold-light);
}

.btn--ghost:hover {
  background: rgba(216, 166, 60, 0.14);
  border-color: var(--gold);
}

.btn--violet {
  border-color: rgba(124, 77, 219, 0.6);
  color: #CDB6FF;
}

.btn--violet:hover {
  background: rgba(124, 77, 219, 0.2);
  border-color: var(--violet);
}

.btn--coral {
  background: var(--coral);
  border-color: var(--coral);
  color: #2A0F09;
}

.btn--coral:hover { background: #FF8168; border-color: #FF8168; }

.section--paper .btn--ghost {
  border-color: rgba(25, 19, 16, 0.3);
  color: #7A3C12;
}

.section--paper .btn--ghost:hover {
  background: rgba(25, 19, 16, 0.06);
  border-color: rgba(25, 19, 16, 0.55);
}

/* 卡片 */
.card {
  position: relative;
  padding: clamp(20px, 2.4vw, 30px);
  border: 1px solid var(--line-gold);
  border-radius: var(--radius-md);
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.012) 58%),
    rgba(8, 22, 42, 0.6);
  box-shadow: var(--shadow-soft);
  transition: border-color 0.3s var(--ease-stage), box-shadow 0.3s var(--ease-stage),
    background-color 0.3s var(--ease-stage);
}

.card:hover {
  border-color: rgba(216, 166, 60, 0.52);
  box-shadow: var(--shadow-lift);
}

.card--paper {
  background: #FFFCF5;
  border-color: rgba(25, 19, 16, 0.12);
  color: var(--ink);
  box-shadow: 0 18px 36px -32px rgba(25, 19, 16, 0.55);
}

.card-index {
  font-family: var(--font-mono);
  font-size: 2.1rem;
  line-height: 1;
  font-weight: 700;
  color: var(--violet);
  letter-spacing: 0.02em;
}

.section--paper .card-index { color: #6A3FC4; }

/* ---------- 5 头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  padding: clamp(10px, 1.5vw, 16px) clamp(12px, 3vw, 28px);
  background: rgba(8, 22, 42, 0.82);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid rgba(216, 166, 60, 0.16);
  transition: padding 0.35s var(--ease-stage), background-color 0.35s var(--ease-stage);
}

.site-header.is-condensed {
  padding-top: clamp(6px, 0.9vw, 10px);
  padding-bottom: clamp(6px, 0.9vw, 10px);
  background: rgba(7, 19, 36, 0.94);
}

.header-shell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(10px, 2vw, 28px);
  max-width: var(--shell-max);
  min-height: 62px;
  margin: 0 auto;
  padding: 6px clamp(12px, 2vw, 20px) 6px clamp(14px, 2vw, 18px);
  border: 1px solid var(--line-gold);
  border-radius: var(--radius-pill);
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0) 56%),
    rgba(6, 17, 33, 0.74);
  box-shadow: var(--shadow-lift);
  transition: min-height 0.35s var(--ease-stage), border-color 0.35s var(--ease-stage);
}

.site-header.is-condensed .header-shell {
  min-height: 52px;
  border-color: rgba(216, 166, 60, 0.44);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.62em;
  flex: 0 0 auto;
  white-space: nowrap;
  color: var(--cool-white);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  color: var(--gold);
  border: 1px solid rgba(216, 166, 60, 0.36);
  background: radial-gradient(circle at 30% 24%, rgba(216, 166, 60, 0.3), rgba(216, 166, 60, 0.05));
  transition: color 0.25s var(--ease-stage), border-color 0.25s var(--ease-stage);
}

.brand:hover .brand-mark {
  color: var(--gold-light);
  border-color: rgba(216, 166, 60, 0.7);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.12;
}

.brand-name {
  font-family: var(--font-display);
  font-size: clamp(1rem, 1.4vw, 1.16rem);
  letter-spacing: 0.06em;
}

.brand-sub {
  font-size: 0.64rem;
  letter-spacing: 0.18em;
  color: rgba(216, 166, 60, 0.85);
}

/* 移动导航按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.55em;
  padding: 0.5em 0.92em;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(216, 166, 60, 0.42);
  color: var(--gold-light);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  cursor: pointer;
  transition: background-color 0.25s var(--ease-stage), border-color 0.25s var(--ease-stage);
}

.nav-toggle:hover { background: rgba(216, 166, 60, 0.12); border-color: var(--gold); }

.nav-toggle-bars {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  width: 16px;
}

.nav-toggle-bars span {
  display: block;
  height: 1.6px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.3s var(--ease-stage), opacity 0.3s var(--ease-stage);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(1) { transform: translateY(4.6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(3) { transform: translateY(-4.6px) rotate(-45deg); }

/* 导航胶囊 */
.site-nav {
  display: flex;
  align-items: center;
  min-width: 0;
}

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

.nav-item { display: flex; }

.nav-link {
  display: inline-block;
  padding: 0.5em 0.92em;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-size: 0.86rem;
  letter-spacing: 0.09em;
  color: rgba(251, 247, 240, 0.76);
  transition: color 0.22s var(--ease-stage), background-color 0.22s var(--ease-stage),
    border-color 0.22s var(--ease-stage);
}

.nav-link:hover {
  color: var(--gold-light);
  background: rgba(216, 166, 60, 0.1);
}

.nav-link[aria-current="page"] {
  color: var(--cool-white);
  background: linear-gradient(120deg, rgba(124, 77, 219, 0.88), rgba(124, 77, 219, 0.46));
  border-color: rgba(216, 166, 60, 0.72);
  box-shadow: inset 0 0 0 1px rgba(216, 166, 60, 0.18);
}

/* 阅读进度 */
.scroll-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--gold), var(--violet) 55%, var(--coral));
  transition: transform 0.12s linear;
  pointer-events: none;
}

/* 跳转链接 */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  padding: 0.7em 1.2em;
  border-radius: var(--radius-pill);
  background: var(--gold);
  color: var(--ink);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  transform: translateY(-180%);
  transition: transform 0.25s var(--ease-stage);
}

.skip-link:focus {
  transform: translateY(0);
}

/* ---------- 6 页脚 ---------- */
.site-footer {
  position: relative;
  padding: clamp(48px, 7vw, 88px) 0 clamp(26px, 4vw, 42px);
  color: rgba(251, 247, 240, 0.78);
  background:
    radial-gradient(80% 90% at 88% 0%, rgba(124, 77, 219, 0.18), transparent 62%),
    radial-gradient(72% 82% at 4% 100%, rgba(216, 166, 60, 0.12), transparent 62%),
    var(--navy-deep);
  border-top: 1px solid rgba(216, 166, 60, 0.22);
}

.footer-shell {
  max-width: var(--shell-max);
  margin: 0 auto;
  padding-inline: var(--shell-pad);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr) minmax(0, 1.2fr);
  gap: clamp(28px, 4vw, 56px);
}

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

.footer-brand {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.2vw, 1.7rem);
  letter-spacing: 0.06em;
  color: var(--gold-light);
  line-height: 1.3;
}

.footer-tagline {
  margin-top: 0.85em;
  max-width: 34ch;
  font-size: 0.88rem;
  line-height: 1.95;
  color: rgba(251, 247, 240, 0.6);
}

.footer-heading {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  margin-bottom: 1.1em;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  color: var(--gold);
}

.footer-heading::after {
  content: "";
  width: 22px;
  height: 1px;
  background: linear-gradient(90deg, rgba(216, 166, 60, 0.8), transparent);
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5em 1em;
}

.footer-links a {
  display: inline-block;
  font-size: 0.9rem;
  color: rgba(251, 247, 240, 0.72);
  border-bottom: 1px solid transparent;
  transition: color 0.22s var(--ease-stage), border-color 0.22s var(--ease-stage);
}

.footer-links a:hover {
  color: var(--gold-light);
  border-bottom-color: rgba(216, 166, 60, 0.5);
}

.footer-contact {
  display: grid;
  gap: 0.9em;
}

.footer-contact li {
  display: grid;
  gap: 0.2em;
}

.footer-label {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  color: rgba(216, 166, 60, 0.82);
}

.footer-value {
  font-size: 0.9rem;
  line-height: 1.75;
  color: rgba(251, 247, 240, 0.86);
  word-break: break-word;
}

.footer-value--num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.03em;
  color: var(--gold-light);
}

.footer-rule {
  height: 1px;
  margin: clamp(32px, 5vw, 52px) 0 clamp(16px, 2.4vw, 26px);
  background: linear-gradient(90deg, var(--gold), rgba(216, 166, 60, 0.22) 46%, rgba(124, 77, 219, 0.45));
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6em 1.6em;
  font-size: 0.78rem;
  color: rgba(251, 247, 240, 0.55);
}

.footer-legal,
.footer-note { letter-spacing: 0.04em; }

.footer-legal [data-year] {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  color: var(--gold-light);
}

/* 返回顶部 */
.to-top {
  position: fixed;
  right: clamp(14px, 3vw, 28px);
  bottom: clamp(14px, 3vw, 28px);
  z-index: 70;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(216, 166, 60, 0.5);
  background: rgba(10, 27, 51, 0.92);
  color: var(--gold-light);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.3s var(--ease-stage), transform 0.3s var(--ease-stage),
    visibility 0.3s var(--ease-stage), border-color 0.3s var(--ease-stage);
}

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

.to-top:hover {
  border-color: var(--gold);
  background: rgba(16, 38, 66, 0.96);
}

/* ---------- 8 媒体容器 ---------- */
.media-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-gold);
  background:
    radial-gradient(130% 96% at 18% 6%, rgba(216, 166, 60, 0.2), transparent 58%),
    radial-gradient(120% 90% at 92% 96%, rgba(124, 77, 219, 0.24), transparent 62%),
    linear-gradient(160deg, #0D2140 0%, #071324 100%);
  box-shadow: var(--shadow-lift);
}

.media-frame--wide { aspect-ratio: 21 / 9; }
.media-frame--tall { aspect-ratio: 3 / 4; }
.media-frame--square { aspect-ratio: 1 / 1; }

.media-frame__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-frame__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.4em 1.2em 0.9em;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: rgba(251, 247, 240, 0.86);
  background: linear-gradient(180deg, transparent, rgba(7, 19, 36, 0.92));
}

/* ---------- 9 动效 ---------- */
html.js-ready [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.62s var(--ease-stage), transform 0.62s var(--ease-stage);
  will-change: opacity, transform;
}

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

/* ---------- 10 响应式 ---------- */
@media (max-width: 1080px) and (min-width: 901px) {
  .nav-link {
    font-size: 0.78rem;
    padding: 0.48em 0.68em;
    letter-spacing: 0.04em;
  }
  .brand-sub { display: none; }
}

@media (max-width: 900px) {
  html { scroll-padding-top: 96px; }

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

  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% - 2px);
    z-index: 90;
    display: block;
    max-height: min(74vh, 520px);
    overflow-y: auto;
    padding: 10px;
    border-radius: 22px;
    border: 1px solid rgba(216, 166, 60, 0.3);
    background: rgba(7, 19, 36, 0.98);
    box-shadow: var(--shadow-lift);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.985);
    transform-origin: top center;
    transition: opacity 0.28s var(--ease-stage), transform 0.28s var(--ease-stage),
      visibility 0.28s var(--ease-stage);
  }

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

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

  .nav-item { display: block; }

  .nav-link {
    display: block;
    padding: 0.72em 1em;
    border-radius: 14px;
    font-size: 0.95rem;
    letter-spacing: 0.06em;
  }

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

  .footer-col--brand { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .brand-sub { display: none; }
  .brand-mark { width: 30px; height: 30px; }

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

  .footer-bottom { justify-content: flex-start; }

  body {
    background-attachment: scroll;
  }
}

@media (max-width: 380px) {
  .footer-links { grid-template-columns: minmax(0, 1fr); }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 150ms !important;
    transition-property: opacity, background-color, color, border-color, box-shadow !important;
  }

  html.js-ready [data-reveal] {
    transform: none !important;
  }

  .scroll-progress { transition: none !important; }
}
