/* ============ 基础变量 ============ */
:root {
  --bwin-forest: #0B3D2E;
  --bwin-forest-deep: #08271D;
  --bwin-spring: #1B6B4E;
  --bwin-gold: #D4AF37;
  --bwin-wine: #8B1E1E;
  --bwin-cream: #F5F0E6;
  --bwin-ink: #1A2E22;
  --bwin-mist: #C8D6C8;
  --bwin-flame: #E4572E;
  --font-display: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif;
  --header-h: 88px;
  --header-h-mobile: 64px;
  --container: 1240px;
  --gutter: 24px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --t-fast: 0.2s ease;
  --t-med: 0.35s var(--ease);
}

/* ============ Reset 与基础排版 ============ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.75;
  color: var(--bwin-ink);
  background: var(--bwin-cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main {
  display: block;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1.25;
  margin: 0 0 0.6em;
  color: var(--bwin-ink);
}

h1 { font-size: clamp(32px, 5vw, 52px); }
h2 { font-size: clamp(24px, 3.6vw, 38px); }
h3 { font-size: 20px; }
h4 { font-size: 17px; }

p {
  margin: 0 0 1em;
}

a {
  color: var(--bwin-spring);
  text-decoration: none;
}

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

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

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

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

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

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

/* ============ 通用布局容器 ============ */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container-narrow {
  width: 100%;
  max-width: calc(960px + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: clamp(48px, 8vw, 88px);
}

.section-dark {
  background: var(--bwin-forest);
  color: var(--bwin-cream);
}

.section-cream {
  background: var(--bwin-cream);
}

.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;
}

/* ============ 章节标题体系 ============ */
.section-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: clamp(28px, 5vw, 48px);
}

.section-num {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(44px, 6vw, 76px);
  line-height: 0.9;
  letter-spacing: 0.02em;
  color: transparent;
  -webkit-text-stroke: 2px var(--bwin-gold);
}

.section-title {
  font-size: clamp(20px, 3vw, 30px);
  letter-spacing: 0.02em;
  margin-bottom: 0;
}

.section-desc {
  max-width: 640px;
  font-size: 14px;
  color: rgba(26, 46, 34, 0.72);
}

.section-head-light .section-title {
  color: var(--bwin-cream);
}

.section-head-light .section-desc {
  color: rgba(245, 240, 230, 0.72);
}

/* ============ 网格 ============ */
.grid {
  display: grid;
  gap: var(--gutter);
}

.grid > * {
  min-width: 0;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 900px) {
  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* ============ 卡片 ============ */
.card {
  position: relative;
  background: var(--bwin-cream);
  border: 1px solid var(--bwin-mist);
  border-top: 3px solid var(--bwin-gold);
  padding: 24px;
  transition: transform var(--t-med), box-shadow var(--t-med);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(11, 61, 46, 0.14);
}

.card-title {
  font-size: 18px;
  margin-bottom: 8px;
}

.card-meta {
  font-size: 13px;
  color: rgba(26, 46, 34, 0.58);
  margin-bottom: 12px;
}

.card-excerpt {
  font-size: 14px;
  color: rgba(26, 46, 34, 0.8);
}

/* ============ 图片容器（页面阶段放置图片） ============ */
.media-frame {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--bwin-mist);
  aspect-ratio: 4 / 3;
}

.media-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(135deg, rgba(212, 175, 55, 0.16) 25%, transparent 25%) 0 0 / 32px 32px,
    linear-gradient(-135deg, rgba(11, 61, 46, 0.1) 25%, transparent 25%) 0 0 / 32px 32px;
}

.media-frame img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-frame-16x9 { aspect-ratio: 16 / 9; }
.media-frame-1x1 { aspect-ratio: 1 / 1; }
.media-frame-portrait { aspect-ratio: 3 / 4; }

/* ============ 按钮 ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  letter-spacing: 0.06em;
  color: var(--bwin-forest);
  background: transparent;
  border: 1.5px solid currentColor;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
}

.btn:hover {
  transform: translateY(-2px);
}

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

.btn-gold:hover {
  background: transparent;
  color: var(--bwin-gold);
}

.btn-outline-light {
  border-color: var(--bwin-cream);
  color: var(--bwin-cream);
}

.btn-outline-light:hover {
  background: var(--bwin-cream);
  color: var(--bwin-forest);
}

/* ============ 面包屑 ============ */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 24px 0 0;
  font-size: 13px;
  color: rgba(26, 46, 34, 0.64);
}

.breadcrumbs a {
  color: var(--bwin-spring);
  font-weight: 500;
}

.breadcrumbs a:hover {
  color: var(--bwin-gold);
}

.breadcrumbs .sep {
  color: var(--bwin-gold);
  font-weight: 900;
}

.breadcrumbs [aria-current="page"] {
  color: var(--bwin-ink);
  font-weight: 700;
}

/* ============ 标签与分隔线 ============ */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--bwin-forest);
  background: rgba(212, 175, 55, 0.16);
  border: 1px solid rgba(212, 175, 55, 0.65);
}

.tag-red {
  color: var(--bwin-wine);
  background: rgba(139, 30, 30, 0.08);
  border-color: rgba(139, 30, 30, 0.4);
}

.divider {
  height: 1px;
  margin: 24px 0;
  background: var(--bwin-mist);
  border: none;
}

.divider-gold {
  height: 2px;
  margin: 24px 0;
  border: none;
  background: linear-gradient(90deg, var(--bwin-gold), rgba(212, 175, 55, 0.1));
}

/* ============ 滚动进度条 ============ */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--bwin-gold) 0%, var(--bwin-gold) 70%, var(--bwin-wine) 70%, var(--bwin-wine) 100%);
  z-index: 200;
  pointer-events: none;
  will-change: width;
}

/* ============ 页头 ============ */
.skip-link {
  position: fixed;
  top: -48px;
  left: 16px;
  z-index: 300;
  padding: 10px 20px;
  background: var(--bwin-gold);
  color: var(--bwin-forest);
  font-weight: 700;
  font-size: 14px;
  transition: top 0.2s ease;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background-color: var(--bwin-forest);
  background-image: repeating-conic-gradient(rgba(245, 240, 230, 0.03) 0% 25%, transparent 0% 50%);
  background-size: 8px 8px;
}

.site-header::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--bwin-gold), var(--bwin-wine));
  z-index: 1;
}

.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--bwin-gold) 0%, var(--bwin-gold) 82%, var(--bwin-wine) 82%, var(--bwin-wine) 100%);
}

.header-inner {
  position: relative;
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand-logo {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-shrink: 0;
}

.brand-main {
  position: relative;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 30px;
  line-height: 1;
  letter-spacing: 0.06em;
  color: var(--bwin-gold);
}

.brand-main::after {
  content: "";
  position: absolute;
  top: -4px;
  right: -6px;
  width: 6px;
  height: 6px;
  background: var(--bwin-wine);
}

.brand-sub {
  padding-left: 10px;
  border-left: 1px solid rgba(212, 175, 55, 0.6);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--bwin-cream);
  white-space: nowrap;
}

.header-nav {
  margin-left: auto;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-link {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 13px 14px 15px;
  min-width: 56px;
}

.nav-link::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 14px;
  width: 6px;
  height: 6px;
  border: 1px solid var(--bwin-gold);
  transform: rotate(45deg);
  opacity: 0;
  transition: opacity var(--t-fast);
}

.nav-index {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.14em;
  color: var(--bwin-gold);
}

.nav-label {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.08em;
  color: var(--bwin-cream);
  transition: color var(--t-fast);
}

.nav-link:hover .nav-label {
  color: var(--bwin-gold);
}

.nav-link:hover::before {
  opacity: 1;
}

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

.nav-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 7px;
  height: 2px;
  background: var(--bwin-gold);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.header-search {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--bwin-gold);
  border: 1px solid rgba(212, 175, 55, 0.5);
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}

.header-search:hover {
  background: var(--bwin-gold);
  border-color: var(--bwin-gold);
  color: var(--bwin-forest);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid rgba(212, 175, 55, 0.5);
  transition: border-color var(--t-fast), background var(--t-fast);
}

.nav-toggle:hover {
  background: rgba(212, 175, 55, 0.12);
  border-color: var(--bwin-gold);
}

.toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--bwin-gold);
  transition: transform var(--t-fast), opacity var(--t-fast);
}

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

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

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

/* 导航遮罩 */
.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 95;
  background: rgba(8, 39, 29, 0.66);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}

.nav-overlay[data-open] {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.3s ease;
}

body.nav-locked {
  overflow: hidden;
}

/* ============ 页脚 ============ */
.site-footer {
  background-color: var(--bwin-forest-deep);
  background-image: repeating-conic-gradient(rgba(245, 240, 230, 0.025) 0% 25%, transparent 0% 50%);
  background-size: 10px 10px;
  color: var(--bwin-cream);
  position: relative;
}

.site-footer::before {
  content: "";
  display: block;
  height: 4px;
  background: linear-gradient(90deg, var(--bwin-gold) 0%, var(--bwin-gold) 82%, var(--bwin-wine) 82%, var(--bwin-wine) 100%);
}

.site-footer::after {
  content: "";
  position: absolute;
  top: 4px;
  bottom: 0;
  left: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--bwin-gold), var(--bwin-wine));
}

.footer-main {
  position: relative;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 1.2fr;
  gap: 40px;
  padding: 48px 0 40px;
}

.footer-brand-block .brand-logo {
  margin-bottom: 14px;
}

.site-footer .brand-main {
  font-size: 36px;
}

.site-footer .brand-sub {
  color: rgba(245, 240, 230, 0.78);
}

.footer-slogan {
  max-width: 340px;
  margin: 0;
  font-size: 14px;
  color: rgba(245, 240, 230, 0.78);
  letter-spacing: 0.03em;
}

.footer-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.14em;
  color: var(--bwin-gold);
}

.footer-heading::before {
  content: "";
  width: 20px;
  height: 2px;
  background: var(--bwin-gold);
  flex-shrink: 0;
}

.footer-nav-list li + li {
  margin-top: 8px;
}

.footer-nav-list a {
  position: relative;
  padding-left: 16px;
  font-size: 14px;
  color: rgba(245, 240, 230, 0.76);
  transition: color var(--t-fast);
}

.footer-nav-list a::before {
  content: "»";
  position: absolute;
  left: 0;
  font-weight: 700;
  color: var(--bwin-gold);
  opacity: 0.85;
}

.footer-nav-list a:hover {
  color: var(--bwin-gold);
}

.footer-contact-list li {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
  margin-bottom: 10px;
  font-size: 14px;
  color: rgba(245, 240, 230, 0.76);
  overflow-wrap: anywhere;
}

.footer-contact-label {
  color: var(--bwin-gold);
  font-weight: 700;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 24px;
  padding: 20px 0;
  border-top: 1px solid rgba(212, 175, 55, 0.24);
  font-size: 13px;
  color: rgba(245, 240, 230, 0.62);
}

.footer-bottom-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-right: auto;
}

.footer-bottom-links a {
  color: rgba(245, 240, 230, 0.62);
  border-bottom: 1px solid transparent;
  transition: color var(--t-fast), border-color var(--t-fast);
}

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

.footer-icp,
.footer-copy {
  color: rgba(245, 240, 230, 0.5);
}

/* ============ 内页头部 ============ */
.page-head {
  padding-block: clamp(32px, 6vw, 64px);
}

.page-title {
  margin-bottom: 8px;
}

.page-sub {
  font-size: 15px;
  color: rgba(26, 46, 34, 0.68);
  max-width: 640px;
}

/* ============ 滚动显现 ============ */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

[data-reveal][data-reveal-delay="1"] { transition-delay: 0.12s; }
[data-reveal][data-reveal-delay="2"] { transition-delay: 0.24s; }
[data-reveal][data-reveal-delay="3"] { transition-delay: 0.36s; }

/* ============ 响应式 ============ */
@media (max-width: 1023px) {
  .header-inner {
    height: var(--header-h-mobile);
    gap: 16px;
  }

  .brand-main {
    font-size: 26px;
  }

  .brand-sub {
    font-size: 10px;
    letter-spacing: 0.12em;
  }

  .header-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    width: min(320px, 88vw);
    margin-left: 0;
    padding: 92px 28px 40px;
    background: var(--bwin-forest-deep);
    border-left: 2px solid var(--bwin-gold);
    box-shadow: -16px 0 32px rgba(0, 0, 0, 0.28);
    overflow-y: auto;
    visibility: hidden;
    transform: translateX(105%);
    transition: transform 0.35s var(--ease), visibility 0s linear 0.35s;
  }

  .header-nav[data-open] {
    visibility: visible;
    transform: translateX(0);
    transition: transform 0.35s var(--ease), visibility 0s linear 0s;
  }

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

  .nav-link {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    min-width: 0;
    padding: 15px 20px;
    border-left: 3px solid transparent;
    transition: background var(--t-fast), border-color var(--t-fast);
  }

  .nav-link::before {
    display: none;
  }

  .nav-link:hover {
    background: rgba(212, 175, 55, 0.08);
    border-left-color: var(--bwin-gold);
  }

  .nav-link[aria-current="page"] {
    background: rgba(212, 175, 55, 0.12);
    border-left-color: var(--bwin-gold);
  }

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

  .nav-index {
    font-size: 13px;
    min-width: 26px;
    color: var(--bwin-gold);
  }

  .nav-label {
    font-size: 16px;
    color: var(--bwin-cream);
  }

  .nav-toggle {
    display: inline-flex;
  }

  .header-actions {
    margin-left: auto;
  }
}

@media (max-width: 900px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .footer-brand-block {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .footer-top {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-bottom-links {
    margin-right: 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;
    transition-delay: 0ms !important;
  }

  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
}
