/* ==========================================================================
   纯熙艺术 CHUNXI ART — 官方门户首页
   配色取自品牌 logo：暗红双弧 / 红蓝双圆 / 橙色中文
   ========================================================================== */

/* ---------- 1. 设计变量 ---------- */
:root {
  --maroon: #8b1e1e;
  --maroon-dark: #6d1313;
  --red: #e63329;
  --blue: #1e7be8;
  --orange: #f2a03d;
  --orange-soft: #fdf1e2;

  --ink: #221f1e;
  --ink-2: #5a5451;
  --ink-3: #8b8380;
  --line: #e8e1db;
  --bg: #f9f7f8;
  --paper: #ffffff;
  /* logo.jpg 自带的底色。页面底色、头部、页脚 logo 底板统一到它，
     否则不透明的 JPEG 四周会露出可见色块。 */
  --logo-bg: #f9f7f8;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;

  --shadow-sm: 0 1px 2px rgba(34, 31, 30, 0.05), 0 2px 8px rgba(34, 31, 30, 0.05);
  --shadow-md: 0 6px 20px rgba(34, 31, 30, 0.08), 0 2px 6px rgba(34, 31, 30, 0.05);
  --shadow-lg: 0 20px 48px rgba(34, 31, 30, 0.14);

  --header-h: 72px;
  --container: 1200px;
  --hero-interval: 5000ms;

  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC",
    "Source Han Sans SC", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Songti SC", "STSong", "SimSun", "Noto Serif SC", Georgia, serif;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- 2. 基础重置 ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: 0.01em;
  overflow-x: hidden;
}

h1,
h2,
h3,
p,
ul,
figure {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}

[hidden] {
  display: none !important;
}

/* ---------- 3. 通用工具类 ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -60px;
  left: 16px;
  z-index: 100;
  padding: 10px 18px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  background: var(--maroon);
  color: #fff;
  transition: top 0.2s var(--ease);
}

.skip-link:focus {
  top: 0;
}

.btn {
  --btn-bg: var(--maroon);
  --btn-fg: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 26px;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease),
    background-color 0.2s var(--ease), color 0.2s var(--ease);
}

.btn--sm {
  min-height: 40px;
  padding: 0 20px;
  font-size: 14px;
}

.btn--primary {
  box-shadow: 0 8px 20px rgba(139, 30, 30, 0.24);
}

.btn--primary:hover {
  background: var(--maroon-dark);
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(139, 30, 30, 0.3);
}

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--maroon);
  border: 1.5px solid rgba(139, 30, 30, 0.35);
}

.btn--ghost:hover {
  --btn-bg: rgba(139, 30, 30, 0.06);
  border-color: var(--maroon);
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

/* ---------- 4. 顶部导航 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  /* 必须不透明：半透明会让头部取到下方 hero 渐变的颜色，
     与 logo 自带的 --logo-bg 产生色差，logo 四周就会露出色块。 */
  background: var(--logo-bg);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.site-header.is-stuck {
  border-bottom-color: var(--line);
  box-shadow: 0 4px 18px rgba(34, 31, 30, 0.06);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.brand__img {
  /* 横向组合约 4.97:1。文字块里「纯熙·艺术」与「CHUNXI ART」在源图里
     纵向零间隙（实测 298px 内无空行），46px 时两行会糊成一团，
     56px 才读得清，宽度相应为 278px。 */
  height: 56px;
  width: auto;
}

.nav__list {
  display: flex;
  align-items: center;
  /* 顶栏导航的模块数量由后台决定,允许换行,避免模块变多时横向溢出 */
  flex-wrap: wrap;
  gap: 4px;
}

.nav__link {
  position: relative;
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 15px;
  font-weight: 500;
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--red), var(--orange));
  transform: translateX(-50%);
  transition: width 0.25s var(--ease);
}

.nav__link:hover {
  color: var(--maroon);
  background: rgba(139, 30, 30, 0.05);
}

.nav__link:hover::after,
.nav__link.is-active::after {
  width: 22px;
}

.nav__link.is-active {
  color: var(--maroon);
  font-weight: 600;
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0 11px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}

.nav-toggle__bar {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav {
  border-top: 1px solid var(--line);
  /* 与头部同色，展开时不会出现第二种底色 */
  background: var(--logo-bg);
}

.mobile-nav__list {
  display: grid;
  gap: 2px;
  padding: 10px 24px 18px;
}

.mobile-nav__list a {
  display: block;
  padding: 12px 4px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
  font-weight: 500;
}

.mobile-nav__list a:hover {
  color: var(--maroon);
}

/* ---------- 5. 轮播区 ---------- */
.hero {
  position: relative;
  background: var(--orange-soft);
  overflow: hidden;
}

.hero__viewport {
  overflow: hidden;
}

.hero__track {
  display: flex;
  width: 100%;
  transition: transform 0.7s var(--ease);
  will-change: transform;
}

.hero__track.is-instant {
  transition: none;
}

.hero__slide {
  position: relative;
  flex: 0 0 100%;
  display: grid;
  align-items: center;
  min-height: clamp(420px, 64vh, 620px);
  padding: 64px 0 96px;
  isolation: isolate;
  overflow: hidden;
}

/* 每张幻灯片的主视觉：品牌色渐变 + 抽象图形 */
.hero__slide::before,
.hero__slide::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
}

.hero__slide::before {
  width: 46vw;
  height: 46vw;
  max-width: 620px;
  max-height: 620px;
  right: -8vw;
  top: -22%;
  filter: blur(2px);
  opacity: 0.5;
}

.hero__slide::after {
  width: 30vw;
  height: 30vw;
  max-width: 400px;
  max-height: 400px;
  right: 16%;
  bottom: -24%;
  opacity: 0.32;
}

.hero__slide--1 {
  background-image: radial-gradient(140% 130% at 8% 12%, #fffaf4 0%, #fdeedd 45%, #f7ddc6 100%);
}

.hero__slide--1::before {
  background: radial-gradient(circle at 32% 32%, rgba(242, 160, 61, 0.85), rgba(230, 51, 41, 0.15) 62%, transparent 72%);
}

.hero__slide--1::after {
  background: radial-gradient(circle at 50% 50%, rgba(230, 51, 41, 0.5), transparent 68%);
}

.hero__slide--2 {
  background-image: radial-gradient(140% 130% at 8% 12%, #fff8f6 0%, #fce8e4 45%, #f6d3cd 100%);
}

.hero__slide--2::before {
  background: radial-gradient(circle at 34% 36%, rgba(230, 51, 41, 0.75), rgba(139, 30, 30, 0.18) 60%, transparent 72%);
}

.hero__slide--2::after {
  background: radial-gradient(circle at 50% 50%, rgba(139, 30, 30, 0.42), transparent 66%);
}

.hero__slide--3 {
  background-image: radial-gradient(140% 130% at 8% 12%, #f7fbff 0%, #e4eefb 45%, #cfe0f6 100%);
}

.hero__slide--3::before {
  background: radial-gradient(circle at 34% 34%, rgba(30, 123, 232, 0.7), rgba(30, 123, 232, 0.14) 62%, transparent 74%);
}

.hero__slide--3::after {
  background: radial-gradient(circle at 50% 50%, rgba(139, 30, 30, 0.3), transparent 66%);
}

.hero__slide--4 {
  background-image: radial-gradient(140% 130% at 8% 12%, #fdf8f2 0%, #f7ead9 45%, #eed9bd 100%);
}

.hero__slide--4::before {
  background: radial-gradient(circle at 34% 34%, rgba(242, 160, 61, 0.8), rgba(230, 51, 41, 0.16) 62%, transparent 74%);
}

.hero__slide--4::after {
  background: radial-gradient(circle at 50% 50%, rgba(30, 123, 232, 0.34), transparent 68%);
}

.hero__inner {
  max-width: 720px;
}

.hero__kicker {
  display: inline-block;
  margin-bottom: 20px;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(139, 30, 30, 0.16);
  color: var(--maroon);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.hero__title {
  font-family: var(--font-serif);
  font-size: clamp(34px, 5.2vw, 62px);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: 0.01em;
  color: var(--ink);
  /* 后台标题里的换行直接生效:这样模板用 th:text 输出即可,
     不需要拼 <br>,运营也无法注入 HTML */
  white-space: pre-line;
}

.hero__sub {
  max-width: 34em;
  margin-top: 22px;
  color: var(--ink-2);
  font-size: clamp(15px, 1.35vw, 17px);
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.hero__arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.86);
  color: var(--maroon);
  font-size: 28px;
  line-height: 1;
  padding-bottom: 4px;
  box-shadow: var(--shadow-md);
  transform: translateY(-50%);
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease),
    transform 0.2s var(--ease);
}

.hero__arrow:hover {
  background: var(--maroon);
  color: #fff;
}

.hero__arrow--prev {
  left: 20px;
}

.hero__arrow--next {
  right: 20px;
}

.hero__arrow--prev:hover {
  transform: translateY(-50%) translateX(-2px);
}

.hero__arrow--next:hover {
  transform: translateY(-50%) translateX(2px);
}

.hero__dots {
  position: absolute;
  left: 50%;
  bottom: 44px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateX(-50%);
}

.hero__dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 50%;
  background: rgba(139, 30, 30, 0.28);
  transition: width 0.3s var(--ease), background-color 0.3s var(--ease);
}

.hero__dot:hover {
  background: rgba(139, 30, 30, 0.55);
}

.hero__dot[aria-current="true"] {
  width: 30px;
  border-radius: 999px;
  background: var(--maroon);
}

.hero__progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(139, 30, 30, 0.1);
}

.hero__progress-bar {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--red), var(--orange));
}

.hero__progress-bar.is-running {
  animation: heroProgress var(--hero-interval) linear forwards;
}

.hero.is-paused .hero__progress-bar {
  animation-play-state: paused;
}

@keyframes heroProgress {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

/* ---------- 6. 自定义模块 tab ---------- */
.modules {
  padding: clamp(56px, 8vw, 96px) 0 clamp(64px, 9vw, 110px);
  background: var(--bg);
}

.section-head {
  max-width: 720px;
  margin-bottom: clamp(28px, 4vw, 44px);
}

.section-head__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--maroon);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.section-head__eyebrow::before {
  content: "";
  width: 28px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--red), var(--orange));
}

.section-head__title {
  font-family: var(--font-serif);
  font-size: clamp(26px, 3.4vw, 40px);
  font-weight: 700;
  line-height: 1.3;
}

.section-head__sub {
  margin-top: 16px;
  color: var(--ink-2);
  font-size: 15px;
}

/* ---------- 列表搜索 ---------- */
.items-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.items-search__input {
  flex: 1 1 220px;
  min-width: 0;
  height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-size: 15px;
  font-family: inherit;
}

.items-search__input::placeholder {
  color: var(--ink-3);
}

.items-search__input:focus-visible {
  outline: 2px solid var(--maroon);
  outline-offset: 2px;
}

.items-search__btn {
  height: 44px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--red), var(--orange));
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: filter 0.2s var(--ease);
}

.items-search__btn:hover {
  filter: brightness(1.05);
}

.items-search__clear {
  height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 6px;
  color: var(--ink-3);
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.items-search__clear:hover {
  color: var(--maroon);
}

.tabs__bar {
  display: flex;
  gap: 8px;
  padding-bottom: 4px;
  margin-bottom: clamp(24px, 3.5vw, 36px);
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs__bar::-webkit-scrollbar {
  display: none;
}

.tab {
  position: relative;
  flex: 0 0 auto;
  padding: 12px 20px;
  border-radius: 999px 999px 0 0;
  color: var(--ink-2);
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.tab::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -5px;
  width: 0;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--red), var(--orange));
  transform: translateX(-50%);
  transition: width 0.28s var(--ease);
}

.tab:hover {
  color: var(--maroon);
  background: rgba(139, 30, 30, 0.05);
}

.tab.is-active {
  color: var(--maroon);
  font-weight: 700;
}

.tab.is-active::after {
  width: 60%;
}

.panel {
  animation: panelIn 0.4s var(--ease) both;
}

@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.panel__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 2.4vw, 28px);
}

/*
  同一张占位图靠色相偏移伪装成不同色调。--tilt 由服务端按模块在列表中的位置算出
  (模块数量和顺序都可配置,写死 data-index 选择器撑不住),--step 由服务端按卡片下标算出。
  两个变量都通过内联 style 下发。
  注意:这个效果只作用于占位图(.card__thumb--placeholder),真实照片不能被改色。
*/

.card__link {
  display: block;
  height: 100%;
  border-radius: var(--radius);
  background: var(--paper);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.card__link:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.card__thumb {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--orange-soft);
}

.card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease), filter 0.6s var(--ease);
}

/* 只有占位图才做色相偏移:真实照片必须保持原色 */
.card__thumb--placeholder img {
  filter: hue-rotate(calc(var(--tilt, 0deg) + var(--step, 0deg))) saturate(1.06);
}

.card__link:hover .card__thumb img {
  transform: scale(1.06);
}

.card__tag {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(6px);
  color: var(--maroon);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.card__body {
  display: block;
  padding: 18px 20px 22px;
}

.card__title {
  display: block;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
  transition: color 0.2s var(--ease);
}

.card__link:hover .card__title {
  color: var(--maroon);
}

.card__desc {
  display: block;
  margin-top: 8px;
  color: var(--ink-3);
  font-size: 13.5px;
  line-height: 1.65;
}

/* ---------- 7. 页脚 ---------- */
/* ---------- 滚动加载 / 空态 ---------- */
.panel__grid:empty {
  display: none;
}

.feed {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: clamp(24px, 3.4vw, 38px);
}

.feed__status {
  margin: 0;
  min-height: 1.4em;
  color: var(--ink-3);
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
}

.feed__sentinel {
  width: 100%;
  height: 1px;
}

.feed__more {
  height: 44px;
  padding: 0 26px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.feed__more:hover {
  border-color: var(--maroon);
  color: var(--maroon);
}

.panel__empty {
  margin: 0;
  padding: 48px 20px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink-3);
  text-align: center;
  font-size: 15px;
}

.site-footer {
  padding: clamp(48px, 6vw, 76px) 0 28px;
  background: var(--maroon);
  color: rgba(255, 255, 255, 0.78);
}

.site-footer__inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: clamp(28px, 4vw, 56px);
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.site-footer__logo {
  /* 方形 logo 里的「成立于2010年」只有整图 8.4% 高，44px 时仅约 4px；
     放到 168px 才约 14px，基本可读。 */
  height: 168px;
  width: auto;
  border-radius: var(--radius);
  background: var(--logo-bg);
}

.site-footer__desc {
  margin-top: 18px;
  max-width: 34em;
  font-size: 14px;
  line-height: 1.8;
}

.site-footer__title {
  margin-bottom: 16px;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.site-footer__list {
  display: grid;
  gap: 10px;
  font-size: 14px;
  line-height: 1.7;
}

.site-footer__list--links a {
  border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.site-footer__list--links a:hover {
  color: #fff;
  border-bottom-color: rgba(255, 255, 255, 0.6);
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 24px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
}

/* ---------- 8. 图片详情灯箱 ---------- */
/*
  卡片点击后的大图浏览层。z-index 必须高于吸顶的 .site-header(100) 和
  移动导航面板(50),否则滚动时头栏会压在灯箱上面。
  内容由 home.js 填充;交互见 initLightbox()。
*/
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(8px, 2vw, 24px);
  padding: clamp(16px, 4vw, 40px);
  background: rgba(20, 18, 17, 0.92);
  backdrop-filter: blur(6px);
  overflow-y: auto;
  animation: lightboxIn 0.24s var(--ease) both;
}

.lightbox[hidden] {
  display: none;
}

@keyframes lightboxIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.lightbox__figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.lightbox__img {
  max-width: min(1100px, 100%);
  max-height: 72vh;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  background: #111;
  cursor: pointer;
}

.lightbox__caption {
  max-width: 720px;
  text-align: center;
  color: #fff;
}

.lightbox__tag {
  margin: 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
  letter-spacing: 0.14em;
}

.lightbox__title {
  margin: 8px 0 0;
  font-family: var(--font-serif);
  font-size: clamp(18px, 2.2vw, 26px);
  font-weight: 600;
  line-height: 1.4;
}

.lightbox__desc {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 14px;
  line-height: 1.75;
}

.lightbox__count {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.45);
  font-size: 13px;
  letter-spacing: 0.08em;
}

.lightbox__nav,
.lightbox__close {
  display: grid;
  place-items: center;
  border: 0;
  cursor: pointer;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  transition: background 0.2s var(--ease), opacity 0.2s var(--ease);
}

.lightbox__nav {
  width: 52px;
  height: 52px;
  font-size: 30px;
  line-height: 1;
}

.lightbox__nav:hover:not([disabled]),
.lightbox__close:hover {
  background: rgba(255, 255, 255, 0.26);
}

.lightbox__nav[disabled] {
  opacity: 0.3;
  cursor: default;
}

.lightbox__close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 40px;
  height: 40px;
  font-size: 22px;
  line-height: 1;
}

.lightbox :focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

@media (max-width: 720px) {
  .lightbox {
    grid-template-columns: 1fr;
  }

  .lightbox__nav {
    position: absolute;
    top: 50%;
    width: 42px;
    height: 42px;
    transform: translateY(-50%);
  }

  .lightbox__nav--prev {
    left: 10px;
  }

  .lightbox__nav--next {
    right: 10px;
  }

  .lightbox__img {
    max-height: 60vh;
  }

  .lightbox__caption {
    padding: 0 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lightbox {
    animation: none;
  }
}

/* ---------- 9. 响应式 ---------- */
@media (max-width: 1080px) {
  .panel__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-footer__inner {
    grid-template-columns: 1fr 1fr;
  }

  .site-footer__brand {
    grid-column: 1 / -1;
  }
}

/* 901–1080px：56px 的横向组合会把主导航挤成两行，
   在这个区间退回 46px，让主导航保持单行（与改造前一致）。 */
@media (min-width: 901px) and (max-width: 1080px) {
  .brand__img {
    height: 46px;
  }
}

@media (max-width: 900px) {
  .nav {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }
}

@media (max-width: 720px) {
  :root {
    --header-h: 64px;
  }

  .container {
    padding-inline: 18px;
  }

  .brand__img {
    /* 横向组合约 4.97:1。375px 下可用宽度 339px，减去
       「免费试听」按钮与汉堡按钮的 154px、以及 24px 的 flex 间距，
       品牌区最多 160px，即高度上限约 32px。 */
    height: 32px;
  }

  .hero__slide {
    min-height: clamp(360px, 74vh, 520px);
    padding: 48px 0 88px;
  }

  .hero__arrow {
    top: auto;
    bottom: 24px;
    width: 40px;
    height: 40px;
    font-size: 24px;
    transform: none;
  }

  .hero__arrow--prev {
    left: 18px;
  }

  .hero__arrow--next {
    right: 18px;
  }

  /* 移动端箭头改到底部，避免压住正文；hover 位移也要去掉 translateY */
  .hero__arrow--prev:hover {
    transform: translateX(-2px);
  }

  .hero__arrow--next:hover {
    transform: translateX(2px);
  }

  .hero__dots {
    bottom: 34px;
  }

  .hero__cta .btn {
    flex: 1 1 auto;
  }

  .panel__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .tabs__bar {
    gap: 2px;
  }

  .tab {
    padding: 10px 14px;
    font-size: 14px;
  }

  .site-footer__inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .site-footer__logo {
    height: 130px;
  }

  .site-footer__bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ---------- 10. 无障碍：跟随系统减弱动效 ---------- */
@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;
  }

  .hero__track {
    transition: none;
  }

  /* 关闭自动播放时，进度条没有意义，直接隐藏 */
  .hero__progress {
    display: none;
  }
}
