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

:root {
  --gold: #D4AF37;
  --gold-dark: #b8942f;
  --gold-light: #e6c95a;
  --deep-blue: #0A1F3C;
  --deep-blue-light: #122d52;
  --accent-orange: #FF7A00;
  --accent-orange-dark: #e06e00;
  --light-gray: #E8ECF1;
  --dark-gray: #2C3E50;
  --white: #FFFFFF;
  --success: #2ECC71;
  --alert: #E74C3C;
  --font-heading: 'Space Grotesk', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-body: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --container-max: 1200px;
  --header-height: 72px;
  --transition-speed: 0.3s;
  --radius-cut: 6px;
  --shadow-card: 0 4px 20px rgba(0,0,0,0.25);
}

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

body {
  font-family: var(--font-body);
  font-weight: 400;
  background-color: var(--deep-blue);
  color: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--gold);
  text-decoration: none;
  transition: color var(--transition-speed) ease;
}

a:hover {
  color: var(--gold-light);
}

a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
  border-radius: 2px;
}

ul, ol {
  list-style: none;
}

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

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

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  padding: 0.5rem 1rem;
  background: var(--gold);
  color: var(--deep-blue);
  font-weight: 700;
  z-index: 9999;
  clip: rect(0 0 0 0);
  overflow: hidden;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0.5rem;
  clip: auto;
  overflow: visible;
}

/* ── 容器 ── */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── 按钮 ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.5rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.9375rem;
  border-radius: var(--radius-cut);
  transition: all var(--transition-speed) ease;
  white-space: nowrap;
  line-height: 1.4;
}

.btn--primary {
  background: var(--gold);
  color: var(--deep-blue);
}

.btn--primary:hover {
  background: var(--gold-dark);
  color: var(--deep-blue);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
}

.btn--accent {
  background: var(--accent-orange);
  color: var(--white);
}

.btn--accent:hover {
  background: var(--accent-orange-dark);
  color: var(--white);
  box-shadow: 0 0 20px rgba(255, 122, 0, 0.3);
}

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

/* ── 面包屑 ── */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  align-items: center;
  padding: 1rem 0;
  font-size: 0.8125rem;
  color: var(--light-gray);
}

.breadcrumb a {
  color: var(--gold);
}

.breadcrumb a:hover {
  color: var(--gold-light);
}

.breadcrumb__separator {
  color: var(--dark-gray);
  margin: 0 0.125rem;
}

/* ── 章节标题 ── */
.section__title {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 2rem;
}

.section__number {
  font-family: var(--font-heading);
  font-weight: 300;
  font-size: 3rem;
  color: var(--gold);
  line-height: 1;
  letter-spacing: -0.02em;
  opacity: 0.7;
}

.section__text {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ── 卡片 ── */
.card {
  background: var(--light-gray);
  color: var(--deep-blue);
  padding: 1.5rem;
  border-radius: var(--radius-cut);
  transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}

.card--cut {
  clip-path: polygon(0% 0%, 100% 0%, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0% 100%);
}

/* ── 标签 ── */
.tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--gold);
  color: var(--deep-blue);
  border-radius: 2px;
}

.tag--accent {
  background: var(--accent-orange);
  color: var(--white);
}

.tag--success {
  background: var(--success);
  color: var(--white);
}

.tag--alert {
  background: var(--alert);
  color: var(--white);
}

/* ── 网格 ── */
.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.5rem;
}

.grid__item {
  grid-column: span 12;
}

@media (min-width: 640px) {
  .grid__item--span-6 { grid-column: span 6; }
  .grid__item--span-4 { grid-column: span 4; }
  .grid__item--span-3 { grid-column: span 3; }
  .grid__item--span-8 { grid-column: span 8; }
}

@media (min-width: 1024px) {
  .grid__item--span-6 { grid-column: span 6; }
  .grid__item--span-4 { grid-column: span 4; }
  .grid__item--span-3 { grid-column: span 3; }
  .grid__item--span-8 { grid-column: span 8; }
}

/* ── 滚动进度条 ── */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--gold);
  z-index: 9998;
  pointer-events: none;
  transition: width 0.1s linear;
}

@media (prefers-reduced-motion: reduce) {
  .progress-bar {
    display: none;
  }
}

/* ── 头部 ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--deep-blue);
  border-bottom: 2px solid var(--gold);
  box-shadow: 0 2px 16px rgba(0,0,0,0.5);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: var(--header-height);
  gap: 1rem;
}

.header__logo {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  text-decoration: none;
  flex-shrink: 0;
}

.header__logo-text {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--gold);
  letter-spacing: 0.06em;
}

.header__logo-desc {
  font-size: 0.6875rem;
  color: var(--light-gray);
  letter-spacing: 0.04em;
  opacity: 0.7;
}

.header__nav {
  display: flex;
  align-items: center;
}

.nav__list {
  display: flex;
  gap: 0.25rem;
}

.nav__item {
  position: relative;
}

.nav__link {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 0.75rem;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--white);
  text-decoration: none;
  border-radius: 4px;
  transition: background var(--transition-speed) ease, color var(--transition-speed) ease;
  white-space: nowrap;
}

.nav__link:hover {
  background: rgba(212, 175, 55, 0.12);
  color: var(--gold);
}

.nav__link[aria-current="page"] {
  color: var(--gold);
  background: rgba(212, 175, 55, 0.08);
}

.nav__link[aria-current="page"]::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 0.75rem;
  right: 0.75rem;
  height: 2px;
  background: var(--gold);
  border-radius: 1px;
}

.nav__index {
  font-family: var(--font-heading);
  font-weight: 300;
  font-size: 0.6875rem;
  color: var(--gold);
  opacity: 0.6;
  letter-spacing: 0.02em;
  min-width: 1.6em;
  text-align: right;
}

.header__cta {
  flex-shrink: 0;
  font-size: 0.8125rem;
  padding: 0.5rem 1.125rem;
}

.header__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  gap: 5px;
  border-radius: 4px;
  transition: background var(--transition-speed) ease;
}

.header__toggle:hover {
  background: rgba(212, 175, 55, 0.12);
}

.toggle__bar {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
  transition: transform var(--transition-speed) ease, opacity var(--transition-speed) ease;
}

.header__toggle[aria-expanded="true"] .toggle__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.header__toggle[aria-expanded="true"] .toggle__bar:nth-child(2) {
  opacity: 0;
}

.header__toggle[aria-expanded="true"] .toggle__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── 移动端导航 ── */
@media (max-width: 767px) {
  .header__inner {
    padding: 0 1rem;
    height: 64px;
    gap: 0.5rem;
  }

  .header__logo-text {
    font-size: 1.0625rem;
  }

  .header__logo-desc {
    display: none;
  }

  .header__nav {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--deep-blue);
    flex-direction: column;
    align-items: stretch;
    padding: 1.5rem 1.5rem 2rem;
    transform: translateY(-110%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.35s ease, opacity 0.35s ease, visibility 0.35s ease;
    overflow-y: auto;
    z-index: 90;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
  }

  .header__nav[data-open] {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav__list {
    flex-direction: column;
    gap: 0.25rem;
  }

  .nav__link {
    font-size: 1.0625rem;
    padding: 0.875rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
  }

  .nav__index {
    font-size: 0.8125rem;
    min-width: 2em;
  }

  .nav__link[aria-current="page"]::after {
    display: none;
  }

  .nav__link[aria-current="page"] {
    background: rgba(212, 175, 55, 0.12);
    border-left: 3px solid var(--gold);
    padding-left: calc(1rem - 3px);
  }

  .header__cta {
    display: none;
  }

  .header__toggle {
    display: flex;
  }
}

/* ── 平板 ── */
@media (min-width: 768px) and (max-width: 1023px) {
  .nav__link {
    font-size: 0.8125rem;
    padding: 0.5rem 0.5rem;
  }

  .nav__index {
    font-size: 0.625rem;
    min-width: 1.4em;
  }

  .header__cta {
    font-size: 0.75rem;
    padding: 0.4375rem 0.875rem;
  }

  .header__logo-text {
    font-size: 1.125rem;
  }
}

/* ── 页脚 ── */
.site-footer {
  background: var(--dark-gray);
  color: var(--light-gray);
  border-top: 2px solid var(--gold);
  padding: 3rem 0 0;
  margin-top: 4rem;
}

.footer__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

@media (min-width: 640px) {
  .footer__inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1024px) {
  .footer__inner {
    grid-template-columns: 1.2fr 1fr 0.8fr;
    gap: 3rem;
  }
}

.footer__col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer__logo {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.375rem;
  color: var(--gold);
  letter-spacing: 0.06em;
  line-height: 1.3;
}

.footer__trust {
  font-size: 0.875rem;
  color: var(--light-gray);
  opacity: 0.8;
  line-height: 1.7;
  max-width: 32em;
}

.footer__heading {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--gold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.footer__contact-list {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  font-size: 0.875rem;
}

.footer__contact-list li {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  line-height: 1.5;
}

.footer__contact-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.7;
}

.footer__contact-list a {
  color: var(--light-gray);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(255,255,255,0.2);
}

.footer__contact-list a:hover {
  color: var(--gold);
  text-decoration-color: var(--gold);
}

.footer__note {
  font-size: 0.8125rem;
  color: var(--light-gray);
  opacity: 0.6;
  font-style: italic;
  margin-top: 0.5rem;
  line-height: 1.6;
}

.footer__link-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer__link-list a {
  color: var(--light-gray);
  font-size: 0.875rem;
  padding: 0.25rem 0;
  display: inline-block;
  transition: color var(--transition-speed) ease, padding-left var(--transition-speed) ease;
}

.footer__link-list a:hover {
  color: var(--gold);
  padding-left: 0.375rem;
}

.footer__bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.5rem 1.5rem;
  margin-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.5);
}

.footer__icp,
.footer__copyright {
  text-align: center;
}

@media (min-width: 640px) {
  .footer__bottom {
    flex-direction: row;
    justify-content: space-between;
    max-width: var(--container-max);
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 639px) {
  .footer__contact-list li {
    flex-direction: column;
  }
}

/* ── 图片容器基础 ── */
.img-container {
  position: relative;
  overflow: hidden;
  background: var(--deep-blue-light);
  border-radius: var(--radius-cut);
}

.img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.img-container--cut {
  clip-path: polygon(0% 0%, 100% 0%, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0% 100%);
}

.img-container--ratio-16-9 {
  aspect-ratio: 16 / 9;
}

.img-container--ratio-4-3 {
  aspect-ratio: 4 / 3;
}

.img-container--ratio-1-1 {
  aspect-ratio: 1 / 1;
}

/* ── 通用排版 ── */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
  color: var(--white);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.125rem; }

.body-text {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--light-gray);
}

.text--small {
  font-size: 0.875rem;
  color: var(--light-gray);
  opacity: 0.7;
}

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

.text--accent {
  color: var(--accent-orange);
}

/* ── 斜线装饰 ── */
.divider--slant {
  height: 2px;
  background: linear-gradient(135deg, var(--gold) 0%, transparent 100%);
  width: 100%;
  max-width: 80px;
  margin: 1rem 0;
}

.divider--slant-full {
  height: 2px;
  background: linear-gradient(135deg, var(--gold) 0%, rgba(212,175,55,0.1) 80%, transparent 100%);
  width: 100%;
  margin: 1.5rem 0;
}

/* ── 保持可访问性 ── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .header__nav {
    transition: opacity 0.2s ease, visibility 0.2s ease;
    transform: none;
  }

  .header__nav[data-open] {
    transform: none;
  }

  .card:hover {
    transform: none;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ── focus-visible 全局 ── */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
  border-radius: 2px;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
  border-radius: 4px;
}

/* ── 选中文本 ── */
::selection {
  background: var(--gold);
  color: var(--deep-blue);
}

/* ── 滚动条 ── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--deep-blue);
}

::-webkit-scrollbar-thumb {
  background: var(--gold);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gold-dark);
}
