@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:#1B1B1F;
  --ink-2:#26262C;
  --ink-3:#35353E;
  --paper:#F6F3EA;
  --mute:#A9A6A0;
  --yellow:#F5C518;
  --orange:#E4572E;
  --pad:clamp(16px,4.5vw,44px);
  --font-body:"Quicksand",system-ui,-apple-system,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
  --font-head:"Caveat","Kaiti SC",STKaiti,KaiTi,"Songti SC",serif;
}

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

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

body{
  margin:0;
  padding-bottom:86px;
  background:var(--ink);
  color:var(--paper);
  font-family:var(--font-body);
  font-size:17px;
  font-weight:500;
  line-height:1.75;
  overflow-x:hidden;
  overflow-wrap:break-word;
}

img{max-width:100%;display:block}
a{color:var(--yellow)}
p{margin:0 0 1.05em}
h1,h2,h3,h4{
  font-family:var(--font-head);
  font-weight:700;
  line-height:1.16;
  margin:0 0 .55em;
}

::selection{background:var(--yellow);color:var(--ink)}

/* ---- 角落品牌图标 ---- */
.brandmark{
  position:fixed;
  top:14px;
  left:14px;
  z-index:70;
  width:54px;
  height:54px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:var(--yellow);
  color:var(--ink);
  border:2px solid var(--ink);
  border-radius:4px;
  text-decoration:none;
  font-family:var(--font-head);
  font-size:30px;
  line-height:1;
  transition:background .18s ease,transform .18s ease;
}
.brandmark:hover,.brandmark:focus-visible{background:var(--orange);color:var(--paper)}
.brandmark img{width:40px;height:40px;object-fit:contain}

/* ---- 骨架 ---- */
.shell{
  display:flex;
  align-items:flex-start;
  gap:clamp(20px,4vw,48px);
  max-width:1240px;
  margin:0 auto;
  padding:0 var(--pad);
}
.body{flex:1 1 auto;min-width:0}

/* ---- 首屏 ---- */
.hero{
  position:relative;
  min-height:100vh;
  min-height:100svh;
  display:flex;
  align-items:flex-end;
  padding:130px 0 104px;
  overflow:hidden;
  border-bottom:4px solid var(--yellow);
}
.hero-img{
  position:absolute;
  top:-10%;
  left:0;
  width:100%;
  height:120%;
  object-fit:cover;
  will-change:transform;
}
.hero-veil{
  position:absolute;
  inset:0;
  background:var(--ink);
  opacity:.74;
}
.hero-band{
  position:absolute;
  left:0;right:0;bottom:0;
  height:76px;
  background:var(--yellow);
  clip-path:polygon(0 66%,100% 0,100% 100%,0 100%);
  z-index:1;
}
.hero-in{position:relative;z-index:2;max-width:22ch}
.hero-in h1{
  margin:0;
  font-size:clamp(38px,8vw,84px);
  color:var(--paper);
  letter-spacing:.01em;
  text-wrap:balance;
}
.hero-in h1::after{
  content:"";
  display:block;
  width:92px;
  height:10px;
  margin-top:20px;
  background:var(--orange);
}

/* ---- 正文区块（瓜单便签） ---- */
article > div[id]{scroll-margin-top:86px}
article > div:not(.hero){
  position:relative;
  margin:24px 0;
  padding:clamp(22px,4vw,42px);
  background:var(--ink-2);
  border:2px solid var(--ink-3);
  border-bottom:7px solid var(--yellow);
  border-radius:28px;
  animation:rise .5s ease both;
}
article > div:not(.hero):nth-of-type(even){border-bottom-color:var(--orange)}
article > div:not(.hero)::after{
  content:"";
  position:absolute;
  top:18px;
  right:20px;
  width:12px;
  height:12px;
  background:var(--yellow);
  border-radius:50%;
}
article > div:not(.hero):nth-of-type(even)::after{background:var(--orange)}

article h2{
  font-size:clamp(24px,4vw,38px);
  color:var(--yellow);
}
article h2::before{
  content:"";
  display:inline-block;
  width:11px;
  height:11px;
  margin-right:12px;
  background:var(--orange);
  vertical-align:middle;
}
article h3{
  font-size:clamp(19px,2.7vw,25px);
  color:var(--orange);
}
article p{
  max-width:70ch;
  font-size:17px;
  line-height:1.85;
  color:#E8E4DB;
}
article ul,article ol{max-width:70ch;padding-left:1.35em}
article li{margin:.42em 0;line-height:1.8}
article strong{color:var(--yellow)}
article a{
  text-decoration-thickness:2px;
  text-underline-offset:3px;
}
article blockquote{
  margin:1.5em 0;
  padding:18px 22px;
  background:var(--ink-3);
  border-left:8px solid var(--yellow);
  border-radius:0 28px 28px 0;
}
article blockquote p:last-child{margin-bottom:0}
article img{
  margin:1.3em 0;
  border-radius:28px;
  border:3px solid var(--ink-3);
}
article hr{
  border:0;
  border-top:2px solid var(--ink-3);
  margin:2em 0;
}
article code{
  font-size:16px;
  background:var(--ink-3);
  padding:2px 6px;
  border-radius:4px;
}
article table{
  width:100%;
  border-collapse:collapse;
  margin:1.2em 0;
  font-size:16px;
}
article th,article td{
  border:2px solid var(--ink-3);
  padding:10px 12px;
  text-align:left;
}

/* ---- 右侧栏 ---- */
.rail{
  flex:0 0 290px;
  width:290px;
  position:sticky;
  top:96px;
  margin-top:96px;
  padding-left:22px;
  border-left:2px solid var(--ink-3);
}
.rail-title{
  font-size:28px;
  color:var(--yellow);
  margin-bottom:.4em;
}
.subtitle{
  font-size:16px;
  line-height:1.7;
  color:var(--mute);
  margin-bottom:20px;
}
.rail-list{
  list-style:none;
  margin:0;
  padding:0;
  border-top:2px solid var(--ink-3);
}
.rail-list li{border-bottom:2px solid var(--ink-3)}
.rail-list a{
  display:flex;
  align-items:center;
  min-height:46px;
  padding:6px 2px;
  color:var(--paper);
  font-size:16px;
  font-weight:700;
  text-decoration:none;
  transition:color .16s ease,padding-left .16s ease;
}
.rail-list a:hover,.rail-list a:focus-visible{color:var(--yellow);padding-left:8px}

/* ---- 底部固定条 ---- */
.dock{
  position:fixed;
  left:0;right:0;bottom:0;
  z-index:80;
  display:flex;
  background:var(--yellow);
  border-top:3px solid var(--ink);
}
.dock-nav{
  flex:1 1 auto;
  min-width:0;
  overflow-x:auto;
  scrollbar-width:thin;
}
.dock-nav ul{
  display:flex;
  margin:0;
  padding:0;
  list-style:none;
}
.dock-nav li{flex:0 0 auto}
.dock-nav a{
  display:flex;
  align-items:center;
  min-height:52px;
  padding:0 16px;
  color:var(--ink);
  font-size:16px;
  font-weight:700;
  white-space:nowrap;
  text-decoration:none;
  border-right:2px solid rgba(27,27,31,.18);
  transition:background .16s ease,color .16s ease;
}
.dock-nav a:hover,.dock-nav a:focus-visible,.dock-nav a.on{
  background:var(--ink);
  color:var(--yellow);
}
.dock-cta{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  min-height:52px;
  padding:0 20px;
  background:var(--orange);
  color:#fff;
  font-size:16px;
  font-weight:700;
  text-decoration:none;
  transition:background .16s ease;
}
.dock-cta:hover,.dock-cta:focus-visible{background:var(--ink);color:var(--yellow)}

/* ---- 页脚 ---- */
.foot{
  margin-top:56px;
  padding:clamp(30px,5vw,58px) var(--pad) calc(clamp(30px,5vw,58px) + 18px);
  display:grid;
  grid-template-columns:1.5fr 1fr 1fr;
  gap:clamp(18px,3vw,36px);
  background:var(--ink-2);
  border-top:5px solid var(--yellow);
}
.foot div{min-width:0}
.giant{
  margin:0;
  font-family:var(--font-head);
  font-size:clamp(42px,9vw,88px);
  line-height:.94;
  color:var(--yellow);
  letter-spacing:.01em;
}
.foot-nav ul{
  list-style:none;
  margin:0;
  padding:0;
  columns:2;
  column-gap:18px;
}
.foot-nav li{break-inside:avoid}
.foot-nav a{
  display:flex;
  align-items:center;
  min-height:42px;
  color:var(--paper);
  font-size:16px;
  font-weight:600;
  text-decoration:none;
  transition:color .16s ease;
}
.foot-nav a:hover,.foot-nav a:focus-visible{color:var(--yellow)}
.foot-meta{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  color:var(--mute);
  font-size:16px;
  border-left:2px solid var(--ink-3);
  padding-left:12px;
}
.foot-meta p{margin:0}

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

/* ---- 动效 ---- */
@keyframes rise{
  from{opacity:0;transform:translateY(16px)}
  to{opacity:1;transform:translateY(0)}
}
.dock-nav li,.rail-list li,.foot-nav li{animation:rise .42s ease both}
.dock-nav li:nth-child(2),.rail-list li:nth-child(2),.foot-nav li:nth-child(2){animation-delay:.05s}
.dock-nav li:nth-child(3),.rail-list li:nth-child(3),.foot-nav li:nth-child(3){animation-delay:.1s}
.dock-nav li:nth-child(4),.rail-list li:nth-child(4),.foot-nav li:nth-child(4){animation-delay:.15s}
.dock-nav li:nth-child(5),.rail-list li:nth-child(5),.foot-nav li:nth-child(5){animation-delay:.2s}
.dock-nav li:nth-child(6),.rail-list li:nth-child(6),.foot-nav li:nth-child(6){animation-delay:.25s}
.dock-nav li:nth-child(7),.rail-list li:nth-child(7),.foot-nav li:nth-child(7){animation-delay:.3s}
.hero-in{animation:rise .6s ease both}

/* ---- 窄屏 ---- */
@media (max-width:920px){
  .shell{flex-direction:column;gap:0}
  .rail{
    position:static;
    width:100%;
    flex:1 1 auto;
    margin-top:40px;
    padding:26px 0 0;
    border-left:0;
    border-top:2px solid var(--ink-3);
  }
  .rail-list{display:flex;flex-wrap:wrap;border-top:0}
  .rail-list li{
    flex:1 1 46%;
    border-bottom:0;
    border-top:2px solid var(--ink-3);
  }
  .foot{grid-template-columns:1fr}
  .foot-nav ul{columns:1}
  .foot-meta{
    border-left:0;
    border-top:2px solid var(--ink-3);
    padding:18px 0 0;
  }
}

@media (max-width:600px){
  body{font-size:17px;padding-bottom:80px}
  .hero{padding:118px 0 96px;min-height:92svh}
  .hero-in{max-width:none}
  .hero-band{height:52px}
  article > div:not(.hero){padding:22px 18px;border-radius:22px}
  .dock-nav a{padding:0 13px}
  .dock-cta{padding:0 16px}
}

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

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