@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500;600;700&family=Josefin+Sans:wght@300;400;500;600;700&display=swap');

:root {
  --sky: #c8e0f4;
  --milk: #f5e0e8;
  --ink: #171f26;
  --bg: #e9f1f9;
  --glass: rgba(255, 255, 255, 0.66);
  --r: 28px;
  --r-s: 14px;
  --soft: -6px -6px 16px rgba(255, 255, 255, 0.95), 7px 7px 18px rgba(23, 31, 38, 0.10);
  --soft-s: -3px -3px 9px rgba(255, 255, 255, 0.9), 4px 4px 10px rgba(23, 31, 38, 0.10);
  --press: inset -4px -4px 10px rgba(255, 255, 255, 0.95), inset 5px 5px 12px rgba(23, 31, 38, 0.13);
  --font-body: 'Josefin Sans', system-ui, -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-head: 'Cinzel', 'Songti SC', 'Noto Serif SC', Georgia, serif;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.78;
  color: var(--ink);
  background:
    radial-gradient(900px 520px at 14% -12%, #ffffff 0%, rgba(255, 255, 255, 0) 62%),
    radial-gradient(760px 480px at 96% 4%, var(--milk) 0%, rgba(245, 224, 232, 0) 60%),
    linear-gradient(180deg, var(--bg) 0%, #e3eef8 46%, #efe9f1 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

a { color: var(--ink); }
a:focus-visible,
button:focus-visible {
  outline: 2px solid #5b86a8;
  outline-offset: 3px;
  border-radius: 12px;
}

/* ---------- 顶部：品牌居中、菜单两翼 ---------- */
.top {
  position: sticky;
  top: 0;
  z-index: 40;
  padding: 10px clamp(12px, 3vw, 26px);
  background: rgba(233, 241, 249, 0.74);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
  backdrop-filter: blur(14px) saturate(1.15);
  border-bottom: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 14px 28px -24px rgba(23, 31, 38, 0.8);
}

.bar {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 6px;
}

.brand {
  order: -1;
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 6px 22px;
  border-radius: 18px;
  font-family: var(--font-head);
  font-size: 1.2rem;
  letter-spacing: 0.16em;
  text-decoration: none;
  color: var(--ink);
  background: linear-gradient(145deg, #ffffff, var(--sky));
  box-shadow: var(--soft-s);
  transition: box-shadow 150ms ease, transform 150ms ease;
}

.brand:active {
  box-shadow: var(--press);
  transform: scale(0.98);
}

.nav ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px 4px;
}

.nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 4px 12px;
  border-radius: var(--r-s);
  font-size: 0.98rem;
  text-decoration: none;
  color: #25333f;
  transition: background 160ms ease, box-shadow 160ms ease, transform 150ms ease;
}

.nav a:hover {
  background: linear-gradient(145deg, #f4fafe, #dcebf7);
  box-shadow: var(--soft-s);
}

.nav a:active {
  box-shadow: var(--press);
  transform: scale(0.97);
}

/* ---------- 主区网格 ---------- */
main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 clamp(14px, 3vw, 24px) 56px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
}

main > article { min-width: 0; }
main > article[id] { scroll-margin-top: 132px; }

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  overflow: hidden;
  margin: 20px 0 4px;
  min-height: 45vh;
  padding: clamp(18px, 4vw, 34px);
  display: grid;
  align-content: center;
  gap: 14px;
  border-radius: var(--r);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(200, 224, 244, 0.62));
  box-shadow: var(--soft);
  -webkit-backdrop-filter: blur(9px);
  backdrop-filter: blur(9px);
}

.hero::after {
  content: "01";
  position: absolute;
  right: 8px;
  top: -10px;
  z-index: 0;
  font-family: var(--font-head);
  font-size: clamp(92px, 23vw, 186px);
  line-height: 1;
  letter-spacing: -0.03em;
  color: #ffffff;
  opacity: 0.6;
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: end;
  gap: 8px;
  text-align: right;
}

.hero-kicker {
  font-size: 0.86rem;
  letter-spacing: 0.3em;
  color: #40566a;
}

.hero h1 {
  margin: 0;
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 5.2vw, 2.5rem);
  line-height: 1.28;
  letter-spacing: 0.01em;
}

.hero-lead {
  margin: 0;
  max-width: 48ch;
  font-size: 0.97rem;
  line-height: 1.7;
  color: #33444f;
}

.hero-media {
  position: relative;
  z-index: 1;
  margin: 0;
  height: clamp(112px, 20vh, 190px);
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(145deg, var(--sky), var(--milk));
  box-shadow: inset -4px -4px 10px rgba(255, 255, 255, 0.85), inset 5px 5px 12px rgba(23, 31, 38, 0.14);
}

.hero-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 900ms ease;
}

.hero-media img.is-on { opacity: 1; }

/* ---------- 侧栏 ---------- */
.rail {
  order: 0;
  padding: 20px 18px 22px;
  border-radius: var(--r);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.76), rgba(200, 224, 244, 0.46));
  box-shadow: var(--soft);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.rail-k {
  display: block;
  font-size: 0.8rem;
  letter-spacing: 0.34em;
  color: #4d6172;
}

.rail-t {
  margin: 2px 0 12px;
  font-family: var(--font-head);
  font-size: 1.12rem;
  letter-spacing: 0.1em;
}

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

.rail-list a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 4px 12px;
  border-radius: var(--r-s);
  font-size: 0.96rem;
  text-decoration: none;
  color: #26343f;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.7), rgba(233, 241, 249, 0.6));
  box-shadow: var(--soft-s);
  transition: box-shadow 150ms ease, transform 150ms ease;
}

.rail-list a:active {
  box-shadow: var(--press);
  transform: scale(0.98);
}

/* ---------- 正文卡片 ---------- */
main > article:not(.hero) {
  padding: clamp(18px, 3.4vw, 32px);
  border-radius: var(--r);
  background: linear-gradient(152deg, rgba(255, 255, 255, 0.8), rgba(245, 224, 232, 0.5));
  box-shadow: var(--soft);
  scroll-margin-top: 132px;
}

main > article:not(.hero) h2 {
  margin: 0 0 0.55em;
  font-family: var(--font-head);
  font-size: clamp(1.22rem, 3.6vw, 1.62rem);
  line-height: 1.35;
}

main > article:not(.hero) h3 {
  margin: 1.35em 0 0.5em;
  font-size: 1.08rem;
  line-height: 1.5;
}

main > article:not(.hero) small {
  display: block;
  font-size: 0.8rem;
  letter-spacing: 0.28em;
  color: #4d6172;
  margin-bottom: 2px;
}

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

main > article ul,
main > article ol { padding-left: 1.3em; margin: 0 0 1em; }

main > article li { margin: 0.3em 0; }

main > article a {
  color: #1f4c६9;
  color: #1f4c69;
  text-decoration: underline;
  text-underline-offset: 3px;
}

main > article figure { margin: 0 0 1em; }
main > article img {
  max-width: 100%;
  height: auto;
  border-radius: 18px;
}

main > article blockquote {
  margin: 0 0 1em;
  padding: 14px 18px;
  border-radius: var(--r-s);
  background: rgba(255, 255, 255, 0.6);
  box-shadow: var(--press);
}

main > article table {
  width: 100%;
  border-collapse: collapse;
  display: block;
  overflow-x: auto;
  margin: 0 0 1em;
}

main > article th,
main > article td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid rgba(23, 31, 38, 0.1);
}

main > article code {
  font-size: 0.92em;
  padding: 1px 5px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.7);
}

/* ---------- 页脚 ---------- */
footer {
  padding: 24px clamp(14px, 3vw, 26px) 34px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.6), rgba(200, 224, 244, 0.55));
  border-top: 1px solid rgba(255, 255, 255, 0.85);
}

.foot-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 26px;
  text-align: center;
}

.brand-s {
  font-size: 1.02rem;
  min-height: 44px;
  padding: 4px 16px;
}

.foot-nav ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px 4px;
}

.foot-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.94rem;
  text-decoration: none;
  color: #2a3946;
}

.foot-nav a:hover { box-shadow: var(--soft-s); }

.foot-legal p {
  margin: 0;
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  color: #3d4d5b;
}

/* ---------- 动效 ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 620ms ease, transform 620ms ease;
}

.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* ---------- 断点 ---------- */
@media (min-width: 780px) {
  .bar {
    grid-template-columns: 1fr auto 1fr;
    justify-items: stretch;
    align-items: center;
    gap: 10px;
  }

  .brand { order: 0; justify-self: center; }
  .nav-l ol { justify-content: flex-start; }
  .nav-r ol { justify-content: flex-end; }
}

@media (min-width: 960px) {
  main {
    grid-template-columns: minmax(0, 1fr) 296px;
    column-gap: 34px;
    align-items: start;
  }

  main > article { grid-column: 1; }

  main > aside {
    grid-column: 2;
    grid-row: 1 / span 8;
    position: sticky;
    top: 108px;
  }

  .hero { margin-top: 26px; }
  .foot-inner { justify-content: space-between; text-align: left; }
  .foot-nav ol { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  .hero-media img { transition: none; }
}

button[aria-expanded]{min-width:44px;min-height:44px}
