@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&display=swap');

:root {
  --paper: #f5e6c8;
  --gold: #d4a574;
  --ink: #262117;
  --line: rgba(38, 33, 23, 0.16);
  --soft: rgba(255, 251, 240, 0.55);
  --shadow: 0 16px 34px rgba(38, 33, 23, 0.15);
  --shadow-sm: 0 6px 16px rgba(38, 33, 23, 0.12);
  --r: 18px;
  --dock: 68px;
}

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

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

body {
  margin: 0;
  padding-bottom: calc(var(--dock) + 26px);
  background: var(--paper);
  background-image:
    radial-gradient(900px 520px at 88% -8%, rgba(212, 165, 116, 0.35), transparent 70%),
    radial-gradient(700px 480px at 4% 42%, rgba(212, 165, 116, 0.2), transparent 72%);
  color: var(--ink);
  font-family: "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  font-weight: 400;
  position: relative;
}

body.locked { overflow: hidden; }

/* 胶片颗粒 */
body::after {
  content: "";
  position: fixed;
  inset: -12%;
  z-index: 95;
  pointer-events: none;
  opacity: 0.16;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='140' height='140' filter='url(%23n)' opacity='0.6'/></svg>");
  animation: grain 1.2s steps(4) infinite;
}

/* 漏光 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(420px 320px at 82% 6%, rgba(226, 152, 84, 0.3), transparent 70%),
    radial-gradient(520px 380px at 12% 92%, rgba(212, 165, 116, 0.24), transparent 74%);
  animation: leak 16s ease-in-out infinite alternate;
}

@keyframes grain {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2%, 1.5%); }
  50% { transform: translate(1.5%, -2%); }
  75% { transform: translate(-1%, -1%); }
  100% { transform: translate(0, 0); }
}

@keyframes leak {
  0% { opacity: 0.55; transform: scale(1); }
  100% { opacity: 1; transform: scale(1.04); }
}

img { max-width: 100%; }

a { color: #8a5a24; }

.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;
}

/* 角标品牌 */
.mark {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 75;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid rgba(38, 33, 23, 0.22);
  background: rgba(245, 230, 200, 0.9);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.04em;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.mark:hover { transform: translateY(-2px) rotate(-1.5deg); box-shadow: var(--shadow); }

.mark-img { height: 26px; width: auto; display: block; border-radius: 5px; }
.mark-txt { font-size: 0.95rem; }

/* 全屏遮罩菜单 */
.veil {
  position: fixed;
  inset: 0;
  z-index: 65;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 84px 18px calc(var(--dock) + 34px);
  overflow: auto;
  color: var(--paper);
  background:
    linear-gradient(158deg, #262117 0%, #3b3223 55%, #201c14 100%);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.34s ease, visibility 0.34s ease;
}

.veil.on { opacity: 1; visibility: visible; }

.veil-in {
  width: 100%;
  max-width: 560px;
}

.veil-brand {
  margin: 0 0 14px;
  padding: 0 12px;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.24em;
  color: var(--gold);
}

.veil-nav { display: block; }

.veil-list {
  list-style: none;
  counter-reset: m;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}

.veil.on .veil-list { animation: vhs 0.52s ease-out both; }

@keyframes vhs {
  0% { transform: skewY(1.3deg) translateY(16px); opacity: 0.15; filter: blur(1.5px); }
  60% { transform: skewY(-0.4deg); opacity: 0.9; filter: blur(0); }
  100% { transform: none; opacity: 1; }
}

.veil-list li {
  counter-increment: m;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  border-bottom: 1px solid rgba(212, 165, 116, 0.22);
}

.veil-list li::before {
  content: counter(m, decimal-leading-zero);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: rgba(212, 165, 116, 0.8);
  padding-left: 10px;
}

.veil-list a {
  display: flex;
  align-items: center;
  min-height: 50px;
  padding: 10px 10px 10px 0;
  color: var(--paper);
  text-decoration: none;
  font-size: clamp(1.06rem, 3.9vw, 1.4rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: color 0.2s ease, transform 0.2s ease;
}

.veil-list a:hover { color: var(--gold); transform: translateX(5px); }

/* 侧栏 */
.wrap {
  position: relative;
  z-index: 2;
  padding: 0 16px;
}

.rail { display: none; }

.rail-h {
  margin: 0 0 10px;
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  color: #7a5a30;
}

.rail-h span { display: inline-block; border-bottom: 2px solid var(--gold); padding-bottom: 3px; }

.rail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--line);
}

.rail-list a {
  display: block;
  min-height: 42px;
  padding: 9px 8px 9px 12px;
  color: rgba(38, 33, 23, 0.8);
  text-decoration: none;
  font-size: 0.94rem;
  line-height: 1.5;
  border-left: 2px solid transparent;
  margin-left: -1px;
  transition: color 0.2s ease, border-color 0.2s ease, padding-left 0.2s ease;
}

.rail-list a:hover {
  color: var(--ink);
  border-left-color: var(--gold);
  padding-left: 16px;
}

/* 主区 */
.main { min-width: 0; }

.doc { min-width: 0; padding-bottom: 10px; }

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  gap: 26px;
  align-items: center;
  min-height: 70vh;
  padding: 88px 0 40px;
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -18px;
  height: 52px;
  z-index: -1;
  transform: skewY(-2.2deg);
  background: linear-gradient(90deg, rgba(212, 165, 116, 0), rgba(212, 165, 116, 0.55), rgba(212, 165, 116, 0));
}

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

.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 7.2vw, 3.3rem);
  line-height: 1.14;
  font-weight: 800;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.lede {
  margin: 0 auto;
  max-width: 44ch;
  font-size: 1rem;
  line-height: 1.7;
  color: rgba(38, 33, 23, 0.78);
}

.hero-shot {
  margin: 0 auto;
  width: min(100%, 420px);
  padding: 12px 12px 42px;
  background: #fffdf3;
  border: 1px solid rgba(38, 33, 23, 0.14);
  border-radius: 8px;
  box-shadow: 0 22px 42px rgba(38, 33, 23, 0.22);
  transform: rotate(-1.6deg);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.hero-shot:hover { transform: rotate(-1.6deg) translateY(-5px); box-shadow: 0 28px 50px rgba(38, 33, 23, 0.26); }

.shot-img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 4px;
  filter: sepia(0.2) contrast(1.06) saturate(0.86);
  transform: translateY(var(--py, 0px));
}

/* 正文卡片 */
.doc > section {
  position: relative;
  margin: 0 0 20px;
  padding: 24px 18px;
  scroll-margin-top: 18px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
}

.doc > section:nth-of-type(even) { transform: rotate(-0.14deg); }
.doc > section:nth-of-type(odd) { transform: rotate(0.1deg); }

.doc > section > *:first-child { margin-top: 0; }
.doc > section > *:last-child { margin-bottom: 0; }

.doc h2 {
  margin: 0 0 14px;
  font-size: clamp(1.24rem, 4vw, 1.62rem);
  line-height: 1.34;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.doc h2 span {
  display: inline-block;
  padding-bottom: 5px;
  border-bottom: 3px solid var(--gold);
}

.doc h3 {
  margin: 22px 0 10px;
  font-size: 1.08rem;
  line-height: 1.4;
  font-weight: 800;
}

.doc h3 span { border-bottom: 2px solid rgba(212, 165, 116, 0.78); padding-bottom: 3px; }

.doc p { margin: 0 0 14px; }

.doc ul,
.doc ol { margin: 0 0 14px; padding-left: 1.25em; }

.doc li { margin: 0 0 6px; }

.doc a {
  color: #8a5a24;
  text-decoration: none;
  border-bottom: 1px solid rgba(212, 165, 116, 0.85);
  transition: color 0.2s ease, border-color 0.2s ease;
}

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

.doc strong { font-weight: 800; }

.doc blockquote {
  margin: 0 0 14px;
  padding: 6px 0 6px 16px;
  border-left: 3px solid var(--gold);
  color: rgba(38, 33, 23, 0.82);
}

.doc figure { margin: 0 0 14px; }

.doc figure img,
.doc section img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  filter: sepia(0.16) contrast(1.04) saturate(0.9);
}

.doc table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 14px;
  font-size: 0.95rem;
}

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

.doc th { font-weight: 800; background: rgba(212, 165, 116, 0.2); }

.doc hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }

/* 页脚 */
.foot {
  position: relative;
  z-index: 2;
  margin-top: 42px;
  padding: 32px 16px 26px;
  color: var(--paper);
  background: linear-gradient(180deg, rgba(38, 33, 23, 0.97), #1c1810);
  border-top: 3px solid var(--gold);
}

.foot-in {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  gap: 24px;
}

.foot-top { display: grid; gap: 16px; align-items: end; }

.foot-title {
  margin: 0;
  font-size: clamp(1.4rem, 5vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.foot-title span { color: var(--gold); }

.subscribe { display: flex; flex-wrap: wrap; gap: 8px; }

.subscribe input {
  flex: 1 1 150px;
  min-width: 0;
  min-height: 44px;
  padding: 0 16px;
  font-size: 16px;
  font-family: inherit;
  color: var(--paper);
  background: rgba(245, 230, 200, 0.08);
  border: 1px solid rgba(212, 165, 116, 0.45);
  border-radius: 999px;
}

.subscribe input::placeholder { color: rgba(245, 230, 200, 0.6); }

.subscribe button {
  min-height: 44px;
  padding: 0 18px;
  font-size: 16px;
  font-family: inherit;
  font-weight: 800;
  color: var(--ink);
  background: var(--gold);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.subscribe button:hover { transform: translateY(-2px); background: #e2b587; }

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

.foot-cols dl { margin: 0; }

.foot-cols dt {
  margin-bottom: 8px;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--gold);
}

.foot-cols dd {
  margin: 0;
  font-size: 1rem;
  color: rgba(245, 230, 200, 0.8);
  overflow-wrap: anywhere;
}

.foot-cols a {
  display: inline-block;
  padding: 11px 0;
  color: rgba(245, 230, 200, 0.82);
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
}

.foot-cols a:hover { color: var(--gold); transform: translateX(3px); }

.foot-base {
  padding-top: 16px;
  text-align: center;
  border-top: 1px solid rgba(212, 165, 116, 0.26);
  font-size: 0.9rem;
  color: rgba(245, 230, 200, 0.6);
}

.foot-base p { margin: 3px 0; overflow-wrap: anywhere; }

/* 底部固定条 */
.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(30, 26, 18, 0.94);
  border-top: 1px solid rgba(212, 165, 116, 0.5);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.seek { display: flex; flex: 1; gap: 8px; min-width: 0; }

.seek input {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 14px;
  font-size: 16px;
  font-family: inherit;
  color: var(--paper);
  background: rgba(245, 230, 200, 0.1);
  border: 1px solid rgba(212, 165, 116, 0.42);
  border-radius: 999px;
}

.seek input::placeholder { color: rgba(245, 230, 200, 0.6); }

.seek button {
  height: 44px;
  padding: 0 15px;
  font-size: 16px;
  font-family: inherit;
  font-weight: 800;
  color: var(--ink);
  background: var(--gold);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.seek button:hover { background: #e2b587; }

.burger {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  height: 44px;
  width: 48px;
  padding: 0;
  color: var(--paper);
  background: rgba(245, 230, 200, 0.12);
  border: 1px solid rgba(212, 165, 116, 0.45);
  border-radius: 14px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.burger:hover { background: rgba(245, 230, 200, 0.22); }

.bars {
  display: block;
  position: relative;
  width: 20px;
  height: 2px;
  background: currentColor;
  transition: background 0.2s ease;
}

.bars::before,
.bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background: currentColor;
  transition: transform 0.24s ease;
}

.bars::before { top: -6px; }
.bars::after { top: 6px; }

body.locked .bars { background: transparent; }
body.locked .bars::before { transform: translateY(6px) rotate(45deg); }
body.locked .bars::after { transform: translateY(-6px) rotate(-45deg); }

/* 断点 */
@media (min-width: 560px) {
  .doc > section { padding: 28px 24px; }
  .foot { padding: 38px 22px 30px; }
  .hero { padding-top: 96px; }
}

@media (min-width: 820px) {
  .hero {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 34px;
    min-height: 70vh;
    text-align: left;
  }
  .hero-copy { text-align: center; }
  .hero-shot { width: 100%; }
}

@media (min-width: 760px) {
  .foot-top { grid-template-columns: 1.15fr 1fr; }
  .foot-cols { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 960px) {
  .wrap {
    display: grid;
    grid-template-columns: 232px minmax(0, 1fr);
    gap: 36px;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
  }
  .rail {
    display: block;
    position: sticky;
    top: 74px;
    align-self: start;
    margin-top: 96px;
  }
  .main { max-width: 860px; }
  .hero { padding-top: 72px; }
}

@media (min-width: 1200px) {
  .doc > section { padding: 32px 30px; }
}

@media (max-width: 400px) {
  .dock { gap: 8px; padding-left: 10px; padding-right: 10px; }
  .seek button { padding: 0 12px; }
  .doc > section { padding: 20px 15px; border-radius: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body::after,
  body::before { animation: none; }
  .veil.on .veil-list { animation: none; }
  .shot-img { transform: none; }
  .doc > section,
  .hero-shot { transform: none; }
  .mark:hover,
  .veil-list a:hover,
  .foot-cols a:hover,
  .subscribe button:hover { transform: none; }
}

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