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

:root{
  --cream:#f5e6c8;
  --tan:#d4a574;
  --ink:#262117;
  --paper:#fdf7ea;
  --line:rgba(38,33,23,.16);
  --soft:0 12px 28px rgba(38,33,23,.13);
  --rail:240px;
}

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

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

body{
  margin:0;
  background:var(--cream);
  color:var(--ink);
  font-family:"Open Sans","PingFang SC","Hiragino Sans GB","Microsoft YaHei",system-ui,sans-serif;
  font-size:17px;
  line-height:1.78;
  overflow-x:hidden;
}

/* 胶片颗粒 */
body::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:60;
  pointer-events:none;
  opacity:.34;
  mix-blend-mode:multiply;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23g)' opacity='0.42'/%3E%3C/svg%3E");
}

/* 漏光 */
body::after{
  content:"";
  position:fixed;
  inset:0;
  z-index:55;
  pointer-events:none;
  opacity:.5;
  mix-blend-mode:screen;
  background:
    radial-gradient(58vw 48vh at 4% 6%,rgba(255,228,172,.45),transparent 62%),
    radial-gradient(52vw 44vh at 97% 94%,rgba(212,165,116,.4),transparent 64%);
}

h1,h2,h3,h4,summary,.brand,.cta,.foot-logo{
  font-family:"Poppins","Open Sans","PingFang SC","Microsoft YaHei",system-ui,sans-serif;
}

a{color:inherit}

:focus-visible{
  outline:2px solid #7a4a1f;
  outline-offset:2px;
}

/* ============ 左侧竖排导航（aside 固定于内容左侧） ============ */
.rail{
  position:fixed;
  top:0;
  left:0;
  bottom:0;
  width:var(--rail);
  z-index:20;
  display:flex;
  flex-direction:column;
  gap:20px;
  padding:26px 18px 24px;
  overflow-y:auto;
  background:linear-gradient(180deg,#f9eed6,#f1dfbe 72%,#eed9b4);
  border-right:1px solid var(--line);
  box-shadow:6px 0 26px rgba(38,33,23,.07);
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:46px;
  text-decoration:none;
  color:var(--ink);
  font-weight:600;
  font-size:17px;
  letter-spacing:.01em;
}

.brand-mark{
  flex:0 0 auto;
  width:36px;
  height:36px;
  border-radius:9px;
  object-fit:contain;
  background:var(--tan);
  box-shadow:0 4px 12px rgba(38,33,23,.2);
}

.brand-mark--txt{
  display:flex;
  align-items:center;
  justify-content:center;
  color:#fff8e9;
  font-weight:600;
  font-size:17px;
}

.brand-name{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.rail-h{
  margin:0;
  font-size:13px;
  font-weight:600;
  letter-spacing:.22em;
  color:rgba(38,33,23,.55);
}

.rail-h > span{display:inline-block}

.rail-nav{display:block}

.navdrop summary{
  list-style:none;
  display:flex;
  align-items:center;
  gap:10px;
  min-height:46px;
  padding:0 14px;
  border:1px solid var(--line);
  border-radius:10px;
  background:var(--paper);
  box-shadow:0 6px 16px rgba(38,33,23,.09);
  font-weight:600;
  font-size:16px;
  cursor:pointer;
  user-select:none;
}

.navdrop summary::-webkit-details-marker{display:none}

.burger{
  position:relative;
  display:inline-block;
  width:16px;
  height:10px;
}

.burger::before,.burger::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  height:2px;
  border-radius:2px;
  background:var(--ink);
}

.burger::before{top:0}
.burger::after{bottom:0}

.navdrop menu{
  list-style:none;
  margin:8px 0 0;
  padding:0;
  display:grid;
  gap:2px;
}

.navdrop menu a{
  display:flex;
  align-items:center;
  min-height:44px;
  padding:8px 12px;
  border-radius:9px;
  font-size:16px;
  line-height:1.4;
  text-decoration:none;
  color:var(--ink);
  transition:background .22s ease,transform .22s ease;
}

.navdrop menu a:hover{
  background:var(--tan);
  color:#2b2318;
  transform:translateX(3px);
}

.cta{
  margin-top:auto;
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:48px;
  padding:0 16px;
  border-radius:10px;
  background:var(--ink);
  color:#f8ecd4;
  text-decoration:none;
  font-size:15px;
  font-weight:600;
  letter-spacing:.06em;
  box-shadow:0 10px 20px rgba(38,33,23,.24);
  transition:transform .25s ease,background .25s ease;
}

.cta:hover{
  transform:translateY(-2px);
  background:#3b3124;
}

/* ============ 主区域 ============ */
main{margin-left:var(--rail)}

.hero{
  position:relative;
  isolation:isolate;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:flex-end;
  text-align:right;
  min-height:100svh;
  padding:clamp(92px,14vh,170px) clamp(22px,5vw,68px) clamp(70px,12vh,120px);
  overflow:hidden;
  color:#fdf6e7;
  background-color:var(--ink);
  background-image:
    radial-gradient(rgba(212,165,116,.34) 1px,transparent 1px),
    linear-gradient(160deg,#2d2719,#1a1610);
  background-size:22px 22px,100% 100%;
}

.hero-media{
  position:absolute;
  inset:0;
  z-index:0;
}

.hero-shot{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  filter:sepia(.46) contrast(1.08) saturate(.7) brightness(.8);
}

.hero-veil{
  position:absolute;
  inset:0;
  z-index:1;
  background:linear-gradient(256deg,rgba(19,16,10,.92),rgba(19,16,10,.46) 56%,rgba(19,16,10,.74));
}

.hero-copy{
  position:relative;
  z-index:2;
  width:100%;
  max-width:640px;
}

.hero-h1{
  margin:0 0 16px;
  font-size:clamp(2.05rem,5.2vw,3.4rem);
  font-weight:600;
  line-height:1.16;
  letter-spacing:-.015em;
  color:#fdf6e7;
  text-shadow:0 3px 20px rgba(0,0,0,.4);
}

.hero-h1.vhs{animation:vhs .82s steps(3,end) 1}

@keyframes vhs{
  0%{transform:skewX(0) translateX(0);opacity:1}
  28%{transform:skewX(-1.5deg) translateX(-4px);opacity:.82}
  58%{transform:skewX(1.1deg) translateX(3px);opacity:1}
  100%{transform:none}
}

.hero-lede{
  margin:0 0 0 auto;
  max-width:40ch;
  font-size:16px;
  line-height:1.8;
  color:rgba(253,246,231,.85);
}

.hero-scroll{
  position:absolute;
  left:clamp(22px,5vw,68px);
  bottom:34px;
  z-index:2;
  width:1px;
  height:58px;
  background:linear-gradient(rgba(253,246,231,.08),rgba(253,246,231,.75));
}

.hero-scroll::after{
  content:"";
  position:absolute;
  left:-3px;
  bottom:0;
  width:7px;
  height:7px;
  border-radius:50%;
  background:var(--tan);
  animation:drip 2.6s ease-in-out infinite;
}

@keyframes drip{
  0%,100%{transform:translateY(0);opacity:.25}
  50%{transform:translateY(48px);opacity:1}
}

/* ============ 正文卡带 ============ */
.prose{
  max-width:790px;
  margin:0 auto;
  padding:clamp(26px,4.4vw,54px) clamp(16px,4vw,34px) 64px;
  overflow-wrap:break-word;
}

.prose > div{
  position:relative;
  margin:0 0 22px;
  padding:clamp(20px,3.4vw,34px);
  border:1px solid var(--line);
  border-radius:10px;
  background:var(--paper);
  box-shadow:var(--soft);
  scroll-margin-top:96px;
  transition:box-shadow .3s ease,transform .3s ease;
}

.prose > div:hover{
  transform:translateY(-3px);
  box-shadow:0 18px 34px rgba(38,33,23,.16);
}

.prose > div:last-child{margin-bottom:0}

.js .prose > div{
  opacity:0;
  transform:translateY(16px);
  transition:opacity .62s ease,transform .62s ease,box-shadow .3s ease;
}

.js .prose > div.in{
  opacity:1;
  transform:none;
}

.js .prose > div.in:hover{transform:translateY(-3px)}

.prose h2{
  margin:0 0 14px;
  font-size:clamp(1.24rem,2.4vw,1.62rem);
  font-weight:600;
  line-height:1.36;
  letter-spacing:-.005em;
}

.prose h2 > span{
  padding:0 .1em;
  background:linear-gradient(transparent 64%,rgba(212,165,116,.55) 64%);
}

.prose h3{
  margin:22px 0 10px;
  font-size:clamp(1.06rem,1.9vw,1.24rem);
  font-weight:600;
  line-height:1.45;
}

.prose h3 > span{
  padding:0 .08em;
  background:linear-gradient(transparent 70%,rgba(212,165,116,.42) 70%);
}

.prose p{margin:0 0 1em}
.prose p:last-child{margin-bottom:0}

.prose a{
  color:#7a4a1f;
  text-decoration:underline;
  text-decoration-color:var(--tan);
  text-decoration-thickness:2px;
  text-underline-offset:3px;
}

.prose a:hover{color:var(--ink);text-decoration-color:var(--ink)}

.prose ul,.prose ol{
  margin:0 0 1em;
  padding-left:1.3em;
}

.prose li{margin:0 0 .45em}

.prose blockquote{
  margin:18px 0;
  padding:12px 18px;
  border-left:4px solid var(--tan);
  border-radius:0 10px 10px 0;
  background:rgba(212,165,116,.18);
  color:#3c3325;
}

.prose blockquote p:last-child{margin-bottom:0}

.prose img{
  display:block;
  max-width:100%;
  height:auto;
  margin:20px 0;
  padding:9px 9px 9px;
  background:#fffaf0;
  border-radius:3px;
  box-shadow:0 10px 22px rgba(38,33,23,.2);
  transform:rotate(-.6deg);
  filter:sepia(.2) contrast(1.03) saturate(.9);
}

.prose figure{margin:20px 0}
.prose figure img{margin:0}

.prose figcaption{
  margin-top:8px;
  font-size:15px;
  color:rgba(38,33,23,.66);
  text-align:center;
}

.prose table{
  width:100%;
  border-collapse:collapse;
  font-size:16px;
}

.prose th,.prose td{
  padding:9px 12px;
  border-bottom:1px solid var(--line);
  text-align:left;
}

.prose code{
  padding:2px 6px;
  border-radius:6px;
  background:rgba(38,33,23,.08);
  font-size:15px;
}

.prose time{
  font-size:15px;
  color:rgba(38,33,23,.62);
}

/* ============ 页脚（单行：品牌 + 导航 + 版权） ============ */
.foot{
  margin-left:var(--rail);
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:18px;
  padding:24px clamp(18px,4vw,46px);
  border-top:1px solid var(--line);
  background:#f2e1bf;
}

.js .foot{
  opacity:0;
  transition:opacity .6s ease;
}

.js .foot.in{opacity:1}

.foot-brand{display:flex;align-items:center}

.foot-logo{
  display:flex;
  align-items:center;
  min-height:44px;
  font-size:16px;
  font-weight:600;
  color:var(--ink);
  text-decoration:none;
}

.foot-nav{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.foot-h{
  margin:0;
  font-size:13px;
  font-weight:600;
  letter-spacing:.18em;
  color:rgba(38,33,23,.55);
}

.foot-nav ul{
  list-style:none;
  display:flex;
  flex-wrap:wrap;
  gap:2px;
  margin:0;
  padding:0;
}

.foot-nav a{
  display:flex;
  align-items:center;
  min-height:42px;
  padding:0 10px;
  border-radius:8px;
  font-size:16px;
  color:var(--ink);
  text-decoration:none;
  transition:background .22s ease,color .22s ease;
}

.foot-nav a:hover{
  background:var(--tan);
  color:#2b2318;
}

.foot-copy{
  margin:0;
  font-size:14px;
  color:rgba(38,33,23,.72);
}

/* ============ 移动端：竖排导航变顶栏 ============ */
@media (max-width:899px){
  .rail{
    position:sticky;
    top:0;
    left:auto;
    bottom:auto;
    width:auto;
    flex-direction:row;
    align-items:center;
    gap:10px;
    padding:8px 12px;
    overflow:visible;
    border-right:0;
    border-bottom:1px solid var(--line);
    box-shadow:0 6px 18px rgba(38,33,23,.12);
  }

  .brand{flex:1 1 auto;min-width:0;gap:8px}
  .brand-mark{width:32px;height:32px;border-radius:8px}
  .brand-name{font-size:16px}
  .rail-h{display:none}
  .rail-nav{flex:0 0 auto}

  .navdrop{position:relative}

  .navdrop summary{
    min-height:44px;
    padding:0 12px;
    box-shadow:0 4px 12px rgba(38,33,23,.1);
    font-size:15px;
  }

  .navdrop menu{
    position:absolute;
    top:calc(100% + 10px);
    right:0;
    width:min(76vw,300px);
    max-height:68vh;
    overflow:auto;
    margin:0;
    padding:8px;
    background:var(--paper);
    border:1px solid var(--line);
    border-radius:12px;
    box-shadow:0 18px 36px rgba(38,33,23,.22);
    z-index:40;
  }

  .cta{margin-top:0;flex:0 0 auto;min-height:44px;padding:0 14px;font-size:15px}

  main{margin-left:0}

  .hero{
    min-height:100svh;
    padding:clamp(64px,12vh,120px) 20px 84px;
    align-items:flex-end;
  }

  .hero-lede{max-width:34ch}

  .hero-scroll{left:20px;bottom:26px}

  .prose > div{scroll-margin-top:82px}

  .foot{
    margin-left:0;
    flex-direction:column;
    align-items:center;
    text-align:center;
    gap:12px;
    padding:26px 16px 34px;
  }

  .foot-nav{justify-content:center}
  .foot-nav ul{justify-content:center}
}

@media (max-width:420px){
  .brand-name{font-size:15px}
  .cta{padding:0 10px;letter-spacing:.02em}
  .hero-h1{font-size:clamp(1.9rem,8.4vw,2.4rem)}
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}

  *,*::before,*::after{
    animation-duration:.001ms !important;
    animation-iteration-count:1 !important;
    transition-duration:.001ms !important;
  }

  .js .prose > div,
  .js .foot{
    opacity:1;
    transform:none;
  }
}

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