/* =========================================================
   冰雪娱乐会 · 共享站点样式 /assets/site.css
   结构：变量 → reset → 中文排版 → 通用组件 → 头部 → 页脚 → 响应式
   ========================================================= */

:root {
  --snow: #F5FAFF;
  --mist: #E8F3FF;
  --glacier: #4A9FE0;
  --deep: #1E5E8C;
  --ink: #0B1F2A;
  --aurora: #6C4BD8;
  --ember: #FF8C42;
  --cyan: #00A6B2;
  --haze: #D6E4F0;

  --line: 2px solid var(--ink);
  --shadow-hard: 6px 6px 0 var(--ink);
  --shadow-soft: 0 20px 44px -26px rgba(11, 31, 42, .5);

  --radius-s: 10px;
  --radius-m: 18px;
  --radius-l: 28px;
  --radius-pill: 999px;

  --rail-w: 240px;
  --rail-gap: 22px;
  --page-pad: clamp(18px, 4vw, 56px);
  --gap: clamp(14px, 2vw, 22px);

  --font-display: "Source Han Serif SC", "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --font-sans: "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", "SF Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --ease-pop: cubic-bezier(.2, .9, .3, 1.25);
}

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

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

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

ul, ol { padding: 0; list-style: none; }

img, svg, video, canvas { display: block; max-width: 100%; }

a { color: var(--deep); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: .28em; }

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

:focus-visible {
  outline: 3px solid var(--aurora);
  outline-offset: 3px;
  border-radius: 6px;
}

body.is-locked { overflow: hidden; }

/* ---------------- 中文排版与基础节奏 ---------------- */
body {
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.85;
  color: var(--ink);
  background-color: var(--snow);
  background-image:
    radial-gradient(58vw 58vw at 86% -10%, rgba(74, 159, 224, .20), transparent 62%),
    radial-gradient(46vw 46vw at 4% 10%, rgba(108, 75, 216, .13), transparent 60%),
    radial-gradient(42vw 42vw at 72% 94%, rgba(255, 140, 66, .11), transparent 66%);
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -.01em;
  text-wrap: balance;
}

p { text-wrap: pretty; }

.display {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(48px, 8vw, 132px);
  line-height: .95;
  letter-spacing: -.02em;
}

.section-title {
  font-family: var(--font-sans);
  font-weight: 900;
  font-size: clamp(24px, 3.4vw, 44px);
  line-height: 1.12;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .55em;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .18em;
  color: var(--deep);
}

.eyebrow::before {
  content: "";
  width: 9px;
  height: 9px;
  background: var(--ember);
  border: 2px solid var(--ink);
  transform: rotate(45deg);
}

.mono {
  font-family: var(--font-mono);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: .01em;
}

.prose { max-width: 40em; }
.prose p + p { margin-top: 1em; }
.prose a { text-decoration: underline; text-underline-offset: .28em; }

/* ---------------- 布局容器与网格 ---------------- */
.container {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: var(--page-pad);
}

.section { padding-block: clamp(36px, 6vw, 84px); }

.grid {
  display: grid;
  gap: var(--gap);
}

.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 236px), 1fr)); }
.grid--bento { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.grid--bento > * { grid-column: span 12; }

@media (min-width: 900px) {
  .span-4 { grid-column: span 4; }
  .span-5 { grid-column: span 5; }
  .span-6 { grid-column: span 6; }
  .span-7 { grid-column: span 7; }
  .span-8 { grid-column: span 8; }
}

/* ---------------- 面包屑 ---------------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5em;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: .04em;
  color: var(--deep);
}

.breadcrumb li { display: inline-flex; align-items: center; gap: .5em; }
.breadcrumb li + li::before { content: "›"; color: var(--haze); }
.breadcrumb a { color: var(--deep); }
.breadcrumb [aria-current="page"] { color: var(--ink); font-weight: 600; }

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55em;
  padding: .72em 1.35em;
  border: 2px solid var(--ink);
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform .18s var(--ease-pop), box-shadow .18s var(--ease-pop), background-color .18s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translate(-1px, -1px);
  box-shadow: 6px 6px 0 var(--ink);
}

.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--ink);
}

.btn--primary {
  background: linear-gradient(135deg, var(--glacier), var(--deep));
  color: #fff;
}

.btn--ghost { background: var(--snow); color: var(--ink); }

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

/* ---------------- 卡片 / 标签 / 媒体 ---------------- */
.card {
  position: relative;
  padding: clamp(18px, 2.4vw, 28px);
  background: var(--snow);
  border: var(--line);
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-hard);
}

.card--mist { background: var(--mist); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: .4em;
  padding: .26em .8em;
  border: 2px solid var(--ink);
  border-radius: var(--radius-pill);
  background: var(--mist);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .04em;
}

.chip--aurora { background: var(--aurora); color: #fff; }
.chip--ember { background: var(--ember); color: var(--ink); }

.crack {
  height: 12px;
  border-bottom: 2px solid var(--ink);
  background: repeating-linear-gradient(
    115deg,
    var(--glacier) 0 12px,
    var(--snow) 12px 26px,
    var(--aurora) 26px 32px,
    var(--snow) 32px 48px,
    var(--ember) 48px 53px,
    var(--snow) 53px 70px
  );
}

.media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border: var(--line);
  border-radius: var(--radius-m);
  background: linear-gradient(150deg, var(--mist), var(--snow) 55%, #cfe6fa);
  box-shadow: var(--shadow-hard);
}

.media img,
.media video,
.media picture { width: 100%; height: 100%; }

.media img,
.media video { object-fit: cover; }

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

.media--crystal::after {
  content: "";
  position: absolute;
  inset: auto -12% -34% -12%;
  height: 58%;
  background: linear-gradient(120deg, rgba(108, 75, 216, .34), rgba(0, 166, 178, .26));
  filter: blur(16px);
  pointer-events: none;
}

/* ---------------- 显现（由 JS 打点） ---------------- */
html.has-js [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .5s ease, transform .55s var(--ease-pop);
}

html.has-js [data-reveal][data-reveal-state="in"] {
  opacity: 1;
  transform: none;
}

/* =========================================================
   头部：阅读进度 + 侧边冰轨 + 移动端胶囊按钮
   ========================================================= */
.site-header {
  position: relative;
  z-index: 70;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 130;
  padding: .68em 1.1em;
  border: 2px solid var(--ink);
  border-radius: var(--radius-pill);
  background: var(--ember);
  color: var(--ink);
  font-weight: 800;
  font-size: 14px;
  text-decoration: none;
  box-shadow: 3px 3px 0 var(--ink);
  transform: translateY(-180%);
  transition: transform .2s ease;
}

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

.read-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  z-index: 115;
  background: rgba(11, 31, 42, .10);
}

.read-progress__fill {
  display: block;
  width: 0;
  height: 100%;
  border-right: 2px solid var(--ink);
  background: linear-gradient(90deg, var(--glacier), var(--aurora) 58%, var(--ember));
  transition: width .12s linear;
}

.rail__scrim {
  position: fixed;
  inset: 0;
  z-index: 95;
  background: rgba(11, 31, 42, .44);
  opacity: 0;
  pointer-events: none;
  transition: opacity .28s ease;
}

.site-header[data-open="true"] .rail__scrim {
  opacity: 1;
  pointer-events: auto;
}

.rail {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  width: min(86vw, 330px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px 16px 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--snow);
  border-right: 3px solid var(--ink);
  box-shadow: 16px 0 44px -24px rgba(11, 31, 42, .65);
  transform: translateX(-102%);
  transition: transform .34s var(--ease-pop);
}

.site-header[data-open="true"] .rail { transform: translateX(0); }

.rail__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 4px 16px;
  border-bottom: 2px dashed var(--haze);
  color: var(--ink);
  text-decoration: none;
}

.rail__brand:hover { text-decoration: none; }

.rail__mark {
  flex: none;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 14px 14px 14px 4px;
  background: linear-gradient(140deg, var(--glacier), var(--aurora));
  color: #fff;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 3px 3px 0 var(--ink);
  clip-path: polygon(0 0, 100% 0, 100% 72%, 72% 100%, 0 100%);
}

.rail__brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.rail__name {
  font-size: 19px;
  font-weight: 900;
  letter-spacing: .03em;
  line-height: 1.25;
}

.rail__descriptor {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .07em;
  line-height: 1.5;
  color: var(--deep);
}

.rail__nav { flex: 1 1 auto; }

.rail__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rail__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 2px solid transparent;
  border-radius: 14px;
  color: var(--ink);
  font-size: 15.5px;
  font-weight: 700;
  text-decoration: none;
  transition: background-color .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.rail__link:hover {
  background: var(--mist);
  border-color: var(--haze);
  transform: translateX(3px);
  text-decoration: none;
}

.rail__num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  color: var(--deep);
}

.rail__label { line-height: 1.3; }

.rail__link[aria-current="page"] {
  background: var(--mist);
  border-color: var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}

.rail__link[aria-current="page"] .rail__num { color: var(--ember); }

.rail__link[aria-current="page"]::after {
  content: "";
  width: 8px;
  height: 8px;
  margin-left: auto;
  background: var(--ember);
  border: 2px solid var(--ink);
  transform: rotate(45deg);
}

.rail__foot {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 14px;
  border-top: 2px dashed var(--haze);
}

.rail__cta { width: 100%; }

.rail__note {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--deep);
  text-align: center;
}

.nav-toggle {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 110;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 2px solid var(--ink);
  border-radius: var(--radius-pill);
  background: var(--snow);
  box-shadow: 4px 4px 0 var(--ink);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .06em;
  transition: background-color .2s ease, transform .2s var(--ease-pop), box-shadow .2s var(--ease-pop);
}

.nav-toggle:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--ink);
}

.nav-toggle__bars {
  display: grid;
  gap: 3px;
  width: 18px;
}

.nav-toggle__bars i {
  display: block;
  height: 2.5px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform .26s var(--ease-pop), opacity .18s ease;
}

.nav-toggle__label { line-height: 1; }

.site-header[data-open="true"] .nav-toggle { background: var(--ember); }

.site-header[data-open="true"] .nav-toggle__bars i:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.site-header[data-open="true"] .nav-toggle__bars i:nth-child(2) { opacity: 0; }
.site-header[data-open="true"] .nav-toggle__bars i:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

/* 桌面端：轨道常驻左侧 */
@media (min-width: 1024px) {
  body { padding-left: calc(var(--rail-w) + var(--rail-gap) * 2); }

  .rail {
    top: var(--rail-gap);
    left: var(--rail-gap);
    bottom: var(--rail-gap);
    width: var(--rail-w);
    max-height: calc(100vh - var(--rail-gap) * 2);
    padding: 18px 14px 16px;
    border: 2px solid var(--ink);
    border-radius: var(--radius-l);
    box-shadow: 8px 8px 0 rgba(11, 31, 42, .92);
    backdrop-filter: blur(8px);
    background: rgba(245, 250, 255, .94);
    transform: none;
    transition: none;
  }

  .site-header[data-open="true"] .rail { transform: none; }

  .rail__scrim,
  .nav-toggle { display: none; }

  .rail__name { font-size: 18px; }
  .rail__link { padding: 9px 10px; font-size: 15px; }
  .rail__brand { padding-bottom: 14px; }
}

/* =========================================================
   页脚
   ========================================================= */
.site-footer {
  position: relative;
  margin-top: clamp(48px, 7vw, 96px);
  border-top: 3px solid var(--ink);
  background: linear-gradient(180deg, var(--mist), var(--snow) 58%);
}

.footer__grid {
  display: grid;
  gap: clamp(24px, 4vw, 44px);
  grid-template-columns: 1fr;
  padding-block: clamp(30px, 5vw, 56px) clamp(20px, 3vw, 32px);
}

@media (min-width: 720px) {
  .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__brand { grid-column: span 2; }
}

@media (min-width: 1080px) {
  .footer__grid { grid-template-columns: 1.15fr 1.5fr .95fr; }
  .footer__brand { grid-column: auto; }
}

.footer__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.footer__mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 12px 12px 12px 3px;
  background: linear-gradient(140deg, var(--glacier), var(--aurora));
  color: #fff;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 3px 3px 0 var(--ink);
  clip-path: polygon(0 0, 100% 0, 100% 70%, 70% 100%, 0 100%);
}

.footer__name {
  font-size: 21px;
  font-weight: 900;
  letter-spacing: .03em;
}

.footer__intro {
  max-width: 30em;
  font-size: 15px;
  line-height: 1.85;
  color: var(--ink);
  opacity: .86;
}

.footer__cta { margin-top: 18px; }

.footer__cols {
  display: grid;
  gap: clamp(18px, 2.6vw, 28px);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 132px), 1fr));
}

.footer__title {
  display: flex;
  align-items: center;
  gap: .55em;
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .12em;
  color: var(--ink);
}

.footer__title::before {
  content: "";
  width: 9px;
  height: 9px;
  background: var(--ember);
  border: 2px solid var(--ink);
  transform: rotate(45deg);
}

.footer__list {
  display: grid;
  gap: 8px;
  font-size: 14.5px;
  line-height: 1.7;
}

.footer__list--plain {
  gap: 6px;
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--ink);
  word-break: break-word;
}

.footer__link {
  color: var(--ink);
  font-weight: 600;
  border-bottom: 2px solid transparent;
  transition: color .18s ease, border-color .18s ease;
}

.footer__link:hover,
.footer__link:focus-visible {
  color: var(--deep);
  border-bottom-color: var(--glacier);
  text-decoration: none;
}

.footer__note {
  margin-top: 14px;
  padding: 10px 12px;
  border-left: 3px solid var(--aurora);
  border-radius: 0 10px 10px 0;
  background: rgba(108, 75, 216, .09);
  font-size: 13px;
  line-height: 1.72;
  color: var(--ink);
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 22px;
  padding-block: 16px 24px;
  border-top: 2px dashed var(--haze);
}

.footer__meta {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--deep);
}

/* =========================================================
   动效收敛
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }

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

  .rail { transition: none; }
  .read-progress__fill { transition: none; }
}
