/* =========================================================================
   永隆现金中心 — 共享站点样式 /assets/site.css
   深海墨蓝底 · 品牌金线条 · 珊瑚橙状态点 · 锐利直角与精密网格
   ========================================================================= */

/* ---------- 1. 基础重置 ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body { margin: 0; }

h1, h2, h3, h4, h5, p, figure, blockquote, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }

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

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

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

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

:where(h1, h2, h3, h4) { text-wrap: balance; }

/* ---------- 2. 设计令牌 ---------- */
:root {
  /* 墨蓝三阶 */
  --ink-900: #0B1F33;
  --ink-800: #122B44;
  --ink-700: #1B3A57;
  /* 金系 */
  --gold: #C9A227;
  --gold-bright: #E3C65A;
  --gold-deep: #8C6F16;
  /* 亮色强调 */
  --coral: #FF6B4A;
  --cream: #F4E9C9;
  --paper: #F7F5EF;
  --slate: #A9B6C3;

  /* 线条 */
  --line: rgba(201, 162, 39, 0.32);
  --line-soft: rgba(201, 162, 39, 0.16);
  --line-hard: rgba(169, 182, 195, 0.18);

  /* 字体 */
  --font-sans: "Source Han Sans SC", "Noto Sans SC", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", Georgia, serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular,
    Menlo, Consolas, monospace;

  /* 排版刻度 */
  --fz-h1: clamp(34px, 5vw, 68px);
  --fz-h2: clamp(24px, 3vw, 40px);
  --fz-h3: clamp(19px, 1.9vw, 24px);
  --fz-body: clamp(16px, 1.05vw, 17.5px);
  --fz-sm: 14px;
  --fz-xs: 12.5px;

  /* 栅格 */
  --shell: 1200px;
  --gutter: clamp(18px, 4vw, 48px);
  --header-pad: clamp(14px, 2.2vw, 26px);
  --section-pad: clamp(40px, 7vw, 88px);
}

:root[data-view="compact"] {
  --shell: 900px;
  --fz-body: 16.5px;
}

/* ---------- 3. 中文排版基线 ---------- */
body {
  font-family: var(--font-sans);
  font-size: var(--fz-body);
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: 0.01em;
  color: var(--paper);
  background-color: var(--ink-900);
  background-image:
    radial-gradient(1100px 560px at 10% -12%, rgba(27, 58, 87, 0.62), transparent 62%),
    radial-gradient(880px 480px at 100% 0%, rgba(201, 162, 39, 0.07), transparent 58%);
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, .h1 {
  font-size: var(--fz-h1);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.012em;
}

h2, .h2 {
  font-size: var(--fz-h2);
  line-height: 1.16;
  font-weight: 800;
  letter-spacing: -0.006em;
}

h3, .h3 {
  font-size: var(--fz-h3);
  line-height: 1.32;
  font-weight: 700;
}

p { max-width: 38em; }

.lede {
  font-size: clamp(16px, 1.25vw, 19px);
  line-height: 1.8;
  color: var(--slate);
  max-width: 36em;
}

.rule {
  display: block;
  height: 1px;
  border: 0;
  margin: 0;
  background: var(--line-soft);
}

/* ---------- 4. 可访问性 ---------- */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 3px;
  border-radius: 1px;
}

.skip-link {
  position: absolute;
  left: 50%;
  top: 0;
  z-index: 120;
  transform: translate(-50%, -160%);
  padding: 11px 22px;
  background: var(--gold);
  color: #081625;
  font: 600 12.5px/1 var(--font-mono);
  letter-spacing: 0.14em;
  border-radius: 0 0 3px 3px;
  transition: transform 0.18s ease;
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translate(-50%, 0);
  outline: 2px solid var(--coral);
  outline-offset: 2px;
}

/* ---------- 5. 页头：居中刊头 ---------- */
.site-header {
  position: relative;
  z-index: 30;
  background:
    linear-gradient(180deg, rgba(27, 58, 87, 0.55), rgba(11, 31, 51, 0) 78%),
    var(--ink-900);
  border-bottom: 1px solid var(--line);
}

.scroll-meter {
  position: fixed;
  inset: 0 0 auto 0;
  height: 2px;
  z-index: 90;
  pointer-events: none;
  background: rgba(201, 162, 39, 0.12);
}

.scroll-meter__fill {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-bright) 70%, var(--coral));
  transition: width 0.1s linear;
}

.masthead { border-bottom: 1px solid var(--line-soft); }

.masthead__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-areas: "start brand end";
  align-items: center;
  gap: 16px;
  max-width: var(--shell);
  margin: 0 auto;
  padding: var(--header-pad) var(--gutter);
}

.masthead__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.masthead__meta--start { grid-area: start; justify-content: flex-start; }
.masthead__meta--end { grid-area: end; justify-content: flex-end; gap: 10px; }

.masthead__rule {
  display: block;
  width: clamp(24px, 6vw, 72px);
  height: 1px;
  flex: none;
  background: var(--gold-deep);
}

.masthead__label {
  font: 500 10.5px/1 var(--font-mono);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--slate);
  white-space: nowrap;
}

/* 品牌印记 */
.brand {
  grid-area: brand;
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 13px;
  padding: 2px 4px;
  transition: opacity 0.18s ease;
}

.brand:hover { opacity: 0.88; }

.brand__mark {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--gold);
  color: var(--gold-bright);
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 20px;
  line-height: 1;
  background: linear-gradient(135deg, rgba(201, 162, 39, 0.18), rgba(11, 31, 51, 0));
}

.brand__mark::after {
  content: "";
  position: absolute;
  top: -3px;
  right: -3px;
  width: 6px;
  height: 6px;
  background: var(--coral);
}

.brand__text { display: grid; gap: 3px; min-width: 0; }

.brand__name {
  font-size: clamp(17px, 1.7vw, 21px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0.02em;
  color: var(--paper);
  white-space: nowrap;
}

.brand__descriptor {
  font: 500 10.5px/1.3 var(--font-mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--slate);
  white-space: nowrap;
}

/* 视图开关 */
.view-switch {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 12px 6px 9px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}

.view-switch:hover {
  border-color: var(--gold);
  background: rgba(201, 162, 39, 0.08);
}

.view-switch__track {
  position: relative;
  display: block;
  width: 26px;
  height: 14px;
  flex: none;
  border-radius: 999px;
  border: 1px solid var(--gold-deep);
  background: rgba(11, 31, 51, 0.9);
}

.view-switch__thumb {
  position: absolute;
  top: 50%;
  left: 2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  transform: translateY(-50%);
  transition: left 0.2s ease, background-color 0.2s ease;
}

.view-switch[aria-pressed="true"] .view-switch__thumb {
  left: 14px;
  background: var(--coral);
}

.view-switch__text {
  font: 500 11px/1 var(--font-mono);
  letter-spacing: 0.14em;
  color: var(--slate);
  white-space: nowrap;
}

/* 移动端栏目按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--paper);
  transition: border-color 0.18s ease, background-color 0.18s ease;
}

.nav-toggle:hover {
  border-color: var(--gold);
  background: rgba(201, 162, 39, 0.08);
}

.nav-toggle__bars { display: grid; gap: 4px; width: 16px; flex: none; }

.nav-toggle__bars span {
  display: block;
  height: 1.5px;
  background: var(--gold-bright);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) {
  transform: translateY(5.5px) 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(-5.5px) rotate(-45deg);
}

.nav-toggle__text {
  font: 500 11px/1 var(--font-mono);
  letter-spacing: 0.18em;
  white-space: nowrap;
}

/* ---------- 6. 主导航 ---------- */
.site-nav {
  border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(180deg, rgba(27, 58, 87, 0.42), rgba(11, 31, 51, 0.1));
}

.site-nav__list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(2px, 2.4vw, 38px);
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

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

.site-nav__link {
  position: relative;
  display: inline-block;
  padding: 15px 10px 16px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.07em;
  color: var(--slate);
  transition: color 0.18s ease;
}

.site-nav__link::before {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  height: 1px;
  background: var(--gold-bright);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.22s ease;
}

.site-nav__link:hover { color: var(--paper); }
.site-nav__link:hover::before { transform: scaleX(1); }

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

.site-nav__link[aria-current="page"]::before {
  transform: scaleX(1);
  height: 2px;
  background: var(--coral);
}

/* ---------- 7. 页脚 ---------- */
.site-footer {
  margin-top: clamp(56px, 9vw, 120px);
  background: linear-gradient(180deg, rgba(18, 43, 68, 0.9), rgba(11, 31, 51, 1));
  border-top: 1px solid var(--line);
  color: var(--paper);
}

.site-footer__inner {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.55fr);
  gap: clamp(28px, 5vw, 64px);
  max-width: var(--shell);
  margin: 0 auto;
  padding: clamp(34px, 5vw, 64px) var(--gutter) clamp(24px, 3.4vw, 44px);
}

.footer-brand { display: grid; gap: 18px; align-content: start; }

.footer-brand .brand { justify-self: start; }

.brand--footer .brand__name { font-size: clamp(16px, 1.4vw, 19px); }

.footer-brand__note {
  font-size: var(--fz-sm);
  line-height: 1.75;
  color: var(--slate);
  max-width: 30em;
}

.footer-brand__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 36px);
  align-content: start;
}

.footer-nav__title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font: 600 11px/1 var(--font-mono);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}

.footer-nav__title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line-soft);
}

.footer-nav__list { display: grid; gap: 10px; }

.footer-nav__link {
  font-size: var(--fz-sm);
  line-height: 1.6;
  color: var(--slate);
  transition: color 0.18s ease, padding-left 0.18s ease;
}

.footer-nav__link:hover {
  color: var(--gold-bright);
  padding-left: 4px;
}

.site-footer__base {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 30px;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 18px var(--gutter) 28px;
  border-top: 1px solid var(--line-soft);
  font: 400 12.5px/1.7 var(--font-mono);
  letter-spacing: 0.04em;
  color: var(--slate);
}

.site-footer__line { max-width: none; }

/* ---------- 8. 通用按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-align: center;
  transition: background-color 0.18s ease, color 0.18s ease,
    border-color 0.18s ease, transform 0.18s ease;
}

.btn--primary {
  background: var(--coral);
  border-color: var(--coral);
  color: #1A0A05;
}

.btn--primary:hover {
  background: #FF8166;
  border-color: #FF8166;
  transform: translateY(-1px);
}

.btn--gold {
  background: var(--gold);
  border-color: var(--gold);
  color: #0B1F33;
}

.btn--gold:hover {
  background: var(--gold-bright);
  border-color: var(--gold-bright);
}

.btn--ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--paper);
}

.btn--ghost:hover {
  background: rgba(201, 162, 39, 0.1);
  border-color: var(--gold);
  color: var(--gold-bright);
}

.btn--sm {
  padding: 8px 15px;
  font-size: 12.5px;
  letter-spacing: 0.08em;
}

/* ---------- 9. 容器与章节 ---------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.site-main { display: block; outline: none; }

.section {
  padding-block: var(--section-pad);
  border-top: 1px solid var(--line-soft);
}

.section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 22px;
  margin-bottom: clamp(20px, 3vw, 34px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 500 11.5px/1 var(--font-mono);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  flex: none;
  background: var(--gold-deep);
}

.idx {
  font-family: var(--font-mono);
  font-size: var(--fz-xs);
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--gold);
}

/* ---------- 10. 面包屑 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-block: 18px;
  font: 400 12px/1.6 var(--font-mono);
  letter-spacing: 0.12em;
  color: var(--slate);
}

.breadcrumb__item { color: inherit; }

a.breadcrumb__item:hover { color: var(--gold-bright); }

.breadcrumb__item[aria-current="page"] { color: var(--gold-bright); }

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

/* ---------- 11. 栅格 ---------- */
.grid {
  display: grid;
  gap: clamp(16px, 2.4vw, 28px);
}

.grid--split { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.grid--split-rev { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ---------- 12. 面板 / 标签 / 筛选 ---------- */
.panel {
  background: var(--ink-800);
  border: 1px solid var(--line-soft);
  padding: clamp(18px, 2.4vw, 28px);
}

.panel--raised {
  background: var(--ink-700);
  border-color: var(--line);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 2px;
  font: 500 11.5px/1.6 var(--font-mono);
  letter-spacing: 0.1em;
  color: var(--slate);
  white-space: nowrap;
}

.tag--classic {
  color: var(--gold-bright);
  border-color: rgba(201, 162, 39, 0.45);
  background: rgba(201, 162, 39, 0.08);
}

.tag--new {
  color: var(--coral);
  border-color: rgba(255, 107, 74, 0.5);
  background: rgba(255, 107, 74, 0.1);
}

.tag--compare {
  color: var(--cream);
  border-color: rgba(244, 233, 201, 0.35);
  background: rgba(244, 233, 201, 0.07);
}

.filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter__btn {
  padding: 7px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 0.06em;
  line-height: 1.4;
  color: var(--slate);
  transition: background-color 0.18s ease, color 0.18s ease,
    border-color 0.18s ease;
}

.filter__btn:hover {
  color: var(--paper);
  border-color: var(--gold);
}

.filter__btn[aria-pressed="true"] {
  background: var(--gold);
  border-color: var(--gold);
  color: #0B1F33;
  font-weight: 600;
}

/* ---------- 13. 图片容器基础规则 ---------- */
.fig { display: block; margin: 0; }

.fig__frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line-soft);
  background: linear-gradient(135deg, var(--ink-800), var(--ink-900));
}

.fig__frame > img,
.fig__frame > svg,
.fig__frame > .fig__ph {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fig__frame::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 14px;
  height: 14px;
  border-top: 1px solid var(--gold);
  border-left: 1px solid var(--gold);
  z-index: 2;
  pointer-events: none;
}

.fig__ph {
  background-image: repeating-linear-gradient(
    135deg,
    rgba(201, 162, 39, 0.12) 0 1px,
    transparent 1px 12px
  );
}

.fig__caption {
  margin-top: 10px;
  font: 400 12.5px/1.7 var(--font-mono);
  letter-spacing: 0.06em;
  color: var(--slate);
}

.fig--wide .fig__frame { aspect-ratio: 21 / 9; }
.fig--tall .fig__frame { aspect-ratio: 4 / 5; }

.fig--screen .fig__frame {
  aspect-ratio: 9 / 19;
  max-width: 280px;
  margin-inline: auto;
}

/* ---------- 14. 视口渐显 ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ---------- 15. 响应式：平板 ---------- */
@media (max-width: 1024px) {
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .grid--split,
  .grid--split-rev { grid-template-columns: minmax(0, 1fr); }

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

/* ---------- 16. 响应式：移动端刊头与导航 ---------- */
@media (max-width: 860px) {
  .masthead__inner {
    grid-template-columns: auto 1fr;
    grid-template-areas: "brand tools";
    gap: 10px 12px;
    padding-block: 13px;
  }

  .masthead__meta--start { display: none; }

  .masthead__meta--end {
    grid-area: tools;
    justify-self: end;
    gap: 8px;
  }

  .brand {
    grid-area: brand;
    justify-self: start;
    gap: 10px;
  }

  .brand__mark { width: 36px; height: 36px; font-size: 17px; }
  .brand__name { font-size: 17px; }
  .brand__descriptor { display: none; }

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

  .site-nav {
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    transition: max-height 0.34s ease, visibility 0s linear 0.34s;
  }

  .site-nav[data-open="true"] {
    max-height: min(72vh, 560px);
    overflow-y: auto;
    visibility: visible;
    transition: max-height 0.34s ease, visibility 0s;
  }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding-block: 4px 10px;
  }

  .site-nav__item { border-top: 1px solid var(--line-soft); }
  .site-nav__item:first-child { border-top: 0; }

  .site-nav__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 14px 2px;
    font-size: 16px;
    letter-spacing: 0.05em;
  }

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

  .site-nav__link[aria-current="page"]::after {
    content: "";
    width: 6px;
    height: 6px;
    flex: none;
    background: var(--coral);
  }
}

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

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

  .site-footer__base { gap: 6px 20px; font-size: 11.5px; }
}

@media (max-width: 520px) {
  .view-switch__text { display: none; }
  .view-switch { padding: 6px 8px; }
}

/* ---------- 17. 减少动态偏好 ---------- */
@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;
    transition-delay: 0s !important;
  }

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

  .btn--primary:hover { transform: none; }
}
