/* ==========================================================================
   逸贝娱乐汇 · 共享样式 /assets/site.css
   潮汐档案室：深海墨蓝底 + 珊瑚橙信息点 + 等宽数据层
   ========================================================================== */

:root {
  --ink: #0B2239;
  --ink-2: #12314F;
  --line: #1E4B73;
  --shell: #F4F1EA;
  --paper: #FBFAF6;
  --coral: #FF6B4A;
  --coral-2: #FF9A7E;
  --celadon: #4FBFA8;
  --amber: #F2B441;
  --slate: #8895A3;

  --font-display: "Noto Sans SC", "HarmonyOS Sans SC", "PingFang SC", "Source Han Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: "Noto Sans SC", "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-data: "IBM Plex Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --w-max: 1240px;
  --pad-x: clamp(20px, 5vw, 64px);
  --header-h: 114px;
  --radius: 4px;
  --ease-out: cubic-bezier(.22, .61, .36, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background-color: var(--ink);
  color: var(--shell);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.8;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; }
li { list-style: none; }
img, svg, video { max-width: 100%; }
button { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
table { border-collapse: collapse; width: 100%; }
::selection { background-color: var(--coral); color: var(--ink); }

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

/* ---------- 排版工具（叙述层 / 数据层 双轨） ---------- */
.h-display {
  font-family: var(--font-display);
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--shell);
}

.h-section {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.6vw, 28px);
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--shell);
}

.h-sub {
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1.35;
  font-weight: 700;
  color: var(--shell);
}

.lede {
  font-size: 18px;
  line-height: 1.75;
  color: rgba(244, 241, 234, .78);
  max-width: 34em;
}

.data {
  font-family: var(--font-data);
  font-size: 14px;
  line-height: 1.6;
  letter-spacing: 0.02em;
  font-weight: 400;
}

.sec-num {
  display: inline-block;
  font-family: var(--font-data);
  font-size: 14px;
  line-height: 1;
  letter-spacing: 0.08em;
  color: var(--coral);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-data);
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.06em;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--shell);
  background-color: rgba(18, 49, 79, .7);
}

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

/* ---------- 布局容器 ---------- */
.container {
  width: 100%;
  max-width: var(--w-max);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

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

.layout-split {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  align-items: start;
}

.split-aside { padding-right: clamp(16px, 2.5vw, 32px); }

.split-main {
  min-width: 0;
  padding-left: clamp(16px, 2.5vw, 32px);
  border-left: 1px solid var(--line);
}

/* ---------- 正文区 ---------- */
.prose {
  max-width: 38em;
  font-size: 17px;
  line-height: 1.8;
  color: rgba(244, 241, 234, .86);
}

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

.prose a {
  color: var(--coral-2);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.prose a:hover { color: var(--coral); }

.zone-paper {
  background-color: var(--paper);
  color: var(--ink);
}

.zone-paper .h-display,
.zone-paper .h-section,
.zone-paper .h-sub { color: var(--ink); }

.zone-paper .lede { color: rgba(11, 34, 57, .76); }
.zone-paper .prose { color: rgba(11, 34, 57, .84); }
.zone-paper .prose a { color: #B93A1E; }
.zone-paper .rule { background-color: rgba(30, 75, 115, .28); }
.zone-paper .sec-num { color: #C03E22; }

/* ---------- 面包屑 ---------- */
.breadcrumbs {
  font-family: var(--font-data);
  font-size: 12.5px;
  line-height: 1.6;
  letter-spacing: 0.03em;
  color: var(--slate);
  margin-block: 24px 0;
}

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

.breadcrumbs li { display: inline-flex; align-items: center; gap: 8px; }
.breadcrumbs li + li::before { content: "/"; color: var(--line); }
.breadcrumbs a { color: var(--slate); transition: color .2s var(--ease-out); }
.breadcrumbs a:hover { color: var(--coral-2); }
.breadcrumbs [aria-current="page"] { color: var(--shell); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.01em;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .2s var(--ease-out),
              border-color .2s var(--ease-out),
              color .2s var(--ease-out),
              transform .2s var(--ease-out);
}

.btn--primary {
  background-color: var(--coral);
  color: var(--ink);
  border-color: var(--coral);
}

.btn--primary:hover { background-color: var(--coral-2); border-color: var(--coral-2); }
.btn--primary:active { transform: translateY(1px); }

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

.btn--ghost:hover { border-color: var(--coral); color: var(--shell); }

/* ---------- 横向溢出卡片带 ---------- */
.rail {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  padding-bottom: 14px;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

.rail > * {
  flex: 0 0 clamp(240px, 26vw, 320px);
  scroll-snap-align: start;
}

.rail::-webkit-scrollbar { height: 6px; }
.rail::-webkit-scrollbar-track { background-color: rgba(30, 75, 115, .3); border-radius: 3px; }
.rail::-webkit-scrollbar-thumb { background-color: var(--line); border-radius: 3px; }
.rail::-webkit-scrollbar-thumb:hover { background-color: var(--coral); }

/* ---------- 媒体容器基础规则 ---------- */
.media {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background-color: var(--ink-2);
  aspect-ratio: 16 / 10;
}

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

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

.media--paper {
  background-color: var(--paper);
  border-color: rgba(30, 75, 115, .25);
}

.media__caption {
  margin-top: 10px;
  font-family: var(--font-data);
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: 0.03em;
  color: var(--slate);
}

/* ---------- 跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 200;
  transform: translateY(-180%);
  padding: 10px 18px;
  background-color: var(--coral);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--radius);
  transition: transform .2s var(--ease-out);
}

.skip-link:focus { transform: translateY(0); }

/* ==========================================================================
   页头
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  margin-bottom: calc(-1 * var(--header-h));
  background-color: transparent;
}

/* 状态条 */
.status-bar {
  background-color: rgba(11, 34, 57, .72);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(30, 75, 115, .7);
  transition: background-color .25s var(--ease-out), border-color .25s var(--ease-out);
}

.status-bar__inner {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2.4vw, 24px);
  width: 100%;
  max-width: var(--w-max);
  min-height: 40px;
  margin-inline: auto;
  padding-inline: var(--pad-x);
  font-family: var(--font-data);
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 0.04em;
  color: var(--slate);
}

.status-bar__item { display: inline-flex; align-items: center; gap: 8px; }
.status-bar__item--state { color: var(--shell); }
.status-bar__item--ver { color: var(--coral); font-weight: 500; }
.status-bar__item--time { color: var(--slate); }
.status-bar__item--time time { color: rgba(244, 241, 234, .7); }

.status-bar__link {
  margin-left: auto;
  color: var(--shell);
  border-bottom: 1px solid rgba(255, 107, 74, .55);
  padding-bottom: 1px;
  transition: color .2s var(--ease-out), border-color .2s var(--ease-out);
}

.status-bar__link:hover { color: var(--coral-2); border-bottom-color: var(--coral-2); }

.status-dot {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background-color: var(--celadon);
  box-shadow: 0 0 0 3px rgba(79, 191, 168, .18);
  animation: dotPulse 2.8s ease-in-out infinite;
}

@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(79, 191, 168, .18); }
  50% { box-shadow: 0 0 0 6px rgba(79, 191, 168, .05); }
}

/* 导航主行 */
.header-bar {
  position: relative;
  background-color: transparent;
  transition: background-color .25s var(--ease-out), box-shadow .25s var(--ease-out);
}

.site-header.is-solid .status-bar {
  background-color: rgba(11, 34, 57, .98);
  border-bottom-color: var(--line);
}

.site-header.is-solid .header-bar {
  background-color: var(--ink);
  box-shadow: 0 1px 0 var(--line), 0 26px 46px -40px rgba(0, 0, 0, .95);
}

.header-bar__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(12px, 2vw, 28px);
  width: 100%;
  max-width: var(--w-max);
  margin-inline: auto;
  padding: 14px var(--pad-x);
}

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

.brand__mark {
  width: 34px;
  height: 34px;
  flex: none;
  border: 1px solid var(--coral);
  border-radius: 6px;
  background-image:
    repeating-linear-gradient(135deg, rgba(255, 107, 74, .85) 0 1px, transparent 1px 6px),
    linear-gradient(160deg, rgba(255, 107, 74, .2), transparent 72%);
  box-shadow: inset 0 0 0 1px rgba(11, 34, 57, .5);
}

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

.brand__name {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--shell);
}

.brand__sub {
  margin-top: 3px;
  font-family: var(--font-data);
  font-size: 10.5px;
  line-height: 1.2;
  letter-spacing: 0.2em;
  color: var(--slate);
}

/* 导航 */
.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.4vw, 18px);
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-item { display: block; }

.nav-link {
  position: relative;
  display: inline-block;
  padding: 10px 12px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
  color: rgba(244, 241, 234, .78);
  border-radius: 3px;
  transition: color .2s var(--ease-out);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 4px;
  height: 2px;
  background-color: var(--coral);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .22s var(--ease-out);
}

.nav-link:hover { color: var(--shell); }
.nav-link:hover::after { transform: scaleX(1); }
.nav-link[aria-current="page"] { color: var(--shell); }
.nav-link[aria-current="page"]::after { transform: scaleX(1); }

.nav-cta { flex: none; }

/* 移动目录按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background-color: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--shell);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  transition: border-color .2s var(--ease-out), color .2s var(--ease-out);
}

.nav-toggle:hover { border-color: var(--coral); }

.nav-toggle__bars {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
}

.nav-toggle__bars span {
  display: block;
  width: 16px;
  height: 1.5px;
  background-color: var(--shell);
  transition: transform .2s var(--ease-out);
}

.site-header[data-open] .nav-toggle__bars span:first-child {
  transform: translateY(2.75px) rotate(45deg);
}

.site-header[data-open] .nav-toggle__bars span:last-child {
  transform: translateY(-2.75px) rotate(-45deg);
}

.nav-toggle__label { white-space: nowrap; }

/* 滚动进度线 */
.scroll-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 3;
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--coral);
  transform: scaleX(0);
  transform-origin: 0 50%;
  pointer-events: none;
  transition: transform .1s linear;
}

/* ==========================================================================
   页脚
   ========================================================================== */
.site-footer {
  position: relative;
  isolation: isolate;
  background-color: var(--ink);
  border-top: 1px solid var(--line);
  padding-block: clamp(48px, 6vw, 80px) 24px;
  color: rgba(244, 241, 234, .7);
  font-size: 15px;
  line-height: 1.8;
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  z-index: -1;
  height: 200px;
  background-image:
    repeating-linear-gradient(90deg, rgba(30, 75, 115, .34) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(0deg, rgba(30, 75, 115, .18) 0 1px, transparent 1px 32px);
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent);
  mask-image: linear-gradient(to bottom, #000, transparent);
  pointer-events: none;
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  gap: clamp(32px, 5vw, 72px);
  padding-bottom: clamp(32px, 4vw, 56px);
  border-bottom: 1px solid rgba(30, 75, 115, .6);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.footer-brand__name {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--shell);
  transition: color .2s var(--ease-out);
}

.footer-brand__name:hover { color: var(--coral-2); }

.footer-brand__tag {
  font-family: var(--font-data);
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: 0.12em;
  color: var(--slate);
}

.footer-brand__ver {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-data);
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 0.06em;
  color: var(--coral);
  border-bottom: 1px solid rgba(255, 107, 74, .4);
  padding-bottom: 2px;
  transition: color .2s var(--ease-out), border-color .2s var(--ease-out);
}

.footer-brand__ver:hover { color: var(--coral-2); border-bottom-color: var(--coral-2); }

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

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

.footer-col__title {
  margin: 0 0 14px;
  font-family: var(--font-data);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.22em;
  color: var(--slate);
}

.footer-link {
  display: block;
  padding: 6px 0;
  font-size: 15px;
  line-height: 1.5;
  color: rgba(244, 241, 234, .72);
  transition: color .2s var(--ease-out);
}

.footer-link:hover { color: var(--coral-2); }
.footer-link[aria-current="page"] { color: var(--coral); }

.footer-meta {
  display: grid;
  gap: 10px;
  padding-block: 24px;
  border-bottom: 1px solid rgba(30, 75, 115, .6);
  font-family: var(--font-data);
  font-size: 12.5px;
  line-height: 1.9;
  letter-spacing: 0.02em;
  color: var(--slate);
}

.footer-meta__line { margin: 0; }

.footer-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 20px;
  font-family: var(--font-data);
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: 0.04em;
  color: rgba(136, 149, 163, .85);
}

/* ==========================================================================
   滚动显现
   ========================================================================== */
[data-reveal] {
  transition: opacity .22s var(--ease-out), transform .22s var(--ease-out);
}

.reveal-ready [data-reveal] {
  opacity: 0;
  transform: translateY(12px);
}

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

/* ==========================================================================
   响应式
   ========================================================================== */
@media (max-width: 1100px) {
  .nav-link { padding-inline: 9px; font-size: 14.5px; }
  .nav-link::after { left: 9px; right: 9px; }
}

@media (max-width: 900px) {
  :root { --header-h: 106px; }

  .header-bar__inner { padding-block: 12px; }

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

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 20;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 14px var(--pad-x) 24px;
    background-color: var(--ink-2);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 34px 52px -32px rgba(0, 0, 0, .92);
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .site-header[data-open] .site-nav { display: flex; }
  .site-header[data-open] .header-bar { background-color: var(--ink); }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav-item { width: 100%; }

  .nav-link {
    display: block;
    padding: 15px 2px;
    font-size: 16px;
    border-bottom: 1px solid rgba(30, 75, 115, .45);
    border-radius: 0;
  }

  .nav-link::after { display: none; }
  .nav-link[aria-current="page"] { color: var(--coral); }

  .nav-cta {
    width: 100%;
    margin-top: 16px;
    padding-block: 13px;
  }

  .grid-12 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

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

  .split-aside {
    padding-right: 0;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--line);
  }

  .split-main {
    padding-left: 0;
    padding-top: 24px;
    border-left: 0;
  }

  .footer-top { grid-template-columns: minmax(0, 1fr); }
  .site-footer { padding-block: clamp(40px, 7vw, 64px) 24px; }
}

@media (max-width: 640px) {
  :root { --header-h: 96px; }

  .status-bar__inner { font-size: 11.5px; gap: 12px; }
  .status-bar__item--time { display: none; }

  .brand__sub { display: none; }
  .brand__mark { width: 30px; height: 30px; }

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

  .footer-cols { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .footer-col { padding-bottom: 12px; }
  .footer-col__title { margin-bottom: 8px; }

  .footer-base { flex-direction: column; align-items: flex-start; }

  .lede { font-size: 16.5px; }
  .btn { width: 100%; }
  .nav-cta { width: 100%; }
}

/* ==========================================================================
   无障碍 / 减少动效
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

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

  .status-dot { animation: none; }
  .rail { scroll-snap-type: none; }

  .reveal-ready [data-reveal],
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
    transition-delay: 0ms !important;
  }
}
