/* =========================================================
   9397 威利斯 · 共享站点样式 /assets/site.css
   骨架：命令栏 + 堆叠面板 + 档案页脚
   ========================================================= */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body,
h1, h2, h3, h4, h5, h6,
p, ul, ol, li, figure, figcaption, blockquote, dl, dd { margin: 0; }

ul, ol { padding: 0; list-style: none; }

img, svg { display: block; max-width: 100%; }

button, input, select, textarea { font: inherit; color: inherit; }

a { color: inherit; }

table { border-collapse: collapse; width: 100%; }

/* ---------- 02 变量 ---------- */
:root {
  --ink-900: #0B1524;
  --ink-800: #152A42;
  --ink-700: #1D3552;
  --ink-deep: #061019;
  --line: #C4CFDA;
  --line-soft: rgba(196, 207, 218, 0.22);
  --paper: #F3F6F9;
  --text-dark: #101B27;
  --muted: #97A5B3;
  --white: #F2F5F8;
  --orange: #FF6A2B;
  --cyan: #2FE3C8;
  --amber: #F5B841;
  --teal: #0F4A47;

  --font-display: "Barlow Condensed", "Oswald", "HarmonyOS Sans Condensed",
    "HarmonyOS Sans SC", "PingFang SC", "Noto Sans SC", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular,
    Menlo, Consolas, monospace;
  --font-body: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", system-ui,
    -apple-system, "Segoe UI", sans-serif;

  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  --step-1: clamp(1.125rem, 1.05rem + 0.45vw, 1.375rem);
  --step-2: clamp(1.5rem, 1.28rem + 1vw, 2rem);
  --display: clamp(2.6rem, 6vw, 5.4rem);

  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 2px;

  --shadow-hard: 6px 6px 0 var(--ink-deep);
  --shadow-lift: 8px 8px 0 var(--ink-deep);
  --shadow-paper: 6px 6px 0 rgba(16, 27, 39, 0.18);

  --dur: 160ms;
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
}

/* ---------- 03 基础排版 ---------- */
body {
  min-height: 100vh;
  background-color: var(--ink-900);
  background-image:
    linear-gradient(to right, rgba(196, 207, 218, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(196, 207, 218, 0.05) 1px, transparent 1px);
  background-size: 88px 88px;
  color: var(--line);
  font-family: var(--font-body);
  font-size: var(--step-0);
  font-weight: 400;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

#main-content { display: block; }

h1, h2, h3, h4 { font-weight: 500; line-height: 1.2; }

p { max-width: 68ch; }

::selection { background: var(--cyan); color: var(--ink-900); }

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

/* ---------- 04 通用工具 ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(40px, 6vw, 88px); position: relative; }

.section-head {
  display: grid;
  gap: 10px;
  margin-bottom: clamp(18px, 3vw, 32px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow-mark {
  width: 18px;
  height: 2px;
  background: var(--orange);
}

.display {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: var(--display);
  line-height: 0.98;
  letter-spacing: -0.02em;
  color: var(--white);
}

.display-sm {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.8rem, 3.4vw, 2.8rem);
  line-height: 1.04;
  letter-spacing: -0.01em;
  color: var(--white);
}

.lead {
  font-size: var(--step-1);
  line-height: 1.7;
  color: var(--line);
  max-width: 40ch;
}

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

.mono {
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.rule {
  height: 2px;
  border: 0;
  background: var(--line);
  opacity: 0.4;
}

.surface-dark { background: var(--ink-900); color: var(--line); }

.surface-paper { background: var(--paper); color: var(--text-dark); }

.band {
  background: var(--paper);
  color: var(--text-dark);
  border-block: 2px solid var(--text-dark);
  padding-block: clamp(24px, 4vw, 44px);
}

.band .display,
.band .display-sm { color: var(--text-dark); }

.band .eyebrow,
.band .text-muted { color: #56636F; }

/* ---------- 05 网格 ---------- */
.grid { display: grid; gap: clamp(16px, 2vw, 28px); }

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

.col-3 { grid-column: span 3; }
.col-4 { grid-column: span 4; }
.col-5 { grid-column: span 5; }
.col-7 { grid-column: span 7; }
.col-8 { grid-column: span 8; }
.col-12 { grid-column: span 12; }

/* ---------- 06 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border: 2px solid var(--line);
  background: transparent;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  border-radius: var(--radius);
  transition: transform var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease),
    background-color var(--dur) var(--ease),
    color var(--dur) var(--ease),
    border-color var(--dur) var(--ease);
}

.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--ink-deep);
  border-color: var(--cyan);
  color: var(--cyan);
}

.btn:active { transform: none; box-shadow: none; }

.btn-primary {
  background: var(--orange);
  border-color: var(--ink-deep);
  color: #12100E;
  font-weight: 700;
}

.btn-primary:hover {
  background: var(--amber);
  border-color: var(--ink-deep);
  color: #12100E;
}

.btn-cyan {
  background: var(--cyan);
  border-color: var(--ink-deep);
  color: var(--ink-900);
  font-weight: 700;
}

.btn-cyan:hover { background: var(--white); border-color: var(--ink-deep); color: var(--ink-900); }

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

.btn-sm { padding: 9px 13px; font-size: 0.85rem; }

.btn-block { width: 100%; }

/* ---------- 07 标签 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border: 2px solid currentColor;
  color: var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.4;
  white-space: nowrap;
}

.tag-accent { color: var(--orange); }
.tag-cyan { color: var(--cyan); }
.tag-amber { color: var(--amber); }

.tag-solid {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--ink-900);
}

.band .tag { color: var(--text-dark); }
.band .tag-accent { color: #C2450C; }
.band .tag-amber { color: #8A5D00; }

/* ---------- 08 面板与卡片 ---------- */
.panel {
  position: relative;
  padding: clamp(20px, 3vw, 40px);
  background: var(--ink-800);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
}

.panel-paper {
  background: var(--paper);
  color: var(--text-dark);
  border-color: var(--text-dark);
  box-shadow: var(--shadow-paper);
}

.panel-paper .display,
.panel-paper .display-sm { color: var(--text-dark); }

.card {
  position: relative;
  padding: clamp(16px, 2vw, 24px);
  background: var(--ink-800);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  transition: transform var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease),
    border-color var(--dur) var(--ease);
}

.card:hover,
.card:focus-within {
  transform: translate(-4px, -4px);
  box-shadow: var(--shadow-lift);
  border-color: var(--cyan);
}

.card-paper {
  background: var(--paper);
  color: var(--text-dark);
  border-color: var(--text-dark);
  box-shadow: var(--shadow-paper);
}

.card-num {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 8px;
}

.card-paper .card-num { color: #56636F; }

/* ---------- 09 图片容器（页面阶段放图） ---------- */
.figure {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: var(--ink-800);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
}

.figure-img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--ink-700);
}

.aspect-square { aspect-ratio: 1 / 1; }
.aspect-tall { aspect-ratio: 3 / 4; }

.figure-cap {
  padding: 10px 12px;
  border-top: 2px solid var(--line);
  background: var(--ink-900);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.6;
}

.figure-plain {
  border-color: var(--text-dark);
  box-shadow: var(--shadow-paper);
}

.figure-plain .figure-cap {
  border-top-color: var(--text-dark);
  background: transparent;
  color: #56636F;
}

/* ---------- 10 面包屑 ---------- */
.breadcrumb {
  background: var(--ink-900);
  border-bottom: 1px solid var(--line-soft);
  padding-block: 12px;
}

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

.crumb {
  color: var(--line);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color var(--dur) var(--ease),
    border-color var(--dur) var(--ease);
}

.crumb:hover { color: var(--cyan); border-bottom-color: var(--cyan); }

.crumb[aria-current="page"] {
  color: var(--orange);
  border-bottom-color: var(--orange);
}

.crumb-sep { color: var(--muted); }

/* ---------- 11 显现动效 ---------- */
.reveal {
  opacity: 1;
  transform: none;
}

.js .reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 240ms var(--ease), transform 240ms var(--ease);
}

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

/* ---------- 12 跳转链接 ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 300;
  padding: 10px 16px;
  background: var(--cyan);
  color: var(--ink-900);
  border: 2px solid var(--ink-deep);
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  left: 8px;
  outline: 2px solid var(--white);
  outline-offset: 2px;
}

/* ---------- 13 头部命令栏 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: var(--ink-900);
  border-bottom: 2px solid var(--line);
  color: var(--white);
}

.header-shell {
  position: relative;
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.8vw, 26px);
  min-height: 74px;
  padding-block: 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  text-decoration: none;
  color: var(--white);
}

.brand-mark {
  width: 13px;
  height: 26px;
  border: 2px solid var(--white);
  background: linear-gradient(180deg, var(--orange) 0 50%, var(--cyan) 50% 100%);
  transform: skewX(-8deg);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--muted);
  text-transform: uppercase;
}

.brand-badge {
  padding: 2px 6px;
  background: var(--cyan);
  border: 2px solid var(--white);
  color: var(--ink-900);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: transparent;
  border: 2px solid var(--line);
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color var(--dur) var(--ease),
    color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

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

.nav-toggle[aria-expanded="true"] {
  background: var(--cyan);
  border-color: var(--cyan);
  color: var(--ink-900);
}

.nav-toggle-bars {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  width: 14px;
}

.nav-toggle-bars span {
  display: block;
  height: 2px;
  background: currentColor;
}

.nav-toggle-label { line-height: 1; }

.site-nav { margin-inline: auto; }

.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(4px, 1.1vw, 18px);
}

.nav-item { display: block; }

.nav-link {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 8px 2px;
  color: var(--line);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color var(--dur) var(--ease),
    border-color var(--dur) var(--ease);
}

.nav-link:hover {
  color: var(--white);
  border-bottom-color: var(--cyan);
}

.nav-index {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--muted);
  transition: color var(--dur) var(--ease);
}

.nav-link:hover .nav-index { color: var(--cyan); }

.nav-link[aria-current="page"] {
  color: var(--white);
  border-bottom-color: var(--orange);
}

.nav-link[aria-current="page"] .nav-index { color: var(--orange); }

.header-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.header-status {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--muted);
  line-height: 1;
  max-width: none;
}

.status-dot {
  width: 7px;
  height: 7px;
  background: var(--cyan);
  box-shadow: 0 0 0 3px rgba(47, 227, 200, 0.18);
}

.header-meter {
  position: relative;
  height: 3px;
  margin-inline: calc(var(--gutter) * -1);
  background: var(--line-soft);
  overflow: hidden;
}

.header-meter-fill {
  display: block;
  width: 0;
  height: 100%;
  background: var(--orange);
  transition: width 120ms linear;
}

/* ---------- 14 页脚 ---------- */
.site-footer {
  position: relative;
  background: var(--ink-900);
  border-top: 2px solid var(--line);
  color: var(--line);
}

.footer-shell {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding: clamp(28px, 4vw, 52px) var(--gutter) 22px;
}

.footer-signal {
  display: flex;
  gap: 4px;
  margin-bottom: clamp(18px, 3vw, 30px);
}

.footer-signal span {
  flex: 1 1 0;
  height: 4px;
  background: var(--line-soft);
}

.footer-signal span:nth-child(3n) { background: rgba(255, 106, 43, 0.55); }
.footer-signal span:nth-child(4n) { background: rgba(47, 227, 200, 0.45); }

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.1fr);
  gap: clamp(24px, 4vw, 56px);
  padding-bottom: clamp(20px, 3vw, 30px);
  border-bottom: 1px solid var(--line-soft);
}

.footer-brand-name {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1;
  color: var(--white);
  max-width: none;
}

.footer-brand-badge {
  display: inline-block;
  margin-top: 10px;
  padding: 3px 8px;
  background: var(--cyan);
  color: var(--ink-900);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.5;
}

.footer-brand-note {
  margin-top: 14px;
  max-width: 30ch;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}

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

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

.footer-col-title {
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.footer-links {
  display: grid;
  gap: 6px;
}

.footer-link {
  display: inline-block;
  padding: 2px 0;
  color: var(--line);
  font-size: 0.95rem;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color var(--dur) var(--ease),
    border-color var(--dur) var(--ease);
}

.footer-link:hover {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
}

.footer-contact {
  display: grid;
  gap: 4px;
  margin-top: clamp(18px, 3vw, 26px);
}

.footer-contact-line {
  font-size: 13px;
  line-height: 1.8;
  color: var(--line);
  max-width: 80ch;
}

.footer-mono {
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--white);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 22px;
  margin-top: clamp(18px, 3vw, 24px);
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
}

.footer-legal {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--muted);
  max-width: none;
}

.footer-year {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
  max-width: none;
}

.footer-mini {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-left: auto;
}

.footer-mini-link {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--line);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color var(--dur) var(--ease),
    border-color var(--dur) var(--ease);
}

.footer-mini-link:hover {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
}

/* ---------- 15 响应式 ---------- */
@media (max-width: 1024px) {
  .col-3, .col-4, .col-5 { grid-column: span 6; }
  .col-7, .col-8 { grid-column: span 12; }
  .footer-top { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 1080px) {
  .header-inner {
    flex-wrap: wrap;
    row-gap: 10px;
    min-height: 0;
    padding-block: 10px;
  }

  .brand { order: 1; flex: 1 1 auto; }

  .nav-toggle {
    display: inline-flex;
    order: 2;
  }

  .header-tools {
    order: 3;
    margin-left: 0;
    gap: 8px;
  }

  .header-status { display: none; }

  .site-nav {
    order: 4;
    display: none;
    flex: 1 0 100%;
    width: 100%;
    margin: 8px 0 0;
    padding-top: 8px;
    border-top: 1px solid var(--line-soft);
  }

  .site-nav[data-open="true"] {
    display: block;
    animation: nav-in 180ms var(--ease);
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav-link {
    width: 100%;
    justify-content: flex-start;
    padding: 13px 2px;
    font-size: 1rem;
    border-bottom: 1px solid var(--line-soft);
  }

  .nav-link[aria-current="page"] {
    border-bottom-color: var(--orange);
  }

  .header-meter { margin-inline: 0; }
}

@keyframes nav-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-mini { margin-left: 0; width: 100%; }
  .lead { max-width: none; }
}

@media (max-width: 480px) {
  .brand-sub { display: none; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .btn-sm { padding: 8px 10px; font-size: 0.78rem; }
}

/* ---------- 16 降低动效 ---------- */
@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;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }

  .card:hover,
  .card:focus-within,
  .btn:hover {
    transform: none;
  }

  .header-meter-fill { transition: none; }
}
