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

:root {
  --ink: #171f26;
  --ink-2: #3a4753;
  --blue: #c8e0f4;
  --pink: #f5e0e8;
  --bg: #e8f0f8;
  --face: #eef5fb;
  --face-2: #e1ecf6;
  --line: #d7e5f1;
  --r: 14px;
  --out: -6px -6px 16px rgba(255, 255, 255, 0.92), 7px 7px 18px rgba(23, 31, 38, 0.14);
  --out-sm: -3px -3px 8px rgba(255, 255, 255, 0.9), 4px 4px 10px rgba(23, 31, 38, 0.13);
  --in: inset -4px -4px 10px rgba(255, 255, 255, 0.92), inset 4px 4px 10px rgba(23, 31, 38, 0.12);
  --font: 'Quicksand', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
  --hand: 'Caveat', 'Quicksand', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
}
body.nav-open { overflow: hidden; }

img { max-width: 100%; }

a { color: #1d4a6b; text-underline-offset: 3px; }

:focus-visible { outline: 3px solid #7fb2d8; outline-offset: 3px; }

/* ---------- 顶部两行 ---------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(232, 240, 248, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.head-top { padding: 10px 18px 2px; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--hand);
  font-size: 23px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 18px;
  background: linear-gradient(145deg, #f3e6ec, #dbe9f6);
  box-shadow: var(--out-sm);
}

.head-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 18px 10px;
}

.burger,
.nav-close {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 10px 18px;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  border: 0;
  border-radius: 999px;
  background: linear-gradient(145deg, #f2f7fc, #dfeaf5);
  box-shadow: var(--out-sm);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.burger:active,
.nav-close:active {
  transform: scale(0.96);
  box-shadow: var(--in);
}

.burger-lines {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
}
.burger-lines::before,
.burger-lines::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.2s ease;
}
.burger-lines::before { top: -6px; }
.burger-lines::after { top: 6px; }
.nav-open .burger-lines { background: transparent; }
.nav-open .burger-lines::before { transform: translateY(6px) rotate(45deg); }
.nav-open .burger-lines::after { transform: translateY(-6px) rotate(-45deg); }

.cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 22px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  background: linear-gradient(145deg, #f8e9ef, #f0d7e1);
  box-shadow: var(--out-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.cta:hover { transform: translateY(-2px); }
.cta:active { transform: scale(0.97); box-shadow: var(--in); }

/* ---------- 全屏遮罩菜单 ---------- */
.site-nav {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 70px 20px;
  overflow-y: auto;
  background: linear-gradient(150deg, #eef5fb, #e2ecf6 55%, #f4e6ec);
  opacity: 0;
  visibility: hidden;
  transform: scale(0.985);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
}
.nav-open .site-nav {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.nav-close {
  position: absolute;
  top: 18px;
  right: 18px;
}

.site-nav p {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
  width: 100%;
  max-width: 320px;
  text-align: center;
}

.site-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 12px 20px;
  border-radius: var(--r);
  text-decoration: none;
  font-size: 19px;
  font-weight: 600;
  color: var(--ink);
  background: linear-gradient(145deg, #f4f9fd, #e0eaf5);
  box-shadow: var(--out);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.site-nav a:hover { transform: translateY(-2px); }
.site-nav a:active { transform: scale(0.97); box-shadow: var(--in); }

@media (min-width: 760px) {
  .site-nav p {
    display: grid;
    grid-template-columns: repeat(2, minmax(200px, 1fr));
    gap: 16px 20px;
    max-width: 560px;
  }
}

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: calc(100vh - 106px);
  min-height: calc(100svh - 106px);
  overflow: hidden;
  background: linear-gradient(150deg, #c8e0f4, #f5e0e8);
}

.hero-media { position: absolute; inset: 0; }
.hero-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(205deg, rgba(23, 31, 38, 0.05) 0%, rgba(23, 31, 38, 0.34) 52%, rgba(23, 31, 38, 0.68) 100%);
}
.hero-plain .hero-veil { display: none; }

.hero-copy {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 42px 20px;
  text-align: right;
}

.hero-copy h1 {
  margin: 0;
  font-family: var(--hand);
  font-size: clamp(30px, 7.4vw, 62px);
  line-height: 1.16;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #fff;
  text-shadow: 0 2px 18px rgba(23, 31, 38, 0.45);
  word-break: break-word;
}
.hero-plain .hero-copy h1 { color: var(--ink); text-shadow: none; }

@media (min-width: 860px) {
  .hero { align-items: flex-end; min-height: calc(100vh - 106px); }
  .hero-copy { padding: 56px 48px 64px; max-width: 900px; margin-left: auto; }
}

/* ---------- 主体栅格 ---------- */
.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 34px 18px 72px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 26px;
}

.side { order: 2; }
.content-shell { order: 1; }

@media (min-width: 940px) {
  .wrap {
    grid-template-columns: 226px minmax(0, 1fr);
    gap: 34px;
    align-items: start;
    padding-top: 48px;
  }
  .side { order: 1; position: sticky; top: 124px; }
  .content-shell { order: 2; }
}

/* ---------- 侧栏 ---------- */
.side {
  padding: 22px 18px;
  border-radius: var(--r);
  background: linear-gradient(150deg, #eff5fb, #e2ecf6);
  box-shadow: var(--out);
}

.side-title {
  margin: 0 0 14px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ink-2);
}
.side-title > span {
  display: inline-block;
  padding-bottom: 6px;
  border-bottom: 3px solid var(--pink);
}

.side-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}
.side-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 16px;
  color: var(--ink);
  background: #eaf2fa;
  box-shadow: var(--out-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.side-links a:hover { transform: translateY(-2px); }
.side-links a:active { transform: scale(0.97); box-shadow: var(--in); }

@media (min-width: 940px) {
  .side-links { flex-direction: column; }
  .side-links a { justify-content: flex-start; min-height: 42px; width: 100%; }
}

/* ---------- 正文 ---------- */
.prose {
  max-width: 780px;
  min-width: 0;
}

.prose > article {
  margin: 0 0 26px;
  padding: 26px 20px 30px;
  border-radius: 0;
  border-bottom: 4px solid var(--blue);
  background: linear-gradient(160deg, #f1f6fb, #e5eef7);
  box-shadow: var(--out);
  scroll-margin-top: 132px;
}
.prose > article:nth-of-type(2n) { border-bottom-color: var(--pink); }
.prose > article:last-child { margin-bottom: 0; }

.prose h2 {
  margin: 0 0 16px;
  font-family: var(--hand);
  font-size: clamp(23px, 3.6vw, 32px);
  line-height: 1.26;
  font-weight: 700;
  color: var(--ink);
}
.prose h2 > span,
.prose h3 > span {
  display: inline-block;
  position: relative;
  padding-bottom: 8px;
}
.prose h2 > span::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 5px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--blue), var(--pink));
}

.prose h3 {
  margin: 26px 0 10px;
  font-size: 20px;
  line-height: 1.4;
  color: var(--ink);
}

.prose p { margin: 0 0 14px; }
.prose ul,
.prose ol { margin: 0 0 16px; padding-left: 22px; }
.prose li { margin: 0 0 8px; }
.prose li::marker { color: #6e93b3; }
.prose strong { color: #0f2a3d; }

.prose blockquote {
  margin: 18px 0;
  padding: 16px 18px;
  border-left: 4px solid var(--pink);
  border-radius: 0 12px 12px 0;
  background: #eef5fb;
  box-shadow: var(--in);
}
.prose blockquote p:last-child { margin: 0; }

.prose table {
  width: 100%;
  margin: 0 0 16px;
  border-collapse: collapse;
  font-size: 16px;
}
.prose th,
.prose td {
  padding: 10px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.prose th { background: #eaf3fb; }

.prose img { height: auto; }
.prose figure { margin: 0 0 16px; }
.prose figcaption { font-size: 16px; color: var(--ink-2); }

/* ---------- 页脚 ---------- */
.site-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 30px;
  padding: 30px 18px;
  border-top: 3px solid #d5e4f0;
  background: linear-gradient(150deg, #e7eff8, #dde8f3);
}

.foot-brand { min-width: 220px; flex: 1 1 240px; }
.foot-title {
  margin: 0;
  font-family: var(--hand);
  font-size: 21px;
  font-weight: 700;
}
.foot-title > span {
  display: inline-block;
  padding-bottom: 4px;
  border-bottom: 3px solid var(--pink);
}
.foot-desc {
  margin: 8px 0 0;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-2);
  max-width: 42ch;
}

.foot-nav p {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin: 0;
}
.foot-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 4px;
  font-size: 16px;
  text-decoration: none;
  color: var(--ink-2);
}
.foot-nav a:hover { color: var(--ink); text-decoration: underline; }

.copy {
  flex: 0 0 auto;
  margin: 0;
  font-size: 16px;
  color: var(--ink-2);
}

@media (min-width: 900px) {
  .copy { flex-basis: 100%; border-top: 1px solid var(--line); padding-top: 14px; }
}

/* ---------- 动效 ---------- */
@media (prefers-reduced-motion: no-preference) {
  .prose > article {
    animation: rise 0.55s ease both;
  }
  .prose > article:nth-child(1) { animation-delay: 0.02s; }
  .prose > article:nth-child(2) { animation-delay: 0.08s; }
  .prose > article:nth-child(3) { animation-delay: 0.14s; }
  .prose > article:nth-child(4) { animation-delay: 0.2s; }
  .prose > article:nth-child(5) { animation-delay: 0.26s; }
  .prose > article:nth-child(6) { animation-delay: 0.32s; }
  .prose > article:nth-child(7) { animation-delay: 0.38s; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

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