@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&family=JetBrains+Mono:wght@400&family=Playfair+Display:ital@1&display=swap');

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

:root {
  --red: #ff0000;
  --pink: #ff1493;
  --ink: #261717;
  --paper: #fdf6f4;
  --line: rgba(38, 23, 23, 0.14);
  --muted: rgba(38, 23, 23, 0.66);
  --serif: 'Playfair Display', 'Songti SC', 'Noto Serif SC', Georgia, serif;
  --sans: 'Inter', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, -apple-system, sans-serif;
}

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

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

body::before {
  content: "";
  position: fixed;
  inset: -25vmax;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(38% 42% at 18% 18%, rgba(255, 0, 0, 0.52), transparent 72%),
    radial-gradient(42% 38% at 82% 12%, rgba(255, 20, 147, 0.5), transparent 72%),
    radial-gradient(46% 44% at 74% 88%, rgba(255, 110, 90, 0.4), transparent 72%),
    radial-gradient(40% 40% at 22% 92%, rgba(112, 70, 255, 0.28), transparent 72%);
  background-size: 170% 170%;
  filter: blur(46px) saturate(1.2);
  opacity: 0.62;
  animation: aurora 11s ease-in-out infinite alternate;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.5;
  background-image:
    linear-gradient(rgba(38, 23, 23, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(38, 23, 23, 0.055) 1px, transparent 1px);
  background-size: 58px 58px;
  -webkit-mask-image: radial-gradient(120% 100% at 50% 0%, #000 28%, transparent 76%);
  mask-image: radial-gradient(120% 100% at 50% 0%, #000 28%, transparent 76%);
}

@keyframes aurora {
  0% { background-position: 0% 0%; transform: scale(1) rotate(0deg); }
  100% { background-position: 100% 100%; transform: scale(1.12) rotate(2deg); }
}

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

/* header */
.mast {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(253, 246, 244, 0.84);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}

.brandrow {
  display: flex;
  align-items: center;
  padding: 0.7rem clamp(1rem, 4vw, 2.5rem) 0.3rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 44px;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark { display: inline-flex; }

.brand img {
  display: block;
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

.brand-name {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 700;
  font-size: 1.65rem;
  letter-spacing: 0.05em;
  background: linear-gradient(96deg, var(--red), var(--pink) 70%, var(--ink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-bottom: 0.1em;
}

.menu { padding: 0 clamp(0.5rem, 3vw, 2rem) 0.5rem; }

.menu p {
  display: flex;
  gap: 0.3rem;
  margin: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.menu p::-webkit-scrollbar { display: none; }

.menu a {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.85rem;
  font-size: 0.94rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 999px;
}

.menu a:hover {
  color: var(--pink);
  border-color: var(--pink);
  background: rgba(255, 20, 147, 0.07);
}

/* hero */
.hero {
  position: relative;
  min-height: 45vh;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  overflow: hidden;
  background: linear-gradient(148deg, #33131b, #7c0f33 58%, #c4145d);
  border-bottom: 1px solid var(--line);
}

.hero-fig {
  position: absolute;
  inset: 0;
  margin: 0;
  background: linear-gradient(148deg, #33131b, #7c0f33 58%, #c4145d);
}

.hero-fig::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(18, 8, 10, 0.18), rgba(18, 8, 10, 0.74) 72%),
    linear-gradient(90deg, rgba(18, 8, 10, 0.08), rgba(18, 8, 10, 0.58));
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s ease;
  filter: saturate(1.15);
}

.hero-img.on { opacity: 1; }

.hero-copy {
  position: relative;
  z-index: 2;
  margin-left: auto;
  max-width: 46rem;
  padding: clamp(1.4rem, 5vw, 3.4rem);
  text-align: right;
  color: #fff;
}

.hero-copy h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.85rem, 6vw, 3.9rem);
  line-height: 1.08;
  letter-spacing: -0.012em;
  text-shadow: 0 2px 26px rgba(0, 0, 0, 0.4);
}

.hero-desc {
  margin: 0.85rem 0 0 auto;
  max-width: 40ch;
  font-size: 1rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.9);
}

/* stage */
.stage {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(1.4rem, 4vw, 2.8rem) clamp(1rem, 4vw, 2.5rem) clamp(2rem, 6vw, 3.6rem);
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr);
  gap: clamp(1.2rem, 3vw, 2.4rem);
  align-items: start;
}

.rail {
  position: sticky;
  top: 7.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.7);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.rail-h {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: var(--red);
}

.subtitle {
  margin: 0.1rem 0 0.6rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--muted);
}

.rail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.rail-list a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0.4rem 0.55rem;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  border-left: 2px solid transparent;
  border-radius: 0 8px 8px 0;
}

.rail-list a:hover {
  color: var(--pink);
  border-left-color: var(--pink);
  background: rgba(255, 20, 147, 0.08);
}

/* prose */
.prose { min-width: 0; }

.prose > div {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.8);
  padding: clamp(1.15rem, 3vw, 2.1rem);
  scroll-margin-top: 8.6rem;
}

.prose > div + div { margin-top: clamp(1rem, 2.5vw, 1.6rem); }

.prose h2 {
  margin: 0 0 0.55rem;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.32rem, 3vw, 1.85rem);
  line-height: 1.26;
  letter-spacing: -0.01em;
}

.prose h2 + .subtitle,
.prose h2 + .subhead,
.prose h2 + .desc,
.prose h2 + .lead {
  margin-top: -0.15rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
}

.prose h3 {
  margin: 1.4rem 0 0.4rem;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.4;
}

.prose p { margin: 0 0 1rem; }
.prose p:last-child { margin-bottom: 0; }

.prose a { color: var(--red); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose a:hover { color: var(--pink); }

.prose strong { font-weight: 700; }

.prose ul,
.prose ol { margin: 0 0 1rem; padding-left: 1.3rem; }
.prose li { margin-bottom: 0.35rem; }

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

.prose figure { margin: 1rem 0; }
.prose img { max-width: 100%; height: auto; border-radius: 10px; display: block; }
.prose figcaption { font-size: 0.85rem; color: var(--muted); margin-top: 0.4rem; }

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
  display: block;
  overflow-x: auto;
}

.prose th,
.prose td {
  border: 1px solid var(--line);
  padding: 0.5rem 0.7rem;
  text-align: left;
}

.prose th { background: rgba(255, 20, 147, 0.07); }

.prose hr { border: 0; border-top: 1px solid var(--line); margin: 1.4rem 0; }

.prose code {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.9em;
  background: rgba(38, 23, 23, 0.06);
  padding: 0.1em 0.35em;
  border-radius: 5px;
}

/* reveal */
.reveal .prose > div {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.reveal .prose > div.in {
  opacity: 1;
  transform: none;
}

/* footer */
.foot {
  margin-top: clamp(1.5rem, 4vw, 3rem);
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 0, 0, 0.07));
}

.cta {
  display: flex;
  align-items: center;
  min-height: 64px;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(1.5rem, 5vw, 2.8rem) clamp(1rem, 4vw, 2.5rem);
  font-family: var(--serif);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(1.9rem, 7vw, 4rem);
  line-height: 1.1;
  letter-spacing: -0.012em;
  color: var(--ink);
  text-decoration: none;
}

.cta:hover { color: var(--red); }

.foot-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem 2rem;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0.9rem clamp(1rem, 4vw, 2.5rem) 2rem;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--muted);
}

.foot address {
  font-style: normal;
  letter-spacing: 0.05em;
}

.foot-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.9rem;
  margin: 0;
  padding: 0;
}

.foot-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: 0.9rem;
  color: var(--muted);
  text-decoration: none;
}

.foot-links a:hover { color: var(--red); }

/* mobile */
@media (max-width: 880px) {
  body { font-size: 16px; }

  .stage {
    grid-template-columns: 1fr;
    gap: 1.1rem;
  }

  .rail {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    padding: 0.8rem 0.9rem;
  }

  .rail-h { width: 100%; }
  .subtitle { width: 100%; border-bottom: 0; padding-bottom: 0; margin: 0 0 0.2rem; }

  .rail-list { flex-direction: row; flex-wrap: wrap; gap: 0.3rem; }

  .rail-list a {
    border-left: 0;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.35rem 0.8rem;
  }

  .prose > div { scroll-margin-top: 9.6rem; padding: 1.1rem 1rem; }

  .hero { min-height: 45vh; }
  .hero-copy { padding: 1.2rem 1rem 1.4rem; }
  .hero-desc { font-size: 0.95rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body::before { animation: none; }
  .hero-img { transition: none; }
  .reveal .prose > div { opacity: 1; transform: none; transition: none; }
}

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