@import url('https://fonts.googleapis.com/css2?family=Abril+Fatface&family=Merriweather:wght@300;400;700&display=swap');

:root{
  --berry:#8C2F39;
  --berry-d:#6b222a;
  --cream:#F4E9D8;
  --slate:#2B3A42;
  --paper:#fbf5ea;
  --line:rgba(43,58,66,.16);
  --serif:'Merriweather',Georgia,'Songti SC','Noto Serif SC',serif;
  --display:'Abril Fatface','Merriweather',Georgia,'Songti SC',serif;
}

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

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

body{
  margin:0;
  background:var(--cream);
  color:var(--slate);
  font-family:var(--serif);
  font-size:17px;
  line-height:1.78;
  overflow-x:hidden;
}

h1,h2,h3{
  font-family:var(--display);
  font-weight:400;
  line-height:1.16;
  margin:0;
}

p{margin:0 0 1rem}
img{display:block;max-width:100%}
a{color:var(--berry)}

a:focus-visible,
summary:focus-visible{
  outline:3px solid var(--berry);
  outline-offset:2px;
}

/* ---------- 顶栏 ---------- */
.masthead{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:.5rem .6rem;
  padding:.55rem clamp(1rem,4vw,3rem);
  background:var(--slate);
  border-bottom:5px solid var(--berry);
}

.brand{
  font-family:var(--display);
  font-size:1.18rem;
  letter-spacing:.05em;
  color:var(--cream);
  text-decoration:none;
  margin-right:auto;
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding-right:.4rem;
}

.menu{display:flex;align-items:center;gap:.3rem}

.grp{position:relative}

.grp summary{
  list-style:none;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding:.5rem .85rem;
  font-size:.9rem;
  letter-spacing:.09em;
  color:var(--cream);
  border:1px solid rgba(244,233,216,.34);
  user-select:none;
}

.grp summary::-webkit-details-marker{display:none}
.grp summary::after{content:'+';margin-left:.45rem;color:var(--berry)}
.grp[open] summary{background:var(--berry);border-color:var(--berry)}
.grp[open] summary::after{content:'\2212';color:var(--cream)}

.drop{
  position:absolute;
  top:calc(100% + 1px);
  left:0;
  z-index:90;
  min-width:11rem;
  padding:.3rem 0;
  background:var(--cream);
  border-top:4px solid var(--berry);
  box-shadow:0 14px 26px rgba(43,58,66,.28);
}

.grp:last-child .drop{left:auto;right:0}

.drop a{
  display:flex;
  align-items:center;
  min-height:44px;
  padding:.45rem 1rem;
  color:var(--slate);
  text-decoration:none;
  font-size:.95rem;
  border-bottom:1px solid var(--line);
}

.drop a:last-child{border-bottom:0}
.drop a:hover{background:var(--berry);color:var(--cream)}

.cta{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding:.5rem 1.1rem;
  background:var(--berry);
  color:var(--cream);
  text-decoration:none;
  font-size:.9rem;
  letter-spacing:.08em;
  border:2px solid var(--berry);
}

.cta:hover{background:var(--cream);color:var(--berry)}

/* ---------- 粘性锚点条 ---------- */
.strip{
  position:sticky;
  top:0;
  z-index:70;
  display:flex;
  background:var(--berry);
  border-bottom:2px solid var(--slate);
  overflow-x:auto;
  scrollbar-width:thin;
}

.strip a{
  display:flex;
  align-items:center;
  min-height:46px;
  padding:.55rem 1.05rem;
  color:var(--cream);
  text-decoration:none;
  font-size:.9rem;
  letter-spacing:.04em;
  white-space:nowrap;
  border-right:1px solid rgba(244,233,216,.22);
}

.strip a:hover{background:var(--berry-d)}
.strip a.is-active{background:var(--cream);color:var(--berry)}

/* ---------- 首屏 ---------- */
.hero{
  position:relative;
  min-height:100vh;
  min-height:100svh;
  display:flex;
  align-items:flex-end;
  justify-content:flex-end;
  overflow:hidden;
  background:var(--slate);
  isolation:isolate;
}

.hero-layer{
  position:absolute;
  inset:-14% 0;
  will-change:transform;
}

.hero-layer.back{
  z-index:0;
  background:
    radial-gradient(circle at 74% 26%,#3e535d 0%,#232d33 62%,#1a2227 100%);
}

.hero-layer.media{z-index:1}

.hero-media{
  width:100%;
  height:100%;
  object-fit:cover;
  filter:grayscale(.18) contrast(1.06);
}

.hero-layer.media::after{
  content:'';
  position:absolute;
  inset:0;
  background:linear-gradient(112deg,rgba(43,58,66,.94) 6%,rgba(43,58,66,.58) 46%,rgba(140,47,57,.42) 100%);
}

.hero-band{
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  height:23vh;
  z-index:2;
  background:var(--cream);
  clip-path:polygon(0 64%,100% 0,100% 100%,0 100%);
}

.hero-inner{
  position:relative;
  z-index:3;
  margin-left:auto;
  max-width:56rem;
  text-align:right;
  padding:0 clamp(1.1rem,5vw,4rem) 27vh;
}

h1{
  font-size:clamp(2rem,6.6vw,4.2rem);
  color:var(--cream);
  letter-spacing:.02em;
  text-shadow:0 3px 22px rgba(0,0,0,.42);
}

.hero-sub{
  margin:.9rem 0 0 auto;
  max-width:34rem;
  color:rgba(244,233,216,.86);
  font-size:1rem;
}

/* ---------- 主体 ---------- */
.wrap{
  max-width:1180px;
  margin:0 auto;
  padding:clamp(1.6rem,4vw,3rem) clamp(1rem,4vw,3rem) clamp(2rem,5vw,3.5rem);
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:clamp(1.6rem,3vw,2.6rem);
}

.story{min-width:0}

section > div{
  position:relative;
  scroll-margin-top:86px;
  padding:clamp(1.5rem,3vw,2.4rem) clamp(.85rem,2.2vw,1.6rem);
  border-top:1px solid var(--line);
}

section > div:first-child{
  border-top:0;
  padding-top:.4rem;
}

section > div::before{
  content:'';
  position:absolute;
  top:-2px;
  left:0;
  width:3.4rem;
  height:4px;
  background:var(--berry);
  transform:skewX(-26deg);
}

section h2{
  font-size:clamp(1.42rem,3.6vw,2rem);
  color:var(--berry);
  margin:0 0 .8rem;
  letter-spacing:.01em;
}

section h3{
  font-size:clamp(1.14rem,2.4vw,1.36rem);
  color:var(--slate);
  margin:1.5rem 0 .55rem;
}

section p{margin:0 0 1.05rem}
section ul,section ol{margin:0 0 1.1rem;padding-left:1.25rem}
section li{margin:.3rem 0}
section a{text-decoration:underline;text-underline-offset:3px;text-decoration-thickness:1px}
section a:hover{color:var(--berry-d)}

section strong{color:var(--slate);font-weight:700}

section blockquote{
  margin:1.3rem 0;
  padding:1rem 1.1rem;
  background:var(--paper);
  border-left:5px solid var(--berry);
  font-style:normal;
}

section blockquote p:last-child{margin-bottom:0}

section table{
  width:100%;
  border-collapse:collapse;
  margin:0 0 1.2rem;
  font-size:.96rem;
}

section th,section td{
  border:1px solid var(--line);
  padding:.55rem .65rem;
  text-align:left;
}

section th{background:var(--paper);font-weight:700}

section hr{
  border:0;
  border-top:1px solid var(--line);
  margin:1.6rem 0;
}

section code{
  font-family:ui-monospace,'SFMono-Regular',Consolas,monospace;
  font-size:.92em;
  background:var(--paper);
  padding:.1em .3em;
}

/* ---------- 侧栏 ---------- */
.rail{
  align-self:start;
  background:var(--paper);
  border-top:5px solid var(--berry);
  padding:1.1rem 1rem 1.3rem;
}

.rail small{
  display:block;
  font-family:var(--display);
  font-size:.78rem;
  letter-spacing:.22em;
  color:var(--berry);
}

.rail h2{font-size:1.14rem;margin:.15rem 0 .7rem}

.rail-list{
  list-style:none;
  margin:0;
  padding:0;
  counter-reset:rail;
}

.rail-list li{
  counter-increment:rail;
  border-top:1px solid var(--line);
}

.rail-list li:first-child{border-top:0}

.rail-list a{
  display:flex;
  align-items:center;
  gap:.55rem;
  min-height:42px;
  padding:.45rem 0;
  color:var(--slate);
  text-decoration:none;
  font-size:.93rem;
  line-height:1.35;
}

.rail-list a::before{
  content:counter(rail,decimal-leading-zero);
  font-family:var(--display);
  font-size:.86rem;
  color:var(--berry);
}

.rail-list a:hover{color:var(--berry);text-decoration:underline;text-underline-offset:3px}

/* ---------- 页脚 ---------- */
.foot{
  background:var(--slate);
  color:var(--cream);
  border-top:7px solid var(--berry);
  padding:clamp(1.4rem,4vw,2.4rem) clamp(1rem,4vw,3rem);
  display:flex;
  flex-wrap:wrap;
  align-items:flex-start;
  gap:1.1rem 1.8rem;
  justify-content:space-between;
}

.foot-brand a{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  font-family:var(--display);
  font-size:1.1rem;
  letter-spacing:.05em;
  color:var(--cream);
  text-decoration:none;
}

.foot-nav{flex:1 1 19rem;min-width:0}

.foot-nav dl{
  display:grid;
  grid-template-rows:auto auto;
  grid-auto-flow:column;
  grid-auto-columns:minmax(4.6rem,auto);
  gap:.15rem .9rem;
  margin:0;
  overflow-x:auto;
  scrollbar-width:thin;
}

.foot-nav dt{
  font-family:var(--display);
  font-size:.72rem;
  letter-spacing:.11em;
  color:rgba(244,233,216,.5);
}

.foot-nav dd{margin:0 0 .45rem}

.foot-nav a{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  color:var(--cream);
  text-decoration:none;
  font-size:.93rem;
  border-bottom:1px solid rgba(244,233,216,.26);
}

.foot-nav a:hover{color:#fff;border-bottom-color:var(--berry)}

.foot-copy{
  display:flex;
  align-items:center;
  min-height:44px;
  font-size:.84rem;
  color:rgba(244,233,216,.72);
}

/* ---------- 滚动揭示 ---------- */
.has-js section > div:not(.is-in),
.has-js .rail-list li:not(.is-in),
.has-js .foot-nav dl:not(.is-in){
  opacity:0;
  transform:translateY(16px);
}

.has-js section > div,
.has-js .rail-list li,
.has-js .foot-nav dl{
  transition:opacity .55s ease,transform .55s ease;
}

/* ---------- 断点 ---------- */
@media (min-width:900px){
  .wrap{grid-template-columns:minmax(0,1fr) 15rem}
  .rail{position:sticky;top:4.4rem}
}

@media (max-width:720px){
  body{font-size:16.5px}
  .masthead{gap:.4rem;padding:.45rem 1rem}
  .brand{flex:1 1 100%;font-size:1.06rem;min-height:40px}
  .menu{flex:1 1 auto}
  .grp summary,.cta{padding:.45rem .7rem;font-size:.85rem}
  .strip a{padding:.5rem .8rem;font-size:.85rem}
  .hero-band{height:17vh;clip-path:polygon(0 70%,100% 0,100% 100%,0 100%)}
  .hero-inner{padding-bottom:21vh}
  .hero-sub{font-size:.95rem}
  section h2{font-size:1.4rem}
  .foot{gap:1rem}
  .foot-nav{flex:1 1 100%}
  .foot-nav dl{grid-template-rows:auto auto auto auto;grid-auto-columns:minmax(5.4rem,auto)}
}

@media (max-width:400px){
  .grp summary{padding:.45rem .55rem}
  .cta{padding:.45rem .55rem;letter-spacing:.03em}
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .has-js section > div,
  .has-js .rail-list li,
  .has-js .foot-nav dl{
    opacity:1;
    transform:none;
    transition:none;
  }
  .hero-layer{will-change:auto}
}

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