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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
}

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

ul, ol {
  padding-left: 1.2em;
}

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

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

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
}

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

[id] {
  scroll-margin-top: 2rem;
}

/* ===== 设计变量 ===== */
:root {
  color-scheme: light;

  /* 品牌色 */
  --color-primary: #0E4D3A;
  --color-primary-deep: #0A3B2C;
  --color-secondary: #1A7A5A;
  --color-gold: #D4A92C;
  --color-orange: #E87A20;
  --color-sand: #C2A878;
  --color-blue: #3A7CA5;
  --color-bg: #F4F6F4;
  --color-text: #1A1A1A;
  --color-white: #FFFFFF;

  /* 字体 */
  --font-display: 'Arial Black', Impact, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
  --font-data: 'DIN Alternate', 'Bahnschrift', 'Barlow Condensed', Impact, Arial, sans-serif;

  /* 容器与圆角 */
  --container-max: 1280px;
  --container-gutter: 1.25rem;
  --radius-sm: 4px;
  --radius-md: 10px;
  --radius-lg: 16px;

  /* 阴影 */
  --shadow-sm: 0 2px 8px rgba(14, 77, 58, 0.08);
  --shadow-md: 0 10px 28px rgba(14, 77, 58, 0.14);

  /* 动效 */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ===== 排版 ===== */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1.15;
  color: var(--color-text);
}

h1 {
  font-size: clamp(2.2rem, 5vw, 4.2rem);
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
}

h3 {
  font-size: 1.25rem;
}

h4 {
  font-size: 1.05rem;
}

.lead {
  font-size: 1.15rem;
  line-height: 1.7;
  color: rgba(26, 26, 26, 0.78);
}

.data-number {
  font-family: var(--font-data);
  font-weight: 700;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
  color: var(--color-primary);
}

.section-dark .data-number,
.page-hero .data-number {
  color: var(--color-white);
}

.link-inline {
  color: var(--color-blue);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

.link-inline:hover {
  color: var(--color-primary);
}

/* ===== 容器 ===== */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-gutter);
}

@media (min-width: 768px) {
  .container {
    padding-inline: 2rem;
  }
}

/* ===== 通用工具 ===== */
.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;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 2000;
  background: var(--color-orange);
  color: var(--color-white);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.6rem 1.2rem;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  transition: top 0.2s ease;
}

.skip-link:focus-visible {
  top: 0;
}

/* ===== 头部 ===== */
.site-header {
  position: relative;
  z-index: 100;
  background: linear-gradient(120deg, var(--color-primary) 0%, var(--color-primary-deep) 100%);
  color: var(--color-white);
  box-shadow: 0 2px 12px rgba(10, 40, 30, 0.14);
}

.header-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 1rem;
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-right: auto;
  min-width: 0;
}

.brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  color: var(--color-gold);
  background: rgba(212, 169, 44, 0.14);
  border: 1px solid rgba(212, 169, 44, 0.28);
  border-radius: 50%;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
  line-height: 1.1;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  color: var(--color-white);
  white-space: nowrap;
}

.brand-sub {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--color-sand);
  white-space: nowrap;
}

.header-quick {
  display: flex;
  align-items: center;
  gap: 0.1rem;
  width: 100%;
  order: 3;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 0.15rem;
}

.header-quick::-webkit-scrollbar {
  display: none;
}

.quick-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.6rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.82);
  white-space: nowrap;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.quick-link:hover {
  color: var(--color-gold);
  background: rgba(255, 255, 255, 0.08);
}

.quick-dot {
  flex-shrink: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-gold);
}

.is-live .quick-dot {
  background: var(--color-orange);
  animation: live-pulse 1.8s ease-in-out infinite;
}

@keyframes live-pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.5);
    opacity: 0.55;
  }
}

/* 移动端导航开关 */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  color: var(--color-white);
  transition: background 0.2s ease;
}

.nav-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
}

.nav-toggle-box {
  display: inline-flex;
  flex-direction: column;
  gap: 5px;
  width: 22px;
}

.nav-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--color-white);
  transition: transform 0.3s var(--ease-out), opacity 0.2s ease;
}

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

/* 主导航折叠区 */
.header-nav {
  position: relative;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--ease-out);
}

.header-nav[data-open] {
  max-height: 520px;
}

.nav-list {
  display: flex;
  flex-direction: column;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-link {
  display: block;
  padding: 0.8rem 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.nav-link:hover {
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.06);
}

.nav-link[aria-current="page"] {
  color: var(--color-gold);
  background: rgba(212, 169, 44, 0.08);
}

/* 头部底部金色加速线 */
.header-nav::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(100deg, var(--color-gold) 0%, var(--color-gold) 30%, var(--color-orange) 30%, var(--color-orange) 56%, transparent 56%);
}

@media (min-width: 768px) {
  .header-top {
    flex-wrap: nowrap;
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
  }

  .header-quick {
    width: auto;
    order: 2;
    overflow: visible;
    padding-bottom: 0;
    margin-left: 0;
  }

  .nav-toggle {
    display: none;
  }

  .header-nav {
    max-height: none;
    overflow: visible;
  }

  .nav-list {
    flex-direction: row;
    gap: 0.2rem;
  }

  .nav-link {
    padding: 0.85rem 1.1rem;
    border-bottom: 2px solid transparent;
  }

  .nav-link:hover {
    background: transparent;
    border-bottom-color: var(--color-gold);
  }

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

/* ===== 页脚 ===== */
.site-footer {
  position: relative;
  margin-top: clamp(3rem, 8vw, 5.5rem);
  background: var(--color-primary);
  color: rgba(255, 255, 255, 0.72);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 1;
  background: linear-gradient(90deg,
    var(--color-gold) 0% 18%,
    var(--color-orange) 18% 36%,
    var(--color-blue) 36% 55%,
    var(--color-gold) 55% 75%,
    var(--color-orange) 75% 100%);
}

.footer-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  padding: clamp(2.5rem, 6vw, 3.5rem) 0 2rem;
}

.footer-brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.footer-brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-gold);
}

.footer-brand-name {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  color: var(--color-white);
}

.footer-slogan {
  margin-top: 0.7rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--color-gold);
}

.footer-trust {
  margin-top: 1rem;
  font-size: 0.85rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.55);
  max-width: 46ch;
}

.footer-heading {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: 1rem;
  padding-bottom: 0.45rem;
  position: relative;
}

.footer-heading::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 24px;
  height: 2px;
  background: var(--color-orange);
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.6rem;
}

.footer-links a {
  display: inline-block;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.92rem;
  transition: color 0.2s ease, transform 0.2s ease;
}

.footer-links a:hover {
  color: var(--color-gold);
  transform: translateX(3px);
}

.footer-contact p {
  margin-bottom: 0.5rem;
  font-size: 0.92rem;
  line-height: 1.6;
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
}

.footer-contact p::before {
  content: "";
  flex-shrink: 0;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--color-gold);
  margin-top: 0.62em;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1rem 0;
}

.footer-bottom-inner {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
}

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

  .footer-bottom-inner {
    flex-direction: row;
    justify-content: space-between;
  }
}

@media (min-width: 900px) {
  .footer-top {
    grid-template-columns: 1.6fr 1fr 1fr 1.4fr;
  }
}

/* ===== 滚动进度与返回顶部 ===== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 3000;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--color-gold), var(--color-orange));
  pointer-events: none;
}

.back-to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 1200;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  color: var(--color-white);
  box-shadow: 0 6px 20px rgba(14, 77, 58, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, background 0.2s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--color-orange);
}

/* ===== 页面横幅与面包屑 ===== */
.page-hero {
  position: relative;
  background: linear-gradient(130deg, var(--color-primary) 0%, var(--color-primary-deep) 70%, var(--color-primary) 100%);
  color: var(--color-white);
  padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(1.5rem, 3vw, 2.5rem);
  overflow: hidden;
}

.page-hero::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 38%;
  height: 100%;
  background: linear-gradient(135deg, rgba(58, 124, 165, 0.22) 0%, transparent 70%);
  clip-path: polygon(35% 0, 100% 0, 100% 100%, 0 100%);
  pointer-events: none;
}

.page-hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 900;
  line-height: 1.15;
  color: var(--color-white);
  margin-bottom: 0.5rem;
  position: relative;
}

.page-hero-desc {
  max-width: 60ch;
  font-size: 1rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.75);
  position: relative;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
  position: relative;
}

.breadcrumbs > * + *::before {
  content: "/";
  margin-right: 0.4rem;
  color: rgba(255, 255, 255, 0.35);
}

.breadcrumbs a {
  color: rgba(255, 255, 255, 0.75);
  transition: color 0.2s ease;
}

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

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

/* ===== 章节 ===== */
.section {
  padding: clamp(3rem, 7vw, 5rem) 0;
}

.section-tight {
  padding: 1.5rem 0;
}

.section-dark {
  background: var(--color-primary);
  color: rgba(255, 255, 255, 0.8);
}

.section-dark h1,
.section-dark h2,
.section-dark h3,
.section-dark h4 {
  color: var(--color-white);
}

.section-dark .lead {
  color: rgba(255, 255, 255, 0.75);
}

/* ===== 按钮 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.4;
  text-align: center;
  transition: background 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.btn-primary {
  background: var(--color-secondary);
  color: var(--color-white);
}

.btn-primary:hover {
  background: var(--color-primary);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.btn-gold {
  background: var(--color-gold);
  color: #1A1A1A;
}

.btn-gold:hover {
  background: #C39E24;
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--color-sand);
  color: var(--color-text);
}

.btn-outline:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn-dark {
  background: var(--color-primary);
  color: var(--color-white);
}

.btn-dark:hover {
  background: var(--color-primary-deep);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

/* ===== 卡片 ===== */
.card {
  background: var(--color-white);
  border: 1px solid rgba(14, 77, 58, 0.08);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
  transition: box-shadow 0.3s var(--ease-out), transform 0.3s var(--ease-out), border-color 0.3s ease;
}

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

.card-flat {
  background: var(--color-white);
  border: 1px solid rgba(14, 77, 58, 0.08);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
}

/* ===== 标签 ===== */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.5;
  background: rgba(14, 77, 58, 0.06);
  color: var(--color-primary);
}

.tag-gold {
  background: rgba(212, 169, 44, 0.14);
  color: #8A6D10;
}

.tag-orange {
  background: rgba(232, 122, 32, 0.12);
  color: #B85E0F;
}

.tag-blue {
  background: rgba(58, 124, 165, 0.12);
  color: #2B6286;
}

/* ===== 栅格 ===== */
.grid {
  display: grid;
  gap: var(--grid-gap, 1.5rem);
}

.grid-2,
.grid-3,
.grid-4 {
  grid-template-columns: 1fr;
}

@media (min-width: 600px) {
  .grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

@media (min-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

/* ===== 媒体占位 ===== */
.media-frame {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(194, 168, 120, 0.22), rgba(14, 77, 58, 0.05));
}

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

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

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

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

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

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

/* ===== 动效降级 ===== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

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