:root {
  --ink: #191411;
  --soft-ink: #51463f;
  --paper: #f8f2e8;
  --paper-deep: #efe3d3;
  --ivory: #fffaf1;
  --wine: #9f2b4d;
  --wine-deep: #6f1832;
  --gold: #b9873f;
  --sage: #637d73;
  --line: rgba(50, 34, 24, 0.16);
  --shadow: 0 22px 70px rgba(54, 31, 20, 0.16);
  --max: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(90deg, rgba(50, 34, 24, 0.05) 1px, transparent 1px),
    linear-gradient(rgba(50, 34, 24, 0.035) 1px, transparent 1px),
    var(--paper);
  background-size: 80px 80px;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.68;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 15% 8%, rgba(159, 43, 77, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(255, 250, 241, 0.8), rgba(248, 242, 232, 0.58));
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
  min-height: 76px;
  padding: 12px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
  background: rgba(248, 242, 232, 0.86);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.brand img {
  width: 38px;
  height: 48px;
  object-fit: contain;
}

.nav {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.5vw, 34px);
  color: var(--soft-ink);
  font-size: 13px;
  font-weight: 760;
}

.nav a {
  position: relative;
  padding: 8px 0;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 1px;
  transform: scaleX(0);
  transform-origin: left;
  background: var(--wine);
  transition: transform 180ms ease;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--wine-deep);
}

.nav a:hover::after,
.nav a:focus-visible::after {
  transform: scaleX(1);
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.language-switch {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 250, 241, 0.68);
}

.lang-button {
  min-width: 42px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--soft-ink);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.lang-button.is-active {
  background: var(--wine);
  color: var(--ivory);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 250, 241, 0.7);
  padding: 0;
}

.nav-toggle span {
  display: block;
  width: 17px;
  height: 1px;
  margin: 6px auto;
  background: var(--ink);
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: min(88vh, 820px);
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(248, 242, 232, 0.98), rgba(248, 242, 232, 0.78) 58%, rgba(248, 242, 232, 0.25)),
    url("assets/hero.jpg") center / cover no-repeat;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 34%;
  background: linear-gradient(180deg, transparent, var(--paper));
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(var(--max), calc(100% - 40px));
  min-height: min(88vh, 820px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) 260px;
  align-items: end;
  gap: clamp(28px, 6vw, 80px);
  padding: clamp(92px, 13vh, 150px) 0 clamp(58px, 9vh, 96px);
}

.hero-copy {
  max-width: 780px;
}

.kicker,
.section-label {
  margin: 0 0 16px;
  color: var(--wine);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2 {
  font-family: Georgia, "Times New Roman", "Songti SC", "SimSun", serif;
  font-weight: 500;
  letter-spacing: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 24px;
  color: var(--ink);
  font-size: clamp(54px, 7.4vw, 104px);
  line-height: 0.96;
}

h2 {
  margin-bottom: 0;
  color: var(--ink);
  font-size: clamp(34px, 5vw, 66px);
  line-height: 1.04;
}

h3 {
  margin-bottom: 12px;
  color: var(--ink);
  font-size: 21px;
  line-height: 1.22;
}

.hero-lede {
  max-width: 710px;
  margin-bottom: 34px;
  color: var(--soft-ink);
  font-size: clamp(18px, 2vw, 23px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 20px;
  border-radius: 999px;
  border: 1px solid rgba(50, 34, 24, 0.2);
  font-size: 13px;
  font-weight: 900;
}

.button.primary {
  border-color: var(--wine);
  background: var(--wine);
  color: var(--ivory);
}

.button.ghost {
  background: rgba(255, 250, 241, 0.68);
  color: var(--ink);
}

.button.dark {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--ivory);
}

.hero-note {
  align-self: center;
  justify-self: end;
  width: min(100%, 260px);
  padding: 22px;
  border-left: 3px solid var(--wine);
  background: rgba(255, 250, 241, 0.72);
  box-shadow: var(--shadow);
}

.hero-note span {
  display: block;
  margin-bottom: 18px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.hero-note p {
  margin-bottom: 0;
  color: var(--soft-ink);
  font-size: 15px;
}

.hero-visual {
  position: absolute;
  inset: 80px max(20px, calc((100vw - var(--max)) / 2)) auto auto;
  z-index: 1;
  width: min(46vw, 560px);
  height: min(64vh, 580px);
  pointer-events: none;
}

.book-page {
  position: absolute;
  width: min(48%, 260px);
  border: 1px solid rgba(50, 34, 24, 0.14);
  background: var(--ivory);
  box-shadow: 0 22px 50px rgba(54, 31, 20, 0.2);
}

.page-cover {
  right: 0;
  top: 0;
  transform: rotate(3deg);
}

.page-quote {
  right: 28%;
  top: 24%;
  transform: rotate(-5deg);
}

.section {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(78px, 10vw, 136px) 0;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(160px, 0.32fr) minmax(0, 1fr);
  gap: clamp(26px, 5vw, 78px);
  align-items: start;
  margin-bottom: clamp(36px, 6vw, 72px);
}

.section-heading.narrow {
  display: block;
  max-width: 880px;
}

.legacy-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(330px, 0.64fr);
  gap: clamp(30px, 6vw, 82px);
  align-items: start;
}

.text-flow {
  display: grid;
  gap: 22px;
  color: var(--soft-ink);
  font-size: 18px;
}

.text-flow p {
  margin-bottom: 0;
}

.timeline {
  display: grid;
  border-top: 1px solid var(--line);
}

.timeline article {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.timeline span {
  color: var(--wine);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 23px;
}

.timeline p {
  margin-bottom: 0;
  color: var(--soft-ink);
  font-size: 15px;
}

.atlas-band {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(320px, 0.7fr);
  gap: clamp(30px, 6vw, 84px);
  align-items: center;
  padding: clamp(72px, 10vw, 132px) max(20px, calc((100vw - var(--max)) / 2));
  border-block: 1px solid rgba(255, 250, 241, 0.16);
  background:
    linear-gradient(90deg, rgba(25, 20, 17, 0.82), rgba(25, 20, 17, 0.72)),
    url("assets/cellar.jpg") center / cover no-repeat;
  color: var(--ivory);
}

.atlas-band h2,
.atlas-band .section-label {
  color: var(--ivory);
}

.atlas-band .section-label {
  color: #e3b268;
}

.atlas-band p {
  max-width: 720px;
  color: rgba(255, 250, 241, 0.78);
  font-size: 18px;
}

.archive-stack {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  align-items: center;
}

.archive-stack img {
  aspect-ratio: 3 / 4;
  width: 100%;
  object-fit: cover;
  object-position: top;
  border: 1px solid rgba(255, 250, 241, 0.2);
  background: var(--ivory);
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.24);
}

.archive-stack img:nth-child(2) {
  transform: translateY(-24px);
}

.mission-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 46px;
}

.mission-grid article,
.member,
.program-list article {
  border: 1px solid var(--line);
  background: rgba(255, 250, 241, 0.62);
}

.mission-grid article {
  min-height: 292px;
  padding: 30px;
}

.mission-grid span,
.program-list span {
  display: inline-flex;
  margin-bottom: 36px;
  color: var(--sage);
  font-size: 13px;
  font-weight: 950;
}

.mission-grid p,
.member p,
.program-list p {
  margin-bottom: 0;
  color: var(--soft-ink);
  font-size: 15px;
}

.china-section {
  width: min(1320px, calc(100% - 40px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(0, 0.92fr);
  gap: clamp(28px, 6vw, 80px);
  align-items: center;
  padding: clamp(26px, 5vw, 56px);
  border-block: 1px solid var(--line);
  background: rgba(255, 250, 241, 0.5);
}

.china-media img {
  width: 100%;
  aspect-ratio: 1.18 / 1;
  object-fit: cover;
  filter: saturate(0.86) contrast(1.02);
}

.china-copy p:not(.section-label) {
  color: var(--soft-ink);
  font-size: 18px;
}

.member-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.member {
  min-height: 220px;
  padding: 25px;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.member:hover {
  transform: translateY(-4px);
  border-color: rgba(159, 43, 77, 0.36);
  background: rgba(255, 250, 241, 0.82);
}

.programs {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(300px, 0.74fr) minmax(0, 1fr);
  gap: clamp(28px, 6vw, 78px);
  align-items: stretch;
  padding: clamp(78px, 10vw, 136px) 0;
}

.program-image {
  min-height: 620px;
  background:
    linear-gradient(180deg, rgba(25, 20, 17, 0.08), rgba(25, 20, 17, 0.42)),
    url("assets/winehouse.png") center / cover no-repeat;
  box-shadow: var(--shadow);
}

.program-copy {
  align-self: center;
}

.program-list {
  display: grid;
  gap: 14px;
  margin-top: 36px;
}

.program-list article {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 18px;
  padding: 24px;
}

.program-list span {
  margin-bottom: 0;
}

.contact-section {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto clamp(34px, 7vw, 82px);
  padding: clamp(28px, 5vw, 58px);
  background:
    linear-gradient(130deg, rgba(111, 24, 50, 0.96), rgba(159, 43, 77, 0.9)),
    url("assets/book/lavalle-082.png") right 20% / auto 120% no-repeat;
  color: var(--ivory);
}

.contact-panel {
  max-width: 680px;
}

.contact-panel .section-label,
.contact-panel h2 {
  color: var(--ivory);
}

.contact-panel p {
  color: rgba(255, 250, 241, 0.82);
  font-size: 18px;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 34px 20px 48px;
  border-top: 1px solid var(--line);
  color: var(--soft-ink);
  text-align: center;
  font-size: 13px;
}

.footer img {
  width: 40px;
  height: 50px;
  object-fit: contain;
}

.footer p {
  margin-bottom: 0;
}

@media (max-width: 1020px) {
  .hero-visual {
    opacity: 0.24;
    width: 70vw;
  }

  .hero-inner,
  .section-heading,
  .legacy-grid,
  .atlas-band,
  .china-section,
  .programs {
    grid-template-columns: 1fr;
  }

  .hero-note {
    justify-self: start;
    width: min(100%, 320px);
  }

  .archive-stack {
    max-width: 620px;
  }

  .mission-grid,
  .member-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .program-image {
    min-height: 360px;
  }
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: auto auto;
  }

  .nav-toggle {
    display: block;
  }

  .nav {
    position: fixed;
    inset: 76px 16px auto 16px;
    display: none;
    justify-self: stretch;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px;
    border: 1px solid var(--line);
    background: rgba(248, 242, 232, 0.98);
    box-shadow: var(--shadow);
  }

  .nav.is-open {
    display: flex;
  }

  .nav a {
    padding: 14px 10px;
  }

  .header-actions {
    grid-column: 2;
  }
}

@media (max-width: 640px) {
  .site-header {
    gap: 10px;
  }

  .brand span {
    display: none;
  }

  .language-switch {
    transform: scale(0.92);
    transform-origin: right center;
  }

  .hero {
    min-height: auto;
  }

  .hero-inner {
    min-height: auto;
    padding: 92px 0 58px;
  }

  h1 {
    font-size: clamp(42px, 13vw, 58px);
  }

  h2 {
    font-size: clamp(30px, 9vw, 42px);
  }

  .hero-visual {
    inset: 78px 12px auto auto;
    width: 78vw;
    height: 360px;
  }

  .book-page {
    width: 46%;
  }

  .timeline article,
  .program-list article {
    grid-template-columns: 1fr;
  }

  .mission-grid,
  .member-grid {
    grid-template-columns: 1fr;
  }

  .mission-grid article,
  .member {
    min-height: 0;
  }

  .archive-stack {
    grid-template-columns: 1fr 1fr;
  }

  .archive-stack img:nth-child(2) {
    transform: none;
  }

  .archive-stack img:nth-child(3) {
    display: none;
  }

  .contact-section {
    background:
      linear-gradient(130deg, rgba(111, 24, 50, 0.97), rgba(159, 43, 77, 0.93)),
      url("assets/book/lavalle-082.png") right bottom / 78% auto no-repeat;
  }
}
