@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:#1f1f1f;
  --ink-soft:#5c5c5c;
  --bg:#f5f5f5;
  --card:#ffffff;
  --line:#e6e6e6;
  --r:4px;
  --rail:236px;
  --sh:0 4px 6px rgba(0,0,0,.05), 0 14px 30px rgba(0,0,0,.045);
  --font:"Quicksand","PingFang SC","Hiragino Sans GB","Microsoft YaHei",system-ui,-apple-system,sans-serif;
  --hand:"Caveat","Quicksand",cursive;
}

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

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

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

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

/* ---------- 顶部细条 ---------- */
.topbar{
  position:sticky;
  top:0;
  z-index:30;
  display:flex;
  align-items:center;
  gap:10px;
  padding:13px 24px 13px calc(var(--rail) + 24px);
  background:rgba(255,255,255,.92);
  border-bottom:1px solid var(--line);
  backdrop-filter:saturate(1.4) blur(10px);
  font-size:16px;
  letter-spacing:.02em;
  line-height:1.5;
}
.topbar .dot{width:8px;height:8px;border-radius:50%;background:var(--ink);flex:none}
.topbar .bar-brand{font-weight:600}

/* ---------- 左侧固定竖导航 ---------- */
.rail{
  position:fixed;
  left:0;
  top:0;
  bottom:0;
  z-index:40;
  width:var(--rail);
  display:flex;
  flex-direction:column;
  gap:16px;
  padding:22px 16px;
  background:var(--card);
  border-right:1px solid var(--line);
  overflow-y:auto;
}
.rail-logo{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  align-self:flex-start;
  width:52px;
  height:52px;
  flex:none;
  border-radius:var(--r);
  background:var(--ink);
  color:#fff;
  text-decoration:none;
  font-size:22px;
  font-weight:700;
  overflow:hidden;
}
.rail-logo .mark-img{width:100%;height:100%;object-fit:cover}
.rail-h{font-size:16px;font-weight:600;color:var(--ink-soft);padding-left:14px}
.rail-h span{display:inline-block;border-bottom:2px solid var(--line);padding-bottom:3px}
.rail-nav ol{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:4px}
.rail-nav a{
  display:flex;
  align-items:center;
  min-height:42px;
  padding:9px 15px;
  border:1px solid transparent;
  border-radius:999px;
  text-decoration:none;
  font-size:16px;
  line-height:1.5;
  color:var(--ink-soft);
  transition:background .2s ease,color .2s ease,border-color .2s ease,transform .2s ease;
}
.rail-nav a:hover,
.rail-nav a:focus-visible{
  background:var(--bg);
  color:var(--ink);
  border-color:var(--line);
  transform:translateX(3px);
}
.rail-nav a:focus-visible{outline:2px solid var(--ink);outline-offset:2px}

/* ---------- 主体骨架 ---------- */
main{margin-left:var(--rail)}
.wrap{max-width:1140px;margin:0 auto;padding:28px clamp(16px,3vw,38px) 72px}
.stage{display:block}

.prose{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:18px;
  align-items:start;
}
.prose > article{
  min-width:0;
  padding:clamp(20px,2.4vw,30px);
  background:var(--card);
  border-radius:var(--r);
  box-shadow:var(--sh);
  scroll-margin-top:88px;
  transition:transform .35s cubic-bezier(.2,.7,.3,1),box-shadow .35s ease;
}
.prose > article:hover{
  transform:translateY(-2px);
  box-shadow:0 8px 14px rgba(0,0,0,.07), 0 20px 42px rgba(0,0,0,.06);
}
.prose > article:nth-child(2n){grid-column:1 / -1}

/* ---------- 首屏 ---------- */
.hero{
  grid-column:1 / -1;
  display:grid;
  grid-template-columns:1.05fr .95fr;
  gap:clamp(16px,2.5vw,34px);
  align-items:end;
  min-height:45vh;
  padding:clamp(20px,2.6vw,32px);
  background:var(--card);
  border-radius:var(--r);
  box-shadow:var(--sh);
  overflow:hidden;
}
.hero--solo{grid-template-columns:1fr;min-height:34vh}
.hero-pics{position:relative;min-height:clamp(180px,30vh,300px)}
.hero-pics figure{
  position:absolute;
  margin:0;
  overflow:hidden;
  border-radius:var(--r);
  background:#ededed;
  box-shadow:0 10px 26px rgba(0,0,0,.14);
}
.hero-pics figure img{width:100%;height:100%;object-fit:cover;transition:transform .6s ease}
.hero-pics figure:hover img{transform:scale(1.03)}
.hero-pics .p1{left:0;top:0;width:62%;aspect-ratio:4/3;z-index:1}
.hero-pics .p2{right:0;bottom:0;width:52%;aspect-ratio:1/1;z-index:2}
.hero-copy{text-align:right}
.hero-copy h1{
  font-size:clamp(28px,4.4vw,52px);
  font-weight:800;
  letter-spacing:-.03em;
  line-height:1.18;
  text-wrap:balance;
}
.hero-copy h1::after{
  content:"";
  display:block;
  width:56px;
  height:4px;
  margin:16px 0 0 auto;
  border-radius:99px;
  background:var(--ink);
}

/* ---------- 正文排版 ---------- */
.prose h2,
.prose h3{font-size:clamp(20px,2vw,23px);font-weight:700;margin:0 0 16px}
.prose h3{font-size:18px}
.prose h2 > span,
.prose h3 > span{display:inline-block;position:relative}
.prose h2 > span::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:-5px;
  height:3px;
  border-radius:2px;
  background:var(--ink);
  opacity:.8;
}
.prose p{margin:0 0 14px}
.prose p:last-child{margin-bottom:0}
.prose ul,
.prose ol{margin:0 0 14px;padding-left:1.2em}
.prose li{margin:0 0 8px}
.prose li:last-child{margin-bottom:0}
.prose a{color:var(--ink);text-underline-offset:3px;text-decoration-color:#b9b9b9}
.prose a:hover{text-decoration-color:var(--ink)}
.prose strong{font-weight:700}
.prose blockquote{
  margin:0 0 14px;
  padding:2px 0 2px 16px;
  border-left:3px solid var(--ink);
  color:var(--ink-soft);
}
.prose code{
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
  font-size:15px;
  background:var(--bg);
  padding:1px 5px;
  border-radius:2px;
}

/* ---------- 页脚 ---------- */
.foot{
  margin-left:var(--rail);
  display:grid;
  gap:clamp(18px,3vw,30px);
  padding:clamp(28px,4vw,52px) clamp(16px,3vw,38px) 24px;
  background:var(--card);
  border-top:1px solid var(--line);
}
.foot-brand .fb{
  font-size:clamp(54px,12.5vw,150px);
  font-weight:800;
  line-height:.86;
  letter-spacing:-.045em;
  margin:0;
}
.foot-brand .fb span{display:inline-block}
.foot-nav nav{border-top:1px solid var(--line);padding-top:18px}
.foot-nav dl{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:10px 14px;
  margin:0;
}
.foot-nav dt{font-size:16px;letter-spacing:.14em;color:var(--ink-soft)}
.foot-nav dd{margin:0}
.foot-nav a{
  display:inline-flex;
  align-items:center;
  min-height:42px;
  padding:8px 16px;
  border:1px solid var(--line);
  border-radius:999px;
  text-decoration:none;
  font-size:16px;
  line-height:1.5;
  transition:background .2s ease,border-color .2s ease,transform .2s ease;
}
.foot-nav a:hover,
.foot-nav a:focus-visible{
  background:var(--bg);
  border-color:#c9c9c9;
  transform:translateY(-1px);
}
.foot-nav a:focus-visible{outline:2px solid var(--ink);outline-offset:2px}
.foot-copy{
  border-top:1px solid var(--line);
  padding-top:16px;
  text-align:center;
  font-size:16px;
  color:var(--ink-soft);
}

/* ---------- 入场动效 ---------- */
@keyframes rise{
  from{opacity:0;transform:translateY(14px)}
  to{opacity:1;transform:none}
}
.anim .hero,
.anim .prose > article{animation:rise .58s cubic-bezier(.2,.7,.3,1) both}

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

/* ---------- 窄屏 ---------- */
@media (max-width:940px){
  .topbar{padding:13px 16px}
  .rail{
    position:static;
    width:auto;
    height:auto;
    overflow:visible;
    flex-direction:row;
    flex-wrap:wrap;
    align-items:center;
    gap:10px;
    padding:12px 16px;
    border-right:0;
    border-bottom:1px solid var(--line);
  }
  .rail-logo{width:44px;height:44px;font-size:19px}
  .rail-h{font-size:16px;padding-left:0}
  .rail-nav{flex:1 1 100%;min-width:0}
  .rail-nav ol{
    flex-direction:row;
    gap:6px;
    overflow-x:auto;
    padding-bottom:4px;
  }
  .rail-nav a{
    white-space:nowrap;
    border-color:var(--line);
    color:var(--ink);
  }
  .rail-nav a:hover{transform:none}
  main,.foot{margin-left:0}
  .wrap{padding:20px 16px 52px}
  .prose{grid-template-columns:1fr;gap:14px}
  .prose > article:nth-child(2n){grid-column:auto}
  .hero{grid-template-columns:1fr;min-height:0;align-items:stretch}
  .hero-pics{order:-1;min-height:190px}
  .hero-copy h1{font-size:clamp(26px,7.4vw,38px)}
}

@media (max-width:420px){
  body{font-size:16px}
  .prose h2{font-size:20px}
}

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