/* ============================================================
   伟德CN站 · 共享样式表 /assets/site.css
   深海蓝结构色 + 雾灰蓝柔光底 + 暖金灯标 + 珊瑚橙行动色
   ============================================================ */

/* ---------- reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 128px;
}

body, h1, h2, h3, h4, h5, p, figure, blockquote, ul, ol, li, dl, dd, table {
  margin: 0;
  padding: 0;
}
ul, ol { list-style: none; }
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; }
table { border-collapse: collapse; width: 100%; }
h1, h2, h3, h4 { line-height: 1.32; font-weight: 700; }

/* ---------- 变量 ---------- */
:root {
  --sea-900: #0B2239;
  --sea-800: #14395E;
  --mist: #E6ECF1;
  --mist-deep: #D7E0E8;
  --paper: #F8FAFC;
  --gold: #E0B357;
  --gold-deep: #A9791F;
  --coral: #FF6A4D;
  --ink: #0E1720;
  --slate: #5B6B7A;
  --foam: #74B3AE;

  --line-soft: rgba(11, 34, 57, 0.12);
  --line-dark: rgba(230, 236, 241, 0.16);

  --font-sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-head: "HarmonyOS Sans SC", "Noto Sans SC", "Source Han Sans SC", sans-serif;
  --font-serif: "Noto Serif SC", "Songti SC", serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;

  --wrap: 1180px;
  --cut: 20px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --lift: 0 12px 32px rgba(11, 34, 57, 0.16);
}

/* ---------- 基础排版 ---------- */
body {
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.85;
  color: var(--ink);
  background-color: var(--mist);
  background-image:
    radial-gradient(940px 520px at 104% -6%, rgba(224, 179, 87, 0.12), transparent 66%),
    radial-gradient(760px 460px at -8% 34%, rgba(116, 179, 174, 0.11), transparent 70%);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

p { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }

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

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 2px;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

.section-title {
  font-family: var(--font-head);
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: 0.01em;
  color: var(--sea-900);
}
.section-title--rule::after {
  content: "";
  display: block;
  width: 56px;
  height: 3px;
  margin-top: 14px;
  background: var(--gold);
}

.lede {
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.95;
  color: #223447;
}
.note {
  font-size: 14px;
  line-height: 1.8;
  color: var(--slate);
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 720px;
}

/* ---------- 布局容器与章节 ---------- */
.wrap {
  width: min(var(--wrap), 92vw);
  margin-inline: auto;
}
.wrap--narrow { width: min(720px, 92vw); }
.wrap--wide { width: min(1360px, 94vw); }

.band {
  position: relative;
  padding: clamp(48px, 7vw, 96px) 0;
}
.band--tight { padding: clamp(28px, 4vw, 52px) 0; }
.band--deep {
  background: var(--sea-900);
  color: rgba(230, 236, 241, 0.86);
}
.band--deep .section-title { color: var(--paper); }
.band--deep .lede { color: rgba(230, 236, 241, 0.82); }
.band--deep .note { color: rgba(230, 236, 241, 0.6); }
.band--harbor {
  background: var(--sea-800);
  color: rgba(230, 236, 241, 0.86);
}
.band--harbor .section-title { color: var(--paper); }
.band--paper { background: var(--paper); }
.band--mist { background: linear-gradient(180deg, rgba(230, 236, 241, 0), var(--mist-deep)); }

.grid {
  display: grid;
  gap: clamp(18px, 2.4vw, 30px);
}
.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)); }
.grid--split { grid-template-columns: 1.4fr 1fr; align-items: start; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.66em 1.15em;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 1px;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease),
              border-color 0.2s var(--ease), transform 0.2s var(--ease),
              box-shadow 0.2s var(--ease);
}
.btn--coral {
  background: var(--coral);
  color: var(--sea-900);
  box-shadow: 0 6px 18px rgba(255, 106, 77, 0.24);
}
.btn--coral:hover {
  background: #ff7f66;
  transform: translateY(-2px);
}
.btn--gold {
  background: var(--gold);
  color: var(--sea-900);
}
.btn--gold:hover {
  background: var(--gold-deep);
  color: var(--paper);
  transform: translateY(-2px);
}
.btn--ghost {
  background: rgba(248, 250, 252, 0.06);
  color: var(--mist);
  border-color: rgba(230, 236, 241, 0.36);
}
.btn--ghost:hover {
  background: rgba(224, 179, 87, 0.16);
  border-color: var(--gold);
  color: var(--paper);
  transform: translateY(-2px);
}
.btn--solid {
  background: var(--sea-900);
  color: var(--paper);
}
.btn--solid:hover {
  background: var(--sea-800);
  transform: translateY(-2px);
}

/* ---------- 刊头 / header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--sea-900);
  color: var(--mist);
  isolation: isolate;
}
.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent,
    rgba(224, 179, 87, 0.55) 18%,
    rgba(224, 179, 87, 0.9) 50%,
    rgba(224, 179, 87, 0.55) 82%,
    transparent);
}
.header-glow {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(680px 320px at 6% 0%, rgba(224, 179, 87, 0.20), transparent 70%),
    radial-gradient(560px 300px at 94% 110%, rgba(116, 179, 174, 0.18), transparent 72%);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -72px;
  z-index: 90;
  padding: 0.7em 1.1em;
  background: var(--coral);
  color: var(--sea-900);
  font-weight: 700;
  text-decoration: none;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 12px; }

.masthead {
  padding: 22px 0 14px;
  transition: padding 0.3s var(--ease);
}
.masthead__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
}
.masthead__meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  justify-self: start;
}
.masthead__metaKey {
  font-size: 11px;
  letter-spacing: 0.34em;
  color: var(--gold);
}
.masthead__metaVal {
  font-size: 12px;
  letter-spacing: 0.06em;
  color: rgba(230, 236, 241, 0.55);
}

.masthead__brand {
  text-align: center;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--paper);
}
.brand__lamp {
  width: 11px;
  height: 11px;
  flex: 0 0 auto;
  background: var(--gold);
  transform: rotate(45deg);
  box-shadow: 0 0 14px 4px rgba(224, 179, 87, 0.45);
  animation: lampBreath 7s ease-in-out infinite;
}
.brand__name {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: var(--brand-size, clamp(26px, 3.6vw, 42px));
  letter-spacing: 0.08em;
  transition: font-size 0.3s var(--ease);
}
.brand__tagline {
  margin: 6px 0 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.3em;
  color: rgba(224, 179, 87, 0.9);
}

.masthead__actions {
  display: flex;
  gap: 10px;
  justify-self: end;
}

@keyframes lampBreath {
  0%, 100% { opacity: 0.7; box-shadow: 0 0 10px 2px rgba(224, 179, 87, 0.32); }
  50% { opacity: 1; box-shadow: 0 0 20px 6px rgba(224, 179, 87, 0.52); }
}

/* 收缩态 */
.site-header[data-condensed] { --brand-size: clamp(20px, 2.2vw, 26px); }
.site-header[data-condensed] .masthead { padding: 10px 0 8px; }
.site-header[data-condensed] .masthead__meta { opacity: 0; visibility: hidden; }
.site-header[data-condensed] .brand__tagline { display: none; }

/* 移动导航按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 0.5rem 0.8rem;
  border: 1px solid rgba(230, 236, 241, 0.4);
  border-radius: 1px;
  color: var(--mist);
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.nav-toggle:hover { border-color: var(--gold); background: rgba(224, 179, 87, 0.1); }
.nav-toggle__bars {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  width: 18px;
}
.nav-toggle__bars span {
  display: block;
  height: 2px;
  background: var(--gold);
  transition: transform 0.22s var(--ease), opacity 0.22s var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.nav-toggle__text {
  font-size: 13px;
  letter-spacing: 0.14em;
}

/* 路径索引条 */
.site-nav {
  border-top: 1px solid rgba(230, 236, 241, 0.14);
  background: linear-gradient(180deg, rgba(20, 57, 94, 0.5), rgba(11, 34, 57, 0));
}
.site-nav__inner {
  display: flex;
  justify-content: center;
}
.site-nav__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}
.site-nav__item { position: relative; }
.site-nav__item + .site-nav__item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 1px;
  height: 12px;
  transform: translateY(-50%);
  background: rgba(230, 236, 241, 0.22);
}
.site-nav__link {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  padding: 0.85rem 1.15rem;
  font-size: 15px;
  font-weight: 500;
  color: rgba(230, 236, 241, 0.82);
  text-decoration: none;
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.site-nav__index {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--gold);
}
.site-nav__link::after {
  content: "";
  position: absolute;
  left: 1.15rem;
  right: 1.15rem;
  bottom: 0.5rem;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.3s var(--ease);
}
.site-nav__link:hover { color: var(--paper); background: rgba(224, 179, 87, 0.08); }
.site-nav__link:hover::after,
.site-nav__link:focus-visible::after { transform: scaleX(1); }
.site-nav__link[aria-current="page"] {
  color: var(--paper);
  background: rgba(224, 179, 87, 0.1);
}
.site-nav__link[aria-current="page"]::after {
  transform: scaleX(1);
  background: var(--coral);
}
.site-nav__link[aria-current="page"] .site-nav__index { color: var(--coral); }

/* ---------- 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: auto;
  padding: 56px 0 28px;
  background: var(--sea-900);
  color: rgba(230, 236, 241, 0.78);
}
.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--coral), var(--gold) 34%, rgba(224, 179, 87, 0.24) 100%);
}
.site-footer__inner {
  display: grid;
  grid-template-columns: 1.05fr 1.6fr;
  gap: clamp(28px, 4vw, 56px);
  padding-bottom: 34px;
  border-bottom: 1px solid var(--line-dark);
}
.site-footer__brand { max-width: 400px; }
.brand--footer .brand__name { font-size: 30px; letter-spacing: 0.06em; }
.site-footer__line {
  margin: 16px 0 0;
  font-size: 15px;
  line-height: 1.9;
  color: rgba(230, 236, 241, 0.68);
}
.site-footer__meta {
  margin: 14px 0 0;
  font-size: 12px;
  letter-spacing: 0.18em;
  color: rgba(224, 179, 87, 0.85);
}
.site-footer__nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.footer-col__title {
  margin-bottom: 14px;
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.26em;
  color: var(--gold);
}
.footer-col__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-col__link {
  position: relative;
  display: inline-block;
  padding-left: 0;
  font-size: 15px;
  text-decoration: none;
  color: rgba(230, 236, 241, 0.8);
  transition: color 0.2s var(--ease), padding-left 0.2s var(--ease);
}
.footer-col__link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 0;
  height: 1px;
  background: var(--coral);
  transition: width 0.22s var(--ease);
}
.footer-col__link:hover {
  color: var(--paper);
  padding-left: 18px;
}
.footer-col__link:hover::before { width: 12px; }

.site-footer__contact {
  display: grid;
  gap: 8px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line-dark);
}
.site-footer__contactLine {
  margin: 0;
  font-size: 15px;
  color: rgba(230, 236, 241, 0.86);
}
.site-footer__note {
  margin: 0;
  font-size: 13px;
  color: rgba(230, 236, 241, 0.55);
}
.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  padding-top: 20px;
  font-size: 13px;
}
.site-footer__copy,
.site-footer__icp {
  margin: 0;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  color: rgba(230, 236, 241, 0.6);
}
.site-footer__sign {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--gold);
}

/* ---------- 通用组件 ---------- */
.panel {
  position: relative;
  padding: clamp(20px, 3vw, 32px);
  background: var(--paper);
  border: 1px solid var(--line-soft);
  clip-path: polygon(0 0,
    calc(100% - var(--cut)) 0,
    100% var(--cut),
    100% 100%,
    var(--cut) 100%,
    0 calc(100% - var(--cut)));
}
.panel--deep {
  background: var(--sea-800);
  color: rgba(230, 236, 241, 0.86);
  border-color: transparent;
}
.panel--deep .lede,
.panel--deep .note { color: rgba(230, 236, 241, 0.72); }
.panel--mist {
  background: var(--mist-deep);
  border-color: rgba(11, 34, 57, 0.1);
}
.panel--flat { background: transparent; border-color: var(--line-soft); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.26em 0.62em;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--sea-800);
  background: rgba(11, 34, 57, 0.06);
  border: 1px solid rgba(11, 34, 57, 0.14);
}
.tag--gold {
  color: var(--gold-deep);
  background: rgba(224, 179, 87, 0.16);
  border-color: rgba(224, 179, 87, 0.5);
}
.tag--foam {
  color: #3d7a75;
  background: rgba(116, 179, 174, 0.16);
  border-color: rgba(116, 179, 174, 0.45);
}

.media-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, var(--sea-800), var(--sea-900) 58%, #071527);
  clip-path: polygon(0 0,
    calc(100% - var(--cut)) 0,
    100% var(--cut),
    100% 100%,
    var(--cut) 100%,
    0 calc(100% - var(--cut)));
}
.media-frame--wide { aspect-ratio: 21 / 9; }
.media-frame--tall { aspect-ratio: 4 / 5; }
.media-frame--square { aspect-ratio: 1 / 1; }
.media-frame > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-frame__glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(560px 280px at 12% 8%, rgba(224, 179, 87, 0.28), transparent 70%);
}
.media-frame__caption {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--slate);
}

.crumbs {
  font-size: 13px;
  color: var(--slate);
}
.crumbs__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.crumbs__item {
  display: flex;
  align-items: center;
  gap: 8px;
}
.crumbs__item + .crumbs__item::before {
  content: "/";
  color: rgba(91, 107, 122, 0.55);
}
.crumbs__link {
  color: var(--slate);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.crumbs__link:hover {
  color: var(--sea-800);
  border-bottom-color: var(--gold);
}

/* ---------- 滚动进度与显现 ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 70;
  pointer-events: none;
  background: linear-gradient(90deg, var(--gold), var(--coral));
  transform: scaleX(0);
  transform-origin: left center;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
[data-reveal][data-shown] {
  opacity: 1;
  transform: none;
}

[data-copy] {
  cursor: copy;
  border-bottom: 1px dashed rgba(11, 34, 57, 0.28);
}
[data-copy][data-copied]::after {
  content: "已复制";
  margin-left: 0.6em;
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--coral);
}

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--split { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  html { scroll-padding-top: 96px; }

  .masthead__inner {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand toggle"
      "actions actions";
    gap: 12px;
  }
  .masthead__meta { display: none; }
  .masthead__brand {
    grid-area: brand;
    text-align: left;
  }
  .masthead__actions {
    grid-area: actions;
    justify-self: stretch;
  }
  .masthead__actions .btn { flex: 1; }
  .nav-toggle { display: inline-flex; grid-area: toggle; }

  .site-nav { display: none; }
  .site-nav[data-open] { display: block; }
  .site-nav__inner { display: block; padding-bottom: 12px; }
  .site-nav__list {
    flex-direction: column;
    justify-content: flex-start;
  }
  .site-nav__item + .site-nav__item::before { display: none; }
  .site-nav__link {
    padding: 0.95rem 0;
    font-size: 17px;
    color: rgba(230, 236, 241, 0.9);
    border-bottom: 1px solid rgba(230, 236, 241, 0.12);
  }
  .site-nav__link::after {
    left: 0;
    right: auto;
    bottom: 0.55rem;
    width: 34px;
  }

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

@media (max-width: 620px) {
  body { font-size: 16px; line-height: 1.8; }
  .grid--4 { grid-template-columns: 1fr; }
  .site-footer__nav { grid-template-columns: 1fr 1fr; }
  .site-footer__legal { justify-content: flex-start; }
  .masthead__actions { flex-direction: column; }
  .brand__tagline { letter-spacing: 0.2em; }
}

/* ---------- 减弱动效 ---------- */
@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;
  }
  [data-reveal] {
    opacity: 1;
    transform: none;
  }
  .scroll-progress { display: none; }
}
