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

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

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

body {
  margin: 0;
  background: #F5E9DC;
  color: #141414;
  font-family: 'Outfit', "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; }
img { max-width: 100%; height: auto; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

/* ---------- 左侧固定竖排导航 ---------- */
.rail {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: 236px;
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 26px 18px 22px;
  background: #F5E9DC;
  border-right: 3px solid #141414;
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 23px;
  letter-spacing: 0.01em;
  line-height: 1.1;
}

.brand-mark {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: #E23E57;
  color: #F5E9DC;
  border: 3px solid #141414;
  border-radius: 50%;
  font-size: 16px;
  font-weight: 900;
}

.brand-logo { width: 36px; height: 36px; object-fit: contain; border: 3px solid #141414; border-radius: 50%; }

.rail-nav {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.rail-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 9px 8px;
  font-size: 16px;
  font-weight: 700;
  border-radius: 3px;
  border-bottom: 1px solid rgba(20, 20, 20, 0.18);
  transition: background-color 160ms ease, color 160ms ease, padding-left 160ms ease;
}

.rail-nav a:last-child { border-bottom: 0; }

.rail-nav a:hover,
.rail-nav a:focus-visible {
  background: #E23E57;
  color: #F5E9DC;
  padding-left: 14px;
  outline: none;
}

.nav-ico { width: 14px; height: 14px; flex: 0 0 14px; }

.rail-contact { margin-top: auto; }

.rail-contact a {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 10px 10px;
  font-size: 16px;
  font-weight: 900;
  color: #F5E9DC;
  background: #141414;
  border-radius: 4px;
  transition: background-color 160ms ease;
}

.rail-contact a:hover { background: #E23E57; }

/* ---------- 主栅格 ---------- */
.wrap {
  margin-left: 236px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 268px;
  align-items: start;
}

main { grid-column: 1; min-width: 0; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: clamp(20px, 4vw, 52px);
  background: #E23E57;
  overflow: hidden;
  clip-path: polygon(0 0, 100% 0, 100% 92%, 0 100%);
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero-in {
  position: relative;
  z-index: 1;
  max-width: min(660px, 100%);
  margin-left: auto;
  padding: clamp(20px, 3vw, 36px);
  background: #141414;
  color: #F5E9DC;
  text-align: right;
  border-radius: 4px;
}

.hero-in h1 {
  margin: 0;
  font-size: clamp(2.2rem, 6.2vw, 4.8rem);
  font-weight: 900;
  line-height: 1.03;
  letter-spacing: -0.015em;
}

.hero-desc {
  margin: 16px 0 0;
  font-size: 17px;
  line-height: 1.6;
  color: #F5E9DC;
}

.hero.with-img .hero-in { background: #141414; }

/* ---------- 正文 ---------- */
.body {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: clamp(20px, 4vw, 48px);
  counter-reset: sec;
}

.body > section {
  counter-increment: sec;
  background: #FFFBF5;
  border: 3px solid #141414;
  border-radius: 28px;
  padding: 26px 24px;
}

.body > section::before {
  content: "0" counter(sec);
  display: inline-block;
  margin-bottom: 14px;
  padding: 1px 9px;
  background: #141414;
  color: #F5E9DC;
  border-radius: 3px;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.12em;
  line-height: 1.6;
}

.body h2,
.body h3 {
  margin: 0 0 14px;
  font-weight: 900;
  line-height: 1.28;
  letter-spacing: -0.01em;
}

.body h2 { font-size: clamp(1.3rem, 2.4vw, 1.9rem); }
.body h3 { font-size: clamp(1.1rem, 1.8vw, 1.35rem); }

.body h2 span,
.body h3 span {
  background: #E23E57;
  color: #F5E9DC;
  padding: 0 0.26em;
  border-radius: 3px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.body ul,
.body ol { margin: 0 0 1em; padding-left: 1.3em; }
.body li { margin-bottom: 0.4em; }
.body li::marker { color: #E23E57; font-weight: 900; }

.body strong { font-weight: 900; background: #F5E9DC; padding: 0 0.18em; }

.body a {
  color: #141414;
  border-bottom: 2px solid #E23E57;
  font-weight: 700;
}

.body img { border: 3px solid #141414; border-radius: 4px; margin: 0 0 1em; }

.body blockquote {
  margin: 0 0 1em;
  padding: 12px 16px;
  border-left: 6px solid #E23E57;
  background: #F5E9DC;
  border-radius: 0 4px 4px 0;
}

.body table { width: 100%; border-collapse: collapse; margin-bottom: 1em; font-size: 16px; }
.body th,
.body td { border: 2px solid #141414; padding: 8px 10px; text-align: left; }
.body th { background: #F5E9DC; font-weight: 900; }

.body figure { margin: 0 0 1em; }
.body figcaption { font-size: 15px; margin-top: 6px; }

/* ---------- 右侧栏 ---------- */
.side {
  grid-column: 2;
  position: sticky;
  top: 0;
  align-self: start;
  max-height: 100vh;
  overflow-y: auto;
  padding: clamp(20px, 3vw, 34px) 16px;
  border-left: 3px solid #141414;
}

.side-title {
  margin: 0 0 14px;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.side-title span {
  display: inline-block;
  padding: 2px 10px;
  background: #E23E57;
  color: #F5E9DC;
  border-radius: 3px;
}

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

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

.side-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 8px 4px;
  font-size: 16px;
  font-weight: 600;
  border-bottom: 1px solid rgba(20, 20, 20, 0.2);
  transition: color 160ms ease, background-color 160ms ease;
}

.side-list a::before {
  content: counter(side, decimal-leading-zero);
  font-size: 13px;
  font-weight: 900;
  color: #E23E57;
  letter-spacing: 0.06em;
}

.side-list a:hover { color: #E23E57; background: #FFFBF5; }

/* ---------- 页脚 ---------- */
.foot {
  margin-left: 236px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 34px;
  padding: 26px clamp(20px, 4vw, 48px);
  background: #141414;
  color: #F5E9DC;
  border-top: 3px solid #141414;
}

.foot-mark {
  margin: 0;
  font-size: clamp(1.7rem, 4.2vw, 2.7rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.foot-mark span { color: #E23E57; }

.foot-nav dl {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 16px;
  margin: 0;
}

.foot-nav dt {
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.16em;
  color: #E23E57;
}

.foot-nav dd { margin: 0; }

.foot-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 0;
  font-size: 16px;
  font-weight: 600;
  border-bottom: 2px solid transparent;
  transition: border-color 160ms ease, color 160ms ease;
}

.foot-nav a:hover { border-bottom-color: #E23E57; color: #FFFFFF; }

.foot-legal { margin-left: auto; }
.foot-legal p { margin: 0; font-size: 15px; }

/* ---------- 动效 ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 460ms ease, transform 460ms ease;
}

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

/* ---------- 窄屏 ---------- */
@media (max-width: 1080px) {
  .rail {
    position: static;
    width: auto;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    padding: 14px 16px;
    border-right: 0;
    border-bottom: 3px solid #141414;
    overflow: visible;
  }

  .rail-nav {
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
    gap: 2px;
  }

  .rail-nav a {
    min-height: 42px;
    padding: 8px 10px;
    border-bottom: 0;
    border: 2px solid rgba(20, 20, 20, 0.25);
  }

  .rail-nav a:hover,
  .rail-nav a:focus-visible { padding-left: 10px; border-color: #141414; }

  .rail-contact { margin-top: 0; }
  .rail-contact a { min-height: 42px; padding: 8px 12px; }

  .wrap { margin-left: 0; grid-template-columns: minmax(0, 1fr); }

  .hero {
    min-height: 0;
    align-items: center;
    justify-content: flex-end;
    padding: 40px 18px 56px;
    clip-path: polygon(0 0, 100% 0, 100% 96%, 0 100%);
  }

  .hero-in { padding: 22px 18px; }

  .side {
    position: static;
    max-height: none;
    overflow: visible;
    border-left: 0;
    border-top: 3px solid #141414;
  }

  .side-list { flex-direction: row; flex-wrap: wrap; gap: 4px; }
  .side-list li { width: calc(50% - 4px); }
  .side-list a { border-bottom: 2px solid rgba(20, 20, 20, 0.25); padding: 8px 8px; }

  .foot { margin-left: 0; gap: 12px 22px; }
  .foot-legal { margin-left: 0; width: 100%; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .body { padding: 16px 14px; gap: 16px; }
  .body > section { padding: 20px 16px; border-radius: 20px; }
  .hero-in h1 { font-size: clamp(1.9rem, 9vw, 2.8rem); }
  .foot { padding: 22px 16px; }
  .foot-nav dl { gap: 2px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .rail-nav a,
  .rail-contact a,
  .side-list a,
  .foot-nav a { transition: none; }
}

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