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

:root {
  --sky: #3bb1ff;
  --red: #ff5252;
  --ink: #000000;
  --paper: #fdfaf3;
  --card: #ffffff;
  --edge: 3px solid #000000;
  --hard: 5px 5px 0 #000000;
  --hard-lg: 8px 8px 0 #000000;
  --ui: 'Josefin Sans', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
  --display: 'Cinzel', 'Josefin Sans', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  padding-left: 264px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--ui);
  font-size: 17px;
  line-height: 1.7;
  font-weight: 400;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: 0.01em;
  margin: 0 0 14px;
}

p {
  margin: 0 0 14px;
  overflow-wrap: break-word;
}

a {
  color: var(--ink);
}

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

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

/* ---------- 左侧立牌 ---------- */

.rail {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 264px;
  padding: 20px 18px 26px;
  background: var(--sky);
  border-right: var(--edge);
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  z-index: 20;
}

.brand {
  display: block;
  text-decoration: none;
}

.brand-mark {
  display: block;
  padding: 10px 12px;
  background: var(--card);
  border: var(--edge);
  border-radius: 4px;
  box-shadow: var(--hard);
  font-family: var(--display);
  font-weight: 700;
  font-size: 21px;
  line-height: 1.25;
  letter-spacing: 0.03em;
}

.rail-nav ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.rail-nav a {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 10px 12px;
  background: var(--card);
  border: var(--edge);
  border-radius: 4px;
  box-shadow: 4px 4px 0 var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease;
}

.rail-nav a:hover,
.rail-nav a:focus-visible {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--ink);
  background: #ffffff;
}

.rail-nav a[aria-current] {
  background: var(--red);
  box-shadow: 2px 2px 0 var(--ink);
  transform: translate(2px, 2px);
}

.rail-search {
  margin-top: auto;
}

.rail-search input {
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  font-family: var(--ui);
  font-size: 16px;
  color: var(--ink);
  background: var(--card);
  border: var(--edge);
  border-radius: 4px;
  box-shadow: 4px 4px 0 var(--ink);
}

.rail-search input::placeholder {
  color: #4a4a4a;
}

/* ---------- 主栅格 ---------- */

.frame {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 244px;
  gap: 30px;
  align-items: start;
  max-width: 1260px;
  margin: 0 auto;
  padding: 26px 26px 10px;
}

main {
  min-width: 0;
}

/* ---------- 首屏 ---------- */

.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: center;
  min-height: 100vh;
  padding-bottom: 30px;
  border-bottom: var(--edge);
  margin-bottom: 34px;
}

.hero-copy {
  grid-column: 2;
  grid-row: 1;
}

.hero-art {
  grid-column: 1;
  grid-row: 1;
  border: var(--edge);
  border-radius: 4px;
  box-shadow: var(--hard-lg);
  background: var(--red);
  overflow: hidden;
}

.hero-figure {
  margin: 0;
  display: block;
}

.hero-img {
  display: block;
  width: 100%;
}

.art-slab {
  min-height: 340px;
  position: relative;
  background: var(--red);
}

.art-dot {
  position: absolute;
  right: 22px;
  bottom: 22px;
  width: 74px;
  height: 74px;
  background: var(--sky);
  border: var(--edge);
  border-radius: 50%;
  box-shadow: 4px 4px 0 var(--ink);
}

.art-bar {
  position: absolute;
  left: 22px;
  top: 22px;
  width: 44%;
  height: 16px;
  background: var(--ink);
  border-radius: 2px;
}

.hero-copy h1 {
  font-size: clamp(28px, 4.1vw, 56px);
  margin-bottom: 20px;
}

.lead {
  margin: 0;
  padding-left: 15px;
  border-left: 7px solid var(--red);
  font-size: 18px;
  max-width: 34ch;
}

/* ---------- 引题 ---------- */

.brief {
  margin: 0 0 30px;
}

.brief h2 {
  font-size: clamp(22px, 2.9vw, 34px);
  margin-bottom: 8px;
}

.subtitle {
  margin: 0;
  padding-bottom: 14px;
  border-bottom: var(--edge);
  font-size: 17px;
  color: #161616;
}

/* ---------- 正文分区 ---------- */

section > div[id] {
  margin: 0 0 34px;
  padding: 26px 24px 18px;
  background: var(--card);
  border: var(--edge);
  border-left: 9px solid var(--sky);
  border-radius: 4px;
  box-shadow: 6px 6px 0 var(--ink);
  scroll-margin-top: 22px;
}

section > div[id]:nth-of-type(even) {
  border-left-color: var(--red);
}

section > div[id] > :first-child {
  margin-top: 0;
}

section > div[id] > :last-child {
  margin-bottom: 0;
}

section h2 {
  font-size: clamp(21px, 2.5vw, 30px);
}

section h3 {
  font-size: 20px;
  margin-top: 24px;
}

section p,
section li {
  font-size: 17px;
}

section ul,
section ol {
  margin: 0 0 16px;
  padding-left: 22px;
}

section li {
  margin-bottom: 8px;
}

section img {
  border: var(--edge);
  border-radius: 4px;
  box-shadow: 4px 4px 0 var(--ink);
  margin: 10px 0;
}

section blockquote {
  margin: 0 0 18px;
  padding: 14px 18px;
  background: var(--paper);
  border: var(--edge);
  border-radius: 4px;
}

section strong {
  font-weight: 700;
}

section a {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

/* ---------- 右侧栏 ---------- */

.side {
  position: sticky;
  top: 22px;
  padding: 16px;
  background: var(--card);
  border: var(--edge);
  border-radius: 4px;
  box-shadow: 6px 6px 0 var(--ink);
}

.side-title {
  margin: 0 0 10px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.16em;
}

.side-list {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}

.side-list a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 4px;
  font-size: 16px;
  text-decoration: none;
  border-bottom: 2px solid var(--ink);
}

.side-list li:last-child a {
  border-bottom: 0;
}

.side-list a:hover {
  background: var(--sky);
}

.totop {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 9px 14px;
  background: var(--red);
  border: var(--edge);
  border-radius: 4px;
  box-shadow: 4px 4px 0 var(--ink);
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.totop:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--ink);
}

/* ---------- 页脚 ---------- */

.foot {
  margin-top: 26px;
  padding: 26px 26px 22px;
  background: var(--sky);
  border-top: var(--edge);
}

.foot-brand {
  max-width: 1260px;
  margin: 0 auto;
  overflow: hidden;
}

.foot-word {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(38px, 8.6vw, 102px);
  line-height: 1;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.foot-bar {
  max-width: 1260px;
  margin: 18px auto 0;
  padding-top: 14px;
  border-top: var(--edge);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  align-items: center;
  justify-content: space-between;
}

.copy {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

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

.foot-links a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 5px 2px;
  font-size: 16px;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.foot-links a:hover {
  border-bottom-color: var(--ink);
}

/* ---------- 动效 ---------- */

.rv {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.rv.on {
  opacity: 1;
  transform: none;
}

/* ---------- 断点 ---------- */

@media (max-width: 1080px) {
  .frame {
    grid-template-columns: minmax(0, 1fr);
  }
  .side {
    position: static;
  }
}

@media (max-width: 900px) {
  body {
    padding-left: 0;
  }
  .rail {
    position: static;
    width: auto;
    border-right: 0;
    border-bottom: var(--edge);
    padding: 16px;
    gap: 12px;
    overflow: visible;
  }
  .brand-mark {
    font-size: 19px;
  }
  .rail-nav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }
  .rail-nav ol {
    flex-direction: row;
    gap: 10px;
  }
  .rail-nav li {
    flex: 0 0 auto;
  }
  .rail-search {
    margin-top: 0;
  }
  .rail-search input {
    box-shadow: 3px 3px 0 var(--ink);
  }
  .frame {
    padding: 18px 16px 6px;
    gap: 22px;
  }
  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    min-height: 0;
    padding-bottom: 22px;
    margin-bottom: 26px;
  }
  .hero-copy {
    grid-column: auto;
    grid-row: auto;
  }
  .hero-art {
    grid-column: auto;
    grid-row: auto;
    box-shadow: 6px 6px 0 var(--ink);
  }
  .art-slab {
    min-height: 200px;
  }
  .lead {
    font-size: 17px;
  }
  section > div[id] {
    padding: 20px 16px 12px;
    box-shadow: 4px 4px 0 var(--ink);
  }
  .foot {
    padding: 20px 16px 18px;
  }
  .foot-word {
    white-space: normal;
    line-height: 1.1;
  }
  .foot-links {
    gap: 0 12px;
  }
}

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

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