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

:root {
  --ink: #12100E;
  --paper: #F4EFE6;
  --flame: #E8552D;
  --line: rgba(244, 239, 230, 0.16);
  --soft: rgba(244, 239, 230, 0.72);
  --body-text: #e5dfd3;
}

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

html {
  scroll-behavior: smooth;
  background: var(--ink);
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: 'DM Sans', system-ui, -apple-system, 'PingFang SC', 'Hiragino Sans GB',
    'Microsoft YaHei', sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

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

p {
  margin: 0;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

/* ---------- 顶部：品牌居中，菜单分列两侧 ---------- */
.top {
  position: relative;
  z-index: 40;
  background: var(--ink);
  border-bottom: 1px solid var(--line);
}

.top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  max-width: 1320px;
  margin: 0 auto;
  padding: 8px clamp(14px, 3vw, 36px);
}

.nav-side {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
  flex: 1 1 0;
  min-width: 0;
}

.nav-right {
  justify-content: flex-end;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 10px;
  min-height: 44px;
  font-size: 16px;
  font-weight: 500;
  color: var(--soft);
  transition: color 0.25s ease;
}

.nav-link .ico {
  display: block;
  width: 6px;
  height: 6px;
  background: var(--flame);
  transition: width 0.25s ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--paper);
}

.nav-link:hover .ico {
  width: 16px;
}

.brand {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 14px;
  font-size: clamp(17px, 1.6vw, 21px);
  font-weight: 700;
  letter-spacing: 0.22em;
  white-space: nowrap;
}

.brand:hover {
  color: var(--flame);
}

/* ---------- 二级粘性锚点条 ---------- */
.anchor-strip {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  gap: 0;
  overflow-x: auto;
  padding: 0 clamp(12px, 3vw, 36px);
  background: rgba(18, 16, 14, 0.94);
  border-bottom: 2px solid var(--flame);
  backdrop-filter: blur(8px);
  scrollbar-width: none;
}

.anchor-strip::-webkit-scrollbar {
  display: none;
}

.anchor-strip a {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  min-height: 44px;
  font-size: 16px;
  color: var(--soft);
  border-right: 1px solid var(--line);
  transition: color 0.2s ease, background 0.2s ease;
}

.anchor-strip a:hover,
.anchor-strip a:focus-visible {
  color: var(--ink);
  background: var(--flame);
}

/* ---------- Hero：文在上、图在下，超大背景字 ---------- */
section[id] {
  scroll-margin-top: 88px;
}

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 45vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(20px, 4.5vw, 48px) clamp(18px, 4vw, 48px) clamp(16px, 3vw, 28px);
  border-bottom: 1px solid var(--line);
}

.hero > * {
  position: relative;
  z-index: 2;
}

.ghost {
  position: absolute !important;
  z-index: 0 !important;
  top: 34%;
  left: 50%;
  transform: translateX(-50%);
  font-size: clamp(3.2rem, 17vw, 10rem);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.05em;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1px rgba(244, 239, 230, 0.18);
  pointer-events: none;
  animation: ghost-drift 16s ease-in-out infinite alternate;
}

@keyframes ghost-drift {
  from {
    transform: translate(-54%, 0);
  }
  to {
    transform: translate(-46%, -8px);
  }
}

.kicker {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.38em;
  color: var(--flame);
}

.hero h1 {
  margin: 0.24em 0 0.3em;
  font-size: clamp(2.1rem, 7.4vw, 4.9rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  background-image: linear-gradient(100deg, var(--paper) 12%, var(--flame) 48%, var(--paper) 84%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: sweep 10s linear infinite;
}

@keyframes sweep {
  from {
    background-position: 0% 0;
  }
  to {
    background-position: 220% 0;
  }
}

.lede {
  max-width: 54ch;
  font-size: 17px;
  line-height: 1.7;
  color: var(--soft);
}

.hero-figure {
  margin: clamp(16px, 3vw, 28px) 0 0;
  width: 100%;
  max-width: 860px;
}

.hero-img {
  width: 100%;
  height: clamp(130px, 24vh, 240px);
  object-fit: cover;
  object-position: center;
  border: 1px solid var(--line);
}

/* ---------- 正文与右侧 aside ---------- */
.body-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 286px;
  gap: clamp(26px, 4vw, 60px);
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(30px, 5vw, 64px) clamp(18px, 4vw, 48px) 0;
}

.prose {
  min-width: 0;
  max-width: 70ch;
}

.prose section {
  margin: 0 0 clamp(30px, 4.5vw, 54px);
  padding: 0 0 clamp(24px, 4vw, 42px);
  border-bottom: 1px solid var(--line);
}

.prose section:last-child {
  border-bottom: 0;
}

.prose small,
.side small {
  display: block;
  margin: 0 0 0.55em;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.3em;
  color: var(--flame);
}

.prose h2 {
  margin: 0 0 0.9em;
  padding-bottom: 0.32em;
  font-size: clamp(1.65rem, 3.5vw, 2.5rem);
  border-bottom: 2px solid var(--flame);
}

.prose h3 {
  margin: 1.5em 0 0.55em;
  font-size: clamp(1.22rem, 2.2vw, 1.5rem);
  color: var(--paper);
}

.prose p {
  margin: 0 0 1.1em;
  line-height: 1.85;
  color: var(--body-text);
}

.prose ul,
.prose ol {
  margin: 0 0 1.2em;
  padding-left: 1.25em;
  color: var(--body-text);
}

.prose li {
  margin: 0.4em 0;
}

.prose strong {
  color: var(--paper);
}

.prose a {
  color: var(--flame);
  border-bottom: 1px solid rgba(232, 85, 45, 0.45);
}

.prose a:hover {
  background: rgba(232, 85, 45, 0.14);
}

.prose blockquote {
  margin: 0 0 1.2em;
  padding: 0.2em 0 0.2em 1em;
  border-left: 3px solid var(--flame);
  color: var(--soft);
}

.prose figure {
  margin: 0 0 1.2em;
}

.prose figcaption {
  padding-top: 0.5em;
  font-size: 16px;
  color: var(--soft);
}

.prose img {
  width: 100%;
  border: 1px solid var(--line);
}

.prose table {
  width: 100%;
  margin: 0 0 1.2em;
  border-collapse: collapse;
  font-size: 16px;
}

.prose th,
.prose td {
  padding: 10px;
  border: 1px solid var(--line);
  text-align: left;
}

.side {
  align-self: start;
  position: sticky;
  top: 78px;
  padding-top: 16px;
  border-top: 2px solid var(--flame);
}

.side h2 {
  margin: 0 0 0.7em;
  font-size: 1.2rem;
  letter-spacing: 0.05em;
}

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

.side-list a {
  display: block;
  padding: 11px 0;
  min-height: 44px;
  font-size: 16px;
  color: var(--soft);
  border-bottom: 1px dashed var(--line);
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.side-list a:hover,
.side-list a:focus-visible {
  color: var(--flame);
  padding-left: 8px;
}

/* ---------- 页脚：三栏 dl、超大品牌字 ---------- */
footer {
  margin-top: clamp(50px, 7vw, 110px);
  padding: clamp(28px, 5vw, 60px) clamp(18px, 4vw, 48px) 22px;
  border-top: 2px solid var(--flame);
  overflow: hidden;
}

.foot-brand {
  font-size: clamp(2.1rem, 10vw, 6.4rem);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: -0.045em;
  overflow: hidden;
  padding-bottom: 0.12em;
  border-bottom: 1px solid var(--line);
}

.foot-brand span {
  display: inline-block;
  animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

@keyframes rise {
  from {
    transform: translateY(64%);
  }
  to {
    transform: translateY(0);
  }
}

.foot-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 4vw, 48px);
  margin: clamp(22px, 4vw, 40px) 0;
}

.foot-cols dl {
  margin: 0;
}

.foot-cols dt {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.foot-cols dt a {
  display: inline-block;
  min-height: 40px;
  padding: 9px 0;
  color: var(--paper);
}

.foot-cols dd {
  margin: 0;
}

.foot-cols dd a {
  display: inline-block;
  min-height: 40px;
  padding: 9px 0;
  font-size: 16px;
  color: var(--soft);
}

.foot-cols a:hover,
.foot-cols a:focus-visible {
  color: var(--flame);
}

.foot-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 16px;
  color: var(--soft);
}

.foot-base a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 0;
  border-bottom: 1px solid var(--flame);
}

/* ---------- 滚动揭示 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

/* ---------- 窄屏 ---------- */
@media (max-width: 880px) {
  .top-inner {
    flex-wrap: wrap;
    justify-content: center;
    padding: 6px 12px 2px;
  }

  .brand {
    order: -1;
    flex: 0 0 100%;
    letter-spacing: 0.2em;
  }

  .nav-side {
    flex: 1 1 100%;
    justify-content: center;
    gap: 0;
  }

  .nav-link {
    padding: 12px 8px;
  }

  .anchor-strip a {
    padding: 10px 12px;
  }

  .hero {
    min-height: 0;
    padding-top: 20px;
  }

  .ghost {
    top: 30%;
    font-size: clamp(2.8rem, 19vw, 5.5rem);
  }

  .body-grid {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .side {
    position: static;
    top: auto;
  }

  .foot-cols {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .foot-cols dt {
    padding-top: 10px;
    border-top: 1px solid var(--line);
  }

  .foot-cols dt a {
    color: var(--flame);
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

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