/* ============================================================
   /assets/site.css — 皇冠主页 共享样式
   1. Reset  2. 变量  3. 基础与中文排版  4. 通用组件
   5. 头部  6. 页脚  7. 响应式  8. 动效与可访问性
   ============================================================ */

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

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

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

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

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
svg { display: block; }
img, picture, video { max-width: 100%; height: auto; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; }

/* ---------- 2. 变量 ---------- */
:root {
  /* 品牌色 */
  --blue-royal: #0E1B3D;
  --blue-mid:   #1B2C55;
  --blue-mist:  #3C4E7A;
  --gold:       #C8A45C;
  --gold-light: #EBDCB4;
  --cream:      #F7F1E4;
  --paper:      #FBF7EE;
  --green:      #14352B;
  --brick:      #B4472E;
  --ink:        #2A2E35;
  --muted:      #6E6A63;

  /* 派生 */
  --line:        rgba(60, 78, 122, .26);
  --line-soft:   rgba(60, 78, 122, .16);
  --line-gold:   rgba(200, 164, 92, .34);
  --on-dark:     rgba(247, 241, 228, .82);
  --on-dark-dim: rgba(247, 241, 228, .56);

  /* 字体 */
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", STSong, "Times New Roman", Georgia, serif;
  --sans: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", Menlo, monospace;

  /* 尺度 */
  --wrap: 1200px;
  --gutter: 24px;
  --header-h: 80px;
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-pill: 999px;

  --ease: cubic-bezier(.22, .61, .36, 1);
  --dur: 200ms;
}

/* ---------- 3. 基础与中文排版 ---------- */
html { scroll-behavior: smooth; }

body {
  padding-top: var(--header-h);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink);
  background-color: var(--cream);
  background-image:
    radial-gradient(90% 60% at 50% -10%, rgba(200, 164, 92, .07), transparent 62%),
    radial-gradient(60% 40% at 100% 100%, rgba(60, 78, 122, .06), transparent 60%);
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -.01em;
  color: var(--blue-royal);
  text-wrap: balance;
}

h1 { font-size: clamp(34px, 5.2vw, 56px); line-height: 1.18; }
h2 { font-size: clamp(27px, 3.4vw, 34px); }
h3 { font-size: clamp(20px, 2.2vw, 22px); line-height: 1.42; }
h4 { font-size: 18px; line-height: 1.5; }

p, li { text-wrap: pretty; }

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

strong, b { font-weight: 600; color: var(--blue-royal); }

small, .text-small { font-size: 13px; letter-spacing: .02em; }

hr {
  border: 0;
  height: 1px;
  background: var(--line-soft);
  margin: 32px 0;
}

blockquote {
  margin: 32px 0;
  padding: 4px 0 4px 22px;
  border-left: 2px solid var(--gold);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.8;
  color: var(--blue-mid);
}

::selection { background: rgba(200, 164, 92, .32); color: var(--blue-royal); }

/* ---------- 4. 通用组件 ---------- */
.wrap {
  width: min(var(--wrap), calc(100% - 2 * var(--gutter)));
  margin-inline: auto;
}

.section { padding-block: clamp(48px, 7vw, 96px); }
.section--tight { padding-block: clamp(28px, 4vw, 56px); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .22em;
  color: var(--gold);
  text-transform: none;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
  flex: none;
}

.section-title { font-family: var(--serif); color: var(--blue-royal); }

.lede {
  font-size: 18px;
  line-height: 1.85;
  color: #3B3F47;
  max-width: 66ch;
}

.panel {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  padding: clamp(24px, 4vw, 40px);
  box-shadow:
    0 1px 0 rgba(200, 164, 92, .25),
    0 18px 40px -34px rgba(14, 27, 61, .55);
}
.panel--dark {
  background: linear-gradient(158deg, var(--blue-mid) 0%, var(--blue-royal) 72%);
  border-color: var(--line-gold);
  color: var(--on-dark);
}
.panel--dark h1,
.panel--dark h2,
.panel--dark h3,
.panel--dark h4 { color: var(--gold-light); }
.panel--dark .lede { color: var(--on-dark); }
.panel--accent {
  background: linear-gradient(160deg, #17392E 0%, var(--green) 100%);
  border-color: rgba(200, 164, 92, .22);
  color: rgba(247, 241, 228, .86);
}
.panel--accent h2,
.panel--accent h3 { color: var(--gold-light); }

.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  padding: .72em 1.5em;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .03em;
  line-height: 1.4;
  white-space: nowrap;
  transition: background-color var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              color var(--dur) var(--ease),
              transform var(--dur) var(--ease);
}
.btn--gold {
  background: var(--gold);
  color: #16110A;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .38);
}
.btn--gold:hover { background: var(--gold-light); transform: translateY(-1px); }
.btn--ghost {
  border-color: var(--line-gold);
  color: var(--gold-light);
  background: transparent;
}
.btn--ghost:hover { border-color: var(--gold); background: rgba(200, 164, 92, .12); }
.btn--dark {
  background: var(--blue-royal);
  color: var(--gold-light);
}
.btn--dark:hover { background: var(--blue-mid); }

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  font-size: 13px;
  letter-spacing: .06em;
  color: var(--muted);
}
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.breadcrumb li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.breadcrumb li::after {
  content: "/";
  color: rgba(110, 106, 99, .5);
}
.breadcrumb li:last-child::after { content: ""; }
.breadcrumb a { transition: color var(--dur) var(--ease); }
.breadcrumb a:hover { color: var(--brick); }

.text-link {
  color: #993A22;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(153, 58, 34, .38);
  transition: color var(--dur) var(--ease), text-decoration-color var(--dur) var(--ease);
}
.text-link:hover { color: var(--brick); text-decoration-color: var(--brick); }

.num {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  letter-spacing: .08em;
  line-height: 1.6;
  background: var(--gold-light);
  color: #4A3A12;
  white-space: nowrap;
}
.tag--green { background: rgba(20, 53, 43, .1); color: var(--green); }
.tag--brick { background: rgba(180, 71, 46, .12); color: var(--brick); }

.callout {
  border-left: 2px solid var(--gold);
  padding: 14px 0 14px 20px;
  font-size: 15.5px;
  line-height: 1.8;
  color: var(--muted);
}
.callout--green { border-left-color: var(--green); }

/* 响应式图片容器 */
.media {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid var(--line-gold);
  background: linear-gradient(155deg, var(--blue-mid) 0%, var(--blue-royal) 100%);
}
.media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(130% 80% at 50% -10%, rgba(200, 164, 92, .18), transparent 62%);
  pointer-events: none;
}
.media > img,
.media > svg,
.media > picture > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media--16x9 { aspect-ratio: 16 / 9; }
.media--4x3 { aspect-ratio: 4 / 3; }
.media--square { aspect-ratio: 1 / 1; }
.media--portrait { aspect-ratio: 3 / 4; }
.media__caption {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 14px 18px;
  font-size: 13px;
  letter-spacing: .04em;
  color: rgba(235, 220, 180, .88);
  background: linear-gradient(0deg, rgba(14, 27, 61, .94) 0%, rgba(14, 27, 61, 0) 100%);
}

/* ---------- 5. 头部 ---------- */
.skip-link {
  position: absolute;
  left: 24px;
  top: 10px;
  z-index: 200;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  background: var(--gold);
  color: #16110A;
  font-size: 14px;
  letter-spacing: .04em;
  transform: translateY(-220%);
  transition: transform 160ms var(--ease);
}
.skip-link:focus-visible { transform: translateY(0); outline-offset: 2px; }

.rh-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 80;
  padding: 16px 0;
  color: var(--gold-light);
  background: linear-gradient(180deg, rgba(14, 27, 61, .97) 0%, rgba(14, 27, 61, .89) 100%);
  border-bottom: 1px solid var(--line-gold);
  -webkit-backdrop-filter: saturate(120%) blur(14px);
  backdrop-filter: saturate(120%) blur(14px);
  transition: padding var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.rh-header.is-compact {
  padding: 9px 0;
  background: rgba(14, 27, 61, .98);
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
}

/* 品牌 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  color: var(--gold-light);
  transition: opacity var(--dur) var(--ease);
}
.brand:hover { opacity: .86; }
.brand__mark {
  width: 27px;
  height: 27px;
  flex: none;
  color: var(--gold);
  transition: width var(--dur) var(--ease), height var(--dur) var(--ease);
}
.brand__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.16;
}
.brand__name {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--gold-light);
  transition: font-size var(--dur) var(--ease);
}
.brand__tag {
  margin-top: 3px;
  font-size: 11px;
  letter-spacing: .1em;
  color: rgba(235, 220, 180, .58);
  white-space: nowrap;
}
.brand--footer .brand__mark { width: 30px; height: 30px; }
.brand--footer .brand__name { font-size: 21px; letter-spacing: .1em; }

/* 悬浮胶囊导航 */
.nav-pill {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
  padding: 5px;
  border-radius: var(--radius-pill);
  background: rgba(27, 44, 85, .92);
  border: 1px solid rgba(60, 78, 122, .9);
  box-shadow:
    inset 0 1px 0 rgba(200, 164, 92, .24),
    0 2px 12px rgba(6, 12, 28, .38);
}
.nav-link {
  position: relative;
  display: inline-block;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  letter-spacing: .08em;
  color: rgba(235, 220, 180, .8);
  white-space: nowrap;
  transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.nav-link:hover {
  color: var(--gold-light);
  background: rgba(200, 164, 92, .13);
}
.nav-link[aria-current="page"] {
  color: #14110A;
  background: var(--gold);
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .32);
}

/* 常驻入口 */
.header-utility {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
.utility-link {
  padding: 7px 15px;
  border: 1px solid var(--line-gold);
  border-radius: var(--radius-pill);
  font-size: 13px;
  letter-spacing: .1em;
  color: var(--gold-light);
  transition: background-color var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              color var(--dur) var(--ease);
}
.utility-link:hover {
  background: rgba(200, 164, 92, .14);
  border-color: var(--gold);
}
.utility-link--solid {
  background: var(--gold);
  border-color: var(--gold);
  color: #16110A;
  font-weight: 500;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .34);
}
.utility-link--solid:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
  color: #16110A;
}

/* 移动导航按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--line-gold);
  border-radius: var(--radius-pill);
  font-size: 13px;
  letter-spacing: .1em;
  color: var(--gold-light);
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.nav-toggle:hover {
  background: rgba(200, 164, 92, .14);
  border-color: var(--gold);
}
.nav-toggle__bars {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  width: 15px;
  height: 12px;
}
.nav-toggle__bars span {
  display: block;
  height: 1.5px;
  border-radius: 2px;
  background: currentColor;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) { transform: translateY(4.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(3) { transform: translateY(-4.5px) rotate(-45deg); }
.nav-toggle__label { line-height: 1; }

/* 阅读进度 */
.progress-rail {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: rgba(60, 78, 122, .38);
  overflow: hidden;
}
.progress-bar {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-light) 100%);
  transition: width 90ms linear;
}

/* ---------- 6. 页脚 ---------- */
.rh-footer {
  position: relative;
  margin-top: clamp(48px, 8vw, 96px);
  padding: clamp(48px, 6vw, 76px) 0 40px;
  color: var(--on-dark);
  background: linear-gradient(180deg, #12203F 0%, var(--blue-royal) 46%, #0A1330 100%);
  border-top: 1px solid var(--line-gold);
}
.rh-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: .55;
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(0, 2.6fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}

.footer-brand { min-width: 0; }
.footer-motto {
  margin-top: 18px;
  font-family: var(--serif);
  font-size: 19px;
  letter-spacing: .08em;
  line-height: 1.6;
  color: rgba(235, 220, 180, .72);
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.footer-col__title {
  margin-bottom: 14px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .2em;
  color: var(--gold);
}
.footer-col li + li { margin-top: 2px; }
.footer-col a {
  display: inline-block;
  padding: 5px 0;
  font-size: 15px;
  color: rgba(247, 241, 228, .76);
  transition: color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.footer-col a:hover {
  color: var(--gold-light);
  transform: translateX(2px);
}

.footer-contact {
  margin-top: clamp(32px, 4vw, 48px);
  padding-top: 26px;
  border-top: 1px solid rgba(60, 78, 122, .55);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px 28px;
}
.footer-contact__item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 14px;
  line-height: 1.7;
  color: rgba(247, 241, 228, .74);
  word-break: break-word;
}
.footer-contact__label {
  flex: none;
  font-size: 11px;
  letter-spacing: .16em;
  color: var(--gold);
}
.footer-contact__item > span:last-child { white-space: normal; }

.footer-note {
  margin-top: 20px;
  max-width: 84ch;
  font-size: 13px;
  line-height: 1.85;
  letter-spacing: .01em;
  color: var(--on-dark-dim);
}

.footer-ref {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  padding: 9px 20px;
  border: 1px solid rgba(200, 164, 92, .3);
  border-radius: var(--radius-pill);
  background: rgba(200, 164, 92, .06);
  font-size: 13px;
  letter-spacing: .06em;
}
.footer-ref a {
  color: var(--gold-light);
  transition: color var(--dur) var(--ease);
}
.footer-ref a:hover { color: #FFFFFF; }
.footer-ref__dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--brick);
  flex: none;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid rgba(60, 78, 122, .5);
  font-size: 12.5px;
  letter-spacing: .04em;
  color: rgba(247, 241, 228, .5);
}
.footer-legal__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.footer-legal__links a { transition: color var(--dur) var(--ease); }
.footer-legal__links a:hover { color: var(--gold-light); }

/* ---------- 7. 响应式 ---------- */
@media (max-width: 1080px) {
  .brand__tag { display: none; }
  .nav-link { padding: 8px 11px; font-size: 13px; letter-spacing: .05em; }
  .utility-link { padding: 7px 12px; font-size: 12.5px; letter-spacing: .06em; }
}

@media (max-width: 960px) {
  :root { --header-h: 68px; }

  .rh-header { padding: 12px 0; }
  .rh-header.is-compact { padding: 10px 0; }

  .header-inner { gap: 10px; }

  .header-utility { margin-left: auto; }

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

  .nav-pill {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 12px);
    margin-left: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px;
    border-radius: 18px;
    background: rgba(14, 27, 61, .99);
    border: 1px solid rgba(200, 164, 92, .34);
    box-shadow: 0 26px 54px rgba(6, 12, 28, .58);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity var(--dur) var(--ease),
                transform var(--dur) var(--ease),
                visibility var(--dur) linear;
  }
  .nav-pill[data-open] {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  .nav-link {
    display: block;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 15px;
    letter-spacing: .06em;
    color: var(--gold-light);
  }
  .nav-link[aria-current="page"] {
    color: var(--gold-light);
    background: rgba(200, 164, 92, .18);
    box-shadow: inset 0 0 0 1px rgba(200, 164, 92, .55);
  }

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

  .grid--3 { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  :root { --gutter: 20px; }
  .grid--2 { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .footer-legal { justify-content: flex-start; }
}

@media (max-width: 600px) {
  :root { --gutter: 16px; }

  body { font-size: 16px; }
  .brand__mark { width: 23px; height: 23px; }
  .brand__name { font-size: 16px; letter-spacing: .05em; }
  .header-inner { gap: 8px; }

  .header-utility { gap: 6px; }
  .utility-link {
    padding: 6px 10px;
    font-size: 12px;
    letter-spacing: .04em;
  }
  .nav-toggle { padding: 7px 10px; font-size: 12px; }
  .nav-toggle__label { display: none; }

  .footer-cols { grid-template-columns: 1fr; }
  .footer-contact { grid-template-columns: 1fr; }
  .footer-contact__item { flex-direction: column; gap: 2px; }
  .footer-ref { width: 100%; justify-content: flex-start; }
}

/* ---------- 8. 动效与可访问性 ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
  will-change: opacity, transform;
}
[data-reveal].is-in {
  opacity: 1;
  transform: none;
  will-change: auto;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}
.panel--dark :focus-visible,
.rh-header :focus-visible,
.rh-footer :focus-visible {
  outline-color: var(--gold-light);
}

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

  [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .btn--gold:hover,
  .footer-col a:hover { transform: none; }
}
