/* /assets/site.css */

:root {
  --ink: #0B1D2A;
  --paper: #F4EFE6;
  --gold: #C7A46C;
  --red: #B23B3B;
  --azure: #1D4E6B;
  --cyan-gray: #7A8A99;
  --slate: #5B6470;
  --pine: #2F7D7D;
  --gold-light: #E4D5B5;
  --charcoal: #1A1A1A;
  --font-display: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --font-body: "Noto Serif SC", "Songti SC", serif;
  --font-data: "JetBrains Mono", Consolas, monospace;
  --header-h: 76px;
  --container: 1200px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 240ms;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  scroll-behavior: auto;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--charcoal);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, p, ul {
  margin-top: 0;
}

h1, .h1 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 6rem);
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.01em;
  color: var(--ink);
}

h2, .h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1.15;
  font-weight: 800;
  color: var(--ink);
}

h3, .h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1.2;
  font-weight: 700;
  color: var(--ink);
}

ul {
  padding-left: 0;
  list-style: none;
}

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

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

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

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

#main-content {
  scroll-margin-top: calc(var(--header-h) + 16px);
}

::selection {
  background: var(--gold);
  color: var(--ink);
}

/* 头部 */

.skip-link {
  position: absolute;
  top: -100px;
  left: 24px;
  z-index: 200;
  background: var(--gold);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  padding: 12px 16px;
  text-decoration: none;
  transition: top var(--dur) var(--ease);
}

.skip-link:focus {
  top: 16px;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  color: var(--paper);
  background: transparent;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.site-header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    var(--gold) 0 120px,
    rgba(199, 164, 108, 0.25) 120px 220px,
    var(--gold) 220px 340px,
    transparent 340px
  );
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
}

.site-header[data-scrolled] {
  background: rgba(11, 29, 42, 0.94);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.site-header[data-scrolled]::after {
  opacity: 1;
}

.scroll-progress {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--red));
  transform: scaleX(0);
  transform-origin: left;
  pointer-events: none;
  z-index: 5;
}

.header-inner {
  max-width: 1440px;
  margin-inline: auto;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 40px;
  position: relative;
}

.header-brand {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
}

.header-brand-cn {
  font-size: 26px;
  color: var(--gold);
}

.header-brand-suffix {
  font-size: 18px;
  color: var(--paper);
  margin-left: 3px;
  font-weight: 700;
}

.brand-corner {
  position: absolute;
  top: 2px;
  right: -10px;
  width: 7px;
  height: 7px;
  background: var(--red);
  transform: rotate(45deg);
}

.site-nav {
  margin-inline: auto;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
}

.nav-item {
  margin: 0;
}

.nav-link {
  display: block;
  position: relative;
  padding: 12px 16px;
  color: rgba(244, 239, 230, 0.86);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--dur) var(--ease);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 6px;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur) var(--ease);
}

.nav-link:hover {
  color: var(--paper);
}

.nav-link:hover::after,
.nav-link[aria-current="page"]::after {
  transform: scaleX(1);
}

.nav-link[aria-current="page"] {
  color: var(--gold);
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 12px;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(199, 164, 108, 0.4);
  padding: 6px 10px;
  color: var(--paper);
  font-family: var(--font-data);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--pine);
  animation: breathe 2.4s ease-out infinite;
}

.live-text {
  color: var(--gold-light);
}

@keyframes breathe {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(47, 125, 125, 0.6);
  }
  70% {
    box-shadow: 0 0 0 7px rgba(47, 125, 125, 0);
  }
}

.nav-toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: 1px solid rgba(199, 164, 108, 0.4);
  color: var(--paper);
}

.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}

.nav-toggle-label {
  margin-top: 2px;
  font-family: var(--font-display);
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.08em;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(6px) 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(-6px) rotate(-45deg);
}

/* 页脚 */

.site-footer {
  position: relative;
  margin-top: clamp(64px, 8vw, 120px);
  background: var(--ink);
  color: var(--paper);
  border-top: 1px solid rgba(199, 164, 108, 0.3);
}

.site-footer::before {
  content: "";
  display: block;
  height: 4px;
  background: repeating-linear-gradient(
    135deg,
    var(--gold) 0 10px,
    var(--red) 10px 20px,
    transparent 20px 30px
  );
}

.footer-inner {
  max-width: var(--container);
  margin-inline: auto;
  padding: 64px 24px 48px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
}

.footer-brand {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 28px;
  color: var(--gold);
  letter-spacing: 0.04em;
  margin-bottom: 12px;
}

.footer-slogan {
  max-width: 30em;
  color: rgba(244, 239, 230, 0.72);
  line-height: 1.7;
}

.footer-label {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  border-bottom: 1px solid rgba(199, 164, 108, 0.25);
  padding-bottom: 8px;
  margin-bottom: 16px;
}

.footer-contact,
.footer-hours {
  color: rgba(244, 239, 230, 0.62);
  font-size: 13px;
  line-height: 1.7;
  margin-bottom: 8px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.footer-links a {
  color: rgba(244, 239, 230, 0.72);
  font-family: var(--font-display);
  font-size: 14px;
  padding: 4px 0;
  text-decoration: none;
  border-bottom: 1px solid rgba(199, 164, 108, 0.12);
  width: fit-content;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.footer-links a:hover {
  color: var(--gold);
  border-color: var(--gold);
}

.footer-disclaimer {
  max-width: var(--container);
  margin-inline: auto;
  padding: 20px 24px;
  border-top: 1px solid rgba(199, 164, 108, 0.15);
  color: var(--cyan-gray);
  font-size: 12px;
  line-height: 1.8;
}

.footer-bottom {
  max-width: var(--container);
  margin-inline: auto;
  padding: 16px 24px 32px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  color: var(--cyan-gray);
  font-size: 12px;
}

.footer-copy,
.footer-icp {
  margin: 0;
}

/* 基础布局 */

.site-main {
  min-height: 60vh;
}

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.page-inner {
  padding-block: calc(var(--header-h) + 32px) 72px;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
  gap: 48px;
  align-items: start;
}

/* 面包屑 */

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--slate);
  margin-bottom: 40px;
}

.breadcrumbs a {
  color: var(--azure);
  text-decoration: none;
}

.breadcrumbs a:hover {
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-underline-offset: 4px;
}

.breadcrumbs .sep {
  color: var(--gold);
}

.breadcrumbs [aria-current="page"] {
  color: var(--gold);
}

/* 按钮 */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}

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

.btn--gold:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
  transform: translateY(-2px);
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: rgba(11, 29, 42, 0.4);
}

.btn--ghost:hover {
  border-color: var(--gold);
  color: var(--azure);
}

/* 卡片 */

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.card {
  position: relative;
  background: rgba(244, 239, 230, 0.85);
  border: 1px solid rgba(11, 29, 42, 0.16);
  box-shadow: 4px 4px 0 rgba(11, 29, 42, 0.06);
  padding: 28px;
}

.card:hover {
  box-shadow: 6px 6px 0 rgba(11, 29, 42, 0.08);
}

/* 数据面板 */

.data-panel {
  position: relative;
  background: var(--ink);
  border: 1px solid rgba(199, 164, 108, 0.4);
  color: var(--paper);
  padding: 24px;
  box-shadow: 8px 8px 0 rgba(11, 29, 42, 0.12);
}

.data-panel::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  width: 48px;
  height: 2px;
  background: var(--red);
}

.data-panel__label {
  display: block;
  font-family: var(--font-data);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}

.data-value {
  margin: 0;
  font-family: var(--font-data);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.1;
  color: var(--paper);
}

.data-panel__unit {
  color: var(--gold);
  font-size: 0.5em;
  vertical-align: super;
}

/* 章节标记 */

.chapter-number {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(6rem, 16vw, 10rem);
  line-height: 0.75;
  color: transparent;
  -webkit-text-stroke: 1px rgba(199, 164, 108, 0.55);
  pointer-events: none;
  user-select: none;
}

.section-hint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--slate);
}

.section-hint::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--gold);
}

.accent-line {
  display: block;
  width: 64px;
  height: 2px;
  background: var(--gold);
  margin-bottom: 16px;
}

.meta-text {
  font-family: var(--font-data);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--slate);
}

/* 媒体与图片容器 */

.media-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.media-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--azure);
  border: 1px solid rgba(199, 164, 108, 0.5);
}

.media-frame::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(244, 239, 230, 0.25);
  pointer-events: none;
}

.media-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-frame--wide {
  aspect-ratio: 16 / 9;
}

.media-frame--portrait {
  aspect-ratio: 3 / 4;
}

.media-frame--square {
  aspect-ratio: 1 / 1;
}

.media-caption {
  font-size: 12px;
  color: var(--slate);
  padding: 8px 2px 0;
  border-bottom: 1px solid var(--gold-light);
}

/* 响应式 */

@media (max-width: 900px) {
  .header-inner {
    padding: 0 20px;
    gap: 16px;
  }

  .header-brand-cn {
    font-size: 22px;
  }

  .header-brand-suffix {
    font-size: 16px;
  }

  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-inline: 0;
    background: rgba(11, 29, 42, 0.98);
    border-top: 1px solid rgba(199, 164, 108, 0.18);
    padding: 8px 24px 20px;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility 0s linear var(--dur);
  }

  .site-nav[data-open="true"] {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-link {
    padding: 14px 8px;
    font-size: 16px;
    border-bottom: 1px solid rgba(244, 239, 230, 0.06);
  }

  .nav-link::after {
    left: 8px;
    right: auto;
    width: 20px;
  }

  .content-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 36px;
    padding-top: 48px;
  }
}

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

  .media-grid {
    grid-template-columns: 1fr;
  }

  .header-tools .live-badge {
    display: none;
  }

  .header-inner {
    gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .live-dot {
    animation: none;
  }
}
