/* ==========================================================
   财神8门户 · Site Kit 共享样式
   设计逻辑：传统财神文化 × 现代数字控制台
   色彩节奏：暗底 + 财神红 + 金色高亮 + 青绿状态
   ========================================================== */

/* ---------- 1. Reset & 变量 ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --c-red: #C0392B;
  --c-gold: #F1C40F;
  --c-dark: #1A1A1A;
  --c-teal: #16A085;
  --c-red-deep: #7B241C;
  --c-gold-light: #F9E79F;
  --c-text: #F5F5F5;
  --c-gray: #2C3E50;

  --font-headline: "汉仪尚巍手书", "STXingkai", "华文行楷", "Noto Serif CJK SC", "Songti SC", serif;
  --font-body: "Noto Sans CJK SC", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  --container-w: 1240px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow-panel: 0 12px 36px rgba(0, 0, 0, 0.4);
  --border-gold: rgba(241, 196, 15, 0.25);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--c-dark);
  color: var(--c-text);
  line-height: 1.75;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

ul, ol {
  list-style: none;
}

button {
  font: inherit;
  border: none;
  background: none;
  color: inherit;
  cursor: pointer;
}

input, textarea, select {
  font: inherit;
}

::selection {
  background: var(--c-gold);
  color: var(--c-dark);
}

/* ---------- 2. 基础标题排版 ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-headline);
  line-height: 1.3;
  font-weight: 700;
  color: var(--c-text);
  text-wrap: balance;
}

h1 { font-size: clamp(2.2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
h3 { font-size: clamp(1.4rem, 2vw, 1.75rem); }
h4 { font-size: clamp(1.2rem, 1.5vw, 1.375rem); }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
  text-wrap: pretty;
}

/* ---------- 3. 布局原语 ---------- */
.shell {
  width: 100%;
  max-width: var(--container-w);
  margin-inline: auto;
  padding-inline: 24px;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(280px, 340px) 1fr;
  gap: 48px;
  align-items: start;
}

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
}

#main-content {
  min-height: 60vh;
}

/* ---------- 4. Skip Link ---------- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 3000;
  background: var(--c-gold);
  color: var(--c-dark);
  font-weight: 700;
  font-size: 14px;
  padding: 10px 20px;
  border-radius: 0 0 4px 4px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  transition: top 0.3s var(--ease);
}

.skip-link:focus {
  top: 0;
  outline: none;
  background: var(--c-gold);
  color: var(--c-dark);
}

/* ---------- 5. 滚动进度条 ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 2000;
  pointer-events: none;
}

.scroll-progress__bar {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--c-red) 0%, var(--c-gold) 50%, var(--c-teal) 100%);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

/* ---------- 6. 头部 & 刊头 ---------- */
.site-header {
  position: relative;
  z-index: 100;
  background:
    linear-gradient(180deg, rgba(192, 57, 43, 0.12) 0%, rgba(26, 26, 26, 0.98) 100%),
    var(--c-dark);
  border-bottom: 1px solid rgba(241, 196, 15, 0.12);
}

.masthead {
  position: relative;
  background-image:
    linear-gradient(rgba(241, 196, 15, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(241, 196, 15, 0.025) 1px, transparent 1px);
  background-size: 20px 20px;
  background-position: center;
}

.masthead::after {
  content: "";
  display: block;
  height: 3px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--c-red) 15%,
    var(--c-gold) 50%,
    var(--c-red) 85%,
    transparent 100%);
  opacity: 0.85;
}

.masthead__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 10px 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: rgba(245, 245, 245, 0.5);
  border-bottom: 1px solid rgba(241, 196, 15, 0.08);
}

.masthead__tagline {
  color: var(--c-gold);
  letter-spacing: 0.16em;
}

.masthead__code {
  color: rgba(245, 245, 245, 0.38);
  letter-spacing: 0.12em;
}

.masthead__main {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 32px 24px 24px;
}

/* ---------- 7. 品牌 ---------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 16px;
}

.brand__seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border: 2px solid var(--c-gold);
  border-radius: 50%;
  color: var(--c-gold);
  font-family: var(--font-headline);
  font-size: 28px;
  line-height: 1;
  padding-top: 2px;
  background: radial-gradient(circle at 35% 30%, var(--c-red-deep) 0%, var(--c-dark) 72%);
  box-shadow: 0 0 24px rgba(241, 196, 15, 0.2), inset 0 0 8px rgba(241, 196, 15, 0.12);
  flex-shrink: 0;
}

.brand__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand__name {
  font-family: var(--font-headline);
  font-size: 38px;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: var(--c-gold);
  line-height: 1.15;
  text-shadow: 0 2px 12px rgba(192, 57, 43, 0.35);
}

.brand__en {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.26em;
  color: rgba(245, 245, 245, 0.5);
  text-transform: uppercase;
}

/* ---------- 8. 移动端导航开关 ---------- */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid var(--border-gold);
  border-radius: 2px;
  background: rgba(192, 57, 43, 0.25);
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
}

.nav-toggle:hover {
  background: rgba(192, 57, 43, 0.4);
  border-color: rgba(241, 196, 15, 0.5);
}

.nav-toggle__bars {
  display: inline-flex;
  flex-direction: column;
  gap: 5px;
  width: 20px;
}

.nav-toggle__bar {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--c-gold);
  border-radius: 1px;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

.nav-toggle__text {
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text);
  letter-spacing: 0.08em;
}

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

/* ---------- 9. 全站导航 ---------- */
.site-nav {
  background: rgba(0, 0, 0, 0.22);
  border-top: 1px solid rgba(241, 196, 15, 0.12);
  border-bottom: 1px solid rgba(241, 196, 15, 0.12);
}

.site-nav__list {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 24px;
}

.site-nav__link {
  display: inline-block;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: rgba(245, 245, 245, 0.85);
  position: relative;
  transition:
    color 0.3s var(--ease),
    background 0.3s var(--ease);
}

.site-nav__link::after {
  content: "";
  position: absolute;
  bottom: 8px;
  left: 20px;
  right: 20px;
  height: 2px;
  background: linear-gradient(90deg, var(--c-gold), var(--c-red));
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.3s var(--ease);
}

.site-nav__link:hover {
  color: var(--c-gold);
}

.site-nav__link:hover::after,
.site-nav__link[aria-current="page"]::after {
  transform: scaleX(1);
}

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

/* ---------- 10. 页脚 ---------- */
.site-footer {
  position: relative;
  background:
    radial-gradient(ellipse at 18% 0%, rgba(192, 57, 43, 0.16) 0%, transparent 62%),
    linear-gradient(180deg, var(--c-dark) 0%, #120d0d 100%);
  border-top: 1px solid rgba(241, 196, 15, 0.14);
}

.footer-topline {
  height: 4px;
  background: linear-gradient(90deg,
    var(--c-red) 0%,
    var(--c-gold) 50%,
    var(--c-teal) 100%);
  opacity: 0.7;
}

.footer-shell {
  padding-top: 64px;
  padding-bottom: 36px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 48px;
}

.footer-block {
  min-width: 0;
}

.footer-block--brand .brand__seal {
  width: 44px;
  height: 44px;
  font-size: 22px;
  border-width: 1.5px;
}

.footer-block--brand .brand__name {
  font-size: 26px;
  letter-spacing: 0.1em;
}

.footer-trust {
  margin-top: 18px;
  font-size: 14px;
  line-height: 1.75;
  color: rgba(245, 245, 245, 0.72);
  border-left: 3px solid var(--c-red);
  padding-left: 14px;
}

.footer-note {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.7;
  color: rgba(245, 245, 245, 0.48);
}

.footer-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--c-gold);
  margin-bottom: 18px;
  text-transform: uppercase;
}

.footer-heading::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(241, 196, 15, 0.4), transparent);
}

.footer-heading__index {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--c-red);
  border: 1px solid rgba(192, 57, 43, 0.7);
  border-radius: 2px;
  padding: 1px 5px;
  letter-spacing: 0;
}

.footer-list li {
  margin-bottom: 10px;
}

.footer-list a {
  font-size: 14px;
  color: rgba(245, 245, 245, 0.78);
  transition:
    color 0.25s var(--ease),
    padding-left 0.25s var(--ease);
}

.footer-list a:hover {
  color: var(--c-gold);
  padding-left: 6px;
}

.footer-contact__item {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(245, 245, 245, 0.06);
}

.footer-contact__item:last-child {
  border-bottom: none;
}

.footer-contact__label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--c-gold);
  min-width: 36px;
  letter-spacing: 0.12em;
}

.footer-contact__value {
  font-size: 14px;
  line-height: 1.65;
  color: rgba(245, 245, 245, 0.78);
  word-break: break-all;
}

.footer-bottom {
  background: rgba(0, 0, 0, 0.28);
  border-top: 1px solid rgba(241, 196, 15, 0.08);
  padding: 20px 0;
}

.footer-bottom__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: rgba(245, 245, 245, 0.5);
}

.footer-icp {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: rgba(245, 245, 245, 0.4);
}

/* ---------- 11. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 2px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.4;
  position: relative;
  overflow: hidden;
  transition:
    transform 0.25s var(--ease),
    box-shadow 0.25s var(--ease),
    background 0.25s var(--ease),
    border-color 0.25s var(--ease);
}

.btn--primary {
  background: linear-gradient(135deg, var(--c-red) 0%, var(--c-red-deep) 100%);
  color: #fff;
  border: 1px solid rgba(241, 196, 15, 0.4);
  clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(192, 57, 43, 0.4);
}

.btn--ghost {
  background: transparent;
  color: var(--c-gold);
  border: 1px solid var(--border-gold);
}

.btn--ghost:hover {
  background: rgba(241, 196, 15, 0.08);
  border-color: rgba(241, 196, 15, 0.55);
  transform: translateY(-2px);
}

/* ---------- 12. 索引标签 & 分区标题 ---------- */
.kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-gold);
  margin-bottom: 12px;
}

.section-title {
  position: relative;
  padding-left: 20px;
  margin-bottom: 24px;
}

.section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 70%;
  min-height: 24px;
  background: linear-gradient(180deg, var(--c-red), var(--c-red-deep));
  border-radius: 2px;
}

/* ---------- 13. 面包屑 ---------- */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: rgba(245, 245, 245, 0.55);
  padding: 16px 0;
}

.breadcrumbs a {
  color: var(--c-gold);
  transition: color 0.2s var(--ease);
}

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

.breadcrumbs__sep {
  opacity: 0.35;
  font-size: 12px;
}

.breadcrumbs [aria-current="page"] {
  color: rgba(245, 245, 245, 0.85);
}

/* ---------- 14. 面板 ---------- */
.panel {
  position: relative;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(241, 196, 15, 0.14);
  padding: 26px 24px;
  box-shadow: var(--shadow-panel);
}

.panel::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  width: 26px;
  height: 26px;
  border-top: 3px solid var(--c-gold);
  border-left: 3px solid var(--c-gold);
}

.panel--dark {
  background: rgba(0, 0, 0, 0.25);
}

.panel--red-tint {
  background: linear-gradient(160deg, rgba(192, 57, 43, 0.12), rgba(26, 26, 26, 0.6));
}

/* ---------- 15. 显现动效 ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.7s var(--ease),
    transform 0.7s var(--ease);
  will-change: opacity, transform;
}

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

/* ---------- 16. 响应式 ---------- */
@media (max-width: 1024px) {
  .split-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

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

@media (max-width: 768px) {
  .shell {
    padding-inline: 16px;
  }

  .masthead__meta {
    display: none;
  }

  .masthead__main {
    justify-content: space-between;
    align-items: center;
    padding: 18px 16px 14px;
  }

  .brand__name {
    font-size: 28px;
  }

  .brand__seal {
    width: 42px;
    height: 42px;
    font-size: 22px;
  }

  .brand__en {
    font-size: 10px;
    letter-spacing: 0.2em;
  }

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

  .site-nav {
    display: none;
    border: none;
    background: rgba(0, 0, 0, 0.45);
    border-top: 1px solid rgba(241, 196, 15, 0.12);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
  }

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

  .site-nav__list {
    flex-direction: column;
    padding: 8px 16px 18px;
    gap: 0;
  }

  .site-nav__item {
    border-bottom: 1px solid rgba(245, 245, 245, 0.07);
  }

  .site-nav__item:last-child {
    border-bottom: none;
  }

  .site-nav__link {
    display: block;
    padding: 14px 12px;
    font-size: 16px;
  }

  .site-nav__link::after {
    display: none;
  }

  .site-nav__link[aria-current="page"] {
    color: var(--c-gold);
    background: rgba(241, 196, 15, 0.07);
    border-left: 3px solid var(--c-gold);
    padding-left: 12px;
  }

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

  .footer-shell {
    padding-top: 48px;
  }

  .footer-bottom__inner {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .brand__name {
    font-size: 24px;
  }

  .brand__seal {
    width: 38px;
    height: 38px;
    font-size: 20px;
  }

  .nav-toggle__text {
    display: none;
  }

  .btn {
    padding: 12px 22px;
  }
}

/* ---------- 17. 焦点可见性 ---------- */
:focus-visible {
  outline: 2px solid var(--c-gold);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- 18. 减少动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .scroll-progress {
    display: none;
  }

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

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

/* ---------- 19. 图片容器基础规则 ---------- */
.media-frame {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(192, 57, 43, 0.1), rgba(26, 26, 26, 0.5));
  border: 1px solid rgba(241, 196, 15, 0.15);
}

.media-frame--coin {
  border-radius: 50%;
  aspect-ratio: 1 / 1;
}

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

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

.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.media-frame:hover img {
  transform: scale(1.03);
}

@media (prefers-reduced-motion: reduce) {
  .media-frame img {
    transition: none;
  }

  .media-frame:hover img {
    transform: none;
  }
}

/* ---------- 20. 工具类 ---------- */
.text-center { text-align: center; }
.text-gold { color: var(--c-gold); }
.text-red { color: var(--c-red); }
.text-teal { color: var(--c-teal); }
.text-muted { color: rgba(245, 245, 245, 0.55); }
.mono { font-family: var(--font-mono); }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-48 { margin-top: 48px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-48 { margin-bottom: 48px; }
.py-64 { padding-top: 64px; padding-bottom: 64px; }
