@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 {
  --ink: #0F2E2A;
  --ink-soft: #1C4740;
  --cream: #E8DCC8;
  --cream-soft: #F3EBDB;
  --brick: #C1452E;
  --brick-dark: #A2381F;
  --pad: clamp(1rem, 4vw, 2.5rem);
}

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

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: Karla, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

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

::selection { background: var(--brick); color: #fff; }

h1, h2, h3 {
  font-family: "Playfair Display SC", "PingFang SC", "Hiragino Sans GB", sans-serif;
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: .012em;
  margin: 0 0 .55em;
}

.masthead,
.hero,
.content-shell,
.site-foot {
  padding-left: max(var(--pad), calc((100% - 1320px) / 2));
  padding-right: max(var(--pad), calc((100% - 1320px) / 2));
}

/* 页头：两行，品牌独占一行，菜单平铺 */
.masthead {
  background: var(--ink);
  color: var(--cream);
  border-bottom: 4px solid var(--brick);
  padding-top: .8rem;
  padding-bottom: .6rem;
}

.brand-line {
  display: flex;
  align-items: center;
  min-height: 44px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  min-height: 44px;
  padding: .2rem 0;
  text-decoration: none;
  transition: opacity .18s ease;
}

.brand:hover { opacity: .78; }

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  object-fit: contain;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--brick);
  color: #fff;
  font-weight: 700;
  border-radius: 4px;
}

.brand-name {
  font-family: "Playfair Display SC", "PingFang SC", sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: .14em;
}

.menu-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .2rem .6rem;
  margin-top: .35rem;
  border-top: 1px solid rgba(232, 220, 200, .22);
  padding-top: .35rem;
}

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

.menu-line p a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: .55rem .55rem;
  font-size: 1.0625rem;
  text-decoration: none;
  border-bottom: 3px solid transparent;
  transition: border-color .16s ease, color .16s ease;
}

.menu-line p a:hover,
.menu-line p a:focus-visible {
  color: #fff;
  border-bottom-color: var(--brick);
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  min-height: 44px;
  padding: .55rem 1.15rem;
  background: var(--brick);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  border-radius: 4px;
  transition: background .16s ease;
}

.cta:hover { background: var(--brick-dark); }

/* 首屏 */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(1.25rem, 4vw, 3.5rem);
  align-items: center;
  min-height: 70vh;
  padding-top: clamp(2rem, 6vw, 4.5rem);
  padding-bottom: clamp(2rem, 6vw, 4rem);
  overflow: hidden;
}

.hero-copy {
  position: relative;
  max-width: 38rem;
}

.hero-num {
  position: absolute;
  top: -2.4rem;
  left: -.3rem;
  z-index: 0;
  font-family: "Playfair Display SC", Georgia, serif;
  font-size: clamp(5rem, 16vw, 11rem);
  line-height: .8;
  color: var(--brick);
  opacity: .22;
  pointer-events: none;
}

.hero h1 {
  position: relative;
  z-index: 1;
  font-size: clamp(2rem, 5.2vw, 3.9rem);
  margin-bottom: .5em;
}

.hero-lead {
  position: relative;
  z-index: 1;
  max-width: 32rem;
  margin: 0 0 1.7rem;
  font-size: 1.125rem;
  color: #2A4A43;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: .75rem 1.6rem;
  background: var(--ink);
  color: var(--cream);
  font-weight: 700;
  text-decoration: none;
  border-radius: 4px;
  transition: background .16s ease;
}

.hero-btn:hover { background: var(--brick); }

.hero-fig {
  margin: 0;
  aspect-ratio: 4 / 3;
  background: var(--brick);
  border: 0;
  border-radius: 28px;
  overflow: hidden;
}

.hero-fig img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 正文与侧栏 */
.content-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 19rem;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: start;
  padding-top: 0;
  padding-bottom: clamp(2rem, 5vw, 4rem);
}

.prose { min-width: 0; }

.prose section {
  border-radius: 28px;
  padding: clamp(1.4rem, 3.6vw, 2.8rem);
  margin-bottom: clamp(1.1rem, 3vw, 1.9rem);
  scroll-margin-top: 1.25rem;
}

.prose section:nth-child(3n + 1) {
  background: var(--cream-soft);
  color: var(--ink);
}

.prose section:nth-child(3n + 2) {
  background: var(--ink);
  color: var(--cream);
}

.prose section:nth-child(3n) {
  background: var(--brick);
  color: #fff;
}

.prose small {
  display: block;
  margin-bottom: .25rem;
  font-family: Karla, "PingFang SC", sans-serif;
  font-size: 1rem;
  letter-spacing: .18em;
  opacity: .78;
}

.prose h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  padding-bottom: .45rem;
  margin-bottom: 1rem;
  border-bottom: 3px solid currentColor;
}

.prose h3 {
  font-size: 1.3rem;
  margin-top: 1.7rem;
  margin-bottom: .5rem;
}

.prose p { margin: 0 0 1.05em; }

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

.prose ul,
.prose ol {
  margin: 0 0 1.1em;
  padding-left: 1.35rem;
}

.prose li { margin-bottom: .4em; }

.prose a {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  transition: opacity .16s ease;
}

.prose a:hover { opacity: .68; }

.prose strong { font-weight: 700; }

.prose blockquote {
  margin: 1.2em 0;
  padding: .2em 0 .2em 1.15rem;
  border-left: 5px solid currentColor;
  font-size: 1.125rem;
}

.prose img {
  margin: 1.1em 0;
  border-radius: 14px;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.1em 0;
  font-size: 1rem;
}

.prose th,
.prose td {
  padding: .55rem .7rem;
  border: 2px solid currentColor;
  text-align: left;
}

/* 侧栏 */
.rail {
  position: sticky;
  top: 1rem;
  background: var(--ink);
  color: var(--cream);
  border-radius: 28px;
  padding: 1.5rem 1.25rem;
}

.rail small {
  display: block;
  font-size: 1rem;
  letter-spacing: .2em;
  opacity: .7;
}

.rail h2 {
  font-size: 1.4rem;
  margin: .1rem 0 .9rem;
  padding-bottom: .5rem;
  border-bottom: 3px solid var(--brick);
}

.rail ol {
  list-style: none;
  margin: 0 0 .9rem;
  padding: 0;
}

.rail li { border-top: 1px solid rgba(232, 220, 200, .22); }

.rail li a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: .5rem .1rem;
  font-size: 1.0625rem;
  text-decoration: none;
  transition: color .16s ease, padding-left .16s ease;
}

.rail li a:hover {
  color: #fff;
  padding-left: .5rem;
}

.rail-top {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: .35rem .1rem;
  text-decoration: none;
  border-bottom: 2px solid var(--brick);
}

.rail-top:hover { color: #fff; }

/* 页脚 */
.site-foot {
  background: var(--ink);
  color: var(--cream);
  border-top: 4px solid var(--brick);
  text-align: center;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

.site-foot p {
  margin: 0 0 .2rem;
  font-size: 1rem;
}

.site-foot small { font-size: 1rem; }

.site-foot a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: .3rem .7rem;
  text-decoration: none;
  border-bottom: 2px solid var(--brick);
  transition: color .16s ease;
}

.site-foot a:hover { color: #fff; }

/* 滚动出现 */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .5s ease, transform .5s ease;
}

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

@media (max-width: 880px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .hero-num {
    top: -1.8rem;
    font-size: clamp(4.5rem, 24vw, 8rem);
  }

  .hero-fig {
    aspect-ratio: 16 / 10;
    order: 2;
  }

  .content-shell { grid-template-columns: 1fr; }

  .rail { position: static; }
}

@media (max-width: 520px) {
  .masthead {
    padding-top: .7rem;
    padding-bottom: .5rem;
  }

  .menu-line { gap: .1rem .3rem; }

  .menu-line p a { padding: .5rem .42rem; }

  .cta {
    margin-left: 0;
    width: 100%;
    margin-top: .3rem;
  }

  .hero-lead { font-size: 1.0625rem; }

  .prose section { border-radius: 20px; }
}

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

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

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