/* ============================================================
   EARTH PINS · 地球拼图
   旅行相册站点全局样式
   ============================================================ */

:root {
  /* 品牌色：夜空蓝 + 图钉金 */
  --night-1: #0b1220;
  --night-2: #0e1a2b;
  --night-3: #14263c;
  --gold: #e8b64c;
  --gold-deep: #c99633;
  --paper: #f5f1e8;
  --paper-dim: #e9e2d3;
  --ink: #22303f;
  --ink-soft: #5a6b7c;
  /* 九寨沟点缀：青蓝水色 */
  --jzg-aqua: #2f9e8f;
  --jzg-mist: #9fd8cc;
  --jzg-sky: #4a90b8;

  --serif: "Songti SC", "STSong", "Noto Serif SC", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --radius: 14px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ---------- 顶栏 ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  color: #fff;
  mix-blend-mode: normal;
  transition: background .35s var(--ease), padding .35s var(--ease);
}

.site-header--solid {
  background: rgba(11, 18, 32, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
}
.brand-mark {
  font-size: 22px;
  line-height: 1;
  color: var(--gold);
  text-shadow: 0 0 14px rgba(232, 182, 76, 0.5);
}
.brand-text { font-size: 14px; }
.brand-text em {
  font-style: normal;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.75);
  margin-left: 4px;
  letter-spacing: 0.18em;
}

.site-nav { display: flex; gap: 26px; }
.site-nav a {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color .25s, border-color .25s;
}
.site-nav a:hover { color: var(--gold); border-color: var(--gold); }

/* ---------- 通用小元素 ---------- */
.eyebrow {
  font-size: 12px;
  letter-spacing: 0.35em;
  color: var(--gold);
  text-transform: uppercase;
}

/* ---------- HERO 主页 ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  overflow: hidden;
  background: radial-gradient(120% 90% at 50% 0%, var(--night-3) 0%, var(--night-2) 45%, var(--night-1) 100%);
}

/* 星星微光 */
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    radial-gradient(1px 1px at 18% 22%, rgba(255,255,255,.55) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 68% 12%, rgba(255,255,255,.5) 50%, transparent 51%),
    radial-gradient(1px 1px at 82% 38%, rgba(255,255,255,.4) 50%, transparent 51%),
    radial-gradient(1px 1px at 38% 68%, rgba(255,255,255,.3) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 8% 74%, rgba(255,255,255,.35) 50%, transparent 51%),
    radial-gradient(1px 1px at 92% 82%, rgba(255,255,255,.3) 50%, transparent 51%),
    radial-gradient(1px 1px at 55% 8%, rgba(255,255,255,.45) 50%, transparent 51%);
  pointer-events: none;
}

.hero-earth {
  position: relative;
  width: min(300px, 55vw);
  margin-bottom: 26px;
}
.globe { width: 100%; height: auto; }
.pin { animation: pin-bob 3.2s ease-in-out infinite; transform-origin: 100px 100px; }
@keyframes pin-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

.hero-title {
  font-family: var(--serif);
  font-size: clamp(44px, 8vw, 84px);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-indent: 0.16em;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.45);
}
.hero-sub {
  margin-top: 6px;
  font-size: clamp(13px, 2vw, 18px);
  letter-spacing: 0.5em;
  text-indent: 0.5em;
  color: rgba(255, 255, 255, 0.75);
}
.hero-copy {
  margin-top: 26px;
  font-size: clamp(14px, 2vw, 17px);
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.85);
}
.hero-cta {
  display: inline-block;
  margin-top: 34px;
  padding: 13px 34px;
  border: 1px solid rgba(232, 182, 76, 0.75);
  border-radius: 999px;
  color: var(--gold);
  font-size: 15px;
  letter-spacing: 0.08em;
  transition: background .3s var(--ease), color .3s var(--ease), box-shadow .3s var(--ease);
}
.hero-cta:hover {
  background: var(--gold);
  color: var(--night-1);
  box-shadow: 0 6px 26px rgba(232, 182, 76, 0.4);
}

.hero-scroll {
  position: absolute;
  bottom: 30px;
  left: 50%;
  width: 1px; height: 46px;
  transform: translateX(-50%);
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.6));
  overflow: hidden;
}
.hero-scroll::after {
  content: "";
  position: absolute; left: 0; top: -12px;
  width: 100%; height: 12px;
  background: var(--gold);
  animation: scroll-drip 2.4s var(--ease) infinite;
}
@keyframes scroll-drip {
  0% { transform: translateY(0); }
  100% { transform: translateY(58px); }
}

/* ---------- HERO 相册页 ---------- */
.hero-album { min-height: 92vh; }
.hero-bg {
  position: absolute; inset: 0;
  z-index: 0;
}
.hero-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.06);
  filter: brightness(0.82) saturate(1.08);
  animation: hero-zoom 18s ease-out forwards;
}
@keyframes hero-zoom { to { transform: scale(1.0); } }
.hero-album::after {
  content: "";
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(to bottom, rgba(11,18,32,0.35) 0%, rgba(11,18,32,0.15) 40%, rgba(11,18,32,0.75) 100%);
  pointer-events: none;
}
.hero-album-inner {
  position: relative; z-index: 2;
  padding: 0 20px;
}
.hero-eyebrow { margin-bottom: 14px; }
.hero-dates {
  margin-top: 14px;
  font-size: 14px;
  letter-spacing: 0.22em;
  color: rgba(255, 255, 255, 0.85);
}

/* ---------- 章节区（主页） ---------- */
.chapters {
  max-width: 1120px;
  margin: 0 auto;
  padding: 110px 28px 140px;
}
.section-head { text-align: center; margin-bottom: 60px; }
.section-head h2 {
  font-family: var(--serif);
  font-size: clamp(30px, 4.5vw, 44px);
  font-weight: 600;
  letter-spacing: 0.1em;
  margin-top: 10px;
  color: var(--ink);
}
.section-note { margin-top: 12px; color: var(--ink-soft); font-size: 15px; }

.chapter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 34px;
}

.chapter-card {
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  box-shadow: 0 14px 44px rgba(20, 38, 60, 0.12);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
.chapter-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 26px 60px rgba(20, 38, 60, 0.2);
}
.chapter-cover {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--night-2);
}
.chapter-cover img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .8s var(--ease);
}
.chapter-card:hover .chapter-cover img { transform: scale(1.06); }
.chapter-tag {
  position: absolute;
  top: 14px; left: 14px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(11, 18, 32, 0.65);
  backdrop-filter: blur(6px);
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 0.14em;
}
.chapter-meta { padding: 22px 24px 26px; }
.chapter-meta h3 {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.06em;
}
.chapter-meta h3 .en {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.24em;
  color: var(--ink-soft);
  margin-left: 8px;
}
.chapter-meta p { margin-top: 8px; color: var(--ink-soft); font-size: 14px; }

.chapter-card--empty {
  border: 2px dashed rgba(34, 48, 63, 0.22);
  background: transparent;
  box-shadow: none;
}
.chapter-card--empty:hover { transform: none; box-shadow: none; }
.chapter-cover--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #f7f3ea, #ece5d4);
}
.empty-globe {
  font-size: 74px;
  color: rgba(34, 48, 63, 0.22);
  animation: spin-slow 26s linear infinite;
  display: inline-block;
}
@keyframes spin-slow { to { transform: rotate(360deg); } }

/* ---------- 筛选条 ---------- */
.filterbar {
  position: sticky;
  top: 62px;
  z-index: 30;
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 18px 20px;
  background: rgba(245, 241, 232, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(34, 48, 63, 0.08);
  flex-wrap: wrap;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  border-radius: 999px;
  border: 1px solid rgba(34, 48, 63, 0.18);
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  letter-spacing: 0.05em;
  transition: all .28s var(--ease);
}
.chip-count {
  font-size: 11px;
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(34, 48, 63, 0.1);
}
.chip:hover { border-color: var(--gold); color: var(--gold-deep); }
.chip.is-active {
  background: var(--night-2);
  border-color: var(--night-2);
  color: #fff;
}
.chip.is-active .chip-count { background: rgba(255, 255, 255, 0.18); color: var(--gold); }

/* ---------- 画廊 ---------- */
.gallery {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 22px 90px;
  column-count: 4;
  column-gap: 16px;
}
@media (max-width: 1100px) { .gallery { column-count: 3; } }
@media (max-width: 780px)  { .gallery { column-count: 2; column-gap: 10px; padding: 28px 12px 70px; } }
@media (max-width: 460px)  { .gallery { column-count: 2; } }

.g-item {
  position: relative;
  display: block;
  break-inside: avoid;
  margin-bottom: 16px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--paper-dim);
  cursor: zoom-in;
  animation: item-in .5s var(--ease) both;
}
@keyframes item-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.g-item img {
  width: 100%;
  height: auto;
  transition: transform .6s var(--ease);
}
.g-item:hover img { transform: scale(1.045); }

.g-cap {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 26px 12px 10px;
  background: linear-gradient(to top, rgba(11,18,32,0.72), transparent);
  color: #fff;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .35s var(--ease), transform .35s var(--ease);
  pointer-events: none;
}
.g-item:hover .g-cap { opacity: 1; transform: translateY(0); }
.g-item[hidden] { display: none; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 13, 23, 0.94);
  backdrop-filter: blur(6px);
  animation: lb-in .3s var(--ease);
}
.lightbox[hidden] { display: none; }
@keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }

.lb-stage {
  max-width: 88vw;
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.lb-stage img {
  max-width: 88vw;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.55);
}
.lb-stage figcaption {
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  letter-spacing: 0.12em;
}

.lb-btn {
  position: absolute;
  width: 52px; height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .25s, border-color .25s, transform .25s;
}
.lb-btn:hover { background: var(--gold); border-color: var(--gold); color: var(--night-1); }
.lb-close { top: 22px; right: 24px; }
.lb-prev { left: 22px; top: 50%; transform: translateY(-50%); font-size: 34px; padding-bottom: 4px; }
.lb-next { right: 22px; top: 50%; transform: translateY(-50%); font-size: 34px; padding-bottom: 4px; }
.lb-prev:hover, .lb-next:hover { transform: translateY(-50%) scale(1.06); }

@media (max-width: 640px) {
  .lb-prev { left: 10px; width: 44px; height: 44px; }
  .lb-next { right: 10px; width: 44px; height: 44px; }
  .lb-stage { max-width: 96vw; }
  .lb-stage img { max-width: 96vw; max-height: 70vh; }
}

/* ---------- Closing ---------- */
.closing {
  text-align: center;
  padding: 90px 24px 110px;
  background: linear-gradient(180deg, var(--paper) 0%, #efe9da 100%);
}
.closing-line {
  font-family: var(--serif);
  font-size: clamp(20px, 3vw, 28px);
  letter-spacing: 0.14em;
  color: var(--ink);
  margin-bottom: 8px;
}

/* ---------- 页脚 ---------- */
.site-footer {
  padding: 40px 24px;
  text-align: center;
  background: var(--night-1);
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
  letter-spacing: 0.1em;
}
.footer-line {
  margin-top: 8px;
  color: var(--gold);
  opacity: 0.85;
  font-family: var(--serif);
  letter-spacing: 0.3em;
}

/* ---------- 滚动浮现 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- 减少动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .hero-bg img { animation: none; transform: none; }
  .pin { animation: none; }
  .g-item { animation: none; }
}
