/* ===========================================================
   婚礼 / 纪念日展示站 — 样式
   配色：米白纸底 + 墨色字 + 柔金点缀
   零外部依赖，所有字体走系统栈，断网也能正常显示
   =========================================================== */

:root {
  --ink: #1e1a17;
  --ink-soft: #5d5551;
  --ink-faint: #958a83;

  /* 纸底往暖里推，保留米白的底子——这是"高级"的来源 */
  --paper: #fdfaf6;
  --paper-2: #f9eae3;

  /* 赤金：提高明度和饱和度，原来是灰扑扑的旧铜色 */
  --gold: #c0913f;
  --gold-light: #eccf9f;

  /* 绛红：这次让它真正参与结构，不再只是角落里的点缀 */
  --red: #a32e26;
  --red-deep: #8c211c;

  --line: rgba(30, 26, 23, 0.11);

  /* 衬线字体栈。
     "Noto Serif SC" 是我们自己打包的子集字体（见 assets/fonts/），
     放在系统字体之前，这样电脑、iPhone、安卓、鸿蒙显示的都是同一套宋体。
     后面那一长串是字体没加载出来时的降级路径。 */
  --serif: "Playfair Display", "Noto Serif SC", Georgia, "Times New Roman",
           "Songti SC", "STSong", "STSongti-SC-Regular", "Songti TC",
           "Noto Serif CJK SC", "Source Han Serif SC",
           "SimSun", "NSimSun", "MS Song", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Microsoft YaHei", "Hiragino Sans GB", "Noto Sans CJK SC", sans-serif;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --maxw: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ---------------------------------------------------------
   1. 顶部导航
   --------------------------------------------------------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px clamp(20px, 5vw, 56px);
  transition: background 0.5s var(--ease), padding 0.5s var(--ease),
              box-shadow 0.5s var(--ease);
}
.nav.is-scrolled {
  background: rgba(252, 249, 244, 0.86);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  padding-top: 14px;
  padding-bottom: 14px;
  box-shadow: 0 1px 0 var(--line);
}
.nav__brand {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #fff;
  transition: color 0.5s var(--ease);
}
.nav.is-scrolled .nav__brand { color: var(--ink); }

.nav__links {
  display: flex;
  gap: clamp(18px, 2.6vw, 38px);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9);
  transition: color 0.5s var(--ease);
}
.nav.is-scrolled .nav__links { color: var(--ink-soft); }
.nav__links a { position: relative; padding-bottom: 3px; }
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1px;
  background: currentColor;
  transition: width 0.4s var(--ease);
}
.nav__links a:hover::after { width: 100%; }

@media (max-width: 620px) {
  .nav__links { display: none; }
}

/* ---------------------------------------------------------
   2. 首屏
   --------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  /* 酒红底：比纯黑暖，照片盖上去也更像喜事而不是葬礼 */
  background: radial-gradient(120% 90% at 30% 15%, #5c2a1c 0%, #2c100a 58%, #180705 100%);
}
.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
/* 首屏默认是纯酒红渐变（金字压纯色最干净）。
   site.json 里不配 hero.image 时 app.js 会给它加 hidden，
   这里显式兜一道，免得某些浏览器把空 img 画成破图占位。 */
.hero__media[hidden] { display: none; }
.hero__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  /* 慢速推镜：14 秒一口气推完，很轻，不抢注意力 */
  animation: heroDrift 22s var(--ease) forwards;
}
@keyframes heroDrift {
  from { transform: scale(1.08); }
  to   { transform: scale(1); }
}
.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  /* 换成真实风景照后，中间那层原来是 0.26 的酒红几乎压不住亮部，
     烫金名字正好落在金色山坡上，糊成一片。改成两层：
     一层中心径向压暗（保住文字区对比），一层上下渐变压边。
     颜色从酒红改成中性暖褐，免得跟蓝天混出紫色。 */
  background:
    radial-gradient(78% 52% at 50% 46%, rgba(18, 10, 7, 0.58) 0%, rgba(18, 10, 7, 0) 72%),
    linear-gradient(
      180deg,
      rgba(26, 14, 10, 0.7) 0%,
      rgba(22, 12, 8, 0.3) 34%,
      rgba(16, 8, 6, 0.88) 100%
    );
}

.hero__inner {
  position: relative;
  z-index: 1;
  text-align: center;
  color: #fff;
  padding: 120px 24px 96px;
  max-width: 880px;
}

.hero__eyebrow {
  /* 原来是 "We are getting married" 的英文小字，改成中文后要重新配比：
     中文在 0.72rem 下会发虚，0.42em 的字距也会散成一地，所以字号提、字距收 */
  font-family: var(--serif);
  font-size: 0.9rem;
  letter-spacing: 0.28em;
  color: rgba(236, 207, 159, 0.85);
  margin: 0 0 26px;
  opacity: 0;
  animation: rise 1.1s var(--ease) 0.15s forwards;
}

.hero__names {
  font-family: var(--serif);
  /* 名字加粗，全站统一走 600（Playfair 有真字重，中文回落到宋体粗体） */
  font-weight: 600;
  font-size: clamp(2.6rem, 8vw, 5.4rem);
  line-height: 1.12;
  letter-spacing: 0.03em;
  margin: 0;
  /* 兜底色：万一不支持渐变文字，还是纯金，不会变成隐形字 */
  color: #f2d9a4;
  opacity: 0;
  animation: rise 1.15s var(--ease) 0.3s forwards;
}

/* 烫金渐变。用 @supports 包住，因为 color: transparent 一旦生效而
   background-clip 没被支持，字就彻底看不见了 */
@supports (background-clip: text) or (-webkit-background-clip: text) {
  .hero__names {
    background: linear-gradient(180deg, #fff4dd 0%, #ecca8e 48%, #c9984f 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
  /* 中间那个 & 不参与父级的渐变裁切，单独保持亮金 */
  .hero__names .hero__amp {
    color: var(--gold-light);
    -webkit-text-fill-color: var(--gold-light);
  }
}
.hero__amp {
  /* 这里不能用 inline-block + transform：父级 .hero__names 开了
     background-clip: text，inline-block 子元素会另起一层绘制，
     Chrome 会把 & 的轮廓在行首再画一次，左边多出一个「&」。
     改用 inline + relative 偏移，视觉一样，但不会重复绘制。 */
  display: inline;
  position: relative;
  top: -0.06em;
  /* 花体 & 的字形右侧留白本身偏小，左右给不一样的边距才看着居中 */
  margin: 0 0.3em 0 0.1em;
  color: var(--gold-light);
  font-style: italic;
  /* 名字加了粗，这个 & 单独锁回 400：600 的斜体字重没加载，
     硬跟会变成浏览器合成的假斜体，糊成一团 */
  font-weight: 400;
  font-size: 0.78em;
}

.hero__rule {
  width: 1px;
  height: 56px;
  margin: 30px auto 0;
  background: linear-gradient(180deg, transparent, rgba(192, 145, 63, 0.7), transparent);
  opacity: 0;
  animation: fadeIn 1.2s var(--ease) 0.7s forwards;
}

/* 仪式开始时间：放在倒计时下方，比辅助小字大一号，用暖金压住 */
.hero__when {
  margin: 22px 0 0;
  font-family: var(--serif);
  font-size: clamp(1.08rem, 2.6vw, 1.42rem);
  letter-spacing: 0.14em;
  color: rgba(236, 207, 159, 0.94);
}

/* --- 双时间区：上「已走过」，下「还差多久」 --- */
.hero__times {
  margin-top: 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  opacity: 0;
  animation: fadeIn 1.3s var(--ease) 1.05s forwards;
}

.hero__block { text-align: center; }

.hero__block-lab {
  margin: 0 0 11px;
  font-size: 0.64rem;
  letter-spacing: 0.24em;
  color: rgba(236, 207, 159, 0.64);
}

.hero__block-num {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.85rem, 4.2vw, 2.6rem);
  line-height: 1;
  color: #fff;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.hero__block-unit {
  font-family: var(--sans);
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.62);
  margin-left: 9px;
}

.hero__block-sub {
  margin: 11px 0 0;
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  color: rgba(236, 207, 159, 0.4);
}
.hero__block-sub:empty { display: none; }

/* 两块之间一道渐隐短线，比整条分割线克制 */
.hero__times-rule {
  width: 46px;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(226, 198, 156, 0.72) 50%,
    transparent
  );
}

.hero__count {
  display: flex;
  justify-content: center;
  gap: clamp(18px, 3.4vw, 40px);
}
.hero__count-item { text-align: center; }

/* 倒计时归零后顶上来的一句话，替掉整排数字 */
.hero__started {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.45rem, 3.6vw, 2.1rem);
  letter-spacing: 0.16em;
  line-height: 1.5;
  color: #fff;
}
/* hidden 属性怕被别处的 display 覆盖，这里显式兜一层 */
.hero__started[hidden] { display: none; }
.hero__count-num {
  display: block;
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3.4vw, 2.1rem);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: #fff;
}
.hero__count-lab {
  display: block;
  margin-top: 9px;
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(236, 207, 159, 0.66);
}

.hero__scroll {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  font-size: 0.62rem;
  /* 中文不适用 uppercase，字距也收一档，0.34em 会把四个字拉散 */
  letter-spacing: 0.22em;
  color: rgba(236, 207, 159, 0.62);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.hero__scroll::after {
  content: "";
  width: 1px; height: 44px;
  background: linear-gradient(180deg, rgba(236, 207, 159, 0.55), transparent);
  animation: scrollPulse 2.4s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.25; transform: scaleY(0.6); transform-origin: top; }
  50%      { opacity: 1;    transform: scaleY(1);   transform-origin: top; }
}

/* 小屏：两块时间上下叠起来容易顶出首屏，整体收紧一档 */
@media (max-width: 620px) {
  .hero__inner { padding: 94px 20px 74px; }
  .hero__rule { height: 42px; margin: 26px auto 24px; }
  .hero__times { margin-top: 28px; gap: 16px; }
  .hero__block-num { font-size: 1.75rem; }
  .hero__block-lab { font-size: 0.6rem; letter-spacing: 0.2em; }
  .hero__count { gap: 22px; }
  .hero__count-num { font-size: 1.34rem; }
  .hero__count-lab { font-size: 0.55rem; letter-spacing: 0.18em; margin-top: 7px; }
  .hero__when { font-size: 0.98rem; letter-spacing: 0.06em; margin-top: 18px; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ---------------------------------------------------------
   3. 通用区块
   --------------------------------------------------------- */
.section {
  padding: clamp(80px, 11vw, 150px) clamp(20px, 5vw, 56px);
}
.section--tight { padding-top: clamp(56px, 7vw, 92px); }
.wrap { max-width: var(--maxw); margin: 0 auto; }

.sec-head { margin-bottom: clamp(44px, 5vw, 74px); }
.sec-head--center { text-align: center; }

.sec-kicker {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 18px;
}
.sec-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.28;
  letter-spacing: 0.02em;
  margin: 0;
}
/* 标题下面一条渐隐红线：每进一个区块都"落一笔"，喜庆感靠这个撑起来 */
.sec-title::after {
  content: "";
  display: block;
  width: 34px;
  height: 1px;
  margin-top: 20px;
  background: linear-gradient(90deg, var(--red), rgba(163, 46, 38, 0));
}
.sec-head--center .sec-title::after {
  width: 54px;
  margin-left: auto;
  margin-right: auto;
  background: linear-gradient(
    90deg,
    rgba(163, 46, 38, 0),
    var(--red),
    rgba(163, 46, 38, 0)
  );
}
.sec-desc {
  margin: 20px auto 0;
  max-width: 620px;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 2;
}

/* 滚动进场：默认隐藏，加 .is-in 后显形 */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }

/* ---------------------------------------------------------
   4. 邀请语
   --------------------------------------------------------- */
.invite {
  text-align: center;
  background: var(--paper-2);
}
.invite__mark {
  font-family: var(--serif);
  font-size: clamp(3.4rem, 9vw, 7rem);
  line-height: 1;
  /* 淡到几乎是纸上的一个印子，只在眼角带出一点红 */
  color: var(--red);
  opacity: 0.2;
  margin-bottom: 8px;
  user-select: none;
}
.invite__text {
  font-family: var(--serif);
  font-size: clamp(1.05rem, 2.4vw, 1.5rem);
  line-height: 2.1;
  letter-spacing: 0.04em;
  max-width: 700px;
  margin: 0 auto;
  color: var(--ink);
  /* 允许在 JSON 里用 \n 手动断行；但文案里没写 \n 时就是自然流动 */
  white-space: pre-line;
  /* 让浏览器优化断行，避免最后一行只剩一两个字 */
  text-wrap: pretty;
}
.invite__sign {
  margin-top: 34px;
  font-size: 0.74rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* 邀请语下方那张横图：21:9 电影比例，把大段文字截断一下 */
.invite__photo {
  margin: clamp(40px, 5.2vw, 66px) 0 0;
  overflow: hidden;
  position: relative;
}
.invite__photo img {
  display: block;
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
}
.invite__photo[hidden] { display: none; }

/* 图注：小字、右对齐，像画册里的拍摄地说明 */
.invite__cap {
  margin: 14px 2px 0;
  font-family: var(--serif);
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  line-height: 1.7;
  /* 比正文浅、比辅助灰深一档：字号本来就小，再淡就看不清了 */
  color: rgba(93, 85, 81, 0.9);
  text-align: right;
}
.invite__cap[hidden] { display: none; }
@media (max-width: 620px) {
  .invite__photo img { aspect-ratio: 4 / 3; }
  .invite__cap {
    margin-top: 11px;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
  }
}

/* ---------------------------------------------------------
   5. 故事时间线
   --------------------------------------------------------- */
.timeline {
  position: relative;
  max-width: 780px;
  margin: 0 auto;
  padding-left: 34px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 4px; top: 8px; bottom: 8px;
  width: 1.5px;
  /* 中轴线用绛红，整条时间线立刻有了婚礼的颜色 */
  background: linear-gradient(
    180deg,
    transparent,
    rgba(163, 46, 38, 0.3) 10%,
    rgba(163, 46, 38, 0.3) 90%,
    transparent
  );
}
.tl-item {
  position: relative;
  padding-bottom: clamp(38px, 4.4vw, 56px);
}
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: "";
  position: absolute;
  left: -34px; top: 10px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 5px var(--paper);
}
.tl-date {
  font-size: 0.68rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 9px;
}
.tl-title {
  font-family: var(--serif);
  font-size: clamp(1.12rem, 2.3vw, 1.45rem);
  font-weight: 400;
  margin: 0 0 10px;
  letter-spacing: 0.02em;
}
.tl-text {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.93rem;
  line-height: 1.95;
  max-width: 600px;
}

/* 故事配图：有图时文字与方图并排，没图就保持原来的整行文字 */
.tl-item.has-photo {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: clamp(18px, 3vw, 30px);
  align-items: start;
}
.tl-photo {
  margin: 0;
  overflow: hidden;
  background: var(--paper-2);
}
.tl-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}
@media (max-width: 620px) {
  .tl-item.has-photo {
    grid-template-columns: minmax(0, 1fr) 92px;
    gap: 14px;
  }
}

/* ---------------------------------------------------------
   6. 相册网格
   --------------------------------------------------------- */
.albums {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: clamp(14px, 2vw, 26px);
}

.album {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--paper-2);
  cursor: pointer;
  border: none;
  padding: 0;
  text-align: left;
  font: inherit;
  color: inherit;
}

/* 宽屏时第一张横跨两列，做出杂志跨页的感觉；窄屏一律单列，避免破版 */
@media (min-width: 900px) {
  .album:nth-child(1) { grid-column: span 2; }
  .album:nth-child(1) .album__frame,
  .album:nth-child(2) .album__frame { aspect-ratio: 16 / 10; }
}

.album__frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  /* 图片还没加载出来时的兜底底色，避免出现一片白 */
  background: linear-gradient(135deg, #f3e7d9, #d4ae8e);
}

.album__frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  /* 竖构图照片裁成 4:3 封面时，按默认居中会把额头和下巴切掉；
     往上偏一点，保住人脸。横图本来就不裁，这里不影响 */
  object-position: center 32%;
  transition: transform 1.1s var(--ease), filter 0.7s var(--ease);
}
.album:hover .album__frame img {
  transform: scale(1.045);
  filter: brightness(0.9);
}
.album__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 52%, rgba(20, 16, 14, 0.55) 100%);
  /* 常态就留一层薄压暗：手机上根本没有 hover，
     封面标题和张数直接压在照片上，遇到浅色背景（白裙、天空）会糊掉 */
  opacity: 0.55;
  transition: opacity 0.6s var(--ease);
}
.album:hover .album__frame::after { opacity: 1; }

.album__meta {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 2;
  padding: clamp(16px, 2.4vw, 26px);
  color: #fff;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
}
.album__name {
  font-family: var(--serif);
  font-size: clamp(1.02rem, 2vw, 1.32rem);
  letter-spacing: 0.05em;
  margin: 0;
  text-shadow: 0 1px 14px rgba(0,0,0,0.5);
}
.album__count {
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9);
  white-space: nowrap;
  padding-bottom: 0.28em;
  /* 标题有阴影，这行原来没有，浅色背景上一压就看不清 */
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.65);
}
.album__count::after {
  content: " →";
  transition: opacity 0.4s var(--ease);
}

/* ---------------------------------------------------------
   7. 视频
   --------------------------------------------------------- */
.films { background: var(--paper-2); }

.film-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: clamp(18px, 2.6vw, 32px);
}
.film {
  background: var(--paper);
  overflow: hidden;
}
.film__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #241e1b;
  overflow: hidden;
}
.film__frame iframe,
.film__frame video {
  width: 100%; height: 100%;
  border: 0;
  display: block;
  object-fit: cover;
}
.film__body { padding: 20px 22px 24px; }
.film__title {
  font-family: var(--serif);
  font-size: 1.06rem;
  font-weight: 400;
  margin: 0 0 7px;
  letter-spacing: 0.02em;
}
.film__note {
  margin: 0;
  font-size: 0.84rem;
  color: var(--ink-faint);
  line-height: 1.75;
}

/* 只有一条时收窄居中，别拉成一整堵墙 */
.film-grid--single {
  grid-template-columns: minmax(0, 820px);
  justify-content: center;
}

/* 封面 + 播放键：点之前不加载 B 站播放器 */
.film__poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: #241e1b;
  cursor: pointer;
  overflow: hidden;
  display: block;
  -webkit-tap-highlight-color: transparent;
}
.film__poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(0.8) saturate(0.94);
  transition: transform 1.4s var(--ease), filter 0.6s var(--ease);
}
.film__poster:hover img,
.film__poster:focus-visible img {
  transform: scale(1.035);
  filter: brightness(0.92) saturate(1);
}
.film__poster::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    62% 72% at 50% 50%,
    rgba(0, 0, 0, 0.33) 0%,
    rgba(0, 0, 0, 0.1) 62%,
    rgba(0, 0, 0, 0.24) 100%
  );
}
.film__play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 66px;
  height: 66px;
  margin: -33px 0 0 -33px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: rgba(20, 12, 8, 0.26);
  z-index: 2;
  transition: transform 0.55s var(--ease), background 0.45s var(--ease),
    border-color 0.45s var(--ease);
}
.film__play::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  margin: -9px 0 0 -5px;
  border-style: solid;
  border-width: 9px 0 9px 15px;
  border-color: transparent transparent transparent rgba(255, 255, 255, 0.94);
}
.film__poster:hover .film__play,
.film__poster:focus-visible .film__play {
  transform: scale(1.07);
  background: rgba(163, 46, 38, 0.66);
  border-color: rgba(255, 255, 255, 0.88);
}
.film__dur {
  position: absolute;
  right: 12px;
  bottom: 11px;
  z-index: 2;
  padding: 2px 8px;
  border-radius: 2px;
  background: rgba(20, 14, 10, 0.62);
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
}

.film__link {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.82rem;
  color: var(--red);
  text-decoration: none;
  border-bottom: 1px solid rgba(163, 46, 38, 0.32);
  padding-bottom: 2px;
  transition: border-color 0.4s var(--ease), opacity 0.4s var(--ease);
}
.film__link::after {
  content: " ↗";
  font-size: 0.9em;
}
.film__link:hover {
  border-color: var(--red);
}

/* ---------------------------------------------------------
   7.4 家里的毛孩子
   --------------------------------------------------------- */
.pets-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 26px);
}
@media (max-width: 900px) {
  .pets-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 460px) {
  .pets-grid { grid-template-columns: 1fr; max-width: 320px; margin: 0 auto; }
}

.pet { text-align: center; }

.pet__frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  margin-bottom: 17px;
  background: linear-gradient(135deg, #f3e7d9, #d4ae8e);
}
.pet__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 1.1s var(--ease);
}
.pet:hover .pet__frame img { transform: scale(1.05); }

.pet__kind {
  display: block;
  font-size: 0.6rem;
  letter-spacing: 0.26em;
  color: var(--red);
  margin-bottom: 8px;
}
.pet__name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1rem, 1.9vw, 1.16rem);
  letter-spacing: 0.04em;
  margin: 0 0 7px;
}
.pet__text {
  margin: 0;
  font-size: 0.79rem;
  line-height: 1.75;
  color: var(--ink-soft);
}

/* ---------------------------------------------------------
   7.5 婚礼当日：时间表 + 地点 + 地图
   --------------------------------------------------------- */
.schedule {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: clamp(52px, 6.5vw, 86px);
}

.sched-item {
  padding: clamp(26px, 3.4vw, 42px) clamp(12px, 2vw, 24px);
  text-align: center;
  border-right: 1px solid var(--line);
}
.sched-item:last-child { border-right: 0; }

.sched-time {
  display: block;
  font-family: var(--serif);
  font-size: clamp(1.55rem, 3.6vw, 2.25rem);
  line-height: 1;
  color: var(--red);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  margin-bottom: 15px;
}
.sched-title {
  font-family: var(--serif);
  font-size: clamp(0.98rem, 2vw, 1.16rem);
  font-weight: 400;
  letter-spacing: 0.05em;
  margin: 0 0 8px;
}
.sched-place {
  margin: 0;
  font-size: 0.8rem;
  color: var(--ink-soft);
  letter-spacing: 0.06em;
}
.sched-note {
  margin: 9px 0 0;
  font-size: 0.71rem;
  color: var(--red);
  letter-spacing: 0.03em;
  line-height: 1.6;
}

@media (max-width: 680px) {
  .schedule { grid-template-columns: 1fr; }
  .sched-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 18px;
    align-items: baseline;
    text-align: left;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 20px 2px;
  }
  .sched-item:last-child { border-bottom: 0; }
  .sched-time { margin-bottom: 0; font-size: 1.5rem; }
  .sched-note { margin-top: 6px; }
}

/* --- 地点 --- */
.venue {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 54px);
}
@media (max-width: 820px) {
  .venue { grid-template-columns: 1fr; }
}

.venue__map {
  position: relative;
  overflow: hidden;
  min-height: 300px;
  background: #f3eade;
  cursor: pointer;
}
.venue__map:active { opacity: 0.92; }
.venue__map svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
@media (max-width: 820px) {
  .venue__map { min-height: 240px; }
}

.venue__map-tag {
  position: absolute;
  right: 12px;
  bottom: 10px;
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  color: var(--ink-faint);
  background: rgba(253, 250, 246, 0.82);
  padding: 3px 8px;
}
.venue__map-name {
  position: absolute;
  left: 14px;
  top: 14px;
  max-width: calc(100% - 28px);
  background: rgba(253, 250, 246, 0.94);
  padding: 7px 13px;
  font-family: var(--serif);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  box-shadow: 0 2px 16px rgba(30, 26, 23, 0.09);
}

.venue__side {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.venue__name {
  font-family: var(--serif);
  font-size: clamp(1.18rem, 2.4vw, 1.5rem);
  font-weight: 400;
  letter-spacing: 0.04em;
  margin: 0 0 7px;
}
.venue__addr {
  margin: 0 0 26px;
  font-size: 0.83rem;
  line-height: 1.8;
  color: var(--ink-faint);
  letter-spacing: 0.03em;
}

.venue__list {
  margin: 0 0 28px;
  display: grid;
  gap: 0;
}
.venue__list > div {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 14px;
  align-items: baseline;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.venue__list dt {
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  color: var(--red);
  white-space: nowrap;
}
.venue__list dd {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--ink);
}

.venue__btns {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.venue__btn {
  flex: 1 1 132px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 16px;
  font-size: 0.79rem;
  letter-spacing: 0.1em;
  text-decoration: none;
  border: 1px solid var(--gold);
  color: var(--ink);
  background: transparent;
  transition: background 0.35s var(--ease), color 0.35s var(--ease),
    border-color 0.35s var(--ease);
}
.venue__btn:hover {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}
.venue__btn--primary {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}
.venue__btn--primary:hover {
  background: var(--red-deep);
  border-color: var(--red-deep);
}

/* 导航失败时的兜底说明：手机系统差异大，与其反复调试唤起，
   不如把「搜什么」直接告诉宾客 */
.venue__hint {
  margin: 14px 0 0;
  font-size: 0.71rem;
  line-height: 1.75;
  color: var(--ink-faint);
  letter-spacing: 0.02em;
}

/* --- 到场提示 --- */
.tips {
  list-style: none;
  margin: clamp(38px, 5vw, 58px) auto 0;
  padding: 0;
  max-width: 700px;
  display: grid;
  gap: 13px;
}
.tips li {
  position: relative;
  padding-left: 22px;
  font-size: 0.85rem;
  line-height: 1.9;
  color: var(--ink-soft);
}
.tips li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.76em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
}

/* ---------------------------------------------------------
   8. 页脚
   --------------------------------------------------------- */
.foot {
  padding: clamp(64px, 8vw, 104px) clamp(20px, 5vw, 56px) 44px;
  text-align: center;
  border-top: 1px solid var(--line);
}
.foot__names {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  letter-spacing: 0.14em;
  margin: 0 0 14px;
}
.foot__date {
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--red);
  margin: 0 0 12px;
}
/* 酒店名一般很长，单独一行，字距收一点才不至于散架 */
.foot__place {
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  margin: 0 0 30px;
}
.foot__note {
  font-size: 0.76rem;
  color: var(--ink-faint);
  letter-spacing: 0.08em;
  margin: 0;
}
/* 鸣谢单独一行，比上面那句更淡，不抢名字和日期 */
.foot__credit {
  margin: 9px 0 0;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  opacity: 0.72;
}

/* ---------------------------------------------------------
   9. 灯箱
   --------------------------------------------------------- */
.lb {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  background: rgba(16, 13, 12, 0.96);
  padding: 0;
}
.lb.is-open { display: grid; grid-template-rows: auto 1fr auto; }

.lb__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(16px, 4vw, 40px);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.74rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.lb__close {
  background: none; border: 0;
  color: inherit;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  transition: color 0.3s;
}
.lb__close:hover { color: #fff; }

.lb__stage {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 0 clamp(12px, 3vw, 40px);
  /* grid 子项默认 min-height:auto，会把内容撑出容器，导致大图溢出。
     必须显式归零，配合 1fr 行高才能让图片真正被限制住。 */
  min-height: 0;
}
.lb__img {
  /* 用 viewport 兜一层：上下各留出工具栏和页码的位置 */
  max-width: 100%;
  max-height: calc(100vh - 170px);
  width: auto;
  height: auto;
  object-fit: contain;
  animation: fadeIn 0.45s var(--ease);
}

.lb__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.16);
  color: #fff;
  width: 46px; height: 46px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
  display: grid;
  place-items: center;
  transition: background 0.3s, border-color 0.3s;
  backdrop-filter: blur(6px);
}
.lb__nav:hover { background: rgba(255,255,255,0.16); border-color: rgba(255,255,255,0.34); }
.lb__nav--prev { left: clamp(10px, 2.4vw, 34px); }
.lb__nav--next { right: clamp(10px, 2.4vw, 34px); }
@media (max-width: 620px) {
  .lb__nav { width: 40px; height: 40px; }
}

.lb__foot {
  padding: 14px clamp(16px, 4vw, 40px) 26px;
  text-align: center;
  color: rgba(255,255,255,0.6);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
}

/* ---------------------------------------------------------
   9.5 背景音乐开关

   固定在右下角。46px 是手机触摸目标的舒适尺寸，再小就不好点。
   层级压在灯箱（200）和导航（90）下面——看大图时不该有红点挡着画面。
   --------------------------------------------------------- */
.bgm {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 85;
}
.bgm[hidden] { display: none; }

.bgm__btn {
  position: relative;   /* 缓冲环 ::after 的定位基准 */
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  /* 米白底 + 金边：首屏是深酒红，红底按钮会糊进背景只剩图标孤零零飘着；
     米白圆在深色首屏和浅色正文区都能立住 */
  border: 1px solid rgba(192, 145, 63, 0.5);
  border-radius: 50%;
  background: var(--paper);
  color: var(--red);
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(30, 26, 23, 0.16);
  transition: background 0.3s var(--ease), color 0.3s var(--ease),
              transform 0.3s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.bgm__btn:hover { background: #fff; color: var(--red-deep); }
.bgm__btn:active { transform: scale(0.93); }
.bgm__btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.bgm__icon { width: 22px; height: 22px; display: block; }
.bgm__icon--on { display: none; }

.bgm.is-playing .bgm__icon--off { display: none; }
.bgm.is-playing .bgm__icon--on { display: block; }

/* 播放中：底色翻成绛红、图标转金，配合金色光晕呼吸，
   一眼能看出「音乐是开着的」，又不至于抢画面注意力 */
@keyframes bgm-breathe {
  0%, 100% { box-shadow: 0 6px 20px rgba(30, 26, 23, 0.16); }
  50%      { box-shadow: 0 6px 26px rgba(192, 145, 63, 0.55); }
}
.bgm.is-playing .bgm__btn {
  background: var(--red-deep);
  color: var(--gold-light);
  border-color: transparent;
  animation: bgm-breathe 2.6s ease-in-out infinite;
}

/* 缓冲中：全曲 3.5MB，弱网点开要等一两秒才出声。
   套一圈转动的细环，避免「点了没反应」的错觉 */
@keyframes bgm-spin { to { transform: rotate(360deg); } }
.bgm.is-loading .bgm__btn::after {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 2px solid rgba(140, 33, 28, 0.16);
  border-top-color: var(--red);
  animation: bgm-spin 0.9s linear infinite;
}
.bgm.is-loading .bgm__btn { cursor: progress; }

@media (max-width: 620px) {
  .bgm { right: 14px; bottom: 14px; }
  .bgm__btn { width: 44px; height: 44px; }
}

/* ---------------------------------------------------------
   10. 降低动效偏好
   --------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}
