/* ===== 基础令牌 ===== */
:root {
  --c-bg: #F5F4F0;
  --c-bg-alt: #E8E6E0;
  --c-white: #FFFFFF;
  --c-ink: #1A1A1A;
  --c-blue: #00E5FF;
  --c-purple: #9B59B6;
  --c-gold: #FFD700;
  --c-red: #E74C3C;
  --c-border: #D1CFC7;
  --c-deep: #34495E;
  --c-muted: #5D6D7E;
  --font-head: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-body: "Noto Serif SC", "Songti SC", SimSun, serif;
  --container: 1180px;
}

/* ===== 重置与排版 ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.8;
  color: var(--c-ink);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--c-gold);
  color: var(--c-ink);
}

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

a {
  color: var(--c-ink);
  text-decoration: none;
  transition: color .2s ease;
}

a:hover {
  color: var(--c-red);
}

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-head);
  line-height: 1.25;
  font-weight: 800;
  color: var(--c-ink);
}

:focus-visible {
  outline: 3px solid var(--c-gold);
  outline-offset: 2px;
}

/* ===== 通用工具 ===== */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: 28px;
  padding-right: 28px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.divider {
  height: 1px;
  background: var(--c-border);
  border: 0;
  margin: 48px 0;
}

/* ===== 无障碍链接 ===== */
.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 999;
  background: var(--c-ink);
  color: var(--c-bg);
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 16px;
  transform: translateY(-200%);
  transition: transform .2s ease;
}

.skip-link:focus {
  transform: none;
  color: #fff;
  outline: 3px solid var(--c-gold);
}

/* ===== 头部 ===== */
.site-header {
  position: relative;
  z-index: 100;
  background: var(--c-bg);
  border-bottom: 1px solid var(--c-border);
  box-shadow: 0 1px 0 var(--c-white), 0 8px 24px rgba(26, 26, 26, .06);
}

.header-ribbon {
  height: 5px;
  background: linear-gradient(
    to right,
    var(--c-red) 0 20%,
    var(--c-gold) 20% 40%,
    var(--c-blue) 40% 60%,
    var(--c-purple) 60% 80%,
    var(--c-deep) 80% 100%
  );
}

.header-wrap {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(300px, .9fr) 1.1fr;
  padding: 0 28px;
}

/* 品牌 */
.header-brand {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 24px 18px 0;
  border-right: 1px solid var(--c-border);
  transition: background-color .2s ease;
}

.header-brand:hover {
  background: var(--c-white);
}

.brand-badge {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  background: var(--c-ink);
  color: var(--c-gold);
  font-family: var(--font-head);
  font-size: 28px;
  font-weight: 900;
  border-radius: 2px;
  box-shadow: 3px 3px 0 var(--c-blue), 6px 6px 0 rgba(26, 26, 26, .15);
  transform: rotate(-3deg);
  transition: transform .25s ease;
}

.header-brand:hover .brand-badge {
  transform: rotate(0deg) translateY(-2px);
}

.brand-text {
  display: block;
  min-width: 0;
}

.brand-name {
  display: block;
  font-family: var(--font-head);
  font-size: 26px;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: .02em;
}

.brand-sub {
  display: block;
  margin-top: 6px;
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .12em;
  color: var(--c-muted);
}

/* 导航块 */
.header-nav-block {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 16px;
  padding: 18px 0 0 28px;
}

.nav-tagline {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 260px;
  min-width: 0;
  font-family: var(--font-head);
  font-size: 12px;
  line-height: 1.5;
  color: var(--c-muted);
  letter-spacing: .02em;
}

.tagline-badge {
  flex: 0 0 auto;
  background: var(--c-blue);
  color: var(--c-ink);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: .1em;
  padding: 5px 8px;
  border-radius: 2px;
}

.tagline-note {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1 1 auto;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 40px;
  padding: 0 10px;
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: 2px;
  cursor: pointer;
}

.nav-toggle-line {
  display: block;
  height: 2px;
  background: var(--c-ink);
  transition: transform .25s ease, opacity .25s ease;
}

.nav-toggle[data-open] .nav-toggle-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[data-open] .nav-toggle-line:nth-child(2) {
  opacity: 0;
}

.nav-toggle[data-open] .nav-toggle-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.site-nav {
  flex-basis: 100%;
  margin-top: 12px;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: block;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 14px;
  line-height: 1.2;
  color: var(--c-ink);
  padding: 12px 16px;
  border-left: 1px solid var(--c-border);
  transition: background-color .2s ease, color .2s ease;
}

.nav-item:first-child .nav-link {
  border-left: 0;
}

.nav-link:hover {
  color: var(--c-red);
}

.nav-link[aria-current="page"] {
  background: var(--c-ink);
  color: var(--c-white);
  box-shadow: inset 0 -2px 0 var(--c-gold);
}

/* ===== 头部响应式 ===== */
@media (max-width: 920px) {
  .header-wrap {
    grid-template-columns: 1fr;
  }

  .header-brand {
    border-right: 0;
    padding-right: 0;
  }

  .header-nav-block {
    padding-left: 0;
    padding-top: 4px;
    border-top: 1px solid var(--c-border);
  }

  .nav-toggle {
    display: flex;
  }

  .site-nav {
    display: none;
    margin-top: 4px;
    padding-bottom: 10px;
  }

  .site-nav[data-open] {
    display: block;
  }

  .nav-list {
    flex-direction: column;
  }

  .nav-link {
    border-left: 0;
    border-bottom: 1px solid var(--c-border);
    padding: 12px 4px;
  }
}

@media (max-width: 600px) {
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .brand-badge {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
    font-size: 24px;
  }

  .brand-name {
    font-size: 20px;
  }

  .brand-sub {
    font-size: 10px;
    letter-spacing: .06em;
  }

  .header-wrap {
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* ===== 页脚 ===== */
.site-footer {
  margin-top: 96px;
  background: var(--c-deep);
  color: rgba(245, 244, 240, .84);
}

.footer-prayer-flags {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 2px;
  height: 52px;
  padding: 6px 0 0;
  background: var(--c-deep);
  overflow: hidden;
}

.footer-prayer-flags::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(255, 255, 255, .5);
}

.prayer-flag {
  display: block;
  width: 34px;
  height: 44px;
  background: var(--c-red);
  clip-path: polygon(0 0, 100% 0, 100% 68%, 62% 100%, 50% 82%, 38% 100%, 0 68%);
}

.flag-gold {
  background: var(--c-gold);
}

.flag-lake {
  background: var(--c-blue);
}

.flag-violet {
  background: var(--c-purple);
}

.flag-ember {
  background: var(--c-red);
}

.footer-main {
  padding-top: 44px;
  padding-bottom: 36px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 36px;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.footer-brand-badge {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  font-family: var(--font-head);
  font-size: 24px;
  font-weight: 900;
  background: var(--c-blue);
  color: var(--c-ink);
  border-radius: 2px;
  box-shadow: 3px 3px 0 rgba(0, 229, 255, .35);
}

.footer-brand-text {
  min-width: 0;
}

.footer-brand-name {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 800;
  color: #fff;
}

.footer-brand-sub {
  font-size: 13px;
  color: rgba(236, 240, 241, .7);
  margin-top: 4px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.footer-heading {
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .12em;
  color: var(--c-gold);
  margin-bottom: 14px;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a,
.footer-contact-line a {
  color: rgba(236, 240, 241, .8);
  font-family: var(--font-head);
  font-size: 14px;
  transition: color .2s ease, padding-left .2s ease;
}

.footer-links a:hover,
.footer-contact-line a:hover {
  color: var(--c-blue);
  padding-left: 4px;
}

.footer-contact-line {
  margin-bottom: 8px;
  font-size: 14px;
  font-family: var(--font-head);
  color: rgba(236, 240, 241, .78);
  line-height: 1.6;
}

.footer-address {
  font-style: normal;
  font-size: 13px;
  color: rgba(236, 240, 241, .6);
  margin-top: 4px;
}

.footer-bar {
  background: rgba(0, 0, 0, .22);
  border-top: 1px solid rgba(255, 255, 255, .06);
}

.footer-bar-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  padding-bottom: 20px;
  font-size: 13px;
  font-family: var(--font-head);
  color: rgba(236, 240, 241, .68);
}

.footer-copyright {
  margin: 0;
}

.footer-icp {
  margin: 0;
  letter-spacing: .02em;
}

@media (max-width: 760px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-main {
    padding-top: 32px;
    padding-bottom: 24px;
  }

  .footer-prayer-flags {
    height: 40px;
  }

  .prayer-flag {
    width: 26px;
    height: 34px;
  }
}

/* ===== 按钮 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 14px 26px;
  border: 0;
  cursor: pointer;
  background: var(--c-ink);
  color: #fff;
  clip-path: polygon(14px 0, 100% 0, calc(100% - 14px) 100%, 0 100%);
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 20px rgba(26, 26, 26, .18);
  color: #fff;
}

.btn-primary {
  background: var(--c-red);
  color: #fff;
}

.btn-primary:hover {
  background: var(--c-ink);
}

.btn-outline {
  background: transparent;
  color: var(--c-ink);
  box-shadow: inset 0 0 0 2px var(--c-ink);
}

.btn-outline:hover {
  color: var(--c-red);
  box-shadow: inset 0 0 0 2px var(--c-red);
}

/* ===== 区块排版 ===== */
.section {
  padding: 56px 0;
}

.section-header {
  margin-bottom: 28px;
}

.section-kicker {
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .16em;
  color: var(--c-red);
  text-transform: uppercase;
}

.section-title {
  font-family: var(--font-head);
  font-size: 32px;
  font-weight: 900;
  margin-top: 6px;
}

.section-desc {
  font-size: 16px;
  color: var(--c-muted);
  max-width: 640px;
  margin-top: 10px;
}

.page-header {
  position: relative;
  background: linear-gradient(135deg, var(--c-white), var(--c-bg-alt));
  border-bottom: 1px solid var(--c-border);
  padding: 56px 0 40px;
  overflow: hidden;
}

.page-header::after {
  content: "";
  position: absolute;
  right: -50px;
  bottom: -50px;
  width: 180px;
  height: 180px;
  border: 2px solid var(--c-border);
  border-radius: 50%;
  opacity: .5;
}

.page-title {
  font-size: 48px;
  font-weight: 900;
  line-height: 1.1;
  margin-top: 8px;
}

.page-excerpt {
  font-size: 17px;
  color: var(--c-muted);
  max-width: 640px;
  margin-top: 14px;
}

.page-meta {
  font-family: var(--font-head);
  font-size: 13px;
  color: var(--c-muted);
  margin-top: 12px;
  letter-spacing: .08em;
}

/* ===== 网格 ===== */
.grid {
  display: grid;
  gap: 24px;
  margin: 24px 0;
}

.grid-cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 900px) {
  .grid-cols-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .grid-cols-2,
  .grid-cols-3 {
    grid-template-columns: 1fr;
  }
}

/* ===== 内容组件 ===== */
.card {
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-top: 3px solid var(--c-blue);
  padding: 26px;
  box-shadow: 0 2px 0 rgba(26, 26, 26, .05);
  transition: transform .2s ease, box-shadow .2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 30px rgba(26, 26, 26, .1);
}

.card-title {
  font-family: var(--font-head);
  font-size: 18px;
  margin-bottom: 8px;
}

.card-text {
  font-size: 15px;
  color: var(--c-muted);
  line-height: 1.7;
}

.plate {
  position: relative;
  background: var(--c-white);
  border: 1px solid var(--c-border);
  padding: 28px 32px;
  box-shadow: 6px 6px 0 var(--c-bg-alt), 10px 10px 0 rgba(26, 26, 26, .04);
}

.plate::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 14px;
  width: 4px;
  height: 36px;
  background: var(--c-red);
}

.tag-label {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  color: var(--c-deep);
  background: var(--c-white);
  border: 1px solid var(--c-border);
  padding: 4px 10px;
  text-transform: uppercase;
}

/* ===== 面包屑 ===== */
.breadcrumbs {
  padding: 18px 0 10px;
  font-family: var(--font-head);
  font-size: 13px;
}

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.breadcrumb-list li + li::before {
  content: "›";
  margin-right: 8px;
  color: var(--c-muted);
}

.breadcrumb-link {
  color: var(--c-muted);
}

.breadcrumb-current {
  font-weight: 600;
  color: var(--c-ink);
}

/* ===== 图像容器 ===== */
.media-frame {
  position: relative;
  background: var(--c-bg-alt);
  border: 1px solid var(--c-border);
  overflow: hidden;
}

.media-frame::before {
  content: "";
  display: block;
  padding-top: 56.25%;
}

.media-frame img,
.media-frame svg,
.media-frame .media-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===== 筛选按钮 ===== */
.filter-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  padding: 8px 16px;
  background: var(--c-white);
  border: 1px solid var(--c-border);
  color: var(--c-ink);
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.filter-button:hover {
  border-color: var(--c-ink);
}

.filter-button[aria-pressed="true"] {
  background: var(--c-ink);
  color: var(--c-white);
  border-color: var(--c-ink);
}

[data-filter-item][hidden] {
  display: none !important;
}

/* ===== 显现动画 ===== */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .6s ease, transform .6s ease;
}

.js [data-reveal][data-revealed] {
  opacity: 1;
  transform: none;
}

/* ===== 减少动态 ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .js [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .btn:hover {
    transform: none;
  }

  .card:hover {
    transform: none;
  }
}
