@import url('https://fonts.googleapis.com/css2?family=Kalam:wght@400;700&family=Patrick+Hand&display=swap');

:root {
  --ink: #171f26;
  --blue: #c8e0f4;
  --pink: #f5e0e8;
  --paper: #eaf2f9;
  --hi: rgba(255, 255, 255, .92);
  --lo: rgba(23, 31, 38, .16);
  --soft: -6px -6px 16px var(--hi), 6px 6px 18px var(--lo);
  --soft-s: -4px -4px 10px var(--hi), 4px 4px 10px var(--lo);
  --press: inset -3px -3px 8px var(--hi), inset 3px 3px 8px var(--lo);
  --font: 'Patrick Hand', 'Kalam', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink);
  background: linear-gradient(165deg, #f0f7fd 0%, #e4eef8 55%, #e9eff7 100%);
  background-attachment: fixed;
}

a { color: var(--ink); }

:focus-visible {
  outline: 2px dashed rgba(23, 31, 38, .55);
  outline-offset: 3px;
}

/* ---------- 顶部：品牌行 + 胶囊菜单 ---------- */

.top {
  padding: 1rem clamp(.9rem, 3vw, 2rem) 0;
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1080px;
  margin: 0 auto;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  min-height: 44px;
  padding: .3rem .95rem;
  border-radius: 16px;
  text-decoration: none;
  font-size: 1.3rem;
  letter-spacing: .08em;
  background: linear-gradient(145deg, #f2f8fd, #e2ecf7);
  box-shadow: var(--soft-s);
  transition: box-shadow .18s ease, transform .18s ease;
}

.logo:hover { box-shadow: var(--soft); }
.logo:active { box-shadow: var(--press); transform: scale(.98); }

.logo .mark {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: .5rem 1.1rem;
  border-radius: 999px;
  font-size: 1rem;
  text-decoration: none;
  background: var(--pink);
  box-shadow: var(--soft-s);
  transition: box-shadow .18s ease, transform .18s ease;
}

.pill:hover { box-shadow: var(--soft); }
.pill:active { box-shadow: var(--press); transform: scale(.97); }

.menu {
  max-width: 1080px;
  margin: .9rem auto 0;
}

.menu p {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 0;
}

.menu a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: .45rem .95rem;
  border-radius: 999px;
  font-size: 1rem;
  text-decoration: none;
  background: linear-gradient(145deg, #eef5fb, #e2ecf7);
  box-shadow: var(--soft-s);
  transition: box-shadow .18s ease, transform .18s ease;
}

.menu a:hover { box-shadow: var(--soft); }
.menu a:active { box-shadow: var(--press); transform: scale(.97); }

/* ---------- 首屏 ---------- */

.hero {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(1rem, 4vw, 2.4rem);
  max-width: 1080px;
  min-height: min(70vh, 620px);
  margin: 1.2rem auto 0;
  padding: clamp(1.6rem, 6vw, 3rem) clamp(1rem, 4vw, 2rem);
  border-radius: 16px;
  text-align: center;
  overflow: hidden;
  background: linear-gradient(145deg, #dcebf8, #edf5fb);
  box-shadow: var(--soft);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(23, 31, 38, .14) 1px, transparent 1px);
  background-size: 20px 20px;
  opacity: .6;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(circle at 50% 45%, #000 10%, transparent 78%);
  mask-image: radial-gradient(circle at 50% 45%, #000 10%, transparent 78%);
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 34em;
}

.hero-art {
  position: relative;
  z-index: 1;
  line-height: 0;
}

.hero-art:empty { display: none; }

.hero-art img {
  width: clamp(96px, 20vw, 152px);
  height: auto;
  border-radius: 16px;
  background: var(--pink);
  box-shadow: var(--soft);
  transform: rotate(-3deg);
}

h1 {
  margin: .2rem 0 .7rem;
  font-size: clamp(1.7rem, 5.2vw, 2.85rem);
  line-height: 1.32;
  letter-spacing: .02em;
}

.lede {
  margin: 0 auto;
  max-width: 30em;
  font-size: 1rem;
  line-height: 1.8;
  color: rgba(23, 31, 38, .78);
}

/* ---------- 主体：左栏 + 正文 ---------- */

main {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  align-items: start;
  gap: clamp(1.1rem, 3vw, 2.4rem);
  max-width: 1080px;
  margin: clamp(1.6rem, 4vw, 2.6rem) auto 0;
  padding: 0 clamp(.9rem, 3vw, 2rem);
}

.rail {
  position: sticky;
  top: 1rem;
  align-self: start;
  padding: 1rem;
  border-radius: 16px;
  background: linear-gradient(150deg, #f1f8fd, #e3edf7);
  box-shadow: var(--soft);
}

.rail-t {
  margin: 0 0 .7rem;
  font-size: 1.02rem;
  letter-spacing: .1em;
  line-height: 1.5;
}

.rail-t span {
  display: inline-block;
  padding: 0 .16em;
  box-shadow: inset 0 -.52em 0 rgba(245, 224, 232, .95);
}

.rail-links {
  display: flex;
  flex-direction: column;
  gap: .45rem;
  margin: 0 0 1rem;
}

.rail-links a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: .35rem .8rem;
  border-radius: 12px;
  font-size: .98rem;
  line-height: 1.4;
  text-decoration: none;
  background: linear-gradient(145deg, #eef6fc, #e2ecf7);
  box-shadow: var(--soft-s);
  transition: box-shadow .18s ease, transform .18s ease;
}

.rail-links a:hover { box-shadow: var(--press); transform: translateX(2px); }
.rail-links a:active { box-shadow: var(--press); transform: scale(.98); }

.rail-top { margin: 0; }

.rail-top .pill {
  width: 100%;
  background: var(--blue);
}

section.body { min-width: 0; }

section.body div {
  padding: clamp(1.15rem, 3vw, 2rem);
  margin: 0 0 clamp(1rem, 2.5vw, 1.6rem);
  border-radius: 0;
  background: var(--pink);
  scroll-margin-top: 1.25rem;
}

section.body div:nth-child(even) { background: var(--blue); }

section.body h2 {
  margin: 0 0 .75rem;
  font-size: clamp(1.26rem, 3.2vw, 1.58rem);
  line-height: 1.4;
  letter-spacing: .02em;
}

section.body h2 span {
  display: inline-block;
  padding: 0 .14em;
  box-shadow: inset 0 -.5em 0 rgba(255, 255, 255, .82);
}

section.body h3 {
  margin: 1.2rem 0 .4rem;
  font-size: 1.1rem;
  line-height: 1.5;
}

section.body h3 span {
  display: inline-block;
  padding: 0 .14em;
  box-shadow: inset 0 -.45em 0 rgba(255, 255, 255, .7);
}

section.body p,
section.body li {
  font-size: 1rem;
  line-height: 1.85;
}

section.body p { margin: 0 0 .9rem; }
section.body p:last-child { margin-bottom: 0; }

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

section.body li { margin: 0 0 .35rem; }

section.body a {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(23, 31, 38, .35);
}

section.body a:hover { text-decoration-color: var(--ink); }

section.body img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
}

section.body blockquote {
  margin: 0 0 1rem;
  padding: .8rem 1rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, .5);
  box-shadow: var(--press);
}

section.body table {
  width: 100%;
  border-collapse: collapse;
  font-size: .98rem;
}

section.body th,
section.body td {
  padding: .5rem .6rem;
  text-align: left;
  border-bottom: 1px solid rgba(23, 31, 38, .12);
}

section.body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .94em;
  padding: .1em .35em;
  border-radius: 6px;
  background: rgba(255, 255, 255, .6);
}

/* ---------- 页脚 ---------- */

.foot {
  max-width: 1080px;
  margin: clamp(2rem, 6vw, 3.4rem) auto 0;
  padding: 2rem clamp(1rem, 4vw, 2rem) 2.6rem;
  text-align: center;
}

.foot .bigmark {
  margin: 0;
  font-size: clamp(2.2rem, 11vw, 4.6rem);
  line-height: 1.05;
  letter-spacing: .12em;
  color: rgba(23, 31, 38, .88);
  text-shadow: -2px -2px 4px #fff, 2px 2px 6px rgba(23, 31, 38, .22);
}

.foot small {
  display: block;
  margin-top: .8rem;
  font-size: .95rem;
  letter-spacing: .06em;
  color: rgba(23, 31, 38, .68);
}

/* ---------- 滚动浮现 ---------- */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .55s ease, transform .55s ease;
}

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

/* ---------- 窄屏 ---------- */

@media (max-width: 820px) {
  main {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.1rem;
  }

  .rail {
    position: static;
    order: 2;
  }

  .rail-links {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .rail-links a {
    flex: 1 1 auto;
    justify-content: center;
  }

  .hero {
    flex-direction: column;
    min-height: 0;
    padding-top: 1.4rem;
  }

  .hero-art img {
    width: 84px;
    transform: rotate(-2deg);
  }

  .menu a {
    padding: .45rem .8rem;
    font-size: .98rem;
  }
}

@media (max-width: 420px) {
  .logo { font-size: 1.15rem; }
  .logo .mark { width: 28px; height: 28px; }
  .contact { padding: .5rem .9rem; }
}

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

  .reveal,
  .pill,
  .logo,
  .menu a,
  .rail-links a {
    transition: none;
  }

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

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