/* ==========================================================================
   base.css — 全站基础层
   变量 / 重置 / 排版 / 通用按钮 / 滚动条
   ========================================================================== */

:root {
  /* 主色：红 */
  --red: #d81f2a;
  --red-2: #ff2d3f;
  --red-3: #ff6470;
  --red-deep: #7d0d15;
  --red-glow: rgba(216, 31, 42, 0.55);
  --red-soft: rgba(216, 31, 42, 0.14);

  /* 中性色 */
  --ink: #08080a;
  --ink-2: #0f0f12;
  --ink-3: #16161a;
  --ink-4: #1e1e23;
  --text: #f4f4f5;
  --muted: #a2a2ab;
  --dim: #6d6d76;

  /* 线条：全站统一红 */
  --line: rgba(216, 31, 42, 0.34);
  --line-strong: rgba(216, 31, 42, 0.72);
  --hairline: rgba(255, 255, 255, 0.08);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --nav-h: 68px;

  --font-sans: "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei UI",
    "Microsoft YaHei", "Source Han Sans SC", "Noto Sans SC", -apple-system,
    "Segoe UI", Roboto, sans-serif;
  --font-black: "Arial Black", "Helvetica Neue", Impact, "Microsoft YaHei",
    sans-serif;
}

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

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.is-locked {
  overflow: hidden;
}

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

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

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

h1,
h2,
h3,
h4,
p,
figure,
blockquote {
  margin: 0;
}

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

/* 滚动条 */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: #0b0b0d;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--red-deep), var(--red));
  border-radius: 10px;
  border: 2px solid #0b0b0d;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--red-2);
}

/* --------------------------------------------------------------------------
   通用按钮
   -------------------------------------------------------------------------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  min-height: 50px;
  padding: 0 34px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid transparent;
  border-radius: 2px;
  overflow: hidden;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease),
    background-color 0.35s var(--ease), border-color 0.35s var(--ease),
    color 0.35s var(--ease);
  will-change: transform;
}

.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent 20%,
    rgba(255, 255, 255, 0.22) 50%,
    transparent 80%
  );
  transform: translateX(-120%);
  transition: transform 0.7s var(--ease);
}

.btn:hover::after {
  transform: translateX(120%);
}

.btn:active {
  transform: translateY(1px) scale(0.99);
}

.btn--primary {
  background: linear-gradient(135deg, var(--red-2), var(--red) 45%, var(--red-deep));
  color: #fff;
  box-shadow: 0 10px 30px -12px var(--red-glow), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.btn--primary:hover {
  box-shadow: 0 16px 42px -12px var(--red-glow), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.btn--ghost {
  background: rgba(10, 10, 12, 0.32);
  border-color: rgba(255, 255, 255, 0.45);
  color: #fff;
  backdrop-filter: blur(6px);
}

.btn--ghost:hover {
  border-color: var(--red-2);
  color: #fff;
  background: rgba(216, 31, 42, 0.22);
  transform: translateY(-2px);
}

.btn--sm {
  min-height: 40px;
  padding: 0 20px;
  font-size: 13px;
  letter-spacing: 0.1em;
}

/* 小标签 */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.32em;
  color: var(--muted);
  text-transform: uppercase;
}

.kicker__line {
  width: 54px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--red));
  flex: none;
}

/* hidden 必须真的隐藏（.btn / .field 之类会设置 display） */
[hidden] {
  display: none !important;
}

/* 区块标题（编号 + 英文 + 中文） */
.sec-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 16px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.sec-head__idx {
  font-family: var(--font-black);
  font-size: 15px;
  color: var(--red-2);
  letter-spacing: 0.06em;
}

.sec-head__en {
  font-size: 12px;
  letter-spacing: 0.36em;
  color: var(--dim);
  text-transform: uppercase;
}

.sec-head__cn {
  font-size: clamp(22px, 2.4vw, 32px);
  font-weight: 900;
  letter-spacing: 0.02em;
  margin-left: 6px;
}

.sec-head__rule {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line), transparent);
}

/* 进场动画 */
.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}

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

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html {
    scroll-behavior: auto;
  }
}

/* 静态模式（?still=1）：关闭动画，便于截图 / 录屏 / 打印 */
.is-still .reveal {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

.is-still *,
.is-still *::before,
.is-still *::after {
  animation-duration: 0s !important;
  animation-delay: 0s !important;
  transition-duration: 0s !important;
}

/* 屏幕阅读器专用 */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
