:root {
  --p: #6514ff;
  --m: #bf00ff;
  --ink: #1c1726;
  --paper: #f7f5fb;
  --line: #e2dcef;
  --r: 4px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'DM Sans', "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.75;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: var(--p); }
h1, h2, h3 { margin: 0 0 .6em; line-height: 1.16; letter-spacing: -.025em; font-weight: 700; }
:focus-visible { outline: 3px solid var(--m); outline-offset: 2px; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 100vh;
  min-height: 100svh;
  padding: 104px clamp(18px, 5vw, 64px) clamp(52px, 11vh, 108px);
  background: var(--ink);
  color: #fff;
  overflow: hidden;
}

.hero-media { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hero-media img { width: 100%; height: 118%; object-fit: cover; will-change: transform; }

.hero-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(112deg, rgba(28, 23, 38, .95) 0%, rgba(28, 23, 38, .8) 36%, rgba(101, 20, 255, .64) 68%, rgba(191, 0, 255, .74) 100%);
}

.hero-pattern {
  position: absolute;
  inset: -102px;
  z-index: 2;
  opacity: .4;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(255, 255, 255, .6) 1.6px, transparent 1.8px);
  background-size: 34px 34px;
  animation: drift 30s linear infinite;
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-34px, -34px, 0); }
}

.hero-blocks {
  position: absolute;
  z-index: 2;
  right: -60px;
  bottom: -70px;
  width: clamp(180px, 30vw, 380px);
  aspect-ratio: 1;
  background: var(--m);
  border-radius: var(--r);
  transform: rotate(14deg);
  opacity: .42;
  mix-blend-mode: screen;
  pointer-events: none;
}

.hero-copy { position: relative; z-index: 3; max-width: 900px; }
.hero h1 {
  font-size: clamp(34px, 7vw, 74px);
  letter-spacing: -.03em;
  margin: 0;
  max-width: 18ch;
  text-wrap: balance;
}
.lede {
  margin: 26px 0 0;
  max-width: 46ch;
  font-size: 18px;
  line-height: 1.7;
  color: rgba(255, 255, 255, .83);
}

/* ---------- topbar ---------- */
.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px clamp(14px, 4vw, 40px);
  background: linear-gradient(rgba(28, 23, 38, .86), rgba(28, 23, 38, 0));
  transition: background .25s ease, box-shadow .25s ease;
}
.topbar.solid {
  background: rgba(28, 23, 38, .97);
  box-shadow: 0 1px 0 rgba(191, 0, 255, .55);
}

.brand {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--r);
  background: var(--p);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  overflow: hidden;
}
.brand-img { width: 100%; height: 100%; object-fit: cover; }
.brand-txt { font-size: 20px; line-height: 1; }

.burger {
  display: none;
  align-items: center;
  gap: 9px;
  margin-left: auto;
  min-height: 44px;
  padding: 0 15px;
  border-radius: var(--r);
  background: rgba(255, 255, 255, .14);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  user-select: none;
}
.burger-ic { position: relative; width: 18px; height: 2px; background: currentColor; }
.burger-ic::after {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 18px;
  height: 2px;
  background: currentColor;
}

.menu-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.navi { margin-left: auto; }
.navi-in { display: flex; align-items: center; gap: 4px; }

.nav-link, .cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: var(--r);
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background .2s ease, color .2s ease;
}
.nav-link:hover, .nav-link:focus-visible { background: var(--p); }
.cta { margin-left: 8px; background: var(--m); }
.cta:hover, .cta:focus-visible { background: #fff; color: var(--ink); }

.nav-group { position: relative; }
.sub {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 172px;
  display: grid;
  gap: 2px;
  padding: 8px;
  background: #fff;
  border-radius: var(--r);
  border-bottom: 3px solid var(--m);
  box-shadow: 0 20px 44px rgba(28, 23, 38, .3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
}
.nav-group:hover .sub,
.nav-group:focus-within .sub { opacity: 1; visibility: visible; transform: none; }
.sub a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 12px;
  border-radius: var(--r);
  color: var(--ink);
  font-size: 16px;
  text-decoration: none;
}
.sub a:hover, .sub a:focus-visible { background: #efe8ff; color: var(--p); }

/* ---------- main ---------- */
.wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 264px;
  gap: 48px;
  align-items: start;
  max-width: 1160px;
  margin: 0 auto;
  padding: clamp(48px, 7vw, 84px) clamp(16px, 4vw, 40px) 76px;
}

div { min-width: 0; }
div > article {
  scroll-margin-top: 88px;
  padding-bottom: 44px;
  margin-bottom: 46px;
  border-bottom: 4px solid var(--p);
  animation: rise .55s cubic-bezier(.22, .7, .3, 1) both;
}
div > article:last-child { border-bottom: 0; margin-bottom: 0; }
div > article:nth-child(2) { animation-delay: .05s; }
div > article:nth-child(3) { animation-delay: .1s; }
div > article:nth-child(4) { animation-delay: .15s; }
div > article:nth-child(5) { animation-delay: .2s; }
div > article:nth-child(6) { animation-delay: .25s; }
div > article:nth-child(7) { animation-delay: .3s; }
div > article:nth-child(8) { animation-delay: .35s; }

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

div h2 {
  margin-top: 1.35em;
  font-size: clamp(25px, 3.6vw, 36px);
}
div h3 {
  margin-top: 1.3em;
  font-size: clamp(21px, 2.6vw, 25px);
}
div h2 > span,
div h3 > span {
  background-image: linear-gradient(transparent 62%, #ded0ff 62%);
  background-repeat: no-repeat;
  padding-bottom: .06em;
}
div h2:first-child, div h3:first-child { margin-top: 0; }

div p { margin: 0 0 1.05em; }
div ul, div ol { margin: 0 0 1.1em; padding-left: 1.35em; }
div li { margin-bottom: .5em; }
div li::marker { color: var(--m); font-weight: 700; }
div strong { font-weight: 700; }
div a { color: var(--p); text-underline-offset: 3px; }
div a:hover { color: var(--m); }
div blockquote {
  margin: 26px 0;
  padding: 18px 22px;
  background: #fff;
  border-left: 6px solid var(--m);
  border-radius: var(--r);
}
div blockquote p:last-child { margin-bottom: 0; }
div table { width: 100%; border-collapse: collapse; margin: 0 0 1.2em; font-size: 16px; }
div th, div td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
div th { background: #efe8ff; font-weight: 700; }
div hr { border: 0; height: 4px; background: var(--line); margin: 32px 0; }
div figure { margin: 26px 0; }
div figcaption { font-size: 16px; color: #6d6483; margin-top: 8px; }

/* ---------- aside ---------- */
.side {
  position: sticky;
  top: 88px;
  align-self: start;
  padding: 22px 20px 18px;
  background: var(--ink);
  color: #fff;
  border-radius: var(--r);
  border-bottom: 6px solid var(--m);
}
.side-h { font-size: 19px; margin: 0 0 14px; }
.side-h > span {
  display: inline-block;
  padding: 2px 11px;
  border-radius: var(--r);
  background: var(--p);
  letter-spacing: .04em;
}
.side-nav { display: grid; }
.side-nav a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 4px;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  color: #ddd5ea;
  font-size: 16px;
  text-decoration: none;
  transition: color .2s ease, padding-left .2s ease, background .2s ease;
}
.side-nav a:hover, .side-nav a:focus-visible {
  color: #fff;
  padding-left: 12px;
  background: rgba(101, 20, 255, .38);
}
.to-top { display: block; margin-top: 14px; color: #fff; text-decoration: none; }
.to-top h3 { margin: 0; font-size: 16px; }
.to-top h3 > span {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  color: #c9bded;
}
.to-top h3 > span::before { content: "\2191"; color: var(--m); font-weight: 700; }
.to-top:hover h3 > span { color: #fff; }

/* ---------- footer ---------- */
.foot {
  background: var(--ink);
  color: #efeaf7;
  padding: 52px clamp(16px, 5vw, 64px) 30px;
  border-top: 6px solid var(--p);
}
.foot-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px 32px;
  max-width: 1160px;
  margin: 0 auto;
}
.foot-nav dl { margin: 0; }
.foot-nav dt { margin: 0; font-weight: 700; }
.foot-nav dd { margin: 0; }
.foot-nav a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 2px;
  color: #efeaf7;
  font-size: 16px;
  text-decoration: none;
  transition: color .2s ease;
}
.foot-nav dd a { color: #b7acc9; }
.foot-nav a:hover, .foot-nav a:focus-visible { color: var(--m); }

.copy {
  max-width: 1160px;
  margin: 26px auto 0;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  text-align: center;
  font-size: 16px;
  color: #a89bba;
  letter-spacing: .04em;
}
.copy .c { color: var(--m); font-weight: 700; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .wrap { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .side { position: static; }
  .side-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
}

@media (max-width: 860px) {
  .burger { display: inline-flex; }
  .navi {
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    max-height: calc(100vh - 68px);
    overflow: auto;
    margin: 0;
    padding: 14px 16px 26px;
    background: var(--ink);
    border-top: 3px solid var(--m);
    box-shadow: 0 26px 52px rgba(0, 0, 0, .45);
    display: none;
  }
  .menu-toggle:checked ~ .navi { display: block; }
  .navi-in { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav-link, .cta { min-height: 48px; justify-content: flex-start; }
  .cta { margin: 10px 0 0; justify-content: center; }
  .nav-group { position: static; }
  .sub {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    margin: 2px 0 8px;
    padding: 0 0 0 12px;
    background: transparent;
    border: 0;
    border-left: 2px solid var(--p);
    border-radius: 0;
    box-shadow: none;
  }
  .sub a { color: #c9bded; }
  .sub a:hover, .sub a:focus-visible { background: rgba(255, 255, 255, .1); color: #fff; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .hero { padding-top: 92px; }
  .hero-blocks { right: -80px; bottom: -90px; opacity: .3; }
  .lede { font-size: 17px; }
  .foot-nav { gap: 14px 16px; }
  .foot-nav a { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-pattern { animation: none; }
  div > article { animation: none; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}

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