/* 皇冠体彩CN Site Kit —— 共享样式 /assets/site.css */

/* ===== 1. 设计变量 ===== */
:root {
  --sacred-blue: #1B3A5C;
  --gold: #C99B3F;
  --vermilion: #B23A2E;
  --snow: #F7F5F0;
  --grass: #3E7C4F;
  --rock: #8A8B8A;
  --clay: #C57B4A;
  --oat: #F0E9D8;

  --radius-lg: 28px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --radius-pill: 999px;

  --font-head: "PingFang SC Heavy", "Source Han Sans SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  --font-body: "Source Han Serif SC", "Noto Serif CJK SC", "SimSun", serif;
  --container-max: 1200px;
  --header-height: 76px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ===== 2. Reset 与基础排版 ===== */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.8;
  color: var(--sacred-blue);
  background: var(--snow);
  -webkit-font-smoothing: antialiased;
}

main {
  display: block;
  min-height: 60vh;
}

#main-content {
  scroll-margin-top: calc(var(--header-height) + 20px);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  color: var(--sacred-blue);
  line-height: 1.25;
  margin: 0 0 .6em;
}

p {
  margin: 0 0 1em;
}

ul, ol {
  margin: 0 0 1em;
  padding-left: 1.2em;
}

a {
  color: var(--sacred-blue);
}

::selection {
  background: rgba(201, 155, 63, .35);
  color: var(--sacred-blue);
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ===== 3. 容器与章节分区 ===== */
.container {
  width: min(var(--container-max), 100% - 48px);
  margin-inline: auto;
}

.section {
  padding: clamp(56px, 9vw, 120px) 0;
}

.section--cream {
  background: var(--oat);
}

.section--dark {
  background: var(--sacred-blue);
  color: rgba(247, 245, 240, .86);
}

.section--dark .display-title,
.section--dark .section-heading__title {
  color: var(--snow);
}

.section--dark .display-subtitle,
.section--dark .section-heading__sub {
  color: rgba(247, 245, 240, .72);
}

.section--dark .section-heading__number {
  color: var(--gold);
}

.section--dark .vertical-note {
  color: rgba(247, 245, 240, .55);
}

/* ===== 4. 网格 ===== */
.grid {
  display: grid;
  gap: clamp(16px, 2.4vw, 32px);
}

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

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

.grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 899px) {
  .grid--3, .grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

/* ===== 5. 标题与章节组件 ===== */
.display-title {
  font-family: var(--font-head);
  font-size: clamp(40px, 6.4vw, 72px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -.01em;
  color: var(--sacred-blue);
  margin: 0 0 16px;
}

.display-subtitle {
  font-size: 18px;
  line-height: 1.85;
  color: var(--rock);
  max-width: 56ch;
  margin: 0 0 24px;
}

.vertical-note {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 12px;
  line-height: 1.8;
  letter-spacing: .3em;
  color: var(--rock);
  margin: 0;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 32px;
}

.section-heading__number {
  font-family: var(--font-head);
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 900;
  line-height: 1;
  color: var(--gold);
  flex-shrink: 0;
}

.section-heading__text {
  flex: 1;
}

.section-heading__title {
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 900;
  line-height: 1.2;
  margin: 0 0 4px;
}

.section-heading__sub {
  font-size: 14px;
  letter-spacing: .08em;
  color: var(--rock);
  margin: 0;
}

.chapter {
  scroll-margin-top: calc(var(--header-height) + 24px);
}

.chapter__number {
  font-family: var(--font-head);
  font-size: clamp(56px, 9vw, 96px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.02em;
  color: rgba(201, 155, 63, .22);
  user-select: none;
  margin: 0 0 8px;
}

.prose {
  max-width: 72ch;
  font-size: 17px;
  line-height: 1.9;
  color: rgba(27, 58, 92, .92);
}

.prose h2,
.prose h3 {
  font-family: var(--font-head);
  color: var(--sacred-blue);
}

.prose a {
  color: var(--vermilion);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ===== 6. 卡片与按钮 ===== */
.card {
  background: var(--snow);
  border: 1px solid rgba(27, 58, 92, .06);
  border-radius: var(--radius-lg) var(--radius-lg) var(--radius-lg) 8px;
  padding: clamp(20px, 3vw, 32px);
  box-shadow: 0 4px 14px rgba(27, 58, 92, .04);
}

.card--cream {
  background: var(--oat);
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .card {
    transition: transform .3s var(--ease), box-shadow .3s var(--ease);
  }

  .card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 32px rgba(27, 58, 92, .10);
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border: 2px solid transparent;
  border-radius: var(--radius-pill);
  background: transparent;
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background-color .25s var(--ease), color .25s var(--ease);
}

.btn--primary {
  background: var(--vermilion);
  color: var(--snow);
}

.btn--primary:hover {
  background: #9f3328;
  box-shadow: 0 12px 24px rgba(178, 58, 46, .28);
}

.btn--gold {
  background: var(--gold);
  color: var(--sacred-blue);
}

.btn--gold:hover {
  box-shadow: 0 12px 24px rgba(201, 155, 63, .32);
}

.btn--ghost {
  border-color: var(--sacred-blue);
  color: var(--sacred-blue);
}

.btn--ghost:hover {
  background: rgba(27, 58, 92, .06);
}

.section--dark .btn--ghost {
  border-color: var(--snow);
  color: var(--snow);
}

.section--dark .btn--ghost:hover {
  background: rgba(247, 245, 240, .1);
}

.btn:active {
  transform: scale(.97);
}

/* ===== 7. 标签、链接与面包屑 ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .02em;
}

.badge--gold {
  background: rgba(201, 155, 63, .14);
  color: #8f6b24;
}

.badge--red {
  background: rgba(178, 58, 46, .1);
  color: var(--vermilion);
}

.badge--green {
  background: rgba(62, 124, 79, .12);
  color: var(--grass);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 700;
  color: var(--vermilion);
  text-decoration: none;
}

.link-arrow::after {
  content: "→";
  transition: transform .25s var(--ease);
}

.link-arrow:hover::after {
  transform: translateX(5px);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  font-size: 14px;
  color: var(--rock);
  margin: 0 0 28px;
}

.breadcrumbs a {
  color: var(--sacred-blue);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--vermilion);
}

.breadcrumbs__sep {
  color: var(--gold);
}

/* ===== 8. 图片容器 ===== */
.image-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg) var(--radius-lg) var(--radius-lg) 8px;
  background: linear-gradient(140deg, var(--oat), var(--snow));
  border: 1px solid rgba(27, 58, 92, .08);
}

.image-frame--wide {
  aspect-ratio: 16 / 9;
}

.image-frame--square {
  aspect-ratio: 1 / 1;
}

.image-frame--tilt {
  transform: rotate(-1.2deg);
}

.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-frame__caption {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  max-width: calc(100% - 28px);
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: rgba(27, 58, 92, .72);
  color: var(--snow);
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .02em;
  backdrop-filter: blur(6px);
}

/* ===== 9. 经幡装饰与信任条 ===== */
.prayer-flag {
  display: inline-flex;
  align-items: flex-start;
  gap: 6px;
}

.prayer-flag__item {
  display: block;
  width: 10px;
  border-radius: 4px;
}

.prayer-flag__item:nth-child(1) {
  height: 22px;
  background: var(--sacred-blue);
}

.prayer-flag__item:nth-child(2) {
  height: 28px;
  background: var(--gold);
}

.prayer-flag__item:nth-child(3) {
  height: 20px;
  background: var(--vermilion);
}

.prayer-flag__item:nth-child(4) {
  height: 26px;
  background: var(--grass);
}

.trust-note {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: 1px solid rgba(27, 58, 92, .08);
  border-radius: var(--radius-md);
  background: var(--snow);
  font-size: 13px;
  color: var(--rock);
}

.trust-note::before {
  content: "◎";
  color: var(--grass);
  font-size: 16px;
  line-height: 1;
}

/* ===== 10. 页头 ===== */
.skip-link {
  position: fixed;
  top: -120px;
  left: 16px;
  z-index: 3000;
  padding: 12px 20px;
  background: var(--sacred-blue);
  color: var(--snow);
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  transition: top .25s var(--ease);
}

.skip-link:focus {
  top: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--snow);
  border-bottom: 1px solid rgba(27, 58, 92, .06);
  transition: box-shadow .3s var(--ease);
}

.site-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--sacred-blue) 0 25%, var(--gold) 25% 50%, var(--vermilion) 50% 75%, var(--grass) 75% 100%);
  z-index: 6;
  pointer-events: none;
}

.site-header.is-scrolled {
  box-shadow: 0 12px 32px rgba(27, 58, 92, .10);
  border-bottom-color: rgba(27, 58, 92, 0);
}

.site-header__progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 4px;
  width: 0;
  background: linear-gradient(90deg, var(--gold), var(--vermilion));
  z-index: 7;
  pointer-events: none;
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 24px);
  min-height: var(--header-height);
}

/* 品牌标志 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}

.brand__mark {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 14px 14px 14px 4px;
  background: linear-gradient(135deg, #d9b25c, var(--gold));
  color: var(--sacred-blue);
  font-family: var(--font-head);
  font-size: 19px;
  font-weight: 900;
  box-shadow: 0 4px 10px rgba(201, 155, 63, .35);
  transform: rotate(-3deg);
}

.brand__mark::after {
  content: "";
  position: absolute;
  right: 3px;
  bottom: 3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--vermilion);
  border: 2px solid var(--snow);
}

.brand__text {
  display: grid;
}

.brand__name {
  display: block;
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: .02em;
  color: var(--sacred-blue);
}

.brand__domain {
  display: block;
  font-size: 10px;
  line-height: 1.4;
  letter-spacing: .16em;
  color: var(--rock);
}

/* 导航 */
.site-nav {
  margin-left: auto;
  margin-right: auto;
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.site-nav__link {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.3;
  color: var(--sacred-blue);
  text-decoration: none;
  white-space: nowrap;
}

.site-nav__link::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 5px;
  height: 2px;
  border-radius: 2px;
  background: var(--vermilion);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .3s var(--ease);
}

.site-nav__link:hover {
  color: var(--sacred-blue);
}

.site-nav__link:hover::after,
.site-nav__link[aria-current="page"]::after {
  transform: scaleX(1);
}

.site-nav__link[aria-current="page"] {
  color: var(--vermilion);
}

.site-nav__num {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  color: var(--gold);
}

.site-nav__label {
  display: inline-block;
}

/* 页头右侧 */
.site-header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.update-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(62, 124, 79, .28);
  background: rgba(62, 124, 79, .08);
  color: var(--grass);
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .02em;
  white-space: nowrap;
}

.update-pill__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--grass);
  animation: pulse 2.2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(62, 124, 79, .35);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(62, 124, 79, 0);
  }
}

/* 移动导航按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid rgba(27, 58, 92, .12);
  border-radius: 14px 14px 14px 4px;
  background: var(--snow);
  color: var(--sacred-blue);
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.nav-toggle:active {
  transform: scale(.96);
}

.nav-toggle__icon {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle__bar {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--sacred-blue);
  transition: transform .3s var(--ease);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:first-child {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:last-child {
  transform: translateY(-6px) rotate(-45deg);
}

/* ===== 11. 页头响应式 ===== */
@media (max-width: 1023px) {
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin: 0;
    padding: 0 24px 20px;
    background: var(--snow);
    border-top: 1px solid rgba(27, 58, 92, .06);
    box-shadow: 0 24px 48px rgba(27, 58, 92, .12);
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  html.js .site-nav {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    pointer-events: none;
    transition: transform .3s var(--ease), opacity .3s var(--ease), visibility .3s;
  }

  html.js .site-nav[data-open] {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
  }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 4px 0 0;
  }

  .site-nav__item {
    border-bottom: 1px solid rgba(27, 58, 92, .05);
  }

  .site-nav__item:last-child {
    border-bottom: none;
  }

  .site-nav__link {
    justify-content: space-between;
    border-radius: 0;
    padding: 14px 4px;
    font-size: 16px;
  }

  .site-nav__link::after {
    display: none;
  }

  .site-nav__link[aria-current="page"] {
    color: var(--vermilion);
    background: rgba(178, 58, 46, .06);
    border-radius: var(--radius-md);
  }

  .nav-toggle {
    display: inline-flex;
  }
}

@media (max-width: 520px) {
  .brand__domain {
    display: none;
  }

  .update-pill {
    padding: 6px 10px;
  }

  .update-pill__text {
    display: none;
  }

  .nav-toggle__label {
    display: none;
  }
}

/* ===== 12. 页脚 ===== */
.site-footer {
  position: relative;
  overflow: hidden;
  background: var(--sacred-blue);
  color: rgba(247, 245, 240, .82);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--sacred-blue) 0 20%, var(--snow) 20% 40%, var(--vermilion) 40% 60%, var(--grass) 60% 80%, var(--gold) 80% 100%);
  z-index: 1;
}

.site-footer::after {
  content: "";
  position: absolute;
  right: -140px;
  top: -120px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 155, 63, .14) 0%, rgba(201, 155, 63, 0) 70%);
  z-index: 0;
  pointer-events: none;
}

.site-footer__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.1fr 1.2fr;
  gap: clamp(28px, 4vw, 64px);
  padding: clamp(56px, 8vw, 88px) 0 56px;
}

.site-footer__col--brand {
  display: grid;
  gap: 16px;
  align-content: start;
}

.site-footer__title {
  margin: 0 0 18px;
  padding-bottom: 10px;
  position: relative;
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .16em;
  color: var(--gold);
}

.site-footer__title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 26px;
  height: 2px;
  border-radius: 2px;
  background: var(--vermilion);
}

.site-footer__desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.9;
  color: rgba(247, 245, 240, .72);
}

.site-footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.site-footer__links a {
  color: rgba(247, 245, 240, .82);
  text-decoration: none;
  font-size: 15px;
  transition: color .2s var(--ease);
}

.site-footer__links a:hover {
  color: var(--gold);
}

.site-footer__contact {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.site-footer__contact li {
  display: grid;
  gap: 2px;
}

.site-footer__contact-label {
  font-size: 12px;
  letter-spacing: .12em;
  color: rgba(247, 245, 240, .4);
}

.site-footer__contact-value {
  font-size: 15px;
  color: var(--snow);
  word-break: break-all;
}

.site-footer__note {
  margin: 18px 0 0;
  font-size: 13px;
  line-height: 1.7;
  color: rgba(247, 245, 240, .5);
}

.site-footer .brand__name {
  color: var(--snow);
}

.site-footer .brand__domain {
  color: rgba(247, 245, 240, .5);
}

.site-footer .update-pill {
  border-color: rgba(62, 124, 79, .5);
  background: rgba(62, 124, 79, .22);
  color: var(--snow);
}

.site-footer__bottom {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(247, 245, 240, .1);
  padding: 20px 0;
}

.site-footer__bottom-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  font-size: 13px;
  color: rgba(247, 245, 240, .55);
}

.site-footer__bottom-inner p {
  margin: 0;
}

/* ===== 13. 页脚响应式 ===== */
@media (max-width: 899px) {
  .site-footer__inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 599px) {
  .site-footer__inner {
    grid-template-columns: 1fr;
  }
}

/* ===== 14. 动效降级 ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
