@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&family=Syncopate:wght@400;700&display=swap');

:root{
  --blue:#3bb1ff;
  --red:#ff5252;
  --ink:#000;
  --paper:#fdf8ee;
  --card:#ffffff;
  --bd:3px solid #000;
  --sh:6px 6px 0 #000;
  --head:'Syncopate','PingFang SC','Hiragino Sans GB','Microsoft YaHei',system-ui,sans-serif;
  --body:'Space Mono','PingFang SC','Hiragino Sans GB','Microsoft YaHei',system-ui,sans-serif;
}

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

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

body{
  margin:0;
  background:var(--paper);
  color:var(--ink);
  font-family:var(--body);
  font-size:17px;
  line-height:1.75;
  overflow-x:hidden;
}

h1,h2,h3{font-family:var(--head);font-weight:700;letter-spacing:.01em}
a{color:inherit}
img{max-width:100%}
:focus-visible{outline:4px solid var(--red);outline-offset:3px}

.wrap{display:block}
main article[id]{scroll-margin-top:22px}

/* 顶栏 */
.bar{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:9px 10px;
  background:var(--card);
  border-bottom:var(--bd);
}

.brand{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:44px;
  margin:0 auto;
  padding:6px 14px;
  background:var(--red);
  border:var(--bd);
  border-radius:12px;
  box-shadow:4px 4px 0 #000;
  text-decoration:none;
  font-family:var(--head);
  font-weight:700;
  font-size:16px;
  letter-spacing:.08em;
  white-space:nowrap;
}

.bar__nav{flex:0 0 100%}

.bar__list{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:4px;
  margin:0;
  padding:0;
  list-style:none;
}

.bar__list a{
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:44px;
  padding:6px 10px;
  font-size:16px;
  text-decoration:none;
  border:2px solid transparent;
  border-radius:10px;
}

.bar__list a::before{
  content:"";
  width:9px;
  height:9px;
  flex:none;
  background:var(--blue);
  border:2px solid #000;
}

.bar__list li:nth-child(2n) a::before{background:var(--red)}

.bar__list a:hover{
  background:var(--blue);
  border-color:#000;
  box-shadow:3px 3px 0 #000;
}

/* 首屏 */
.hero{
  background:var(--blue);
  border-bottom:var(--bd);
  padding:24px 0 34px;
}

.hero__box{
  width:min(1120px,92vw);
  margin:0 auto;
  display:grid;
  grid-template-columns:1fr;
  gap:20px;
}

.hero__copy{order:-1;text-align:right}

.hero__copy h1{
  margin:0;
  font-size:clamp(1.7rem,7.6vw,2.4rem);
  line-height:1.12;
  text-shadow:3px 3px 0 #fff;
}

.collage{position:relative;min-height:240px}

.shot{
  position:absolute;
  overflow:hidden;
  background:#fff;
  border:var(--bd);
  border-radius:28px;
  box-shadow:8px 8px 0 #000;
}

.shot--a{inset:0 26% 22% 0;transform:rotate(-3deg)}
.shot--b{inset:26% 0 0 32%;transform:rotate(2.4deg)}
.shot--void{background:#fff}
.shot--b.shot--void{background:var(--red)}
.shot__img{display:block;width:100%;height:100%;object-fit:cover}

.chip{
  position:absolute;
  width:24px;
  height:24px;
  background:#fff;
  border:var(--bd);
  z-index:3;
}

.chip--a{top:-4px;right:18%;transform:rotate(45deg);background:var(--red)}
.chip--b{bottom:10%;left:4%;transform:rotate(45deg)}

/* 正文与侧栏 */
.deck{
  width:min(1180px,94vw);
  margin:0 auto;
  padding:34px 0 56px;
  display:grid;
  grid-template-columns:1fr;
  gap:26px;
  align-items:start;
}

.prose{
  min-width:0;
  padding:20px;
  background:var(--card);
  border:var(--bd);
  border-radius:28px;
  box-shadow:var(--sh);
}

.prose>*:first-child{margin-top:0}
.prose article+article{margin-top:30px;padding-top:28px;border-top:3px solid #000}

.prose h2{
  margin:0 0 10px;
  font-size:clamp(1.25rem,5vw,1.7rem);
  line-height:1.3;
}

.prose h3{margin:22px 0 8px;font-size:1.12rem;line-height:1.4}
.prose p{margin:0 0 14px}
.prose ul,.prose ol{margin:0 0 16px;padding-left:1.35em}
.prose li{margin:.35em 0}

.prose a{
  text-decoration:none;
  border-bottom:3px solid var(--blue);
}

.prose a:hover{background:var(--blue)}

.prose img{
  display:block;
  max-width:100%;
  height:auto;
  margin:16px 0;
  border:var(--bd);
  border-radius:20px;
}

.prose blockquote{
  margin:18px 0;
  padding:12px 16px;
  background:var(--paper);
  border:3px solid #000;
  border-left:9px solid var(--blue);
  border-radius:16px;
}

.prose table{width:100%;border-collapse:collapse;font-size:16px}
.prose th,.prose td{border:2px solid #000;padding:8px;text-align:left}
.prose article:last-child p:last-child{margin-bottom:0}

.side{
  padding:18px;
  background:var(--card);
  border:var(--bd);
  border-radius:28px;
  box-shadow:var(--sh);
}

.side h2{margin:0 0 8px;font-size:1.1rem;letter-spacing:.06em}

.side .subtitle{
  display:inline-block;
  margin:0 0 14px;
  padding:2px 9px;
  font-size:16px;
  background:var(--blue);
  border:2px solid #000;
  border-radius:8px;
}

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

.side__list li+li{margin-top:8px}

.side__list a{
  display:flex;
  align-items:center;
  gap:9px;
  min-height:44px;
  padding:6px 10px;
  font-size:16px;
  text-decoration:none;
  background:var(--paper);
  border:2px solid #000;
  border-radius:12px;
  transition:transform .15s ease,box-shadow .15s ease;
}

.side__list a::before{
  counter-increment:s;
  content:counter(s,decimal-leading-zero);
  font-family:var(--head);
  font-size:12px;
  font-weight:700;
  padding:1px 5px;
  background:var(--red);
  border:2px solid #000;
  border-radius:6px;
}

.side__list a:hover{
  transform:translate(-2px,-2px);
  box-shadow:4px 4px 0 #000;
  background:var(--blue);
}

/* 页脚 */
.foot{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:18px 14px;
  background:#000;
  color:#fff;
  border-top:var(--bd);
}

.foot__brand{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding:6px 12px;
  background:var(--red);
  color:#000;
  border:var(--bd);
  border-radius:10px;
  text-decoration:none;
  font-family:var(--head);
  font-weight:700;
  font-size:16px;
  letter-spacing:.07em;
}

.foot__list{
  display:flex;
  flex-wrap:wrap;
  gap:4px;
  margin:0;
  padding:0;
  list-style:none;
}

.foot__list a{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding:4px 8px;
  color:#fff;
  text-decoration:none;
  font-size:16px;
  border-bottom:3px solid var(--blue);
}

.foot__list a:hover{background:var(--blue);color:#000}
.foot__c{margin:0;font-size:16px}

/* 回到顶部 */
.jump{
  position:fixed;
  right:14px;
  bottom:14px;
  z-index:70;
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding:8px 13px;
  font-size:16px;
  text-decoration:none;
  background:var(--blue);
  border:var(--bd);
  border-radius:12px;
  box-shadow:4px 4px 0 #000;
  opacity:0;
  pointer-events:none;
  transform:translateY(10px);
  transition:opacity .2s ease,transform .2s ease;
}

.jump.on{opacity:1;pointer-events:auto;transform:none}

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

@keyframes fade{
  from{opacity:0}
  to{opacity:1}
}

@media (prefers-reduced-motion: no-preference){
  .hero__copy h1{animation:rise .5s .05s both}
  .collage{animation:fade .6s .1s both}

  .prose>article{animation:rise .45s both}
  .prose>article:nth-of-type(1){animation-delay:.02s}
  .prose>article:nth-of-type(2){animation-delay:.07s}
  .prose>article:nth-of-type(3){animation-delay:.12s}
  .prose>article:nth-of-type(4){animation-delay:.17s}
  .prose>article:nth-of-type(5){animation-delay:.22s}
  .prose>article:nth-of-type(6){animation-delay:.27s}
  .prose>article:nth-of-type(7){animation-delay:.32s}
  .prose>article:nth-of-type(8){animation-delay:.37s}

  .side{animation:rise .5s .2s both}
  .side__list li{animation:fade .4s both}
  .side__list li:nth-child(1){animation-delay:.24s}
  .side__list li:nth-child(2){animation-delay:.29s}
  .side__list li:nth-child(3){animation-delay:.34s}
  .side__list li:nth-child(4){animation-delay:.39s}
  .side__list li:nth-child(5){animation-delay:.44s}
  .side__list li:nth-child(6){animation-delay:.49s}
  .side__list li:nth-child(7){animation-delay:.54s}
}

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

@media (min-width:1000px){
  .bar{
    position:sticky;
    top:0;
    z-index:60;
    flex-wrap:nowrap;
    padding:10px 18px;
  }

  .brand{
    position:absolute;
    left:50%;
    top:50%;
    transform:translate(-50%,-50%);
    margin:0;
  }

  .bar__nav{flex:1 1 auto}
  .bar__list{justify-content:flex-start;gap:6px;padding:0 8px}
  .bar__list li:nth-child(4){margin-left:auto}

  main article[id]{scroll-margin-top:88px}

  .hero{
    min-height:100vh;
    min-height:100svh;
    display:flex;
    align-items:center;
    padding:40px 0 60px;
  }

  .hero__box{grid-template-columns:1.05fr .95fr;align-items:center;gap:40px}
  .hero__copy{order:0}
  .hero__copy h1{font-size:clamp(2.2rem,4.6vw,3.9rem);text-shadow:5px 5px 0 #fff}
  .collage{min-height:min(60vh,460px)}

  .deck{grid-template-columns:minmax(0,1fr) 300px;gap:34px;padding:56px 0 72px}
  .prose{padding:clamp(22px,2.4vw,40px)}
  .side{position:sticky;top:96px}
}

@media (min-width:1400px){
  .hero__copy h1{font-size:3.6rem}
}

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