/* ==========================================================================
   /assets/site.css
   东升国际中心 · 共享外壳与基础组件
   ========================================================================== */

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

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

ol, ul { list-style: none; }

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

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

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

/* ---------- 2. Tokens ---------- */
:root {
  --navy: #0B2545;
  --navy-2: #143A61;
  --indigo: #1F5C86;
  --gold: #C8A24A;
  --gold-l: #EBD9A3;
  --orange: #E07A3C;
  --jade: #9AA7AC;
  --paper: #F6F3EC;
  --ink: #0D1114;
  --mist: #DCE1E3;

  --line: rgba(11, 37, 69, 0.14);
  --line-strong: rgba(11, 37, 69, 0.28);
  --line-gold: rgba(200, 162, 74, 0.42);

  --font-display: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Heiti SC", sans-serif;
  --font-editorial: "Songti SC", "SimSun", "STSong", "Noto Serif SC", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --shell: 1280px;
  --gutter: 24px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- 3. Base typography ---------- */
body {
  min-height: 100vh;
  background-color: var(--paper);
  background-image:
    linear-gradient(rgba(11, 37, 69, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 37, 69, 0.022) 1px, transparent 1px);
  background-size: 28px 28px, 28px 28px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.85;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.3;
  letter-spacing: 0.07em;
}

h1 { font-size: clamp(28px, 4.2vw, 46px); font-weight: 800; letter-spacing: 0.09em; }
h2 { font-size: clamp(22px, 2.6vw, 30px); }
h3 { font-size: 19px; }
h4 { font-size: 16px; }

p { margin-bottom: 0; }

a {
  color: var(--navy-2);
  text-decoration: none;
  transition: color 0.16s var(--ease), border-color 0.16s var(--ease);
}

a:hover { color: var(--indigo); }

:focus { outline: none; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

#main-content {
  display: block;
  scroll-margin-top: 132px;
}

#main-content:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: -4px;
}

::selection {
  background: var(--gold-l);
  color: var(--navy);
}

/* ---------- 4. Utilities ---------- */
.mono {
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

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

.divider {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 40px 0;
}

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

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

/* ---------- 5. Skip link ---------- */
.skip-link {
  position: fixed;
  top: 0;
  left: 12px;
  z-index: 120;
  padding: 12px 20px;
  background: var(--gold);
  color: var(--navy);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
  transform: translateY(-140%);
  transition: transform 0.16s var(--ease);
}

.skip-link:focus {
  transform: translateY(12px);
  color: var(--navy);
}

/* ---------- 6. Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--navy);
  color: var(--paper);
  border-bottom: 1px solid rgba(200, 162, 74, 0.26);
}

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

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0 12px;
}

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

.brand:hover { color: var(--gold-l); }

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-gold);
  color: var(--gold-l);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-indent: 0.08em;
}

.brand-mark--sm {
  width: 36px;
  height: 36px;
  font-size: 12px;
}

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

.brand-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--paper);
}

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

/* meta */
.header-meta {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: rgba(246, 243, 236, 0.6);
}

.header-meta-item {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
}

.meta-key { color: rgba(246, 243, 236, 0.45); }

.meta-val {
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  color: var(--gold-l);
}

/* nav toggle */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 14px;
  background: transparent;
  border: 1px solid var(--line-gold);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 13px;
  letter-spacing: 0.14em;
  cursor: pointer;
}

.nav-toggle-label { color: var(--paper); }

.nav-toggle::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 1px solid var(--gold);
  border-bottom: 1px solid var(--gold);
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.2s var(--ease);
}

.site-header[data-open] .nav-toggle::after {
  transform: translateY(1px) rotate(-135deg);
}

/* nav */
.primary-nav {
  border-top: 1px solid rgba(246, 243, 236, 0.13);
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  counter-reset: navindex;
}

.nav-list li { display: flex; }

.nav-list a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 18px;
  color: rgba(246, 243, 236, 0.76);
  font-size: 14px;
  letter-spacing: 0.1em;
  border-bottom: 2px solid transparent;
  transition: color 0.16s var(--ease), background-color 0.16s var(--ease), border-color 0.16s var(--ease);
}

.nav-list a::before {
  counter-increment: navindex;
  content: counter(navindex, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--gold);
  opacity: 0.7;
}

.nav-list a:hover {
  color: var(--paper);
  background: rgba(246, 243, 236, 0.05);
}

.nav-list a[aria-current="page"] {
  color: var(--gold-l);
  background: rgba(200, 162, 74, 0.09);
  border-bottom-color: var(--gold);
}

.nav-list a[aria-current="page"]::before {
  color: var(--gold-l);
  opacity: 1;
}

/* progress */
.scroll-progress {
  height: 2px;
  width: 100%;
  background: rgba(246, 243, 236, 0.08);
  overflow: hidden;
}

.progress-bar {
  display: block;
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--gold), var(--orange));
}

/* ---------- 7. Footer ---------- */
.site-footer {
  margin-top: 96px;
  background: var(--navy);
  color: rgba(246, 243, 236, 0.7);
  font-size: 14px;
  border-top: 1px solid var(--line-gold);
}

.footer-inner {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding: 64px var(--gutter) 0;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.1fr 1.2fr;
  gap: 44px 32px;
}

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

.footer-sign {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.footer-sign-text {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--paper);
}

.footer-tagline {
  font-family: var(--font-editorial);
  font-size: 15px;
  line-height: 1.95;
  color: rgba(246, 243, 236, 0.76);
  max-width: 26ch;
  margin-bottom: 14px;
}

.footer-title {
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.2em;
  color: var(--gold);
}

.footer-list li { margin-bottom: 10px; }

.footer-list a {
  color: rgba(246, 243, 236, 0.78);
  font-size: 14px;
  letter-spacing: 0.05em;
  border-bottom: 1px solid transparent;
}

.footer-list a:hover {
  color: var(--gold-l);
  border-bottom-color: var(--line-gold);
}

.footer-list--contact li {
  color: rgba(246, 243, 236, 0.72);
  font-size: 14px;
  letter-spacing: 0.03em;
  line-height: 1.8;
}

.footer-addr { max-width: 24ch; }

.footer-note {
  margin-top: 16px;
  font-size: 13px;
  line-height: 1.8;
  color: rgba(246, 243, 236, 0.5);
}

.footer-base {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding: 26px var(--gutter) 34px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 28px;
  border-top: 1px solid rgba(246, 243, 236, 0.12);
  font-size: 12px;
  color: rgba(246, 243, 236, 0.5);
}

.footer-base-line {
  max-width: 60ch;
  letter-spacing: 0.04em;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.footer-sep { color: rgba(200, 162, 74, 0.6); }

/* ---------- 8. Page building blocks ---------- */
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px 18px;
  padding-bottom: 14px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--line);
}

.section-head h2 { margin: 0; }

.section-note {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--jade);
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}

.chapter-num {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--gold);
}

.lede {
  font-family: var(--font-editorial);
  font-size: 18px;
  line-height: 1.95;
  color: var(--navy-2);
}

.prose {
  max-width: 720px;
  font-size: 17px;
  line-height: 1.9;
  color: var(--ink);
}

.prose > * + * { margin-top: 1.2em; }

.prose h2,
.prose h3 { margin-top: 1.8em; }

.prose ul,
.prose ol {
  list-style: disc;
  padding-left: 1.4em;
}

.prose ol { list-style: decimal; }

.prose li { margin-bottom: 0.5em; }

.prose a {
  color: var(--navy-2);
  border-bottom: 1px solid var(--line-gold);
}

.prose a:hover {
  color: var(--indigo);
  border-bottom-color: var(--indigo);
}

.prose blockquote {
  padding: 4px 0 4px 20px;
  border-left: 2px solid var(--gold);
  font-family: var(--font-editorial);
  color: var(--navy-2);
}

/* grids */
.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)); }

/* buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 24px;
  border: 1px solid transparent;
  background: transparent;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: background-color 0.16s var(--ease), color 0.16s var(--ease), border-color 0.16s var(--ease);
}

.btn--gold {
  background: var(--gold);
  color: var(--navy);
}

.btn--gold:hover {
  background: var(--gold-l);
  color: var(--navy);
}

.btn--outline {
  border-color: var(--line-gold);
  color: var(--navy);
}

.btn--outline:hover {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--paper);
}

.btn--onDark {
  border-color: rgba(200, 162, 74, 0.5);
  color: var(--gold-l);
}

.btn--onDark:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--navy);
}

.btn--sm {
  min-height: 44px;
  padding: 0 16px;
  font-size: 13px;
}

/* breadcrumb */
.breadcrumb {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--jade);
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
}

.breadcrumb li + li::before {
  content: "/";
  margin: 0 9px;
  color: rgba(200, 162, 74, 0.7);
}

.breadcrumb a { color: var(--jade); }
.breadcrumb a:hover { color: var(--navy); }
.breadcrumb [aria-current="page"] { color: var(--navy-2); }

/* media */
.media-frame {
  position: relative;
  overflow: hidden;
  width: 100%;
  background: var(--navy-2);
  border: 1px solid var(--line);
}

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

.media-frame--16x9 { aspect-ratio: 16 / 9; }
.media-frame--4x3 { aspect-ratio: 4 / 3; }
.media-frame--1x1 { aspect-ratio: 1 / 1; }
.media-frame--tall { aspect-ratio: 3 / 4; }

.media-caption {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--jade);
}

/* tags */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border: 1px solid var(--line-gold);
  background: rgba(235, 217, 163, 0.34);
  color: var(--navy-2);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.tag--gold {
  background: var(--gold-l);
  border-color: var(--gold);
  color: var(--navy);
}

.tag--orange {
  background: rgba(224, 122, 60, 0.08);
  border-color: var(--orange);
  color: var(--orange);
}

.tag--muted {
  background: transparent;
  border-color: var(--line);
  color: var(--jade);
}

/* index strip */
.index-strip {
  display: flex;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.index-cell {
  flex: 1 1 180px;
  min-width: 0;
  padding: 16px 18px;
  border-right: 1px solid var(--line);
}

.index-cell:last-child { border-right: 0; }

/* reveal */
[data-reveal] {
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

[data-reveal].is-hidden {
  opacity: 0;
  transform: translateY(16px);
}

/* ---------- 9. Responsive ---------- */
@media (max-width: 1024px) {
  .footer-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  :root { --gutter: 20px; }

  .site-header { position: sticky; }

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

  .header-meta { gap: 16px; }

  .primary-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    z-index: 70;
    max-height: 78vh;
    overflow-y: auto;
    padding: 22px var(--gutter) 30px;
    background: var(--navy);
    border-top: 1px solid var(--line-gold);
    box-shadow: 0 -20px 50px rgba(11, 37, 69, 0.42);
    transform: translateY(103%);
    visibility: hidden;
    transition: transform 0.22s var(--ease), visibility 0.22s var(--ease);
  }

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

  .nav-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    background: rgba(246, 243, 236, 0.16);
    border: 1px solid rgba(246, 243, 236, 0.16);
  }

  .nav-list li {
    display: block;
    background: var(--navy);
  }

  .nav-list a {
    width: 100%;
    min-height: 56px;
    padding: 14px 14px;
    border-bottom: 0;
    border-left: 2px solid transparent;
  }

  .nav-list a[aria-current="page"] {
    border-bottom-color: transparent;
    border-left-color: var(--gold);
  }

  .site-footer { margin-top: 64px; }
}

@media (max-width: 720px) {
  .header-meta { font-size: 11px; gap: 12px; }
  .header-meta .meta-key { display: none; }
  .brand-sub { display: none; }
}

@media (max-width: 640px) {
  .brand-mark { width: 38px; height: 38px; font-size: 13px; }
  .brand-name { font-size: 14px; letter-spacing: 0.12em; }
  .nav-toggle { padding: 0 11px; font-size: 12px; }

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

  .index-cell {
    flex: 1 1 100%;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .index-cell:last-child { border-bottom: 0; }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-top: 48px;
  }

  .footer-base {
    flex-direction: column;
    align-items: flex-start;
  }

  .section-note { margin-left: 0; }
}

/* ---------- 10. Motion preferences ---------- */
@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;
  }

  [data-reveal],
  [data-reveal].is-hidden {
    opacity: 1;
    transform: none;
  }

  .skip-link { transition: none; }
}
