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

:root {
  --purple: #56228b;
  --brown: #8b4513;
  --ink: #1f1726;
  --paper: #f4ede4;
  --text: #ece4f2;
  --muted: #b8a8c6;
  --line: rgba(240, 232, 246, 0.16);
  --glass: rgba(255, 255, 255, 0.055);
  --shadow: 0 20px 46px -30px rgba(0, 0, 0, 0.95);
  --pill: 999px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 18px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0 0 132px;
  font-family: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', 'PingFang SC',
    'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: 17px;
  line-height: 1.75;
  color: var(--text);
  background-color: #17111d;
  background-image:
    radial-gradient(880px 620px at 10% -10%, rgba(86, 34, 139, 0.55), transparent 66%),
    radial-gradient(700px 520px at 94% 4%, rgba(139, 69, 19, 0.42), transparent 62%),
    radial-gradient(900px 700px at 48% 116%, rgba(86, 34, 139, 0.34), transparent 64%);
  background-attachment: fixed;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: var(--paper); text-decoration-color: rgba(244, 237, 228, 0.4); }
a:hover { text-decoration-color: var(--paper); }

h1, h2, h3 { font-weight: 600; letter-spacing: -0.01em; }

:focus-visible {
  outline: 2px solid var(--paper);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- corner mark ---------- */
.corner {
  position: fixed;
  left: 14px;
  bottom: 86px;
  z-index: 45;
}

.mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 42% 58% 55% 45% / 52% 46% 54% 48%;
  background: rgba(31, 23, 38, 0.78);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

.mark img,
.mark svg { display: block; width: 30px; height: 30px; border-radius: 50%; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  min-height: 100svh;
  padding: 116px 20px 88px;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-media .hero-img,
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(23, 17, 29, 0.72) 0%, rgba(23, 17, 29, 0.2) 42%, rgba(23, 17, 29, 0.94) 100%),
    radial-gradient(70% 60% at 6% 88%, rgba(86, 34, 139, 0.6), transparent 70%);
}

.blob {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  filter: blur(2px);
}

.blob-a {
  width: 260px;
  height: 260px;
  right: -70px;
  top: 12%;
  background: radial-gradient(circle at 30% 30%, rgba(86, 34, 139, 0.85), rgba(86, 34, 139, 0) 70%);
  border-radius: 62% 38% 47% 53% / 55% 46% 54% 45%;
}

.blob-b {
  width: 200px;
  height: 200px;
  left: -60px;
  top: 46%;
  background: radial-gradient(circle at 60% 40%, rgba(139, 69, 19, 0.8), rgba(139, 69, 19, 0) 72%);
  border-radius: 45% 55% 62% 38% / 48% 58% 42% 52%;
}

.hero-copy {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 760px;
}

.brandline {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.34em;
  color: #e6d6c4;
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(2rem, 8.4vw, 4rem);
  line-height: 1.14;
  color: #fff;
  text-shadow: 0 18px 44px rgba(0, 0, 0, 0.65);
}

.hero-lead {
  margin: 0 0 26px;
  max-width: 46ch;
  font-size: 17px;
  color: #ded2e8;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 28px;
  border-radius: var(--pill);
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
  color: #fbf6f0;
  background: linear-gradient(120deg, var(--purple), var(--brown));
  box-shadow: 0 16px 34px -18px rgba(86, 34, 139, 0.95);
}

.band {
  position: absolute;
  left: -4%;
  right: -4%;
  bottom: -6px;
  height: 16px;
  z-index: 4;
  background: linear-gradient(90deg, var(--brown), var(--purple) 55%, var(--brown));
  transform: skewY(-0.9deg);
  border-radius: 16px 16px 0 0;
}

/* ---------- layout ---------- */
main { position: relative; z-index: 2; }

.wrap {
  max-width: 1180px;
  margin: 34px auto 0;
  padding: 0 16px;
}

/* ---------- rail ---------- */
.rail {
  padding: 20px 18px;
  border: 1px solid var(--line);
  border-radius: 24px 8px 24px 8px;
  background: var(--glass);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  margin-bottom: 22px;
}

.rail h2 {
  margin: 0 0 2px;
  font-size: 18px;
  color: var(--paper);
}

.rail .subtitle {
  margin: 0 0 14px;
  font-size: 16px;
  color: var(--muted);
}

.rail ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rail a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: var(--pill);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.045);
  font-size: 16px;
  color: var(--text);
  text-decoration: none;
}

.rail a:hover {
  background: rgba(86, 34, 139, 0.45);
  border-color: rgba(244, 237, 228, 0.4);
}

/* ---------- prose ---------- */
.prose > section {
  position: relative;
  margin: 0 0 22px;
  padding: 26px 20px 28px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--glass);
  backdrop-filter: blur(9px);
  box-shadow: var(--shadow);
  scroll-margin-top: 18px;
}

.prose > section::before {
  content: '';
  position: absolute;
  left: 18px;
  right: 18px;
  top: 0;
  height: 3px;
  border-radius: 0 0 6px 6px;
  background: linear-gradient(90deg, var(--brown), rgba(86, 34, 139, 0.9) 70%, transparent);
}

.prose h2 {
  margin: 0 0 8px;
  font-size: clamp(1.3rem, 4.6vw, 1.8rem);
  line-height: 1.32;
  color: #fff;
}

.prose h3 {
  margin: 1.5em 0 0.4em;
  font-size: 18px;
  color: #f6ece2;
}

.prose p { margin: 0 0 1.05em; }
.prose p:last-child { margin-bottom: 0; }

.prose .subtitle,
.prose p.subtitle,
.prose p.desc,
.prose p.lead,
.prose p.subhead {
  margin: 0 0 14px;
  font-size: 16px;
  color: var(--muted);
}

.prose ul,
.prose ol { margin: 0 0 1.1em; padding-left: 1.3em; }
.prose li { margin: 0 0 0.45em; }
.prose li::marker { color: var(--brown); }

.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 18px;
  display: block;
  margin: 0 0 1em;
}

.prose a {
  color: #f7e9d8;
  text-decoration-color: rgba(139, 69, 19, 0.9);
  text-underline-offset: 3px;
}

.prose blockquote {
  margin: 0 0 1.1em;
  padding: 14px 16px;
  border-left: 3px solid var(--brown);
  border-radius: 0 18px 18px 0;
  background: rgba(139, 69, 19, 0.14);
}

.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 15px;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
}

/* ---------- footer ---------- */
footer {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  margin: 38px auto 0;
  padding: 24px 20px 34px;
  border-top: 1px solid var(--line);
}

.foot-cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  margin: 0 0 12px;
  font-size: 16px;
  color: var(--muted);
}

.foot-cols a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  width: fit-content;
  color: var(--paper);
}

footer small {
  display: block;
  font-size: 16px;
  color: #9c8fae;
}

/* ---------- dock ---------- */
.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(31, 23, 38, 0.74), rgba(23, 17, 29, 0.96));
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}

.dock nav {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.dock nav::-webkit-scrollbar { display: none; }

.dock ul {
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dock a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 15px;
  border-radius: var(--pill);
  border: 1px solid transparent;
  font-size: 16px;
  white-space: nowrap;
  color: var(--text);
  text-decoration: none;
}

.dock li a:hover {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.08);
}

.dock-cta {
  flex: none;
  min-height: 44px;
  border-radius: var(--pill);
  font-weight: 600;
  color: #fdf8f2;
  background: linear-gradient(120deg, var(--purple), var(--brown));
  box-shadow: 0 12px 26px -16px rgba(86, 34, 139, 0.95);
}

/* ---------- reveal ---------- */
.reveal {
  opacity: 0;
  transform: translate3d(0, 16px, 0);
  transition:
    opacity 0.62s ease var(--d, 0ms),
    transform 0.62s cubic-bezier(0.2, 0.7, 0.3, 1) var(--d, 0ms);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- wider screens ---------- */
@media (min-width: 760px) {
  .foot-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: center; }
  .foot-cols span:nth-child(2) { text-align: center; }
  .foot-cols a { justify-self: end; }
  .prose > div { padding: 34px 30px 36px; margin-bottom: 26px; }
}

@media (min-width: 940px) {
  body { padding-bottom: 118px; }

  .corner { left: 26px; bottom: 26px; }
  .mark { width: 54px; height: 54px; }
  .mark img,
  .mark svg { width: 34px; height: 34px; }

  .wrap {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 34px;
    padding: 0 24px;
    margin-top: 46px;
    align-items: start;
  }

  .rail {
    position: sticky;
    top: 26px;
    margin-bottom: 0;
  }

  .rail ul { flex-direction: column; flex-wrap: nowrap; }
  .rail a { border-radius: 4px 18px 4px 18px; }

  .dock {
    left: 50%;
    right: auto;
    bottom: 24px;
    transform: translateX(-50%);
    max-width: min(1040px, calc(100% - 190px));
    border: 1px solid var(--line);
    border-radius: var(--pill);
    box-shadow: 0 26px 50px -30px rgba(0, 0, 0, 0.95);
  }

  .hero { padding: 140px 8vw 108px; }
  .hero-copy { margin-left: auto; margin-right: auto; max-width: 1100px; }
  .hero-lead { font-size: 18px; }
}

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