/* =========================================================
   安信主页 · 共享样式表 /assets/site.css
   暖沙纸 × 深海墨 × 海南蓝绿 · 蓝图网格与刊物气质
   ========================================================= */

:root {
  /* 色彩 */
  --ink: #0E2233;
  --ink-soft: #1C3245;
  --blue: #1573A8;
  --blue-deep: #0F5A85;
  --sky: #7FC4DF;
  --green: #2E7D5B;
  --coral: #F4674A;
  --sand: #F6EFE3;
  --paper: #FFFDF8;
  --line: #C9B79B;
  --line-soft: rgba(201, 183, 155, .5);
  --muted: #5B6E7C;

  /* 字体 */
  --font-display: "Source Han Sans SC", "Noto Sans CJK SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-body: var(--font-display);
  --font-serif: "Source Han Serif SC", "Noto Serif CJK SC", "Songti SC", "SimSun", Georgia, "Times New Roman", serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;

  /* 形状 */
  --radius-sm: 12px;
  --radius-card: 20px;
  --radius-lg: 28px;
  --radius-pill: 999px;

  /* 动效 */
  --ease: cubic-bezier(.2, .8, .2, 1);
  --dur: 160ms;

  /* 度量 */
  --header-h: 76px;
  --header-h-slim: 56px;
  --shell-max: 1280px;
  --gutter: clamp(18px, 4vw, 44px);
  --section-gap: clamp(56px, 8vw, 96px);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 20px);
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--sand);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(15px, .35vw + 14px, 17px);
  line-height: 1.85;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main { display: block; }

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

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

a {
  color: var(--blue);
  text-decoration-thickness: 1px;
  text-underline-offset: .18em;
  transition: color var(--dur) var(--ease);
}
a:hover { color: var(--blue-deep); }

p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0 0 1.15em; padding-left: 1.25em; }

strong, b { font-weight: 700; }

hr {
  border: 0;
  border-top: 1px solid var(--line-soft);
  margin: var(--section-gap) 0;
}

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

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

/* ---------- 中文标题体系 ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.015em;
  margin: 0 0 .55em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.6rem, 6.5vw, 5.4rem);
  line-height: 1.04;
  letter-spacing: -.03em;
}

h2 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.28;
  letter-spacing: .01em;
}

h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(1.15rem, 1.6vw, 1.4rem);
  line-height: 1.4;
  letter-spacing: .01em;
}

h4 {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .02em;
}

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

.measure { max-width: 34em; }
.prose { max-width: 34em; }
.prose h2, .prose h3 { margin-top: 1.6em; }

.lead {
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  line-height: 1.75;
  color: var(--ink-soft);
  max-width: 32em;
  margin: 0 0 1em;
}

.section-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  line-height: 1.26;
  letter-spacing: .01em;
  margin: 0 0 .6em;
  color: var(--ink);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: .6875rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 14px;
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--line);
  flex: none;
}

.blueprint {
  background-image:
    linear-gradient(to right, rgba(201, 183, 155, .34) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(201, 183, 155, .34) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: center top;
}

.surface {
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-card);
  padding: clamp(18px, 2.4vw, 28px);
}

.band-dark {
  background: var(--ink);
  color: var(--sand);
}
.band-dark h1, .band-dark h2, .band-dark h3, .band-dark h4 { color: var(--paper); }
.band-dark a { color: var(--sky); }
.band-dark a:hover { color: var(--paper); }

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

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

/* ---------- 图片容器（页面阶段放 <img> 用） ---------- */
.img-frame {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(155deg, rgba(127, 196, 223, .45) 0%, rgba(46, 125, 91, .22) 52%, var(--sand) 100%);
}
.img-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.img-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1.5px rgba(255, 253, 248, .45);
  pointer-events: none;
}
.img-frame--wide { aspect-ratio: 21 / 9; }
.img-frame--tall { aspect-ratio: 4 / 5; }
.img-frame--square { aspect-ratio: 1 / 1; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45em;
  padding: .62em 1.3em;
  font-family: var(--font-body);
  font-size: .875rem;
  font-weight: 600;
  letter-spacing: .03em;
  line-height: 1.2;
  border-radius: var(--radius-pill);
  border: 1.5px solid transparent;
  background: transparent;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background-color var(--dur) var(--ease),
    border-color var(--dur) var(--ease),
    color var(--dur) var(--ease);
}
.btn:hover { text-decoration: none; }

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

.btn--ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
.btn--ghost:hover {
  border-color: var(--blue);
  background: rgba(127, 196, 223, .18);
  color: var(--blue-deep);
}

/* ---------- 面包屑 ---------- */
.breadcrumbs {
  padding-block: 22px 0;
  font-family: var(--font-mono);
  font-size: .6875rem;
  letter-spacing: .12em;
  color: var(--muted);
}
.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}
.breadcrumb-list li { display: flex; align-items: center; }
.breadcrumb-list li + li::before {
  content: "/";
  margin-inline: 10px;
  color: var(--line);
}
.breadcrumb-list a {
  color: var(--muted);
  text-decoration: none;
}
.breadcrumb-list a:hover { color: var(--blue); }

/* ---------- 跳转链接 ---------- */
.skip-link {
  position: absolute;
  left: 16px;
  top: 0;
  z-index: 300;
  transform: translateY(-160%);
  background: var(--ink);
  color: var(--paper);
  padding: .7em 1.2em;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-size: .875rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-decoration: none;
  transition: transform 160ms var(--ease);
}
.skip-link:focus {
  transform: translateY(0);
  color: var(--paper);
}

/* =========================================================
   头部 · 紧凑命令栏
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(246, 239, 227, .93);
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink);
  -webkit-backdrop-filter: blur(10px) saturate(1.1);
  backdrop-filter: blur(10px) saturate(1.1);
  transition:
    background-color 200ms var(--ease),
    box-shadow 200ms var(--ease),
    border-color 200ms var(--ease);
}
.site-header[data-scrolled] {
  background: rgba(255, 253, 248, .97);
  border-bottom-color: var(--line);
  box-shadow: 0 12px 28px -24px rgba(14, 34, 51, .6);
}

.header-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, var(--blue) 0%, var(--sky) 55%, var(--coral) 100%);
  transform: scaleX(0);
  transform-origin: left center;
  pointer-events: none;
}

.header-inner {
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 34px);
  transition: min-height var(--dur) var(--ease);
}
.site-header[data-scrolled] .header-inner { min-height: var(--header-h-slim); }

/* 品牌 + 期号 */
.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
}
.brand-mark {
  display: inline-flex;
  align-items: baseline;
  gap: 9px;
  text-decoration: none;
  color: var(--ink);
  padding: 4px 2px;
  border-radius: var(--radius-sm);
}
.brand-mark:hover { color: var(--ink); }
.brand-mark__zh {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: .1em;
  line-height: 1;
}
.brand-mark__en {
  font-family: var(--font-mono);
  font-size: .625rem;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1;
}

.issue-pill {
  display: inline-flex;
  align-items: center;
  padding: .34em .78em;
  border-radius: var(--radius-pill);
  background: var(--coral);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .06em;
  line-height: 1.45;
  white-space: nowrap;
}

/* 导航 */
.site-nav { margin-inline: auto; }
.site-nav__list {
  display: flex;
  align-items: center;
  gap: clamp(2px, 1vw, 16px);
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav__item { display: block; }
.site-nav__link {
  position: relative;
  display: inline-block;
  padding: .55em .58em;
  border-radius: var(--radius-sm);
  font-size: .9375rem;
  font-weight: 500;
  letter-spacing: .02em;
  line-height: 1.5;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--dur) var(--ease);
}
.site-nav__link::after {
  content: "";
  position: absolute;
  left: .58em;
  right: .58em;
  bottom: .1em;
  height: 3px;
  border-radius: 2px;
  background: var(--sky);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 180ms var(--ease), background-color 180ms var(--ease);
}
.site-nav__link:hover { color: var(--blue); }
.site-nav__link:hover::after { transform: scaleX(1); }
.site-nav__link[aria-current="page"] {
  color: var(--blue);
  font-weight: 700;
}
.site-nav__link[aria-current="page"]::after {
  transform: scaleX(1);
  background: var(--coral);
}
.site-nav__link:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

/* 右侧工具 */
.header-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}
.search-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: transparent;
  color: var(--ink);
  transition:
    border-color var(--dur) var(--ease),
    background-color var(--dur) var(--ease),
    color var(--dur) var(--ease);
}
.search-link:hover {
  border-color: var(--blue);
  background: rgba(127, 196, 223, .18);
  color: var(--blue);
}
.search-link svg { width: 17px; height: 17px; }

.header-cta { padding-inline: 1.15em; }

/* 汉堡按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: .52em .9em;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--line);
  background: transparent;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .08em;
  line-height: 1.2;
  cursor: pointer;
  transition:
    border-color var(--dur) var(--ease),
    background-color var(--dur) var(--ease),
    color var(--dur) var(--ease);
}
.nav-toggle:hover {
  border-color: var(--blue);
  color: var(--blue);
}
.nav-toggle__bars {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 16px;
  height: 10px;
  flex: none;
}
.nav-toggle__bars span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 180ms var(--ease), opacity 180ms var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) {
  transform: translateY(3px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(2) {
  transform: translateY(-3px) rotate(-45deg);
}

/* =========================================================
   页脚 · 暖沙细线账簿
   ========================================================= */
.site-footer {
  margin-top: var(--section-gap);
  background: var(--sand);
  color: var(--ink);
  border-top: 1px solid var(--line);
  font-size: .9375rem;
  line-height: 1.75;
}

.footer-shell {
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.footer-ledger {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 20px;
  padding-block: 20px 18px;
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: .6875rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}
.footer-ledger__mark { color: var(--ink); font-weight: 600; }
.footer-ledger__coord { color: var(--muted); }
.footer-ledger__issue {
  color: var(--coral);
  font-weight: 700;
  letter-spacing: .1em;
}

.footer-cols {
  display: grid;
  grid-template-columns: 1.15fr .9fr 1.55fr .8fr;
  gap: clamp(22px, 3.4vw, 46px);
  padding-block: clamp(30px, 4vw, 48px);
}
.footer-col {
  min-width: 0;
  border-left: 1px solid var(--line-soft);
  padding-left: clamp(16px, 2vw, 26px);
}
.footer-col:first-child {
  border-left: 0;
  padding-left: 0;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: .1em;
  line-height: 1.3;
  margin: 0 0 10px;
  color: var(--ink);
}
.footer-tagline {
  margin: 0;
  max-width: 15em;
  font-size: .875rem;
  line-height: 1.8;
  color: var(--muted);
}

.footer-col__title {
  font-family: var(--font-mono);
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 16px;
}

.footer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 9px;
}
.footer-list a {
  position: relative;
  display: inline-block;
  color: var(--ink);
  text-decoration: none;
  font-size: .9375rem;
  transition: color var(--dur) var(--ease);
}
.footer-list a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 1px;
  height: 1px;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 200ms var(--ease);
}
.footer-list a:hover { color: var(--blue); }
.footer-list a:hover::after {
  transform: scaleX(1);
  transform-origin: left center;
}

.footer-list--contact { gap: 12px; }
.footer-list--contact li {
  display: grid;
  gap: 1px;
}
.footer-k {
  font-family: var(--font-mono);
  font-size: .625rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.6;
}
.footer-v {
  font-size: .875rem;
  line-height: 1.65;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.footer-bottom {
  border-top: 1px solid var(--line-soft);
  padding-block: 18px 26px;
  text-align: center;
}
.footer-bottom p {
  margin: 0;
  font-family: var(--font-mono);
  font-size: .6875rem;
  letter-spacing: .08em;
  line-height: 1.9;
  color: var(--muted);
}

/* ---------- 一次性显现 ---------- */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 420ms var(--ease), transform 420ms var(--ease);
  will-change: opacity, transform;
}
html.js [data-reveal].is-revealed {
  opacity: 1;
  transform: none;
  will-change: auto;
}

/* =========================================================
   响应式
   ========================================================= */
@media (max-width: 1023px) {
  .nav-toggle { display: inline-flex; }

  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    margin: 0;
    padding: 10px var(--gutter) 22px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 26px 42px -34px rgba(14, 34, 51, .75);
    display: none;
    max-height: calc(100vh - var(--header-h));
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .site-nav[data-open] {
    display: block;
    animation: nav-drop 180ms var(--ease);
  }
  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .site-nav__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .9em .7em;
    font-size: 1rem;
    border-bottom: 1px solid var(--line-soft);
    border-radius: 0;
  }
  .site-nav__item:last-child .site-nav__link { border-bottom: 0; }
  .site-nav__link::after { display: none; }
  .site-nav__link[aria-current="page"] {
    background: rgba(127, 196, 223, .2);
    border-radius: var(--radius-sm);
    border-bottom-color: transparent;
  }

  .footer-cols { grid-template-columns: 1fr 1fr; gap: 30px clamp(20px, 4vw, 40px); }
  .footer-col {
    border-left: 0;
    padding-left: 0;
    padding-top: 0;
  }
  .footer-tagline { max-width: 22em; }

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

@media (max-width: 860px) {
  .header-cta { display: none; }
  .brand-mark__en { display: none; }
  .footer-cols { grid-template-columns: 1fr; }
  .footer-col {
    border-left: 0;
    padding-left: 0;
    border-top: 1px solid var(--line-soft);
    padding-top: 22px;
  }
  .footer-col:first-child { border-top: 0; padding-top: 0; }
}

@media (max-width: 600px) {
  .grid--12 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-header { -webkit-backdrop-filter: none; backdrop-filter: none; }
  .site-header,
  .site-header[data-scrolled] { background: var(--paper); }
}

@media (max-width: 480px) {
  :root { --header-h: 64px; --header-h-slim: 56px; }
  .nav-toggle { padding: .5em .62em; }
  .nav-toggle__label { display: none; }
  .brand-mark__zh { font-size: 1.25rem; letter-spacing: .06em; }
  .issue-pill { font-size: .625rem; letter-spacing: .02em; padding: .3em .6em; }
  .header-inner { gap: 10px; }
  .search-link { width: 34px; height: 34px; }
  .footer-ledger { font-size: .625rem; letter-spacing: .1em; }
}

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

/* ---------- 无障碍：减少动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  html.js [data-reveal] {
    opacity: 1;
    transform: none;
  }
  .header-progress { transition: none; }
}
