/*
Theme Name: 法愿
Theme URI: https://fayuan.online/
Description: 法愿在线专属区块子主题，以朱砂印记、宣纸留白和清晰的内容索引统一网站体验。
Author: 法愿在线
Template: twentytwentyfour
Version: 1.0.0
Text Domain: fayuan
*/

:root {
  --fayuan-ink: #191815;
  --fayuan-muted: #746f66;
  --fayuan-paper: #f5f0e6;
  --fayuan-surface: #fffdf8;
  --fayuan-line: rgba(25, 24, 21, 0.15);
  --fayuan-vermilion: #b4000a;
  --fayuan-vermilion-dark: #7f090d;
  --fayuan-pine: #253f38;
  --fayuan-gold: #b58a3a;
  --fayuan-shadow: 0 24px 70px rgba(53, 43, 27, 0.12);
}

html { scroll-behavior: smooth; }

body {
  color: var(--fayuan-ink);
  background:
    radial-gradient(circle at 12% 3%, rgba(180, 0, 10, 0.06), transparent 27rem),
    linear-gradient(90deg, rgba(92, 71, 40, 0.035) 1px, transparent 1px),
    var(--fayuan-paper);
  background-size: auto, 32px 32px, auto;
  font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", STSong, serif;
}

a {
  text-underline-offset: 0.22em;
  text-decoration-thickness: 1px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--fayuan-vermilion);
  outline-offset: 4px;
}

.wp-site-blocks { min-height: 100vh; }

.fayuan-site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--fayuan-line);
  background: rgba(245, 240, 230, 0.9);
  backdrop-filter: blur(18px) saturate(115%);
}

.fayuan-header-inner {
  min-height: 78px;
  padding: 10px clamp(18px, 4vw, 56px);
}

.fayuan-brand-lockup { gap: 13px; }

.fayuan-logo img {
  width: auto !important;
  height: 54px !important;
  max-height: 54px;
  object-fit: contain;
}

.fayuan-site-title a {
  color: var(--fayuan-ink);
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-decoration: none;
}

.fayuan-primary-nav {
  color: #3c3933;
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-size: 0.88rem;
}

.fayuan-primary-nav .wp-block-navigation-item__content {
  padding: 8px 10px;
  text-decoration: none;
}

.fayuan-primary-nav .wp-block-navigation-item__content:hover {
  color: var(--fayuan-vermilion);
}

.fayuan-main {
  width: min(100% - 36px, 1120px);
  margin: clamp(50px, 8vw, 110px) auto;
}

.fayuan-content-shell {
  position: relative;
  width: min(100%, 820px);
  padding: clamp(30px, 6vw, 76px);
  border: 1px solid var(--fayuan-line);
  background: rgba(255, 253, 248, 0.92);
  box-shadow: var(--fayuan-shadow);
}

.fayuan-content-shell::before {
  position: absolute;
  top: 0;
  left: clamp(30px, 6vw, 76px);
  width: 76px;
  height: 4px;
  background: var(--fayuan-vermilion);
  content: "";
}

.fayuan-kicker {
  margin: 0 0 16px;
  color: var(--fayuan-vermilion);
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.fayuan-main .wp-block-post-title,
.fayuan-main .wp-block-query-title {
  margin: 0;
  color: var(--fayuan-ink);
  font-size: clamp(2.2rem, 6vw, 4.9rem);
  font-weight: 760;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.fayuan-rule {
  width: 100%;
  margin: 28px 0 36px;
  border-color: var(--fayuan-line);
}

.fayuan-post-meta {
  margin: 12px 0 0;
  color: var(--fayuan-muted);
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-size: 0.82rem;
}

.fayuan-content-shell .wp-block-post-content {
  color: #302e29;
  font-size: clamp(1.03rem, 1.6vw, 1.15rem);
  line-height: 2;
}

.fayuan-content-shell .wp-block-post-content > * + * { margin-top: 1.35em; }

.fayuan-content-shell .wp-block-post-content h2,
.fayuan-content-shell .wp-block-post-content h3 {
  margin-top: 2.1em;
  color: var(--fayuan-ink);
  line-height: 1.35;
}

.fayuan-content-shell .wp-block-post-content a { color: var(--fayuan-vermilion-dark); }

.fayuan-content-shell blockquote {
  margin-inline: 0;
  padding: 4px 0 4px 24px;
  border-left: 3px solid var(--fayuan-vermilion);
  color: #555047;
}

.fayuan-content-shell img {
  border-radius: 2px;
  box-shadow: 0 14px 40px rgba(53, 43, 27, 0.11);
}

.fayuan-back-button { margin-top: 44px; }

.fayuan-back-button .wp-block-button__link {
  border: 1px solid var(--fayuan-ink);
  border-radius: 0;
  background: transparent;
  color: var(--fayuan-ink);
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-size: 0.86rem;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.fayuan-back-button .wp-block-button__link:hover {
  background: var(--fayuan-ink);
  color: var(--fayuan-surface);
  transform: translateY(-2px);
}

.fayuan-post-list {
  width: min(100%, 920px);
  margin-top: 42px;
}

.fayuan-post-list .wp-block-post {
  padding: 28px 0;
  border-top: 1px solid var(--fayuan-line);
}

.fayuan-post-list .wp-block-post-title {
  font-size: clamp(1.45rem, 3vw, 2.45rem);
  letter-spacing: -0.02em;
}

.fayuan-post-list .wp-block-post-title a { text-decoration: none; }
.fayuan-post-list .wp-block-post-title a:hover { color: var(--fayuan-vermilion); }

.fayuan-site-footer {
  margin-top: clamp(70px, 10vw, 140px);
  border-top: 1px solid var(--fayuan-line);
  background: #1f201d;
  color: #efeadf;
}

.fayuan-footer-inner {
  padding: clamp(38px, 7vw, 76px) clamp(20px, 5vw, 72px) 28px;
}

.fayuan-footer-title {
  font-size: clamp(1.7rem, 4vw, 3.3rem);
  letter-spacing: 0.08em;
}

.fayuan-footer-copy {
  max-width: 34rem;
  color: rgba(239, 234, 223, 0.65);
  line-height: 1.8;
}

.fayuan-footer-nav {
  color: rgba(239, 234, 223, 0.82);
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-size: 0.86rem;
}

.fayuan-footer-nav a:hover { color: #fff; }

.fayuan-footer-bottom {
  padding-top: 22px;
  border-top: 1px solid rgba(239, 234, 223, 0.15);
  color: rgba(239, 234, 223, 0.55);
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-size: 0.78rem;
}

.fayuan-footer-bottom a { color: inherit; }
.fayuan-footer-bottom a:hover { color: #fff; }

@media (max-width: 782px) {
  .fayuan-header-inner { min-height: 68px; }
  .fayuan-logo img { height: 46px !important; max-height: 46px; }
  .fayuan-content-shell { padding: 44px 24px; }
  .fayuan-content-shell::before { left: 24px; }
  .fayuan-footer-columns { gap: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}

