/* ============ 基础与变量 ============ */
:root {
  --bg: #f7f1e6;
  --bg-soft: #faf5ec;
  --bg-elev: #efe8da;
  --bg-card: #e8e0d0;
  --fg: #1a1612;
  --fg-strong: #0d0b09;
  --fg-dim: #5c5246;
  --fg-muted: #9a8f7f;
  --accent: #8b5a2b;
  --accent-soft: #a67c52;
  --border: rgba(26, 22, 18, 0.1);
  --border-strong: rgba(26, 22, 18, 0.18);
  --header-h: clamp(56px, 8vw, 72px);
  --section-pad-y: clamp(28px, 5vw, 48px);
  --section-pad-x: clamp(20px, 5vw, 48px);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: clamp(14px, 1.6vw, 17px);
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans SC', 'Playfair Display', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg);
  color: var(--fg);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(ellipse at 20% 30%, rgba(180, 140, 90, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(160, 120, 70, 0.05) 0%, transparent 50%),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)' opacity='0.08'/%3E%3C/svg%3E");
  background-size: auto, auto, 400px 400px;
}

.header, main, .footer {
  position: relative;
  z-index: 1;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* ============ 顶部导航 ============ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--section-pad-x);
  background: rgba(247, 241, 230, 0.82);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}

.logo {
  font-family: 'Noto Serif SC', 'Playfair Display', serif;
  font-size: clamp(1.15rem, 2.5vw, 1.5rem);
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--fg-strong);
  display: flex;
  align-items: baseline;
  gap: 0.4em;
}

.logo .en {
  font-family: 'Playfair Display', serif;
  font-size: 0.58em;
  font-weight: 400;
  font-style: italic;
  color: var(--accent);
  letter-spacing: 0.18em;
}

.header-nav {
  display: none;
  align-items: center;
  gap: clamp(20px, 3vw, 36px);
}

.header-nav a {
  font-family: 'Noto Serif SC', serif;
  font-size: clamp(0.78rem, 1.2vw, 0.9rem);
  color: var(--fg-dim);
  transition: color 0.3s ease;
  font-weight: 500;
  letter-spacing: 0.08em;
  position: relative;
}

.header-nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.header-nav a:hover {
  color: var(--accent);
}

.header-nav a:hover::after {
  width: 100%;
}

@media (min-width: 768px) {
  .header-nav {
    display: flex;
  }
}

main {
  padding-top: var(--header-h);
}

/* ============ 栏目 ============ */
.section {
  padding: var(--section-pad-y) 0;
  border-bottom: 1px solid var(--border);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--section-pad-x);
  margin-bottom: clamp(16px, 3vw, 28px);
}

.section-title-wrap {
  display: flex;
  align-items: baseline;
  gap: clamp(8px, 1.5vw, 14px);
}

.section-num {
  font-family: 'Playfair Display', serif;
  font-size: clamp(0.72rem, 1.1vw, 0.85rem);
  color: var(--accent);
  letter-spacing: 0.15em;
  font-weight: 500;
  font-style: italic;
}

.section-title {
  font-family: 'Noto Serif SC', 'Playfair Display', serif;
  font-size: clamp(1.1rem, 2.6vw, 1.65rem);
  font-weight: 600;
  color: var(--fg-strong);
  letter-spacing: 0.1em;
}

.section-title-en {
  font-family: 'Playfair Display', serif;
  font-size: clamp(0.72rem, 1.1vw, 0.85rem);
  color: var(--fg-muted);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-style: italic;
  font-weight: 400;
}

.more-link {
  font-family: 'Noto Serif SC', serif;
  font-size: clamp(0.72rem, 1.1vw, 0.85rem);
  color: var(--fg-dim);
  letter-spacing: 0.12em;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.3s ease, gap 0.3s ease;
  padding: 6px 0;
  font-weight: 500;
}

.more-link:hover {
  color: var(--accent);
  gap: 10px;
}

.more-link svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
}

/* ============ 幻灯片容器 ============ */
.rail {
  position: relative;
  width: 100%;
}

.rail-scroll {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 2px;
  background: var(--bg-card);
}

/* PC端：图片宽度60%，居中；允许箭头溢出 */
@media (min-width: 768px) {
  .rail-scroll {
    width: 60vw;
    max-width: 960px;
    margin: 0 auto;
    overflow: visible;
  }
}

.card {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
  pointer-events: none;
  cursor: pointer;
  border-radius: 2px;
  overflow: hidden;
}

.card.active {
  opacity: 1;
  pointer-events: auto;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.92) contrast(1.02);
}

.card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.card:hover .card-overlay {
  opacity: 1;
}

.card-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: clamp(12px, 2vw, 18px);
  transform: translateY(6px);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.3s ease;
  pointer-events: none;
}

.card:hover .card-info {
  transform: translateY(0);
  opacity: 1;
}

.card-title {
  font-family: 'Noto Serif SC', serif;
  font-size: clamp(0.85rem, 1.4vw, 1rem);
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
  letter-spacing: 0.04em;
}

.card-meta {
  font-family: 'Playfair Display', serif;
  font-size: clamp(0.68rem, 1vw, 0.78rem);
  color: rgba(255,255,255,0.75);
  letter-spacing: 0.08em;
  font-style: italic;
}

/* ============ 左右箭头（手机端：底部，半透明无圆圈） ============ */
.rail-arrows {
  position: absolute;
  bottom: clamp(14px, 3vw, 24px);
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 clamp(16px, 4vw, 32px);
  pointer-events: none;
  z-index: 10;
}

.rail-btn {
  pointer-events: all;
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.55);
  transition: color 0.3s ease, transform 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rail-btn:hover {
  color: rgba(255, 255, 255, 0.9);
  transform: scale(1.15);
}

.rail-btn:active {
  transform: scale(0.92);
}

.rail-btn svg {
  width: clamp(22px, 4vw, 28px);
  height: clamp(22px, 4vw, 28px);
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* PC端：箭头移到图片区域外面左右两侧，深色 */
@media (min-width: 768px) {
  .rail-arrows {
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
    padding: 0;
  }
  .rail-btn {
    position: absolute;
    color: var(--fg-muted);
  }
  .rail-btn[data-dir="prev"] {
    left: clamp(-48px, -6vw, -36px);
  }
  .rail-btn[data-dir="next"] {
    right: clamp(-48px, -6vw, -36px);
  }
  .rail-btn:hover {
    color: var(--accent);
  }
}

/* ============ 导航点 ============ */
.dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding-top: clamp(12px, 2vw, 20px);
  padding-bottom: 4px;
}

.dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--fg-muted);
  opacity: 0.5;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  padding: 0;
}

.dot.active {
  opacity: 1;
  background: var(--accent);
  width: 20px;
  border-radius: 3px;
}

.dot:hover:not(.active) {
  opacity: 0.8;
}

/* ============ 页脚 ============ */
.footer {
  padding: clamp(24px, 5vw, 40px) var(--section-pad-x);
  text-align: center;
  color: var(--fg-muted);
  font-size: clamp(0.68rem, 1vw, 0.8rem);
  letter-spacing: 0.1em;
}

.footer a {
  transition: color 0.3s ease;
}

.footer a:hover {
  color: var(--accent);
}

.footer-sep {
  margin: 0 8px;
  opacity: 0.4;
}

/* ============ 动画 ============ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section {
  animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.section:nth-child(1) { animation-delay: 0.1s; }
.section:nth-child(2) { animation-delay: 0.2s; }
.section:nth-child(3) { animation-delay: 0.3s; }

.footer{
    text-align: center;
    width:100%;
}
.visit-counter b{
    font-family: "Consolas", monospace;
    letter-spacing:3px;
    /*固定7位宽度，数字变化不会左右晃动*/
    min-width: 98px;
    display: inline‑block;
    text-align:center;
}
