/* ================================================
   /assets/site.css — 大发中国官方主站共享样式
   ================================================ */

/* ---------- Design tokens ---------- */
:root {
  --color-steppe: #3A7D44;
  --color-steppe-dark: #2E6B38;
  --color-tech: #1E3A8A;
  --color-gold: #D4AF37;
  --color-warn: #C99700;
  --color-milk: #F4F4F0;
  --color-charcoal: #2B2B2B;
  --color-green-gray: #E3EDE4;
  --color-blue-gray: #D6E0EA;
  --color-deep: #0F2027;

  --font-head: "Noto Serif SC", "Songti SC", "STSong", SimSun, serif;
  --font-body: "Noto Sans SC", "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;

  --font-scale-h1: clamp(2.5rem, 5vw, 3.5rem);
  --font-scale-h2: clamp(1.9rem, 3.5vw, 2.5rem);
  --font-scale-h3: 1.75rem;
  --font-scale-body: 1rem;
  --font-scale-small: .875rem;

  --container-w: 1280px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --header-h: 76px;

  --shadow-soft: 0 8px 30px rgba(15, 32, 39, .08);
  --radius-cut: 10px 26px 10px 26px;
}

/* ---------- Reset & base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--color-milk);
  color: var(--color-charcoal);
  font-family: var(--font-body);
  font-size: var(--font-scale-body);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 .6em;
  color: var(--color-charcoal);
}

h1 { font-size: var(--font-scale-h1); }
h2 { font-size: var(--font-scale-h2); }
h3 { font-size: var(--font-scale-h3); }

p { margin: 0 0 1em; }

ul,
ol {
  margin: 0 0 1em;
  padding-left: 1.5em;
}

a {
  color: var(--color-tech);
  text-decoration: underline;
  text-underline-offset: 3px;
}

a:hover { color: var(--color-steppe); }

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

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

/* ---------- Container & layout ---------- */
.container {
  width: 100%;
  max-width: var(--container-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.content {
  padding-block: clamp(2.5rem, 6vw, 5rem);
}

.prose {
  max-width: 72ch;
  font-size: 1rem;
  line-height: 1.9;
}

.prose h2 {
  font-size: var(--font-scale-h2);
  margin-top: 2.75rem;
}

.prose a {
  color: var(--color-tech);
  font-weight: 500;
}

.page-title {
  font-size: var(--font-scale-h1);
  margin-bottom: 1.25rem;
}

.divider {
  height: 1px;
  border: 0;
  margin: 2.5rem 0;
  background: linear-gradient(to right, transparent, var(--color-gold) 20%, var(--color-gold) 80%, transparent);
}

/* ---------- Grid ---------- */
.grid-stack {
  display: grid;
  gap: 1.5rem;
}

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

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -120px;
  z-index: 9999;
  padding: .8rem 1.4rem;
  background: var(--color-gold);
  color: var(--color-deep);
  font-weight: 700;
  text-decoration: none;
  border-radius: 0 0 12px 12px;
  transition: top .25s ease;
}

.skip-link:focus {
  top: 0;
  color: var(--color-deep);
}

/* ---------- Header ---------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--color-steppe);
  color: var(--color-milk);
  border-bottom: 1px solid rgba(212, 175, 55, .45);
  box-shadow: 0 1px 0 rgba(15, 32, 39, .06);
}

.site-head::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 160% at 85% 0%, rgba(212, 175, 55, .16) 0%, rgba(212, 175, 55, 0) 55%);
  pointer-events: none;
}

.site-head::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--color-gold) 18%, var(--color-gold) 82%, transparent);
  opacity: .9;
}

.site-head.is-scrolled {
  background: rgba(58, 125, 68, .92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: rgba(212, 175, 55, .8);
}

.head-inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(1rem, 3vw, 2.5rem);
  position: relative;
  z-index: 1;
}

/* ---------- Brand ---------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: .8rem;
  color: inherit;
  text-decoration: none;
  flex-shrink: 0;
}

.brand:hover {
  color: inherit;
  opacity: .92;
}

.brand__glyph {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px 6px 16px 6px;
  background: rgba(244, 244, 240, .1);
  border: 1px solid rgba(212, 175, 55, .55);
  color: var(--color-gold);
  transition: transform .3s, background .3s;
}

.brand:hover .brand__glyph {
  background: rgba(244, 244, 240, .16);
  transform: rotate(-3deg) scale(1.03);
}

.brand__svg {
  width: 34px;
  height: 34px;
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand__name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.18rem;
  letter-spacing: .03em;
  white-space: nowrap;
}

.brand__sub {
  font-size: .68rem;
  letter-spacing: .16em;
  opacity: .72;
  text-transform: uppercase;
  margin-top: .15rem;
}

/* ---------- Header nav ---------- */
.head-nav {
  margin-left: auto;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: .15rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-item a {
  display: inline-block;
  padding: .55rem .9rem;
  border-radius: 999px;
  color: var(--color-milk);
  text-decoration: none;
  font-size: .95rem;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
  transition: background .25s, color .25s, box-shadow .25s;
}

.nav-item a:hover {
  color: var(--color-gold);
  background: rgba(244, 244, 240, .12);
}

.nav-item a[aria-current="page"] {
  color: var(--color-deep);
  background: var(--color-gold);
  font-weight: 700;
  box-shadow: 0 3px 12px rgba(212, 175, 55, .35);
}

/* ---------- Nav toggle ---------- */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgba(244, 244, 240, .3);
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  transition: background .3s, border-color .3s;
}

.nav-toggle:hover {
  background: rgba(244, 244, 240, .12);
  border-color: var(--color-gold);
}

.nav-toggle__line {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-milk);
  border-radius: 999px;
  transition: transform .35s ease, opacity .25s ease;
}

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

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

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

/* ---------- Footer ---------- */
.site-foot {
  background: var(--color-deep);
  color: var(--color-milk);
  margin-top: auto;
}

.site-foot::before {
  content: "";
  display: block;
  height: 3px;
  background: linear-gradient(to right, var(--color-gold), var(--color-tech) 40%, var(--color-steppe) 80%, transparent);
}

.foot-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr 1.3fr 1.1fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  padding-block: 3.5rem 2.75rem;
}

.foot-col--brand {
  max-width: 34ch;
}

.foot-brand {
  color: var(--color-milk);
  margin-bottom: 1.25rem;
}

.foot-brand .brand__sub {
  color: var(--color-gold);
  opacity: .85;
}

.foot-desc {
  font-size: .92rem;
  line-height: 1.8;
  color: rgba(244, 244, 240, .75);
  margin-bottom: 1.1rem;
}

.foot-icp {
  display: inline-block;
  font-size: .82rem;
  color: rgba(244, 244, 240, .6);
  background: rgba(244, 244, 240, .08);
  border: 1px solid rgba(212, 175, 55, .25);
  padding: .3rem .75rem;
  border-radius: 999px;
}

.foot-heading {
  color: var(--color-milk);
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .14em;
  margin-bottom: 1rem;
}

.foot-heading::after {
  content: "";
  display: block;
  width: 3rem;
  height: 2px;
  background: var(--color-gold);
  margin-top: .3rem;
}

.foot-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.foot-links li {
  margin-bottom: .55rem;
}

.foot-links a {
  color: rgba(244, 244, 240, .82);
  text-decoration: none;
  font-size: .94rem;
  transition: color .25s, padding-left .25s;
}

.foot-links a:hover {
  color: var(--color-gold);
  padding-left: .3rem;
}

.foot-contact__item {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  font-size: .92rem;
  line-height: 1.6;
  color: rgba(244, 244, 240, .82);
}

.foot-contact__item + .foot-contact__item {
  margin-top: .75rem;
}

.foot-contact__icon {
  color: var(--color-gold);
  flex-shrink: 0;
  margin-top: .1rem;
}

.foot-contact__note {
  color: var(--color-gold);
  font-size: .84rem;
  display: inline-block;
  margin-top: 1rem;
  padding: .35rem .7rem;
  background: rgba(212, 175, 55, .12);
  border-radius: 999px;
}

.foot-copy {
  font-size: .88rem;
  line-height: 1.8;
  color: rgba(244, 244, 240, .62);
  margin-bottom: .6rem;
}

/* ---------- Footer base ---------- */
.foot-base {
  position: relative;
  background: rgba(0, 0, 0, .22);
}

.foot-base::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--color-gold) 0 10px, transparent 10px 20px);
  opacity: .5;
}

.foot-base__inner {
  display: flex;
  flex-wrap: wrap;
  gap: .9rem 1.8rem;
  justify-content: space-between;
  align-items: center;
  padding-block: 1rem;
  font-size: .84rem;
  color: rgba(244, 244, 240, .7);
}

.foot-base__inner p {
  margin: 0;
}

.foot-base__links {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 1.3rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.foot-base__links a {
  color: rgba(244, 244, 240, .8);
  text-decoration: none;
  font-size: .84rem;
}

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

/* ---------- Footer contact list text-icon align ---------- */
.foot-contact a {
  text-decoration: none;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .8rem 1.45rem;
  border: 0;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: .95rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  transition: background .3s, transform .3s, box-shadow .3s, color .3s;
}

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

.btn--primary {
  background: var(--color-tech);
  color: #fff;
}

.btn--primary:hover {
  background: var(--color-steppe);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(30, 58, 138, .3);
}

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

.btn--gold:hover {
  background: var(--color-warn);
  color: #fff;
  transform: translateY(-2px);
}

.btn--ghost {
  background: transparent;
  color: var(--color-tech);
  box-shadow: inset 0 0 0 2px currentColor;
}

.btn--ghost:hover {
  color: var(--color-steppe);
  transform: translateY(-2px);
}

/* ---------- Tags ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  padding: .3rem .85rem;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 600;
  line-height: 1.6;
  background: var(--color-blue-gray);
  color: var(--color-tech);
}

.tag--green {
  background: var(--color-green-gray);
  color: var(--color-steppe-dark);
}

.tag--gold {
  background: rgba(212, 175, 55, .18);
  color: var(--color-warn);
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem .6rem;
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  font-size: .88rem;
  color: var(--color-charcoal);
}

.breadcrumb li {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
}

.breadcrumb li:not(:last-child)::after {
  content: "/";
  color: rgba(43, 43, 43, .4);
}

.breadcrumb a {
  color: var(--color-tech);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

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

/* ---------- Section label & title ---------- */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: .82rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--color-tech);
  margin-bottom: .5rem;
}

.section-label::before {
  content: "";
  width: 2rem;
  height: 2px;
  background: var(--color-gold);
  display: inline-block;
}

.section-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: var(--font-scale-h2);
  line-height: 1.25;
  margin-bottom: .4em;
  color: var(--color-charcoal);
}

/* ---------- Steppe cards ---------- */
.steppe-card {
  position: relative;
  padding: 1.75rem;
  background: var(--color-milk);
  border: 1px solid rgba(58, 125, 68, .16);
  border-radius: var(--radius-cut);
  box-shadow: var(--shadow-soft);
}

.steppe-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 1.5rem;
  width: 3.5rem;
  height: 3px;
  background: linear-gradient(to right, var(--color-gold), var(--color-steppe));
  border-radius: 0 0 4px 4px;
}

.steppe-card--blue {
  background: var(--color-blue-gray);
  border-color: rgba(30, 58, 138, .12);
}

.steppe-card--blue::before {
  background: linear-gradient(to right, var(--color-tech), var(--color-gold));
}

/* ---------- Figure placeholder ---------- */
.figure {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-cut);
  background: linear-gradient(135deg, var(--color-green-gray), var(--color-blue-gray));
  aspect-ratio: 4 / 3;
}

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

.figure--tall {
  aspect-ratio: 3 / 4;
}

/* ---------- Scroll meter ---------- */
.scroll-meter {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 3000;
  pointer-events: none;
}

.scroll-meter__bar {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--color-gold), var(--color-steppe) 45%, var(--color-tech) 90%);
  transform: scaleX(0);
  transform-origin: left center;
  will-change: transform;
}

/* ---------- Back to top ---------- */
.top-btn {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 900;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--color-gold);
  color: var(--color-deep);
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(15, 32, 39, .3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: opacity .3s, transform .3s, visibility .3s, background .3s;
}

.top-btn:hover {
  background: var(--color-warn);
  color: #fff;
}

.top-btn.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .grid-stack--3,
  .grid-stack--4 {
    grid-template-columns: repeat(2, 1fr);
  }

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

@media (max-width: 900px) {
  :root {
    --header-h: 64px;
  }

  .brand__sub {
    display: none;
  }

  .brand__name {
    font-size: 1rem;
  }

  .nav-toggle {
    display: flex;
  }

  .head-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin: 0;
    background: rgba(15, 32, 39, .97);
    border-bottom: 1px solid var(--color-gold);
    box-shadow: 0 18px 35px rgba(15, 32, 39, .28);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition: opacity .3s ease, transform .3s ease, visibility .3s;
  }

  .head-nav[data-open="true"] {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: .15rem;
    padding: 1rem;
  }

  .nav-item a {
    display: block;
    padding: .85rem 1.1rem;
    border-radius: 10px;
    white-space: normal;
  }

  .nav-item a[aria-current="page"] {
    color: var(--color-deep);
    background: var(--color-gold);
  }
}

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

  .foot-grid {
    grid-template-columns: 1fr;
    padding-block: 2.5rem 2rem;
  }

  .foot-col--brand {
    max-width: none;
  }

  .brand__glyph {
    width: 40px;
    height: 40px;
  }

  .brand__svg {
    width: 28px;
    height: 28px;
  }

  .top-btn {
    right: 1rem;
    bottom: 1rem;
    width: 46px;
    height: 46px;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
  }

  html {
    scroll-behavior: auto;
  }

  .scroll-meter {
    display: none;
  }

  .btn:hover,
  .btn--primary:hover,
  .btn--gold:hover,
  .btn--ghost:hover {
    transform: none;
  }

  .brand:hover .brand__glyph {
    transform: none;
  }
}
