/* ============================================================
   亚虎主页 · 共享样式 /assets/site.css
   01 变量  02 重置与排版  03 工具类  04 头部框架
   05 导航与按钮  06 页脚  07 通用组件  08 动效与响应式
   ============================================================ */

/* ---------- 01. 变量 ---------- */
:root {
  --carbon-950: #0B0D0E;
  --carbon-850: #14181A;
  --graphite-700: #252B2E;
  --steel-500: #4B555A;
  --silver-300: #AEB7BB;
  --silver-100: #E3E8EA;
  --warm-white: #F7F2E9;
  --amber-500: #FF9A2A;
  --cyan-400: #28E0D0;
  --alert-red: #FF5A5F;

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

  --frame-pad: clamp(16px, 3.2vw, 44px);
  --shell-max: 1480px;
  --radius: 3px;
  --hairline: 1px solid var(--graphite-700);
  --ease: cubic-bezier(.22, .68, .28, 1);
}

/* ---------- 02. 重置与排版 ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background-color: var(--carbon-950);
  background-image:
    linear-gradient(180deg, rgba(40, 224, 208, .055), transparent 380px),
    repeating-linear-gradient(180deg, rgba(37, 43, 46, .55) 0 1px, transparent 1px 128px);
  background-attachment: fixed, fixed;
  color: var(--silver-100);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.85;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6, p, ul, ol, figure, blockquote, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img, svg, video { display: block; max-width: 100%; height: auto; }
table { border-collapse: collapse; width: 100%; }

::selection { background: var(--amber-500); color: #12100B; }

:focus-visible {
  outline: 2px solid var(--cyan-400);
  outline-offset: 3px;
}

/* ---------- 03. 工具类 ---------- */
.mono {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 300;
  transform: translateY(-240%);
  padding: 10px 16px;
  border-radius: 2px;
  background: var(--amber-500);
  color: #12100B;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .14em;
  transition: transform .2s var(--ease);
}
.skip-link:focus { transform: translateY(0); }

.container {
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: var(--frame-pad);
}

.section {
  padding-block: clamp(36px, 5.5vw, 84px);
  border-top: var(--hairline);
}
.section:first-of-type { border-top: 0; }

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

.section-title {
  font-size: clamp(28px, 3.6vw, 52px);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -.02em;
  color: var(--warm-white);
}

.lede {
  max-width: 62ch;
  font-size: clamp(15px, 1.5vw, 17px);
  line-height: 1.9;
  color: var(--silver-300);
}

/* ---------- 04. 头部框架 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(11, 13, 14, .95);
  border-bottom: var(--hairline);
  box-shadow: 0 1px 0 rgba(247, 242, 233, .04);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.frame__strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  overflow: hidden;
  padding: 5px var(--frame-pad);
  background: var(--carbon-850);
  border-bottom: var(--hairline);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--steel-500);
}

.frame__legend {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.frame__legend-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  color: var(--silver-300);
}

.frame__meta {
  white-space: nowrap;
  color: var(--steel-500);
}

.frame__bar {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 224px) minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(10px, 2vw, 28px);
  padding: 10px var(--frame-pad);
}

.frame__progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  overflow: hidden;
  pointer-events: none;
}
.frame__progress-bar {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--cyan-400) 0%, var(--amber-500) 100%);
  transition: width .1s linear;
}

/* 品牌 */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand__mark {
  position: relative;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border: 1px solid var(--steel-500);
  background: linear-gradient(135deg, rgba(40, 224, 208, .12), transparent 62%);
}
.brand__mark::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid var(--cyan-400);
  opacity: .9;
}
.brand__mark::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 7px;
  width: 6px;
  height: 6px;
  background: var(--amber-500);
  box-shadow: 0 0 8px rgba(255, 154, 42, .65);
}

.brand__text { min-width: 0; display: block; }

.brand__label {
  display: block;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: .05em;
  color: var(--warm-white);
  transition: color .18s var(--ease);
}
.brand:hover .brand__label { color: var(--amber-500); }

.brand__descriptor {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .13em;
  color: var(--silver-300);
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* ---------- 05. 导航与按钮 ---------- */
.site-nav { min-width: 0; }

.site-nav__list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
}

.site-nav__item { display: block; }

.site-nav__link {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 8px 10px;
  border-bottom: 2px solid transparent;
  color: var(--silver-300);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  transition: color .18s var(--ease), background-color .18s var(--ease), border-color .18s var(--ease);
}
.site-nav__link:hover {
  color: var(--warm-white);
  background: rgba(40, 224, 208, .07);
  border-bottom-color: var(--cyan-400);
}
.site-nav__link[aria-current="page"] {
  color: var(--warm-white);
  background: rgba(255, 154, 42, .08);
  border-bottom-color: var(--amber-500);
}

.site-nav__index {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .14em;
  color: var(--steel-500);
}
.site-nav__link[aria-current="page"] .site-nav__index { color: var(--amber-500); }

.frame__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.quick-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid var(--graphite-700);
  border-radius: 2px;
  background: rgba(37, 43, 46, .38);
  color: var(--silver-300);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .12em;
  white-space: nowrap;
  transition: color .18s var(--ease), background-color .18s var(--ease), border-color .18s var(--ease);
}
.quick-link:hover {
  color: var(--carbon-950);
  background: var(--cyan-400);
  border-color: var(--cyan-400);
}

.quick-link--accent {
  color: var(--amber-500);
  border-color: rgba(255, 154, 42, .5);
}
.quick-link--accent:hover {
  color: var(--carbon-950);
  background: var(--amber-500);
  border-color: var(--amber-500);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border: 1px solid var(--graphite-700);
  border-radius: 2px;
  background: rgba(37, 43, 46, .5);
  color: var(--silver-100);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .16em;
  cursor: pointer;
  transition: border-color .18s var(--ease), color .18s var(--ease);
}
.nav-toggle:hover { border-color: var(--cyan-400); color: var(--warm-white); }

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

.nav-toggle__bars {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 16px;
}
.nav-toggle__bars span {
  display: block;
  height: 1px;
  background: currentColor;
  transition: transform .22s var(--ease), opacity .18s var(--ease);
}
.site-header[data-open] .nav-toggle__bars span:nth-child(1) { transform: translateY(5px) 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(-5px) rotate(-45deg); }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 22px;
  border: 1px solid transparent;
  border-radius: 2px;
  background: transparent;
  color: var(--silver-100);
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color .18s var(--ease), background-color .18s var(--ease), border-color .18s var(--ease);
}
.btn--primary {
  background: var(--amber-500);
  border-color: var(--amber-500);
  color: #12100B;
  font-weight: 600;
}
.btn--primary:hover { background: var(--warm-white); border-color: var(--warm-white); }

.btn--ghost {
  border-color: var(--steel-500);
  color: var(--silver-100);
}
.btn--ghost:hover {
  border-color: var(--cyan-400);
  color: var(--cyan-400);
  background: rgba(40, 224, 208, .07);
}

.btn--quiet {
  padding: 10px 16px;
  border-color: var(--graphite-700);
  color: var(--silver-300);
}
.btn--quiet:hover { border-color: var(--silver-300); color: var(--warm-white); }

/* ---------- 06. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(48px, 8vw, 96px);
  background: var(--carbon-850);
  border-top: var(--hairline);
  color: var(--silver-300);
}
.site-footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 128px;
  height: 2px;
  background: linear-gradient(90deg, var(--amber-500), transparent);
}

.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, .8fr) minmax(0, .9fr) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 44px);
  padding-block: clamp(32px, 5vw, 64px);
  border-bottom: var(--hairline);
}

.footer__brand { min-width: 0; }

.footer__brand-line {
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 900;
  line-height: 1.35;
  letter-spacing: -.01em;
  color: var(--warm-white);
}

.footer__note {
  margin-top: 12px;
  max-width: 34ch;
  font-size: 14px;
  line-height: 1.85;
  color: var(--steel-500);
}

.footer__col { min-width: 0; }

.footer__col-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: var(--hairline);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--steel-500);
}

.footer__list { display: grid; gap: 2px; }

.footer__link {
  display: inline-block;
  padding-block: 5px;
  font-size: 14px;
  color: var(--silver-300);
  transition: color .18s var(--ease);
}
.footer__link:hover { color: var(--cyan-400); text-decoration: underline; text-underline-offset: 4px; }

.footer__list--contact { gap: 6px; }

.footer__contact {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .02em;
  line-height: 1.8;
  color: var(--silver-300);
  word-break: break-all;
}

.footer__icp {
  margin-top: 16px;
  padding: 6px 10px;
  border: 1px solid var(--graphite-700);
  border-radius: 2px;
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--silver-300);
}

.footer__base {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-block: 18px 26px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--steel-500);
}
.footer__legal { color: var(--steel-500); }
.footer__meta { color: var(--steel-500); }

.to-top {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 18px;
  padding: 9px 14px;
  border: 1px solid var(--graphite-700);
  border-radius: 2px;
  background: rgba(37, 43, 46, .35);
  color: var(--silver-300);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color .18s var(--ease), border-color .18s var(--ease), opacity .25s var(--ease), transform .25s var(--ease);
}
.to-top:hover { color: var(--warm-white); border-color: var(--cyan-400); }
.to-top__arrow { color: var(--amber-500); font-size: 12px; line-height: 1; }
.to-top__label { line-height: 1; }

.has-js .to-top { opacity: 0; transform: translateY(8px); pointer-events: none; }
.has-js .to-top[data-visible="true"] { opacity: 1; transform: none; pointer-events: auto; }

/* ---------- 07. 通用组件 ---------- */
.led {
  display: inline-block;
  flex: 0 0 7px;
  width: 7px;
  height: 7px;
  border-radius: 1px;
  background: var(--steel-500);
}
.led--amber {
  background: var(--amber-500);
  box-shadow: 0 0 0 1px rgba(255, 154, 42, .28), 0 0 10px rgba(255, 154, 42, .45);
  animation: led-pulse 3.6s ease-in-out infinite;
}
.led--cyan {
  background: var(--cyan-400);
  box-shadow: 0 0 0 1px rgba(40, 224, 208, .3), 0 0 10px rgba(40, 224, 208, .4);
  animation: led-pulse 4.4s ease-in-out infinite;
}
.led--steel { background: var(--steel-500); }

@keyframes led-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .4; }
}

.breadcrumbs {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--steel-500);
}
.breadcrumbs__list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.breadcrumbs__item { display: inline-flex; align-items: center; }
.breadcrumbs__item:not(:last-child)::after {
  content: "/";
  margin-left: 8px;
  color: var(--graphite-700);
}
.breadcrumbs__link { color: var(--silver-300); transition: color .18s var(--ease); }
.breadcrumbs__link:hover { color: var(--cyan-400); }
.breadcrumbs__item[aria-current="page"] { color: var(--warm-white); }

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

.split {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(20px, 3vw, 48px);
  align-items: start;
}
.split--reverse { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }

.card {
  position: relative;
  padding: clamp(16px, 2vw, 24px);
  border: var(--hairline);
  border-radius: var(--radius);
  background: var(--carbon-850);
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
.card:hover { border-color: var(--steel-500); }

.card__index {
  display: block;
  margin-bottom: 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .18em;
  color: var(--amber-500);
}

.card__title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--warm-white);
}

.card__text {
  margin-top: 8px;
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--silver-300);
}

.media-frame {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: var(--hairline);
  border-radius: var(--radius);
  background-color: var(--carbon-850);
  background-image:
    linear-gradient(rgba(75, 85, 90, .22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(75, 85, 90, .22) 1px, transparent 1px),
    radial-gradient(circle at 28% 18%, rgba(40, 224, 208, .14), transparent 55%),
    radial-gradient(circle at 82% 88%, rgba(255, 154, 42, .12), transparent 52%);
  background-size: 32px 32px, 32px 32px, 100% 100%, 100% 100%;
}
.media-frame > img,
.media-frame > svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-frame--wide { aspect-ratio: 21 / 9; }
.media-frame--square { aspect-ratio: 1 / 1; }

.media-frame__caption {
  position: absolute;
  left: 0;
  bottom: 0;
  padding: 6px 10px;
  border-top: var(--hairline);
  border-right: var(--hairline);
  background: rgba(11, 13, 14, .82);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .16em;
  color: var(--silver-300);
}

/* 章节跟随索引（页面阶段配合 data-scrollspy 使用） */
[data-scrollspy] a { transition: color .18s var(--ease), border-color .18s var(--ease); }
[data-scrollspy] a.is-active {
  color: var(--warm-white);
  border-color: var(--amber-500);
}

/* 滚动显现 */
.has-js [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
}
.has-js [data-reveal].is-in {
  opacity: 1;
  transform: none;
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}

/* ---------- 08. 响应式 ---------- */
@media (max-width: 1180px) {
  .site-nav__link { padding: 7px 7px; font-size: 13px; }
  .site-nav__index { display: none; }
  .quick-link { padding: 6px 8px; font-size: 10px; }
  .brand__descriptor { font-size: 9px; }
}

@media (max-width: 1024px) {
  .footer__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(24px, 4vw, 40px);
  }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 980px) {
  html { scroll-padding-top: 88px; }

  .frame__bar { grid-template-columns: minmax(0, 1fr) auto; }

  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    background: var(--carbon-850);
    border-top: var(--hairline);
    border-bottom: var(--hairline);
    transition: max-height .28s var(--ease), visibility .28s var(--ease);
  }
  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--frame-pad) 18px;
  }
  .site-nav__link {
    display: flex;
    width: 100%;
    padding: 13px 4px;
    border-bottom: var(--hairline);
    border-left: 2px solid transparent;
    font-size: 15px;
  }
  .site-nav__link:hover { border-bottom-color: var(--graphite-700); border-left-color: var(--cyan-400); }
  .site-nav__link[aria-current="page"] { border-bottom-color: var(--graphite-700); border-left-color: var(--amber-500); }
  .site-nav__index { display: inline; }

  .site-header[data-open] .site-nav {
    max-height: min(72vh, 520px);
    overflow-y: auto;
    visibility: visible;
  }
  .site-header[data-open] { background: var(--carbon-950); }

  .nav-toggle { display: inline-flex; }
  .frame__actions .quick-link { display: none; }

  .frame__strip { font-size: 9px; letter-spacing: .12em; }
  .frame__legend { gap: 12px; }
  .frame__meta { display: none; }

  .split,
  .split--reverse { grid-template-columns: minmax(0, 1fr); }
  .grid--12 { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 560px) {
  .brand__descriptor { display: none; }
  .brand__mark { flex-basis: 28px; width: 28px; height: 28px; }
  .brand__label { font-size: 16px; }
  .frame__legend-item { gap: 5px; }
  .footer__grid { grid-template-columns: minmax(0, 1fr); }
  .footer__base { flex-direction: column; align-items: flex-start; }
  .media-frame { aspect-ratio: 4 / 3; }
}

@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;
  }
  .has-js [data-reveal] { opacity: 1; transform: none; }
  .has-js .to-top { opacity: 1; transform: none; pointer-events: auto; }
}

@media print {
  body { background: #fff; color: #111; }
  .site-header { position: static; box-shadow: none; }
  .frame__progress,
  .nav-toggle,
  .to-top { display: none !important; }
  .site-footer { background: #fff; border-top: 1px solid #999; }
  a { text-decoration: underline; }
}
