/* ============================================================
   et365服务中心 · 共享样式表
   路径：/assets/site.css
   内容：reset / 设计变量 / 中文排版 / 页头 / 页脚 / 通用组件
   ============================================================ */

/* ---------- 1. Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body,
h1, h2, h3, h4, h5, h6,
p, ul, ol, li, dl, dt, dd, figure, figcaption, blockquote {
  margin: 0;
  padding: 0;
}

ul, ol { list-style: none; }

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

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

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

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

table { width: 100%; border-collapse: collapse; }

:where(h1, h2, h3, h4) { line-height: 1.25; font-weight: 700; }

/* ---------- 2. 设计变量 ---------- */
:root {
  /* 品牌色 */
  --c-ink: #050A12;
  --c-night: #0C1A2C;
  --c-stand: #14263D;
  --c-paper: #F4EDDE;
  --c-paper-line: #D8CDB6;
  --c-green: #57F08A;
  --c-forest: #0F7A42;
  --c-orange: #FF6A2B;
  --c-cool: #86D8E6;
  --c-gray: #93A2B3;
  --c-white: #E7EEF6;
  --c-ink-paper: #0F1D28;

  /* 语义色 */
  --bg: var(--c-ink);
  --fg: var(--c-white);
  --fg-muted: var(--c-gray);
  --line: rgba(216, 205, 182, 0.16);
  --line-strong: rgba(216, 205, 182, 0.32);

  /* 字体 */
  --font-display: "Arial Narrow", "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  /* 尺度 */
  --wrap: 1200px;
  --wrap-narrow: 760px;
  --gutter: clamp(18px, 4vw, 40px);
  --radius: 2px;
  --hdr-h: 72px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- 3. 全局排版与底色 ---------- */
body {
  min-height: 100vh;
  background-color: var(--c-ink);
  background-image:
    radial-gradient(880px 520px at 88% -8%, rgba(87, 240, 138, 0.10), transparent 62%),
    radial-gradient(760px 480px at -10% 14%, rgba(134, 216, 230, 0.07), transparent 60%),
    linear-gradient(to right, rgba(134, 216, 230, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(134, 216, 230, 0.045) 1px, transparent 1px);
  background-size: auto, auto, 88px 88px, 88px 88px;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.75;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--c-green);
  color: #04140a;
}

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

/* ---------- 4. 跳转链接 ---------- */
.skip-link {
  position: absolute;
  left: var(--gutter);
  top: 10px;
  z-index: 300;
  padding: 10px 18px;
  border-radius: var(--radius);
  background: var(--c-green);
  color: #04140a;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  transform: translateY(-220%);
  transition: transform 0.22s var(--ease);
}

.skip-link:focus-visible,
.skip-link:focus {
  transform: translateY(0);
  outline-offset: 4px;
}

/* ---------- 5. 页头 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 120;
  background: rgba(5, 10, 18, 0.86);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  position: relative;
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 0 var(--gutter);
  min-height: var(--hdr-h);
  display: flex;
  align-items: center;
  gap: clamp(12px, 3vw, 36px);
}

/* 品牌 */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  padding: 8px 0;
}

.brand__mark {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: linear-gradient(150deg, var(--c-green) 0%, #12b25f 100%);
  color: #04140a;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.05em;
  box-shadow: 0 0 0 1px rgba(87, 240, 138, 0.35), 0 10px 22px -12px rgba(87, 240, 138, 0.9);
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}

.brand__name {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--c-white);
  white-space: nowrap;
}

.brand__sub {
  margin-top: 2px;
  font-size: 11.5px;
  letter-spacing: 0.12em;
  color: var(--c-gray);
  white-space: nowrap;
}

/* 移动端栏目按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  margin-left: auto;
  padding: 9px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--c-white);
  font-size: 12px;
  letter-spacing: 0.14em;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.nav-toggle__label { line-height: 1; }

.nav-toggle__bars {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: background-color 0.2s var(--ease);
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: transform 0.26s var(--ease);
}

.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }

.nav-toggle[aria-expanded="true"] {
  border-color: var(--c-green);
  color: var(--c-green);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

/* 主导航 */
.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: clamp(8px, 2vw, 26px);
  min-width: 0;
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: clamp(2px, 0.8vw, 6px);
  min-width: 0;
}

.site-nav__link {
  position: relative;
  display: block;
  padding: 9px 12px;
  border-radius: var(--radius);
  color: rgba(231, 238, 246, 0.76);
  font-size: 14px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.site-nav__link:hover {
  color: var(--c-white);
  background: rgba(20, 38, 61, 0.72);
}

.site-nav__link[aria-current="page"] {
  color: var(--c-green);
}

.site-nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--c-green);
}

.site-nav__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

/* 阅读进度条 */
.scroll-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--c-green) 0%, var(--c-cool) 60%, var(--c-orange) 100%);
  transition: width 0.14s linear;
}

/* ---------- 6. 通用按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.2;
  white-space: nowrap;
  transition: transform 0.2s var(--ease), background-color 0.2s var(--ease),
              color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.btn--accent {
  background: var(--c-orange);
  color: #1b0a02;
}

.btn--accent:hover {
  background: #ff8348;
  transform: translateY(-1px);
}

.btn--green {
  background: var(--c-green);
  color: #04140a;
}

.btn--green:hover {
  background: #7df5a6;
  transform: translateY(-1px);
}

.btn--ghost {
  background: rgba(20, 38, 61, 0.55);
  border-color: var(--line-strong);
  color: var(--c-white);
}

.btn--ghost:hover {
  border-color: var(--c-green);
  color: var(--c-green);
}

/* ---------- 7. 内容容器与栅格 ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.wrap--narrow { max-width: var(--wrap-narrow); }

.site-main {
  display: block;
  width: 100%;
}

.grid {
  display: grid;
  gap: clamp(14px, 2.4vw, 24px);
}

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

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 18px;
  margin-bottom: clamp(18px, 3vw, 32px);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

/* ---------- 8. 语义小组件 ---------- */
.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-green);
}

.eyebrow--orange { color: var(--c-orange); }

.chapter-num {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(44px, 8vw, 104px);
  font-weight: 700;
  line-height: 0.86;
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(216, 205, 182, 0.42);
}

.data-value {
  font-family: var(--font-mono);
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--c-green);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 12.5px;
  letter-spacing: 0.06em;
  color: var(--c-gray);
}

.panel {
  background: var(--c-stand);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(18px, 3vw, 28px);
}

.panel--paper {
  background: var(--c-paper);
  border-color: var(--c-paper-line);
  color: var(--c-ink-paper);
  box-shadow: 0 22px 44px -30px rgba(0, 0, 0, 0.85);
}

.panel--paper .eyebrow { color: var(--c-forest); }
.panel--paper .data-value { color: var(--c-forest); }
.panel--paper .chip {
  color: #3c4a56;
  border-color: rgba(15, 29, 40, 0.22);
}

/* ---------- 9. 正文与目录 ---------- */
.prose {
  max-width: 38em;
  font-size: 16.5px;
  line-height: 1.8;
  color: rgba(231, 238, 246, 0.9);
}

.prose > * + * { margin-top: 1em; }

.prose h2,
.prose h3 {
  margin-top: 1.8em;
  color: var(--c-white);
  font-size: 1.16em;
  letter-spacing: 0.02em;
}

.prose a {
  color: var(--c-green);
  border-bottom: 1px solid rgba(87, 240, 138, 0.4);
}

.prose strong { color: var(--c-white); }

.toc {
  position: sticky;
  top: calc(var(--hdr-h) + 24px);
  align-self: start;
  display: grid;
  gap: 2px;
}

.toc__num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--c-gray);
}

.toc a {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 7px 10px;
  border-left: 2px solid var(--line);
  font-size: 13.5px;
  color: var(--c-gray);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.toc a:hover {
  color: var(--c-white);
  background: rgba(20, 38, 61, 0.6);
}

.toc a.is-active {
  color: var(--c-green);
  border-left-color: var(--c-green);
  background: rgba(87, 240, 138, 0.06);
}

/* ---------- 10. 面包屑 ---------- */
.breadcrumb {
  font-size: 12.5px;
  letter-spacing: 0.06em;
  color: var(--c-gray);
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.breadcrumb li + li::before {
  content: "/";
  margin-right: 8px;
  color: rgba(216, 205, 182, 0.4);
}

.breadcrumb a:hover { color: var(--c-green); }

.breadcrumb [aria-current="page"] { color: var(--c-white); }

/* ---------- 11. 图片容器基础规则 ---------- */
.media {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--c-stand);
}

.media > img,
.media > svg,
.media > video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.82) contrast(1.04);
}

.media--16x9 { aspect-ratio: 16 / 9; }
.media--4x3 { aspect-ratio: 4 / 3; }
.media--1x1 { aspect-ratio: 1 / 1; }
.media--4x5 { aspect-ratio: 4 / 5; }
.media--wide { aspect-ratio: 21 / 9; }

.media__overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(5, 10, 18, 0) 42%, rgba(5, 10, 18, 0.84) 100%),
    repeating-linear-gradient(90deg, rgba(134, 216, 230, 0.14) 0 1px, transparent 1px 56px);
}

.media__badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  padding: 4px 10px;
  border-radius: var(--radius);
  background: var(--c-orange);
  color: #1b0a02;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.media__caption {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
  z-index: 2;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--c-gray);
}

.media__empty {
  display: grid;
  place-items: center;
  height: 100%;
  padding: 24px;
  background: repeating-linear-gradient(135deg, rgba(20, 38, 61, 0.9) 0 12px, rgba(12, 26, 44, 0.9) 12px 24px);
  color: var(--c-gray);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
}

/* ---------- 12. 进入视口显现 ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

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

/* ---------- 13. 页脚 ---------- */
.site-footer {
  margin-top: clamp(56px, 9vw, 120px);
  background: linear-gradient(180deg, #081422 0%, #061020 100%);
  border-top: 1px solid var(--line-strong);
  color: var(--fg);
}

.site-footer__grid {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding: clamp(36px, 6vw, 64px) var(--gutter) clamp(26px, 4vw, 44px);
  display: grid;
  gap: clamp(24px, 4vw, 44px);
  grid-template-columns: 1.5fr repeat(3, minmax(0, 1fr));
}

.site-footer__brand { min-width: 0; }

.brand--footer { padding-top: 0; }

.brand--footer .brand__mark {
  box-shadow: 0 0 0 1px rgba(87, 240, 138, 0.3);
}

.site-footer__lead {
  margin-top: 16px;
  max-width: 30em;
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--c-gray);
}

.site-footer__col { min-width: 0; }

.site-footer__title {
  margin-bottom: 14px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-orange);
}

.site-footer__list li + li { margin-top: 9px; }

.site-footer__list a {
  position: relative;
  display: inline-block;
  padding-left: 14px;
  font-size: 14.5px;
  color: rgba(231, 238, 246, 0.76);
  transition: color 0.2s var(--ease), padding-left 0.2s var(--ease);
}

.site-footer__list a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 6px;
  height: 1px;
  background: var(--line-strong);
  transition: background-color 0.2s var(--ease), width 0.2s var(--ease);
}

.site-footer__list a:hover {
  color: var(--c-green);
  padding-left: 18px;
}

.site-footer__list a:hover::before {
  width: 12px;
  background: var(--c-green);
}

.site-footer__contact {
  display: grid;
  gap: 12px;
}

.site-footer__contact-row { min-width: 0; }

.site-footer__contact dt {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-gray);
}

.site-footer__contact dd {
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--c-white);
  word-break: break-word;
}

.site-footer__note {
  margin-top: 16px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--c-gray);
}

.site-footer__legal {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 18px var(--gutter) 34px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
  font-size: 13px;
  color: var(--c-gray);
}

.site-footer__icp {
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

.site-footer__copy { margin-left: auto; }

/* ---------- 14. 响应式 ---------- */
@media (max-width: 1080px) {
  .site-nav__link {
    font-size: 13.5px;
    padding: 8px 10px;
  }
}

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

  html { scroll-padding-top: 84px; }

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

  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    margin-left: 0;
    padding: 14px var(--gutter) 18px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    background: rgba(8, 16, 28, 0.98);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 26px 46px -26px rgba(0, 0, 0, 0.95);
  }

  .site-nav[data-open] { display: flex; }

  .site-nav__list {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    -webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 48px), transparent 100%);
    mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 48px), transparent 100%);
  }

  .site-nav__link {
    padding: 10px 14px;
    border: 1px solid var(--line);
    background: rgba(20, 38, 61, 0.5);
    font-size: 14.5px;
  }

  .site-nav__link[aria-current="page"]::after {
    left: 14px;
    right: 14px;
  }

  .site-nav__actions { display: flex; }
  .site-nav__actions .btn { flex: 1 1 auto; }

  .brand__sub { display: none; }

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

  .toc { position: static; }

  .site-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-footer__brand { grid-column: 1 / -1; }
  .site-footer__copy { margin-left: 0; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }

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

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

  .brand__name { font-size: 17px; }

  .brand__mark { width: 34px; height: 34px; font-size: 13px; }

  .chapter-num { -webkit-text-stroke-width: 1px; }
}

/* ---------- 15. 减弱动效偏好 ---------- */
@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;
    scroll-behavior: auto !important;
  }

  .btn:hover,
  .site-footer__list a:hover { transform: none; }

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