/* =========================================================
   婚礼邀请 · 静态版
   设计稿宽 390，舞台高 844，由 JS 等比缩放到视口高度
   ========================================================= */

:root {
  --ink: #4d2f1f;
  --ink-soft: #7a553f;
  --line: #4d2f1f;
  --bg: #f9f6f3;

  --maple: "MapleCN", "MapleCNFull", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --serif: var(--maple);
  --serif-ji: var(--maple);
  --calligraphy: "BifengA", "BifengB", "STKaiti", "KaiTi", serif;
  --chill: var(--maple);
  --latin: var(--maple);
  --maxwell: var(--maple);
  --romance: var(--maple);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

p {
  margin: 0;
}

img {
  display: block;
  max-width: none;
  user-select: none;
  -webkit-user-drag: none;
}

button {
  font: inherit;
  cursor: pointer;
}

/* ---------- 舞台 ---------- */

.stage {
  position: absolute;
  top: 0;
  left: 50%;
  width: 390px;
  height: 844px;
  margin-left: -195px;
  overflow: hidden;
  background: var(--bg);
  transform-origin: top center;
  will-change: transform;
}

.viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
  touch-action: none;
  cursor: default;
}

.content {
  position: relative;
  width: 390px;
  transform: translate3d(0, 0, 0);
  will-change: transform;
}

/* ---------- 封面 ---------- */

.hero {
  position: relative;
  height: 759px;
  overflow: hidden;
}

/* 封面图按 980 高度居中裁切，让人物落在标题下方；
   底部用渐变和页面背景衔接。 */
.hero__photo {
  position: absolute;
  top: 0;
  left: 50%;
  right: auto;
  bottom: auto;
  width: auto;
  height: 980px;
  transform: translateX(calc(-50% - 25px)) scale(0.8);
  transform-origin: top center;
  -webkit-mask-image: none;
  mask-image: none;
}

.hero::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  height: 100px;
  background: linear-gradient(to bottom, rgba(249, 246, 243, 0), var(--bg));
  pointer-events: none;
}

.hero__title {
  position: absolute;
  z-index: 2;
  top: 13px;
  left: 0;
  width: 100%;
  text-align: center;
  color: var(--ink);
}

.hero__eyebrow {
  display: block;
  font-family: var(--calligraphy);
  font-size: 22.88px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 1px;
}

.hero__script {
  margin: 0;
  font-family: var(--calligraphy);
  font-size: 69.68px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 2.08px;
}

.hero__meta {
  position: absolute;
  z-index: 2;
  left: 0;
  bottom: 73px;
  width: 100%;
  text-align: center;
}

.hero__names {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
  padding: 5px 0;
  line-height: 1;
}

.hero__names span {
  font-family: var(--chill);
  font-size: 21.84px;
  letter-spacing: 4.16px;
}

.hero__names em {
  font-family: var(--chill);
  font-style: normal;
  font-size: 21.84px;
}

.hero__date {
  margin-top: 17px;
  font-family: var(--serif-ji);
  font-size: 12.48px;
  line-height: 1.8;
  letter-spacing: 1.04px;
}

.hero__welcome {
  margin-top: 10px;
  font-family: var(--maxwell);
  font-size: 12.48px;
  line-height: 1.8;
  letter-spacing: 2.08px;
}

/* ---------- 开篇诗 ---------- */

.intro {
  position: relative;
  z-index: 2;
  margin-top: -33px;
  padding: 4px 0 6px;
  text-align: center;
  font-size: 12.48px;
  line-height: 26.208px;
  letter-spacing: 1.04px;
}

.intro p + p {
  margin-top: 26.208px;
}

/* ---------- 近景照 ---------- */

.close {
  position: relative;
  height: 409px;
  margin: 21px 0 0;
  overflow: hidden;
}

.close img {
  width: 390px;
  height: 409px;
  margin-left: 0;
  object-fit: cover;
  object-position: center top;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 16%, #000 84%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 16%, #000 84%, transparent 100%);
}

/* ---------- 通用居中引言 ---------- */

.center-quote {
  margin-top: 19px;
  padding-bottom: 10px;
  text-align: center;
}

.quote-script {
  font-family: var(--chill);
  font-size: 17.68px;
  line-height: 1.6;
  letter-spacing: 2.08px;
}

.quote-en {
  margin-top: 20px;
  font-size: 12.48px;
  line-height: 26.208px;
  letter-spacing: 1.04px;
}

/* ---------- 新郎新娘 ---------- */

.couple {
  position: relative;
  height: 432px;
  margin-top: 74px;
}

.couple__card {
  position: absolute;
  margin: 0;
  overflow: hidden;
  background: #ece8e4;
}

.couple__card--bride {
  top: 0;
  left: 0;
  width: 190px;
  height: 285px;
}

.couple__card--groom {
  top: 65px;
  left: 200px;
  width: 190px;
  height: 284px;
}

.couple__card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.couple__card-img--bride {
  transform: scale(1.4);
  transform-origin: center center;
}

.couple__label {
  position: absolute;
}

.couple__label p {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-family: var(--serif);
  font-size: 17.68px;
  line-height: 1;
  letter-spacing: 2.08px;
  white-space: nowrap;
}

.couple__label em {
  font-family: var(--latin);
  font-style: normal;
  font-size: 18.72px;
  letter-spacing: 0;
}

.couple__label--bride {
  top: 314px;
  left: 12px;
}

.couple__label--groom {
  top: 359px;
  left: 200px;
}

.couple__rule {
  position: absolute;
  top: -15px;
  left: -79px;
  width: 248px;
  height: 1px;
  background: var(--ink);
}

/* ---------- 爱是万物 ---------- */

.love {
  position: relative;
  height: 468px;
}

.love__text {
  position: absolute;
  top: 0;
  left: 43px;
  width: 188px;
  font-size: 12.48px;
  line-height: 26.208px;
  letter-spacing: 1.04px;
}

.vertical {
  position: absolute;
  z-index: 3;
  width: 75px;
  font-family: var(--calligraphy);
  font-size: 48.88px;
  font-weight: 400;
  line-height: 1.1;
  text-align: center;
  color: var(--ink);
}

.vertical--women {
  top: 42px;
  right: 28px;
}

.love__photo {
  position: absolute;
  top: 184px;
  left: 0;
  width: 390px;
  height: 284px;
  margin: 0;
  overflow: hidden;
}

.love__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* 图片上下边缘的渐进高斯模糊 */
.love__photo::before,
.love__photo::after {
  content: "";
  position: absolute;
  right: 0;
  left: 0;
  z-index: 2;
  height: 50px;
  pointer-events: none;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.love__photo::before {
  top: 0;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, transparent 100%);
}

.love__photo::after {
  bottom: 0;
  -webkit-mask-image: linear-gradient(to top, #000 0%, transparent 100%);
  mask-image: linear-gradient(to top, #000 0%, transparent 100%);
}

.for-you {
  margin-top: 33px;
  padding: 5px 0;
  text-align: center;
  font-size: 12.48px;
  line-height: 26.208px;
  letter-spacing: 1.04px;
}

/* ---------- To me ---------- */

.center-quote--to-me {
  margin-top: 27px;
  padding: 5px 0;
}

.center-quote--to-me .quote-en {
  margin-top: 0;
  line-height: 27.456px;
}

/* ---------- 日历 ---------- */

.calendar-section {
  position: relative;
  margin-top: 32px;
  overflow: hidden;
}

.calendar-section__bg {
  position: absolute;
  top: 107px;
  left: 0;
  width: 390px;
  height: calc(100% - 107px);
  object-fit: cover;
  object-position: center top;
  opacity: 0.2;
  pointer-events: none;
}

.calendar-section__inner {
  position: relative;
  z-index: 1;
}

.calendar-poem {
  padding: 5px 0;
  text-align: center;
  font-size: 12.48px;
  line-height: 26.208px;
  letter-spacing: 1.04px;
}

.calendar-wrap {
  width: 289px;
  height: 289px;
  margin: 53px auto 0;
}

.calendar {
  width: 338px;
  height: 338px;
  padding: 21.84px 23.92px 0;
  transform: scale(0.855);
  transform-origin: top left;
}

.calendar__head {
  font-family: var(--serif);
  font-size: 37.44px;
  line-height: 1;
  letter-spacing: 1px;
  color: var(--ink-soft);
}

.calendar__head span {
  margin: 0 3px;
  font-size: 16.64px;
}

.calendar__week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  align-items: center;
  height: 26px;
  margin: 22.88px 10px 0;
}

.calendar__week span {
  text-align: center;
  font-size: 12.48px;
  font-weight: 600;
  color: var(--ink-soft);
}

.calendar__grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-auto-rows: 26px;
  row-gap: 8.3px;
  margin: 5.2px 10px 0;
}

.calendar__year {
  position: absolute;
  top: 15%;
  left: 50%;
  z-index: 0;
  transform: translateX(-50%);
  font-size: 79px;
  font-weight: 600;
  line-height: 1;
  color: var(--ink-soft);
  opacity: 0.1;
  white-space: nowrap;
  pointer-events: none;
}

.calendar__day {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13.5px;
  color: #666;
}

.calendar__day.is-active {
  color: #fff;
}

.calendar__day.is-active::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--ink-soft);
}

.sweet {
  margin-top: 95px;
  padding-right: 25px;
  text-align: right;
  font-family: var(--romance);
  font-size: 20.8px;
  line-height: 35.36px;
  letter-spacing: 2.08px;
}

/* ---------- 信笺 ---------- */

.letter {
  position: relative;
  z-index: 2;
  margin-top: 40px;
}

.letter__poem {
  padding-left: 35px;
  font-size: 12.48px;
  line-height: 26.208px;
  letter-spacing: 1.04px;
}

.letter__photo {
  position: relative;
  width: 390px;
  height: 213px;
  margin: 26px 0 95px;
}

.letter__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.letter__no-one {
  position: absolute;
  right: 0;
  bottom: -34px;
  z-index: 2;
  width: 293px;
  text-align: right;
  font-size: 12.48px;
  line-height: 26.208px;
  letter-spacing: 1.04px;
}

.letter__wheat {
  padding: 5px 0;
  text-align: center;
  font-size: 12.48px;
  line-height: 26.208px;
  letter-spacing: 1.04px;
}

/* ---------- 全幅合影 ---------- */

.wide-photo {
  width: 390px;
  height: 560px;
  margin: 77px 0 0;
  overflow: hidden;
}

.wide-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* ---------- 婚礼信息 ---------- */

.info {
  position: relative;
  margin-top: 15px;
  padding-bottom: 20px;
}


.info__head {
  position: relative;
  height: 97px;
}

.info__welcome {
  position: absolute;
  top: 0;
  left: 7px;
  font-family: var(--latin);
  font-size: 12.48px;
  line-height: 1.8;
  letter-spacing: 1.04px;
}

.info__title {
  position: absolute;
  top: 48px;
  right: 7px;
  margin: 0;
  font-family: var(--calligraphy);
  font-size: 35.36px;
  font-weight: 400;
  line-height: 1.1;
  text-align: right;
}

.info__body {
  position: relative;
  height: 216px;
  padding-top: 24px;
}

.info__details {
  width: 259px;
  margin-left: 97px;
  text-align: right;
  font-size: 12.48px;
  line-height: 26.208px;
  letter-spacing: 1.04px;
}

.info__date {
  font-family: var(--serif);
}

.info__venue {
  margin-top: 29px;
}

.info__save {
  margin-top: 50px;
  font-family: var(--latin);
  font-size: 12.48px;
  line-height: 1.8;
  letter-spacing: 1.04px;
}

.countdown {
  position: absolute;
  top: 89px;
  left: 4px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 88px;
}

.countdown__line {
  position: absolute;
  top: -80px;
  left: 43px;
  width: 1px;
  height: 80px;
  background: var(--ink);
}

.cd-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
}

.cd-num {
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1;
  letter-spacing: 1.5px;
}

.cd-label {
  margin-top: 6px;
  font-size: 10px;
  line-height: 1;
  letter-spacing: 2px;
}

/* ---------- 婚礼视频 ---------- */

.videos {
  position: relative;
  margin-top: 42px;
  padding-bottom: 48px;
}

.video-item {
  position: relative;
  width: 390px;
  margin: 0 0 24px;
  overflow: hidden;
  background: #000;
}

.video-item:last-child {
  margin-bottom: 0;
}

.video-item__video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  background: #000;
}

.video-item__cover {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: opacity 0.15s;
}

.video-item.is-playing .video-item__cover {
  opacity: 0;
  visibility: hidden;
}

.video-item__play {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 96px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  transform: translate(-50%, -50%);
  transition: opacity 0.25s;
  -webkit-tap-highlight-color: transparent;
}

.video-item__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.32);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.25);
}

.video-item__icon svg {
  width: 36px;
  height: 36px;
  margin-left: 4px;
  fill: #fff;
}

.video-item.is-playing .video-item__play {
  opacity: 0;
  pointer-events: none;
}

.video-item__progress {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 3;
  height: 18px;
  cursor: pointer;
}

.video-item__progress::before {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 18px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.42), transparent);
  pointer-events: none;
}

.video-item__track,
.video-item__fill {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 4px;
}

.video-item__track {
  right: 0;
  background: rgba(255, 255, 255, 0.38);
}

.video-item__fill {
  width: 0;
  background: #fff;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.55);
}

/* ---------- 音乐按钮 ---------- */

.music {
  position: absolute;
  top: 11px;
  right: 11px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  background: rgba(156, 132, 117, 0.28);
  color: #fff;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: transform 0.2s, background 0.2s;
}

.music svg {
  display: block;
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.music::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1px;
  height: 27px;
  background: #fff;
  opacity: 0;
  transform: translate(-50%, -50%) rotate(45deg);
  transition: opacity 0.2s;
}

.music.is-paused::after {
  opacity: 1;
}

.music:hover {
  background: rgba(156, 132, 117, 0.42);
}

.music:active {
  transform: scale(0.94);
}

/* ---------- 小屏适配 ---------- */

@media (prefers-reduced-motion: reduce) {
  .content {
    will-change: auto;
  }

  .music {
    transition: none;
  }
}
