@import url('https://fonts.googleapis.com/css2?family=Cormorant+Infant:wght@300;400;500;600;700&family=Great+Vibes&display=swap');

/* ===== 基础重置 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background: #0f1a0f;
  color: #e8dcc8;
}

body {
  font-family: 'Cormorant Infant', 'Noto Serif SC', 'Source Han Serif CN', Georgia, serif;
  font-size: 1.05rem;
  line-height: 1.75;
  background: #0f1a0f;
  color: #e8dcc8;
  overflow-x: hidden;
}

/* ===== 颜色变量 ===== */
:root {
  --green: #1a2e1a;
  --green-deep: #0f1a0f;
  --green-mid: #243824;
  --red: #c0392b;
  --red-light: #e74c3c;
  --gold: #d4af37;
  --gold-dim: #a8882a;
  --cream: #e8dcc8;
  --cream-dim: #c9bba5;
  --border: #d4af3740;
  --border-solid: #d4af3780;
  --sticky-top: 56px;
}

/* ===== 链接 ===== */
a { color: #d4af37; text-decoration: none; transition: color .2s; }
a:hover { color: #e8dcc8; }

/* ===== 滚动补偿（吸顶条） ===== */
section[id] { scroll-margin-top: calc(var(--sticky-top) + 48px); }

/* ===================== HEADER ===================== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: #0f1a0fee;
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-solid);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .55rem 1.5rem;
  gap: 1rem;
}

.logo-mark {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  color: var(--gold);
}

.logo-img { height: 36px; width: auto; }

.logo-text-icon {
  font-family: 'Great Vibes', cursive;
  font-size: 2rem;
  color: var(--gold);
  line-height: 1;
  display: block;
}

/* 搜索框 */
.header-search {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-solid);
  border-radius: 4px;
  overflow: hidden;
  max-width: 240px;
  width: 100%;
}

.search-input {
  background: transparent;
  border: none;
  color: var(--cream);
  font-family: inherit;
  font-size: .9rem;
  padding: .4rem .75rem;
  width: 100%;
  outline: none;
}

.search-input::placeholder { color: var(--cream-dim); opacity: .7; }

.search-btn {
  background: var(--green-mid);
  border: none;
  color: var(--gold);
  font-size: 1.1rem;
  padding: .4rem .65rem;
  cursor: pointer;
  transition: background .2s;
  min-height: 40px;
}

.search-btn:hover { background: var(--red); color: #fff; }

/* 主导航 */
.main-nav {
  background: var(--green);
  border-top: 1px solid var(--border);
  padding: 0 1.5rem;
}

.nav-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 0;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  color: var(--cream-dim);
  font-size: .88rem;
  letter-spacing: .04em;
  padding: .55rem .85rem;
  min-height: 40px;
  transition: color .2s, background .2s;
  border-right: 1px solid var(--border);
  text-transform: none;
}

.nav-link:first-child { border-left: 1px solid var(--border); }

.nav-link:hover {
  color: var(--gold);
  background: var(--green-mid);
}

.nav-icon {
  font-size: .75rem;
  color: var(--red);
  opacity: .8;
}

/* ===================== 吸顶锚点条 ===================== */
.sticky-anchor {
  position: sticky;
  top: 0;
  z-index: 90;
  background: var(--green-deep);
  border-bottom: 2px solid var(--gold);
}

.anchor-nav { padding: 0 1.5rem; }

.anchor-row {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 0;
  margin: 0;
  scrollbar-width: none;
}
.anchor-row::-webkit-scrollbar { display: none; }

.anchor-link {
  display: inline-block;
  color: var(--cream-dim);
  font-size: .8rem;
  letter-spacing: .05em;
  padding: .55rem .7rem;
  min-height: 40px;
  white-space: nowrap;
  transition: color .2s;
  border-right: 1px solid var(--border);
}

.anchor-link:hover { color: var(--gold); }

/* ===================== HERO ===================== */
.hero-section {
  position: relative;
  min-height: 45vh;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: calc(var(--sticky-top) + 56px + 2rem) 2rem 4rem;
  overflow: hidden;
  background:
    linear-gradient(135deg, var(--green-deep) 55%, #1e0a08 100%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 2rem;
  max-width: 900px;
  width: 100%;
  justify-content: flex-end;
}

.hero-deco {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  flex-shrink: 0;
}

.deco-kunai {
  font-size: 2.5rem;
  color: var(--red);
  animation: pulse-kunai 2.5s ease-in-out infinite;
  display: block;
}

.deco-seal {
  font-family: 'Great Vibes', cursive;
  font-size: 3.5rem;
  color: var(--gold);
  opacity: .6;
  display: block;
  line-height: 1;
  animation: float-seal 3s ease-in-out infinite;
}

@keyframes pulse-kunai {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.15); opacity: .7; }
}

@keyframes float-seal {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.hero-text-block {
  text-align: right;
  max-width: 580px;
}

.hero-eyebrow {
  font-size: .8rem;
  letter-spacing: .18em;
  color: var(--red);
  text-transform: uppercase;
  margin-bottom: .5rem;
  font-family: 'Cormorant Infant', serif;
  font-weight: 500;
}

.hero-h1 {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  line-height: 1.1;
  color: var(--gold);
  margin-bottom: .75rem;
  /* Kinetic: gradient text */
  background: linear-gradient(120deg, var(--gold) 0%, #f5e27a 50%, var(--gold-dim) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer-text 4s linear infinite;
  background-size: 200% 100%;
}

@keyframes shimmer-text {
  0% { background-position: 200% center; }
  100% { background-position: -200% center; }
}

.hero-sub {
  font-size: 1rem;
  color: var(--cream-dim);
  line-height: 1.7;
  margin-bottom: 1.25rem;
  font-weight: 300;
}

.hero-cta {
  display: inline-block;
  background: var(--red);
  color: #fff;
  font-size: .95rem;
  letter-spacing: .06em;
  padding: .7rem 1.75rem;
  border-radius: 4px;
  min-height: 44px;
  line-height: 2;
  border: 1px solid var(--red-light);
  transition: background .2s, transform .15s;
  font-family: 'Cormorant Infant', serif;
  font-weight: 600;
}

.hero-cta:hover {
  background: var(--red-light);
  color: #fff;
  transform: translateX(-3px);
}

/* 斜切色带 */
.hero-slash {
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 60px;
  background: var(--green-deep);
  clip-path: polygon(0 100%, 100% 0, 100% 100%);
  z-index: 3;
}

/* ===================== MAIN ===================== */
.site-main {
  padding: 2rem 0 4rem;
  min-height: 60vh;
}

.content-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2.5rem;
  align-items: start;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* aside 在左 */
.sidebar {
  position: sticky;
  top: calc(var(--sticky-top) + 48px + 1rem);
}

.sidebar-inner {
  border: 1px solid var(--border-solid);
  border-radius: 4px;
  padding: 1.25rem 1rem;
  background: var(--green);
}

.aside-eyebrow {
  display: block;
  font-size: .72rem;
  letter-spacing: .15em;
  color: var(--red);
  margin-bottom: .4rem;
  font-weight: 500;
}

.sidebar-title {
  font-family: 'Cormorant Infant', serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: .5rem;
}

.sidebar-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .1rem;
}

.sidebar-link {
  display: block;
  color: var(--cream-dim);
  font-size: .88rem;
  padding: .4rem .25rem;
  min-height: 40px;
  line-height: 2.2;
  transition: color .2s, padding-left .2s;
}

.sidebar-link:hover {
  color: var(--gold);
  padding-left: .5rem;
}

.sidebar-badge {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .8rem;
  color: var(--cream-dim);
  border-top: 1px solid var(--border);
  padding-top: .75rem;
}

.badge-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--red);
  animation: blink-dot 1.4s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes blink-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: .2; }
}

/* 主内容区 */
.main-content {
  min-width: 0;
}

.page-article {
  color: var(--cream);
}

/* ===== 正文内部样式（page.content 插入后生效） ===== */
.page-article h2 {
  font-family: 'Cormorant Infant', serif;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 600;
  color: var(--gold);
  margin: 2.5rem 0 .75rem;
  padding-bottom: .4rem;
  border-bottom: 1px solid var(--border-solid);
  position: relative;
}

.page-article h2::before {
  content: '';
  position: absolute;
  left: 0; bottom: -1px;
  width: 48px; height: 2px;
  background: var(--red);
}

.page-article h3 {
  font-family: 'Cormorant Infant', serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--cream);
  margin: 1.75rem 0 .5rem;
}

.page-article p {
  margin-bottom: 1rem;
  font-size: 1.05rem;
  line-height: 1.85;
}

.page-article ul, .page-article ol {
  margin: .75rem 0 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.page-article li { line-height: 1.7; }

.page-article a {
  color: var(--gold);
  border-bottom: 1px solid var(--border-solid);
  transition: color .2s, border-color .2s;
}

.page-article a:hover { color: var(--cream); border-color: var(--cream); }

.page-article strong { color: var(--gold); font-weight: 600; }

.page-article blockquote {
  border-left: 3px solid var(--red);
  margin: 1.5rem 0;
  padding: .75rem 1.25rem;
  background: var(--green);
  border-radius: 0 4px 4px 0;
  font-style: italic;
  color: var(--cream-dim);
}

.page-article section {
  margin-bottom: 3rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
}

.page-article section:last-child { border-bottom: none; }

/* small 眉题 (build 补) */
.page-article small {
  display: block;
  font-size: .72rem;
  letter-spacing: .14em;
  color: var(--red);
  margin-bottom: .4rem;
  font-weight: 500;
  font-family: 'Cormorant Infant', serif;
}

/* ===================== FOOTER ===================== */
.site-footer {
  background: var(--green);
  border-top: 2px solid var(--gold);
  padding: 3rem 1.5rem 1.5rem;
  text-align: center;
}

.footer-cta-block {
  background: linear-gradient(135deg, var(--red) 0%, #8b1a13 100%);
  border-radius: 4px;
  padding: 2rem 1.5rem;
  margin-bottom: 2rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.footer-cta-text {
  font-family: 'Cormorant Infant', serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.footer-cta-btn {
  display: inline-block;
  background: var(--gold);
  color: var(--green-deep);
  font-family: 'Cormorant Infant', serif;
  font-weight: 700;
  font-size: 1rem;
  padding: .65rem 2rem;
  border-radius: 4px;
  min-height: 44px;
  line-height: 2;
  letter-spacing: .05em;
  transition: background .2s;
}

.footer-cta-btn:hover { background: #f5e27a; color: var(--green-deep); }

.footer-copy {
  font-size: .82rem;
  color: var(--cream-dim);
  line-height: 1.6;
  margin-bottom: .5rem;
}

.footer-note {
  display: block;
  font-size: .75rem;
  color: #9a8e7a;
  line-height: 1.6;
}

/* ===================== KINETIC 动效 ===================== */
.kinetic-reveal,
.kinetic-reveal-delay,
.kinetic-title {
  opacity: 0;
  transform: translateY(18px);
  animation: kinetic-in .7s ease forwards;
}

.kinetic-title { animation-delay: .1s; }
.kinetic-reveal { animation-delay: 0s; }
.kinetic-reveal-delay { animation-delay: .25s; }

@keyframes kinetic-in {
  to { opacity: 1; transform: translateY(0); }
}

/* Scroll reveal */
.scroll-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .55s ease, transform .55s ease;
}
.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Parallax */
.parallax-el {
  will-change: transform;
}

/* prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .kinetic-reveal,
  .kinetic-reveal-delay,
  .kinetic-title {
    opacity: 1;
    transform: none;
  }
  .scroll-reveal { opacity: 1; transform: none; }
  .hero-h1 {
    background: none;
    -webkit-text-fill-color: var(--gold);
    color: var(--gold);
  }
}

/* ===================== 响应式 ===================== */
@media (max-width: 900px) {
  .content-grid {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: static;
    order: -1;
  }
  .sidebar-list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: .25rem;
  }
  .sidebar-link {
    min-height: 40px;
    padding: .35rem .6rem;
    line-height: 1.6;
  }
}

@media (max-width: 640px) {
  .header-inner { padding: .4rem 1rem; }
  .main-nav { padding: 0 .5rem; }
  .nav-link { padding: .5rem .55rem; font-size: .8rem; }
  .anchor-link { padding: .5rem .5rem; font-size: .75rem; }
  .anchor-nav { padding: 0 .5rem; }

  .hero-section { padding: calc(var(--sticky-top) + 56px + 1rem) 1rem 3rem; }
  .hero-inner { flex-direction: column; align-items: flex-end; gap: 1rem; }
  .hero-deco { flex-direction: row; gap: .75rem; }
  .deco-seal { font-size: 2.5rem; }
  .deco-kunai { font-size: 2rem; }

  .content-grid { padding: 0 1rem; gap: 1.5rem; }

  .site-footer { padding: 2rem 1rem 1.5rem; }
  .header-search { display: none; }
}

@media (max-width: 375px) {
  .nav-link { padding: .5rem .4rem; font-size: .75rem; }
  .hero-h1 { font-size: 2.4rem; }
}

/* ===================== WRAP util ===================== */
.wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

button[aria-expanded]{min-width:44px;min-height:44px}
