@charset "UTF-8";
/* ==========================================================================
   影像样片 · 静态站样式 v2（2026-10-03 重做排版）
   手机优先：首页两张入口卡在一屏内看全，不靠滚动；分类页做视频墙。
   无框架、无构建、无外部 CDN，直接部署到对象存储。
   旋钮：DESIGN_VARIANCE 7 / MOTION_INTENSITY 5 / VISUAL_DENSITY 3
   ========================================================================== */

/* 婚礼页的衬线标题用自带子集字库：安卓微信没有宋体，靠系统 serif 会退化成黑体 */
@font-face {
  font-family: "SiteSerif";
  src: url("../fonts/serif-sub.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
  font-style: normal;
}

/* ---------- 令牌 ---------- */
:root {
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC",
          "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif;
  --serif: "SiteSerif", "Songti SC", "STSong", "Source Han Serif SC", serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --pad: clamp(18px, 5vw, 40px);
  --maxw: 720px;
}

[data-page="home"] {
  --bg: #F6F3EF;
  --ink: #241E20;
  --ink-soft: #6E6467;
  --line: #E5DED7;
  --accent: #B99A72;
  --accent-deep: #8A6A3F;
  --radius: 14px;
  --display: var(--sans);
}

[data-page="wedding"] {
  --bg: #FBF9F7;
  --ink: #2C2426;
  --ink-soft: #7C6E70;
  --line: #E8E0D9;
  --accent: #B76E79;
  --accent-deep: #8E4A57;
  --radius: 3px;
  --display: var(--serif);
  --veil: 22, 15, 18;          /* 图上遮罩的基色（深梅黑） */
}

[data-page="birthday"] {
  --bg: #FFF8F3;
  --ink: #3A2A32;
  --ink-soft: #7A6270;
  --line: #FBE3EC;
  --accent: #FF7EB3;
  --accent-deep: #B22F66;
  --radius: 22px;
  --display: var(--sans);
  --veil: 52, 24, 38;          /* 图上遮罩的基色（暖梅） */
}

/* ---------- 基础 ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  overflow-x: hidden;
}
::selection { background: var(--accent); color: #fff; }
/* ⚠️ height:auto 不能省：<img height="720"> 属性等于一条 height:720px 声明，
   不写 auto 的话 aspect-ratio 会被完全忽略，图会被钉死成 720px 高并把页面撑宽 */
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent-deep); outline-offset: 3px; border-radius: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- 顶栏 ---------- */
.bar {
  height: 54px;
  display: flex; align-items: center; gap: 12px;
  padding: 0 var(--pad);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  position: sticky; top: 0; z-index: 20;
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease);
}
.bar.stuck { border-bottom-color: var(--line); }
.bar .brand {
  margin: 0 auto; font-size: 12px; letter-spacing: .4em; font-weight: 600;
  color: var(--ink-soft); padding-left: .4em;
}
.bar .back {
  display: inline-flex; align-items: center; gap: 5px;
  min-height: 44px; margin-left: -6px;
  font-size: 14px; color: var(--ink-soft); font-weight: 600;
}
.bar .back svg { width: 16px; height: 16px; }
.bar .back:active { opacity: .55; }
.bar .who { font-size: 12px; letter-spacing: .24em; color: var(--ink-soft); font-weight: 600; }

/* ==========================================================================
   首页：两张入口卡，一屏看全（图片用生成的氛围图，不用作品截图）
   ========================================================================== */
.entries {
  max-width: var(--maxw); margin: 0 auto;
  padding: 10px var(--pad) 6px;
  display: grid; gap: 13px;
}
@media (min-width: 760px) { .entries { grid-template-columns: 1fr 1fr; gap: 20px; padding-top: 26px; } }

.entry { display: block; border-radius: var(--radius); overflow: hidden; }
.entry-pic { position: relative; overflow: hidden; background: #E7E1DA; }
.entry-pic img {
  width: 100%; height: auto; aspect-ratio: 16 / 10;
  object-fit: cover; display: block;
  transform: scale(1.03);
  animation: kb 16s var(--ease) forwards;
}
@keyframes kb { to { transform: scale(1); } }
.entry-body { padding: 13px 2px 0; }
.entry-top { display: flex; align-items: baseline; gap: 12px; }
.entry h2 {
  font-family: var(--display);
  font-size: 22px; line-height: 1.35; letter-spacing: .01em;
}
[data-page="home"] .entry[data-world="wedding"] h2 { font-family: var(--serif); font-weight: 600; }
[data-page="home"] .entry[data-world="birthday"] h2 { font-weight: 800; }
.entry .cnt {
  margin-left: auto; flex: 0 0 auto;
  font-size: 12.5px; font-weight: 700; letter-spacing: .04em;
  color: var(--ink-soft);
}
.entry p { margin-top: 4px; font-size: 13.5px; color: var(--ink-soft); }
.entry .go {
  margin-top: 10px;
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 40px; padding: 0 18px;
  border-radius: calc(var(--radius) * 0.6);
  font-size: 14px; font-weight: 700; letter-spacing: .05em;
  color: #fff;
}
.entry[data-world="wedding"] .go { background: #9E5563; }     /* 对白 5.34:1 */
.entry[data-world="birthday"] .go { background: #B22F66; }    /* 对白 6.01:1 */
.entry .go svg { width: 15px; height: 15px; }
.entry:active .go { transform: scale(.97); }
.entry:active .entry-pic img { transform: scale(1.055); }
@media (hover: hover) {
  .entry .entry-pic img { transition: transform 1s var(--ease); }
  .entry:hover .entry-pic img { transform: scale(1.06); }
  .entry:hover .go { filter: brightness(1.08); }
}

/* ==========================================================================
   分类页：视频墙（封面整宽 + 底部遮罩 + 图上标题/时长，点开即播）
   ========================================================================== */
.head {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(20px, 5.5vw, 34px) var(--pad) clamp(14px, 4vw, 24px);
}
.head h1 {
  font-family: var(--display);
  font-size: clamp(25px, 6.6vw, 34px); line-height: 1.3; letter-spacing: .01em;
}
[data-page="wedding"] .head h1 { font-weight: 600; }
[data-page="birthday"] .head h1 { font-weight: 800; }
.head p { margin-top: 9px; font-size: 13.5px; color: var(--ink-soft); max-width: 32ch; }

.wall {
  max-width: var(--maxw); margin: 0 auto;
  padding: 0 var(--pad) 8px;
  display: grid; gap: 14px;
}
@media (min-width: 760px) { .wall { grid-template-columns: 1fr 1fr; gap: 18px; } }

.tile {
  position: relative; display: block; width: 100%;
  padding: 0; border: 0; background: none; font: inherit; color: #fff;
  text-align: left; cursor: pointer; -webkit-appearance: none; appearance: none;
  border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 12px 30px -22px rgba(30, 20, 25, .8);
}
.tile:focus-visible { outline: 2px solid var(--accent-deep); outline-offset: 3px; }
.tile img {
  width: 100%; height: auto; aspect-ratio: 16 / 9;
  object-fit: cover; display: block;
  transition: transform 1s var(--ease);
}
.tile .veil {
  position: absolute; inset: 0;
  background: linear-gradient(to top,
    rgba(var(--veil), .96) 0%, rgba(var(--veil), .86) 26%,
    rgba(var(--veil), .66) 44%, rgba(var(--veil), .20) 70%,
    rgba(var(--veil), .04) 100%);
}
.tile .cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 14px 16px 15px;
  display: flex; align-items: flex-end; gap: 10px;
}
.tile .cap .txt { min-width: 0; }
.tile h3 {
  font-family: var(--display);
  font-size: 17.5px; line-height: 1.4; letter-spacing: .01em;
  text-shadow: 0 1px 10px rgba(0, 0, 0, .45);
}
[data-page="wedding"] .tile h3 { font-weight: 600; }
[data-page="birthday"] .tile h3 { font-weight: 800; }
.tile .desc {
  margin-top: 3px; font-size: 12.5px; line-height: 1.5;
  color: rgba(255, 255, 255, .82);
  text-shadow: 0 1px 10px rgba(0, 0, 0, .45);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tile .dur {
  margin-left: auto; flex: 0 0 auto; padding-bottom: 2px;
  font-size: 12.5px; letter-spacing: .04em; font-weight: 600;
  color: rgba(255, 255, 255, .88);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 10px rgba(0, 0, 0, .45);
}
.tile .play {
  position: absolute; left: 50%; top: 44%;
  transform: translate(-50%, -50%);
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(255, 255, 255, .93);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(20, 12, 16, .32);
  transition: transform .2s var(--ease), background .25s var(--ease);
}
.tile .play svg { width: 17px; height: 17px; margin-left: 3px; fill: var(--accent-deep); }
.tile:active .play { transform: translate(-50%, -50%) scale(.9); }
.tile:active img { transform: scale(1.02); }
@media (hover: hover) {
  .tile:hover img { transform: scale(1.035); }
  .tile:hover .play { transform: translate(-50%, -50%) scale(1.07); }
}

/* ---------- 页脚 ---------- */
.foot {
  text-align: center; padding: 14px var(--pad) 26px;
  font-size: 12px; letter-spacing: .1em; color: var(--ink-soft);
}
.foot .rule { width: 26px; height: 1px; background: var(--accent); margin: 0 auto 14px; }

/* ==========================================================================
   播放层
   ========================================================================== */
.player { position: fixed; inset: 0; z-index: 100; background: #0E0B0C; display: none; flex-direction: column; }
.player.open { display: flex; animation: fade .2s var(--ease); }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.player video { flex: 1; width: 100%; min-height: 0; object-fit: contain; background: #0E0B0C; }
.player-top {
  position: absolute; top: 0; left: 0; right: 0; z-index: 2;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 28px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, .72), transparent);
}
.p-title { color: #fff; font-size: 14px; font-weight: 600; letter-spacing: .04em; }
.p-close {
  flex: 0 0 auto; width: 40px; height: 40px; border: 0; cursor: pointer;
  border-radius: 50%; background: rgba(255, 255, 255, .18); color: #fff;
  font-size: 17px; font-family: inherit; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.p-close:active { background: rgba(255, 255, 255, .32); }

/* ---------- 入场 ---------- */
/* 入场动效只在 JS 真的加载成功时才隐藏元素（<html class="js"> 由 site.js 自己加上）。
   否则脚本被拦 / 被禁用时，整页会停在 opacity:0 变成空白。 */
.js .reveal { opacity: 0; transform: translateY(12px); }
.js .reveal.in { opacity: 1; transform: none; transition: opacity .58s var(--ease), transform .58s var(--ease); }

/* ---------- 尊重「减弱动态效果」 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001s !important; animation-iteration-count: 1 !important;
    transition-duration: .001s !important;
  }
  .entry-pic img { transform: none; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- 老浏览器兜底（不支持 color-mix） ---------- */
@supports not (background: color-mix(in srgb, red 10%, transparent)) {
  .bar { background: var(--bg); }
}
