@import url('https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible:wght@400;700&family=Crimson+Pro:wght@400;500;600;700&display=swap');

:root {
  --paper: #F3EDE3;
  --paper-2: #E9DFCF;
  --ink: #20303A;
  --red: #C0562F;
  --red-lit: #E08A63;
  --line: #D5C7B2;
  --serif: "Crimson Pro", Georgia, "Songti SC", serif;
  --sans: "Atkinson Hyperlegible", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img { max-width: 100%; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.18;
  margin: 0;
}
h1 { font-size: clamp(2.1rem, 6.4vw, 3.65rem); text-wrap: balance; letter-spacing: -.012em; }
h2 { font-size: clamp(1.6rem, 3.9vw, 2.3rem); text-wrap: balance; }
h3 { font-size: 1.18rem; text-wrap: balance; }
p { margin: 0 0 1rem; }

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

/* 顶部两行：品牌行 + 菜单行 */
.masthead {
  position: relative;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.brand-row { padding: .35rem clamp(.9rem, 4vw, 2.4rem) 0; }
.brand {
  display: inline-block;
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: .26em;
  text-decoration: none;
  padding: .55rem .1rem;
  color: var(--ink);
}
.brand:hover { color: var(--red); }

.menu-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem .7rem;
  padding: 0 clamp(.9rem, 4vw, 2.4rem) .6rem;
}
.rail { flex: 1 1 auto; min-width: 0; }
.rail ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .1rem .25rem;
  margin: 0;
  padding: 0;
}
.rail li[hidden] { display: none; }
.rail a {
  display: block;
  padding: .62rem .6rem;
  min-height: 44px;
  text-decoration: none;
  font-size: 1rem;
  line-height: 1.45;
  border-bottom: 2px solid transparent;
  border-radius: 8px;
}
.rail a:hover,
.rail a:focus-visible { color: var(--red); border-bottom-color: var(--red); }

.all { position: relative; flex: 0 0 auto; }
.all summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: .5rem .85rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: .95rem;
  letter-spacing: .08em;
}
.all summary::-webkit-details-marker { display: none; }
.all[open] summary { border-color: var(--red); color: var(--red); }
.all-panel {
  position: absolute;
  right: 0;
  top: calc(100% + .45rem);
  z-index: 60;
  width: min(80vw, 330px);
  background: #FBF7F0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .9rem;
  display: grid;
  gap: .8rem;
}
.grp-t {
  margin: 0 0 .2rem;
  font-size: .76rem;
  letter-spacing: .24em;
  color: var(--red);
}
.all-panel ul { list-style: none; margin: 0; padding: 0; }
.all-panel a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: .4rem .3rem;
  text-decoration: none;
  font-size: .96rem;
  border-radius: 8px;
}
.all-panel a:hover { color: var(--red); background: var(--paper-2); }

.lookup {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #FBF7F0;
  padding: 0 .55rem;
}
.lookup input {
  border: 0;
  background: transparent;
  font: inherit;
  font-size: .95rem;
  padding: .6rem 0;
  width: 8.6rem;
  min-height: 42px;
  outline: none;
}
.lookup input::placeholder { color: #8B7F6E; }

/* 版面网格 */
.wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  max-width: 1220px;
  margin: 0 auto;
}

/* 首屏 */
.hero {
  position: relative;
  grid-column: 1 / -1;
  min-height: 70vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(150deg, #1B2A33 0%, #334955 58%, #3F5563 100%);
}
.hero-media { position: absolute; inset: 0; margin: 0; }
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.06);
  will-change: transform;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, rgba(22, 34, 42, .94) 0%, rgba(22, 34, 42, .62) 58%, rgba(22, 34, 42, .12) 100%);
}
.hero-band {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 96px;
  z-index: 2;
  background: var(--red);
  clip-path: polygon(0 100%, 100% 16%, 100% 100%);
  opacity: .9;
}
.hero-copy {
  position: relative;
  z-index: 3;
  max-width: 46rem;
  padding: 0 clamp(1.1rem, 5vw, 3.6rem) clamp(3.4rem, 9vw, 5.2rem);
  color: var(--paper);
}
.hero-kicker {
  display: block;
  font-size: .8rem;
  letter-spacing: .32em;
  color: var(--red-lit);
  margin-bottom: .7rem;
}
.hero-copy h1 { text-shadow: 0 2px 26px rgba(0, 0, 0, .38); }
.hero-sub {
  margin: .95rem 0 0;
  max-width: 34rem;
  font-size: 1.04rem;
  color: rgba(243, 237, 227, .88);
}

/* 正文 */
.story { grid-column: 1; perspective: 1px; }
.story > article {
  position: relative;
  padding: clamp(2.4rem, 7vw, 4.6rem) clamp(1.1rem, 5vw, 3.2rem);
  scroll-margin-top: 6.5rem;
}
.story > article > * { max-width: 64ch; }
.story > article > figure { max-width: 100%; }
.story > article:nth-of-type(odd) { background: var(--ink); color: #EFE7DA; }
.story > article:nth-of-type(even) { background: var(--paper); color: var(--ink); border-top: 1px solid var(--line); }

.story small,
.side small {
  display: block;
  font-family: var(--sans);
  font-size: .76rem;
  letter-spacing: .26em;
  color: var(--red);
  margin-bottom: .5rem;
}
.story > article:nth-of-type(odd) small { color: var(--red-lit); }
.story > article h2 { margin: 0 0 1rem; }
.story a { color: var(--red); text-underline-offset: 3px; }
.story > article:nth-of-type(odd) a { color: var(--red-lit); }
.story ul,
.story ol { padding-left: 1.15rem; }
.story li { margin: .35rem 0; }
.story figure { margin: 1.2rem 0; }
.story figcaption { font-size: .88rem; opacity: .75; }

/* 右侧栏 */
.side {
  grid-column: 1;
  align-self: start;
  margin: 1.4rem clamp(1.1rem, 5vw, 3.2rem);
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #FBF7F0;
}
.side h3 { margin: 0 0 .7rem; }
.side-list {
  list-style: none;
  margin: 0 0 .6rem;
  padding: 0;
  border-top: 1px solid var(--line);
}
.side-list a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: .5rem .1rem;
  text-decoration: none;
  font-size: .95rem;
  border-bottom: 1px solid var(--line);
  transition: padding-left .18s ease, color .18s ease;
}
.side-list a:hover { color: var(--red); padding-left: .45rem; }
.to-top {
  display: inline-block;
  margin-top: .7rem;
  font-size: .9rem;
  letter-spacing: .12em;
  text-decoration: none;
  color: var(--red);
}

/* 页脚 */
.site {
  background: var(--ink);
  color: #EFE7DA;
  border-top: 6px solid var(--red);
}
.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: clamp(2rem, 7vw, 3.4rem) clamp(1.1rem, 5vw, 3.2rem);
  border-bottom: 1px solid rgba(243, 237, 227, .18);
}
.cta-word {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.8rem, 7vw, 3rem);
  font-weight: 700;
  letter-spacing: .24em;
  color: var(--paper);
}
.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: .7rem 1.5rem;
  border: 1px solid var(--red-lit);
  border-radius: 10px;
  color: var(--red-lit);
  text-decoration: none;
  font-size: .92rem;
  letter-spacing: .16em;
}
.cta-btn:hover { background: var(--red); border-color: var(--red); color: #fff; }
.cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.2rem;
  padding: 1.7rem clamp(1.1rem, 5vw, 3.2rem);
}
.cols dl { margin: 0; }
.cols dt {
  font-size: .76rem;
  letter-spacing: .24em;
  color: var(--red-lit);
  margin-bottom: .35rem;
}
.cols dd { margin: 0; font-size: .96rem; color: rgba(243, 237, 227, .82); }
.cols dd a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: .4rem 0;
  text-decoration: none;
  color: rgba(243, 237, 227, .82);
}
.cols dd a:hover { color: #fff; }
.copy {
  margin: 0;
  padding: 1rem clamp(1.1rem, 5vw, 3.2rem) 1.7rem;
  font-size: .85rem;
  color: rgba(243, 237, 227, .58);
  border-top: 1px solid rgba(243, 237, 227, .14);
}

/* 显影与错峰 */
.js .story > article {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .3, 1);
}
.js .story > article.in { opacity: 1; transform: none; }
.js .story > article li {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .5s ease, transform .5s ease;
}
.js .story > article.in li {
  opacity: 1;
  transform: none;
  transition-delay: calc(var(--i, 0) * 55ms);
}

@media (min-width: 640px) {
  .cols { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1024px) {
  .masthead { position: sticky; top: 0; }
  .wrap {
    grid-template-columns: minmax(0, 1fr) 15.5rem;
    column-gap: 1.6rem;
    padding-right: 1.6rem;
    align-items: start;
  }
  .side {
    grid-column: 2;
    position: sticky;
    top: 1.2rem;
    margin: 1.8rem 0;
  }
}

@media (max-width: 559px) {
  .lookup { flex: 1 1 100%; }
  .lookup input { width: 100%; }
  .all-panel { width: min(88vw, 320px); right: auto; left: 0; }
  .hero { min-height: 66vh; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .story > article,
  .js .story > article li {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .hero-media img { transform: none; will-change: auto; }
}

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