/* ==========================================================================
   胜博CN · 共享样式表 /assets/site.css
   设计基调：深海蓝仪表盘画布 + 荧光青交互态 + 琥珀橙重点入口
   ========================================================================== */

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

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

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

ul, ol { margin: 0; padding: 0; 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; padding: 0; cursor: pointer; }

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

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

hr { border: 0; border-top: 1px solid rgba(111, 123, 134, .3); margin: 0; }

/* ---------- 2. 设计变量 ---------- */
:root {
  /* 色彩 */
  --ink: #081826;
  --graphite: #141C24;
  --slate: #334A5E;
  --stone: #6F7B86;
  --cream: #F2EFE8;
  --mist: #DCE3E6;
  --cyan: #2FE3D0;
  --amber: #FF9E3D;
  --teal: #0E3A40;
  --moss: #5D7F6C;
  --clay: #B56B4A;

  /* 字体 */
  --font-display: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "Inter", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-label: "IBM Plex Mono", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", monospace;

  /* 字号 */
  --fs-h1: clamp(2.25rem, 1.35rem + 3.5vw, 4rem);
  --fs-h2: clamp(1.6rem, 1.18rem + 1.9vw, 2.25rem);
  --fs-h3: clamp(1.12rem, 1rem + .72vw, 1.5rem);
  --fs-body: clamp(.95rem, .905rem + .22vw, 1.0625rem);
  --fs-label: .75rem;

  /* 结构 */
  --shell-max: 1320px;
  --gutter: clamp(16px, 4vw, 32px);
  --radius-lg: 26px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --radius-pill: 999px;
  --space-section: clamp(40px, 6vw, 80px);
  --ring: 2px solid var(--cyan);
}

/* ---------- 3. 基础排版 ---------- */
body {
  min-height: 100vh;
  background-color: var(--ink);
  background-image:
    radial-gradient(circle at 88% -8%, rgba(14, 58, 64, .85), transparent 55%),
    radial-gradient(circle at 4% 8%, rgba(51, 74, 94, .5), transparent 42%);
  background-repeat: no-repeat;
  color: var(--cream);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.75;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: .015em;
  text-wrap: balance;
}

h1 { font-size: var(--fs-h1); letter-spacing: .03em; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: 1.35; }

p { text-wrap: pretty; }

::selection { background: var(--cyan); color: var(--ink); }

:where(a, button, [tabindex]):focus-visible {
  outline: var(--ring);
  outline-offset: 3px;
  border-radius: 6px;
}

.lead {
  font-size: clamp(1rem, .95rem + .3vw, 1.15rem);
  line-height: 1.85;
  color: var(--mist);
  max-width: 62ch;
}

.text-muted { color: var(--stone); }

/* ---------- 4. 跳至主要内容 ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  display: inline-flex;
  align-items: center;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  background: var(--cyan);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: .9rem;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform .18s ease;
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  outline: 2px solid var(--cream);
  outline-offset: 3px;
}

/* ---------- 5. 头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: linear-gradient(180deg, rgba(20, 28, 36, .97) 0%, rgba(8, 24, 38, .97) 100%);
  border-bottom: 1px solid rgba(111, 123, 134, .3);
  color: var(--cream);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.site-header__inner {
  position: relative;
  width: 100%;
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.site-header__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(12px, 2vw, 28px);
  padding: clamp(10px, 1.3vw, 16px) 0;
  border-bottom: 1px solid rgba(111, 123, 134, .2);
}

/* 品牌 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.brand__mark {
  position: relative;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 13px;
  background:
    radial-gradient(circle at 72% 24%, rgba(47, 227, 208, .8), transparent 58%),
    linear-gradient(150deg, var(--slate) 0%, var(--teal) 58%, var(--ink) 100%);
  box-shadow: inset 0 0 0 1px rgba(47, 227, 208, .38);
}

.brand__mark::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 6px;
  border: 2px solid rgba(242, 239, 232, .82);
  border-top-color: var(--cyan);
  border-left-color: var(--amber);
}

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

.brand__name {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, .98rem + .5vw, 1.25rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: .07em;
  white-space: nowrap;
}

.brand__tag {
  font-family: var(--font-label);
  font-size: .68rem;
  line-height: 1.2;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--stone);
  white-space: nowrap;
}

/* 状态徽标 */
.status-badges {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(111, 123, 134, .42);
  background: rgba(51, 74, 94, .34);
  color: var(--mist);
  font-family: var(--font-label);
  font-size: .7rem;
  letter-spacing: .1em;
  white-space: nowrap;
}

.status-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--stone);
}

.status-badge--live {
  color: var(--cyan);
  border-color: rgba(47, 227, 208, .45);
  background: rgba(47, 227, 208, .09);
}

.status-badge--live::before {
  background: var(--cyan);
  box-shadow: 0 0 0 3px rgba(47, 227, 208, .16);
}

.status-badge--saved {
  color: var(--amber);
  border-color: rgba(255, 158, 61, .42);
  background: rgba(255, 158, 61, .09);
}

.status-badge--saved::before { background: var(--amber); }

/* 导航行 */
.site-header__nav {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 9px 0;
}

.site-nav {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 4px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 9px 15px;
  border-radius: var(--radius-pill);
  color: var(--mist);
  font-family: var(--font-body);
  font-size: .9rem;
  font-weight: 500;
  letter-spacing: .02em;
  white-space: nowrap;
  transition: color .16s ease, background-color .16s ease, box-shadow .16s ease;
}

.nav-link:hover {
  color: var(--cream);
  background: rgba(51, 74, 94, .62);
}

.nav-link[aria-current="page"] {
  color: var(--cyan);
  background: rgba(47, 227, 208, .12);
  box-shadow: inset 0 0 0 1px rgba(47, 227, 208, .42);
  font-weight: 600;
}

.nav-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding-left: 14px;
  font-family: var(--font-label);
  font-size: .68rem;
  letter-spacing: .14em;
  color: var(--stone);
  white-space: nowrap;
}

.nav-status__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--moss);
  box-shadow: 0 0 0 3px rgba(93, 127, 108, .22);
}

/* 移动菜单按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  margin-left: auto;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(111, 123, 134, .5);
  background: rgba(51, 74, 94, .55);
  color: var(--cream);
  font-family: var(--font-label);
  font-size: .7rem;
  letter-spacing: .12em;
  transition: background-color .16s ease, border-color .16s ease;
}

.nav-toggle:hover { background: rgba(51, 74, 94, .9); }

.nav-toggle__bars {
  display: grid;
  gap: 3px;
  width: 16px;
}

.nav-toggle__bars > span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform .18s ease, opacity .18s ease;
}

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

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

/* ---------- 6. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(48px, 7vw, 96px);
  background: linear-gradient(180deg, var(--graphite) 0%, var(--ink) 62%);
  border-top: 1px solid rgba(111, 123, 134, .28);
  color: var(--mist);
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  right: -18%;
  bottom: -46%;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(14, 58, 64, .9), transparent 68%);
  pointer-events: none;
}

.site-footer__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: clamp(34px, 5vw, 64px) var(--gutter) clamp(20px, 3vw, 30px);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: minmax(250px, 1.5fr) repeat(3, minmax(150px, 1fr));
  gap: clamp(26px, 4vw, 52px);
}

.brand--footer { margin-bottom: 14px; }

.footer-brand__note {
  max-width: 34ch;
  font-size: .9rem;
  line-height: 1.8;
  color: var(--stone);
}

.footer-group__title {
  margin-bottom: 14px;
  font-family: var(--font-label);
  font-size: .72rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--cyan);
}

.footer-group__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-link {
  display: inline-block;
  padding: 4px 0;
  font-size: .93rem;
  color: var(--mist);
  transition: color .16s ease, transform .16s ease;
}

.footer-link:hover {
  color: var(--cyan);
  transform: translateX(3px);
}

.footer-contact {
  display: grid;
  gap: 1px;
}

.footer-contact__label {
  font-family: var(--font-label);
  font-size: .67rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--stone);
}

.footer-contact__value {
  font-size: .92rem;
  line-height: 1.55;
  color: var(--cream);
  overflow-wrap: anywhere;
}

.footer-note {
  max-width: 32ch;
  margin-top: 4px;
  font-size: .8rem;
  line-height: 1.65;
  color: var(--stone);
}

.footer-icp {
  display: inline-block;
  padding: 4px 0;
  font-family: var(--font-label);
  font-size: .74rem;
  letter-spacing: .06em;
  color: var(--stone);
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  margin-top: clamp(28px, 4vw, 48px);
  padding-top: 18px;
  border-top: 1px solid rgba(111, 123, 134, .24);
}

.footer-copy {
  font-size: .79rem;
  line-height: 1.6;
  color: var(--stone);
}

.footer-copy--muted {
  font-family: var(--font-label);
  letter-spacing: .1em;
  color: rgba(111, 123, 134, .9);
}

/* ---------- 7. 正文容器与网格 ---------- */
.container {
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.section { padding-block: var(--space-section); }

.section--tight { padding-block: clamp(24px, 3.4vw, 44px); }

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

.grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* ---------- 8. 通用组件 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: .94rem;
  font-weight: 600;
  letter-spacing: .02em;
  text-decoration: none;
  cursor: pointer;
  transition: transform .16s ease, background-color .16s ease, color .16s ease, box-shadow .16s ease;
}

.btn--primary {
  background: var(--amber);
  color: #1B1005;
  box-shadow: 0 10px 26px -14px rgba(255, 158, 61, .8);
}

.btn--primary:hover {
  background: #FFB25C;
  transform: translateY(-2px);
}

.btn--ghost {
  background: transparent;
  border-color: rgba(47, 227, 208, .48);
  color: var(--cyan);
}

.btn--ghost:hover {
  background: rgba(47, 227, 208, .1);
  transform: translateY(-2px);
}

.btn--quiet {
  background: rgba(51, 74, 94, .5);
  border-color: rgba(111, 123, 134, .35);
  color: var(--cream);
}

.btn--quiet:hover {
  background: rgba(51, 74, 94, .82);
  transform: translateY(-2px);
}

.breadcrumb {
  font-family: var(--font-label);
  font-size: .72rem;
  letter-spacing: .1em;
  color: var(--stone);
}

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

.breadcrumb li + li::before {
  content: "/";
  margin-right: 8px;
  color: rgba(111, 123, 134, .6);
}

.breadcrumb a {
  color: var(--mist);
  transition: color .16s ease;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-label);
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--cyan);
}

.eyebrow::before {
  content: "";
  width: 20px;
  height: 1px;
  background: currentColor;
}

.panel {
  padding: clamp(18px, 2.4vw, 28px);
  border-radius: var(--radius-lg);
  background: rgba(51, 74, 94, .32);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: rgba(51, 74, 94, .52);
  color: var(--mist);
  font-family: var(--font-label);
  font-size: .69rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.tag--cyan {
  background: rgba(47, 227, 208, .1);
  color: var(--cyan);
}

.tag--amber {
  background: rgba(255, 158, 61, .12);
  color: var(--amber);
}

/* ---------- 9. 图片容器基础规则 ---------- */
.media-frame {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(111, 123, 134, .26);
  background:
    radial-gradient(circle at 78% 12%, rgba(47, 227, 208, .22), transparent 56%),
    linear-gradient(158deg, var(--slate) 0%, var(--teal) 55%, var(--ink) 100%);
}

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(111, 123, 134, .16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(111, 123, 134, .16) 1px, transparent 1px);
  background-size: 34px 34px;
  pointer-events: none;
}

.media-frame img,
.media-frame picture,
.media-frame video {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.media-frame__caption {
  margin-top: 10px;
  font-family: var(--font-label);
  font-size: .71rem;
  letter-spacing: .1em;
  color: var(--stone);
}

/* ---------- 10. 阅读进度（由 site.js 注入） ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 140;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--amber));
  transform: scaleX(0);
  transform-origin: 0 50%;
  pointer-events: none;
  will-change: transform;
}

/* ---------- 11. 响应式 ---------- */
@media (max-width: 920px) {
  html { scroll-padding-top: 96px; }

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

  .site-header__nav { flex-wrap: wrap; gap: 10px; }

  .site-nav {
    order: 3;
    display: none;
    width: 100%;
    flex: 1 1 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    margin-top: 8px;
    padding: 10px 0 14px;
    border-top: 1px solid rgba(111, 123, 134, .26);
  }

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

  .nav-link {
    justify-content: space-between;
    padding: 12px 15px;
    border-radius: 14px;
    font-size: .98rem;
  }

  .nav-status { display: none; }
}

@media (max-width: 1000px) {
  .site-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .status-badge--saved { display: none; }
  .brand__mark { width: 34px; height: 34px; border-radius: 11px; }
  .brand__mark::after { inset: 9px; }
}

@media (max-width: 560px) {
  .site-footer__grid { grid-template-columns: 1fr; gap: 26px; }
  .site-footer__bottom { flex-direction: column; align-items: flex-start; }
  .brand__tag { display: none; }
  .footer-brand__note { max-width: none; }
}

/* ---------- 12. 动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

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

  .footer-link:hover,
  .btn:hover { transform: none; }
}

@media print {
  .site-header,
  .site-footer,
  .scroll-progress,
  .skip-link { display: none !important; }

  body { background: #fff; color: #000; }
}
