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

:root {
  --ink: #26171a;
  --ink-2: #2b1a20;
  --ink-3: #3a242c;
  --pink: #eb879c;
  --pink-soft: #ffb6c1;
  --text: #f7eaec;
  --text-2: #e3ccd3;
  --text-3: #cdb6bd;
  --line: rgba(255, 182, 193, 0.16);
  --radius: 10px;
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.28), 0 10px 28px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  --shadow-btn: 0 1px 2px rgba(0, 0, 0, 0.32), 0 8px 22px rgba(235, 135, 156, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  --rail: 244px;
  --font: "Archivo", "Space Grotesk", system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

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

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

body {
  margin: 0;
  padding-left: var(--rail);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background-color: #1b1114;
  background-image:
    radial-gradient(1100px 560px at 82% -12%, rgba(235, 135, 156, 0.18), transparent 68%),
    linear-gradient(160deg, #2a1a1f, #1b1114 62%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: "Space Grotesk", var(--font);
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: -0.015em;
  margin: 0 0 0.5rem;
}

p {
  margin: 0 0 1rem;
}

a {
  color: var(--pink-soft);
  text-underline-offset: 3px;
}

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

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

hr {
  border: 0;
  height: 1px;
  margin: 0.55rem 0 1rem;
  background: linear-gradient(90deg, rgba(235, 135, 156, 0.6), rgba(235, 135, 156, 0));
}

.skip {
  position: fixed;
  left: 10px;
  top: 10px;
  z-index: 80;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 8px;
  background: var(--pink-soft);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform 0.24s ease;
}

.skip:focus {
  transform: none;
}

/* 左侧固定导航 */
.rail {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--rail);
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 22px 18px 26px;
  overflow-y: auto;
  background: linear-gradient(180deg, #2c1b21, #1e1316 88%);
  border-right: 1px solid var(--line);
  box-shadow: 12px 0 40px rgba(0, 0, 0, 0.28);
  z-index: 40;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 6px 4px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #fff;
  text-decoration: none;
}

.brand .mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--ink-3);
}

.rail-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rail-a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--text-2);
  text-decoration: none;
  transition: background-color 0.24s ease, color 0.24s ease;
}

.rail-a:hover,
.rail-a:focus-visible {
  background: var(--ink-3);
  color: var(--pink-soft);
}

.cta,
.hero-go {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: var(--radius);
  background: var(--pink);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--shadow-btn);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.cta {
  margin-top: auto;
  align-self: flex-end;
}

.cta:hover,
.hero-go:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3), 0 14px 30px rgba(235, 135, 156, 0.36);
}

/* 主体 */
main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 258px;
  gap: clamp(24px, 3vw, 46px);
  align-items: start;
  max-width: 1180px;
  padding: clamp(22px, 4vw, 48px) clamp(18px, 4vw, 54px) 52px;
}

article {
  min-width: 0;
}

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.15rem;
  min-height: 70vh;
  padding: clamp(22px, 4vw, 40px) 0 clamp(30px, 5vw, 56px);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -8% -4%;
  background-image: radial-gradient(rgba(255, 182, 193, 0.22) 1px, transparent 1.4px);
  background-size: 23px 23px;
  opacity: 0.65;
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  top: 8%;
  right: -130px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(235, 135, 156, 0.34), rgba(235, 135, 156, 0) 66%);
  filter: blur(8px);
  pointer-events: none;
  animation: drift 15s ease-in-out infinite alternate;
}

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(-46px, 54px, 0) scale(1.16);
  }
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero h1 {
  max-width: 22ch;
  font-size: clamp(2.4rem, 6.2vw, 4.6rem);
  line-height: 1.06;
  letter-spacing: -0.03em;
  margin: 0;
}

.lede {
  max-width: 46ch;
  margin: 0;
  font-size: clamp(1.02rem, 1.5vw, 1.2rem);
  color: var(--text-2);
}

.hero-go {
  align-self: flex-start;
  margin-top: 0.4rem;
}

/* 正文卡片 */
.body > div {
  background: var(--ink-2);
  border-radius: var(--radius);
  padding: clamp(20px, 3vw, 34px);
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
  scroll-margin-top: 1.5rem;
}

.body h2 {
  font-size: clamp(1.45rem, 2.6vw, 1.9rem);
}

.body h3 {
  font-size: clamp(1.15rem, 1.9vw, 1.35rem);
  color: var(--pink-soft);
}

.body a {
  color: var(--pink-soft);
}

.body ul,
.body ol {
  padding-left: 1.25rem;
  margin: 0 0 1rem;
}

.body li {
  margin: 0.3rem 0;
}

.body blockquote {
  margin: 0 0 1rem;
  padding: 0.6rem 0 0.6rem 1rem;
  border-left: 3px solid var(--pink);
  color: var(--text-2);
}

/* 右侧栏 */
.side {
  position: sticky;
  top: 22px;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--ink-2);
  box-shadow: var(--shadow-card);
}

.side h2 {
  margin: 0;
  font-size: 1.02rem;
  letter-spacing: 0.1em;
  color: var(--text-2);
}

.side hr {
  margin: 0.5rem 0 0.75rem;
}

.side-list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: idx;
  display: grid;
  gap: 2px;
}

.side-list li {
  counter-increment: idx;
}

.side-list a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 4px 8px;
  border-radius: 8px;
  color: var(--text-2);
  text-decoration: none;
  transition: background-color 0.24s ease, color 0.24s ease;
}

.side-list a::before {
  content: counter(idx, decimal-leading-zero);
  margin-right: 0.6rem;
  color: var(--pink);
  font-variant-numeric: tabular-nums;
}

.side-list a:hover,
.side-list a:focus-visible {
  background: var(--ink-3);
  color: var(--pink-soft);
}

/* 页脚 */
.foot {
  padding: clamp(26px, 4vw, 46px) clamp(18px, 4vw, 54px) 22px;
  border-top: 1px solid var(--line);
  background: rgba(19, 11, 14, 0.6);
}

.foot-top {
  display: grid;
  grid-template-columns: 1.4fr 2fr;
  gap: 34px;
  max-width: 1180px;
}

.foot-brand {
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #fff;
}

.sub label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--text-3);
}

.sub-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sub input,
.sub button {
  font: inherit;
  min-height: 44px;
  border-radius: 8px;
}

.sub input {
  flex: 1 1 150px;
  min-width: 0;
  padding: 0 12px;
  color: var(--text);
  background: #1f1418;
  border: 1px solid rgba(255, 182, 193, 0.25);
}

.sub input::placeholder {
  color: #b49ea5;
}

.sub button {
  padding: 0 18px;
  border: 0;
  background: var(--pink);
  color: var(--ink);
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.foot-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.foot-nav dl {
  margin: 0;
}

.foot-nav dt {
  margin-bottom: 0.15rem;
  color: var(--pink-soft);
  letter-spacing: 0.09em;
  font-weight: 600;
}

.foot-nav dd {
  margin: 0;
}

.foot-nav a {
  display: flex;
  align-items: center;
  min-height: 40px;
  color: var(--text-2);
  text-decoration: none;
}

.foot-nav a:hover,
.foot-nav a:focus-visible {
  color: var(--pink-soft);
}

.foot-bot {
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 182, 193, 0.14);
  color: var(--text-3);
}

.top {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: var(--radius);
  background: var(--ink-3);
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow-card);
}

.top:hover {
  color: var(--pink-soft);
}

@media (max-width: 900px) {
  body {
    padding-left: 0;
    padding-top: 58px;
  }

  .rail {
    inset: 0 0 auto 0;
    width: auto;
    height: 58px;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    overflow-x: auto;
    overflow-y: hidden;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.3);
  }

  .brand {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 0 2px;
  }

  .rail-list {
    flex-direction: row;
    gap: 4px;
  }

  .rail-a {
    min-height: 40px;
    white-space: nowrap;
    padding: 0 10px;
  }

  .cta {
    margin-top: 0;
    margin-left: auto;
    align-self: center;
    flex: 0 0 auto;
    min-height: 40px;
    padding: 0 14px;
  }

  main {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    padding: 16px 16px 40px;
  }

  .hero {
    min-height: auto;
    padding: 20px 0 26px;
  }

  .hero h1 {
    max-width: 100%;
    font-size: clamp(2rem, 9vw, 2.7rem);
  }

  .body > div {
    scroll-margin-top: 76px;
  }

  .side {
    position: static;
  }

  .side-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .foot {
    padding: 24px 16px 20px;
  }

  .foot-top {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }

  .top {
    right: 12px;
    bottom: 12px;
  }
}

@media (max-width: 560px) {
  .foot-nav {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .side-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

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