/* =========================================================
   AG中心 · /assets/site.css
   共享外壳：侧边轨道 / 直达条 / 抽屉 / 页脚 / 通用零件
   ========================================================= */

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

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

body, h1, h2, h3, h4, h5, p, ul, ol, li, figure, blockquote, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

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

/* ---------- 2. Tokens ---------- */
:root {
  --ag-blue: #0057B8;
  --deep-blue: #0A3C7A;
  --cyan: #00C2D1;
  --orange: #E8590C;
  --cream: #F4EDE0;
  --white: #FFFFFF;
  --ink: #1A1614;
  --space: #2B3138;
  --gray: #6B7280;
  --wash: #D7E3F4;
  --amber: #FFD7A8;
  --green: #1F9D74;

  --rail-w: 92px;
  --quick-h: 36px;
  --maxw: 1240px;
  --pad: 24px;
  --radius: 18px;
  --ease: cubic-bezier(.22, .61, .36, 1);

  --font-sans: "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}

@media (min-width: 768px) { :root { --pad: 40px; } }
@media (min-width: 1200px) { :root { --pad: 64px; } }

/* ---------- 3. Base ---------- */
body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  padding-left: 0;
  -webkit-font-smoothing: antialiased;
}

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

p, li { line-height: 1.85; }

h1, h2, h3, h4 {
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: inherit;
}

h1 { font-size: clamp(34px, 5vw, 64px); }
h2 { font-size: clamp(26px, 3.4vw, 40px); }
h3 { font-size: clamp(19px, 2.2vw, 26px); }

.mono {
  font-family: var(--font-mono);
  font-size: 0.94em;
  letter-spacing: 0.02em;
}

.label-mono {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--gray);
}

.vnote {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--gray);
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

.rule {
  height: 1px;
  border: 0;
  background: rgba(26, 22, 20, 0.14);
}

.site-header { position: relative; }

/* ---------- 4. Skip link ---------- */
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 300;
  transform: translateY(-220%);
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  transition: transform 0.18s var(--ease);
}

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

/* ---------- 5. 侧边轨道 ---------- */
.rail { display: none; }

@media (min-width: 901px) {
  .rail {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--rail-w);
    height: 100vh;
    height: 100dvh;
    z-index: 120;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 0 14px;
    background: var(--ag-blue);
    color: #fff;
    border-right: 1px solid rgba(255, 255, 255, 0.16);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  }
}

.rail__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.rail__mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--cream);
  color: var(--ag-blue);
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.rail__name {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.86);
  white-space: nowrap;
}

.rail__nav {
  flex: 1 1 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  scrollbar-width: none;
}

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

.rail__list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  padding: 0 6px;
}

.rail__link {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  width: 100%;
  padding: 9px 4px;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.78);
  transition: background-color 0.24s var(--ease), color 0.24s var(--ease);
}

.rail__link:hover {
  background: rgba(255, 255, 255, 0.13);
  color: #fff;
}

.rail__idx {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--cyan);
}

.rail__label {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.06em;
  writing-mode: vertical-rl;
  text-orientation: upright;
}

.rail__link[aria-current="page"] {
  background: rgba(0, 194, 209, 0.2);
  color: #fff;
}

.rail__link[aria-current="page"]::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -6px;
  width: 4px;
  height: 58%;
  transform: translateY(-50%);
  border-radius: 0 4px 4px 0;
  background: var(--cyan);
}

.rail__foot {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.rail__note {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.62);
  writing-mode: vertical-rl;
}

/* ---------- 6. 移动端顶栏 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 110;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
  padding: 8px var(--pad);
  background: var(--ag-blue);
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.topbar__brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.topbar__brand::before {
  content: "AG";
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--cream);
  color: var(--ag-blue);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: -0.02em;
}

.topbar__meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.76);
  margin-left: auto;
}

@media (min-width: 901px) {
  .topbar { display: none; }
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  transition: background-color 0.2s var(--ease);
}

.nav-toggle:hover { background: rgba(255, 255, 255, 0.24); }

.nav-toggle__text { letter-spacing: 0.06em; }

.nav-toggle__bars {
  position: relative;
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: #fff;
  transition: background-color 0.22s var(--ease);
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: #fff;
  transition: transform 0.22s var(--ease), top 0.22s var(--ease);
}

.nav-toggle__bars::before { top: -5px; }
.nav-toggle__bars::after { top: 5px; }

.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { top: 0; transform: rotate(-45deg); }

/* ---------- 7. 快捷直达条 ---------- */
.quickstrip {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--quick-h);
  padding: 5px var(--pad);
  background: var(--deep-blue);
  color: rgba(255, 255, 255, 0.86);
  overflow-x: auto;
  scrollbar-width: none;
}

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

.quickstrip__label {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--cyan);
  white-space: nowrap;
}

.quickstrip__list {
  display: flex;
  align-items: center;
  gap: 6px;
}

.quickstrip__link {
  display: inline-flex;
  align-items: center;
  padding: 3px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}

.quickstrip__link:hover {
  background: var(--cyan);
  color: var(--ink);
}

@media (max-width: 900px) {
  .quickstrip { position: static; }
}

/* ---------- 8. 抽屉导航 ---------- */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 250;
  background: rgba(26, 22, 20, 0.55);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.24s var(--ease), visibility 0.24s var(--ease);
}

.drawer[data-open="true"] {
  opacity: 1;
  visibility: visible;
}

.drawer__panel {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: min(84vw, 340px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px var(--pad) 24px;
  background: var(--ag-blue);
  color: #fff;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform 0.28s var(--ease);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}

.drawer[data-open="true"] .drawer__panel { transform: translateX(0); }

.drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.drawer__close {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.4);
  font-size: 20px;
  line-height: 1;
  transition: background-color 0.2s var(--ease);
}

.drawer__close:hover { background: rgba(255, 255, 255, 0.18); }

.drawer__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.drawer__link {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 11px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 15px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.86);
  transition: color 0.2s var(--ease), padding-left 0.2s var(--ease);
}

.drawer__link:hover { color: #fff; }

.drawer__idx {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--cyan);
}

.drawer__link[aria-current="page"] {
  color: #fff;
  padding-left: 12px;
  box-shadow: inset 3px 0 0 var(--cyan);
}

.drawer__foot {
  margin-top: auto;
  padding-top: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.66);
}

/* ---------- 9. 进度条与返回顶部 ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 260;
  width: 100%;
  height: 3px;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--cyan), var(--orange));
  pointer-events: none;
}

.to-top {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 240;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--ag-blue);
  background: var(--cream);
  color: var(--ag-blue);
  font-size: 17px;
  line-height: 1;
  transition: background-color 0.24s var(--ease), color 0.24s var(--ease), border-color 0.24s var(--ease);
}

.to-top:hover {
  background: var(--ag-blue);
  color: #fff;
}

.to-top[data-active="true"] {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--ink);
}

@media (min-width: 901px) {
  .to-top { right: 24px; bottom: 24px; width: 48px; height: 48px; }
}

/* ---------- 10. 页脚 ---------- */
.site-footer {
  margin-top: clamp(48px, 7vw, 96px);
  background: var(--space);
  color: rgba(255, 255, 255, 0.8);
  border-top: 6px solid var(--ag-blue);
}

.footer__inner {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(38px, 5vw, 68px) var(--pad) 26px;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 30px;
}

.footer__brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.footer__brandline {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer__mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--ag-blue);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.footer__name {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.01em;
  color: #fff;
  line-height: 1.4;
}

.footer__tagline {
  font-size: 13px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.62);
  max-width: 26ch;
}

.footer__col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.footer__title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  line-height: 1.6;
  color: var(--cyan);
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer__links a {
  width: fit-content;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.footer__links a:hover {
  color: #fff;
  border-bottom-color: var(--cyan);
}

.footer__contact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 18px 28px;
  margin-top: clamp(28px, 4vw, 48px);
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.footer__contact-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.footer__contact-key {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.45);
}

.footer__contact-val {
  font-size: 14px;
  line-height: 1.7;
  color: #fff;
  word-break: break-word;
}

.footer__contact-note {
  grid-column: 1 / -1;
  font-size: 12px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.52);
}

.footer__legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 22px;
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.48);
}

.footer__legal a {
  color: rgba(255, 255, 255, 0.72);
  transition: color 0.2s var(--ease);
}

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

@media (max-width: 1080px) {
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 26px; }
}

@media (max-width: 600px) {
  .footer__grid { grid-template-columns: 1fr; }
  .footer__legal { gap: 6px 16px; }
}

/* ---------- 11. 通用容器与网格 ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
}

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

.col-main { grid-column: 1 / span 8; }
.col-note { grid-column: 10 / span 3; }

@media (max-width: 767px) {
  .grid-12 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
  }
  .col-main,
  .col-note { grid-column: 1 / -1; }
}

.section { padding-block: clamp(44px, 6.5vw, 92px); }
.section--wash { background: var(--wash); }
.section--blue { background: var(--ag-blue); color: #fff; }
.section--deep { background: var(--space); color: #fff; }

/* ---------- 12. 排版零件 ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--ag-blue);
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--cyan);
}

.section--blue .eyebrow,
.section--deep .eyebrow { color: var(--cyan); }

/* ---------- 13. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: center;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.btn--primary {
  background: var(--ag-blue);
  color: #fff;
}

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

.btn--orange {
  background: var(--orange);
  color: var(--ink);
}

.btn--orange:hover { background: #cf4b06; }

.btn--ghost {
  border-color: var(--ag-blue);
  color: var(--ag-blue);
  background: transparent;
}

.btn--ghost:hover {
  background: var(--ag-blue);
  color: #fff;
}

.section--blue .btn--ghost,
.section--deep .btn--ghost {
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
}

.section--blue .btn--ghost:hover,
.section--deep .btn--ghost:hover {
  background: #fff;
  color: var(--ag-blue);
  border-color: #fff;
}

/* ---------- 14. 状态标签 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--wash);
  color: var(--deep-blue);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.tag--ok {
  background: rgba(31, 157, 116, 0.16);
  color: var(--green);
}

.tag--plan {
  background: var(--amber);
  color: var(--ink);
}

.tag--live {
  background: rgba(232, 89, 12, 0.16);
  color: var(--orange);
}

/* ---------- 15. 面包屑 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--gray);
}

.breadcrumb li {
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.6;
}

.breadcrumb li + li::before {
  content: "/";
  color: var(--cyan);
}

.breadcrumb a { transition: color 0.2s var(--ease); }
.breadcrumb a:hover { color: var(--ag-blue); }

/* ---------- 16. 图片容器基础规则 ---------- */
.media {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 18% 22%, rgba(0, 194, 209, 0.55) 0, transparent 46%),
    linear-gradient(135deg, var(--deep-blue) 0%, var(--ag-blue) 54%, #0E6FD4 100%);
}

.media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.1) 0 1px, transparent 1px 18px),
    repeating-linear-gradient(25deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 26px);
}

.media--wide { aspect-ratio: 16 / 9; }
.media--square { aspect-ratio: 1 / 1; }
.media--portrait { aspect-ratio: 3 / 4; }

.media__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.media__caption {
  position: absolute;
  left: 14px;
  bottom: 12px;
  z-index: 2;
  max-width: calc(100% - 28px);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 6px rgba(10, 60, 122, 0.5);
}

/* ---------- 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: 0ms !important;
  }
}
