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

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

:root {
  --ink: #000000;
  --paper: #ffffff;
  --mute: #555555;
  --hair: #e3e3e3;
  --gutter: clamp(1rem, 4vw, 3rem);
  --serif: 'Playfair Display SC', Georgia, 'Times New Roman', serif;
  --sans: 'Karla', system-ui, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.72;
  font-weight: 400;
  letter-spacing: 0.004em;
  overflow-x: hidden;
}

a { color: inherit; }

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

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: 0.01em;
  margin: 0;
  overflow-wrap: anywhere;
}

h1 { font-size: clamp(2rem, 6vw, 3.9rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.3rem); }

p { margin: 0 0 1rem; }

::selection { background: var(--ink); color: var(--paper); }

/* ---------- 顶部两行导航 ---------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
}

.head-brand { padding: 0.55rem var(--gutter) 0; }

.brand {
  display: inline-block;
  padding: 0.3rem 0;
  font-family: var(--serif);
  font-size: 1.45rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
}

.head-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0 var(--gutter) 0.5rem;
}

.menu-ref { position: relative; }

.menu-ref > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0.35rem 1.05rem;
  border: 2px solid var(--ink);
  font-size: 1rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: background 0.2s ease, color 0.2s ease;
}

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

.menu-ref > summary:hover,
.menu-ref[open] > summary { background: var(--ink); color: var(--paper); }

.menu-ref > menu {
  position: absolute;
  top: calc(100% + 0.55rem);
  left: 0;
  z-index: 40;
  margin: 0;
  padding: 0.35rem 0;
  list-style: none;
  background: var(--paper);
  border: 2px solid var(--ink);
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-width: min(24rem, calc(100vw - 2rem));
}

.menu-ref > menu a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.5rem 1rem;
  text-decoration: none;
  border-bottom: 1px solid var(--hair);
  transition: background 0.2s ease, color 0.2s ease;
}

.menu-ref > menu a:hover { background: var(--ink); color: var(--paper); }

.head-cta {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0.35rem 1.15rem;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-size: 1rem;
  letter-spacing: 0.16em;
  border: 2px solid var(--ink);
  transition: background 0.2s ease, color 0.2s ease;
}

.head-cta:hover { background: var(--paper); color: var(--ink); }

/* ---------- 全宽大图 hero ---------- */

.hero {
  position: relative;
  min-height: 45vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
  text-align: center;
  padding: clamp(2.2rem, 6vw, 3.5rem) var(--gutter);
}

.hero-media { position: absolute; inset: 0; overflow: hidden; }

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: translateY(var(--py, 0px)) scale(1.06);
  transition: opacity 0.9s linear;
}

.hero-img.on { opacity: 1; }

.hero-veil { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.56); }

.hero-in { position: relative; z-index: 2; max-width: 52rem; }

.hero h1 { color: #fff; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); }

.hero-desc {
  margin: 1.1rem auto 1.7rem;
  max-width: 38rem;
  color: #f2f2f2;
  font-size: 1.0625rem;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0.55rem 1.6rem;
  border: 2px solid #fff;
  color: #fff;
  text-decoration: none;
  letter-spacing: 0.18em;
  transition: background 0.2s ease, color 0.2s ease;
}

.hero-btn:hover { background: #fff; color: #000; }

/* ---------- 网格主体：图栏 / 正文 / 侧栏 ---------- */

.shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4rem) var(--gutter);
  display: grid;
  grid-template-columns: 172px minmax(0, 1fr) 240px;
  gap: clamp(1.5rem, 3vw, 3rem);
  align-items: start;
}

.fig {
  position: sticky;
  top: 8.5rem;
  margin: 0;
  padding-top: 0.7rem;
  border-top: 3px solid var(--ink);
}

.fig img,
.fig-img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 1px solid var(--hair);
}

.fig figcaption {
  margin-top: 0.6rem;
  font-size: 0.95rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mute);
}

.prose { min-width: 0; }

.prose section {
  margin-top: 2.8rem;
  padding-top: 1.6rem;
  border-top: 2px solid var(--ink);
  scroll-margin-top: 9rem;
}

.prose section:first-child { margin-top: 0; padding-top: 0; border-top: 0; }

.prose h2 { margin-bottom: 0.7rem; }
.prose h3 { margin: 1.7rem 0 0.5rem; }

.prose small {
  display: block;
  font-family: var(--sans);
  font-size: 0.95rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 0.45rem;
}

.prose p { margin: 0 0 1.05rem; }

.prose ul, .prose ol { margin: 0 0 1.1rem; padding-left: 1.25rem; }
.prose li { margin-bottom: 0.4rem; }

.prose a { text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose a:hover { background: var(--ink); color: var(--paper); text-decoration: none; }

.prose blockquote {
  margin: 1.4rem 0;
  padding: 0.2rem 0 0.2rem 1.1rem;
  border-left: 3px solid var(--ink);
  font-size: 1.05rem;
}

.prose figure { margin: 1.5rem 0; }
.prose img { border: 1px solid var(--hair); }
.prose hr { border: 0; border-top: 1px solid var(--hair); margin: 1.8rem 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.prose th, .prose td { border-bottom: 1px solid var(--hair); padding: 0.55rem 0.4rem; text-align: left; }

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

.rail {
  position: sticky;
  top: 8.5rem;
  padding-top: 1rem;
  border-top: 3px solid var(--ink);
}

.rail-t { font-size: 1.15rem; margin-bottom: 0.7rem; }

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

.rail-list a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0.45rem 0;
  text-decoration: none;
  border-bottom: 1px solid var(--hair);
  transition: padding-left 0.2s ease;
}

.rail-list a:hover { padding-left: 0.45rem; }

.rail-note { margin: 1rem 0 0; font-size: 1rem; }

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

.site-foot {
  margin-top: clamp(3rem, 7vw, 6rem);
  background: var(--ink);
  color: var(--paper);
  padding: clamp(2.2rem, 6vw, 4rem) var(--gutter) 1.2rem;
}

.foot-cta {
  max-width: 1200px;
  margin: 0 auto;
  padding-bottom: 2.2rem;
  border-bottom: 1px solid #4a4a4a;
  display: grid;
  justify-items: start;
  gap: 0.7rem;
}

.foot-cta small {
  display: block;
  color: #b9b9b9;
  font-family: var(--sans);
  font-size: 0.95rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
}

.foot-cta h2 { color: #fff; font-size: clamp(1.8rem, 4.5vw, 3rem); }

.foot-btn {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0.55rem 1.5rem;
  border: 2px solid #fff;
  color: #fff;
  text-decoration: none;
  letter-spacing: 0.18em;
  transition: background 0.2s ease, color 0.2s ease;
}

.foot-btn:hover { background: #fff; color: #000; }

.foot-grid {
  max-width: 1200px;
  margin: 2.2rem auto 0;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 2rem;
}

.foot-grid dt {
  font-family: var(--serif);
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  margin-bottom: 0.7rem;
}

.foot-grid dd { margin: 0; color: #d5d5d5; font-size: 1rem; }

.foot-grid a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0.35rem 0;
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid #333;
}

.foot-grid a:hover { text-decoration: underline; }

.foot-bar {
  max-width: 1200px;
  margin: 2rem auto 0;
  padding-top: 1rem;
  border-top: 1px solid #4a4a4a;
  color: #b9b9b9;
  font-size: 1rem;
}

/* ---------- 回到顶部 ---------- */

.totop {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.5rem 0.95rem;
  background: var(--paper);
  color: var(--ink);
  border: 2px solid var(--ink);
  text-decoration: none;
  font-size: 1rem;
}

.totop:hover { background: var(--ink); color: var(--paper); }

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

@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .fig, .rail { position: static; }
  .fig { order: -1; }
  .fig img, .fig-img { aspect-ratio: 16 / 9; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .prose section { scroll-margin-top: 8rem; }
}

@media (max-width: 620px) {
  body { font-size: 1.0625rem; }
  .head-bar { align-items: stretch; }
  .menu-ref > menu { grid-template-columns: 1fr; min-width: calc(100vw - 2rem); }
  .foot-grid { grid-template-columns: 1fr; gap: 1.6rem; }
  .hero { min-height: 45vh; }
  .hero-btn { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .hero-img { transform: none; }
}

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