@import url('https://fonts.googleapis.com/css2?family=Amatic+SC:wght@400;700&family=Cabin:wght@400;500;600;700&display=swap');

:root{
  --paper:#fafaf8;
  --paper-2:#f1f1eb;
  --mid:#4a4a4a;
  --ink:#1a1a1a;
  --bar-h:64px;
  --rule:1.5px solid var(--ink);
  --hand:'Amatic SC','Cabin',system-ui,-apple-system,'Hiragino Sans GB','Microsoft YaHei',sans-serif;
  --body:'Cabin',system-ui,-apple-system,'Hiragino Sans GB','Microsoft YaHei',sans-serif;
  --squiggle:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 12' preserveAspectRatio='none'><path d='M2 8C58 2 116 11 176 5s86 5 122-1' fill='none' stroke='%231a1a1a' stroke-width='2.6' stroke-linecap='round'/></svg>");
  --grain:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='g'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='160' height='160' filter='url(%23g)' opacity='.3'/></svg>");
}

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

html{
  scroll-behavior:smooth;
  scroll-padding-bottom:calc(var(--bar-h) + 16px);
  -webkit-text-size-adjust:100%;
}

body{
  margin:0;
  padding-bottom:calc(var(--bar-h) + 16px);
  background:var(--paper);
  color:var(--ink);
  font-family:var(--body);
  font-size:17px;
  line-height:1.8;
  overflow-x:hidden;
}

body::before{
  content:'';
  position:fixed;
  inset:0;
  z-index:0;
  pointer-events:none;
  opacity:.55;
  background-image:var(--grain);
  background-size:160px 160px;
}

img{max-width:100%;height:auto}

a{color:var(--ink)}

:focus-visible{outline:2px dashed var(--ink);outline-offset:3px}

/* 底部固定条 */
.bar{
  position:fixed;
  left:0;
  right:0;
  bottom:0;
  z-index:40;
  display:flex;
  align-items:center;
  gap:8px;
  padding:8px 10px calc(8px + env(safe-area-inset-bottom));
  background:var(--paper);
  border-top:2px solid var(--ink);
  box-shadow:0 -1px 0 rgba(26,26,26,.18);
}

.brand{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  min-height:44px;
  padding:6px 8px;
  font-family:var(--hand);
  font-size:1.7rem;
  font-weight:700;
  letter-spacing:.08em;
  line-height:1;
  color:var(--ink);
  text-decoration:none;
  white-space:nowrap;
  transform:rotate(-1.4deg);
}

.bar-nav{
  flex:1 1 auto;
  min-width:0;
  overflow-x:auto;
  scrollbar-width:none;
  -ms-overflow-style:none;
}

.bar-nav::-webkit-scrollbar{display:none}

.bar-nav p{
  display:flex;
  align-items:center;
  gap:2px;
  margin:0;
  padding:0;
  white-space:nowrap;
}

.bar-nav a{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding:4px 9px;
  font-size:1rem;
  line-height:1.25;
  color:var(--ink);
  text-decoration:none;
  border-bottom:2px solid transparent;
}

.bar-nav a:hover,
.bar-nav a:focus-visible{border-bottom-color:var(--ink);background:rgba(26,26,26,.06)}

.bar-call{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding:6px 12px;
  border:var(--rule);
  font-size:1rem;
  text-decoration:none;
  transform:rotate(-1deg);
  background:var(--ink);
  color:var(--paper);
}

.bar-call:hover{background:var(--paper);color:var(--ink)}

/* 首屏 */
.hero{
  position:relative;
  z-index:1;
  min-height:100vh;
  min-height:100svh;
  display:grid;
  place-items:center;
  overflow:hidden;
  padding:70px 22px calc(var(--bar-h) + 56px);
  border-bottom:2px solid var(--ink);
  background-color:var(--paper);
  background-image:radial-gradient(rgba(26,26,26,.2) 1px,transparent 1.5px);
  background-size:16px 16px;
}

.hero-media{position:absolute;inset:0;overflow:hidden}

.hero-media img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  filter:grayscale(1) contrast(1.15);
  opacity:.42;
}

.hero-media::after{
  content:'';
  position:absolute;
  inset:0;
  background:linear-gradient(155deg,rgba(250,250,248,.82),rgba(250,250,248,.42) 52%,rgba(250,250,248,.9));
}

.hero-copy{
  position:relative;
  z-index:2;
  width:100%;
  max-width:880px;
  text-align:center;
}

.hero h1{
  margin:0;
  font-family:var(--hand);
  font-weight:700;
  font-size:clamp(3rem,11vw,6.4rem);
  line-height:1.04;
  letter-spacing:.05em;
  transform:rotate(-.8deg);
  text-wrap:balance;
}

.hero h1::after{
  content:'';
  display:block;
  height:12px;
  width:min(320px,66%);
  margin:14px auto 0;
  background:var(--squiggle) no-repeat center/100% 100%;
  transform:rotate(-1deg);
}

.hero-edge{
  position:absolute;
  left:0;
  right:0;
  bottom:-2px;
  height:54px;
  z-index:2;
  background:var(--paper);
  clip-path:polygon(0 100%,0 46%,13% 62%,30% 32%,49% 66%,67% 36%,84% 62%,100% 40%,100% 100%);
}

/* 主体 */
main{
  position:relative;
  z-index:1;
  display:grid;
  grid-template-columns:240px minmax(0,1fr);
  gap:34px;
  align-items:start;
  max-width:1050px;
  margin:0 auto;
  padding:46px 22px 36px;
}

.rail{
  position:sticky;
  top:26px;
  border:var(--rule);
  background:rgba(255,255,255,.7);
  padding:16px 14px 10px;
  transform:rotate(-.7deg);
}

.rail h2{
  margin:0 0 6px;
  font-family:var(--hand);
  font-size:1.8rem;
  font-weight:700;
  letter-spacing:.08em;
  line-height:1.05;
}

.rail hr{
  border:0;
  height:2px;
  width:46px;
  margin:0 0 10px;
  background:var(--ink);
  transform:rotate(-1.6deg);
}

.rail-list{list-style:none;margin:0;padding:0;font-size:1rem}

.rail-list a{
  display:flex;
  align-items:center;
  min-height:42px;
  padding:4px 3px;
  color:var(--ink);
  text-decoration:none;
  line-height:1.35;
  border-bottom:1px dashed rgba(26,26,26,.4);
}

.rail-list a:hover,
.rail-list a.on{background:var(--ink);color:var(--paper)}

article.sheet{min-width:0;max-width:730px}

article > section{
  position:relative;
  border:var(--rule);
  background:rgba(255,255,255,.66);
  padding:26px 22px 30px;
  margin:0 0 32px;
  transform:rotate(-.22deg);
  scroll-margin-top:26px;
}

article > section:nth-of-type(even){transform:rotate(.24deg)}

article > section::before{
  content:'';
  position:absolute;
  top:-11px;
  left:30px;
  width:74px;
  height:19px;
  background:rgba(74,74,74,.14);
  border:1px solid rgba(26,26,26,.2);
  transform:rotate(-3.5deg);
}

section > article > *:first-child{margin-top:0}

section > article h2{
  margin:0 0 4px;
  font-family:var(--hand);
  font-size:clamp(1.7rem,3.8vw,2.3rem);
  font-weight:700;
  line-height:1.16;
  letter-spacing:.03em;
  transform:rotate(-.4deg);
  transform-origin:left center;
}

section > article h3{
  margin:26px 0 8px;
  font-size:1.22rem;
  font-weight:600;
  line-height:1.45;
  border-bottom:1px dashed rgba(26,26,26,.45);
  padding-bottom:6px;
}

section > article p{margin:0 0 1.05em}

section > article hr{
  border:0;
  height:9px;
  width:124px;
  margin:2px 0 18px;
  background:var(--squiggle) no-repeat left center/100% 100%;
}

section > article ul,
section > article ol{margin:0 0 1.1em;padding-left:1.35em}

section > article li{margin:.34em 0}

section > article a{
  color:var(--ink);
  text-decoration:underline;
  text-decoration-thickness:2px;
  text-underline-offset:3px;
}

section > article a:hover{background:rgba(26,26,26,.09)}

section > article img{
  display:block;
  margin:18px 0;
  border:var(--rule);
  filter:grayscale(.85) contrast(1.06);
  transform:rotate(-.4deg);
}

section > article figure{margin:20px 0}

section > article blockquote{
  margin:20px 0;
  padding:6px 0 6px 16px;
  border-left:3px solid var(--ink);
  color:var(--mid);
  font-style:italic;
}

section > article table{
  width:100%;
  border-collapse:collapse;
  margin:18px 0;
  font-size:1rem;
}

section > article th,
section > article td{
  border:1px solid rgba(26,26,26,.55);
  padding:9px 10px;
  text-align:left;
  vertical-align:top;
}

section > article th{background:rgba(26,26,26,.07)}

section > article code{
  font-size:.95rem;
  background:rgba(26,26,26,.08);
  padding:1px 5px;
}

section > article pre{
  overflow-x:auto;
  padding:14px;
  border:1px dashed rgba(26,26,26,.5);
  background:rgba(255,255,255,.8);
}

section > article pre code{background:none;padding:0}

/* 页脚 */
footer{
  position:relative;
  z-index:1;
  max-width:1050px;
  margin:0 auto;
  padding:38px 22px calc(var(--bar-h) + 40px);
  border-top:2px solid var(--ink);
  background:var(--paper-2);
  display:grid;
  grid-template-columns:1.5fr 1fr 1fr;
  gap:26px;
  align-items:start;
}

footer article{min-width:0}

footer article + article{
  border-top:1px dashed rgba(26,26,26,.45);
  padding-top:16px;
}

.cta{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:78px;
  padding:12px 26px;
  border:2px solid var(--ink);
  background:var(--ink);
  color:var(--paper);
  font-family:var(--hand);
  font-size:2.1rem;
  font-weight:700;
  letter-spacing:.16em;
  text-decoration:none;
  transform:rotate(-1.1deg);
}

.cta:hover{background:var(--paper);color:var(--ink)}

.foot-list{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  flex-wrap:wrap;
  gap:2px 6px;
  font-size:1rem;
}

.foot-list a{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding:2px 6px;
  color:var(--ink);
  text-decoration:none;
  border-bottom:1px dashed rgba(26,26,26,.45);
}

.foot-list a:hover{background:var(--ink);color:var(--paper)}

.foot-copy{display:flex;align-items:center;justify-content:center;min-height:44px}

.copy{
  margin:0;
  text-align:center;
  font-size:1rem;
  letter-spacing:.1em;
  color:var(--mid);
}

/* 滚动显现 */
.reveal{
  opacity:0;
  transform:translateY(16px) rotate(-.2deg);
  transition:opacity .5s ease-out,transform .5s ease-out;
}

.reveal.in{opacity:1;transform:rotate(-.1deg)}

@media (min-width:861px){
  footer article + article{
    border-top:0;
    padding-top:0;
    border-left:1px dashed rgba(26,26,26,.45);
    padding-left:22px;
  }
}

@media (max-width:860px){
  main{grid-template-columns:minmax(0,1fr);gap:26px;padding:32px 16px 24px}
  .rail{position:static;transform:rotate(-.6deg)}
  .rail-list{display:grid;grid-template-columns:1fr 1fr;gap:0 10px}
  section.sheet{max-width:none}
  footer{grid-template-columns:minmax(0,1fr);gap:18px;text-align:center;padding-left:16px;padding-right:16px}
  .foot-list{justify-content:center}
  .brand{font-size:1.5rem;padding:6px}
  .bar-call{padding:6px 10px}
}

@media (max-width:420px){
  body{font-size:16px}
  .hero{padding:56px 16px calc(var(--bar-h) + 52px)}
  section > article{padding:22px 16px 26px}
  .rail-list{grid-template-columns:1fr}
  .cta{font-size:1.8rem;min-height:70px}
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .reveal{opacity:1;transform:none;transition:none}
  .bar-nav a,.rail-list a,.foot-list a{transition:none}
}

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