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

:root {
  --ink: #12100E;
  --cream: #F3E5D0;
  --rose: #D9435F;
  --rail: 268px;
  --display: 'Abril Fatface', 'Songti SC', 'STSong', Georgia, serif;
  --text: 'Merriweather', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --ring: rgba(243, 229, 208, .16);
}

* { box-sizing: border-box; }

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

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

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(243, 229, 208, .13) 1px, transparent 1px);
  background-size: 24px 24px;
}

::selection {
  background: var(--rose);
  color: var(--cream);
}

img { max-width: 100%; height: auto; }

a { color: inherit; }

/* ---------- 左侧固定竖排 ---------- */
.rail {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--rail);
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px 18px 22px;
  background: linear-gradient(180deg, #12100E 0%, #1b1714 60%, #12100E 100%);
  border-right: 1px solid var(--ring);
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  min-height: 44px;
}

.brand-mark {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--cream);
  color: var(--ink);
}

.brand-mark img { width: 34px; height: 34px; object-fit: cover; display: block; }

.mark-txt {
  font-family: var(--display);
  font-size: 20px;
  line-height: 1;
}

.brand-txt {
  font-family: var(--display);
  font-size: 26px;
  line-height: 1.1;
  letter-spacing: .04em;
  background: linear-gradient(95deg, var(--cream) 20%, var(--rose) 75%, var(--cream) 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: sweep 9s linear infinite;
}

@keyframes sweep {
  0% { background-position: 0% 0; }
  100% { background-position: 220% 0; }
}

.burger {
  display: none;
  font: inherit;
  font-size: 16px;
  min-height: 44px;
  padding: 6px 14px;
  border-radius: 12px;
  border: 1px solid var(--ring);
  background: transparent;
  color: var(--cream);
  cursor: pointer;
}

.rail-nav { display: block; }

.grp {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 9px;
}

.grp a,
.side-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(243, 229, 208, .09);
  color: var(--cream);
  font-size: 16px;
  line-height: 1.3;
  text-decoration: none;
  transition: background .25s ease, transform .25s ease, color .25s ease;
}

.grp a:hover,
.grp a:focus-visible {
  background: var(--rose);
  color: #fff;
  transform: translateY(-2px);
}

.grp a.dim { opacity: .3; }

.rail-search { margin-top: auto; }
.rail-search[role] { display: block; }

.rail-input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  font: inherit;
  font-size: 16px;
  color: var(--cream);
  background: transparent;
  border: 1px solid var(--ring);
  border-radius: 12px;
}

.rail-input::placeholder { color: rgba(243, 229, 208, .5); }

.rail-input:focus-visible {
  outline: 2px solid var(--rose);
  outline-offset: 1px;
}

/* ---------- 主区 ---------- */
.stage {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 302px;
  gap: 42px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 48px 34px 76px;
}

/* ---------- Hero ---------- */
.hero {
  grid-column: 1 / -1;
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 140px 22px 90px;
  overflow: hidden;
  text-align: center;
}

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

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(.28) contrast(1.08);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 50% 42%, rgba(217, 67, 95, .38), transparent 62%),
    linear-gradient(180deg, rgba(18, 16, 14, .62), rgba(18, 16, 14, .95));
}

.hero-dots {
  position: absolute;
  inset: -20% -10%;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(rgba(243, 229, 208, .3) 1.4px, transparent 1.4px);
  background-size: 30px 30px;
  animation: drift 26s linear infinite;
  opacity: .8;
}

@keyframes drift {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-60px, -60px, 0); }
}

.hero-type {
  max-width: 940px;
  position: relative;
  z-index: 1;
}

.hero-h1 {
  margin: 0 0 18px;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.5rem, 8.4vw, 6.2rem);
  line-height: 1.02;
  letter-spacing: -.01em;
  background: linear-gradient(88deg, var(--cream) 8%, var(--rose) 55%, var(--cream) 96%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: rise .95s cubic-bezier(.2, .78, .2, 1) both, sweep 12s linear infinite;
}

@keyframes rise {
  from {
    clip-path: inset(0 0 105% 0);
    transform: translateY(.22em);
    letter-spacing: .06em;
  }
  to {
    clip-path: inset(-10% 0 -10% 0);
    transform: none;
    letter-spacing: -.01em;
  }
}

.hero-desc {
  margin: 0 auto 26px;
  max-width: 44ch;
  font-size: 18px;
  line-height: 1.7;
  color: rgba(243, 229, 208, .86);
  animation: fade .8s .35s ease both;
}

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

.hero-jump { margin: 0; animation: fade .8s .5s ease both; }

.jump {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 28px;
  border-radius: 999px;
  background: var(--rose);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
  transition: transform .25s ease, box-shadow .25s ease;
}

.jump:hover,
.jump:focus-visible {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 12px 30px rgba(217, 67, 95, .45);
}

/* ---------- 正文 ---------- */
.prose {
  grid-column: 1;
  min-width: 0;
  max-width: 780px;
}

.prose > div {
  background: var(--cream);
  color: var(--ink);
  border-radius: 18px;
  padding: 30px 28px;
  margin: 0 0 24px;
}

.prose > div:nth-of-type(3n) {
  background: var(--rose);
  color: #FFF4EE;
}

.prose > div:nth-of-type(3n+2) {
  background: #EADBC2;
}

.prose > div[id] { scroll-margin-top: 96px; }

.prose h2,
.prose h3 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: .005em;
  margin: 0 0 12px;
}

.prose h2 { font-size: clamp(1.55rem, 4.2vw, 2.5rem); }
.prose h3 { font-size: clamp(1.2rem, 3vw, 1.6rem); }

.prose hr {
  border: 0;
  height: 3px;
  width: 100%;
  margin: 0 0 18px;
  background: currentColor;
  opacity: .34;
}

.prose p { margin: 0 0 16px; line-height: 1.85; }
.prose p:last-child { margin-bottom: 0; }

.prose a {
  color: #A82740;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose > div:nth-of-type(3n) a { color: #fff; }

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

.prose li { margin: 0 0 8px; }

.prose img {
  display: block;
  border-radius: 14px;
  margin: 4px 0 18px;
}

.prose blockquote {
  margin: 0 0 16px;
  padding: 2px 0 2px 16px;
  border-left: 4px solid var(--rose);
  font-style: italic;
}

.prose code {
  font-size: 15px;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(18, 16, 14, .1);
}

/* ---------- 右侧栏 ---------- */
.railside {
  grid-column: 2;
  align-self: start;
  position: sticky;
  top: 40px;
  padding: 22px 20px;
  border-radius: 18px;
  background: rgba(243, 229, 208, .07);
}

.side-h {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.4rem;
  line-height: 1.2;
  margin: 0 0 10px;
}

.railside hr {
  border: 0;
  height: 2px;
  margin: 0 0 14px;
  background: var(--rose);
}

.side-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}

.side-links a:hover,
.side-links a:focus-visible {
  background: var(--rose);
  color: #fff;
}

/* ---------- 页脚 ---------- */
.foot {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  padding: 46px 34px 30px;
  border-top: 1px solid var(--ring);
}

.foot-brand {
  flex: 1 0 100%;
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(3rem, 15vw, 9rem);
  line-height: .92;
  letter-spacing: -.02em;
  background: linear-gradient(92deg, var(--cream), var(--rose));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.foot-copy {
  font-size: 16px;
  color: rgba(243, 229, 208, .62);
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin: 0;
}

.foot-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 16px;
  color: var(--cream);
  text-decoration: none;
}

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

/* ---------- 回到顶部 ---------- */
.to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 45;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--rose);
  color: #fff;
  font-size: 16px;
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .45);
  transition: transform .25s ease;
}

.to-top:hover,
.to-top:focus-visible { transform: translateY(-3px); }

/* ---------- 滚动显现 ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .62s ease, transform .62s cubic-bezier(.2, .76, .2, 1);
}

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

/* ---------- 断点 ---------- */
@media (min-width: 1001px) {
  body { padding-left: var(--rail); }
}

@media (max-width: 1000px) {
  .rail {
    inset: 0 0 auto 0;
    width: auto;
    max-height: 100vh;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-right: 0;
    border-bottom: 1px solid var(--ring);
    overflow-y: auto;
  }

  .burger { display: inline-flex; align-items: center; margin-left: auto; }

  .rail-nav,
  .rail-search {
    display: none;
    width: 100%;
    order: 4;
  }

  .rail.open .rail-nav {
    display: block;
    max-height: 56vh;
    overflow-y: auto;
    padding-top: 6px;
  }

  .rail.open .rail-search { display: block; padding-bottom: 6px; }

  .rail-search { margin-top: 0; }

  .brand-txt { font-size: 22px; }

  .stage {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
    padding: 84px 18px 60px;
  }

  .hero {
    min-height: 92vh;
    padding: 84px 18px 64px;
  }

  .railside {
    position: static;
    grid-column: 1;
  }

  .foot { padding: 36px 18px 26px; }

  .to-top { right: 14px; bottom: 14px; }
}

@media (max-width: 420px) {
  body { font-size: 16px; }
  .prose > div { padding: 24px 18px; }
  .hero-desc { font-size: 17px; }
  .stage { padding: 78px 14px 54px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  * {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }

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

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