/* ==========================================================
   365网址中心 · 共享样式 /assets/site.css
   轨道导航 + 堆叠面板 + 赛道色彩系统
   ========================================================== */

/* 1. 设计变量 */
:root {
  --black: #0B0D10;
  --red: #E8362A;
  --cyan: #35F0C0;
  --paper: #F5F7F6;
  --graphite: #23272E;
  --gray: #6B7280;
  --yellow: #FFC53D;
  --orange: #FF6B35;
  --ice: #B8FFF0;
  --shadow: #000000;
  --line: #2E343D;
  --line-soft: #1C2027;
  --rail-w: clamp(104px, 8vw, 128px);
  --bar-h: 58px;
  --gutter: clamp(18px, 4vw, 56px);
  --radius: 2px;
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;
  --hard: 8px 8px 0 var(--shadow);
  --hard-sm: 4px 4px 0 var(--shadow);
  --ease: cubic-bezier(.22, .8, .28, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  background: var(--black);
}

h1, h2, h3, h4, p, figure, blockquote, ol, ul, dl, dd { margin: 0; }
ol, ul { list-style: none; padding: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img, svg, picture, video { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }

/* 3. 基础排版 */
body {
  margin: 0;
  background: var(--black);
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: clamp(15px, .55vw + 13px, 17px);
  line-height: 1.8;
  letter-spacing: .012em;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

@media (min-width: 1024px) {
  body { padding-left: var(--rail-w); }
}

h1, h2, h3, h4 {
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -.02em;
}

p { text-wrap: pretty; }

/* 4. 基础工具与共享组件 */
.wrap {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(44px, 6.5vw, 92px); }

.section-head {
  display: grid;
  gap: 12px;
  max-width: 62ch;
  margin-bottom: clamp(22px, 3vw, 38px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--cyan);
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--red);
  flex: 0 0 auto;
}

.section-title { font-size: clamp(26px, 3.4vw, 40px); }

.lede {
  font-size: clamp(15.5px, 1.1vw, 18px);
  line-height: 1.85;
  color: #C9CFD6;
  max-width: 64ch;
}

.side-note {
  writing-mode: vertical-rl;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--gray);
}

.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
}

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

.rule {
  height: 2px;
  border: 0;
  background: linear-gradient(90deg, var(--red) 0 22%, var(--line) 22% 100%);
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1.3;
  border: 2px solid var(--paper);
  border-radius: var(--radius);
  background: var(--graphite);
  color: var(--paper);
  box-shadow: var(--hard-sm);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s, color .18s, border-color .18s;
}

.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--shadow); }
.btn:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--shadow); }

.btn-primary {
  background: var(--red);
  border-color: var(--shadow);
  color: #fff;
}

.btn-primary:hover { background: var(--orange); }

.btn-ghost {
  background: transparent;
  border-color: #3A414B;
  color: var(--paper);
  box-shadow: none;
}

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

.btn-block { width: 100%; }

/* 面板 */
.panel {
  position: relative;
  padding: clamp(20px, 2.4vw, 30px);
  background: var(--graphite);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--hard);
}

.panel-paper {
  background: var(--paper);
  color: var(--black);
  border-color: var(--shadow);
}

.panel-plate {
  background: linear-gradient(150deg, #191D23 0%, var(--black) 64%);
  border-color: var(--line);
}

.panel-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--cyan);
}

.panel-paper .panel-kicker { color: var(--red); }

.panel-title { font-size: clamp(20px, 2vw, 26px); margin-top: 6px; }

/* 标签 */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  line-height: 1.6;
  border: 1px solid currentColor;
  border-radius: var(--radius);
  color: var(--cyan);
}

.tag-red { color: #FF7264; }
.tag-cyan { color: var(--cyan); }
.tag-yellow { color: var(--yellow); }

/* 网格 */
.grid { display: grid; gap: clamp(16px, 2vw, 26px); }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.stack { display: grid; gap: 14px; }

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

@media (min-width: 1080px) {
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* 图片容器 */
.media {
  position: relative;
  overflow: hidden;
  aspect-ratio: var(--ratio, 16 / 9);
  background: #11141A;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--hard);
}

.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-tall { --ratio: 3 / 4; }
.media-wide { --ratio: 21 / 9; }

.media-caption {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--gray);
}

/* 面包屑 */
.breadcrumb {
  padding-block: 16px;
  border-bottom: 2px solid var(--line-soft);
}

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--gray);
}

.breadcrumb-item { display: flex; align-items: center; gap: 8px; }
.breadcrumb-item + .breadcrumb-item::before { content: "/"; color: #3A414B; }
.breadcrumb-link { transition: color .18s; }
.breadcrumb-link:hover { color: var(--cyan); }
.breadcrumb-current { color: var(--paper); }

/* 指标 */
.stat { display: grid; gap: 6px; }

.stat-num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: clamp(34px, 4.6vw, 60px);
  line-height: 1;
  letter-spacing: -.03em;
  color: var(--paper);
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gray);
}

/* 滚动显现 */
.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}

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

/* 5. 页头 · 轨道导航 */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 300;
  padding: 10px 16px;
  background: var(--cyan);
  color: #04211B;
  font-size: 14px;
  font-weight: 700;
  border: 2px solid var(--shadow);
  box-shadow: var(--hard-sm);
  transform: translateY(-180%);
  transition: transform .2s var(--ease);
}

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 90;
  width: var(--rail-w);
}

.rail {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 20px;
  width: 100%;
  height: 100%;
  padding: 22px 12px 20px;
  background: var(--black);
  border-right: 2px solid var(--line);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.rail::-webkit-scrollbar { display: none; }

/* 品牌 */
.brand {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-inline: 2px;
}

.brand-mark {
  position: relative;
  width: 34px;
  height: 34px;
  border: 2px solid var(--paper);
  background: linear-gradient(135deg, var(--red) 0 52%, var(--black) 52% 100%);
  box-shadow: 3px 3px 0 var(--shadow);
}

.brand-mark::after {
  content: "";
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 6px;
  height: 6px;
  background: var(--cyan);
}

.brand-text { display: grid; gap: 4px; min-width: 0; }

.brand-name {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .04em;
  line-height: 1.25;
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.5;
  letter-spacing: .04em;
  color: var(--gray);
}

/* 移动端按钮（桌面隐藏） */
.nav-toggle { display: none; }

.nav-toggle-bars { display: grid; gap: 4px; width: 18px; }

.nav-toggle-bars span {
  display: block;
  height: 2px;
  background: currentColor;
  transition: transform .25s var(--ease), opacity .2s;
}

.site-header[data-open] .nav-toggle-bars span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.site-header[data-open] .nav-toggle-bars span:nth-child(2) { opacity: 0; }
.site-header[data-open] .nav-toggle-bars span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* 导航 */
.site-nav {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1 1 auto;
  min-height: 0;
}

.nav-title {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: #4D545E;
}

.nav-list { display: flex; flex-direction: column; gap: 2px; }
.nav-item { display: block; }

.nav-link {
  display: grid;
  gap: 3px;
  padding: 8px 6px 8px 10px;
  border-left: 3px solid transparent;
  color: #B9C0C8;
  transition: color .18s, background .18s, border-color .18s;
}

.nav-index {
  font-family: var(--font-mono);
  font-size: 9.5px;
  line-height: 1.2;
  letter-spacing: 0;
  color: #4D545E;
  transition: color .18s;
}

.nav-label {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: .04em;
}

.nav-label::after {
  content: "";
  display: none;
  width: 5px;
  height: 5px;
  margin-left: 6px;
  background: var(--cyan);
  vertical-align: middle;
}

.nav-link:hover { color: var(--paper); background: #14171C; border-left-color: var(--cyan); }
.nav-link:hover .nav-index { color: var(--cyan); }

.nav-link[aria-current="page"] {
  color: var(--paper);
  background: #15181D;
  border-left-color: var(--red);
}

.nav-link[aria-current="page"] .nav-index { color: var(--red); }
.nav-link[aria-current="page"] .nav-label::after { display: inline-block; }

.nav-actions {
  display: grid;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 2px solid var(--line-soft);
}

.nav-actions .btn {
  padding: 9px 6px;
  font-size: 11.5px;
  letter-spacing: 0;
  box-shadow: 3px 3px 0 var(--shadow);
}

.nav-actions .btn-ghost { box-shadow: none; }

.nav-foot {
  display: none;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--gray);
}

/* 轨道底部进度 */
.rail-foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding-top: 14px;
  border-top: 2px solid var(--line-soft);
}

.rail-foot-label {
  writing-mode: vertical-rl;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--gray);
}

.rail-track {
  position: relative;
  display: block;
  width: 3px;
  height: 60px;
  background: #20242B;
  overflow: hidden;
}

.rail-track-bar {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 0;
  background: linear-gradient(to top, var(--red), var(--orange));
}

.rail-foot-num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 10px;
  color: var(--gray);
}

.nav-scrim { display: none; }

/* 6. 页脚 */
.site-footer {
  position: relative;
  margin-top: clamp(48px, 7vw, 96px);
  background: var(--black);
  border-top: 2px solid var(--line);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: -2px;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--red) 0 30%, var(--orange) 30% 50%, var(--cyan) 50% 70%, transparent 70%);
}

.footer-panels {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  max-width: 1240px;
  margin-inline: auto;
  padding: clamp(34px, 5vw, 62px) var(--gutter) clamp(22px, 3vw, 32px);
}

.footer-panel {
  padding: clamp(20px, 2.4vw, 28px);
  background: var(--graphite);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 8px 8px 0 rgba(0, 0, 0, .85);
}

.footer-brand {
  background: var(--paper);
  color: var(--black);
  border-color: var(--shadow);
  box-shadow: 8px 8px 0 var(--shadow);
}

.footer-kicker {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--red);
}

.footer-brandline {
  margin-top: 10px;
  font-size: clamp(17px, 1.7vw, 21px);
  font-weight: 800;
  letter-spacing: -.01em;
  line-height: 1.35;
}

.footer-desc {
  margin-top: 12px;
  font-size: 13.5px;
  line-height: 1.85;
  color: #4A5057;
}

.footer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.footer-brand .tag {
  background: var(--black);
  border-color: var(--black);
}

.footer-brand .tag-red { color: #FF7264; }
.footer-brand .tag-cyan { color: var(--cyan); }
.footer-brand .tag-yellow { color: var(--yellow); }

.footer-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 24px;
  align-content: start;
}

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

.footer-title {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--gray);
}

.footer-list {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}

.footer-list a {
  position: relative;
  display: inline-block;
  font-size: 14px;
  color: #C9CFD6;
  transition: color .18s, transform .18s var(--ease);
}

.footer-list a::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 50%;
  width: 6px;
  height: 2px;
  background: var(--red);
  opacity: 0;
  transition: opacity .18s;
}

.footer-list a:hover { color: var(--cyan); transform: translateX(4px); }
.footer-list a:hover::before { opacity: 1; }

.contact-list { display: grid; gap: 14px; margin-top: 16px; }
.contact-row { display: grid; gap: 3px; }

.contact-key {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gray);
}

.contact-val {
  font-family: var(--font-mono);
  font-size: 13px;
  word-break: break-all;
  color: var(--paper);
}

.contact-text {
  font-size: 13.5px;
  line-height: 1.7;
  color: #C9CFD6;
}

.copy-btn {
  margin-left: 8px;
  padding: 2px 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .1em;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--gray);
  vertical-align: middle;
  transition: color .18s, border-color .18s;
}

.copy-btn:hover { color: var(--cyan); border-color: var(--cyan); }

.copy-status {
  min-height: 1.2em;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--cyan);
}

.footer-contact .btn { margin-top: 10px; }

.footer-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 22px;
  max-width: 1240px;
  margin-inline: auto;
  padding: 20px var(--gutter) 40px;
  border-top: 2px solid var(--line-soft);
  font-size: 12.5px;
  color: var(--gray);
}

.footer-meta { font-family: var(--font-mono); letter-spacing: .04em; }

.footer-legal-list { display: flex; flex-wrap: wrap; gap: 16px; }
.footer-legal-list a { transition: color .18s; }
.footer-legal-list a:hover { color: var(--cyan); }

.to-top {
  padding: 8px 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  color: var(--paper);
  transition: color .18s, border-color .18s, transform .18s var(--ease);
}

.to-top:hover { color: var(--red); border-color: var(--red); transform: translateY(-2px); }

@media (min-width: 760px) {
  .footer-panels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-contact { grid-column: 1 / -1; }
}

@media (min-width: 1100px) {
  .footer-panels { grid-template-columns: 1.2fr 1fr .95fr; }
  .footer-contact { grid-column: auto; }
}

/* 7. 移动端 / 平板：顶栏 + 抽屉 */
@media (max-width: 1023px) {
  html.nav-open { overflow: hidden; }

  .site-header {
    position: sticky;
    top: 0;
    left: auto;
    bottom: auto;
    width: 100%;
    height: auto;
    background: var(--black);
    border-bottom: 2px solid var(--line);
    z-index: 120;
  }

  .rail {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    height: auto;
    min-height: var(--bar-h);
    padding: 11px var(--gutter);
    border-right: 0;
    overflow: visible;
  }

  .brand {
    flex: 1 1 auto;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding-inline: 0;
    min-width: 0;
  }

  .brand-mark { width: 30px; height: 30px; flex: 0 0 auto; }
  .brand-text { gap: 1px; }
  .brand-name { font-size: 15px; }
  .brand-sub { font-size: 10px; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    padding: 8px 10px;
    border: 2px solid var(--line);
    border-radius: var(--radius);
    font-family: var(--font-mono);
    font-size: 11.5px;
    letter-spacing: .14em;
    color: var(--paper);
    transition: border-color .18s, color .18s;
  }

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

  .site-nav {
    position: fixed;
    top: var(--bar-h);
    left: 0;
    bottom: 0;
    width: min(86vw, 340px);
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 24px 20px 32px;
    background: linear-gradient(180deg, #12151A 0%, var(--black) 62%);
    border-right: 2px solid var(--line);
    border-top: 2px solid var(--line);
    box-shadow: 14px 0 0 rgba(0, 0, 0, .55);
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateX(-104%);
    transition: transform .34s var(--ease);
    z-index: 130;
  }

  .site-header[data-open] .site-nav { transform: translateX(0); }
  .site-header[data-open] .nav-toggle { border-color: var(--red); color: var(--red); }

  .nav-scrim {
    display: block;
    position: fixed;
    top: var(--bar-h);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, .62);
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s var(--ease), visibility .3s;
    z-index: 125;
  }

  .site-header[data-open] .nav-scrim { opacity: 1; visibility: visible; }

  .nav-title { font-size: 10px; color: var(--gray); }
  .nav-list { gap: 0; }

  .nav-link {
    padding: 14px 4px;
    gap: 4px;
    border-left: 0;
    border-bottom: 1px solid var(--line-soft);
  }

  .nav-index { font-size: 10.5px; }
  .nav-label { font-size: 17px; }
  .nav-link:hover { background: transparent; border-left: 0; }
  .nav-link[aria-current="page"] { background: transparent; border-left: 0; }
  .nav-link[aria-current="page"] .nav-label { color: var(--cyan); }

  .nav-actions {
    margin-top: 4px;
    padding-top: 0;
    border-top: 0;
  }

  .nav-actions .btn {
    padding: 13px 14px;
    font-size: 14px;
    box-shadow: 4px 4px 0 var(--shadow);
  }

  .nav-foot { display: block; margin-top: auto; }
  .rail-foot { display: none; }
}

/* 8. 动效降级 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

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

  .js-reveal [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }

  .btn:hover,
  .to-top:hover,
  .footer-list a:hover { transform: none; }
}
