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

:root {
  --w: #ffffff;
  --g: #f5f5f5;
  --ink: #1f1f1f;
  --ink2: #4b4b4b;
  --ink3: #7c7c7c;
  --line: rgba(31, 31, 31, 0.12);
  --line2: rgba(31, 31, 31, 0.07);
  --glass: rgba(255, 255, 255, 0.66);
  --glass2: rgba(255, 255, 255, 0.9);
  --e1: 0 1px 2px rgba(31, 31, 31, 0.06);
  --e2: 0 6px 18px rgba(31, 31, 31, 0.09);
  --e3: 0 16px 40px rgba(31, 31, 31, 0.13);
  --e4: 0 32px 72px rgba(31, 31, 31, 0.19);
  --pad: clamp(18px, 4vw, 46px);
  --serif: 'Lora', Georgia, 'Songti SC', 'Noto Serif SC', serif;
  --sans: 'Raleway', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
    'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

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

html {
  overflow-x: hidden;
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  max-width: 100%;
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.78;
  color: var(--ink);
  background: var(--w);
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, #f3f3f3 0 24vh, #ffffff 60vh 100%),
    radial-gradient(120% 60% at 88% 4%, #ececec 0 40%, transparent 70%);
}

img {
  max-width: 100%;
}

a {
  color: inherit;
}

h1,
h2,
h3,
h4 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

/* ---------- 角落品牌 ---------- */

.mark {
  position: fixed;
  top: 16px;
  left: var(--pad);
  z-index: 50;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  max-width: 168px;
  min-height: 48px;
  padding: 0 12px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--ink);
  text-decoration: none;
  background: var(--glass2);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  box-shadow: var(--e2);
}

.mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mark span {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- 首屏 ---------- */

.hero {
  position: relative;
  isolation: isolate;
  max-width: 1200px;
  margin: 0 auto;
  min-height: 70vh;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  align-items: center;
  gap: clamp(22px, 4vw, 64px);
  padding: clamp(90px, 12vh, 130px) var(--pad) clamp(52px, 9vh, 110px);
}

.hero::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14%;
  height: clamp(120px, 22vh, 230px);
  z-index: -1;
  background: linear-gradient(100deg, #ededed 0 42%, #f7f7f7 68%, #ffffff 100%);
  clip-path: polygon(0 30%, 100% 0, 100% 70%, 0 100%);
  box-shadow: var(--e2);
}

.hero.no-media {
  grid-template-columns: minmax(0, 1fr);
}

.hero-fig {
  margin: 0;
  order: 1;
  position: relative;
  z-index: 2;
  min-width: 0;
  padding: 11px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  box-shadow: var(--e4);
}

.hero-fig::after {
  content: '';
  position: absolute;
  inset: 11px;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.55);
}

.hero-img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: 58vh;
  object-fit: cover;
}

.hero-txt {
  order: 2;
  position: relative;
  z-index: 3;
  min-width: 0;
  text-align: right;
}

.hero h1 {
  margin: 0 0 20px;
  font-size: clamp(29px, 4.6vw, 54px);
  line-height: 1.14;
  letter-spacing: -0.015em;
}

.hero-lead {
  margin: 0 0 0 auto;
  max-width: 34ch;
  font-size: 16px;
  line-height: 1.8;
  color: var(--ink2);
}

/* ---------- 正文区 ---------- */

.reader {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--pad) clamp(64px, 11vh, 130px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 296px;
  gap: clamp(24px, 3.6vw, 52px);
  align-items: start;
}

.reader > .band,
.reader > .prose,
.reader > .rail {
  min-width: 0;
}

.reader > .band {
  grid-column: 1 / -1;
  grid-row: 1;
  margin: 0 0 clamp(20px, 3vh, 34px);
  padding: 10px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  box-shadow: var(--e3);
}

.band-img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: 46vh;
  object-fit: cover;
}

.prose {
  grid-column: 1;
  grid-row: 2;
  min-width: 0;
  max-width: 100%;
  padding: clamp(20px, 3.4vw, 44px);
  background: var(--glass);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  box-shadow: var(--e2);
  overflow-wrap: anywhere;
}

.prose > div {
  position: relative;
  padding: clamp(26px, 4vw, 46px) 0;
  scroll-margin-top: 28px;
}

.prose > div:first-child {
  padding-top: 0;
}

.prose > div + div {
  border-top: 1px solid var(--line);
}

.prose > div:last-child {
  padding-bottom: 0;
}

.prose h2 {
  margin: 0 0 16px;
  font-size: clamp(22px, 2.9vw, 31px);
  line-height: 1.28;
}

.prose h3 {
  margin: 28px 0 12px;
  font-size: clamp(19px, 2.2vw, 23px);
}

.prose p {
  margin: 0 0 16px;
  color: var(--ink2);
}

.prose p:last-child {
  margin-bottom: 0;
}

.prose ul,
.prose ol {
  margin: 0 0 18px;
  padding-left: 22px;
  color: var(--ink2);
}

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

.prose a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid rgba(31, 31, 31, 0.34);
}

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

.prose figure {
  margin: 22px 0;
  max-width: 100%;
  padding: 9px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--e1);
  overflow: hidden;
}

.prose figcaption {
  padding: 8px 2px 2px;
  font-size: 13px;
  color: var(--ink3);
}

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

.prose blockquote {
  margin: 22px 0;
  padding: 16px 20px;
  background: #fff;
  border-left: 3px solid var(--ink);
  box-shadow: var(--e1);
  color: var(--ink2);
}

.prose blockquote p:last-child {
  margin-bottom: 0;
}

.prose table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 15px;
}

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

.prose th {
  background: var(--g);
}

.prose pre {
  max-width: 100%;
  overflow-x: auto;
}

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

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

.rail {
  grid-column: 2;
  grid-row: 2;
  position: sticky;
  top: 24px;
  z-index: 4;
  padding: 20px 18px;
  background: var(--glass2);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid var(--line);
  box-shadow: var(--e3);
}

.rail small {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: 0.13em;
  color: var(--ink3);
}

.rail h2 {
  margin: 0 0 14px;
  padding-bottom: 12px;
  font-size: 19px;
  border-bottom: 1px solid var(--line);
}

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

.rail li {
  counter-increment: rail;
  border-bottom: 1px dashed var(--line2);
}

.rail li:last-child {
  border-bottom: 0;
}

.rail a {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-height: 44px;
  padding: 12px 4px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.18s ease, color 0.18s ease;
}

.rail a::before {
  content: counter(rail, decimal-leading-zero);
  font-family: var(--serif);
  font-size: 12px;
  color: var(--ink3);
}

.rail a:hover {
  transform: translateX(5px);
  color: #000;
}

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

.foot {
  position: relative;
  padding: 0 var(--pad) calc(96px + env(safe-area-inset-bottom, 0px));
  background: var(--g);
  border-top: 1px solid var(--line);
}

.foot::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--ink) 0 24%, transparent 24% 100%);
}

.cta {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(48px, 8vh, 92px) 0 clamp(30px, 4.6vh, 54px);
  border-bottom: 1px solid var(--line);
}

.cta small {
  display: block;
  margin-bottom: 14px;
  font-size: 12px;
  letter-spacing: 0.16em;
  line-height: 1.6;
  color: var(--ink3);
}

.cta h2 {
  margin: 0 0 26px;
  max-width: 15ch;
  font-size: clamp(26px, 4.4vw, 50px);
  line-height: 1.14;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  min-height: 50px;
  padding: 0 32px;
  font-size: 15px;
  letter-spacing: 0.12em;
  color: #fff;
  text-decoration: none;
  background: var(--ink);
  box-shadow: var(--e3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cta-btn:hover {
  transform: translateY(-3px);
  box-shadow: var(--e4);
}

.foot-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px 40px;
  border-bottom: 1px solid var(--line);
}

.foot-main address {
  font-style: normal;
  font-family: var(--serif);
  font-size: 18px;
  letter-spacing: 0.03em;
}

.foot-main ul {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 26px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.foot-main a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: 15px;
  color: var(--ink2);
  text-decoration: none;
}

.foot-main a:hover {
  color: var(--ink);
}

.foot-end {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  font-size: 14px;
  color: var(--ink3);
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 20px;
}

.foot-end a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--ink3);
  text-decoration: none;
}

.foot-end a:hover {
  color: var(--ink);
}

/* ---------- 底部固定导航 ---------- */

.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  justify-content: center;
  padding: 13px var(--pad) calc(13px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.74);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  border-top: 1px solid var(--line);
  box-shadow: 0 -12px 34px rgba(31, 31, 31, 0.1);
}

.drawer {
  position: relative;
  min-width: 0;
}

.drawer summary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 26px;
  font-size: 14px;
  letter-spacing: 0.18em;
  color: #fff;
  background: var(--ink);
  box-shadow: var(--e2);
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

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

.drawer summary::after {
  content: '';
  width: 0;
  height: 0;
  border: 5px solid transparent;
  border-bottom-color: #fff;
  transform: translateY(3px);
  transition: transform 0.2s ease;
}

.drawer summary:hover {
  transform: translateY(-2px);
  box-shadow: var(--e3);
}

.drawer[open] summary::after {
  transform: rotate(180deg) translateY(3px);
}

.drawer menu {
  position: absolute;
  bottom: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%);
  width: min(80vw, 306px);
  max-width: calc(100vw - 28px);
  margin: 0;
  padding: 10px;
  list-style: none;
  background: rgba(255, 255, 255, 0.95);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid var(--line);
  box-shadow: var(--e4);
}

.drawer menu li + li {
  border-top: 1px solid var(--line2);
}

.drawer menu a {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 0 14px;
  font-size: 16px;
  color: var(--ink);
  text-decoration: none;
  transition: background 0.16s ease, padding-left 0.16s ease;
}

.drawer menu a:hover,
.drawer menu a:focus-visible {
  background: #f1f1f1;
  padding-left: 22px;
}

/* ---------- 动效 ---------- */

@media (prefers-reduced-motion: no-preference) {
  .prose > div {
    animation: rise 0.62s cubic-bezier(0.22, 0.68, 0.35, 1) both;
  }

  .prose > div:nth-child(2) {
    animation-delay: 0.05s;
  }

  .prose > div:nth-child(3) {
    animation-delay: 0.1s;
  }

  .prose > div:nth-child(4) {
    animation-delay: 0.15s;
  }

  .prose > div:nth-child(5) {
    animation-delay: 0.2s;
  }

  .prose > div:nth-child(6) {
    animation-delay: 0.25s;
  }

  .prose > div:nth-child(7) {
    animation-delay: 0.3s;
  }

  .hero-fig,
  .hero-txt {
    animation: rise 0.7s cubic-bezier(0.22, 0.68, 0.35, 1) both;
  }

  .hero-txt {
    animation-delay: 0.12s;
  }

  @keyframes rise {
    from {
      opacity: 0;
      transform: translate3d(0, 22px, 0);
    }
    to {
      opacity: 1;
      transform: translate3d(0, 0, 0);
    }
  }
}

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

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

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

@media (max-width: 920px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    padding-top: clamp(84px, 12vh, 104px);
    gap: 26px;
  }

  .hero-fig {
    order: 1;
  }

  .hero-txt {
    order: 2;
  }

  .hero-img {
    max-height: 40vh;
  }

  .hero::before {
    bottom: 6%;
    height: 120px;
  }

  .reader {
    grid-template-columns: minmax(0, 1fr);
  }

  .reader > .band {
    grid-row: 1;
  }

  .prose {
    grid-column: 1;
    grid-row: 2;
  }

  .rail {
    grid-column: 1;
    grid-row: 3;
    position: static;
    margin-top: 6px;
  }
}

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

  .mark {
    top: 12px;
    left: 14px;
    max-width: 132px;
    font-size: 12px;
  }

  .hero {
    padding-left: 14px;
    padding-right: 14px;
  }

  .hero::before {
    left: 0;
    right: 0;
  }

  .hero-fig {
    padding: 8px;
  }

  .hero-img {
    max-height: 34vh;
  }

  .reader {
    padding-left: 14px;
    padding-right: 14px;
  }

  .prose {
    padding: 20px 16px;
  }

  .foot {
    padding-left: 14px;
    padding-right: 14px;
  }

  .dock {
    padding-left: 14px;
    padding-right: 14px;
  }

  .drawer menu {
    width: min(88vw, 280px);
  }

  .foot-main {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

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