:root {
  --paper: #f3ede3;
  --paper-deep: #e7dfd2;
  --ink: #26211d;
  --ink-soft: rgba(38, 33, 29, 0.72);
  --gold: #9c7a45;
  --line: rgba(108, 90, 63, 0.18);
  --shadow: 0 18px 44px rgba(64, 52, 36, 0.08);
  --content-width: 760px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top, rgba(255,255,255,0.45), transparent 35%),
    linear-gradient(180deg, #f6f1e8 0%, #efe7db 55%, #f5efe7 100%);
  font-family: "STSong", "Songti SC", "Noto Serif SC", "Source Han Serif SC", serif;
}

body::before,
body::after {
  content: "";
  position: fixed;
  top: 26vh;
  bottom: 18vh;
  width: min(22vw, 220px);
  pointer-events: none;
  opacity: 0.22;
  z-index: 0;
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center top;
}

body::before {
  left: 0;
  background-image: url("assets/side-left.webp");
}

body::after {
  right: 0;
  background-image: url("assets/side-right.webp");
}

.page-shell {
  position: relative;
  z-index: 1;
  overflow: clip;
}

.hero {
  position: relative;
  min-height: 510px;
  display: grid;
  place-items: start center;
  padding: 42px 20px 0;
}

.hero-scene,
.hero-mask {
  position: absolute;
  inset: 0;
}

.hero-scene {
  background:
    linear-gradient(to bottom, rgba(248,243,235,0.36), rgba(248,243,235,0.72) 78%, rgba(248,243,235,0.96)),
    url("assets/hero-scene.webp") center 44% / cover no-repeat;
  filter: saturate(0.9);
}

.hero-mask {
  background:
    radial-gradient(circle at center 22%, rgba(244,238,228,0.96) 0%, rgba(244,238,228,0.88) 22%, rgba(244,238,228,0.58) 36%, rgba(244,238,228,0) 58%),
    linear-gradient(to bottom, transparent 68%, rgba(243,237,227,0.96) 100%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: min(100%, 720px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.emblem {
  width: 130px;
  max-width: 30vw;
  height: auto;
  opacity: 0.9;
  mix-blend-mode: multiply;
}

.hero h1 {
  margin: 0;
  font-family: "STKaiti", "KaiTi", "Kaiti SC", serif;
  font-size: clamp(42px, 8vw, 82px);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-indent: 0.14em;
  color: #26211d;
  text-shadow: 0 3px 10px rgba(255, 250, 243, 0.92);
}

.content {
  position: relative;
  padding: 8px 20px 26px;
}

.verse-group {
  position: relative;
  max-width: var(--content-width);
  margin: 0 auto 44px;
  text-align: center;
}

.verse-group:last-of-type {
  margin-bottom: 18px;
}

.verse-group h2 {
  margin: 0 0 28px;
  font-family: "STKaiti", "KaiTi", "Kaiti SC", serif;
  font-size: clamp(28px, 4.3vw, 42px);
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #2a241f;
}

.verse-group h2::after {
  content: "";
  display: block;
  width: 72px;
  height: 1px;
  margin: 16px auto 0;
  background: linear-gradient(90deg, transparent, rgba(130, 107, 67, 0.55), transparent);
}

.verse-card {
  margin: 0 auto 30px;
  padding: 0 10px;
  max-width: 660px;
}

.verse-card-wide {
  max-width: 760px;
}

.verse-text,
.verse-source {
  margin: 0;
}

.verse-text {
  font-size: clamp(23px, 3vw, 34px);
  line-height: 1.9;
  letter-spacing: 0.03em;
}

.verse-source {
  margin-top: 6px;
  font-size: clamp(18px, 2.15vw, 28px);
  line-height: 1.8;
  color: var(--ink-soft);
}

.footer-scene {
  height: 220px;
  margin-top: 20px;
  background:
    linear-gradient(to bottom, rgba(243,237,227,0.04), rgba(243,237,227,0.86)),
    url("assets/footer-scene.webp") center bottom / cover no-repeat;
  opacity: 0.92;
}

.site-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 18px;
  padding: 16px 20px 24px;
  border-top: 1px solid rgba(123, 106, 80, 0.16);
  background: rgba(228, 220, 206, 0.72);
}

.site-footer a {
  color: #1f6fbe;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-size: 16px;
  font-weight: 600;
}

.site-footer a:hover {
  color: #0d5aa6;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 800ms ease, transform 800ms ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 900px) {
  body::before,
  body::after {
    opacity: 0.15;
    width: 20vw;
  }

  .hero {
    min-height: 430px;
    padding-top: 34px;
  }

  .content {
    padding-top: 0;
  }
}

@media (max-width: 640px) {
  body::before,
  body::after {
    display: none;
  }

  .hero {
    min-height: 320px;
    padding-inline: 14px;
  }

  .hero-scene {
    background-position: center 48%;
  }

  .emblem {
    width: 92px;
  }

  .verse-group {
    margin-bottom: 34px;
  }

  .verse-group h2 {
    margin-bottom: 22px;
  }

  .verse-card {
    margin-bottom: 24px;
    padding-inline: 4px;
  }

  .verse-text {
    line-height: 1.82;
  }

  .verse-source {
    line-height: 1.72;
  }

  .footer-scene {
    height: 150px;
  }
}

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

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