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

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

:root {
  --violet: #6514ff;
  --magenta: #bf00ff;
  --ink: #1c1726;
  --paper: #f7f3ff;
  --paper2: #e9dbff;
  --card: #ffffff;
  --line: #d9c6ff;
  --muted: #4a3f5c;
  --r: 18px;
  --sh: 0 20px 44px -26px rgba(28, 23, 38, 0.5);
  --pad: clamp(18px, 4vw, 56px);
  --head: Outfit, Rubik, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --body: Rubik, Outfit, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

html {
  background: var(--paper);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background: transparent;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(rgba(101, 20, 255, 0.16) 1.4px, transparent 1.5px),
    linear-gradient(135deg, rgba(101, 20, 255, 0.07), rgba(191, 0, 255, 0.05));
  background-size: 26px 26px, 100% 100%;
  animation: drift 26s linear infinite;
}

@keyframes drift {
  from { background-position: 0 0, 0 0; }
  to { background-position: 26px 26px, 0 0; }
}

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

a { color: var(--violet); }
a:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--magenta);
  outline-offset: 3px;
  border-radius: 8px;
}

/* ---------- 页头：品牌行 + 菜单行 ---------- */
.site-header {
  padding: 26px var(--pad) 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  font-family: var(--head);
  font-size: clamp(23px, 3.6vw, 32px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: linear-gradient(135deg, var(--violet), var(--magenta));
  transform: rotate(14deg);
  transition: transform 0.24s ease;
}

.brand:hover .brand-mark { transform: rotate(-14deg) scale(1.12); }

.menu-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(12px, 2vw, 26px);
  margin-top: 12px;
  padding-top: 10px;
  border-top: 2px solid var(--ink);
}

.menu-wrap summary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.12em;
  cursor: pointer;
  list-style: none;
  transition: background 0.24s ease;
}

.menu-wrap summary::-webkit-details-marker { display: none; }
.menu-wrap[open] summary { background: var(--violet); }

.menu {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.menu a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.22s ease, color 0.22s ease, transform 0.22s ease;
}

.menu a:hover {
  background: var(--violet);
  color: #ffffff;
  transform: translateY(-2px);
}

.js-ready .menu li {
  opacity: 0;
  transform: translateY(-8px);
  animation: pop 0.45s ease forwards;
  animation-delay: calc(var(--i, 0) * 45ms);
}

@keyframes pop {
  to { opacity: 1; transform: none; }
}

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 34px;
  min-height: calc(100vh - 140px);
  min-height: calc(100svh - 140px);
  padding: clamp(26px, 4vw, 52px) var(--pad) clamp(34px, 5vw, 64px);
  text-align: right;
}

.hero-top {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 16px;
  margin-left: auto;
  max-width: min(760px, 100%);
}

.hero-shapes { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hero-shapes span { position: absolute; border-radius: 14px; }

.hero-shapes span:nth-child(1) {
  width: clamp(80px, 12vw, 150px);
  height: clamp(80px, 12vw, 150px);
  left: -34px;
  top: 16%;
  background: linear-gradient(150deg, var(--violet), var(--magenta));
  transform: rotate(18deg);
  animation: spin 22s linear infinite;
}

.hero-shapes span:nth-child(2) {
  width: 74px;
  height: 74px;
  right: 6%;
  top: 8%;
  border: 5px solid var(--magenta);
  border-radius: 50%;
  animation: bob 6s ease-in-out infinite;
}

.hero-shapes span:nth-child(3) {
  width: 46px;
  height: 46px;
  left: 12%;
  bottom: 30%;
  background: var(--paper2);
  transform: rotate(-12deg);
  animation: bob 8s ease-in-out infinite reverse;
}

.hero-shapes span:nth-child(4) {
  width: 120px;
  height: 14px;
  right: 0;
  bottom: 16%;
  background: var(--violet);
  opacity: 0.4;
}

@keyframes spin { to { transform: rotate(378deg); } }
@keyframes bob {
  50% { transform: translateY(-14px) rotate(8deg); }
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 18px;
  border-radius: 999px;
  background: var(--magenta);
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.1em;
  box-shadow: var(--sh);
  animation: bob 5s ease-in-out infinite;
}

.hero h1 {
  margin: 0;
  font-family: var(--head);
  font-size: clamp(33px, 7vw, 74px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.035em;
  max-width: 15ch;
  color: var(--ink);
}

.lead {
  margin: 0;
  max-width: 44ch;
  font-size: clamp(16px, 1.9vw, 19px);
  line-height: 1.7;
  color: var(--muted);
}

.cta {
  display: inline-flex;
  align-items: center;
  min-height: 54px;
  padding: 0 32px;
  border-radius: 999px;
  background: var(--ink);
  color: #ffffff;
  font-family: var(--head);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  box-shadow: var(--sh);
  transition: background 0.24s ease, transform 0.24s ease;
}

.cta:hover {
  background: var(--violet);
  transform: translateY(-3px);
}

.hero-media {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-height: clamp(160px, 24vh, 320px);
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--violet), var(--magenta) 70%, var(--ink));
  box-shadow: 0 32px 64px -34px rgba(101, 20, 255, 0.75);
}

.hero-media img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 46vh;
  object-fit: cover;
  mix-blend-mode: luminosity;
}

/* ---------- 主体 ---------- */
.page-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: start;
  gap: clamp(28px, 4vw, 56px);
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(38px, 6vw, 82px) var(--pad);
}

.prose { min-width: 0; }

.prose > section {
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--sh);
  padding: clamp(22px, 3.4vw, 44px);
  margin-bottom: clamp(26px, 4vw, 46px);
  scroll-margin-top: 26px;
}

.prose > section:nth-child(even) {
  background: linear-gradient(160deg, #ffffff, var(--paper2));
  border-color: #e2d2ff;
}

.prose h2 {
  margin: 0 0 8px;
  font-family: var(--head);
  font-size: clamp(23px, 3.2vw, 34px);
  line-height: 1.22;
  letter-spacing: -0.025em;
}

.prose h3 {
  margin: 24px 0 8px;
  font-family: var(--head);
  font-size: clamp(19px, 2.4vw, 23px);
  line-height: 1.3;
  color: var(--violet);
}

.prose hr {
  width: 68px;
  height: 0;
  margin: 0 0 18px;
  border: 0;
  border-top: 4px solid var(--magenta);
}

.prose p {
  margin: 0 0 16px;
  text-align: justify;
}

.prose ul,
.prose ol {
  margin: 0 0 18px;
  padding-left: 22px;
}

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

.prose strong { color: var(--violet); }

.prose blockquote {
  margin: 0 0 18px;
  padding: 14px 20px;
  border-left: 6px solid var(--violet);
  border-radius: 0 var(--r) var(--r) 0;
  background: var(--paper);
  font-size: 17px;
}

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

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

.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 14px;
}

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

/* ---------- 侧栏 ---------- */
.side {
  position: sticky;
  top: 22px;
  padding: 22px;
  border-radius: var(--r);
  background: var(--ink);
  color: #efe6ff;
  box-shadow: 0 24px 48px -28px rgba(28, 23, 38, 0.9);
}

.side h2 {
  margin: 0 0 8px;
  font-family: var(--head);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.16em;
}

.side hr {
  width: 44px;
  height: 0;
  margin: 0 0 14px;
  border: 0;
  border-top: 3px solid var(--magenta);
}

.side-links { display: flex; flex-direction: column; }

.side-links a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 4px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  color: #efe6ff;
  font-size: 16px;
  text-decoration: none;
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.side-links a:hover {
  color: #ffffff;
  padding-left: 8px;
}

.side-note { margin: 16px 0 0; }

.side-note a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 2px solid var(--magenta);
  border-radius: 999px;
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.22s ease;
}

.side-note a:hover { background: var(--magenta); }

/* ---------- 页脚 ---------- */
.site-footer {
  margin-top: 32px;
  padding: clamp(38px, 6vw, 74px) var(--pad) 26px;
  background: var(--ink);
  color: #e7dbff;
}

.foot-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: clamp(26px, 5vw, 64px);
  max-width: 1240px;
  margin: 0 auto;
}

.wordmark {
  margin: 0 0 12px;
  font-family: var(--head);
  font-size: clamp(38px, 8.4vw, 84px);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.045em;
  color: #ffffff;
}

.foot-desc {
  margin: 0;
  max-width: 34ch;
  font-size: 16px;
  line-height: 1.7;
  color: #bfa8ff;
}

.foot-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.foot-cols dt {
  margin-bottom: 8px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--magenta);
}

.foot-cols dd {
  margin: 0;
  font-size: 16px;
}

.foot-cols a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #e7dbff;
  text-decoration: none;
  transition: color 0.2s ease;
}

.foot-cols a:hover {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.foot-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 22px;
  max-width: 1240px;
  margin: clamp(28px, 4vw, 48px) auto 0;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 16px;
  color: #bfa8ff;
  text-align: center;
}

.foot-bottom p { margin: 0; }

/* ---------- 滚动显现 ---------- */
.js-ready .prose > section,
.js-ready .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.52s ease, transform 0.52s ease;
}

.js-ready .prose > section.in,
.js-ready .reveal.in {
  opacity: 1;
  transform: none;
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .hero h1 {
    background: linear-gradient(102deg, var(--violet), var(--magenta) 58%, var(--ink));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
  .wordmark {
    background: linear-gradient(100deg, #ffffff, var(--magenta));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

/* ---------- 断点 ---------- */
@media (max-width: 960px) {
  .page-main { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; }
  .foot-inner { grid-template-columns: minmax(0, 1fr); }
  .menu-wrap {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }
  .menu { flex-direction: column; gap: 2px; padding-bottom: 8px; }
  .menu a { justify-content: flex-start; }
}

@media (max-width: 560px) {
  .hero { text-align: left; }
  .hero-top { align-items: flex-start; }
  .hero-shapes span:nth-child(1) { left: -46px; top: 10%; }
  .foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-cols dl:last-child { grid-column: 1 / -1; }
  .foot-bottom { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

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