/* ============================================================
   layout.css —— 页头 / 导航 / 页脚 / 区块布局 / 栅格
   ============================================================ */

/* ---------- 顶部导航 ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 120;
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition: background-color 0.4s var(--ease-out), box-shadow 0.4s, backdrop-filter 0.4s;
}

.site-header.is-scrolled {
  background: rgba(20, 6, 10, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), inset 0 -1px 0 rgba(240, 192, 96, 0.18);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(var(--container), 100% - 2rem);
  margin-inline: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--cream);
}

.brand-mark {
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--gold-300);
  background: radial-gradient(circle at 32% 28%, var(--red-500), var(--red-800));
  box-shadow: 0 6px 18px rgba(200, 16, 46, 0.55), inset 0 1px 2px rgba(255, 255, 255, 0.35);
  border: 1px solid rgba(240, 192, 96, 0.5);
}

.brand-name {
  font-family: var(--font-serif);
  font-size: 1.18rem;
  letter-spacing: 0.18em;
  font-weight: 700;
}
.brand-name small {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.62rem;
  letter-spacing: 0.32em;
  color: var(--gold-400);
  opacity: 0.85;
  font-weight: 400;
  margin-top: -2px;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-list a {
  position: relative;
  display: inline-block;
  padding: 0.5em 1.05em;
  color: var(--cream);
  font-size: 0.98rem;
  letter-spacing: 0.14em;
  opacity: 0.88;
}

.nav-list a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--red-500), var(--gold-400));
  transform: translateX(-50%);
  transition: width 0.32s var(--ease-out);
}

.nav-list a:hover,
.nav-list a.is-active {
  opacity: 1;
  color: var(--gold-300);
}
.nav-list a:hover::after,
.nav-list a.is-active::after { width: 62%; }

/* 移动端菜单按钮 */
.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid rgba(240, 192, 96, 0.35);
  background: rgba(240, 192, 96, 0.08);
}

.nav-toggle .bar {
  display: block;
  width: 19px;
  height: 2px;
  margin: 4px auto;
  background: var(--gold-300);
  border-radius: 2px;
  transition: transform 0.32s var(--ease-out), opacity 0.25s;
}
.nav-toggle[aria-expanded="true"] .bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 820px) {
  .nav-toggle { display: block; }

  .site-nav {
    position: fixed;
    top: var(--header-h);
    right: 0.9rem;
    left: auto;
    width: min(240px, 72vw);
    background: rgba(26, 8, 13, 0.985);
    border: 1px solid rgba(240, 192, 96, 0.22);
    border-radius: var(--radius);
    padding: 0.5rem;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transform: translateY(-12px) scale(0.96);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s var(--ease-out), transform 0.28s var(--ease-out);
    transform-origin: top right;
  }
  .site-nav.is-open {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
  .nav-list {
    flex-direction: column;
    align-items: stretch;
  }
  .nav-list a {
    padding: 0.72em 1em;
    border-radius: 9px;
  }
  .nav-list a:hover { background: rgba(240, 192, 96, 0.1); }
  .nav-list a::after { display: none; }
}

/* ---------- 页脚 ---------- */
.site-footer {
  position: relative;
  background:
    linear-gradient(180deg, rgba(109, 11, 22, 0.25), rgba(20, 6, 10, 0.0) 38%),
    var(--ink-800);
  border-top: 1px solid rgba(240, 192, 96, 0.16);
  padding: clamp(2.6rem, 6vw, 4rem) 0 1.6rem;
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: clamp(1.6rem, 4vw, 3rem);
  align-items: start;
}

.footer-brand .brand-name { font-size: 1.35rem; }
.footer-brand p {
  color: var(--cream-dim);
  opacity: 0.78;
  font-size: 0.95rem;
  margin: 0.9rem 0 0;
  max-width: 34ch;
}

.footer-col h3 {
  font-size: 1.02rem;
  color: var(--gold-400);
  letter-spacing: 0.22em;
  margin-bottom: 1rem;
}

.footer-col li { margin-bottom: 0.55rem; }
.footer-col a { color: var(--cream-dim); font-size: 0.95rem; }
.footer-col a:hover { color: var(--gold-300); }

.footer-motto {
  margin-top: 2.2rem;
  padding-top: 1.4rem;
  border-top: 1px dashed rgba(240, 192, 96, 0.2);
  text-align: center;
  color: var(--gold-400);
  letter-spacing: 0.5em;
  text-indent: 0.5em;
  font-size: clamp(1rem, 2.6vw, 1.25rem);
  font-family: var(--font-serif);
}

.footer-legal {
  margin-top: 1.1rem;
  text-align: center;
  font-size: 0.84rem;
  color: var(--cream-dim);
  opacity: 0.85;
  line-height: 2;
}
.footer-legal a { opacity: 0.95; font-weight: 600; }

@media (max-width: 820px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; text-align: left; }
}

/* 返回顶部 */
.back-to-top {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 110;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--gold-300);
  background: rgba(143, 15, 30, 0.85);
  border: 1px solid rgba(240, 192, 96, 0.5);
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s var(--ease-out);
}
.back-to-top.is-visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.back-to-top:hover { background: var(--red-600); }

/* ---------- 视频卡片栅格 ---------- */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
  gap: clamp(1.1rem, 2.6vw, 1.7rem);
}

/* ---------- 图片墙（错落布局） ---------- */
.photo-wall {
  columns: 3 300px;
  column-gap: clamp(0.9rem, 2.2vw, 1.4rem);
}

.photo-item {
  break-inside: avoid;
  margin-bottom: clamp(0.9rem, 2.2vw, 1.4rem);
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: zoom-in;
  background: var(--ink-700);
  box-shadow: var(--shadow-md);
}

.photo-item img {
  width: 100%;
  height: auto;
  transition: transform 0.7s var(--ease-out), filter 0.5s;
  filter: saturate(0.92) contrast(1.03);
}

.photo-item:hover img {
  transform: scale(1.06);
  filter: saturate(1.1) contrast(1.05);
}

.photo-item figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 2.2rem 1rem 0.95rem;
  background: linear-gradient(180deg, transparent, rgba(20, 6, 10, 0.88));
  color: var(--cream);
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  transform: translateY(6px);
  opacity: 0;
  transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-out);
}
.photo-item:hover figcaption,
.photo-item:focus-within figcaption {
  opacity: 1;
  transform: none;
}
.photo-item .credit {
  display: block;
  font-size: 0.72rem;
  opacity: 0.72;
  letter-spacing: 0.02em;
}

/* ---------- 语录带 ---------- */
.quote-band {
  position: relative;
  overflow: hidden;
  padding: clamp(3.2rem, 8vw, 5.6rem) 0;
  background: linear-gradient(135deg, var(--red-900), var(--red-700) 52%, var(--red-800));
}

.quote-band .container {
  position: relative;
  z-index: 2;
  text-align: center;
}

.quote-band blockquote {
  margin: 0 auto;
  max-width: 880px;
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 3.8vw, 2.35rem);
  line-height: 1.75;
  color: var(--gold-300);
  letter-spacing: 0.12em;
  text-shadow: 0 4px 26px rgba(0, 0, 0, 0.35);
}

.quote-band cite {
  display: block;
  margin-top: 1.4rem;
  font-style: normal;
  font-size: clamp(0.92rem, 2.2vw, 1.06rem);
  letter-spacing: 0.34em;
  color: rgba(255, 255, 255, 0.85);
}

.quote-silk {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0.55;
  pointer-events: none;
}
