/* =========================================================
   乐通主页 · 共享样式 /assets/site.css
   结构：reset → 变量 → 中文排版 → 通用组件 → 头部 → 页脚 → 响应式
   ========================================================= */

/* ---------- 1. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 104px;
  -webkit-tap-highlight-color: transparent;
}
body, h1, h2, h3, h4, h5, p, ul, ol, li, figure, blockquote, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; }
a { color: inherit; text-decoration: none; }
img, svg, video { display: block; max-width: 100%; }
[hidden] { display: none !important; }

/* ---------- 2. 变量 ---------- */
:root {
  /* 珠宝色分区 */
  --blue: #1A5CFF;
  --indigo: #0B2A6F;
  --teal: #0E4B45;
  --wine: #7A1F3D;
  --orange: #FF6B35;
  --amber: #FFB020;
  --mist: #EEF3FF;
  --paper: #FFFFFF;
  --ink: #101828;
  --slate: #475467;
  --line: #DCE3F0;
  --ok: #12805C;

  /* 形状与节奏 */
  --radius-lg: 20px;
  --radius: 16px;
  --radius-sm: 12px;
  --radius-pill: 999px;
  --shell: 1200px;
  --gap: 16px;
  --gap-lg: 24px;

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

  --shadow-1: 0 1px 2px rgba(16, 24, 40, .06), 0 10px 26px -18px rgba(11, 42, 111, .45);
  --shadow-2: 0 24px 48px -32px rgba(11, 42, 111, .62);
  --ease: cubic-bezier(.2, .6, .2, 1);
}

/* ---------- 3. 中文排版与基础 ---------- */
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: .01em;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 {
  line-height: 1.2;
  letter-spacing: -.5px;
  font-weight: 800;
  text-wrap: balance;
}
h1 { font-size: clamp(32px, 5vw, 56px); }
h2 { font-size: clamp(24px, 3.4vw, 40px); }
h3 { font-size: clamp(18px, 2vw, 24px); letter-spacing: -.2px; }
h4 { font-size: 18px; letter-spacing: 0; }
p { text-wrap: pretty; }
strong { font-weight: 700; }
::selection { background: rgba(26, 92, 255, .18); }

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

/* ---------- 4. 容器与版式 ---------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 40px);
}
.section { padding-block: clamp(40px, 6vw, 72px); }
.section-head { display: grid; gap: 12px; max-width: 62ch; margin-bottom: clamp(24px, 3vw, 40px); }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .14em;
  color: var(--blue);
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--amber); }
.page-title { font-size: clamp(30px, 5vw, 48px); }
.lede { font-size: clamp(16px, 1.6vw, 18px); line-height: 1.75; color: var(--slate); max-width: 64ch; }
.index-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--slate);
}

/* ---------- 5. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .01em;
  cursor: pointer;
  transition: transform .18s var(--ease), background .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--orange); color: #fff; box-shadow: 0 14px 26px -18px rgba(255, 107, 53, .95); }
.btn-primary:hover { background: var(--blue); box-shadow: 0 14px 26px -18px rgba(26, 92, 255, .95); }
.btn-ghost { background: var(--paper); border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn-quiet { padding-inline: 0; min-height: 0; color: var(--blue); border-radius: 4px; }
.btn-quiet:hover { color: var(--indigo); text-decoration: underline; text-underline-offset: 4px; }

/* ---------- 6. 面包屑 ---------- */
.breadcrumbs { margin-bottom: 20px; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.breadcrumbs li { display: flex; align-items: center; gap: 8px; }
.breadcrumbs li + li::before { content: "/"; color: var(--slate); opacity: .45; }
.crumb {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--slate);
  transition: color .18s var(--ease);
}
.crumb:hover { color: var(--blue); }
.breadcrumbs [aria-current="page"] { color: var(--ink); }

/* ---------- 7. Bento 面板 ---------- */
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); }
.card-grid { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.panel {
  position: relative;
  min-width: 0;
  padding: clamp(20px, 2.4vw, 28px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  transition: transform .18s var(--ease), border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.panel:hover { transform: translateY(-2px); border-color: var(--blue); box-shadow: var(--shadow-1); }
.panel-mist { background: var(--mist); border-color: transparent; }
.panel-mist:hover { border-color: var(--blue); }
.panel-indigo { background: var(--indigo); border-color: transparent; color: #fff; }
.panel-teal { background: var(--teal); border-color: transparent; color: #fff; }
.panel-wine { background: var(--wine); border-color: transparent; color: #fff; }
.panel-indigo:hover, .panel-teal:hover, .panel-wine:hover { border-color: transparent; box-shadow: var(--shadow-2); }
.panel-focus {
  border: 0;
  border-radius: 0;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 32px), calc(100% - 32px) 100%, 0 100%);
}
.panel-title { font-size: 18px; font-weight: 700; letter-spacing: -.2px; }
.panel-text { margin-top: 8px; font-size: 14px; line-height: 1.75; color: var(--slate); }
.panel-indigo .panel-text, .panel-teal .panel-text, .panel-wine .panel-text { color: rgba(255, 255, 255, .76); }
.panel-indigo .panel-title, .panel-teal .panel-title, .panel-wine .panel-title { color: #fff; }

/* ---------- 8. 标签筛选 ---------- */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--paper);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--slate);
  cursor: pointer;
  transition: background .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
}
.chip:hover { border-color: var(--blue); color: var(--blue); }
.chip[aria-pressed="true"], .chip[data-active="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------- 9. 分段切换 ---------- */
.tabs { display: grid; gap: 20px; }
.tab-list {
  display: inline-flex;
  gap: 4px;
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--mist);
}
.tab {
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  color: var(--slate);
  white-space: nowrap;
  cursor: pointer;
  transition: background .18s var(--ease), color .18s var(--ease);
}
.tab:hover { background: var(--paper); color: var(--blue); }
.tab[aria-selected="true"] { background: var(--blue); color: #fff; }
.tab-panel { animation: panel-in .2s var(--ease) both; }
@keyframes panel-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---------- 10. 图片容器 ---------- */
.media-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--mist);
}
.media-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(11, 42, 111, .18) 1px, transparent 1px);
  background-size: 16px 16px;
  opacity: .7;
  pointer-events: none;
}
.media-frame img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; }
.media-frame--tall { aspect-ratio: 4 / 5; }
.media-frame--square { aspect-ratio: 1 / 1; }

/* ---------- 11. 显现动画 ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
[data-reveal][data-revealed="true"] { opacity: 1; transform: none; }

/* ---------- 12. 跳至主内容 ---------- */
.skip-link {
  position: fixed;
  top: -120px;
  left: clamp(16px, 4vw, 40px);
  z-index: 200;
  padding: 12px 20px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  background: var(--indigo);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 0; }

/* ---------- 13. 头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, .82);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: background .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.site-header[data-scrolled="true"] {
  background: rgba(255, 255, 255, .97);
  border-bottom-color: var(--line);
  box-shadow: 0 14px 32px -28px rgba(11, 42, 111, .8);
}
.header-inner {
  position: relative;
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  grid-template-areas: "brand badge nav tools";
  align-items: center;
  gap: 16px;
  padding-block: 12px;
}

/* 品牌胶囊 */
.brand {
  grid-area: brand;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 14px 5px 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--paper);
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.brand:hover { border-color: var(--blue); box-shadow: var(--shadow-1); }
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding-bottom: 4px;
  background: var(--blue);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  clip-path: polygon(0 0, 100% 0, 100% 62%, 62% 100%, 0 100%);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-size: 16px; font-weight: 800; letter-spacing: .02em; }
.brand-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .16em;
  color: var(--slate);
}

/* 批次徽标 */
.batch-badge {
  grid-area: badge;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid rgba(255, 176, 32, .55);
  border-radius: var(--radius-pill);
  background: rgba(255, 176, 32, .18);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  color: var(--ink);
  white-space: nowrap;
}
.batch-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 3px rgba(255, 176, 32, .28); }

/* 移动端开关 */
.nav-toggle {
  grid-area: toggle;
  display: none;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--paper);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
}
.nav-toggle-bars { position: relative; width: 16px; height: 10px; }
.nav-toggle-bars::before, .nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform .2s var(--ease);
}
.nav-toggle-bars::before { top: 0; }
.nav-toggle-bars::after { bottom: 0; }
.nav-toggle-label { letter-spacing: .04em; }
.nav-toggle[aria-expanded="true"] { background: var(--blue); border-color: var(--blue); color: #fff; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-4px) rotate(-45deg); }

/* 导航胶囊 */
.primary-nav { grid-area: nav; justify-self: center; display: flex; align-items: center; }
.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--mist);
}
.nav-link {
  display: inline-block;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  color: var(--slate);
  white-space: nowrap;
  transition: background .18s var(--ease), color .18s var(--ease), box-shadow .18s var(--ease);
}
.nav-link:hover { background: var(--paper); color: var(--blue); }
.nav-link[aria-current="page"] {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 10px 20px -14px rgba(26, 92, 255, .95);
}

/* 右侧工具岛 */
.header-tools { grid-area: tools; justify-self: end; display: flex; align-items: center; gap: 8px; }
.tool-link {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--paper);
  color: var(--slate);
  transition: color .18s var(--ease), border-color .18s var(--ease);
}
.tool-link:hover { color: var(--blue); border-color: var(--blue); }
.tool-icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.bookmark-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid var(--indigo);
  border-radius: var(--radius-pill);
  background: var(--indigo);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  cursor: pointer;
  transition: background .18s var(--ease), border-color .18s var(--ease);
}
.bookmark-toggle:hover { background: var(--blue); border-color: var(--blue); }
.bookmark-toggle[aria-pressed="true"] { background: var(--ok); border-color: var(--ok); }
.bookmark-icon {
  width: 10px;
  height: 13px;
  background: currentColor;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 74%, 0 100%);
}
.bookmark-toggle.is-pulsing { animation: bookmark-pulse 1.2s var(--ease) 1; }
@keyframes bookmark-pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 107, 53, .6); }
  70% { box-shadow: 0 0 0 12px rgba(255, 107, 53, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 107, 53, 0); }
}

/* 收藏面板 */
.bookmark-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: clamp(16px, 4vw, 40px);
  z-index: 90;
  width: min(320px, calc(100vw - 32px));
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow-2);
}
.bookmark-panel-title {
  margin-bottom: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .12em;
  color: var(--blue);
}
.bookmark-empty { font-size: 13px; line-height: 1.7; color: var(--slate); }
.bookmark-list { display: grid; gap: 6px; margin-bottom: 10px; font-size: 13px; }
.bookmark-list li {
  padding: 8px 10px;
  border-left: 3px solid var(--amber);
  border-radius: 0 8px 8px 0;
  background: var(--mist);
  color: var(--ink);
}
.bookmark-note { padding-top: 8px; border-top: 1px dashed var(--line); font-size: 12px; line-height: 1.6; color: var(--slate); }

/* ---------- 14. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: 80px;
  overflow: hidden;
  background: var(--indigo);
  color: rgba(255, 255, 255, .86);
}
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, .05) 0 2px, transparent 2px 14px);
  opacity: .75;
  pointer-events: none;
}
.footer-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.4fr .9fr 1.1fr 1fr;
  gap: 40px 32px;
  padding-block: 64px 40px;
}
.footer-zone { min-width: 0; }
.footer-logo { display: inline-flex; align-items: baseline; gap: 4px; font-size: 20px; font-weight: 800; color: #fff; letter-spacing: .02em; }
.footer-logo-mark { font-family: var(--font-mono); color: var(--amber); }
.footer-tagline { margin-top: 12px; max-width: 30ch; font-size: 14px; line-height: 1.75; color: rgba(255, 255, 255, .72); }
.footer-icp { margin-top: 16px; font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; color: rgba(255, 255, 255, .58); }
.footer-col-title {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .12em;
  color: var(--amber);
}
.footer-nav-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; }
.footer-link {
  font-size: 14px;
  color: rgba(255, 255, 255, .78);
  border-bottom: 1px solid transparent;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}
.footer-link:hover { color: #fff; border-bottom-color: var(--amber); }
.footer-contact-list { display: grid; gap: 10px; }
.footer-contact-item { display: grid; gap: 2px; min-width: 0; }
.footer-contact-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; color: rgba(255, 255, 255, .5); }
.footer-contact-value { font-size: 14px; color: #fff; overflow-wrap: anywhere; }
.footer-zone-cycle {
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .05);
}
.footer-cycle-title { font-size: 24px; font-weight: 800; letter-spacing: -.02em; color: #fff; }
.footer-cycle-text { margin-top: 6px; font-size: 13px; line-height: 1.7; color: rgba(255, 255, 255, .72); }
.footer-cta { margin-top: 16px; }
.footer-base {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-block: 20px 32px;
  border-top: 1px solid rgba(255, 255, 255, .14);
}
.footer-copy { font-size: 13px; color: rgba(255, 255, 255, .6); }
.footer-base-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }

/* ---------- 15. 响应式 ---------- */
@media (max-width: 1240px) {
  .nav-link { padding: 8px 12px; font-size: 13px; }
  .brand-sub { display: none; }
}
@media (max-width: 1080px) {
  .batch-badge { padding: 5px 8px; font-size: 11px; }
  .bookmark-text { display: none; }
  .bookmark-toggle { padding: 9px 12px; }
  .footer-inner { grid-template-columns: 1.2fr 1fr 1fr; }
  .footer-zone-cycle { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  html { scroll-padding-top: 88px; }
  .header-inner {
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "brand tools toggle";
    gap: 10px;
  }
  .batch-badge { display: none; }
  .nav-toggle { display: inline-flex; }
  .primary-nav {
    position: absolute;
    left: clamp(16px, 4vw, 40px);
    right: clamp(16px, 4vw, 40px);
    top: calc(100% + 8px);
    display: block;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: var(--shadow-2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s var(--ease);
  }
  .primary-nav[data-open="true"] {
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
  }
  .nav-list { display: grid; gap: 2px; padding: 0; border: 0; border-radius: 0; background: none; }
  .nav-link { display: block; padding: 12px 14px; border-radius: var(--radius-sm); font-size: 15px; }
}
@media (max-width: 720px) {
  .footer-inner { grid-template-columns: 1fr; gap: 28px; padding-block: 48px 32px; }
  .footer-zone-cycle { grid-column: auto; }
  .footer-tagline { max-width: none; }
  .footer-base { padding-block: 16px 28px; }
  .site-footer { margin-top: 56px; }
  .bookmark-panel { right: 16px; left: 16px; width: auto; }
}
@media (max-width: 420px) {
  .nav-toggle-label { display: none; }
  .tool-link { width: 36px; height: 36px; }
}

/* ---------- 16. 动效降级 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .btn:hover, .panel:hover { transform: none; }
}
