@import url('https://fonts.googleapis.com/css2?family=Abril+Fatface&family=Merriweather:wght@300;400;700&display=swap');

:root {
  --violet: #6514ff;
  --magenta: #bf00ff;
  --ink: #1c1726;
  --cream: #f8f4ff;
  --mute: #d9cffa;
  --shadow: 0 22px 46px -22px rgba(28, 23, 38, 0.7);
  --display: "Abril Fatface", "Songti SC", "Noto Serif SC", Georgia, serif;
  --text: "Merriweather", "Songti SC", "Noto Serif SC", Georgia, serif;
}

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

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

html.lock,
html.lock body { overflow: hidden; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.75;
  font-weight: 400;
  overflow-x: hidden;
}

[id] { scroll-margin-top: 96px; }

img { max-width: 100%; }

a { color: inherit; }

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--magenta);
  outline-offset: 3px;
}

/* ---------- 顶栏 ---------- */
.bar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px clamp(14px, 4vw, 46px);
  background: rgba(28, 23, 38, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(191, 0, 255, 0.4);
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  text-decoration: none;
  font-family: var(--display);
  font-size: 1.12rem;
  letter-spacing: 0.06em;
  color: #fff;
}

.mark-dot {
  width: 13px;
  height: 13px;
  flex: none;
  background: linear-gradient(135deg, var(--violet), var(--magenta));
  transform: rotate(45deg);
}

.bar-end {
  display: flex;
  align-items: center;
  gap: 10px;
}

.call,
.burger,
.drawer-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  font-family: var(--text);
  font-size: 0.92rem;
  letter-spacing: 0.14em;
  color: var(--cream);
  background: transparent;
  border: 2px solid var(--magenta);
  border-radius: 10px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.22s ease, color 0.22s ease, transform 0.22s ease;
}

.call:hover,
.burger:hover,
.drawer-close:hover {
  background: var(--magenta);
  color: #fff;
  transform: translateY(-2px);
}

/* ---------- 全屏菜单 ---------- */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  grid-template-rows: auto 1fr;
  padding: 14px clamp(16px, 5vw, 64px) 44px;
  background: var(--ink);
  background-image:
    radial-gradient(circle at 86% 8%, rgba(191, 0, 255, 0.42), transparent 56%),
    radial-gradient(circle at 8% 92%, rgba(101, 20, 255, 0.48), transparent 58%);
  transform: translateY(-103%);
  visibility: hidden;
  overflow-y: auto;
  transition: transform 0.3s ease, visibility 0.3s ease;
}

.drawer.is-open {
  transform: none;
  visibility: visible;
}

.drawer-top {
  display: flex;
  justify-content: flex-end;
}

.drawer nav { align-self: center; }

.drawer ol {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: navn;
  max-width: 720px;
}

.drawer li {
  counter-increment: navn;
  opacity: 0;
}

.drawer.is-open li { animation: raise 0.3s ease forwards; }
.drawer.is-open li:nth-child(1) { animation-delay: 0.03s; }
.drawer.is-open li:nth-child(2) { animation-delay: 0.07s; }
.drawer.is-open li:nth-child(3) { animation-delay: 0.11s; }
.drawer.is-open li:nth-child(4) { animation-delay: 0.15s; }
.drawer.is-open li:nth-child(5) { animation-delay: 0.19s; }
.drawer.is-open li:nth-child(6) { animation-delay: 0.23s; }
.drawer.is-open li:nth-child(7) { animation-delay: 0.27s; }

@keyframes raise {
  from { opacity: 0; transform: translateX(-18px); }
  to { opacity: 1; transform: none; }
}

.drawer a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 8px 6px;
  text-decoration: none;
  color: var(--cream);
  font-family: var(--display);
  font-size: clamp(1.3rem, 3.6vw, 2.1rem);
  line-height: 1.25;
  border-bottom: 1px solid rgba(248, 244, 255, 0.16);
  transition: color 0.2s ease, background 0.2s ease;
}

.drawer a::before {
  content: counter(navn, decimal-leading-zero);
  font-family: var(--text);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  color: var(--magenta);
  min-width: 2.4em;
}

.drawer a:hover {
  color: #fff;
  background: linear-gradient(90deg, rgba(101, 20, 255, 0.55), transparent);
}

/* ---------- 主视觉 ---------- */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas: "copy" "fig";
  gap: clamp(24px, 4vw, 52px);
  align-items: center;
  padding: clamp(30px, 6vw, 68px) clamp(16px, 4vw, 46px) clamp(60px, 8vw, 104px);
  overflow: hidden;
  clip-path: polygon(0 0, 100% 0, 100% 92%, 0 100%);
  background: linear-gradient(155deg, #291b47 0%, var(--ink) 58%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: -30%;
  pointer-events: none;
  background: repeating-linear-gradient(
    45deg,
    rgba(191, 0, 255, 0.12) 0 2px,
    transparent 2px 24px
  );
  animation: drift 20s linear infinite;
}

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

.hero-copy {
  grid-area: copy;
  position: relative;
  z-index: 1;
  text-align: right;
}

.hero h1 {
  margin: 0 0 16px;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.05rem, 6.6vw, 4rem);
  line-height: 1.12;
  letter-spacing: 0.015em;
  color: #fff;
  text-wrap: balance;
}

@supports (background-clip: text) {
  .hero h1 {
    background: linear-gradient(102deg, #ffffff 22%, var(--magenta) 92%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

.lede {
  margin: 0 0 24px auto;
  max-width: 36ch;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--mute);
}

.cta {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 26px;
  border-radius: 10px;
  background: var(--violet);
  color: #fff;
  text-decoration: none;
  font-size: 0.98rem;
  letter-spacing: 0.12em;
  box-shadow: 0 16px 32px -16px var(--violet);
  transition: background 0.22s ease, transform 0.22s ease;
}

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

.hero-fig {
  grid-area: fig;
  position: relative;
  z-index: 1;
  margin: 0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: linear-gradient(135deg, var(--violet), var(--magenta));
}

.hero-fig.is-empty { min-height: 240px; }

.hero-img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 62vh;
  object-fit: cover;
}

.badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  padding: 7px 13px;
  border: 2px solid var(--magenta);
  border-radius: 10px;
  background: var(--ink);
  color: var(--cream);
  font-size: 0.76rem;
  letter-spacing: 0.2em;
  transform: rotate(-3deg);
}

/* ---------- 正文区 ---------- */
.stage {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(24px, 4vw, 44px);
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(38px, 7vw, 84px) clamp(16px, 4vw, 40px);
}

.rail {
  align-self: start;
  padding: 20px;
  border: 1px solid rgba(191, 0, 255, 0.4);
  border-radius: 10px;
  background: rgba(248, 244, 255, 0.05);
}

.rail h2 {
  margin: 0 0 10px;
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.08rem;
  letter-spacing: 0.1em;
  color: #fff;
}

.rail hr {
  height: 4px;
  width: 48px;
  margin: 0 0 14px;
  border: 0;
  background: linear-gradient(90deg, var(--violet), var(--magenta));
}

.rail-brand {
  margin: 0 0 14px;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  color: var(--mute);
}

.rail-seal {
  display: flex;
  gap: 6px;
  margin: 0 0 18px;
}

.rail-seal span {
  width: 26px;
  height: 8px;
  background: var(--magenta);
  border-radius: 2px;
}

.rail-seal span:nth-child(2) { background: var(--violet); }
.rail-seal span:nth-child(3) { background: rgba(248, 244, 255, 0.35); }

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

.rail-nav a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 2px 0;
  text-decoration: none;
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--mute);
  border-bottom: 1px dashed rgba(191, 0, 255, 0.28);
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.rail-nav a:hover {
  color: #fff;
  padding-left: 6px;
}

.stage-body {
  min-width: 0;
  padding: clamp(20px, 3.6vw, 44px);
  border-radius: 10px;
  background: var(--cream);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.stage-body > :first-child { margin-top: 0; }

.stage-body h2 {
  margin: 2em 0 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.5rem, 3.4vw, 2.05rem);
  line-height: 1.3;
  color: var(--ink);
}

.stage-body h2 + hr { margin: 12px 0 20px; }
.stage-body h2 + hr + * { margin-top: 0; }

.stage-body hr {
  height: 4px;
  width: 74px;
  margin: 18px 0 24px;
  border: 0;
  background: linear-gradient(90deg, var(--violet), var(--magenta));
}

.stage-body h3 {
  margin: 1.8em 0 0.4em;
  font-size: 1.14rem;
  line-height: 1.45;
  color: var(--violet);
}

.stage-body p { margin: 0 0 1.1em; }

.stage-body ul,
.stage-body ol {
  margin: 0 0 1.2em;
  padding-left: 1.3em;
}

.stage-body li { margin: 0.4em 0; }

.stage-body a {
  color: var(--violet);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

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

.stage-body strong { color: #3c0d8f; }

.stage-body figure { margin: 1.5em 0; }

.stage-body img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  margin: 0 0 1.2em;
  box-shadow: var(--shadow);
}

.stage-body blockquote {
  margin: 1.5em 0;
  padding: 14px 18px;
  border-left: 5px solid var(--magenta);
  border-radius: 0 10px 10px 0;
  background: #ece3ff;
}

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

.stage-body table {
  width: 100%;
  margin: 0 0 1.4em;
  border-collapse: collapse;
  font-size: 0.94rem;
}

.stage-body th,
.stage-body td {
  padding: 9px 11px;
  border: 1px solid rgba(28, 23, 38, 0.22);
  text-align: left;
  vertical-align: top;
}

.stage-body th { background: #ece3ff; }

.stage-body code {
  padding: 1px 5px;
  border-radius: 4px;
  background: #ece3ff;
  font-size: 0.9em;
}

/* ---------- 页脚 ---------- */
.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 26px clamp(16px, 4vw, 46px);
  border-top: 1px solid rgba(191, 0, 255, 0.4);
  background: #150f1f;
}

.foot-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-size: 1rem;
  letter-spacing: 0.08em;
  color: #fff;
}

.foot-dot {
  width: 11px;
  height: 11px;
  background: var(--magenta);
  transform: rotate(45deg);
}

.foot nav ol {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.foot nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: 0.86rem;
  text-decoration: none;
  color: #c3b4e6;
  transition: color 0.2s ease;
}

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

.foot-copy {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: #948aae;
}

/* ---------- 断点 ---------- */
@media (min-width: 860px) {
  .hero {
    grid-template-columns: 1.02fr 0.98fr;
    grid-template-areas: "fig copy";
    min-height: 72vh;
  }
}

@media (min-width: 900px) {
  .stage { grid-template-columns: 258px minmax(0, 1fr); }

  .rail {
    position: sticky;
    top: 96px;
    max-height: calc(100vh - 128px);
    overflow-y: auto;
  }
}

@media (max-width: 520px) {
  .call { padding: 0 12px; font-size: 0.86rem; letter-spacing: 0.08em; }
  .burger { padding: 0 14px; }
  .foot { flex-direction: column; align-items: flex-start; }
  .stage-body { padding: 20px 16px; }
}

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

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