/* ==========================================================================
   120528 宿舍 · 官方（并不）宣传页
   1. 变量与基础   2. 通用组件   3. 导航   4. Hero   5. 滚动标语
   6. 区块       7. 简介卡片   8. 相册   9. 成员卡  10. 公约
   11. 数据      12. 页脚     13. 回顶  14. 灯箱   15. 动效  16. 响应式
   ========================================================================== */

/* ============ 1. 变量与基础 ============ */
:root {
  --paper: #f7f3ea;
  --paper-2: #efe9db;
  --surface: #ffffff;
  --ink: #1c1a16;
  --ink-soft: #4c4739;
  --muted: #7c7566;
  --line: rgba(28, 26, 22, .12);
  --line-strong: rgba(28, 26, 22, .22);
  --dots: rgba(28, 26, 22, .055);
  --accent: #ef5b25;
  --accent-2: #0f8f80;
  --accent-3: #edb301;
  --grad: linear-gradient(115deg, #ef5b25 0%, #e03a68 45%, #7a4dff 100%);
  --nav-bg: rgba(247, 243, 234, .84);
  --shadow-sm: 0 2px 10px rgba(60, 44, 18, .07);
  --shadow: 0 22px 44px -22px rgba(60, 44, 18, .38);
  --radius: 18px;
  --radius-sm: 12px;
}

[data-theme="dark"] {
  --paper: #131110;
  --paper-2: #1a1714;
  --surface: #1f1c18;
  --ink: #f5eee2;
  --ink-soft: #d8d0c2;
  --muted: #9c9385;
  --line: rgba(245, 238, 226, .13);
  --line-strong: rgba(245, 238, 226, .24);
  --dots: rgba(245, 238, 226, .05);
  --accent: #ff7a4d;
  --accent-2: #35c9b4;
  --accent-3: #ffd166;
  --grad: linear-gradient(115deg, #ff7a4d 0%, #ff5d8f 45%, #9d7bff 100%);
  --nav-bg: rgba(19, 17, 16, .82);
  --shadow-sm: 0 2px 12px rgba(0, 0, 0, .5);
  --shadow: 0 26px 50px -24px rgba(0, 0, 0, .8);
}

*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background-color: var(--paper);
  background-image: radial-gradient(var(--dots) 1px, transparent 1px);
  background-size: 24px 24px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .35s ease, color .35s ease;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, figure { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
strong { color: var(--ink); }

::selection { background: var(--accent); color: #fff; }

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

.skip-link {
  position: fixed;
  top: 8px;
  left: 50%;
  z-index: 999;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 14px;
  transform: translate(-50%, -160%);
  transition: transform .25s ease;
}
.skip-link:focus { transform: translate(-50%, 0); }

section[id] { scroll-margin-top: 84px; }

/* ============ 2. 通用组件 ============ */
.container {
  width: 100%;
  max-width: 1140px;
  margin-inline: auto;
  padding-inline: clamp(18px, 4vw, 32px);
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .35s cubic-bezier(.2, .7, .2, 1),
    box-shadow .35s ease, border-color .35s ease;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .01em;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .25s ease,
    background-color .25s ease, border-color .25s ease, color .25s ease;
}
.btn:active { transform: translateY(1px) scale(.99); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 12px 24px -12px rgba(239, 91, 37, .9);
}
.btn-primary:hover { box-shadow: 0 18px 32px -14px rgba(239, 91, 37, .95); transform: translateY(-2px); }

.btn-ghost {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-ghost:hover { border-color: var(--ink); transform: translateY(-2px); }

.chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-soft);
  box-shadow: var(--shadow-sm);
}

/* ============ 3. 导航 ============ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, box-shadow .3s ease;
}
.nav.scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 10px 30px -22px rgba(0, 0, 0, .5);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  max-width: 1140px;
  margin-inline: auto;
  padding: 0 clamp(18px, 4vw, 32px);
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: .04em;
}
.brand .dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(239, 91, 37, .16);
  animation: pulse 2.6s ease-in-out infinite;
}

.nav-links { display: flex; align-items: center; gap: 4px; }

.nav-links a {
  position: relative;
  padding: 8px 13px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-soft);
  transition: color .22s ease, background-color .22s ease;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 3px;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: translateX(-50%);
  transition: width .25s ease;
}
.nav-links a:hover { color: var(--ink); background: rgba(125, 110, 80, .08); }
.nav-links a.active { color: var(--ink); font-weight: 600; }
.nav-links a.active::after { width: 16px; }

.nav-actions { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease, background-color .2s ease;
}
.icon-btn:hover { transform: translateY(-1px); border-color: var(--line-strong); background: var(--paper-2); }

.theme-toggle { font-size: 16px; line-height: 1; }
.theme-icon { display: none; }
[data-theme="light"] .theme-icon.moon { display: inline; }
[data-theme="dark"] .theme-icon.sun { display: inline; }

.nav-toggle { display: none; flex-direction: column; gap: 4px; }
.nav-toggle span {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform .25s ease, opacity .2s ease;
}
.nav.open .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav.open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav.open .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ============ 4. Hero ============ */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(56px, 9vw, 104px) 0 clamp(48px, 7vw, 80px);
  text-align: center;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 52px 52px;
  -webkit-mask-image: radial-gradient(ellipse 70% 62% at 50% 32%, #000 20%, transparent 78%);
  mask-image: radial-gradient(ellipse 70% 62% at 50% 32%, #000 20%, transparent 78%);
  opacity: .85;
}

.hero::after {
  content: "528";
  position: absolute;
  left: 50%;
  bottom: -9%;
  z-index: -1;
  font-size: clamp(150px, 26vw, 380px);
  font-weight: 900;
  line-height: .8;
  letter-spacing: -.04em;
  color: var(--ink);
  opacity: .045;
  transform: translateX(-50%);
  pointer-events: none;
  user-select: none;
}

.glow {
  position: absolute;
  z-index: -1;
  width: 44vw;
  height: 44vw;
  max-width: 520px;
  max-height: 520px;
  border-radius: 50%;
  filter: blur(72px);
  opacity: .32;
  pointer-events: none;
}
.glow-a { top: -12%; left: -8%; background: #ff8a5c; }
.glow-b { right: -10%; bottom: -18%; background: #7a8cff; opacity: .26; }

.hero-inner { position: relative; z-index: 1; }

.hero-deco { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hero-deco .chip {
  position: absolute;
  font-size: 12px;
  animation: float 6s ease-in-out infinite;
}
.chip-1 { top: 20%; left: 6%; transform: rotate(-7deg); }
.chip-2 { top: 13%; right: 8%; transform: rotate(6deg); animation-delay: -1.6s; }
.chip-3 { bottom: 22%; left: 9%; transform: rotate(5deg); animation-delay: -3.2s; }
.chip-4 { bottom: 15%; right: 7%; transform: rotate(-5deg); animation-delay: -4.6s; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-soft);
  box-shadow: var(--shadow-sm);
}
.pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(15, 143, 128, .18);
  animation: pulse 2.2s ease-in-out infinite;
}

.hero h1 {
  margin: 22px auto 18px;
  max-width: 15em;
  font-size: clamp(36px, 6.6vw, 74px);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -.025em;
}

.grad {
  background: var(--grad);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradShift 9s ease-in-out infinite;
}

.hero-sub {
  max-width: 34em;
  margin: 0 auto;
  color: var(--ink-soft);
  font-size: clamp(14.5px, 1.7vw, 17px);
  line-height: 1.9;
}

.clock {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 22px auto 26px;
  font-variant-numeric: tabular-nums;
  font-size: 13.5px;
  color: var(--muted);
}
.clock-main { font-weight: 600; color: var(--ink-soft); letter-spacing: .02em; }
.clock-sub { font-size: 12.5px; opacity: .9; }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.hero-note {
  min-height: 1.7em;
  margin-top: 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}
.hero-note.pop { animation: popUp .38s cubic-bezier(.2, .9, .25, 1.3); }

.shake { animation: shake .42s ease; }

/* ============ 5. 滚动标语 ============ */
.ticker {
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: var(--paper-2);
}
.ticker-track { display: flex; width: max-content; animation: ticker 42s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-group {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 11px 22px;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}
.ticker-group .sep { color: var(--accent); font-size: 10px; }

/* ============ 6. 区块 ============ */
.section { padding-block: clamp(56px, 8.5vw, 104px); }
.section--tint {
  background: var(--paper-2);
  border-block: 1px solid var(--line);
}

.section-head { max-width: 760px; margin-bottom: clamp(32px, 4.5vw, 52px); }
.section-head.center { margin-inline: auto; text-align: center; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .2em;
  color: var(--accent);
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
  opacity: .6;
}
.section-head.center .eyebrow::after {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
  opacity: .6;
}

.section-head h2 {
  margin: 10px 0 14px;
  font-size: clamp(26px, 3.6vw, 38px);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.25;
}

.h2-note {
  display: inline-block;
  margin-left: 6px;
  font-size: .5em;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0;
  transform: translateY(-.15em);
}

.lead {
  color: var(--ink-soft);
  font-size: clamp(14.5px, 1.55vw, 16.5px);
  line-height: 1.9;
}
.lead.center { margin-inline: auto; max-width: 40em; }

.chip-rate {
  display: inline-block;
  padding: 1px 9px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: .86em;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  transform: translateY(-.08em);
}

/* ============ 7. 简介卡片 ============ */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(238px, 1fr));
  gap: 16px;
}

.info-card { padding: 24px 22px 26px; }
.info-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: var(--line-strong); }

.info-card .icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 14px;
  border-radius: 13px;
  background: linear-gradient(140deg, rgba(239, 91, 37, .16), rgba(122, 77, 255, .14));
  font-size: 21px;
}
.info-card h3 { margin-bottom: 8px; font-size: 16px; font-weight: 700; }
.info-card p { color: var(--muted); font-size: 14px; line-height: 1.8; }

/* ============ 8. 相册 ============ */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: clamp(28px, 4vw, 44px);
}

.photo-frame {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, var(--paper-2), var(--surface));
  border: 1px solid var(--line);
  aspect-ratio: 4 / 3;
  cursor: zoom-in;
}
.gallery .photo-frame { box-shadow: var(--shadow-sm); }

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s cubic-bezier(.2, .7, .2, 1), opacity .3s ease;
}
.photo-frame:hover img { transform: scale(1.06); }

.photo-frame::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 42%;
  background: linear-gradient(to top, rgba(12, 10, 8, .55), transparent);
  opacity: .8;
  pointer-events: none;
  transition: opacity .3s ease;
}
.photo-frame:hover::after { opacity: 1; }

.photo-file {
  position: absolute;
  left: 12px;
  bottom: 10px;
  z-index: 1;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(12, 10, 8, .5);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #f3ece0;
  font-size: 11px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .02em;
}

.photo-broken {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 16px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  background: repeating-linear-gradient(45deg, transparent, transparent 10px, var(--dots) 10px, var(--dots) 20px);
}
.photo-broken b { color: var(--ink-soft); font-weight: 700; }

.img-missing img { opacity: 0; }
.img-missing .photo-broken { display: flex; }
.img-missing::after { display: none; }

/* ============ 9. 成员卡 ============ */
.members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(292px, 1fr));
  gap: 22px;
}

.member { overflow: hidden; display: flex; flex-direction: column; }
.member:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: var(--line-strong); }

.member-photo {
  aspect-ratio: 4 / 5;
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid var(--line);
}

.member-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 20px 22px 24px;
}

.member-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.member-head h3 { font-size: 19px; font-weight: 800; letter-spacing: -.01em; }

.tag {
  flex: none;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(15, 143, 128, .12);
  border: 1px solid rgba(15, 143, 128, .25);
  color: var(--accent-2);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.member-desc {
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.85;
}

.member-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}
.member-meta li {
  padding: 2px 9px;
  border: 1px dashed var(--line-strong);
  border-radius: 7px;
  font-size: 11.5px;
  color: var(--muted);
}

.attrs {
  display: grid;
  gap: 11px;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px dashed var(--line);
}
.attr {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 4px 10px;
}
.attr-name { font-size: 12.5px; color: var(--muted); }
.attr-val {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.bar {
  grid-column: 1 / -1;
  height: 7px;
  border-radius: 999px;
  background: var(--paper-2);
  overflow: hidden;
}
.bar i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--grad);
  transition: width 1s cubic-bezier(.22, .72, .2, 1);
}
.member.is-visible .bar i { width: var(--v); }
.member.is-visible .attr:nth-child(2) .bar i { transition-delay: .1s; }
.member.is-visible .attr:nth-child(3) .bar i { transition-delay: .2s; }

/* ============ 10. 宿舍公约 ============ */
.rule-list {
  counter-reset: rule;
  display: grid;
  gap: 12px;
  max-width: 860px;
  margin-inline: auto;
}

.rule-list li {
  counter-increment: rule;
  display: grid;
  grid-template-columns: 54px 1fr;
  align-items: start;
  gap: 14px;
  padding: 18px 22px 18px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 15px;
  transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease;
}
.rule-list li::before {
  content: counter(rule, decimal-leading-zero);
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(140deg, rgba(239, 91, 37, .16), rgba(122, 77, 255, .1));
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
}
.rule-list li:hover {
  transform: translateX(4px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}
.rule-text { font-size: 15px; line-height: 1.75; padding-top: 4px; color: var(--ink-soft); }

/* ============ 11. 数据 ============ */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(196px, 1fr));
  gap: 16px;
}

.stat {
  position: relative;
  overflow: hidden;
  padding: 26px 20px 20px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.stat::before {
  content: "";
  position: absolute;
  top: -46px;
  right: -46px;
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(239, 91, 37, .18), transparent 70%);
  pointer-events: none;
}
.stat:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line-strong); }

.num {
  display: inline-block;
  font-size: clamp(32px, 4.2vw, 44px);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.label { margin-top: 6px; font-size: 13.5px; font-weight: 600; color: var(--ink-soft); }
.stat-note { margin-top: 10px; font-size: 11.5px; line-height: 1.6; color: var(--muted); opacity: .85; }

/* ============ 12. 页脚 ============ */
.footer {
  padding: clamp(36px, 5vw, 54px) 0 clamp(30px, 4vw, 44px);
  border-top: 1px solid var(--line);
  background: var(--paper);
  text-align: center;
}
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 10px; }

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .04em;
}
.footer-brand .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }

.footer p { color: var(--muted); font-size: 13.5px; }
.footer-tip { font-size: 12.5px !important; opacity: .9; }
.footer code {
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11.5px;
  color: var(--ink-soft);
}
.footer-fine { font-size: 12px !important; opacity: .75; }

/* ============ 13. 回到顶部 ============ */
.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-size: 18px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  box-shadow: 0 10px 26px -12px rgba(0, 0, 0, .6);
  transition: opacity .3s ease, transform .3s ease, visibility .3s;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { transform: translateY(-2px); }

/* ============ 14. 灯箱 ============ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 48px);
  background: rgba(12, 10, 9, .88);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .28s ease, visibility .28s;
}
.lightbox.open { opacity: 1; visibility: visible; }

.lb-figure {
  max-width: min(1000px, 94vw);
  text-align: center;
}
.lb-figure img {
  max-width: 100%;
  max-height: 76vh;
  margin-inline: auto;
  border-radius: 14px;
  box-shadow: 0 34px 80px rgba(0, 0, 0, .6);
  transform: scale(.97);
  transition: transform .3s cubic-bezier(.2, .7, .2, 1);
}
.lightbox.open .lb-figure img { transform: scale(1); }

.lb-figure figcaption {
  margin-top: 16px;
  color: #e9e0d2;
  font-size: 14px;
  letter-spacing: .01em;
}

.lb-btn {
  position: absolute;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  color: #f4ecdf;
  font-size: 18px;
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, transform .2s ease;
}
.lb-btn:hover { background: rgba(255, 255, 255, .18); border-color: rgba(255, 255, 255, .45); }
.lb-close { top: 18px; right: 18px; }
.lb-prev, .lb-next { top: 50%; margin-top: -22px; font-size: 26px; line-height: 1; }
.lb-prev { left: 14px; }
.lb-next { right: 14px; }

/* ============ 15. 动效 ============ */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .62s ease, transform .62s cubic-bezier(.2, .7, .2, 1);
}
.js [data-reveal].is-visible { opacity: 1; transform: none; }

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .55; transform: scale(.86); }
}
@keyframes gradShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@keyframes float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -9px; }
}
@keyframes popUp {
  from { opacity: 0; transform: translateY(6px) scale(.98); }
  to { opacity: 1; transform: none; }
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-5px) rotate(-1deg); }
  45% { transform: translateX(5px) rotate(1deg); }
  70% { transform: translateX(-3px); }
  85% { transform: translateX(2px); }
}

/* ============ 16. 响应式 ============ */
@media (max-width: 900px) {
  .hero-deco { display: none; }
}

@media (max-width: 820px) {
  .nav-inner { height: 58px; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px 16px 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px -30px rgba(0, 0, 0, .6);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .22s ease, transform .22s ease, visibility .22s;
  }
  .nav.open .nav-links { opacity: 1; visibility: visible; transform: none; }
  .nav-links a { padding: 12px 10px; border-radius: 10px; font-size: 15px; }
  .nav-links a::after { display: none; }
  .nav-toggle { display: inline-flex; }
  section[id] { scroll-margin-top: 74px; }

  .gallery { grid-template-columns: repeat(2, 1fr); }
  .gallery .photo-frame:first-child { grid-column: 1 / -1; aspect-ratio: 16 / 9; }

  .members-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
  .stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .brand { font-size: 16px; }
  .hero { padding-top: 40px; }
  .hero h1 { font-size: clamp(32px, 9.4vw, 44px); }
  .badge { font-size: 11.5px; padding: 6px 12px; }
  .clock { font-size: 12.5px; }
  .btn { padding: 12px 22px; font-size: 14.5px; }

  .gallery { grid-template-columns: 1fr; }
  .gallery .photo-frame:first-child { aspect-ratio: 4 / 3; }

  .rule-list li { grid-template-columns: 42px 1fr; padding: 16px 16px 16px 14px; gap: 10px; }
  .rule-list li::before { width: 30px; height: 30px; font-size: 12px; }
  .rule-text { font-size: 14px; }

  .stats { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat { padding: 20px 14px 16px; }

  .member-photo { aspect-ratio: 1 / 1; }

  .lb-prev { left: 8px; }
  .lb-next { right: 8px; }
  .to-top { right: 14px; bottom: 14px; }
}

@media (max-width: 380px) {
  .stats { grid-template-columns: 1fr; }
}

/* 系统开启「减少动态效果」时，一切归位 */
@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; }
  .ticker-track { animation: none; }
}

/* 打印版：别再甩动画给纸 */
@media print {
  .nav, .to-top, .ticker, .lightbox, .hero-deco, .glow { display: none !important; }
  body { background: #fff; color: #000; }
  .section { padding-block: 20px; break-inside: avoid; }
  .member, .stat, .rule-list li { break-inside: avoid; box-shadow: none; }
}
