@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;700;900&display=swap');

:root {
  --ink: #26171a;
  --rose: #eb879c;
  --pink: #ffb6c1;
  --rose-deep: #a83550;
  --cream: #fdf5f6;
  --card: #fff8f9;
  --muted: #5b4148;
  --rail: 92px;
  --soft: 0 1px 2px rgba(38, 23, 26, .05), 0 2px 4px rgba(38, 23, 26, .05), 0 14px 28px -16px rgba(38, 23, 26, .22);
  --lift: 0 2px 4px rgba(38, 23, 26, .07), 0 26px 44px -20px rgba(38, 23, 26, .32);
}

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

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

body {
  margin: 0;
  padding-left: var(--rail);
  font-family: "Outfit", system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink);
  background:
    radial-gradient(900px 620px at 88% -12%, #ffe4ea 0%, rgba(255, 228, 234, 0) 68%),
    radial-gradient(680px 520px at 4% 108%, #ffeef2 0%, rgba(255, 238, 242, 0) 70%),
    var(--cream);
  background-attachment: fixed;
}

img { max-width: 100%; }

a { color: var(--rose-deep); }

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

/* ---------- 左侧固定导航 ---------- */
.mast {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 120;
  width: var(--rail);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 26px 0 26px;
  background: linear-gradient(180deg, #ffe8ee 0%, #fdf5f6 62%, #fdf5f6 100%);
  box-shadow: 1px 0 0 rgba(235, 135, 156, .28), 10px 0 32px -22px rgba(38, 23, 26, .5);
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: var(--soft);
}

.brand-word {
  writing-mode: vertical-rl;
  font-weight: 900;
  font-size: 19px;
  letter-spacing: .26em;
  line-height: 1.25;
}

.burger {
  list-style: none;
  width: 46px;
  height: 46px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--soft);
  cursor: pointer;
  transition: box-shadow 240ms ease, background 240ms ease;
}

.burger::-webkit-details-marker { display: none; }

.burger span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 240ms ease, opacity 240ms ease;
}

.burger:hover { box-shadow: var(--lift); }

.nav-modal[open] .burger { background: var(--rose); }
.nav-modal[open] .burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-modal[open] .burger span:nth-child(2) { opacity: 0; }
.nav-modal[open] .burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.nav-panel {
  position: fixed;
  inset: 0;
  z-index: 110;
  margin: 0;
  padding: 96px 26px 44px calc(var(--rail) + 30px);
  list-style: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  background: linear-gradient(158deg, #fff5f7 0%, #ffdde5 58%, #ffc9d5 100%);
  box-shadow: inset 0 0 90px rgba(235, 135, 156, .28);
}

.nav-panel li {
  opacity: 0;
  transform: translateX(-16px);
  animation: slide-in 260ms cubic-bezier(.2, .7, .3, 1) forwards;
}

.nav-panel li:nth-child(2) { animation-delay: 35ms; }
.nav-panel li:nth-child(3) { animation-delay: 70ms; }
.nav-panel li:nth-child(4) { animation-delay: 105ms; }
.nav-panel li:nth-child(5) { animation-delay: 140ms; }
.nav-panel li:nth-child(6) { animation-delay: 175ms; }
.nav-panel li:nth-child(7) { animation-delay: 210ms; }

.nav-panel a {
  display: inline-flex;
  align-items: center;
  min-height: 50px;
  padding: 6px 12px;
  font-size: clamp(20px, 2.5vw, 30px);
  font-weight: 900;
  letter-spacing: .01em;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: transform 220ms ease, color 220ms ease, border-color 220ms ease;
}

.nav-panel a:hover {
  color: var(--rose-deep);
  transform: translateX(8px);
  border-bottom-color: var(--rose);
}

@keyframes slide-in {
  to { opacity: 1; transform: translateX(0); }
}

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(22px, 4vw, 62px);
  padding: clamp(26px, 5vw, 76px);
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  right: -140px;
  bottom: -180px;
  width: 440px;
  height: 440px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, rgba(255, 182, 193, .55), rgba(255, 182, 193, 0) 70%);
  pointer-events: none;
}

.hero-fig {
  position: relative;
  margin: 0;
  aspect-ratio: 4 / 5;
  max-height: 76vh;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(158deg, #ffd9e0 0%, #ffb6c1 55%, #eb879c 100%);
  box-shadow: var(--lift);
}

.hero-img {
  display: block;
  width: 100%;
  height: 106%;
  object-fit: cover;
  position: relative;
  top: -3%;
  will-change: transform;
}

.badge {
  position: absolute;
  left: 12px;
  bottom: 12px;
  max-width: calc(100% - 24px);
  padding: 8px 15px;
  border-radius: 10px;
  font-size: 16px;
  line-height: 1.45;
  font-weight: 500;
  color: var(--ink);
  background: rgba(253, 245, 246, .94);
  box-shadow: var(--soft);
}

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

.hero-copy h1 {
  margin: 0 0 16px;
  font-size: clamp(31px, 4.6vw, 56px);
  line-height: 1.14;
  font-weight: 900;
  letter-spacing: -.01em;
}

.hero-copy .subtitle {
  margin: 0 0 0 auto;
  max-width: 32ch;
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.78;
  color: var(--muted);
}

/* ---------- 正文区 ---------- */
.stage {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  align-items: start;
  gap: clamp(20px, 3vw, 46px);
  padding: clamp(30px, 4vw, 58px) clamp(20px, 4vw, 58px) clamp(44px, 6vw, 88px);
}

.rail {
  position: sticky;
  top: 34px;
  padding: 20px 16px 22px;
  border-radius: 10px;
  background: var(--card);
  box-shadow: var(--soft);
  border-bottom: 3px solid var(--rose);
}

.rail h2 {
  margin: 0 0 2px;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: .12em;
}

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

.toc {
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 0;
  font-size: 16px;
  line-height: 1.4;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid rgba(235, 135, 156, .28);
  transition: color 220ms ease, padding-left 220ms ease;
}

.toc li:last-child a { border-bottom: 0; }

.toc a:hover {
  color: var(--rose-deep);
  padding-left: 6px;
}

.content { max-width: 72ch; }

.content > div {
  margin: 0 0 clamp(20px, 3vw, 34px);
  padding: clamp(20px, 3vw, 34px);
  border-radius: 10px;
  background: var(--card);
  box-shadow: var(--soft);
  border-bottom: 3px solid var(--pink);
  scroll-margin-top: 22px;
}

.content > div:nth-child(even) { border-bottom-color: var(--rose); }

.content h2 {
  margin: 0 0 10px;
  font-size: clamp(22px, 2.3vw, 29px);
  line-height: 1.28;
  font-weight: 900;
}

.content h3 {
  margin: 1.4em 0 .5em;
  font-size: 19px;
  font-weight: 700;
}

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

.content ul,
.content ol { margin: 0 0 1.05em; padding-left: 1.25em; }

.content li { margin: 0 0 .4em; }

.content figure { margin: 1.2em 0; }

.content img {
  border-radius: 10px;
  box-shadow: var(--soft);
}

.content blockquote {
  margin: 1.2em 0;
  padding: 12px 18px;
  border-left: 4px solid var(--rose);
  border-radius: 0 10px 10px 0;
  background: #fff1f4;
}

.content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
}

.content th,
.content td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(235, 135, 156, .35);
  text-align: left;
}

/* ---------- 页脚 ---------- */
.foot {
  padding: clamp(32px, 5vw, 62px) clamp(20px, 4vw, 58px) 24px;
  background:
    radial-gradient(520px 320px at 92% 0%, rgba(235, 135, 156, .28), rgba(235, 135, 156, 0) 72%),
    #26171a;
  color: #ffeef2;
  box-shadow: 0 -18px 40px -30px rgba(38, 23, 26, .8);
}

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

.foot h3 {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .16em;
  color: var(--pink);
}

.foot-brand {
  margin: 0;
  writing-mode: horizontal-tb;
  font-size: 21px;
  font-weight: 900;
  letter-spacing: .1em;
}

.foot address {
  font-style: normal;
  font-size: 16px;
  line-height: 1.9;
  color: #ffdde4;
  overflow-wrap: anywhere;
}

.foot-links {
  margin: 0;
  padding: 0;
  list-style: none;
}

.foot-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 5px 0;
  font-size: 16px;
  color: #ffeef2;
  text-decoration: none;
  transition: color 220ms ease, transform 220ms ease;
}

.foot-links a:hover {
  color: var(--pink);
  transform: translateX(3px);
}

.sub-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.sub-form input {
  height: 46px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 182, 193, .5);
  background: rgba(255, 255, 255, .09);
  color: #fff;
  font: inherit;
  font-size: 16px;
}

.sub-form input::placeholder { color: #ffd7e0; }

.sub-form button {
  height: 46px;
  border: 0;
  border-radius: 10px;
  background: var(--rose);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 220ms ease, box-shadow 220ms ease;
}

.sub-form button:hover {
  background: var(--pink);
  box-shadow: 0 10px 22px -12px rgba(255, 182, 193, .9);
}

.foot-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 30px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 182, 193, .26);
  font-size: 16px;
  color: #ffdde4;
}

.totop {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 5px 12px;
  border-radius: 10px;
  color: #ffeef2;
  text-decoration: none;
  background: rgba(255, 255, 255, .08);
  transition: background 220ms ease;
}

.totop:hover { background: rgba(255, 182, 193, .3); }

/* ---------- 断点 ---------- */
@media (max-width: 900px) {
  .stage { grid-template-columns: 170px minmax(0, 1fr); }
  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  :root { --rail: 66px; }

  body { font-size: 16px; }

  .brand-word { font-size: 16px; letter-spacing: .2em; }
  .brand-mark { width: 32px; height: 32px; }
  .burger { width: 44px; height: 44px; }

  .nav-panel { padding: 84px 20px 36px calc(var(--rail) + 20px); }
  .nav-panel a { min-height: 48px; }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    padding: 90px 18px 40px;
    align-content: center;
  }

  .hero-copy { order: -1; }

  .hero-fig {
    aspect-ratio: 16 / 10;
    max-height: 40vh;
  }

  .hero-copy h1 { font-size: clamp(28px, 8vw, 38px); }

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

  .rail {
    position: static;
    padding: 16px 14px;
  }

  .toc {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 8px;
  }

  .toc a {
    min-height: 40px;
    padding: 6px 12px;
    border: 1px solid rgba(235, 135, 156, .5);
    border-radius: 10px;
    font-size: 16px;
  }

  .toc li:last-child a { border-bottom: 1px solid rgba(235, 135, 156, .5); }
  .toc a:hover { padding-left: 12px; }

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

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

  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
    transition-duration: 1ms !important;
  }
}

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