@import url('https://fonts.googleapis.com/css2?family=Crimson+Text:wght@400;600;700&family=EB+Garamond:wght@400;500;600;700;800&display=swap');

:root{
  --white:#ffffff;
  --mist:#f5f5f5;
  --mist-2:#fafafa;
  --ink:#1f1f1f;
  --ink-soft:#5b5b5b;
  --line:rgba(31,31,31,.12);
  --shadow:0 4px 6px rgba(0,0,0,.05);
  --shadow-lift:0 18px 40px rgba(0,0,0,.08);
  --r:28px;
  --serif:'Crimson Text','EB Garamond','Songti SC','Noto Serif CJK SC','Source Han Serif SC',Georgia,serif;
}

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

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

body{
  margin:0;
  overflow-x:hidden;
  background:var(--white);
  color:var(--ink);
  font-family:var(--serif);
  font-size:17px;
  line-height:1.75;
  letter-spacing:.01em;
  -webkit-font-smoothing:antialiased;
}

img{display:block;max-width:100%;height:auto}
a{color:inherit}
p{margin:0}
h1,h2,h3{font-weight:600;letter-spacing:-.01em}

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

/* ---------- 顶栏 ---------- */
.topbar{
  position:sticky;
  top:0;
  z-index:40;
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px clamp(14px,3.4vw,36px);
  background:rgba(255,255,255,.88);
  -webkit-backdrop-filter:saturate(180%) blur(14px);
  backdrop-filter:saturate(180%) blur(14px);
  border-bottom:1px solid var(--line);
}

.mark{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  width:44px;
  height:44px;
  border-radius:15px;
  background:var(--ink);
  color:var(--white);
  font-size:20px;
  line-height:1;
  text-decoration:none;
  transition:transform .25s ease;
}
.mark > span{transform:translateY(1px)}
.mark:hover{transform:scale(1.04)}

.mark-plain{background:var(--ink);color:var(--white)}
.mark-big{width:54px;height:54px;border-radius:19px;font-size:23px}

.top-nav{margin-left:auto;min-width:0}
.top-nav ul{
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:2px;
  margin:0;
  padding:0;
  list-style:none;
}
.top-nav a{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding:0 12px;
  border-radius:13px;
  color:var(--ink-soft);
  font-size:16px;
  text-decoration:none;
  transition:background .2s ease,color .2s ease;
}
.top-nav a:hover{background:var(--mist);color:var(--ink)}

.burger{
  display:none;
  align-items:center;
  justify-content:center;
  min-height:44px;
  margin-left:auto;
  padding:0 18px;
  border:0;
  border-radius:14px;
  background:var(--ink);
  color:var(--white);
  font:inherit;
  font-size:16px;
  cursor:pointer;
}

/* ---------- 全屏菜单 ---------- */
.omenu{
  position:fixed;
  inset:0;
  z-index:60;
  display:flex;
  flex-direction:column;
  gap:14px;
  padding:16px clamp(14px,3.4vw,36px) 40px;
  overflow-y:auto;
  background:var(--white);
  visibility:hidden;
  transform:translateY(-100%);
  transition:transform .45s cubic-bezier(.22,.8,.25,1),visibility .45s;
}
.omenu.is-open{transform:none;visibility:visible}

.omenu-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding-bottom:4px;
  border-bottom:1px solid var(--line);
}

.oclose{
  min-height:44px;
  padding:0 18px;
  border:0;
  border-radius:14px;
  background:var(--ink);
  color:var(--white);
  font:inherit;
  font-size:16px;
  cursor:pointer;
}

.omenu-nav ul{
  display:grid;
  gap:6px;
  margin:0;
  padding:0;
  list-style:none;
}
.omenu-nav a{
  display:flex;
  align-items:center;
  min-height:58px;
  padding:0 20px;
  border-radius:20px;
  background:var(--mist);
  font-size:19px;
  text-decoration:none;
  transition:background .2s ease,color .2s ease;
}
.omenu-nav a:hover{background:var(--ink);color:var(--white)}

/* ---------- 布局骨架 ---------- */
.wrap{
  max-width:1180px;
  margin:0 auto;
  padding:clamp(16px,3vw,30px) clamp(14px,3.4vw,36px) 60px;
}

/* ---------- 首屏 ---------- */
.hero{
  display:grid;
  grid-template-columns:1.15fr 1fr;
  gap:16px;
  align-items:stretch;
  min-height:45vh;
  margin-bottom:16px;
}

.hero-media{
  position:relative;
  overflow:hidden;
  border-radius:var(--r);
  background:var(--mist);
  box-shadow:var(--shadow);
}
.hero-media img{
  width:100%;
  height:100%;
  min-height:180px;
  object-fit:cover;
  transform:scale(1.08);
  will-change:transform;
}

.hero-copy{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:20px;
  padding:clamp(22px,4vw,46px);
  border-radius:var(--r);
  background:var(--mist);
  text-align:center;
  box-shadow:var(--shadow);
  transition:box-shadow .3s ease;
}
.hero-copy:hover{box-shadow:var(--shadow-lift)}

.badge{
  display:inline-flex;
  align-items:center;
  min-height:34px;
  padding:0 16px;
  border-radius:999px;
  background:var(--white);
  box-shadow:var(--shadow);
  font-size:16px;
  letter-spacing:.08em;
}

h1{
  margin:0;
  font-size:clamp(2rem,4.6vw,3.15rem);
  line-height:1.12;
  letter-spacing:-.025em;
}

.cta{
  display:inline-flex;
  align-items:center;
  min-height:48px;
  padding:0 26px;
  border-radius:999px;
  background:var(--ink);
  color:var(--white);
  font-size:17px;
  text-decoration:none;
  transition:transform .25s ease,opacity .25s ease;
}
.cta:hover{transform:scale(1.03);opacity:.92}

/* ---------- 正文 + 侧栏 ---------- */
.body-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr) 244px;
  gap:16px;
  align-items:start;
}

.prose{min-width:0}
.prose > section{
  margin:0 0 16px;
  padding:clamp(20px,3.2vw,38px);
  border-radius:var(--r);
  background:var(--mist);
  box-shadow:var(--shadow);
  transition:transform .3s ease,box-shadow .3s ease;
}
.prose > section:nth-of-type(even){background:var(--mist-2)}
.prose > section:hover{transform:translateY(-3px);box-shadow:var(--shadow-lift)}
.prose section[id]{scroll-margin-top:92px}

.prose h2{
  margin:0 0 12px;
  font-size:clamp(1.4rem,2.3vw,1.85rem);
  line-height:1.2;
}
.prose h3{
  margin:26px 0 10px;
  font-size:1.16rem;
  line-height:1.35;
}
.prose p{margin:0 0 16px;line-height:1.85}
.prose p:last-child{margin-bottom:0}
.prose ul,.prose ol{margin:0 0 18px;padding-left:1.3em}
.prose li{margin:0 0 8px;line-height:1.75}
.prose a{text-decoration:underline;text-underline-offset:3px;text-decoration-thickness:1px}
.prose a:hover{background:rgba(31,31,31,.06)}
.prose blockquote{
  margin:0 0 18px;
  padding:16px 22px;
  border-radius:18px;
  background:var(--white);
  box-shadow:var(--shadow);
  font-style:italic;
}
.prose strong{font-weight:700}
.prose img{border-radius:18px;margin:0 0 18px}

.subtitle{
  margin:0 0 26px;
  color:var(--ink-soft);
  font-size:17px;
  font-style:italic;
  line-height:1.6;
}

/* ---------- 右侧栏 ---------- */
.rail{
  position:sticky;
  top:84px;
  align-self:start;
  padding:18px;
  border-radius:var(--r);
  background:var(--mist);
  box-shadow:var(--shadow);
}
.rail-h{
  margin:0 0 12px;
  font-size:1rem;
  letter-spacing:.1em;
}
.rail-nav ul{
  display:grid;
  gap:2px;
  margin:0;
  padding:0;
  list-style:none;
}
.rail-nav a{
  display:flex;
  align-items:center;
  min-height:42px;
  padding:0 12px;
  border-radius:13px;
  color:var(--ink-soft);
  font-size:16px;
  line-height:1.3;
  text-decoration:none;
  transition:background .2s ease,color .2s ease;
}
.rail-nav a:hover{background:var(--white);color:var(--ink)}

/* ---------- 页脚 ---------- */
footer{
  display:grid;
  grid-template-columns:1fr 1.5fr;
  gap:28px 24px;
  margin-top:26px;
  padding:52px clamp(14px,3.4vw,36px) 36px;
  background:var(--mist);
}
footer section{min-width:0}

.f-mark{display:flex;flex-direction:column;gap:14px;align-items:flex-start}
.f-brand{margin:0;font-size:18px;letter-spacing:.05em}

.foot-nav ul{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:0 16px;
  margin:0;
  padding:0;
  list-style:none;
}
.foot-nav a{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  padding:2px 0;
  color:var(--ink-soft);
  font-size:16px;
  text-decoration:none;
}
.foot-nav a:hover{color:var(--ink);text-decoration:underline;text-underline-offset:3px}

.f-legal{
  grid-column:1 / -1;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding-top:20px;
  border-top:1px solid var(--line);
}
.copy{margin:0;color:var(--ink-soft);font-size:16px}
.totop{
  display:inline-flex;
  align-items:center;
  min-height:42px;
  padding:0 18px;
  border-radius:14px;
  background:var(--white);
  box-shadow:var(--shadow);
  font-size:16px;
  text-decoration:none;
  transition:transform .25s ease;
}
.totop:hover{transform:scale(1.03)}

/* ---------- 断点 ---------- */
@media (max-width:1024px){
  .top-nav{display:none}
  .burger{display:inline-flex}
}

@media (max-width:900px){
  .hero{grid-template-columns:1fr;min-height:0}
  .hero-media{aspect-ratio:16 / 10}
  .hero-copy{padding:30px 20px}
  .body-grid{grid-template-columns:1fr}
  .rail{position:static;margin-top:4px}
  footer{grid-template-columns:1fr;gap:22px}
  .foot-nav ul{grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media (max-width:560px){
  body{font-size:17px}
  .prose > section{padding:22px 18px;border-radius:22px}
  .hero-media{border-radius:22px}
  .hero-copy{border-radius:22px}
  .rail{border-radius:22px}
  h1{font-size:2rem}
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{transition-duration:.001ms !important;animation-duration:.001ms !important}
  .hero-media img{transform:none}
}

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