@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

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

:root {
  --pink: #ff0080;
  --mag: #ff00ff;
  --ink: #26171f;
  --bg: #150d12;
  --fg: #f7eef4;
  --muted: #bfa8b8;
  --line: rgba(255, 255, 255, 0.15);
  --r: 4px;
  --pad: clamp(1rem, 4vw, 2.5rem);
  --display: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --body: "DM Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

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

body {
  margin: 0;
  padding-bottom: 5.5rem;
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--fg);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: -30vmax;
  z-index: -2;
  background:
    radial-gradient(38% 34% at 18% 22%, rgba(255, 0, 128, 0.55), transparent 72%),
    radial-gradient(42% 38% at 82% 12%, rgba(255, 0, 255, 0.48), transparent 70%),
    radial-gradient(48% 40% at 64% 78%, rgba(255, 0, 128, 0.34), transparent 74%),
    radial-gradient(40% 36% at 12% 84%, rgba(255, 0, 255, 0.28), transparent 72%);
  filter: blur(48px) saturate(1.15);
  animation: aurora 24s ease-in-out infinite alternate;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 88px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 88px),
    linear-gradient(180deg, rgba(21, 13, 18, 0.5), rgba(21, 13, 18, 0.84) 42%, rgba(21, 13, 18, 0.96));
}

@keyframes aurora {
  0%   { transform: translate3d(-2%, -1%, 0) scale(1); filter: blur(48px) saturate(1.15) hue-rotate(0deg); }
  50%  { transform: translate3d(3%, 2%, 0) scale(1.08); filter: blur(56px) saturate(1.3) hue-rotate(-14deg); }
  100% { transform: translate3d(-1%, 4%, 0) scale(1.03); filter: blur(50px) saturate(1.2) hue-rotate(12deg); }
}

a { color: var(--pink); text-decoration: none; }

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

/* ---- 底部固定条 ---- */
.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem var(--pad) calc(0.5rem + env(safe-area-inset-bottom));
  background: rgba(19, 11, 16, 0.93);
  border-top: 1px solid var(--line);
}

.dock-side--left { justify-self: start; }
.dock-side--right { justify-self: end; }

.dock-btn {
  position: relative;
  z-index: 61;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: rgba(255, 255, 255, 0.05);
  color: var(--fg);
  font-family: var(--display);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.dock-btn::-webkit-details-marker { display: none; }
.dock-btn:hover { border-color: var(--pink); background: rgba(255, 0, 128, 0.16); }

.ic { width: 15px; display: grid; gap: 3px; }
.ic i { display: block; height: 2px; background: currentColor; border-radius: 2px; }

.ic--q { width: 12px; height: 12px; border: 2px solid currentColor; border-radius: 50%; }
.ic--q::after {
  content: "";
  position: absolute;
  right: 0.62rem;
  bottom: 0.6rem;
  width: 6px;
  height: 2px;
  background: currentColor;
  transform: rotate(45deg);
}

.dock-brand {
  font-family: var(--display);
  font-size: clamp(0.88rem, 3.2vw, 1.05rem);
  font-weight: 600;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.dock-brand a { color: var(--fg); }

/* ---- 全屏遮罩菜单 ---- */
.sheet {
  position: fixed;
  inset: 0;
  z-index: 60;
  margin: 0;
  padding: 4.5rem var(--pad) 7.5rem;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  overflow-y: auto;
  background: rgba(16, 10, 14, 0.96);
  animation: sheetIn 0.26s ease both;
}

.sheet--right { align-items: flex-end; text-align: right; }

@keyframes sheetIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.sheet > li { width: 100%; }

.sheet > li > a {
  display: flex;
  align-items: center;
  min-height: 54px;
  padding: 0 0.2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--fg);
  font-family: var(--display);
  font-size: clamp(1.25rem, 5vw, 1.9rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.sheet--right > li > a { justify-content: flex-end; }
.sheet > li > a:hover { color: var(--pink); padding-left: 0.5rem; }
.sheet--right > li > a:hover { padding-left: 0; padding-right: 0.5rem; }

.sheet > li.seek { border-bottom: 1px solid rgba(255, 255, 255, 0.08); padding-bottom: 1rem; }

.seek-form { display: flex; gap: 0.5rem; margin-bottom: 0.9rem; width: 100%; }

.seek-in {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: rgba(255, 255, 255, 0.06);
  color: var(--fg);
  font: inherit;
  font-size: 1rem;
  -webkit-appearance: none;
  appearance: none;
}

.seek-in::placeholder { color: var(--muted); }
.seek-in::-webkit-search-cancel-button { filter: invert(1) grayscale(1); }

.seek-btn {
  min-height: 48px;
  padding: 0 1.1rem;
  border: 1px solid var(--pink);
  border-radius: var(--r);
  background: linear-gradient(120deg, var(--pink), var(--mag));
  color: #fff;
  font: inherit;
  font-size: 1rem;
  cursor: pointer;
}

.hits {
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: left;
}

.hits li > a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.2rem;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.14);
  color: var(--muted);
  font-size: 1rem;
}

.hits li > a:hover { color: var(--pink); }
.hits .hit-none { padding: 0.6rem 0.2rem; color: var(--muted); font-size: 0.95rem; }

/* ---- 主体 ---- */
main { display: block; }

div {
  max-width: 78rem;
  margin: 0 auto;
  padding: 0 var(--pad);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  text-align: right;
  padding: 5rem 0 8rem;
  overflow: hidden;
}

.hero::before {
  content: "01";
  position: absolute;
  left: -0.06em;
  bottom: -0.16em;
  font-family: var(--display);
  font-size: clamp(9rem, 34vw, 25rem);
  font-weight: 700;
  line-height: 0.8;
  letter-spacing: -0.05em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.16);
  pointer-events: none;
}

.hero h1 {
  position: relative;
  margin: 0;
  max-width: 22ch;
  font-family: var(--display);
  font-size: clamp(2.4rem, 8.6vw, 6.2rem);
  font-weight: 700;
  line-height: 1.03;
  letter-spacing: -0.025em;
  text-wrap: balance;
  background: linear-gradient(102deg, #ffffff 6%, #ffd9ee 36%, var(--pink) 64%, var(--mag) 92%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  position: relative;
  margin: 1.4rem 0 0;
  max-width: 44ch;
  color: var(--muted);
  font-size: 1rem;
}

/* ---- 正文流 ---- */
.flow { min-width: 0; overflow-wrap: break-word; }

.flow > section {
  padding: clamp(2.5rem, 7vw, 4.5rem) 0;
  border-top: 1px solid var(--line);
}

.flow > section:first-child { border-top: 0; padding-top: 0.5rem; }

.flow h2,
.flow h3 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.012em;
  line-height: 1.22;
  text-align: right;
  margin: 0 0 0.8rem;
  text-wrap: balance;
}

.flow h2 { font-size: clamp(1.55rem, 4.4vw, 2.35rem); }
.flow h3 { font-size: clamp(1.2rem, 3.2vw, 1.55rem); margin-top: 2rem; }

hr {
  border: 0;
  height: 1px;
  margin: 0 0 1.5rem;
  background: linear-gradient(90deg, transparent, var(--pink) 45%, var(--mag));
}

.flow h3 + hr { margin-bottom: 1.1rem; }

.flow p { margin: 0 0 1.15rem; max-width: 66ch; margin-left: auto; }
.flow h2 + p, .flow h3 + p { margin-top: 0; }

.flow strong { color: #ffd6ec; font-weight: 700; }

.flow a {
  color: #ff7ec0;
  text-decoration: underline;
  text-decoration-color: rgba(255, 0, 128, 0.42);
  text-underline-offset: 0.24em;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.flow a:hover { color: var(--mag); text-decoration-color: var(--mag); }

.flow ul, .flow ol { margin: 0 0 1.2rem; padding-left: 1.25rem; max-width: 66ch; margin-left: auto; }
.flow li { margin: 0.4rem 0; }
.flow li::marker { color: var(--pink); }

.flow blockquote {
  margin: 1.5rem auto;
  max-width: 66ch;
  padding: 1rem 1.2rem;
  border-left: 3px solid var(--pink);
  border-radius: var(--r);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 22px 46px -32px rgba(255, 0, 128, 0.9);
  color: #f0dfe9;
}

.flow blockquote p { max-width: none; margin-left: 0; }
.flow blockquote p:last-child { margin-bottom: 0; }

.flow img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.4rem auto;
  border-radius: var(--r);
  box-shadow: 0 24px 50px -34px rgba(255, 0, 255, 0.9);
}

.flow figure { margin: 1.4rem 0; }
.flow figcaption { font-size: 0.9rem; color: var(--muted); text-align: center; }

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

.flow th, .flow td { padding: 0.6rem 0.5rem; border-bottom: 1px solid var(--line); text-align: left; }
.flow th { font-family: var(--display); color: #ffd6ec; }

/* ---- 侧栏 ---- */
.rail {
  margin: 0 0 3rem;
  padding: 1.1rem 1.1rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: rgba(255, 255, 255, 0.045);
  box-shadow: 0 26px 54px -38px rgba(255, 0, 128, 0.95);
}

.rail h2 {
  margin: 0 0 0.55rem;
  font-family: var(--display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  color: var(--muted);
  text-align: left;
}

.rail hr { margin-bottom: 0.35rem; }

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

.rail-list a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0.35rem 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.12);
  color: var(--fg);
  font-size: 0.95rem;
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.rail-list li:last-child a { border-bottom: 0; }
.rail-list a:hover { color: var(--pink); padding-left: 0.3rem; }

/* ---- 页脚 ---- */
.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  max-width: 78rem;
  margin: 0 auto;
  padding: 4rem var(--pad) 2rem;
  border-top: 1px solid var(--line);
}

.foot-big {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.2rem, 11vw, 5.5rem);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.035em;
  background: linear-gradient(94deg, var(--pink), var(--mag));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.foot small { color: var(--muted); font-size: 0.88rem; letter-spacing: 0.06em; }

/* ---- 滚动揭示 ---- */
.js .flow > section {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.22, 0.7, 0.3, 1), transform 0.6s cubic-bezier(0.22, 0.7, 0.3, 1);
}

.js .flow > section.in { opacity: 1; transform: none; }

/* ---- 桌面 ---- */
@media (min-width: 60rem) {
  div {
    grid-template-columns: minmax(0, 1fr) 16.5rem;
    column-gap: clamp(2rem, 4vw, 3.6rem);
    align-items: start;
  }

  .hero { grid-column: 1 / -1; padding-bottom: 9rem; }
  .flow { grid-column: 1; }
  .rail { grid-column: 2; position: sticky; top: 2rem; margin-top: 0.5rem; }

  .foot { padding-top: 5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body::before { animation: none; }
  .sheet { animation: none; }
  .js .flow > section { opacity: 1; transform: none; transition: none; }
}

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