/* ============================================================
   E尊国中心 · /assets/site.css
   共享外壳：reset / 变量 / 中文排版 / 页头 / 页脚 / 通用组件
   ============================================================ */

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

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

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

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

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

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

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

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

/* ---------- 2. 变量 ---------- */
:root {
  --ink: #15131B;
  --paper: #F5F0E6;
  --dusk: #2A1B45;
  --lake: #1E6F6A;
  --gold: #E4B04A;
  --rock: #6C6875;
  --haze: #5A4788;
  --mist: #A9D6D0;
  --verm: #C24A3F;

  --line: 2px solid var(--ink);
  --shadow-sm: 4px 4px 0 var(--ink);
  --shadow: 6px 6px 0 var(--ink);
  --shadow-lg: 10px 10px 0 var(--ink);

  --font-head: "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC",
    "Noto Sans SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-body: "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC",
    "Noto Sans SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas,
    "Liberation Mono", "Courier New", monospace;

  --wrap: 1280px;
  --gutter: clamp(16px, 4vw, 32px);
  --ease: cubic-bezier(.2, .7, .3, 1);
}

/* ---------- 3. 中文排版 ---------- */
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  font-weight: 900;
  line-height: 1.16;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.6rem, 6vw, 5.2rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: clamp(1.15rem, 1.9vw, 1.45rem); }

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

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

a:hover { text-decoration: underline; }

strong, b { font-weight: 800; }

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

.site-header :focus-visible,
.site-footer :focus-visible,
.section--dark :focus-visible,
.section--ink :focus-visible {
  outline-color: var(--gold);
}

/* ---------- 4. 工具类 ---------- */
.container {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.container--narrow { max-width: 820px; }

.mono {
  font-family: var(--font-mono);
  letter-spacing: 2px;
  font-weight: 500;
}

.idx-num {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 3px;
  color: var(--gold);
}

.vert-note {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 4px;
  writing-mode: vertical-rl;
  color: var(--rock);
}

.divider {
  border: 0;
  height: 2px;
  background: var(--ink);
  margin: clamp(28px, 4vw, 48px) 0;
}

.divider--stripe {
  height: 6px;
  background: repeating-linear-gradient(90deg,
    var(--ink) 0 12px, var(--gold) 12px 24px);
}

.scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(90deg,
    rgba(169, 214, 208, .16) 0 1px, transparent 1px 6px);
  animation: scan-drift 12s linear infinite;
}

@keyframes scan-drift {
  from { background-position: 0 0; }
  to { background-position: 6px 0; }
}

/* ---------- 5. 区块与网格 ---------- */
.section {
  position: relative;
  padding: clamp(48px, 8vw, 96px) 0;
}

.section--dark { background: var(--dusk); color: var(--paper); }
.section--paper { background: var(--paper); color: var(--ink); }
.section--ink { background: var(--ink); color: var(--paper); }

.grid {
  display: grid;
  gap: clamp(14px, 2vw, 22px);
}

.grid--2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

/* ---------- 6. 按钮 / 标签 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 22px;
  border: var(--line);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .02em;
  line-height: 1.4;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform .16s var(--ease), box-shadow .16s var(--ease),
    background-color .16s var(--ease), color .16s var(--ease);
}

.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 var(--ink);
  text-decoration: none;
}

.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--ink);
}

.btn--gold { background: var(--gold); color: var(--ink); }
.btn--lake { background: var(--lake); color: var(--paper); }

.btn--ghost {
  background: transparent;
  color: inherit;
  border-color: currentColor;
  box-shadow: none;
}

.btn--ghost:hover {
  background: rgba(169, 214, 208, .16);
  transform: none;
  box-shadow: none;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border: 1px solid currentColor;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  line-height: 1.6;
  white-space: nowrap;
}

.tag--lake { color: var(--lake); background: rgba(30, 111, 106, .09); }
.tag--gold { color: #8A6413; background: rgba(228, 176, 74, .22); border-color: #B8892C; }
.tag--verm { color: var(--verm); background: rgba(194, 74, 63, .1); }
.tag--mist { color: var(--lake); background: var(--mist); border-color: var(--lake); }

/* ---------- 7. 卡片 ---------- */
.card {
  position: relative;
  background: var(--paper);
  color: var(--ink);
  border: var(--line);
  box-shadow: var(--shadow);
  padding: clamp(18px, 2.4vw, 28px);
}

.card--dark {
  background: var(--dusk);
  color: var(--paper);
}

.card--offset { transform: translate(-8px, -8px); }

.card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3px;
  color: var(--rock);
}

.card--dark .card__meta { color: var(--mist); }

.card__title {
  font-size: clamp(1.1rem, 1.8vw, 1.5rem);
  margin-bottom: 10px;
}

.card__body {
  max-width: 38em;
  font-size: 15px;
  color: var(--rock);
}

.card--dark .card__body { color: rgba(245, 240, 230, .78); }

/* ---------- 8. 图片容器 ---------- */
.media {
  position: relative;
  display: block;
  overflow: hidden;
  min-height: 120px;
  border: var(--line);
  background:
    linear-gradient(135deg, var(--dusk) 0%, var(--haze) 48%, var(--lake) 100%);
  box-shadow: var(--shadow);
}

.media > img,
.media > svg,
.media > picture > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg,
    rgba(21, 19, 27, .14) 0 1px, transparent 1px 5px);
}

.media--wide { aspect-ratio: 16 / 9; }
.media--tall { aspect-ratio: 3 / 4; }
.media--square { aspect-ratio: 1 / 1; }
.media--banner { aspect-ratio: 21 / 9; }

.media--frame {
  transform: translate(-6px, -6px);
  box-shadow: var(--shadow-lg);
}

.media__caption {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 14px;
  background: rgba(21, 19, 27, .8);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2px;
}

/* ---------- 9. 面包屑 / 正文 / 眉标 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--rock);
}

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

.breadcrumb li + li::before {
  content: "/";
  color: var(--gold);
}

.breadcrumb a { color: inherit; }
.breadcrumb a:hover { color: var(--lake); }

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 4px;
  color: var(--lake);
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: currentColor;
}

.eyebrow--light { color: var(--gold); }

.prose {
  max-width: 38em;
  font-size: 17px;
  line-height: 1.8;
}

.prose h2 { margin: 1.8em 0 .5em; }
.prose h3 { margin: 1.5em 0 .4em; }

.prose ul,
.prose ol {
  margin: 0 0 1.2em;
  padding-left: 1.3em;
}

.prose ul { list-style: square; }
.prose ol { list-style: decimal; }
.prose li { margin-bottom: .5em; }

.prose a { border-bottom: 1px solid currentColor; }

.prose blockquote {
  margin: 1.4em 0;
  padding: 14px 20px;
  border-left: 6px solid var(--gold);
  background: rgba(228, 176, 74, .12);
}

.prose code {
  font-family: var(--font-mono);
  font-size: .9em;
  padding: 2px 6px;
  background: rgba(21, 19, 27, .08);
}

/* ---------- 10. 显现协议 ---------- */
.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .22s var(--ease), transform .22s var(--ease);
}

.js-reveal [data-reveal][data-revealed] {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   11. 页头
   ============================================================ */
.skip-link {
  position: absolute;
  left: 12px;
  top: -120px;
  z-index: 200;
  padding: 10px 18px;
  background: var(--gold);
  color: var(--ink);
  border: var(--line);
  font-weight: 800;
  font-size: 14px;
  transition: top .16s var(--ease);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: var(--dusk);
  color: var(--paper);
  border-bottom: 2px solid var(--ink);
  box-shadow: 0 4px 0 rgba(21, 19, 27, .45);
}

.cmd-bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 26px);
  width: 100%;
  max-width: var(--wrap);
  min-height: 64px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  padding: 6px 0;
  color: var(--paper);
  font-family: var(--font-head);
  font-size: clamp(15px, 1.5vw, 17px);
  font-weight: 900;
  letter-spacing: -.01em;
  white-space: nowrap;
}

.brand:hover { text-decoration: none; }
.brand:hover .brand__name { color: var(--gold); }

.brand__mark {
  padding: 2px 6px;
  background: var(--gold);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 1.5;
}

.brand__name { transition: color .16s var(--ease); }

.brand__motto {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 2px;
  color: var(--mist);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  margin-left: auto;
  padding: 8px 13px;
  border: 2px solid var(--gold);
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 3px;
}

.nav-toggle__bars {
  position: relative;
  display: block;
  width: 18px;
  height: 10px;
}

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

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

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before {
  top: 4px;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after {
  top: 4px;
  transform: rotate(-45deg);
}

.site-nav {
  flex: 1 1 auto;
  min-width: 0;
}

.site-nav__list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(2px, .7vw, 10px);
}

.site-nav__link {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 8px 9px 6px;
  border-bottom: 3px solid transparent;
  color: rgba(245, 240, 230, .78);
  font-family: var(--font-head);
  font-size: 13.5px;
  font-weight: 700;
  white-space: nowrap;
  transition: color .16s var(--ease), border-color .16s var(--ease),
    background-color .16s var(--ease);
}

.site-nav__link:hover {
  color: var(--paper);
  background: rgba(169, 214, 208, .12);
  text-decoration: none;
}

.site-nav__link[aria-current="page"] {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.site-nav__idx {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--mist);
  opacity: .68;
}

.site-nav__link[aria-current="page"] .site-nav__idx {
  color: var(--gold);
  opacity: 1;
}

.ver-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  margin-left: auto;
  padding: 4px 10px;
  background: rgba(30, 111, 106, .3);
  border: 2px solid var(--lake);
  color: var(--mist);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  white-space: nowrap;
}

.ver-tag__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  animation: ver-pulse 2.4s ease-in-out infinite;
}

@keyframes ver-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .25; }
}

.scroll-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  z-index: 2;
  height: 3px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: 0 50%;
  pointer-events: none;
}

/* 页头 · 移动端 */
@media (max-width: 899px) {
  .cmd-bar { min-height: 58px; }

  .brand__motto { display: none; }

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

  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    display: none;
    padding: 8px var(--gutter) 18px;
    background: var(--dusk);
    border-top: 2px solid var(--gold);
    border-bottom: 2px solid var(--ink);
    box-shadow: 0 8px 0 rgba(21, 19, 27, .42);
  }

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

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .site-nav__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 4px;
    border-bottom: 1px solid rgba(245, 240, 230, .16);
    font-size: 16px;
  }

  .site-nav__link[aria-current="page"] {
    border-bottom-color: var(--gold);
  }

  .site-nav__idx { font-size: 11px; }

  .ver-tag { display: none; }
}

/* 页头 · 桌面端 */
@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .site-nav { display: block; }
  .ver-tag { display: inline-flex; }
}

@media (min-width: 900px) and (max-width: 1080px) {
  .site-nav__link { font-size: 12.5px; padding: 8px 6px 6px; }
  .site-nav__idx { display: none; }
}

/* ============================================================
   12. 页脚
   ============================================================ */
.site-footer {
  background: var(--dusk);
  color: var(--paper);
  border-top: 6px solid var(--gold);
}

.site-footer__inner {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(36px, 6vw, 64px) var(--gutter) clamp(28px, 4vw, 46px);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 26px;
}

.footer-col {
  padding-bottom: 24px;
  border-bottom: 2px solid rgba(245, 240, 230, .18);
}

.footer-col:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.footer-col__title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 4px;
}

.footer-col__title::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: repeating-linear-gradient(90deg,
    rgba(228, 176, 74, .8) 0 4px, transparent 4px 9px);
}

.footer-index a,
.footer-actions a {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(245, 240, 230, .1);
  color: rgba(245, 240, 230, .82);
  font-size: 15px;
  font-weight: 600;
  transition: color .16s var(--ease), padding-left .16s var(--ease),
    border-color .16s var(--ease);
}

.footer-index a:hover,
.footer-actions a:hover {
  padding-left: 6px;
  border-bottom-color: var(--gold);
  color: var(--gold);
  text-decoration: none;
}

.footer-index__idx {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--mist);
  opacity: .7;
}

.footer-contact li {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 9px 0;
  border-bottom: 1px dashed rgba(245, 240, 230, .18);
  font-size: 14px;
}

.footer-contact li:last-child { border-bottom: 0; }

.footer-contact__label {
  padding-top: 3px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--mist);
}

.footer-contact__value {
  color: rgba(245, 240, 230, .9);
  word-break: break-word;
}

.footer-cta { margin-top: 20px; }

.footer-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 18px var(--gutter) 30px;
  border-top: 2px solid rgba(245, 240, 230, .28);
  font-size: 13px;
  color: rgba(245, 240, 230, .62);
}

.footer-base__sign { margin: 0; }

.footer-base__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.footer-base__legal a {
  color: rgba(245, 240, 230, .76);
  font-weight: 600;
}

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

/* 页脚 · 平板与桌面 */
@media (min-width: 760px) {
  .footer-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
  }

  .footer-col {
    padding: 4px 26px;
    border-bottom: 0;
    border-right: 2px solid rgba(245, 240, 230, .18);
  }

  .footer-col:first-child { padding-left: 0; }

  .footer-col:last-child {
    padding-right: 0;
    border-right: 0;
  }
}

/* ============================================================
   13. 无障碍与动效偏好
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }

  .scanlines { animation: none; }
  .ver-tag__dot { animation: none; }

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