/* ============================================================
   凯时平台 · 共享样式表 /assets/site.css
   深海蓝纸面叠层 + 珊瑚橙单点强调
   ============================================================ */

/* ---------- 1. 变量 ---------- */
:root {
  --navy: #0B2A4A;
  --navy-deep: #071B31;
  --navy-mid: #14456F;
  --foam: #2E7F8F;
  --coral: #FF6B4A;
  --coral-deep: #C4441F;
  --gold: #C9A24B;
  --pearl: #F7F4EF;
  --ink: #10233A;
  --slate: #5C7285;
  --paper: #EAE5DC;

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

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --radius: 18px;
  --hairline: rgba(201, 162, 75, 0.42);
  --container: 1280px;
}

/* ---------- 2. Reset 与基础 ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

html.nav-locked,
html.nav-locked body { overflow: hidden; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.85;
  color: var(--ink);
  background-color: var(--pearl);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--font-head);
  line-height: 1.2;
  color: inherit;
}

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

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

a { color: inherit; }

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

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

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

/* ---------- 3. 排版 ---------- */
.mono {
  font-family: var(--font-mono);
  font-size: 0.875em;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

.meta-line {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--slate);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--slate);
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--gold);
  flex: 0 0 auto;
}

.section--dark .eyebrow,
.section--deep .eyebrow { color: var(--gold); }

.divider {
  height: 1px;
  border: 0;
  margin: clamp(32px, 5vw, 64px) 0;
  background: linear-gradient(90deg, var(--gold), rgba(201, 162, 75, 0));
}

/* ---------- 4. 布局容器 ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(18px, 4vw, 48px);
}

.container--narrow { max-width: 900px; }

.section { padding-block: clamp(56px, 9vw, 116px); }

.section--dark { background: var(--navy); color: var(--pearl); }
.section--deep { background: var(--navy-deep); color: var(--pearl); }
.section--paper { background: var(--paper); color: var(--ink); }
.section--bright { background: var(--pearl); color: var(--ink); }

.section--dark .section-head__lead,
.section--deep .section-head__lead { color: rgba(247, 244, 239, 0.76); }

.section-head {
  max-width: 62ch;
  margin-bottom: clamp(28px, 4vw, 48px);
}

.section-head__title {
  font-size: clamp(1.6rem, 3.2vw, 2.6rem);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.section-head__lead {
  margin-top: 14px;
  margin-bottom: 0;
  font-size: 1.0625rem;
  color: var(--slate);
}

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

.col-1 { grid-column: span 1; }
.col-2 { grid-column: span 2; }
.col-3 { grid-column: span 3; }
.col-4 { grid-column: span 4; }
.col-5 { grid-column: span 5; }
.col-6 { grid-column: span 6; }
.col-7 { grid-column: span 7; }
.col-8 { grid-column: span 8; }
.col-9 { grid-column: span 9; }
.col-10 { grid-column: span 10; }
.col-11 { grid-column: span 11; }
.col-12 { grid-column: span 12; }

@media (max-width: 900px) {
  .grid-12 > [class^="col-"] { grid-column: 1 / -1; }
}

/* ---------- 5. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0 1.35rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--font-head);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.16s var(--ease),
              color 0.16s var(--ease),
              border-color 0.16s var(--ease),
              transform 0.16s var(--ease);
}

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

.btn--primary {
  background: var(--coral-deep);
  color: var(--pearl);
  border-color: var(--coral-deep);
}

.btn--primary:hover {
  background: var(--coral);
  border-color: var(--coral);
  color: var(--ink);
}

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

.btn--ghost:hover {
  border-color: var(--coral);
  color: var(--coral);
}

.btn--quiet {
  background: transparent;
  color: var(--navy);
  border-color: rgba(20, 69, 111, 0.3);
}

.btn--quiet:hover {
  border-color: var(--coral-deep);
  color: var(--coral-deep);
}

/* ---------- 6. 标签 / 面包屑 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(20, 69, 111, 0.25);
  background: rgba(234, 229, 220, 0.6);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--navy);
}

.tag--foam {
  border-color: rgba(46, 127, 143, 0.5);
  background: rgba(46, 127, 143, 0.12);
  color: #1F5A66;
}

.tag--gold {
  border-color: rgba(201, 162, 75, 0.65);
  background: rgba(201, 162, 75, 0.14);
  color: #7A5E1E;
}

.breadcrumbs {
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
}

.breadcrumbs__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumbs__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--slate);
}

.breadcrumbs__item:not(:last-child)::after {
  content: "／";
  color: rgba(92, 114, 133, 0.6);
}

.breadcrumbs__link {
  text-decoration: none;
  color: var(--slate);
  transition: color 0.16s var(--ease);
}

.breadcrumbs__link:hover { color: var(--coral-deep); }

/* ---------- 7. 纸面卡片与角标 ---------- */
.paper-card {
  position: relative;
  background: var(--pearl);
  border: 1px solid rgba(20, 69, 111, 0.16);
  border-radius: var(--radius);
  padding: clamp(20px, 2.6vw, 32px);
  box-shadow: 0 20px 44px -38px rgba(7, 27, 49, 0.65);
}

.section--paper .paper-card,
.section--bright .paper-card { background: #FFFFFF; }

.paper-card--offset {
  box-shadow: 0 1px 0 rgba(16, 35, 58, 0.05),
              0 30px 50px -42px rgba(7, 27, 49, 0.7);
}

.paper-card--offset::after {
  content: "";
  position: absolute;
  right: -8px;
  bottom: -8px;
  width: 54px;
  height: 54px;
  border-right: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
  border-radius: 0 0 var(--radius) 0;
  opacity: 0.85;
  pointer-events: none;
}

.corner-tag {
  position: absolute;
  top: -14px;
  left: clamp(20px, 2.6vw, 32px);
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--navy);
  color: var(--pearl);
  border: 1px solid var(--hairline);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  line-height: 1.4;
}

/* ---------- 8. 图片容器 ---------- */
.media-frame {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid rgba(20, 69, 111, 0.18);
  background:
    linear-gradient(135deg, var(--navy-mid) 0%, var(--navy) 58%, var(--navy-deep) 100%);
  aspect-ratio: 16 / 10;
}

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

.media-frame__ph {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  color: rgba(247, 244, 239, 0.55);
}

.media-frame__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 16px 18px 14px;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: rgba(247, 244, 239, 0.88);
  background: linear-gradient(0deg, rgba(7, 27, 49, 0.88), rgba(7, 27, 49, 0));
}

.media-frame--arc {
  border-radius: 46% 46% 20px 20px / 26% 26% 5% 5%;
}

.media-frame--tilt {
  clip-path: polygon(0 3%, 100% 0, 100% 97%, 0 100%);
  border-radius: 14px;
}

/* ---------- 9. 标签页 ---------- */
.tabs { margin-top: clamp(20px, 3vw, 32px); }

.tabs__list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  border-bottom: 1px solid rgba(20, 69, 111, 0.2);
}

.tab {
  appearance: none;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  padding: 12px 16px;
  min-height: 44px;
  font-family: var(--font-head);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--slate);
  cursor: pointer;
  transition: color 0.16s var(--ease), border-color 0.16s var(--ease);
}

.tab:hover { color: var(--navy); }

.tab[aria-selected="true"] {
  color: var(--navy);
  border-bottom-color: var(--coral);
}

.tab-panel { padding-top: clamp(20px, 3vw, 32px); }
.tab-panel[hidden] { display: none; }

.tabs--on-dark .tabs__list { border-bottom-color: rgba(201, 162, 75, 0.3); }
.tabs--on-dark .tab { color: rgba(247, 244, 239, 0.62); }
.tabs--on-dark .tab:hover { color: var(--pearl); }
.tabs--on-dark .tab[aria-selected="true"] {
  color: var(--pearl);
  border-bottom-color: var(--coral);
}

/* ---------- 10. 跳过链接 ---------- */
.skip-link {
  position: fixed;
  top: -120px;
  left: 16px;
  z-index: 200;
  padding: 12px 22px;
  border-radius: 0 0 14px 14px;
  background: var(--pearl);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 12px 28px -18px rgba(7, 27, 49, 0.8);
  transition: top 0.18s var(--ease);
}

.skip-link:focus { top: 0; }

/* ---------- 11. 顶栏 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: var(--navy);
  color: var(--pearl);
  border-bottom: 1px solid var(--hairline);
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(112deg, rgba(20, 69, 111, 0.95) 0%, rgba(11, 42, 74, 0) 58%);
  pointer-events: none;
}

.site-header__inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(18px, 4vw, 48px);
  min-height: 88px;
  transition: min-height 0.24s var(--ease);
}

.scroll-progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 2px;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--gold), var(--coral));
  pointer-events: none;
}

.site-header__brand {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  text-decoration: none;
  color: var(--pearl);
}

.brand-mark {
  position: relative;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 12px 12px 12px 3px;
  border: 1px solid var(--gold);
  background: linear-gradient(140deg, var(--navy-mid), var(--navy-deep));
  overflow: hidden;
}

.brand-mark::before {
  content: "";
  position: absolute;
  inset: 8px -4px -4px 8px;
  background: var(--coral);
  border-radius: 50% 50% 6px 6px;
  opacity: 0.92;
}

.brand-mark::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  top: 50%;
  height: 1px;
  background: rgba(247, 244, 239, 0.75);
}

.brand-text { display: block; }

.brand-name {
  display: block;
  font-family: var(--font-head);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  color: var(--pearl);
}

.brand-tagline {
  display: block;
  margin-top: 4px;
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  line-height: 1.3;
  color: rgba(247, 244, 239, 0.6);
}

.site-nav {
  position: relative;
  margin-left: auto;
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.8vw, 26px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav__item { display: block; }

.site-nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 2px;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: rgba(247, 244, 239, 0.82);
  text-decoration: none;
  transition: color 0.16s var(--ease);
}

.site-nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 9px;
  height: 2px;
  background: var(--coral);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.2s var(--ease);
}

.site-nav__link:hover { color: var(--pearl); }
.site-nav__link:hover::after { transform: scaleX(1); }

.site-nav__link[aria-current="page"] {
  color: var(--pearl);
  font-weight: 600;
}

.site-nav__link[aria-current="page"]::after {
  transform: scaleX(1);
  background: var(--coral);
}

.site-header__actions {
  position: relative;
  z-index: 96;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: clamp(12px, 2vw, 28px);
  flex: 0 0 auto;
}

.site-header__cta {
  background: var(--coral-deep);
  border-color: rgba(201, 162, 75, 0.55);
  color: var(--pearl);
}

.site-header__cta:hover {
  background: var(--coral);
  border-color: var(--coral);
  color: var(--ink);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  min-width: 44px;
  padding: 0 14px;
  background: var(--navy);
  border: 1px solid rgba(201, 162, 75, 0.55);
  border-radius: 999px;
  color: var(--pearl);
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: border-color 0.16s var(--ease), color 0.16s var(--ease);
}

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

.nav-toggle__bars {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: transform 0.2s var(--ease);
}

.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }

.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

.nav-toggle__label { display: inline; }

.site-header.is-condensed .site-header__inner { min-height: 64px; }
.site-header.is-condensed .brand-tagline { display: none; }

/* ---------- 12. 页脚 ---------- */
.site-footer {
  position: relative;
  background: var(--navy-deep);
  color: rgba(247, 244, 239, 0.78);
}

.footer-trim {
  position: relative;
  height: 28px;
  background: var(--navy-deep);
}

.footer-trim::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(201, 162, 75, 0), var(--gold) 14%, var(--gold) 86%, rgba(201, 162, 75, 0));
}

.footer-trim span {
  position: absolute;
  bottom: 0;
  height: 9px;
  border-radius: 6px 6px 0 0;
  background: rgba(20, 69, 111, 0.7);
}

.footer-trim span:nth-child(1) { left: 10%; width: 18%; }
.footer-trim span:nth-child(2) { left: 34%; width: 28%; background: rgba(46, 127, 143, 0.45); }
.footer-trim span:nth-child(3) { left: 68%; width: 22%; background: rgba(20, 69, 111, 0.52); }

.site-footer__inner {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding: clamp(40px, 6vw, 72px) clamp(18px, 4vw, 48px) 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr 1fr 1.6fr;
  gap: clamp(22px, 3vw, 48px);
}

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

.footer-col__title {
  margin: 0 0 14px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--gold);
}

.footer-brand { margin-bottom: 14px; }

.footer-brand__name {
  display: block;
  margin-bottom: 8px;
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--pearl);
}

.footer-brand__desc {
  margin: 0;
  max-width: 26ch;
  font-size: 0.9375rem;
  line-height: 1.75;
  color: rgba(247, 244, 239, 0.72);
}

.footer-stamp {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--gold);
}

.footer-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-list__link {
  font-size: 0.9375rem;
  color: rgba(247, 244, 239, 0.8);
  text-decoration: none;
  transition: color 0.16s var(--ease);
}

.footer-list__link:hover { color: var(--coral); }

.footer-contact {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: rgba(247, 244, 239, 0.8);
  word-break: break-word;
}

.footer-contact__label {
  display: block;
  margin-bottom: 2px;
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  color: rgba(201, 162, 75, 0.9);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  margin-top: clamp(32px, 5vw, 56px);
  padding-top: 20px;
  border-top: 1px solid rgba(201, 162, 75, 0.22);
  font-size: 0.8125rem;
  color: rgba(247, 244, 239, 0.6);
}

.footer-legal__icp { letter-spacing: 0.04em; }
.footer-legal__note { letter-spacing: 0.02em; }

/* ---------- 13. 动效 ---------- */
html.reveal-on [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.34s var(--ease), transform 0.34s var(--ease);
  will-change: opacity, transform;
}

html.reveal-on [data-reveal].is-visible {
  opacity: 1;
  transform: none;
  will-change: auto;
}

/* ---------- 14. 响应式 ---------- */
@media (max-width: 1080px) {
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

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

  .site-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    z-index: 95;
    width: min(84vw, 340px);
    padding: 104px clamp(20px, 6vw, 32px) 40px;
    background: var(--navy-deep);
    border-left: 1px solid rgba(201, 162, 75, 0.35);
    overflow-y: auto;
    transform: translateX(102%);
    visibility: hidden;
    transition: transform 0.28s var(--ease), visibility 0.28s var(--ease);
  }

  .site-nav[data-open] {
    transform: translateX(0);
    visibility: visible;
  }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .site-nav__link {
    min-height: 52px;
    padding: 0 4px;
    font-size: 1.0625rem;
    border-bottom: 1px solid rgba(201, 162, 75, 0.16);
  }

  .site-nav__link::after { bottom: 0; }
}

@media (max-width: 640px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-col--brand { grid-column: 1 / -1; }
  .footer-brand__desc { max-width: none; }
}

@media (max-width: 520px) {
  .brand-tagline { display: none; }
  .brand-name { font-size: 1rem; }
  .brand-mark { width: 32px; height: 32px; }
  .site-header__inner { gap: 10px; min-height: 72px; }
  .site-header.is-condensed .site-header__inner { min-height: 60px; }
  .site-header__cta { min-height: 40px; padding: 0 12px; font-size: 0.8125rem; }
  .nav-toggle { padding: 0 10px; }
  .footer-trim { height: 22px; }
}

@media (max-width: 420px) {
  .footer-grid { grid-template-columns: 1fr; }
  .nav-toggle__label { display: none; }
}

/* ---------- 15. 无障碍偏好 ---------- */
@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;
  }

  html.reveal-on [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .site-nav { transition: visibility 0.001ms linear; }
}
