@charset "utf-8";

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

:root {
  --cream: #f5e6c8;
  --amber: #d4a574;
  --ink: #262117;
  --deep: #1c1710;
  --muted: #c2b092;
  --line: rgba(212, 165, 116, 0.26);
  --line-soft: rgba(212, 165, 116, 0.13);
  --font-body: "Source Sans 3", "Lexend", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-head: "Lexend", "Source Sans 3", "PingFang SC", system-ui, sans-serif;
  --r: 18px;
}

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

body {
  margin: 0;
  min-height: 100%;
  background-color: var(--deep);
  background-image:
    radial-gradient(95% 55% at 50% -12%, rgba(212, 165, 116, 0.18), transparent 72%),
    linear-gradient(180deg, #211b12 0%, #19150e 55%, #110e09 100%);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.72;
  overflow-x: hidden;
}

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

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

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

main [id] {
  scroll-margin-top: 104px;
}

/* ---- 颗粒与漏光覆盖层 ---- */
.veil-grain,
.veil-leak {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 70;
}

.veil-grain {
  opacity: 0.24;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
  animation: grainShift 1.1s steps(3) infinite;
}

.veil-leak {
  z-index: 69;
  background-image:
    radial-gradient(58% 42% at 6% 0%, rgba(212, 165, 116, 0.3), transparent 70%),
    radial-gradient(42% 34% at 97% 16%, rgba(245, 230, 200, 0.17), transparent 72%),
    radial-gradient(70% 46% at 50% 108%, rgba(124, 74, 32, 0.4), transparent 70%);
  animation: leakDrift 19s ease-in-out infinite alternate;
}

@keyframes grainShift {
  0% { transform: translate3d(0, 0, 0); }
  33% { transform: translate3d(-2%, 1%, 0); }
  66% { transform: translate3d(1%, -2%, 0); }
  100% { transform: translate3d(0, 0, 0); }
}

@keyframes leakDrift {
  0% { opacity: 0.55; }
  100% { opacity: 0.95; }
}

/* ---- 顶部细条 ---- */
.strip {
  display: flex;
  justify-content: center;
  gap: 22px;
  padding: 7px 12px;
  overflow: hidden;
  white-space: nowrap;
  background: linear-gradient(90deg, #c3925f, var(--amber) 48%, #bb8855);
  color: #2a1f12;
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.34em;
}

.strip span {
  display: block;
}

.strip span + span::before {
  content: "·";
  margin-right: 22px;
  letter-spacing: 0;
}

/* ---- 页头 ---- */
.mast {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 18px;
  padding: 10px 20px;
  background: rgba(26, 21, 14, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(7px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--cream);
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.brand .pip {
  display: block;
  width: 12px;
  height: 26px;
  border-radius: 3px;
  background: var(--amber);
  transform: rotate(-7deg);
}

.brand .logo {
  display: block;
  border-radius: 4px;
}

/* ---- 菜单（details 结构） ---- */
.menu {
  position: relative;
}

.menu > summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: rgba(245, 230, 200, 0.05);
  color: var(--cream);
  font-family: var(--font-head);
  font-size: 14px;
  letter-spacing: 0.16em;
  cursor: pointer;
  list-style: none;
}

.menu > summary::-webkit-details-marker {
  display: none;
}

.menu > summary::after {
  content: "▾";
  font-size: 12px;
  color: var(--amber);
  transition: transform 0.25s ease;
}

.menu[open] > summary::after {
  transform: rotate(180deg);
}

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

.menu > menu a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  border-radius: var(--r);
  border-bottom: 2px solid transparent;
  color: #e8dbc2;
  font-size: 15px;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.menu > menu a:hover,
.menu > menu a:focus-visible {
  border-bottom-color: var(--amber);
  background: rgba(212, 165, 116, 0.14);
  color: var(--cream);
}

/* ---- 首屏 ---- */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 34px;
  min-height: 45vh;
  max-width: 1180px;
  margin: 0 auto;
  padding: 34px 22px 48px;
  border-bottom: 1px dashed var(--line-soft);
}

.hero-copy {
  text-align: center;
}

.hero-copy h1 {
  margin: 0 0 16px;
  font-family: var(--font-head);
  font-size: clamp(1.9rem, 4.4vw, 3rem);
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.5);
}

.lede {
  max-width: 42ch;
  margin: 0 auto;
  color: #d7c7a8;
  font-size: 16px;
  line-height: 1.7;
}

.hero-shot {
  position: relative;
  min-height: 190px;
  margin: 0;
  padding: 12px 12px 44px;
  border-radius: 6px;
  background: linear-gradient(160deg, #efe1c6, #ddc9a6);
  box-shadow: 0 20px 36px rgba(0, 0, 0, 0.48);
  transform: rotate(-1.6deg);
  filter: sepia(0.26) saturate(0.86) contrast(1.03);
}

.hero-shot::after {
  content: "";
  position: absolute;
  inset: 12px 12px 44px;
  border-radius: 2px;
  background: linear-gradient(122deg, rgba(255, 238, 200, 0.34), transparent 46%);
  mix-blend-mode: screen;
  pointer-events: none;
}

.hero-shot .shot-img {
  display: block;
  width: 100%;
  border-radius: 2px;
  filter: sepia(0.34) saturate(0.8) contrast(1.06);
}

.hero-shot:hover {
  animation: vhsTrack 0.55s steps(2) 1;
}

.badge {
  position: absolute;
  left: -8px;
  bottom: 18px;
  padding: 7px 13px;
  border-radius: var(--r);
  background: var(--amber);
  color: #2a2013;
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3em;
  box-shadow: 0 7px 15px rgba(0, 0, 0, 0.42);
}

@keyframes vhsTrack {
  0% { transform: rotate(-1.6deg) skewX(0deg) translateY(0); }
  40% { transform: rotate(-1.6deg) skewX(-1.6deg) translateY(-3px); }
  100% { transform: rotate(-1.6deg) skewX(0deg) translateY(0); }
}

/* ---- 正文舞台 ---- */
.stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 264px;
  align-items: start;
  gap: 48px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 40px 22px 68px;
}

.prose {
  min-width: 0;
}

.prose > article {
  padding: 28px 0 34px;
  border-bottom: 1px solid var(--line-soft);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.prose > article:last-child {
  border-bottom: 0;
  padding-bottom: 8px;
}

html.js .prose > article {
  opacity: 0;
  transform: translateY(18px);
}

html.js .prose > article.in {
  opacity: 1;
  transform: none;
}

.prose h2 {
  margin: 0;
  font-family: var(--font-head);
  font-size: clamp(1.3rem, 2.5vw, 1.68rem);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.01em;
  color: var(--cream);
}

.prose hr {
  height: 1px;
  margin: 14px 0 22px;
  border: 0;
  background: linear-gradient(90deg, var(--amber), rgba(212, 165, 116, 0));
}

.prose h3 {
  margin: 26px 0 8px;
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--amber);
}

.prose p {
  margin: 0 0 16px;
  color: #e7dbc3;
  line-height: 1.86;
}

.prose ul,
.prose ol {
  margin: 0 0 16px;
  padding-left: 1.3em;
  line-height: 1.82;
}

.prose li {
  margin-bottom: 6px;
}

.prose a {
  color: var(--amber);
  text-underline-offset: 3px;
}

.prose blockquote {
  margin: 22px 0;
  padding: 10px 0 10px 18px;
  border-left: 3px solid var(--amber);
  color: #d9c9aa;
}

.prose figure {
  margin: 22px 0;
  padding: 10px 10px 26px;
  border-radius: 4px;
  background: #eadcc0;
  filter: sepia(0.3) saturate(0.85);
}

.prose table {
  width: 100%;
  margin: 0 0 18px;
  border-collapse: collapse;
  font-size: 15px;
}

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

.prose th {
  color: var(--amber);
  font-family: var(--font-head);
  font-weight: 500;
}

/* ---- 侧栏 ---- */
.rail {
  position: sticky;
  top: 92px;
  padding-left: 18px;
  border-left: 1px solid var(--line);
}

.rail h2 {
  margin: 0;
  color: var(--amber);
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.3em;
}

.rail hr {
  height: 1px;
  margin: 10px 0 12px;
  border: 0;
  background: var(--line);
}

.rail ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: railc;
}

.rail li {
  counter-increment: railc;
  opacity: 0;
  animation: railRise 0.55s ease forwards;
}

.rail li:nth-child(1) { animation-delay: 0.05s; }
.rail li:nth-child(2) { animation-delay: 0.11s; }
.rail li:nth-child(3) { animation-delay: 0.17s; }
.rail li:nth-child(4) { animation-delay: 0.23s; }
.rail li:nth-child(5) { animation-delay: 0.29s; }
.rail li:nth-child(6) { animation-delay: 0.35s; }
.rail li:nth-child(7) { animation-delay: 0.41s; }

.rail li a {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-height: 40px;
  padding: 9px 2px;
  border-bottom: 2px solid transparent;
  border-radius: var(--r);
  color: #dbcbb0;
  font-size: 15px;
  line-height: 1.4;
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.rail li a::before {
  content: counter(railc, decimal-leading-zero);
  flex: none;
  color: var(--amber);
  font-family: var(--font-head);
  font-size: 11px;
  letter-spacing: 0.12em;
}

.rail li a:hover,
.rail li a:focus-visible {
  color: var(--cream);
  border-bottom-color: var(--amber);
}

@keyframes railRise {
  from { opacity: 0; transform: translateX(-8px); }
  to { opacity: 1; transform: none; }
}

/* ---- 页脚 ---- */
.site-foot {
  margin-top: 12px;
  padding: 40px 22px 22px;
  background: #13100a;
  border-top: 3px solid var(--amber);
}

.foot-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  max-width: 1180px;
  margin: 0 auto;
}

.site-foot address {
  font-style: normal;
}

.foot-brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--cream);
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-decoration: none;
}

.site-foot ul {
  margin: 0;
  padding: 0;
  list-style: none;
  columns: 2;
  column-gap: 20px;
}

.site-foot li a {
  display: flex;
  align-items: center;
  min-height: 40px;
  border-bottom: 1px solid var(--line-soft);
  color: #cbbca1;
  font-size: 15px;
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-foot li a:hover,
.site-foot li a:focus-visible {
  color: var(--cream);
}

.copy {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 18px;
  max-width: 1180px;
  margin: 28px auto 0;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  color: #a89a80;
  font-size: 14px;
  letter-spacing: 0.08em;
}

.to-top {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  color: #d3c3a7;
  font-size: 14px;
  text-decoration: none;
}

.to-top:hover,
.to-top:focus-visible {
  border-color: var(--amber);
  color: var(--cream);
}

/* ---- 响应式 ---- */
@media (max-width: 940px) {
  .mast {
    position: static;
  }

  .menu {
    flex: 1 1 100%;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 26px;
    padding: 26px 18px 38px;
  }

  .hero-shot {
    max-width: 520px;
    margin: 0 auto;
    width: 100%;
  }

  .stage {
    grid-template-columns: 1fr;
    gap: 34px;
    padding: 30px 18px 54px;
  }

  .rail {
    position: static;
    padding: 20px 0 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

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

@media (max-width: 560px) {
  body {
    font-size: 16.5px;
  }

  .strip {
    gap: 14px;
    font-size: 11px;
    letter-spacing: 0.22em;
  }

  .strip span:nth-child(3) {
    display: none;
  }

  .mast {
    padding: 8px 14px;
  }

  .menu > menu a {
    padding: 0 10px;
    font-size: 14.5px;
  }

  .hero-copy h1 {
    font-size: 1.78rem;
  }

  .site-foot {
    padding: 30px 16px 18px;
  }

  .copy {
    justify-content: flex-start;
  }
}

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

  .veil-grain,
  .veil-leak,
  .hero-shot:hover {
    animation: none;
  }

  html.js .prose > article {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .rail li {
    opacity: 1;
    animation: none;
  }
}

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