/* 华严经官网 - 古典禅意 */
:root {
  --ink: #1c1915;
  --ink-soft: #3a342c;
  --cinnabar: #9a3412;
  --gold: #a67c3d;
  --gold-soft: #c4a574;
  --jade: #3d5a4c;
  --paper: #f3efe6;
  --paper-deep: #e8e0d0;
  --line: rgba(28, 25, 21, 0.12);
  --shadow: rgba(28, 25, 21, 0.08);
  --serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "SimSun", "宋体", serif;
  --kai: "Kaiti SC", "STKaiti", "KaiTi", "楷体", var(--serif);
  --max: 1080px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* 背景气氛：绢帛纹理 + 淡墨晕 */
.hy-bg {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(166, 124, 61, 0.12), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(61, 90, 76, 0.08), transparent 50%),
    linear-gradient(180deg, #f6f2e9 0%, var(--paper) 40%, #efe8da 100%);
}
.hy-bg::after {
  content: "";
  position: absolute; inset: 0; opacity: 0.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 */
.hy-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(243, 239, 230, 0.88);
  border-bottom: 1px solid var(--line);
}
.hy-header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0.85rem 0; min-height: 4.25rem;
}
.hy-brand {
  display: flex; align-items: center; gap: 0.85rem; color: inherit;
}
.hy-brand-mark {
  width: 2.6rem; height: 2.6rem; display: grid; place-items: center;
  border: 1px solid var(--gold);
  color: var(--cinnabar);
  font-family: var(--kai);
  font-size: 1.35rem;
  background: linear-gradient(145deg, rgba(166,124,61,0.12), transparent);
  animation: hySealIn 1.1s var(--ease) both;
}
.hy-brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.hy-brand-text strong {
  font-size: 1.25rem; font-weight: 700; letter-spacing: 0.18em;
  font-family: var(--kai);
}
.hy-brand-text em {
  font-style: normal; font-size: 0.72rem; color: var(--ink-soft);
  letter-spacing: 0.12em; opacity: 0.85; margin-top: 0.15rem;
}
.hy-nav { display: flex; flex-wrap: wrap; gap: 0.15rem 1.35rem; align-items: center; }
.hy-nav a {
  color: var(--ink-soft); font-size: 0.95rem; letter-spacing: 0.12em;
  position: relative; padding: 0.25rem 0;
}
.hy-nav a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px;
  background: var(--gold); transition: right .35s var(--ease);
}
.hy-nav a:hover, .hy-nav a.is-active { color: var(--ink); }
.hy-nav a:hover::after, .hy-nav a.is-active::after { right: 0; }

.hy-nav-toggle {
  display: none; width: 2.4rem; height: 2.4rem; border: 1px solid var(--line);
  background: transparent; cursor: pointer; padding: 0; flex-direction: column;
  align-items: center; justify-content: center; gap: 5px;
}
.hy-nav-toggle span {
  display: block; width: 1.1rem; height: 1px; background: var(--ink); transition: .3s var(--ease);
}

/* Hero */
.hy-hero {
  position: relative;
  padding: clamp(3.5rem, 10vw, 6.5rem) 0 clamp(4rem, 9vw, 6rem);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(28,25,21,0.04), transparent 55%),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 4 L32 18 L30 20 L28 18 Z' fill='%23a67c3d' fill-opacity='0.06'/%3E%3C/svg%3E");
}
.hy-hero-inner { text-align: center; max-width: 42rem; margin-inline: auto; }
.hy-hero-kicker {
  margin: 0 0 1rem; letter-spacing: 0.45em; font-size: 0.85rem;
  color: var(--gold); font-family: var(--kai);
  animation: hyFadeUp .9s var(--ease) both;
}
.hy-hero-title {
  margin: 0; font-family: var(--kai); font-weight: 700;
  font-size: clamp(2.4rem, 7vw, 3.6rem); letter-spacing: 0.28em;
  line-height: 1.2; color: var(--ink);
  animation: hyFadeUp 1s .1s var(--ease) both;
}
.hy-hero-desc {
  margin: 1.35rem auto 0; max-width: 28rem; color: var(--ink-soft);
  font-size: 1rem; letter-spacing: 0.06em;
  animation: hyFadeUp 1s .2s var(--ease) both;
}
.hy-hero-actions {
  margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 0.85rem; justify-content: center;
  animation: hyFadeUp 1s .3s var(--ease) both;
}
.hy-hero-wave {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 48px;
  background: linear-gradient(180deg, transparent, rgba(243,239,230,0.9));
}

.hy-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 2.75rem; padding: 0 1.6rem;
  border: 1px solid var(--cinnabar); background: var(--cinnabar); color: #f8f4ec;
  letter-spacing: 0.2em; font-family: var(--kai); font-size: 0.95rem;
  transition: background .3s var(--ease), color .3s var(--ease), transform .3s var(--ease);
}
.hy-btn:hover { background: transparent; color: var(--cinnabar); }
.hy-btn-ghost {
  background: transparent; color: var(--ink); border-color: var(--ink-soft);
}
.hy-btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

/* Sections */
.hy-main { min-height: 50vh; }
.hy-section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.hy-section-top { padding-top: 2rem; }
.hy-section-head { text-align: center; margin-bottom: 2.25rem; }
.hy-section-head h1, .hy-section-head h2 {
  margin: 0; font-family: var(--kai); font-weight: 700;
  letter-spacing: 0.25em; font-size: clamp(1.6rem, 4vw, 2rem);
}
.hy-section-head p {
  margin: 0.85rem 0 0; color: var(--ink-soft); letter-spacing: 0.08em; font-size: 0.95rem;
}

.hy-article-list { list-style: none; margin: 0; padding: 0; }
.hy-article-list li {
  border-bottom: 1px solid var(--line);
  opacity: 0; transform: translateY(12px);
  animation: hyFadeUp .7s var(--ease) forwards;
}
.hy-article-list li:nth-child(1) { animation-delay: .05s; }
.hy-article-list li:nth-child(2) { animation-delay: .1s; }
.hy-article-list li:nth-child(3) { animation-delay: .15s; }
.hy-article-list li:nth-child(4) { animation-delay: .2s; }
.hy-article-list li:nth-child(5) { animation-delay: .25s; }
.hy-article-list li:nth-child(n+6) { animation-delay: .3s; }
.hy-article-list a {
  display: block; padding: 1.15rem 0.4rem; color: inherit;
  transition: background .25s var(--ease), padding-left .25s var(--ease);
}
.hy-article-list a:hover {
  background: rgba(166, 124, 61, 0.06);
  padding-left: 0.85rem;
}
.hy-list-title {
  display: block; font-size: 1.12rem; letter-spacing: 0.08em;
  font-family: var(--kai); color: var(--ink);
}
.hy-list-excerpt {
  display: block; margin-top: 0.35rem; color: var(--ink-soft);
  font-size: 0.9rem; opacity: 0.9;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hy-empty { text-align: center; padding: 3rem; color: var(--ink-soft); }
.hy-more { text-align: center; margin-top: 2rem; }

/* Article */
.hy-article { padding: 2rem 0 4rem; }
.hy-breadcrumb {
  font-size: 0.85rem; color: var(--ink-soft); letter-spacing: 0.06em;
  margin-bottom: 1.75rem; display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center;
}
.hy-breadcrumb a { color: var(--ink-soft); }
.hy-article-head { text-align: center; margin-bottom: 2.5rem; }
.hy-article-head h1 {
  margin: 0; font-family: var(--kai); font-weight: 700;
  font-size: clamp(1.7rem, 4.5vw, 2.35rem); letter-spacing: 0.18em; line-height: 1.35;
}
.hy-ornament {
  margin-top: 1.25rem; display: flex; align-items: center; justify-content: center; gap: 1rem;
  color: var(--gold); font-family: var(--kai); font-size: 0.8rem; letter-spacing: 0.35em;
}
.hy-ornament i {
  display: block; width: 3.5rem; height: 1px; background: linear-gradient(90deg, transparent, var(--gold-soft), transparent);
}

.hy-content {
  font-size: 1.05rem; line-height: 2; color: var(--ink);
  max-width: 42rem; margin-inline: auto;
}
.hy-content p { margin: 0 0 1.15em; text-align: justify; }
.hy-content h2, .hy-content h3 {
  font-family: var(--kai); letter-spacing: 0.12em; margin: 1.8em 0 0.8em; color: var(--ink);
}
.hy-content img { display: block; margin: 1.5rem auto; }
.hy-content blockquote {
  margin: 1.5rem 0; padding: 0.5rem 0 0.5rem 1.2rem;
  border-left: 2px solid var(--gold-soft); color: var(--ink-soft); font-family: var(--kai);
}

.hy-pager {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;
  margin: 3rem auto 0; max-width: 42rem; padding-top: 2rem;
  border-top: 1px solid var(--line);
}
.hy-pager a {
  display: block; padding: 1rem; color: inherit; border: 1px solid var(--line);
  transition: border-color .25s var(--ease), background .25s var(--ease);
}
.hy-pager a:hover { border-color: var(--gold-soft); background: rgba(166,124,61,0.05); }
.hy-pager em {
  display: block; font-style: normal; font-size: 0.78rem; color: var(--gold);
  letter-spacing: 0.15em; margin-bottom: 0.35rem;
}
.hy-pager strong { font-weight: 600; font-family: var(--kai); letter-spacing: 0.06em; font-size: 0.95rem; }
.hy-pager-next { text-align: right; }

.hy-pagination {
  display: flex; flex-wrap: wrap; gap: 0.45rem; justify-content: center; margin-top: 2.5rem;
}
.hy-pagination a, .hy-pagination span {
  min-width: 2.4rem; height: 2.4rem; display: grid; place-items: center;
  border: 1px solid var(--line); color: var(--ink-soft); font-size: 0.9rem;
}
.hy-pagination a:hover { border-color: var(--gold); color: var(--gold); }
.hy-pagination .is-current {
  background: var(--ink); color: var(--paper); border-color: var(--ink);
}

/* Footer */
.hy-footer {
  margin-top: 2rem; padding: 2.5rem 0 2rem; text-align: center;
  border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 0.88rem;
}
.hy-footer-ornament { color: var(--gold); margin-bottom: 0.75rem; letter-spacing: 0.3em; opacity: 0.7; }
.hy-footer-text { margin: 0; letter-spacing: 0.18em; font-family: var(--kai); color: var(--ink-soft); }
.hy-footer-meta { margin: 0.75rem 0; display: flex; gap: 0.5rem; justify-content: center; flex-wrap: wrap; }
.hy-footer-meta a { color: var(--ink-soft); }
.hy-copyright { margin: 0.5rem 0 0; opacity: 0.7; font-size: 0.8rem; }

.hy-ad-slot { margin: 1rem auto; width: min(100% - 2rem, var(--max)); text-align: center; }

@keyframes hyFadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes hySealIn {
  from { opacity: 0; transform: scale(0.85) rotate(-6deg); }
  to { opacity: 1; transform: scale(1) rotate(0); }
}

@media (max-width: 860px) {
  .hy-nav-toggle { display: flex; }
  .hy-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(243, 239, 230, 0.98); border-bottom: 1px solid var(--line);
    padding: 0.5rem 1.25rem 1rem;
  }
  .hy-nav.is-open { display: flex; }
  .hy-nav a { padding: 0.75rem 0; border-bottom: 1px solid var(--line); }
  .hy-header { position: relative; }
  .hy-header-inner { position: relative; }
  .hy-brand-text em { display: none; }
  .hy-list-excerpt { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .hy-pager { grid-template-columns: 1fr; }
  .hy-pager-next { text-align: left; }
  .hy-hero-title { letter-spacing: 0.16em; }
}

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