:root {
  --paper: #F4F1EA;
  --ink: #0E2233;
  --sea: #1B4A6B;
  --ice: #6FD3D8;
  --maple: #C8452B;
  --lime: #8FE36B;
  --silver: #B9C2C6;
  --moss: #6E7F6A;
  --clay: #B0714F;
  --graphite: #3A464D;

  --edge: clamp(14px, 3vw, 32px);
  --maxw: 1240px;
  --cut: 14px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  --font-display: "Noto Serif SC", "Source Han Serif SC", "Songti SC", SimSun, serif;
  --font-narrow: "Barlow Condensed", "Helvetica Neue Condensed", "Arial Narrow", "PingFang SC", "Noto Sans SC", sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --line: rgba(185, 194, 198, 0.72);
  --line-soft: rgba(185, 194, 198, 0.38);
  --on-deep: rgba(244, 241, 234, 0.78);
}

*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset-block: 0;
  inset-inline-start: 0;
  width: 8px;
  z-index: 1;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    to bottom,
    var(--silver) 0 1px,
    transparent 1px 26px
  );
  opacity: 0.32;
}

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.01em;
}

p, figure, blockquote, dl, dd { margin: 0; }

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

a {
  color: inherit;
  text-decoration: none;
}

img, svg, picture, video {
  display: block;
  max-width: 100%;
  height: auto;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

address { font-style: normal; }

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

:focus-visible {
  outline: 3px solid var(--ice);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---------- 排版工具 ---------- */
.mono,
.coord {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

.label,
.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--graphite);
}

.eyebrow {
  color: var(--sea);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

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

.section-title {
  font-size: clamp(28px, 3.2vw, 42px);
  color: var(--ink);
}

.prose {
  max-width: 40em;
  color: var(--graphite);
}

.prose p + p { margin-top: 1em; }

.prose h2,
.prose h3 { color: var(--ink); margin-top: 1.6em; }

/* ---------- 容器与网格 ---------- */
.wrap {
  width: 100%;
  max-width: calc(var(--maxw) + var(--edge) * 2);
  margin-inline: auto;
  padding-inline: var(--edge);
}

.grid {
  display: grid;
  gap: clamp(18px, 3vw, 34px);
}

.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }

/* ---------- 跳过链接 ---------- */
.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--lime);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  transform: translateY(-220%);
  transition: transform 0.22s var(--ease);
}

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

/* ---------- 头部：悬浮胶囊浮岛 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  padding: clamp(10px, 1.4vw, 18px) var(--edge) 0;
}

.header-shell {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 28px);
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 8px 10px 8px 18px;
  border-radius: 999px;
  border: 1px solid rgba(111, 211, 216, 0.22);
  background: rgba(14, 34, 51, 0.94);
  color: var(--paper);
  box-shadow: 0 12px 30px rgba(14, 34, 51, 0.16);
  backdrop-filter: blur(14px) saturate(140%);
  transition: padding 0.22s var(--ease), background 0.22s var(--ease), box-shadow 0.22s var(--ease);
}

.site-header[data-scrolled] .header-shell {
  padding-block: 5px;
  background: rgba(9, 24, 37, 0.98);
  box-shadow: 0 16px 38px rgba(14, 34, 51, 0.28);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex: none;
  color: var(--paper);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  background: linear-gradient(148deg, var(--ice), var(--lime));
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  clip-path: polygon(9px 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%, 0 9px);
}

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

.brand-name {
  font-family: var(--font-narrow);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ice);
  margin-top: 3px;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  margin-left: auto;
  padding: 9px 15px 9px 12px;
  border-radius: 999px;
  border: 1px solid rgba(185, 194, 198, 0.42);
  color: var(--paper);
  font-size: 13px;
  letter-spacing: 0.08em;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.nav-toggle:hover {
  border-color: var(--ice);
  background: rgba(111, 211, 216, 0.12);
}

.nav-toggle[aria-expanded="true"] {
  border-color: var(--lime);
  background: rgba(143, 227, 107, 0.14);
}

.nav-toggle-bars {
  position: relative;
  display: block;
  width: 16px;
  height: 11px;
  flex: none;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--lime);
  transition: transform 0.22s var(--ease), top 0.22s var(--ease), bottom 0.22s var(--ease);
}

.nav-toggle-bars::before { top: 0; }
.nav-toggle-bars::after { bottom: 0; }

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before {
  top: 4px;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after {
  bottom: 5px;
  transform: rotate(-45deg);
}

.nav-toggle-text {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.2vw, 18px);
  margin-left: auto;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-list a {
  display: block;
  padding: 9px 13px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: rgba(244, 241, 234, 0.76);
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}

.nav-list a:hover {
  color: var(--paper);
  background: rgba(111, 211, 216, 0.16);
}

.nav-list a[aria-current="page"] {
  color: var(--ink);
  background: var(--lime);
  font-weight: 700;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  padding: 9px 19px;
  border-radius: 999px;
  background: var(--maple);
  color: var(--paper);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}

.nav-cta:hover {
  background: #A93922;
  transform: translateY(-1px);
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  border: 1px solid transparent;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

.btn:hover { transform: translateY(-1px); }

.btn--primary {
  background: var(--maple);
  color: var(--paper);
}

.btn--primary:hover { background: #A93922; }

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

.btn--ghost:hover {
  background: var(--ink);
  color: var(--paper);
}

.btn--quiet {
  padding: 0;
  border: 0;
  background: none;
  color: var(--sea);
  clip-path: none;
  border-bottom: 1px solid currentColor;
  border-radius: 0;
}

.btn--quiet:hover { color: var(--maple); transform: none; }

/* ---------- 面包屑 ---------- */
.breadcrumb {
  padding-block: 20px 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--graphite);
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

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

.breadcrumb li:not(:last-child)::after {
  content: "/";
  color: var(--silver);
}

.breadcrumb a { color: var(--sea); }
.breadcrumb a:hover { color: var(--maple); }
.breadcrumb [aria-current="page"] { color: var(--graphite); }

/* ---------- 面板 ---------- */
.panel {
  position: relative;
  padding: clamp(20px, 3vw, 32px);
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink);
}

.panel--cut {
  border: 0;
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
}

.panel--sea {
  background: var(--sea);
  border-color: transparent;
  color: var(--paper);
}

.panel--deep {
  background: var(--ink);
  border-color: transparent;
  color: var(--paper);
}

.panel--sea .section-title,
.panel--deep .section-title { color: var(--paper); }

.panel--sea .eyebrow,
.panel--deep .eyebrow {
  color: var(--ice);
  border-bottom-color: rgba(185, 194, 198, 0.45);
}

.panel--sea .prose,
.panel--deep .prose { color: var(--on-deep); }

/* ---------- 图片容器基础规则 ---------- */
.media-frame {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line);
  background-color: rgba(27, 74, 107, 0.06);
  background-image:
    repeating-linear-gradient(90deg, rgba(185, 194, 198, 0.45) 0 1px, transparent 1px 42px),
    radial-gradient(120% 90% at 15% 0%, rgba(111, 211, 216, 0.26), transparent 68%),
    radial-gradient(110% 90% at 92% 100%, rgba(200, 69, 43, 0.14), transparent 62%),
    linear-gradient(148deg, rgba(27, 74, 107, 0.16), rgba(244, 241, 234, 0.9));
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
}

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

.media-frame figcaption {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: 12px 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--paper);
  background: linear-gradient(180deg, rgba(14, 34, 51, 0), rgba(14, 34, 51, 0.82));
}

.media-frame--wide { aspect-ratio: 21 / 9; }
.media-frame--square { aspect-ratio: 1 / 1; }
.media-frame--tall { aspect-ratio: 3 / 4; }

/* ---------- 分段切换（tab） ---------- */
.tabs {
  display: grid;
  gap: clamp(18px, 2.4vw, 28px);
}

.tablist {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(185, 194, 198, 0.16);
}

.tab {
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--graphite);
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.tab:hover { background: rgba(244, 241, 234, 0.9); }

.tab[aria-selected="true"] {
  background: var(--ink);
  color: var(--paper);
}

.tabpanel {
  padding: clamp(18px, 2.6vw, 28px);
  border: 1px solid var(--line);
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
}

.tabpanel[hidden] { display: none; }

/* ---------- 滚动进度刻度 ---------- */
.readout {
  position: fixed;
  inset-inline: 0;
  top: 0;
  height: 3px;
  z-index: 120;
  background: rgba(185, 194, 198, 0.34);
  pointer-events: none;
}

.readout-bar {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--ice), var(--lime));
  transition: width 0.12s linear;
}

/* ---------- 页脚 ---------- */
.site-footer {
  position: relative;
  overflow: hidden;
  margin-top: clamp(48px, 8vw, 96px);
  padding: 0 var(--edge) 26px;
  background: var(--ink);
  color: var(--on-deep);
}

.site-footer::before {
  content: "";
  position: absolute;
  inset-inline: -10%;
  bottom: 28%;
  height: 260px;
  pointer-events: none;
  background:
    radial-gradient(58% 100% at 18% 100%, rgba(111, 211, 216, 0.16), transparent 72%),
    radial-gradient(50% 100% at 78% 100%, rgba(143, 227, 107, 0.1), transparent 72%);
}

.footer-scale {
  height: 22px;
  margin-inline: calc(var(--edge) * -1);
  border-bottom: 1px solid rgba(185, 194, 198, 0.28);
  background-image: repeating-linear-gradient(
    90deg,
    rgba(185, 194, 198, 0.55) 0 1px,
    transparent 1px 32px
  );
  background-repeat: repeat-x;
  background-position: left bottom;
  background-size: 32px 11px;
}

.footer-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: calc(var(--maxw) + var(--edge) * 2);
  margin-inline: auto;
  padding-inline: 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.4fr;
  gap: clamp(24px, 4vw, 56px);
  padding-block: clamp(34px, 5vw, 62px);
}

.footer-wordmark {
  font-family: var(--font-display);
  font-size: clamp(24px, 2.4vw, 32px);
  font-weight: 700;
  color: var(--paper);
  letter-spacing: 0.02em;
}

.footer-tagline {
  margin-top: 12px;
  max-width: 26ch;
  font-size: 14px;
  line-height: 1.7;
  color: rgba(244, 241, 234, 0.66);
}

.footer-coord {
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ice);
}

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

.footer-links li + li { margin-top: 10px; }

.footer-links a {
  display: inline-block;
  font-size: 14px;
  color: rgba(244, 241, 234, 0.72);
  border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.footer-links a:hover,
.footer-links a[aria-current="page"] {
  color: var(--paper);
  border-bottom-color: var(--lime);
}

.footer-contact li + li { margin-top: 14px; }

.footer-contact-item {
  display: grid;
  gap: 3px;
}

.footer-contact-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(185, 194, 198, 0.72);
}

.footer-contact-value {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(244, 241, 234, 0.86);
  overflow-wrap: anywhere;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px clamp(18px, 4vw, 44px);
  padding-block: 20px;
  border-top: 1px solid rgba(185, 194, 198, 0.24);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: rgba(185, 194, 198, 0.8);
}

.footer-meta-item { margin: 0; }

/* ---------- 响应式 ---------- */
@media (max-width: 1180px) {
  .nav-list a { padding: 8px 10px; font-size: 13.5px; }
  .nav-cta { padding: 8px 16px; }
}

@media (max-width: 980px) {
  .nav-toggle { display: inline-flex; }

  .site-nav {
    position: absolute;
    inset-inline: 0;
    top: calc(100% + 10px);
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-left: 0;
    padding: 12px;
    max-height: min(72vh, 560px);
    overflow-y: auto;
    border-radius: 24px;
    border: 1px solid rgba(111, 211, 216, 0.24);
    background: rgba(11, 28, 42, 0.99);
    box-shadow: 0 26px 52px rgba(14, 34, 51, 0.34);
  }

  .site-nav[data-open] {
    display: flex;
    animation: nav-drop 0.22s var(--ease) both;
  }

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

  .nav-list a {
    padding: 13px 16px;
    border-radius: 14px;
    font-size: 15px;
    color: rgba(244, 241, 234, 0.84);
  }

  .nav-list a[aria-current="page"] {
    background: var(--lime);
    color: var(--ink);
  }

  .nav-cta {
    margin-top: 12px;
    padding: 13px 20px;
    border-radius: 14px;
  }

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

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

  body::before { display: none; }
}

@keyframes nav-drop {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 720px) {
  body { font-size: 16px; }

  .header-shell { padding: 7px 8px 7px 14px; }
  .brand-mark { width: 34px; height: 34px; }
  .brand-name { font-size: 17px; }
  .brand-sub { font-size: 9px; letter-spacing: 0.1em; }

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

  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 30px; }

  .media-frame--wide { aspect-ratio: 16 / 10; }

  .tablist { border-radius: 18px; }
  .tab { flex: 1 1 auto; text-align: center; }
}

@media (max-width: 420px) {
  .brand-sub { display: none; }
  .nav-toggle-text { display: none; }
  .nav-toggle { padding: 10px 12px; }
}

@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;
  }

  .readout-bar { transition: none; }
  .nav-cta:hover,
  .btn:hover { transform: none; }
}
