@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: #26171f;
  --ink-2: #321f2a;
  --ink-3: #3d2432;
  --pink: #ff0080;
  --mag: #ff00ff;
  --paper: #fbeef5;
  --muted: #d6b8c8;
  --line: rgba(255, 0, 128, 0.24);
  --line-2: rgba(255, 0, 255, 0.16);
  --r: 28px;
  --rail: 268px;
  --display: 'Playfair Display SC', 'Karla', Georgia, 'Songti SC', serif;
  --body: 'Karla', system-ui, -apple-system, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

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

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: clip;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

body::before {
  inset: -22vmax;
  background:
    radial-gradient(38vmax 38vmax at 14% 16%, rgba(255, 0, 128, 0.55), transparent 62%),
    radial-gradient(30vmax 30vmax at 84% 10%, rgba(255, 0, 255, 0.42), transparent 60%),
    radial-gradient(34vmax 34vmax at 28% 88%, rgba(255, 0, 255, 0.3), transparent 62%),
    conic-gradient(from 210deg at 72% 76%, rgba(255, 0, 128, 0.36), rgba(255, 0, 255, 0.26), transparent 58%);
  filter: blur(30px) saturate(1.2);
  mix-blend-mode: screen;
  opacity: 0.62;
  animation: aurora 26s ease-in-out infinite alternate;
}

body::after {
  background:
    radial-gradient(62vmax 40vmax at 52% 118%, rgba(255, 0, 128, 0.34), transparent 70%),
    conic-gradient(from 40deg at 86% 58%, rgba(255, 0, 255, 0.2), transparent 32%, rgba(255, 0, 128, 0.2) 66%, transparent 90%);
  filter: blur(44px);
  opacity: 0.5;
  animation: prism 19s linear infinite;
}

@keyframes aurora {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  55% { transform: translate3d(-2.2%, 1.6%, 0) scale(1.07) rotate(1.4deg); }
  100% { transform: translate3d(2.4%, -2%, 0) scale(1.04) rotate(-1.2deg); }
}

@keyframes prism {
  0% { filter: blur(44px) hue-rotate(0deg); }
  100% { filter: blur(44px) hue-rotate(360deg); }
}

::selection {
  background: var(--pink);
  color: #fff;
}

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

[hidden] { display: none !important; }

.skip {
  position: absolute;
  left: 0.5rem;
  top: -4rem;
  z-index: 40;
  padding: 0.7rem 1.1rem;
  border-radius: 14px;
  background: var(--pink);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.18s ease;
}

.skip:focus { top: 0.5rem; }

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

/* ---------- 左侧竖排导航 ---------- */

.rail {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--rail);
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  padding: 2rem 1.15rem 1.5rem;
  overflow-y: auto;
  background: linear-gradient(180deg, rgba(38, 23, 31, 0.94), rgba(38, 23, 31, 0.76));
  backdrop-filter: blur(16px);
  border-right: 1px solid var(--line);
}

.brand {
  display: block;
  padding: 0.35rem 0.4rem 0.5rem;
  font-family: var(--display);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--paper);
  background: linear-gradient(96deg, #ffffff, var(--pink) 58%, var(--mag));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.find {
  display: block;
  padding: 0 0.4rem;
}

.find-label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.find-input {
  width: 100%;
  min-height: 44px;
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--line-2);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--paper);
  font-family: inherit;
  font-size: 0.95rem;
}

.find-input::placeholder { color: rgba(251, 238, 245, 0.45); }

.menu {
  list-style: none;
  margin: 0;
  padding: 0 0 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  counter-reset: m;
}

.menu li a {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 44px;
  padding: 0.4rem 0.7rem;
  border-radius: 14px;
  color: var(--paper);
  text-decoration: none;
  font-size: 0.98rem;
  line-height: 1.35;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.menu li a::before {
  counter-increment: m;
  content: counter(m, decimal-leading-zero);
  font-family: var(--display);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--pink);
  opacity: 0.9;
  min-width: 1.7em;
}

.menu li a:hover,
.menu li a:focus-visible {
  background: var(--pink);
  color: #fff;
  transform: translateX(2px);
}

.menu li a:hover::before,
.menu li a:focus-visible::before { color: #fff; }

.page {
  position: relative;
  z-index: 1;
  margin-left: var(--rail);
}

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

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  min-height: 100svh;
  padding: clamp(2rem, 5vw, 3.5rem) clamp(1.15rem, 5vw, 4rem) 0;
  overflow: hidden;
}

.hero-copy {
  position: relative;
  z-index: 2;
  text-align: right;
  padding-top: clamp(0.5rem, 4vh, 2.5rem);
}

.hero h1 {
  margin: 0 0 1rem auto;
  max-width: 16ch;
  font-family: var(--display);
  font-size: clamp(2.35rem, 6.6vw, 5.2rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.015em;
  color: #fff;
  text-shadow: 0 0 46px rgba(255, 0, 128, 0.4);
}

.hero .subtitle {
  margin: 0 0 0 auto;
  max-width: 44ch;
  font-size: clamp(0.98rem, 1.35vw, 1.1rem);
  line-height: 1.75;
  color: var(--muted);
}

.hero-num {
  position: absolute;
  z-index: 1;
  left: clamp(0.5rem, 3vw, 2.5rem);
  top: clamp(2rem, 10vh, 5.5rem);
  font-family: var(--display);
  font-size: clamp(7rem, 20vw, 17rem);
  line-height: 0.8;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(255, 0, 128, 0.5);
  letter-spacing: -0.04em;
  pointer-events: none;
  user-select: none;
}

.hero-media {
  position: relative;
  z-index: 1;
  margin-top: clamp(1.6rem, 4vh, 3rem);
  height: clamp(190px, 36vh, 360px);
  overflow: hidden;
  border-radius: var(--r) var(--r) 0 0;
  background:
    linear-gradient(112deg, var(--pink), var(--mag) 52%, var(--ink-3) 96%);
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(70% 120% at 20% 10%, rgba(255, 255, 255, 0.28), transparent 60%);
  mix-blend-mode: screen;
  pointer-events: none;
}

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

/* ---------- 内容两栏 ---------- */

.cols {
  display: grid;
  grid-template-columns: 208px minmax(0, 1fr);
  align-items: start;
  gap: clamp(1.5rem, 4vw, 3.4rem);
  padding: clamp(2.4rem, 6vw, 4.5rem) clamp(1.15rem, 5vw, 4rem);
}

.side {
  position: sticky;
  top: 2rem;
  padding: 1.4rem 1.1rem 1.2rem;
  border-radius: var(--r);
  background: var(--ink-2);
}

.side h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  color: #fff;
}

.side .subtitle {
  margin: 0.2rem 0 1rem;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  color: var(--mag);
}

.side-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.12rem;
}

.side-list a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0.3rem 0.55rem;
  border-radius: 12px;
  color: var(--paper);
  text-decoration: none;
  font-size: 0.94rem;
  line-height: 1.4;
}

.side-list a:hover,
.side-list a:focus-visible {
  background: rgba(255, 0, 128, 0.22);
  color: #fff;
}

.prose {
  max-width: 68ch;
  counter-reset: sec;
}

.prose > article {
  position: relative;
  padding: clamp(2rem, 5vw, 3.2rem) 0;
  border-top: 1px solid var(--line-2);
  scroll-margin-top: 1.5rem;
}

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

.prose > article::before {
  counter-increment: sec;
  content: counter(sec, decimal-leading-zero);
  position: absolute;
  right: 0;
  top: clamp(1.9rem, 4.6vw, 3rem);
  font-family: var(--display);
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 0, 255, 0.34);
  pointer-events: none;
}

.prose > article:first-child::before { top: 0; }

.prose h2 {
  margin: 0 0 0.7rem;
  max-width: 24ch;
  font-family: var(--display);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  line-height: 1.22;
  color: #fff;
  letter-spacing: -0.01em;
}

.prose h2 + p { color: var(--muted); }

.prose h3 {
  margin: 1.7rem 0 0.5rem;
  font-size: 1.16rem;
  line-height: 1.4;
  color: #fff;
}

.prose p {
  margin: 0 0 1.1rem;
  color: #f0dde7;
  line-height: 1.85;
}

.prose a {
  color: var(--pink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.prose a:hover { color: var(--mag); }

.prose ul,
.prose ol {
  margin: 0 0 1.2rem;
  padding-left: 1.2rem;
  color: #f0dde7;
}

.prose li { margin-bottom: 0.5rem; line-height: 1.8; }

.prose li::marker { color: var(--pink); }

.prose img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.4rem 0;
  border-radius: var(--r);
}

.prose blockquote {
  margin: 1.5rem 0;
  padding: 1.1rem 1.3rem;
  border-radius: 22px;
  background: var(--ink-2);
  color: var(--muted);
}

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

.prose code {
  padding: 0.12em 0.4em;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 0.92em;
}

.prose table {
  width: 100%;
  margin: 1.4rem 0;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.prose th,
.prose td {
  padding: 0.65rem 0.7rem;
  text-align: left;
  border-bottom: 1px solid var(--line-2);
}

.prose th { color: #fff; font-weight: 600; }

/* ---------- 四栏页脚 ---------- */

.foot {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: clamp(1.4rem, 3.5vw, 2.8rem);
  padding: clamp(2.6rem, 6vw, 4.5rem) clamp(1.15rem, 5vw, 4rem) 1.4rem;
  background: linear-gradient(180deg, rgba(38, 23, 31, 0), rgba(61, 36, 50, 0.92) 42%, var(--ink-3));
  border-top: 1px solid var(--line);
}

.foot h2 {
  margin: 0 0 0.7rem;
  font-family: var(--body);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  color: var(--mag);
}

.foot p {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.7;
  color: var(--muted);
}

.giant {
  font-family: var(--display);
  font-size: clamp(1.9rem, 4.6vw, 3.2rem);
  line-height: 0.98;
  font-weight: 700;
  background: linear-gradient(100deg, #ffffff, var(--pink) 55%, var(--mag));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.foot ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.05rem;
}

.foot ol a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--paper);
  text-decoration: none;
  font-size: 0.94rem;
}

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

.foot-bar {
  grid-column: 1 / -1;
  margin-top: 0.6rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.foot-bar p {
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  color: rgba(251, 238, 245, 0.6);
}

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

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.75s cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body::before,
  body::after { animation: none; }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .menu li a { transition: none; }
}

/* ---------- 窄屏 ---------- */

@media (max-width: 900px) {
  .rail {
    position: sticky;
    top: 0;
    left: auto;
    bottom: auto;
    width: auto;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 1rem;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .brand {
    order: 1;
    font-size: 1.12rem;
    padding: 0.5rem 0.2rem;
  }

  .find {
    order: 3;
    flex: 1 1 100%;
    padding: 0;
  }

  .find-label { display: none; }

  .find-input { min-height: 42px; }

  .menu {
    order: 2;
    flex: 1 1 100%;
    flex-direction: row;
    gap: 0.25rem;
    padding: 0 0 0.15rem;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .menu::-webkit-scrollbar { display: none; }

  .menu li a {
    white-space: nowrap;
    padding: 0.45rem 0.75rem;
    min-height: 42px;
  }

  .menu li a::before { min-width: auto; }

  .page { margin-left: 0; }

  .hero {
    min-height: auto;
    padding: 1.6rem 1.15rem 0;
  }

  .hero-copy { padding-top: 0; }

  .hero h1 { font-size: clamp(2.05rem, 9vw, 3rem); }

  .hero-num {
    font-size: clamp(5rem, 26vw, 9rem);
    top: 1.6rem;
    opacity: 0.75;
  }

  .hero-media {
    height: 32vh;
    margin-top: 1.6rem;
  }

  .cols {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.6rem;
    padding: 2rem 1.15rem 2.6rem;
  }

  .side { position: static; padding: 1.1rem 0.9rem; }

  .side-list { grid-template-columns: 1fr 1fr; }

  .prose > article { scroll-margin-top: 150px; }

  .foot {
    grid-template-columns: 1fr 1fr;
    padding: 2.2rem 1.15rem 1.2rem;
  }

  .foot-brand { grid-column: 1 / -1; }
}

@media (max-width: 420px) {
  .prose > article::before { display: none; }
  .side-list { grid-template-columns: 1fr; }
}

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