/* ============================================================================
 * EVENT ARCHIVE · 样式
 * ----------------------------------------------------------------------------
 * 视觉方向：夜行城市 + 印刷档案
 *   - 底色近黑，靠舞台灯光的弥散光斑营造"现场感"
 *   - 展示字（Anton）做年份与数字，中文标题用思源宋体，技术信息用等宽
 *   - 卡片是一张"票根"：上主视觉、下信息，中间有撕口
 *   - 强调色只有一个：荧光棒黄绿 #C6F24E，用得吝啬才显贵
 * ==========================================================================*/

/* ------------------------------- 设计令牌 ------------------------------- */
:root {
  --bg: #0a090c;
  --bg-soft: #131117;
  --bg-raise: #1a1720;

  --line: rgba(239, 234, 227, 0.11);
  --line-strong: rgba(239, 234, 227, 0.24);

  --fg: #efeae3;
  --fg-dim: #8a8391;
  --fg-faint: #5a5563;

  --acid: #c6f24e;
  --acid-soft: rgba(198, 242, 78, 0.42);
  --flare: #ff4d3d;

  --f-disp: 'Anton', 'Noto Sans SC', 'Impact', sans-serif;
  --f-serif: 'Noto Serif SC', 'Songti SC', 'SimSun', serif;
  --f-sans: 'Noto Sans SC', -apple-system, 'Segoe UI', sans-serif;
  --f-mono: 'IBM Plex Mono', ui-monospace, Consolas, monospace;

  --pad: clamp(1.15rem, 4vw, 4.5rem);
  --maxw: 1420px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--f-sans);
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

h1, h2, h3, p, dl, dd, dt, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
code {
  font-family: var(--f-mono);
  font-size: 0.92em;
  color: var(--acid);
}

::selection { background: var(--acid); color: var(--bg); }

:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 3px;
}

/* 全局颗粒噪点：让纯黑背景不显得"电子" */
.grain {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='4' stitchTiles='stitch'/></filter><rect width='180' height='180' filter='url(%23n)'/></svg>");
}

/* ================================= HERO ================================= */
.hero {
  position: relative;
  /* 不做满屏，让第一年的内容早点露出来 */
  min-height: min(70svh, 640px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(4rem, 11vh, 7rem) var(--pad) 0;
  overflow: hidden;
}

.hero__glow {
  position: absolute;
  inset: -25% -12% auto -12%;
  height: 130%;
  pointer-events: none;
  background:
    radial-gradient(46% 40% at 16% 30%, rgba(198, 242, 78, 0.17), transparent 62%),
    radial-gradient(40% 38% at 84% 16%, rgba(255, 77, 61, 0.15), transparent 60%),
    radial-gradient(58% 46% at 52% 92%, rgba(91, 140, 255, 0.11), transparent 66%);
  filter: blur(8px);
  animation: drift 24s ease-in-out infinite alternate;
}

@keyframes drift {
  to { transform: translate3d(2.5%, -3%, 0) scale(1.07); }
}

.hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--f-mono);
  font-size: 0.72rem;
  letter-spacing: 0.26em;
  color: var(--fg-dim);
  text-transform: uppercase;
}

.eyebrow__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 12px var(--acid);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.8); }
}

/* 页眉主标：只用拉丁品牌字，不用中文标语。
   ARCHIVE 走描边，和实心的 LIVE 拉开层次。 */
.hero__title {
  margin: 1.1rem 0 0;
  font-family: var(--f-disp);
  font-weight: 400;
  font-size: clamp(3.1rem, 11.5vw, 9.5rem);
  line-height: 0.9;
  letter-spacing: 0.005em;
  text-transform: uppercase;
}

.hero__title .hollow {
  color: transparent;
  -webkit-text-stroke: 1.6px var(--fg);
}

.hero__sub {
  margin-top: clamp(0.9rem, 2.4vh, 1.5rem);
  max-width: 52ch;
  color: var(--fg-dim);
  font-size: clamp(0.9rem, 1.6vw, 1.02rem);
  font-weight: 300;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* --- 统计条 --- */
.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.3rem, 4.5vw, 3.6rem);
  margin-top: clamp(1.8rem, 5vh, 3.2rem);
}

/* 入场动画统一挂在 html.is-js 下：脚本没跑起来时内容保持默认可见 */
.is-js .hero__sub {
  opacity: 0;
  animation: fadeUp 1s var(--ease) 0.35s forwards;
}

.is-js .hero__stats {
  opacity: 0;
  animation: fadeUp 1s var(--ease) 0.5s forwards;
}

.hero__stat { display: flex; flex-direction: column; gap: 0.15rem; }

.hero__stat b {
  font-family: var(--f-disp);
  font-size: clamp(1.9rem, 4.6vw, 3.1rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.01em;
}

.hero__stat:first-child b { color: var(--acid); }

.hero__stat span {
  font-family: var(--f-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--fg-faint);
  text-transform: uppercase;
}

/* --- 底部跑马灯 --- */
.marquee {
  position: relative;
  z-index: 1;
  margin-top: clamp(3rem, 9vh, 6rem);
  border-top: 1px solid var(--line);
  overflow: hidden;
  padding: 0.95rem 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.marquee__track {
  display: flex;
  gap: 2.4rem;
  width: max-content;
  white-space: nowrap;
  font-family: var(--f-mono);
  font-size: 0.74rem;
  letter-spacing: 0.22em;
  color: var(--fg-faint);
  text-transform: uppercase;
  animation: slide 42s linear infinite;
}

.marquee__track span { display: inline-flex; align-items: center; gap: 2.4rem; }
.marquee__track i { color: var(--acid-soft); font-style: normal; }

@keyframes slide {
  to { transform: translateX(-50%); }
}

/* ============================ 右侧年度导航 ============================ */
.rail {
  position: fixed;
  right: clamp(0.7rem, 1.5vw, 1.5rem);
  top: 50%;
  transform: translateY(-50%);
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.85rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  /* 半透明胶囊：即使压在内容上也保持可读 */
  background: rgba(10, 9, 12, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.rail__item {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  padding: 0.34rem 0;
  font-family: var(--f-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  color: var(--fg-faint);
  text-decoration: none;
  transition: color 0.35s ease;
}

.rail__item i {
  display: block;
  width: 14px;
  height: 1px;
  background: currentColor;
  opacity: 0.55;
  transition: width 0.45s var(--ease), opacity 0.35s ease;
}

.rail__item:hover { color: var(--fg); }

.rail__item.is-active { color: var(--acid); }
.rail__item.is-active i { width: 32px; opacity: 1; }

/* ============================ 年度区块 ============================ */
.year {
  position: relative;
  padding: clamp(3.4rem, 9vw, 7.5rem) var(--pad);
  border-top: 1px solid var(--line);
  scroll-margin-top: 1rem;
}

.year__inner {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
}

.year__head {
  display: flex;
  align-items: flex-end;
  gap: 1.2rem;
  flex-wrap: wrap;
  margin-bottom: clamp(1.8rem, 4.5vw, 3rem);
}

/* 年份大字 + 错版印刷的荧光描边副本 */
.year__num {
  position: relative;
  isolation: isolate;
  font-family: var(--f-disp);
  font-size: clamp(3.4rem, 10.5vw, 8.4rem);
  font-weight: 400;
  line-height: 0.8;
  letter-spacing: -0.015em;
}

.year__num::after {
  content: attr(data-num);
  position: absolute;
  left: 0;
  top: 0;
  z-index: -1;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--acid);
  opacity: 0.6;
  transform: translate(0.055em, 0.05em);
}

.year__meta {
  margin-left: auto;
  text-align: right;
  font-family: var(--f-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  line-height: 2;
  color: var(--fg-dim);
  text-transform: uppercase;
}

.year__meta strong {
  color: var(--acid);
  font-weight: 500;
}

/* --- 卡片网格 --- */
.year__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 258px), 1fr));
  gap: clamp(1.1rem, 2.6vw, 2.1rem);
}

/* ============================== 票根卡片 ============================== */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 3px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.45s ease, box-shadow 0.55s ease, transform 0.55s var(--ease);
}

.card:hover,
.card:focus-visible {
  border-color: var(--acid-soft);
  transform: translateY(-5px);
  box-shadow: 0 28px 64px -34px rgba(198, 242, 78, 0.45);
}

/* --- 主视觉区 --- */
.card__art {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #0d0c10;
}

.card__art > svg,
.card__art > img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.85s var(--ease), filter 0.6s ease;
}

.card:hover .card__art > svg,
.card:hover .card__art > img {
  transform: scale(1.055);
  filter: saturate(1.12) contrast(1.04);
}

/* 扫描线 + 暗角，统一所有主视觉的"印刷"气质 */
.card__art::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(to bottom,
      rgba(0, 0, 0, 0.26) 0 1px, transparent 1px 3px);
  mix-blend-mode: multiply;
  opacity: 0.5;
  z-index: 2;
}

.card__art::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background: radial-gradient(120% 90% at 50% 8%, transparent 42%, rgba(0, 0, 0, 0.55) 100%);
}

/* 日期块：整张卡片最重要的信息 */
.card__date {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 3;
  padding: 0.4rem 0.68rem 0.42rem;
  background: var(--acid);
  color: #0a090c;
  font-family: var(--f-mono);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  line-height: 1;
}

.card__date sup {
  font-size: 0.56rem;
  font-weight: 500;
  vertical-align: super;
  opacity: 0.72;
  margin-left: 0.42em;
  letter-spacing: 0.08em;
}

/* 归档序号 */
.card__idx {
  position: absolute;
  top: 0.55rem;
  right: 0.7rem;
  z-index: 3;
  font-family: var(--f-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  color: rgba(239, 234, 227, 0.5);
  mix-blend-mode: difference;
}

/* hover 时出现的提示 */
.card__cta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  padding: 0.7rem 0.85rem;
  font-family: var(--f-mono);
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--acid);
  background: linear-gradient(to top, rgba(10, 9, 12, 0.88), transparent);
  transform: translateY(102%);
  opacity: 0;
  transition: transform 0.5s var(--ease), opacity 0.35s ease;
}

.card:hover .card__cta,
.card:focus-visible .card__cta {
  transform: none;
  opacity: 1;
}

/* --- 撕口：卡片上下两段之间的票据缺口 --- */
.card__body {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1.05rem 1.15rem 1.25rem;
  border-top: 1px dashed var(--line-strong);
}

.card__body::before,
.card__body::after {
  content: '';
  position: absolute;
  top: -9px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg);
  z-index: 4;
}

.card__body::before { left: -9px; }
.card__body::after { right: -9px; }

.card__artist {
  font-family: var(--f-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--acid);
  text-transform: uppercase;
}

.card__title {
  margin: 0.4rem 0 0.6rem;
  font-family: var(--f-serif);
  font-weight: 700;
  font-size: 1.08rem;
  line-height: 1.42;
  letter-spacing: 0.005em;
}

.card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--fg-dim);
  line-height: 1.5;
}

.card__meta .dot { color: var(--fg-faint); }

.card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: auto;
  padding-top: 0.85rem;
}

.card__tags li {
  padding: 0.16rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--f-mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  color: var(--fg-faint);
}

/* --- 滚入动画 ---
   统一策略：默认可见。只有 JS 就绪（html.is-js）时才隐藏并播放动画，
   这样脚本异常、被拦截或 rAF 暂停时，内容不会凭空消失。 */
.is-js .reveal {
  opacity: 0;
  transform: translateY(30px);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.75s ease calc(var(--i, 0) * 65ms),
    transform 0.9s var(--ease) calc(var(--i, 0) * 65ms);
}

.year__head.reveal { --i: 0; }

/* ============================== 页脚 ============================== */
.foot {
  padding: clamp(2.5rem, 6vw, 4.5rem) var(--pad);
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.6rem 1.6rem;
}

.foot__brand {
  font-family: var(--f-disp);
  font-size: 1.5rem;
  letter-spacing: 0.02em;
}

.foot__note {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--fg-dim);
  text-transform: uppercase;
}

.foot__hint {
  margin-left: auto;
  font-size: 0.78rem;
  color: var(--fg-faint);
}

/* ============================ 主视觉放大 ============================ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  align-items: center;
  gap: clamp(1.5rem, 4vw, 4rem);
  padding: clamp(1.5rem, 5vw, 4rem);
  background: rgba(6, 5, 8, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: lbIn 0.4s ease both;
}

.lightbox[hidden] { display: none; }

@keyframes lbIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.lightbox__close {
  position: absolute;
  top: clamp(1rem, 3vw, 2rem);
  right: clamp(1rem, 3vw, 2rem);
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--fg-dim);
  transition: color 0.3s, border-color 0.3s, transform 0.4s var(--ease);
}

.lightbox__close:hover {
  color: var(--acid);
  border-color: var(--acid-soft);
  transform: rotate(90deg);
}

.lightbox__stage {
  height: min(80vh, 900px);
  aspect-ratio: 3 / 4;
  max-width: 100%;
  margin: 0 auto;
  border: 1px solid var(--line);
  overflow: hidden;
  animation: stageIn 0.65s var(--ease) both;
}

.lightbox__stage > svg,
.lightbox__stage > img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  /* 放大后占位海报的大面积暗部会显得偏闷，这里补一点亮度 */
  filter: brightness(1.08) saturate(1.05);
}

@keyframes stageIn {
  from { opacity: 0; transform: scale(0.94) translateY(18px); }
  to { opacity: 1; transform: none; }
}

.lightbox__caption {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  animation: fadeUp 0.7s var(--ease) 0.15s both;
}

.lb__date {
  font-family: var(--f-mono);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  color: var(--acid);
  text-transform: uppercase;
}

.lb__title {
  font-family: var(--f-serif);
  font-weight: 700;
  font-size: clamp(1.3rem, 2.4vw, 1.85rem);
  line-height: 1.4;
}

.lb__artist {
  font-family: var(--f-mono);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  color: var(--fg);
}

.lb__meta,
.lb__note {
  font-size: 0.85rem;
  color: var(--fg-dim);
  line-height: 1.85;
}

.lb__note {
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
  border-left: 2px solid var(--acid);
  padding-left: 0.9rem;
  font-style: italic;
}

/* ============================ 响应式 ============================ */

/* 桌面端为右侧年度导航留出通道，避免压住卡片 */
@media (min-width: 861px) {
  .year { padding-right: calc(var(--pad) + 5rem); }
}

@media (max-width: 1024px) {
  .lightbox { grid-template-columns: 1fr; }
  .lightbox__stage { height: min(52vh, 520px); }
  .lightbox__caption { max-width: 520px; margin: 0 auto; }
}

@media (max-width: 860px) {
  .rail { display: none; }
  .year__meta { margin-left: 0; text-align: left; width: 100%; }
  .foot__hint { margin-left: 0; }
}

@media (max-width: 560px) {
  .year__grid { grid-template-columns: 1fr; }
  .hero { min-height: auto; padding-top: 6rem; padding-bottom: 0; }
}

/* ========================= 降低动效偏好 ========================= */
@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;
  }

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

  .is-js .hero__sub,
  .is-js .hero__stats { opacity: 1; }
}

/* ============================ 打印 ============================ */
@media print {
  .grain, .rail, .marquee, .hero__glow, .lightbox { display: none !important; }
  body { background: #fff; color: #000; }
  .card { break-inside: avoid; border-color: #ccc; }
}
