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

:root{
  --deep:#0E2B25;
  --deep-0:#071a17;
  --gold:#C9A15A;
  --ink:#EDE7DA;
  --line:rgba(237,231,218,.14);
  --soft:rgba(237,231,218,.72);
  --sans:"Space Grotesk","DM Sans","PingFang SC","Hiragino Sans GB","Microsoft YaHei",system-ui,sans-serif;
  --ease:cubic-bezier(.2,.7,.3,1);
  --rail:260px;
}

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

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

body{
  margin:0;
  background:var(--deep);
  color:var(--ink);
  font-family:var(--sans);
  font-size:16px;
  line-height:1.78;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}

img{max-width:100%}

/* ---- 背景视差层 ---- */
.bg-layer{
  position:fixed;
  inset:-12% 0 -12% 0;
  z-index:-3;
  pointer-events:none;
  will-change:transform;
}
.bg-a{
  background:
    radial-gradient(58% 46% at 88% 6%, rgba(201,161,90,.18), transparent 72%),
    linear-gradient(180deg,#092019,#0E2B25 42%,#0b241f);
  transform:translate3d(0,calc(var(--sy,0px) * .12),0);
}
.bg-b{
  z-index:-2;
  opacity:.85;
  background:
    radial-gradient(52% 44% at 6% 72%, rgba(201,161,90,.13), transparent 70%),
    radial-gradient(40% 34% at 74% 96%, rgba(237,231,218,.07), transparent 72%);
  transform:translate3d(0,calc(var(--sy,0px) * .26),0);
}
.grain{
  position:fixed;
  inset:0;
  z-index:-1;
  pointer-events:none;
  opacity:.5;
  background-image:repeating-linear-gradient(180deg,rgba(0,0,0,.14) 0 1px,rgba(0,0,0,0) 1px 3px);
}

.shell{display:flex;flex-direction:column;min-height:100vh}

/* ---- 左侧导航栏 ---- */
.rail{
  position:fixed;
  inset:0 auto 0 0;
  width:var(--rail);
  z-index:60;
  display:flex;
  flex-direction:column;
  gap:18px;
  padding:26px 20px 22px;
  background:rgba(7,26,23,.86);
  border-right:1px solid var(--line);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
  overflow-y:auto;
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:44px;
  color:var(--ink);
  text-decoration:none;
  font-weight:600;
  letter-spacing:.02em;
  font-size:1.05rem;
}
.mark{
  width:14px;height:14px;flex:0 0 14px;
  background:linear-gradient(140deg,var(--gold),#8f6f36);
  border-radius:4px;
  box-shadow:0 0 0 1px rgba(201,161,90,.4), 0 6px 16px rgba(201,161,90,.35);
}
.brand-t{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

.rail-h{
  margin:0;
  font-size:1rem;
  font-weight:500;
  letter-spacing:.22em;
  color:var(--gold);
  opacity:.82;
}
.rail-h span{border:0}

.rail-nav{flex:1 1 auto;min-height:0}
.rail-nav ul{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  flex-direction:column;
  gap:2px;
}
.rail-nav li{position:relative}
.rail-nav a{
  display:flex;
  align-items:center;
  min-height:44px;
  padding:8px 12px;
  border-radius:12px;
  color:var(--soft);
  text-decoration:none;
  font-size:1rem;
  line-height:1.4;
  transition:background .25s var(--ease), color .25s var(--ease);
}
.rail-nav a:hover,
.rail-nav a:focus-visible{
  background:rgba(201,161,90,.14);
  color:var(--gold);
  outline:none;
}
.has-sub > a::after{
  content:"▾";
  margin-left:auto;
  padding-left:8px;
  font-size:.72em;
  color:var(--gold);
  opacity:.8;
}
.rail-nav ul.sub{
  display:none;
  margin:2px 0 6px 12px;
  padding-left:10px;
  border-left:1px solid rgba(201,161,90,.35);
}
.rail-nav ul.sub a{font-size:1rem;color:rgba(237,231,218,.6);min-height:42px;padding:6px 10px}
.has-sub:hover > ul.sub,
.has-sub:focus-within > ul.sub{display:flex}

.rail-contact{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:44px;
  padding:0 16px;
  border:1px solid rgba(201,161,90,.5);
  border-radius:999px;
  color:var(--gold);
  text-decoration:none;
  font-size:1rem;
  transition:background .25s var(--ease), color .25s var(--ease);
}
.rail-contact:hover,.rail-contact:focus-visible{background:var(--gold);color:#0b211d;outline:none}

/* ---- 内容区 ---- */
.content{
  --pad:clamp(20px,5vw,64px);
  margin-left:var(--rail);
  display:flex;
  flex-direction:column;
  min-height:100vh;
}
main{flex:1 0 auto}
article{
  max-width:1080px;
  margin-inline:auto;
  padding-inline:var(--pad);
  padding-bottom:clamp(30px,6vw,70px);
}

/* ---- 首屏 ---- */
.hero{
  position:relative;
  isolation:isolate;
  min-height:100vh;
  min-height:100svh;
  margin-inline:calc(-1 * var(--pad));
  display:grid;
  align-items:end;
  padding:clamp(24px,5vw,70px);
  overflow:hidden;
}
.hero-media{
  position:absolute;
  inset:-8% 0 -14% 0;
  z-index:-2;
  background:linear-gradient(150deg,#12362e,#081d19 70%);
  will-change:transform;
}
.hero-media .hero-img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  filter:saturate(.92) contrast(1.04);
}
.hero-mask{
  position:absolute;
  inset:0;
  z-index:-1;
  background:
    linear-gradient(104deg,rgba(9,32,25,.94) 0%,rgba(9,32,25,.55) 46%,rgba(9,32,25,.9) 100%),
    linear-gradient(180deg,rgba(7,26,23,.72),transparent 32%,rgba(14,43,37,.98));
}
.hero-copy{
  max-width:min(640px,100%);
  margin-left:auto;
  text-align:right;
}
.hero-copy h1{
  margin:0 0 .4em;
  font-size:clamp(1.9rem,5.4vw,4rem);
  line-height:1.1;
  font-weight:600;
  letter-spacing:-.02em;
  text-wrap:balance;
}
.hero-desc{
  margin:0 0 .2em;
  margin-left:auto;
  max-width:34ch;
  font-size:1.05rem;
  line-height:1.7;
  color:rgba(237,231,218,.8);
}
.hero-copy > *{animation:rise .9s var(--ease) both}
.hero-copy > *:nth-child(2){animation-delay:.14s}

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

/* ---- 正文章节 ---- */
article > div:not(.hero){
  padding:clamp(44px,7vw,88px) 0;
  border-top:1px solid var(--line);
  scroll-margin-top:86px;
}

article h2{
  margin:0 0 .7em;
  font-size:clamp(1.45rem,3.2vw,2.15rem);
  line-height:1.28;
  font-weight:600;
  letter-spacing:-.01em;
}
article h2 > span,
article h3 > span{
  display:inline-block;
  padding-bottom:.12em;
  border-bottom:3px solid var(--gold);
}
article h3{
  margin:1.7em 0 .6em;
  font-size:clamp(1.15rem,2.2vw,1.45rem);
  line-height:1.35;
  font-weight:600;
}
article p{margin:0 0 1.1em;color:rgba(237,231,218,.86)}
article ul,article ol{margin:0 0 1.25em;padding-left:1.3em;color:rgba(237,231,218,.86)}
article li{margin:.35em 0}
article li::marker{color:var(--gold)}
article strong{color:#fff8ea}
article a{
  color:var(--gold);
  text-decoration:underline;
  text-underline-offset:.22em;
  text-decoration-thickness:1px;
}
article a:hover{color:#f0d3a0}
article img{
  display:block;
  height:auto;
  margin:1.5em 0;
  border-radius:18px;
  box-shadow:0 22px 46px rgba(0,0,0,.42);
}
article figure{margin:1.6em 0}
article figcaption{margin-top:.55em;font-size:1rem;color:rgba(237,231,218,.58)}
article blockquote{
  margin:1.5em 0;
  padding:.3em 0 .3em 1.1em;
  border-left:2px solid var(--gold);
  color:rgba(237,231,218,.82);
}
article hr{border:0;border-top:1px solid var(--line);margin:2em 0}
article code,article pre{
  font-family:ui-monospace,Menlo,Consolas,monospace;
  font-size:.95rem;
}
article pre{
  overflow-x:auto;
  padding:1em 1.1em;
  border-radius:18px;
  background:rgba(7,26,23,.7);
  border:1px solid var(--line);
}

/* ---- 滚动显现 ---- */
.rv{
  opacity:0;
  transform:translateY(28px);
  transition:opacity .75s var(--ease), transform .75s var(--ease);
  will-change:opacity,transform;
}
.rv.in{opacity:1;transform:none}

/* ---- 页脚 ---- */
footer{
  padding:26px var(--pad) 54px;
  border-top:1px solid var(--line);
  display:flex;
  flex-direction:column;
  gap:6px;
  color:rgba(237,231,218,.5);
  font-size:1rem;
}
footer p{margin:0;color:rgba(237,231,218,.66)}
footer small{font-size:1rem;letter-spacing:.02em}

/* ---- 移动端 ---- */
@media (max-width:900px){
  .rail{
    position:sticky;
    inset:auto;
    top:0;
    width:auto;
    height:auto;
    flex-direction:row;
    align-items:center;
    gap:10px;
    padding:8px 14px;
    border-right:0;
    border-bottom:1px solid var(--line);
    overflow:visible;
  }
  .rail-h{display:none}
  .brand{flex:0 0 auto;font-size:1rem}
  .rail-nav{flex:1 1 auto;min-width:0;overflow-x:auto;scrollbar-width:none}
  .rail-nav::-webkit-scrollbar{display:none}
  .rail-nav ul{flex-direction:row;gap:4px;width:max-content}
  .rail-nav ul.sub{display:flex;margin:0;padding-left:0;border-left:0}
  .rail-nav a{white-space:nowrap;padding:8px 12px;min-height:44px}
  .has-sub > a::after{display:none}
  .rail-contact{flex:0 0 auto;padding:0 14px}

  .content{margin-left:0}
  .hero{min-height:calc(100vh - 62px);min-height:calc(100svh - 62px);padding:22px}
  .hero-copy h1{font-size:clamp(1.75rem,7.6vw,2.6rem)}
  .hero-desc{font-size:1rem}
  article > div:not(.hero){scroll-margin-top:70px}
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .bg-a,.bg-b,.hero-media{transform:none}
  .hero-copy > *{animation:none}
  .rv{opacity:1;transform:none;transition:none}
  .rail-nav a,.rail-contact{transition:none}
}

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