@import url('https://fonts.googleapis.com/css2?family=Crimson+Text:wght@400;600;700&family=EB+Garamond:wght@400;500;600;700;800&display=swap');

:root {
  --ink: #10221E;
  --ink-2: #16302A;
  --paper: #E9E2D0;
  --flame: #D2542E;
  --line: rgba(233, 226, 208, .2);
  --soft: rgba(233, 226, 208, .68);
  --serif: 'EB Garamond', 'Crimson Text', "Songti SC", "Source Han Serif SC", "Noto Serif SC", Georgia, serif;
  --dock: 108px;
}

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

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.72;
  padding-bottom: calc(var(--dock) + 20px);
  overflow-x: clip;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0 0 .55em; line-height: 1.16; font-weight: 700; letter-spacing: .015em; }
h2 { font-size: clamp(1.55rem, 5.2vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 3.6vw, 1.55rem); }
ul, ol { margin: 0 0 1.2em; padding-left: 1.2em; }
li { margin: 0 0 .3em; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 12px; top: -60px;
  z-index: 90;
  padding: 10px 16px;
  background: var(--flame);
  color: #10221E;
  text-decoration: none;
  transition: top .2s ease;
}
.skip:focus { top: 12px; }

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

/* ---------- 底部固定条 ---------- */
.dock {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 70;
  background: rgba(16, 34, 30, .97);
  border-top: 2px solid var(--flame);
  backdrop-filter: blur(6px);
}

.dock-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  max-width: 1240px;
  margin: 0 auto;
}

.dock-nav {
  order: 2;
  flex: 1 0 100%;
  display: flex;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.dock-nav::-webkit-scrollbar { display: none; }

.set {
  display: flex;
  gap: 2px;
  margin: 0;
  padding: 0;
  flex: 0 0 auto;
}

.set a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 11px;
  font-size: 16px;
  white-space: nowrap;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color .22s ease, color .22s ease;
}

.set a::before {
  content: "";
  width: 6px; height: 6px;
  margin-right: 8px;
  border: 1px solid var(--flame);
  transform: rotate(45deg);
  flex: 0 0 auto;
}

.set a:hover, .set a:focus-visible {
  color: var(--flame);
  border-bottom-color: var(--flame);
}

.brand {
  order: -1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 12px;
  font-size: 19px;
  letter-spacing: .16em;
  text-decoration: none;
  color: var(--paper);
  flex: 0 0 auto;
  border-bottom: 2px solid transparent;
}
.brand:hover { border-bottom-color: var(--flame); }
.brand-mark { width: 26px; height: 26px; object-fit: contain; }

.find {
  order: 1;
  display: flex;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
}

.find input {
  flex: 1 1 auto;
  min-width: 0;
  height: 42px;
  padding: 0 12px;
  font-family: inherit;
  font-size: 16px;
  color: var(--paper);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 0;
}
.find input::placeholder { color: var(--soft); }

.find button {
  height: 42px;
  min-width: 58px;
  padding: 0 14px;
  font-family: inherit;
  font-size: 16px;
  color: #10221E;
  background: var(--flame);
  border: 0;
  border-radius: 0;
  cursor: pointer;
  transition: filter .2s ease;
}
.find button:hover { filter: brightness(1.12); }

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  display: grid;
  gap: 26px;
  align-content: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: 56px 20px calc(var(--dock) + 64px);
  max-width: 1240px;
  margin: 0 auto;
}

.hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 16px;
  background: var(--flame);
  clip-path: polygon(0 100%, 100% 0, 100% 100%, 0 100%);
}

.kicker {
  margin: 0 0 12px;
  font-size: 16px;
  letter-spacing: .44em;
  color: var(--flame);
  text-indent: .44em;
}

.hero-title {
  margin: 0 0 18px;
  font-size: clamp(2.5rem, 11.5vw, 6.2rem);
  font-weight: 800;
  letter-spacing: .04em;
}

.hero-title .ch {
  display: inline-block;
  opacity: 0;
  transform: translateY(.42em) rotate(4deg);
  animation: rise .72s cubic-bezier(.2, .72, .2, 1) forwards;
  animation-delay: calc(var(--i) * 55ms);
}

@keyframes rise {
  to { opacity: 1; transform: none; }
}

.hero-desc {
  max-width: 46ch;
  color: var(--soft);
  font-size: 17px;
}

.hero-jump { margin: 26px 0 0; }

.jump {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 22px;
  font-size: 16px;
  letter-spacing: .22em;
  text-decoration: none;
  color: var(--flame);
  border: 1px solid var(--flame);
  transition: background .22s ease, color .22s ease;
}
.jump:hover { background: var(--flame); color: #10221E; }

.hero-figure {
  margin: 0;
  position: relative;
  min-height: 260px;
  border: 2px solid var(--flame);
  overflow: hidden;
  aspect-ratio: 16 / 11;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: drift 20s ease-in-out infinite alternate;
}

@keyframes drift {
  from { transform: scale(1) translateY(0); }
  to { transform: scale(1.08) translateY(-10px); }
}

.hero-mark {
  display: flex;
  height: 100%;
  min-height: 260px;
  align-items: center;
  justify-content: center;
  font-size: clamp(2rem, 10vw, 4.4rem);
  letter-spacing: .22em;
  color: var(--flame);
  background:
    repeating-linear-gradient(135deg, transparent 0 13px, rgba(210, 84, 46, .16) 13px 14px);
}

/* ---------- 正文舞台 ---------- */
.stage {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 34px;
}

.stage-body { min-width: 0; }

.stage-body div {
  position: relative;
  padding: 42px 0 38px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 24px;
  scroll-margin-bottom: calc(var(--dock) + 24px);
}

.stage-body div::before {
  content: "";
  position: absolute;
  top: -1px; left: 0;
  width: 72px; height: 4px;
  background: var(--flame);
  clip-path: polygon(0 100%, 100% 0, 100% 100%, 0 100%);
}

.stage-body div:first-child { border-top: 0; }
.stage-body div:first-child::before { display: none; }

.stage-body h2 > span {
  display: inline-block;
  border-bottom: 3px solid rgba(210, 84, 46, .55);
  padding-bottom: 2px;
}

.stage-body h2 > span span { color: var(--flame); }

.stage-body p, .stage-body li { color: var(--paper); }
.stage-body p { max-width: 68ch; }

.stage-body ul, .stage-body ol { max-width: 66ch; }
.stage-body li::marker { color: var(--flame); }

.stage-body a {
  color: var(--flame);
  text-decoration: none;
  border-bottom: 1px solid rgba(210, 84, 46, .55);
}
.stage-body a:hover { border-bottom-color: var(--flame); }

.stage-body figure {
  margin: 24px 0;
  border: 1px solid var(--line);
  padding: 10px;
}
.stage-body figure img { width: 100%; }
.stage-body figcaption { font-size: 16px; color: var(--soft); padding-top: 8px; }

.stage-body blockquote {
  margin: 24px 0;
  padding: 6px 0 6px 18px;
  border-left: 3px solid var(--flame);
  color: var(--soft);
  font-size: 18px;
}

.stage-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 22px 0;
  font-size: 16px;
}
.stage-body th, .stage-body td {
  border: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
}
.stage-body th { color: var(--flame); font-weight: 600; }

.stage-body code {
  font-size: 15px;
  border: 1px solid var(--line);
  padding: 1px 5px;
}

.stage-body div.hit { outline: 2px solid var(--flame); outline-offset: 10px; }

.stage-body div.reveal {
  opacity: 0;
  transform: translateY(24px);
}
.stage-body div.reveal.on {
  opacity: 1;
  transform: none;
  transition: opacity .7s ease, transform .7s ease;
}

/* ---------- 右栏 ---------- */
.rail { display: grid; gap: 16px; align-content: start; }

.rail-box {
  border: 1px solid var(--line);
  padding: 16px 16px 18px;
  background: rgba(233, 226, 208, .035);
}

.rail-h {
  margin: 0 0 10px;
  font-size: 16px;
  letter-spacing: .32em;
  color: var(--flame);
  font-weight: 600;
}

.rail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1px;
}
.rail-list a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 4px 0;
  font-size: 16px;
  text-decoration: none;
  border-bottom: 1px dashed var(--line);
  transition: padding-left .2s ease, color .2s ease;
}
.rail-list a:hover { color: var(--flame); padding-left: 6px; }

.rail-note { margin: 0 0 14px; font-size: 16px; color: var(--soft); }

.rail-top a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: 16px;
  color: var(--flame);
  text-decoration: none;
  letter-spacing: .16em;
}
.rail-top a::after { content: "↑"; margin-left: 8px; }

/* ---------- 页脚 ---------- */
.foot {
  max-width: 1240px;
  margin: 70px auto 0;
  padding: 0 20px 10px;
  border-top: 2px solid var(--flame);
}

.foot-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 26px;
  padding: 34px 0 26px;
}

.foot-brand {
  margin: 0 0 8px;
  font-size: 22px;
  letter-spacing: .2em;
}

.foot-addr {
  font-style: normal;
  display: grid;
  gap: 4px;
  color: var(--soft);
  font-size: 16px;
}
.foot-addr a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  width: fit-content;
  color: var(--paper);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.foot-addr a:hover { color: var(--flame); }

.foot-h {
  margin: 0 0 10px;
  font-size: 16px;
  letter-spacing: .32em;
  color: var(--flame);
  font-weight: 600;
}
.foot-h > span { display: inline-block; }

.foot-list, .foot-mini {
  list-style: none;
  margin: 0;
  padding: 0;
}

.foot-list a {
  display: flex;
  align-items: center;
  min-height: 42px;
  font-size: 16px;
  text-decoration: none;
  border-bottom: 1px dashed var(--line);
}
.foot-list a:hover { color: var(--flame); }

.sub { display: grid; gap: 8px; }
.sub input {
  height: 42px;
  padding: 0 12px;
  font-family: inherit;
  font-size: 16px;
  color: var(--paper);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 0;
}
.sub input::placeholder { color: var(--soft); }
.sub button {
  height: 42px;
  font-family: inherit;
  font-size: 16px;
  letter-spacing: .2em;
  color: #10221E;
  background: var(--flame);
  border: 0;
  border-radius: 0;
  cursor: pointer;
}
.sub button:hover { filter: brightness(1.12); }
.sub-msg { margin: 0; min-height: 22px; font-size: 16px; color: var(--flame); }

.foot-base {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0 4px;
  border-top: 1px solid var(--line);
}
.foot-copy { margin: 0; font-size: 16px; color: var(--soft); letter-spacing: .1em; }

.foot-mini { display: flex; gap: 18px; }
.foot-mini a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: 16px;
  color: var(--soft);
  text-decoration: none;
}
.foot-mini a:hover { color: var(--flame); }

/* ---------- 桌面 ---------- */
@media (min-width: 880px) {
  :root { --dock: 78px; }

  .dock-inner { flex-wrap: nowrap; padding: 8px 26px; gap: 14px; }
  .dock-nav {
    order: 0;
    flex: 1 1 auto;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    overflow: visible;
    gap: 8px;
  }
  .brand { order: 0; justify-self: center; padding: 0 16px; }
  .set--l { justify-self: end; }
  .set--r { justify-self: start; }
  .find { order: 0; flex: 0 0 230px; }

  .hero {
    grid-template-columns: 1.12fr .88fr;
    align-items: center;
    gap: 44px;
    padding: 60px 26px calc(var(--dock) + 76px);
  }
  .hero-figure { aspect-ratio: 4 / 3; }

  .stage { padding: 0 26px; }
  .foot { padding: 0 26px 12px; }
  .foot-grid { grid-template-columns: 1.25fr .9fr 1fr; gap: 34px; }
}

@media (min-width: 1000px) {
  .stage {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 48px;
    align-items: start;
  }
  .rail { position: sticky; top: 26px; }
}

@media (min-width: 1180px) {
  .hero { padding-left: 0; padding-right: 0; }
  .stage { padding-left: 0; padding-right: 0; }
  .foot { padding-left: 0; padding-right: 0; }
}

/* ---------- 降级动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .hero-title .ch { opacity: 1; transform: none; }
  .stage-body div.reveal { opacity: 1; transform: none; }
}

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