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

:root {
  --red: #ff0000;
  --violet: #8b00ff;
  --ink: #261717;
  --bg: #0d0709;
  --fg: #f7eff3;
  --muted: rgba(247, 239, 243, 0.64);
  --glass: rgba(255, 255, 255, 0.055);
  --line: rgba(255, 255, 255, 0.16);
  --radius: 18px;
  --serif: "Bodoni Moda", Georgia, "Songti SC", "Times New Roman", serif;
  --sans: "Jost", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.85;
  letter-spacing: 0.01em;
  overflow-x: hidden;
  overflow-wrap: break-word;
}

body::before {
  content: "";
  position: fixed;
  inset: -12% -12%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(42% 38% at 16% 10%, rgba(255, 0, 0, 0.32), transparent 64%),
    radial-gradient(46% 42% at 88% 16%, rgba(139, 0, 255, 0.34), transparent 62%),
    radial-gradient(60% 50% at 54% 100%, rgba(139, 0, 255, 0.18), transparent 70%),
    radial-gradient(40% 34% at 90% 82%, rgba(255, 0, 0, 0.14), transparent 68%);
}

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

a {
  color: inherit;
  text-underline-offset: 3px;
}

p {
  margin: 0 0 1.1em;
}

menu,
ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

/* 顶部细条 */
.topline {
  position: relative;
  z-index: 30;
  background: linear-gradient(95deg, rgba(255, 0, 0, 0.9), rgba(139, 0, 255, 0.88));
}

.topline p {
  margin: 0 auto;
  max-width: 82rem;
  padding: 0.5rem clamp(1rem, 4vw, 2.5rem);
  font-size: 1rem;
  line-height: 1.55;
  letter-spacing: 0.06em;
  color: #fff;
  text-align: center;
}

/* 页头 */
.masthead {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem clamp(1rem, 4vw, 2.5rem);
  background: rgba(13, 7, 9, 0.6);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 44px;
  text-decoration: none;
}

.brand-type {
  font-family: var(--serif);
  font-size: 1.3rem;
  letter-spacing: 0.08em;
  line-height: 1.2;
}

.brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--line);
}

.drawer {
  position: relative;
}

.drawer > summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0 0.95rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  font-size: 1rem;
  letter-spacing: 0.12em;
  cursor: pointer;
  list-style: none;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

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

.drawer > summary::after {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid var(--red);
  border-bottom: 2px solid var(--red);
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.25s ease;
}

.drawer[open] > summary::after {
  transform: translateY(1px) rotate(225deg);
}

.drawer > menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.55rem);
  min-width: 15rem;
  max-width: min(22rem, calc(100vw - 2rem));
  padding: 0.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(22, 12, 18, 0.92);
  box-shadow: 0 34px 70px -34px rgba(0, 0, 0, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.drawer > menu a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.85rem;
  border-radius: 12px;
  font-size: 1rem;
  text-decoration: none;
  color: var(--fg);
}

.drawer > menu a:hover {
  background: rgba(255, 0, 0, 0.16);
}

/* 首屏 */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100svh;
  padding: clamp(2.5rem, 9vw, 5rem) clamp(1.1rem, 5vw, 4rem) clamp(6rem, 16vw, 10rem);
  overflow: hidden;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 82rem;
  width: 100%;
  margin: 0 auto;
}

.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.7rem, 10vw, 7rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  text-align: left;
  max-width: 18ch;
  text-shadow: 0 0 70px rgba(255, 0, 0, 0.34), 0 0 140px rgba(139, 0, 255, 0.3);
}

.hero-rule {
  width: clamp(4rem, 18vw, 11rem);
  height: 3px;
  margin-top: 1.6rem;
  background: linear-gradient(90deg, var(--red), var(--violet));
  box-shadow: 0 0 22px rgba(255, 0, 0, 0.7);
}

.hero-sweep {
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: -2px;
  height: 30vh;
  pointer-events: none;
  background: linear-gradient(102deg, rgba(255, 0, 0, 0.46), rgba(139, 0, 255, 0.44) 58%, rgba(13, 7, 9, 0) 94%);
  clip-path: polygon(0 66%, 100% 0, 100% 100%, 0 100%);
  opacity: 0.9;
}

/* 主体 */
main {
  padding: 0 clamp(0.9rem, 4vw, 2.5rem) 3.5rem;
}

.stage {
  max-width: 82rem;
  margin: 0 auto;
}

.veil {
  margin: 0 0 1.5rem;
  height: clamp(8rem, 20vw, 13rem);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 34px 70px -44px rgba(0, 0, 0, 0.95);
}

.veil-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.veil-glow {
  width: 100%;
  height: 100%;
  background:
    radial-gradient(58% 92% at 18% 8%, rgba(255, 0, 0, 0.55), transparent 62%),
    radial-gradient(58% 92% at 82% 26%, rgba(139, 0, 255, 0.5), transparent 62%),
    rgba(255, 255, 255, 0.04);
}

.stage-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.prose > section {
  margin: 0 0 1.4rem;
  padding: clamp(1.25rem, 3.4vw, 2.3rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--glass);
  box-shadow: 0 34px 74px -46px rgba(0, 0, 0, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(16px) saturate(130%);
  -webkit-backdrop-filter: blur(16px) saturate(130%);
}

main section[id] {
  scroll-margin-top: 108px;
}

.prose h2 {
  margin: 0 0 0.55em;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.45rem, 3.6vw, 2.05rem);
  line-height: 1.32;
  letter-spacing: 0.005em;
}

.prose h3 {
  margin: 1.5em 0 0.5em;
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #ffd9dc;
}

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

.prose a {
  color: #ff9ba0;
  text-decoration-color: rgba(255, 0, 0, 0.5);
}

.prose a:hover {
  color: #fff;
}

.prose ul {
  margin: 0 0 1.1em;
}

.prose li {
  position: relative;
  padding-left: 1.35em;
  margin-bottom: 0.4em;
}

.prose li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--violet);
  box-shadow: 0 0 12px var(--violet);
}

.prose blockquote {
  margin: 1.2em 0;
  padding: 0.2em 0 0.2em 1rem;
  border-left: 3px solid var(--red);
  color: var(--muted);
}

.prose figure {
  margin: 1.2em 0;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
}

.prose th,
.prose td {
  padding: 0.55em 0.6em;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

/* 侧栏 */
.rail {
  padding: 1.3rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--glass);
  box-shadow: 0 34px 74px -46px rgba(0, 0, 0, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.rail-title {
  margin: 0 0 0.3rem;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.5rem, 4vw, 1.9rem);
  line-height: 1.25;
  letter-spacing: 0.02em;
}

.rail .subtitle {
  margin: 0 0 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--line);
  font-size: 1rem;
  line-height: 1.6;
  letter-spacing: 0.14em;
  color: var(--violet);
  text-transform: none;
}

.rail-menu a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 1rem;
  color: var(--muted);
  text-decoration: none;
}

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

.rail-menu a:hover {
  color: #fff;
  padding-left: 0.35rem;
}

/* 页脚 */
.colophon {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem 1.4rem;
  padding: 2.2rem clamp(1rem, 4vw, 2.5rem);
  border-top: 1px solid var(--line);
  background: rgba(13, 7, 9, 0.62);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.col-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.col-brand span {
  font-family: var(--serif);
  font-size: clamp(1.55rem, 4.4vw, 2.4rem);
  line-height: 1.1;
  letter-spacing: 0.04em;
}

.col-nav menu {
  display: flex;
  flex-wrap: wrap;
  gap: 0.1rem 1rem;
}

.col-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 1rem;
  color: var(--muted);
  text-decoration: none;
}

.col-nav a:hover {
  color: #fff;
}

.col-copy {
  flex: 1 1 100%;
  text-align: center;
}

.col-copy p {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* 回到顶部 */
.to-top {
  position: fixed;
  right: 0.9rem;
  bottom: 0.9rem;
  z-index: 35;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.4rem 1.05rem;
  border-radius: 999px;
  background: linear-gradient(120deg, rgba(255, 0, 0, 0.9), rgba(139, 0, 255, 0.9));
  color: #fff;
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-decoration: none;
  box-shadow: 0 18px 36px -16px rgba(255, 0, 0, 0.9);
}

/* 揭示动画 */
.js-reveal {
  opacity: 0;
  transform: translate3d(0, 20px, 0);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.3, 1);
  will-change: opacity, transform;
}

.js-reveal.is-in {
  opacity: 1;
  transform: none;
}

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

  .js-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero-sweep {
    transform: none !important;
  }
}

/* 桌面 */
@media (min-width: 900px) {
  .drawer > summary {
    display: none;
  }

  .drawer > menu {
    position: static;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.1rem;
    min-width: 0;
    max-width: none;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .drawer > menu a {
    padding: 0 0.62rem;
    border-radius: 999px;
    color: var(--muted);
    letter-spacing: 0.04em;
  }

  .drawer > menu a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.09);
  }

  .colophon {
    flex-wrap: nowrap;
  }

  .col-copy {
    flex: 0 1 auto;
  }
}

@media (min-width: 1000px) {
  .stage-grid {
    grid-template-columns: minmax(0, 1fr) 19rem;
    gap: 2.2rem;
  }

  .rail {
    position: sticky;
    top: 5.5rem;
  }
}

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