@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 {
  --paper: #fafaf8;
  --ink: #1a1a1a;
  --mid: #4a4a4a;
  --bar-h: 62px;
  --sans: "Open Sans", system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
  --head: "Poppins", "Open Sans", system-ui, "Microsoft YaHei", sans-serif;
}

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

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

body {
  margin: 0;
  padding: 0 0 calc(var(--bar-h) + 20px);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.78;
  color: var(--ink);
  background-color: var(--paper);
  overflow-x: hidden;
  overflow-wrap: break-word;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .85;
  mix-blend-mode: multiply;
  background-image:
    repeating-linear-gradient(0deg, rgba(26, 26, 26, .045) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(90deg, rgba(26, 26, 26, .022) 0 1px, transparent 1px 7px),
    radial-gradient(circle at 18% 22%, rgba(26, 26, 26, .05) 0 1px, transparent 1px),
    radial-gradient(circle at 72% 61%, rgba(26, 26, 26, .045) 0 1px, transparent 1px);
  background-size: auto, auto, 23px 19px, 31px 27px;
}

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

h1, h2, h3, h4 {
  font-family: var(--head);
  font-weight: 700;
  line-height: 1.24;
  letter-spacing: -.012em;
}

h1 { font-size: clamp(1.85rem, 6.4vw, 2.9rem); margin: 0 0 .55rem; }
h2 { font-size: clamp(1.32rem, 3.8vw, 1.85rem); margin: 2.1rem 0 .55rem; }
h3 { font-size: 1.16rem; margin: 1.5rem 0 .4rem; }
h4 { font-size: 1.02rem; margin: 1.2rem 0 .3rem; }

p { margin: 0 0 1.05rem; }
ul, ol { margin: 0 0 1.1rem; padding-left: 1.35rem; }
li { margin: 0 0 .35rem; }

hr {
  border: 0;
  border-top: 2px solid var(--ink);
  margin: .5rem 0 1.15rem;
}

blockquote {
  margin: 1.3rem 0;
  padding: .3rem 0 .3rem 1rem;
  border-left: 4px solid var(--ink);
  color: var(--mid);
  font-style: normal;
}

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

/* ---------- 角落品牌 ---------- */
.brandcorner {
  position: fixed;
  top: .55rem;
  left: .55rem;
  z-index: 60;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background: var(--paper);
  border: 2px solid var(--ink);
  transform: rotate(-3.5deg);
  text-decoration: none;
  color: var(--ink);
  box-shadow: 3px 3px 0 rgba(26, 26, 26, .16);
}
.brandcorner img { width: 100%; height: 100%; object-fit: contain; display: block; }
.mark-txt { font-family: var(--head); font-weight: 700; font-size: 1.05rem; line-height: 1; }

/* ---------- 主视觉 ---------- */
main { position: relative; z-index: 1; }

.hero {
  position: relative;
  min-height: 45vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  clip-path: polygon(0 0, 100% 0, 100% 91%, 0 100%);
  background: var(--paper);
  padding: 3.2rem 0 2.6rem;
}

.hero-media { position: absolute; inset: 0; }
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(250, 250, 248, .7);
}
.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(.42) contrast(1.08);
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 40rem;
  text-align: center;
  padding: 0 1.1rem;
}

.hero-inner h1 {
  text-shadow: 2px 2px 0 rgba(250, 250, 248, .9);
}

.hero-desc {
  color: var(--mid);
  font-size: .98rem;
  margin: 0;
}

/* ---------- 左栏 + 正文 ---------- */
.spread {
  max-width: 1080px;
  margin: 2.1rem auto 0;
  padding: 0 1.1rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.side {
  border-top: 3px solid var(--ink);
  padding-top: .55rem;
  align-self: start;
}
.side h2 { font-size: 1.06rem; margin: .15rem 0 .4rem; letter-spacing: 0; }
.side hr { border-top-width: 2px; margin: .35rem 0 .8rem; }

.side-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.side-list li { margin: 0; }
.side-list a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: .28rem 0;
  font-size: .94rem;
  color: var(--mid);
  text-decoration: none;
  border-bottom: 1px dashed rgba(26, 26, 26, .28);
}
.side-list a:hover { color: var(--ink); background: rgba(26, 26, 26, .05); }

.prose { min-width: 0; }

.prose > article {
  position: relative;
  background: #fff;
  border: 1.5px solid var(--ink);
  box-shadow: 6px 6px 0 rgba(26, 26, 26, .11);
  padding: 1.3rem 1.15rem 1.55rem;
  margin: 0 0 1.9rem;
  transform: rotate(-.22deg);
  animation: ink-fade .46s steps(5, end) both;
  transition: transform .1s linear, box-shadow .1s linear;
}
.prose > article:nth-child(even) { transform: rotate(.28deg); }
.prose > article:nth-child(1) { animation-delay: .02s; }
.prose > article:nth-child(2) { animation-delay: .07s; }
.prose > article:nth-child(3) { animation-delay: .12s; }
.prose > article:nth-child(4) { animation-delay: .17s; }
.prose > article:nth-child(5) { animation-delay: .22s; }
.prose > article:nth-child(6) { animation-delay: .27s; }
.prose > article:nth-child(7) { animation-delay: .32s; }

@media (hover: hover) {
  .prose > article:hover {
    transform: translate(-2px, -2px) rotate(0deg);
    box-shadow: 9px 9px 0 rgba(26, 26, 26, .17);
  }
}

.prose > article[id] { scroll-margin-top: 5rem; }
.prose > article > h2:first-child,
.prose > article > h3:first-child { margin-top: .1rem; }
.prose > article > :last-child { margin-bottom: 0; }

@keyframes ink-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.prose a {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.prose a:hover { background: rgba(26, 26, 26, .08); }

.prose figure { margin: 1.2rem 0; }
.prose figcaption { font-size: .84rem; color: var(--mid); margin-top: .4rem; }

/* ---------- 页脚 ---------- */
footer {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  margin: 2.6rem auto 0;
  padding: 1.3rem 1.1rem;
  border-top: 3px solid var(--ink);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .8rem 1.1rem;
}

.f-brand {
  width: 34px;
  height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  transform: rotate(2deg);
}
.f-brand img { width: 100%; height: 100%; object-fit: contain; display: block; }
.f-brand .mark-txt { font-size: .92rem; }

.f-nav { flex: 1 1 15rem; min-width: 0; }
.f-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .1rem .9rem;
  font-size: .86rem;
}
.f-list li { margin: 0; }
.f-list a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--mid);
  text-decoration: none;
}
.f-list a:hover { color: var(--ink); text-decoration: underline; }

.f-copy { font-size: .8rem; color: var(--mid); flex: none; }

/* ---------- 底部固定导航条 ---------- */
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  gap: .3rem;
  padding: .34rem .5rem calc(.34rem + env(safe-area-inset-bottom));
  background: var(--ink);
  color: var(--paper);
}

.bar-list {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: .05rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.bar-list::-webkit-scrollbar { display: none; }
.bar-list li { margin: 0; flex: none; }
.bar-list a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 .6rem;
  font-family: var(--head);
  font-size: .9rem;
  white-space: nowrap;
  color: var(--paper);
  text-decoration: none;
}
.bar-list a:hover,
.bar-list a:focus-visible {
  background: var(--paper);
  color: var(--ink);
}

.bar-contact {
  flex: none;
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 .7rem;
  font-size: .88rem;
  color: var(--paper);
  text-decoration: none;
  border: 1.5px solid var(--paper);
}
.bar-contact:hover { background: var(--paper); color: var(--ink); }

/* 统一区块滚入留白 */
[id] { scroll-margin-top: 4.5rem; }

/* ---------- 断点 ---------- */
@media (min-width: 720px) {
  body { font-size: 18px; }
  .hero { min-height: 48vh; padding: 4rem 0 3rem; }
  .prose > article { padding: 1.9rem 2rem 2.1rem; }
  .brandcorner { width: 46px; height: 46px; top: .8rem; left: .8rem; }
}

@media (min-width: 900px) {
  .spread {
    grid-template-columns: 232px 1fr;
    gap: 2.6rem;
    padding: 0 1.6rem;
  }
  .side { position: sticky; top: 1.2rem; }
  footer, .spread { padding-left: 1.6rem; padding-right: 1.6rem; }
}

@media (max-width: 400px) {
  .bar-list a { padding: 0 .48rem; font-size: .86rem; }
  .f-copy { font-size: .76rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * {
    animation: none !important;
    transition: none !important;
  }
  .prose > article,
  .prose > article:nth-child(even),
  .prose > article:hover,
  .brandcorner,
  .f-brand { transform: none !important; }
}

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