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

:root {
  --navy: #1B2A41;
  --orange: #E4572E;
  --cream: #F4EDE4;
  --navy-soft: #2B3E59;
  --cream-soft: #E7DCCD;
  --paper: #FBF6EF;
  --rail: 258px;
  --line: rgba(27, 42, 65, .18);
}

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

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--navy);
  font-family: Karla, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 1rem; }

h1, h2, h3 {
  margin: 0;
  font-family: "Playfair Display SC", Georgia, "Songti SC", "SimSun", serif;
  font-weight: 700;
  line-height: 1.22;
}

:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}

.skip {
  position: absolute;
  top: .5rem;
  left: -9999px;
  z-index: 60;
  padding: .7rem 1.1rem;
  background: var(--orange);
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
}
.skip:focus { left: .6rem; }

/* ---------- 左侧固定竖排栏 ---------- */
.rail {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  width: var(--rail);
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
  padding: 1.5rem 1.05rem 1.4rem;
  background: var(--navy);
  color: var(--cream);
  border-right: 5px solid var(--orange);
}

.brand {
  display: flex;
  align-items: center;
  gap: .65rem;
  min-height: 44px;
  text-decoration: none;
  color: var(--cream);
  flex: 0 0 auto;
}

.brand .mark {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  display: block;
  background: var(--orange);
  border-radius: 4px;
  object-fit: cover;
}

.brand-txt {
  font-family: "Playfair Display SC", Georgia, "Songti SC", serif;
  font-size: 1.3rem;
  letter-spacing: .1em;
  line-height: 1.2;
}

.rail-nav {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
}

.rail-nav p {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.rail-nav a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: .45rem .95rem;
  border: 1px solid rgba(244, 237, 228, .34);
  border-radius: 999px;
  color: var(--cream);
  text-decoration: none;
  font-size: .93rem;
  letter-spacing: .04em;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}

.rail-nav a:hover,
.rail-nav a:focus-visible {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
}

.rail-foot { margin-top: auto; flex: 0 0 auto; }

.pill-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 1rem;
  background: var(--orange);
  color: #fff;
  text-decoration: none;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: .12em;
  transition: background .18s ease, color .18s ease;
}

.pill-cta:hover,
.pill-cta:focus-visible {
  background: var(--cream);
  color: var(--navy);
}

main { margin-left: var(--rail); }

/* ---------- 首屏 ---------- */
.hero {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  background: var(--navy);
  color: var(--cream);
  overflow: hidden;
}

.hero-in {
  padding: clamp(2rem, 5vw, 4.2rem) clamp(1.15rem, 4vw, 3.4rem) 1.6rem;
  text-align: left;
}

.hero h1 {
  font-size: clamp(2rem, 4.8vw, 3.5rem);
  letter-spacing: .02em;
  max-width: 20ch;
}

.lead {
  margin: 1.05rem 0 0;
  max-width: 48ch;
  color: var(--cream-soft);
  font-size: 1rem;
  line-height: 1.7;
}

.hero-visual {
  position: relative;
  flex: 1 1 auto;
  min-height: 170px;
  background: var(--orange);
  clip-path: polygon(0 16%, 100% 0, 100% 100%, 0 100%);
  overflow: hidden;
}

.hero-img {
  width: 100%;
  height: 100%;
  min-height: 180px;
  object-fit: cover;
  transform: scale(1.06);
  transform-origin: 50% 40%;
  will-change: transform;
}

.hero-visual span {
  position: absolute;
  display: block;
  background: var(--navy);
}

.g1 { width: 172px; height: 172px; border-radius: 50%; left: 7%; top: 38%; }
.g2 { width: 118px; height: 118px; border-radius: 0; left: 42%; top: 20%; background: var(--cream); transform: rotate(16deg); }
.g3 { width: 66px; height: 66px; border-radius: 50%; right: 11%; top: 58%; }

/* ---------- 主体网格 ---------- */
.wrap {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: clamp(1.2rem, 3vw, 2.6rem);
  align-items: start;
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(2rem, 4vw, 3.2rem) clamp(1.15rem, 4vw, 3.4rem) 1rem;
}

/* ---------- 侧栏 ---------- */
.side {
  position: sticky;
  top: 1.5rem;
  padding: 1rem .85rem 1.1rem;
  background: var(--cream-soft);
  border: 2px solid var(--navy);
  border-radius: 4px;
}

.side-h,
.side-h2 {
  display: flex;
  align-items: center;
  font-size: .86rem;
  letter-spacing: .18em;
  margin: 0 0 .7rem;
}

.side-h span,
.side-h2 span {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}

.mk {
  display: inline-block;
  flex: 0 0 13px;
  width: 13px;
  height: 13px;
  background: var(--orange);
}

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

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

.side-list a {
  display: flex;
  align-items: center;
  gap: .5rem;
  min-height: 40px;
  padding: .28rem .15rem;
  font-size: .94rem;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.side-list a::before {
  content: counter(s, decimal-leading-zero);
  font-size: .68rem;
  letter-spacing: .08em;
  color: var(--orange);
  min-width: 1.7em;
}

.side-list a:hover { color: var(--orange); }

.side-cta {
  margin-top: 1.1rem;
  padding-top: .9rem;
  border-top: 2px solid var(--navy);
}

.side-cta p { margin: 0; }

.side-cta a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: .25rem 1rem;
  background: var(--navy);
  color: var(--cream);
  border-radius: 999px;
  font-size: .9rem;
  text-decoration: none;
  transition: background .18s ease;
}

.side-cta a:hover { background: var(--orange); color: #fff; }

/* ---------- 文章 ---------- */
.content { min-width: 0; }

.doc { max-width: 72ch; }

.doc article {
  margin: 0 0 1.6rem;
  padding: 1.5rem 1.25rem 1.4rem;
  background: var(--paper);
  border: 2px solid var(--navy);
  border-radius: 4px;
  box-shadow: 6px 6px 0 rgba(27, 42, 65, .12);
  scroll-margin-top: 22px;
}

.doc h2 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .55rem;
  font-size: clamp(1.3rem, 2.2vw, 1.8rem);
  margin: 0 0 1rem;
}

.doc h2 > span {
  position: relative;
  padding-left: .85rem;
}

.doc h2 > span::before {
  content: "";
  position: absolute;
  left: 0;
  top: .12em;
  bottom: .16em;
  width: 8px;
  background: var(--orange);
}

.doc h3 {
  font-size: 1.14rem;
  margin: 1.5rem 0 .55rem;
}

.doc p { margin: 0 0 1rem; }
.doc ul,
.doc ol { margin: 0 0 1rem; padding-left: 1.25rem; }
.doc li { margin: .3rem 0; }
.doc li::marker { color: var(--orange); }
.doc a { color: var(--orange); text-underline-offset: 3px; }
.doc strong { font-weight: 700; }

.doc blockquote {
  margin: 1.2rem 0;
  padding: .7rem 1rem;
  background: var(--cream-soft);
  border-left: 6px solid var(--orange);
}

.doc blockquote p:last-child { margin-bottom: 0; }

.doc img {
  width: 100%;
  height: auto;
  margin: 1.1rem 0;
  border: 2px solid var(--navy);
  border-radius: 4px;
}

.doc hr {
  border: 0;
  border-top: 2px solid var(--line);
  margin: 1.6rem 0;
}

.doc article:last-child { margin-bottom: 0; }

/* ---------- 页脚 ---------- */
.foot {
  margin-left: var(--rail);
  margin-top: 3rem;
  padding: clamp(1.8rem, 4vw, 2.9rem) clamp(1.15rem, 4vw, 3.4rem);
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr auto;
  gap: 1.3rem;
  align-items: start;
  background: var(--navy);
  color: var(--cream);
  border-top: 7px solid var(--orange);
}

.f-brand {
  margin: 0;
  font-family: "Playfair Display SC", Georgia, "Songti SC", serif;
  font-size: clamp(1.8rem, 3.6vw, 2.7rem);
  line-height: 1.1;
  letter-spacing: .05em;
}

.f-col {
  margin: 0;
  display: flex;
  flex-direction: column;
}

.f-col a {
  display: flex;
  align-items: center;
  min-height: 40px;
  color: var(--cream-soft);
  text-decoration: none;
  font-size: .94rem;
  transition: color .18s ease;
}

.f-col a:hover,
.f-col a:focus-visible { color: var(--orange); }

.f-copy {
  align-self: end;
  font-size: .84rem;
  color: var(--cream-soft);
  letter-spacing: .04em;
}

/* ---------- 动效 ---------- */
.rv {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .5s ease, transform .5s ease;
}

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

/* ---------- 窄屏 ---------- */
@media (max-width: 1023px) {
  .rail {
    position: static;
    width: auto;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: .7rem .8rem;
    padding: .85rem 1rem .9rem;
    border-right: 0;
    border-bottom: 5px solid var(--orange);
  }

  .rail-nav {
    grid-column: 1 / -1;
    overflow: visible;
  }

  .rail-nav p {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: .4rem;
    padding-bottom: .15rem;
    scrollbar-width: none;
  }

  .rail-nav p::-webkit-scrollbar { display: none; }

  .rail-nav a {
    flex: 0 0 auto;
    min-height: 42px;
    padding: .45rem 1rem;
  }

  .rail-foot { margin-top: 0; }
  .pill-cta { min-height: 42px; padding: 0 1.05rem; white-space: nowrap; }

  main,
  .foot { margin-left: 0; }

  .hero { min-height: 0; }
  .hero-in { padding: 1.7rem 1.15rem 1.5rem; }
  .hero-visual { min-height: 150px; }

  .wrap {
    grid-template-columns: minmax(0, 1fr);
    padding: 1.3rem 1.15rem .6rem;
  }

  .side { position: static; }
  .doc { max-width: none; }
  .doc article { box-shadow: 4px 4px 0 rgba(27, 42, 65, .12); }
  .doc article { scroll-margin-top: 18px; }

  .foot { grid-template-columns: 1fr 1fr; margin-top: 2rem; }
  .f-copy { grid-column: 1 / -1; }
}

@media (max-width: 480px) {
  body { font-size: 16.5px; }
  .brand-txt { font-size: 1.15rem; letter-spacing: .07em; }
  .g1 { width: 128px; height: 128px; left: 4%; top: 40%; }
  .g2 { width: 88px; height: 88px; left: 44%; top: 22%; }
  .g3 { width: 52px; height: 52px; right: 8%; top: 60%; }
  .doc article { padding: 1.2rem 1rem 1.1rem; }
  .foot { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rv { opacity: 1; transform: none; transition: none; }
  .hero-img { will-change: auto; }
}

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