/* ============================================================
   AYX指南 · 共享样式表 /assets/site.css
   设计母题：通道控制台 / 框架式导航 / 切角 Bento / 矿物色状态
   ============================================================ */

/* ---------- 1. 设计变量 ---------- */
:root {
  --abyss: #071A2B;
  --deep: #0C263B;
  --slate: #2F3A42;
  --paper: #F7F4EC;
  --mist: #DCE6E4;
  --cyan: #38E1D0;
  --cyan-deep: #1C8F89;
  --amber: #F2B84B;
  --amber-deep: #B77A1F;
  --moss: #6F8F6A;
  --clay: #B5644A;

  --line: rgba(220, 230, 228, 0.15);
  --line-2: rgba(220, 230, 228, 0.3);
  --ink-soft: rgba(220, 230, 228, 0.62);
  --ink-faint: rgba(220, 230, 228, 0.42);

  --frame: clamp(20px, 4.2vw, 68px);
  --cut: 22px;
  --cut-sm: 14px;
  --wrap-max: 1320px;

  --font-display: "Inter Tight", "Noto Sans SC", "Source Han Sans SC", sans-serif;
  --font-body: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", SFMono-Regular, ui-monospace, monospace;
}

/* ---------- 2. 重置 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body, h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* ---------- 3. 页面基座 ---------- */
body {
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.85;
  font-weight: 400;
  color: var(--paper);
  background-color: var(--abyss);
  background-image:
    radial-gradient(760px 480px at 88% -6%, rgba(56, 225, 208, 0.10), transparent 64%),
    radial-gradient(620px 420px at 2% 6%, rgba(242, 184, 75, 0.055), transparent 62%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

@media (min-width: 900px) {
  html::before,
  html::after {
    content: "";
    position: fixed;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--line);
    z-index: 2;
    pointer-events: none;
  }
  html::before { left: calc(var(--frame) / 2); }
  html::after { right: calc(var(--frame) / 2); }
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.02em; line-height: 1.12; }
p { line-height: 1.85; }

:where(a, button, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 2px;
}

#main-content { display: block; outline: none; }

/* ---------- 4. 容器与通用排版 ---------- */
.wrap {
  width: min(calc(100% - 2 * var(--frame)), var(--wrap-max));
  margin-inline: auto;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--cyan);
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--cyan);
  flex: none;
}

.section-title {
  font-size: clamp(1.6rem, 2.6vw, 2.4rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
}

.lede {
  max-width: 46ch;
  font-size: clamp(1rem, 1.3vw, 1.08rem);
  line-height: 1.85;
  color: var(--ink-soft);
}

/* ---------- 5. 跳至正文 ---------- */
.skip-link {
  position: fixed;
  top: 8px;
  left: calc(var(--frame) / 2);
  z-index: 80;
  padding: 9px 15px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--abyss);
  background: var(--cyan);
  text-decoration: none;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%);
  transform: translateY(-220%);
  transition: transform 0.18s ease;
}
.skip-link:focus,
.skip-link:focus-visible { transform: translateY(0); }

/* ---------- 6. 框架式页头 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(180deg, #081D2F 0%, #071A2B 100%);
  border-bottom: 1px solid var(--line);
}
.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, var(--cyan) 0 72px, var(--amber) 72px 128px, transparent 128px);
  opacity: 0.7;
  pointer-events: none;
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: clamp(10px, 2vw, 26px);
  min-height: 64px;
  padding-block: 10px;
}

/* 品牌 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
  text-decoration: none;
  color: var(--paper);
}
.brand__mark {
  position: relative;
  width: 36px;
  height: 36px;
  flex: none;
  background:
    linear-gradient(150deg, rgba(56, 225, 208, 0.24), rgba(56, 225, 208, 0) 66%),
    var(--deep);
  clip-path: polygon(0 0, 100% 0, 100% 62%, 62% 100%, 0 100%);
}
.brand__mark::before {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  top: 11px;
  height: 1px;
  background: var(--cyan);
}
.brand__mark::after {
  content: "";
  position: absolute;
  left: 8px;
  bottom: 8px;
  width: 11px;
  height: 11px;
  border-left: 1px solid var(--amber);
  border-bottom: 1px solid var(--amber);
}
.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.brand__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.12rem;
  letter-spacing: -0.02em;
}
.brand__meta {
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  color: var(--ink-faint);
  text-transform: lowercase;
}

/* 版本徽章 */
.version-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  padding: 4px 9px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--cyan);
  background: rgba(56, 225, 208, 0.07);
  box-shadow: inset 0 0 0 1px rgba(56, 225, 208, 0.42);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 7px 100%, 0 calc(100% - 7px));
}
.version-chip__dot {
  width: 5px;
  height: 5px;
  flex: none;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 3px rgba(56, 225, 208, 0.14);
}

/* 导航 */
.site-nav {
  display: flex;
  flex: 1 1 auto;
  justify-content: center;
  min-width: 0;
}
.site-nav__list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(0px, 0.8vw, 10px);
}
.site-nav__item { display: block; }
.site-nav__link {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 8px 9px;
  font-size: 14px;
  color: var(--mist);
  text-decoration: none;
  transition: color 0.18s ease, background-color 0.18s ease;
}
.site-nav__link::after {
  content: "";
  position: absolute;
  left: 9px;
  right: 9px;
  bottom: 3px;
  height: 1px;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.24s ease;
}
.site-nav__link:hover { color: var(--paper); }
.site-nav__link:hover::after { transform: scaleX(1); }
.site-nav__link[aria-current="page"] {
  color: var(--cyan);
  background: rgba(56, 225, 208, 0.06);
}
.site-nav__link[aria-current="page"]::after { transform: scaleX(1); }
.nav-index {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
}
.site-nav__link[aria-current="page"] .nav-index { color: var(--cyan); }
.nav-label { white-space: nowrap; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
  margin-left: auto;
}

/* ---------- 7. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 15px;
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  color: var(--paper);
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--line-2);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover {
  background: rgba(220, 230, 228, 0.08);
  box-shadow: inset 0 0 0 1px var(--cyan);
}
.btn:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--cyan);
}
.btn--primary {
  color: var(--abyss);
  background: var(--cyan);
  font-weight: 700;
  box-shadow: inset 0 0 0 1px var(--cyan);
}
.btn--primary:hover {
  background: #5EEBDB;
  box-shadow: inset 0 0 0 1px #5EEBDB;
}
.btn--ghost {
  color: var(--mist);
  background: transparent;
}
.btn--ghost:hover {
  color: var(--paper);
  background: rgba(56, 225, 208, 0.09);
  box-shadow: inset 0 0 0 1px rgba(56, 225, 208, 0.6);
}

/* ---------- 8. 移动导航开关 ---------- */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  color: var(--mist);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  background: rgba(12, 38, 59, 0.9);
  box-shadow: inset 0 0 0 1px var(--line-2);
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 9px 100%, 0 calc(100% - 9px));
  transition: color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}
.nav-toggle:hover {
  color: var(--cyan);
  box-shadow: inset 0 0 0 1px rgba(56, 225, 208, 0.6);
}
.nav-toggle[aria-expanded="true"] {
  color: var(--cyan);
  background: rgba(56, 225, 208, 0.1);
  box-shadow: inset 0 0 0 1px rgba(56, 225, 208, 0.7);
}
.nav-toggle:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--cyan);
}
.nav-toggle__bars {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  width: 14px;
}
.nav-toggle__bars span {
  display: block;
  height: 1px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) {
  transform: translateY(4px) 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(-4px) rotate(-45deg);
}
.nav-toggle__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
}

/* ---------- 9. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(56px, 9vw, 110px);
  background: linear-gradient(180deg, #0C263B 0%, #071A2B 58%, #05121E 100%);
  border-top: 1px solid var(--line);
}
.site-footer::before {
  content: "";
  position: absolute;
  top: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan) 0 110px, var(--amber) 110px 190px, transparent 190px);
  pointer-events: none;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1.05fr) minmax(0, 1.2fr);
  gap: clamp(26px, 4vw, 60px);
  padding-block: clamp(38px, 5.4vw, 70px);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.footer-brand__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  letter-spacing: -0.02em;
  line-height: 1.05;
}
.footer-summary {
  max-width: 34ch;
  font-size: 14.5px;
  line-height: 1.85;
  color: rgba(220, 230, 228, 0.78);
}
.footer-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 2px;
}
.footer-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}
.dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
}
.dot--cyan { background: var(--cyan); box-shadow: 0 0 0 3px rgba(56, 225, 208, 0.12); }
.dot--amber { background: var(--amber); box-shadow: 0 0 0 3px rgba(242, 184, 75, 0.12); }
.dot--clay { background: var(--clay); box-shadow: 0 0 0 3px rgba(181, 100, 74, 0.16); }

.footer-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 2.6vw, 34px);
}
.footer-col { min-width: 0; }
.footer-col__title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--cyan);
}
.footer-col__title::before {
  content: "";
  width: 14px;
  height: 1px;
  flex: none;
  background: var(--cyan);
}
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.footer-links__item { display: block; }
.footer-link {
  position: relative;
  display: inline-block;
  padding-block: 5px;
  font-size: 14px;
  color: rgba(220, 230, 228, 0.82);
  text-decoration: none;
  transition: color 0.18s ease;
}
.footer-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 3px;
  width: 0;
  height: 1px;
  background: var(--cyan);
  transition: width 0.22s ease;
}
.footer-link:hover { color: var(--cyan); }
.footer-link:hover::after { width: 100%; }

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.footer-contact__title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--amber);
}
.footer-contact__title::before {
  content: "";
  width: 14px;
  height: 1px;
  flex: none;
  background: var(--amber);
}
.contact-line {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
  padding-block: 7px;
  border-bottom: 1px dashed var(--line);
  font-size: 13.5px;
}
.contact-line__key {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
}
.contact-line__value {
  color: var(--paper);
  word-break: break-all;
}
.contact-line__value--mono {
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}
.footer-note {
  margin-top: 8px;
  max-width: 40ch;
  font-size: 12.5px;
  line-height: 1.8;
  color: rgba(220, 230, 228, 0.58);
}

.site-footer__base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 16px 22px;
  border-top: 1px solid var(--line);
}
.footer-legal {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: rgba(220, 230, 228, 0.55);
}
.footer-legal .mono { color: rgba(220, 230, 228, 0.75); }

/* ---------- 10. 通用组件 ---------- */
.panel {
  position: relative;
  padding: clamp(18px, 2.6vw, 30px);
  background: linear-gradient(158deg, rgba(12, 38, 59, 0.97) 0%, rgba(7, 26, 43, 0.94) 100%);
  box-shadow: inset 0 0 0 1px var(--line);
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut)));
  transition: box-shadow 0.22s ease;
}
.panel:hover { box-shadow: inset 0 0 0 1px rgba(56, 225, 208, 0.42); }
.panel--sm {
  --cut: 14px;
  padding: clamp(14px, 2vw, 20px);
}

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

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--mist);
  background: rgba(220, 230, 228, 0.07);
  box-shadow: inset 0 0 0 1px var(--line);
  white-space: nowrap;
}
.tag--cyan {
  color: var(--cyan);
  background: rgba(56, 225, 208, 0.08);
  box-shadow: inset 0 0 0 1px rgba(56, 225, 208, 0.42);
}
.tag--amber {
  color: var(--amber);
  background: rgba(242, 184, 75, 0.09);
  box-shadow: inset 0 0 0 1px rgba(242, 184, 75, 0.4);
}
.tag--clay {
  color: #E0A08A;
  background: rgba(181, 100, 74, 0.14);
  box-shadow: inset 0 0 0 1px rgba(181, 100, 74, 0.55);
}

.media-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background:
    linear-gradient(150deg, rgba(28, 143, 137, 0.22), rgba(12, 38, 59, 0.9) 72%),
    var(--deep);
  box-shadow: inset 0 0 0 1px var(--line);
  clip-path: polygon(0 0, calc(100% - var(--cut-sm)) 0, 100% var(--cut-sm), 100% 100%, 0 100%);
}
.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-frame--wide { aspect-ratio: 21 / 9; }
.media-frame--square { aspect-ratio: 1 / 1; }

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-block: 14px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}
.breadcrumbs a {
  color: var(--mist);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}
.breadcrumbs a:hover {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
}
.breadcrumbs__sep { color: var(--cyan-deep); }

/* ---------- 11. 滚动进度（JS 插入） ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 70;
  background: transparent;
  pointer-events: none;
}
.scroll-progress__fill {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--cyan), var(--amber));
  transition: transform 0.12s linear;
}

/* ---------- 12. 平板与移动端 ---------- */
@media (max-width: 1024px) {
  .site-header__inner {
    flex-wrap: wrap;
    row-gap: 0;
  }
  .site-nav {
    order: 3;
    flex: 1 0 100%;
    display: none;
    justify-content: flex-start;
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px dashed var(--line);
  }
  .site-nav[data-open="true"] { display: block; }
  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 2px;
  }
  .site-nav__link {
    width: 100%;
    justify-content: flex-start;
    padding: 11px 10px;
    border-left: 2px solid transparent;
  }
  .site-nav__link::after { display: none; }
  .site-nav__link:hover { background: rgba(220, 230, 228, 0.05); }
  .site-nav__link[aria-current="page"] {
    border-left-color: var(--cyan);
    background: rgba(56, 225, 208, 0.07);
  }
  .nav-toggle { display: inline-flex; }

  .site-footer__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 30px;
  }
  .footer-brand { grid-column: 1 / -1; }
  .footer-contact { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
  .header-actions .btn--primary { display: none; }
  .brand__meta { display: none; }
  .version-chip {
    padding: 3px 7px;
    font-size: 10px;
  }
  .site-footer__grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .footer-nav { gap: 20px; }
  .contact-line { grid-template-columns: 50px minmax(0, 1fr); }
  .site-footer__base { flex-direction: column; }
}

/* ---------- 13. 减少动效 ---------- */
@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;
    scroll-behavior: auto !important;
  }
  .skip-link { transition: none; }
  .site-nav__link::after,
  .footer-link::after,
  .scroll-progress__fill { transition: none; }
}
