/* 阿弥陀经官网 — 古典禅意 */
:root {
  --ink: #1c1914;
  --ink-soft: #3a342c;
  --muted: #6b6256;
  --paper: #f3eee4;
  --paper-deep: #e8e0d0;
  --gold: #9a7b3c;
  --gold-light: #c4a35a;
  --cinnabar: #7a2e24;
  --jade: #2f5d50;
  --line: rgba(28, 25, 20, 0.12);
  --shadow: 0 18px 50px rgba(28, 25, 20, 0.08);
  --font-serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "SimSun", "宋体", serif;
  --font-kai: "Kaiti SC", "STKaiti", "KaiTi", "楷体", var(--font-serif);
  --max: 1080px;
  --narrow: 760px;
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.85;
  background: var(--paper);
  min-height: 100vh;
  position: relative;
}
img { max-width: 100%; height: auto; vertical-align: middle; }
a { color: var(--cinnabar); text-decoration: none; transition: color .25s ease, opacity .25s ease; }
a:hover { color: var(--gold); }
.container { width: min(100% - 2rem, var(--max)); margin-inline: auto; }
.container.narrow { width: min(100% - 2rem, var(--narrow)); }

.paper-bg {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(154,123,60,.12), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(47,93,80,.08), transparent 50%),
    linear-gradient(180deg, #f7f2e8 0%, #efe7d8 45%, #e9e0cf 100%);
}
.paper-bg::after {
  content: "";
  position: absolute; inset: 0;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(243, 238, 228, 0.86);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  min-height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.brand {
  display: flex; align-items: center; gap: .75rem; color: inherit;
}
.brand:hover { color: inherit; opacity: .9; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1.5px solid var(--gold);
  background:
    radial-gradient(circle at 50% 45%, transparent 28%, var(--gold-light) 29%, var(--gold-light) 32%, transparent 33%),
    radial-gradient(circle at 50% 50%, rgba(154,123,60,.15), transparent 70%);
  box-shadow: inset 0 0 0 5px rgba(154,123,60,.08);
  animation: breath 5s ease-in-out infinite;
}
@keyframes breath {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.04); opacity: .88; }
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name {
  font-family: var(--font-kai);
  font-size: 1.35rem;
  letter-spacing: .18em;
  color: var(--ink);
}
.brand-motto {
  font-size: .72rem;
  letter-spacing: .35em;
  color: var(--gold);
  margin-top: .15rem;
}
.site-nav { display: flex; align-items: center; gap: 1.5rem; }
.site-nav a {
  color: var(--ink-soft);
  font-size: .95rem;
  letter-spacing: .12em;
  position: relative;
  padding: .25rem 0;
}
.site-nav a::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -2px; height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform .3s ease;
}
.site-nav a:hover, .site-nav a.active { color: var(--ink); }
.site-nav a:hover::after, .site-nav a.active::after { transform: scaleX(1); }

.nav-toggle {
  display: none; width: 42px; height: 42px;
  border: 1px solid var(--line); background: transparent; border-radius: 4px;
  padding: 10px 9px; cursor: pointer;
}
.nav-toggle span {
  display: block; height: 1.5px; background: var(--ink); margin: 5px 0;
  transition: .25s ease;
}

/* Hero */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  display: flex; align-items: center;
  padding: 4rem 0 5rem;
  overflow: hidden;
}
.hero-inner { position: relative; z-index: 1; text-align: center; max-width: 820px; margin: 0 auto; }
.hero-eyebrow {
  font-size: .85rem; letter-spacing: .45em; color: var(--jade);
  margin: 0 0 1.5rem; opacity: 0; animation: rise .9s ease forwards .15s;
}
.hero-brand {
  font-family: var(--font-kai);
  font-size: clamp(2.4rem, 7vw, 4.2rem);
  font-weight: 400;
  letter-spacing: .28em;
  margin: 0 0 1.5rem;
  color: var(--ink);
  text-indent: .28em;
  opacity: 0; animation: rise 1s ease forwards .35s;
}
.hero-lead {
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  color: var(--ink-soft);
  letter-spacing: .08em;
  line-height: 2.1;
  margin: 0 auto 2.5rem;
  max-width: 34em;
  opacity: 0; animation: rise 1s ease forwards .55s;
}
.hero-actions {
  display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap;
  opacity: 0; animation: rise 1s ease forwards .75s;
}
.hero-ornament {
  position: absolute; left: 50%; bottom: 8%;
  width: min(70vw, 520px); height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  transform: translateX(-50%);
  opacity: .5;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 140px; padding: .85rem 1.6rem;
  border: 1px solid var(--ink); color: var(--ink);
  letter-spacing: .2em; font-size: .9rem;
  background: transparent; transition: .3s ease;
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--cinnabar); border-color: var(--cinnabar); color: #fff; }
.btn-ghost:hover { background: rgba(154,123,60,.12); border-color: var(--gold); color: var(--ink); }

/* Sections */
.section { padding: 4rem 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-head { text-align: center; margin-bottom: 2.5rem; position: relative; }
.section-title {
  font-family: var(--font-kai);
  font-size: 1.85rem; font-weight: 400;
  letter-spacing: .35em; text-indent: .35em;
  margin: 0 0 .75rem;
}
.section-desc { color: var(--muted); margin: 0 0 1rem; letter-spacing: .08em; }
.section-more {
  font-size: .85rem; letter-spacing: .2em; color: var(--gold);
  border-bottom: 1px solid transparent;
}
.section-more:hover { border-color: var(--gold); }

.article-list { list-style: none; margin: 0; padding: 0; }
.article-list li { border-bottom: 1px solid var(--line); }
.article-list a {
  display: block; padding: 1.25rem 0.25rem;
  color: inherit;
  transition: padding-left .3s ease, background .3s ease;
}
.article-list a:hover { padding-left: .5rem; color: inherit; }
.article-title {
  display: block;
  font-size: 1.15rem;
  letter-spacing: .08em;
  color: var(--ink);
}
.article-excerpt {
  display: block;
  margin-top: .4rem;
  font-size: .92rem;
  color: var(--muted);
  line-height: 1.7;
}
.article-list-lg a { padding: 1.5rem .25rem; }

.section-verse { text-align: center; }
.verse {
  margin: 0 auto; max-width: 40em;
  padding: 2.5rem 1.5rem;
  border-top: 1px solid var(--gold);
  border-bottom: 1px solid var(--gold);
}
.verse p {
  font-family: var(--font-kai);
  font-size: 1.15rem;
  letter-spacing: .06em;
  line-height: 2.2;
  color: var(--ink-soft);
  margin: 0 0 1.25rem;
}
.verse cite {
  font-style: normal;
  color: var(--gold);
  letter-spacing: .2em;
  font-size: .9rem;
}

/* List / Article */
.page-banner { padding: 2.5rem 0 1rem; }
.page-title {
  font-family: var(--font-kai);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 400;
  letter-spacing: .25em;
  text-indent: .25em;
  margin: .5rem 0 .75rem;
}
.page-lead { color: var(--muted); margin: 0; max-width: 36em; }
.breadcrumb {
  display: flex; flex-wrap: wrap; gap: .5rem; align-items: center;
  font-size: .85rem; color: var(--muted); letter-spacing: .06em;
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--gold); }

.article-page { padding: 2rem 0 4rem; }
.article-header { margin: 1.5rem 0 2rem; text-align: center; }
.article-h1 {
  font-family: var(--font-kai);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 400;
  letter-spacing: .15em;
  line-height: 1.5;
  margin: 0;
}
.sutra-body {
  font-size: 1.05rem;
  line-height: 2.15;
  letter-spacing: .04em;
  color: var(--ink-soft);
}
.sutra-body p { margin: 0 0 1.1em; text-align: justify; }
.sutra-body img {
  display: block; margin: 1.5rem auto;
  box-shadow: var(--shadow);
}
.article-nav {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;
  margin-top: 3rem; padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: .92rem;
}
.article-nav a { color: var(--ink-soft); }
.article-nav .next { text-align: right; }

.pagination {
  display: flex; justify-content: center; gap: .5rem; flex-wrap: wrap;
  margin-top: 2.5rem;
}
.pagination a, .pagination span {
  min-width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); color: var(--ink-soft);
}
.pagination .current, .pagination a:hover {
  border-color: var(--gold); color: var(--ink); background: rgba(154,123,60,.08);
}

.empty-tip { text-align: center; color: var(--muted); padding: 3rem 0; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.5rem 0 3rem;
  text-align: center;
  color: var(--muted);
  font-size: .88rem;
}
.footer-blessing {
  font-family: var(--font-kai);
  letter-spacing: .18em;
  color: var(--ink-soft);
  margin: 0 0 1rem;
  line-height: 2;
}
.footer-copy, .footer-icp, .footer-url { margin: .35rem 0; }
.footer-icp a, .footer-url a { color: var(--muted); }

/* Mobile */
@media (max-width: 768px) {
  .nav-toggle { display: inline-block; }
  .site-nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    background: rgba(243,238,228,.97);
    border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch;
    padding: 1rem 1.5rem 1.5rem;
    gap: 0;
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: .3s ease;
  }
  .site-nav.open {
    transform: translateY(0); opacity: 1; pointer-events: auto;
  }
  .site-nav a { padding: .9rem 0; border-bottom: 1px solid var(--line); }
  .hero { min-height: auto; padding: 3.5rem 0 4rem; }
  .hero-brand { letter-spacing: .18em; text-indent: .18em; }
  .article-nav { grid-template-columns: 1fr; }
  .article-nav .next { text-align: left; }
  body.nav-open { overflow: hidden; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
