:root {
  --forest-950: #10251f;
  --forest-900: #17372d;
  --forest-800: #21483a;
  --forest-700: #2b5a48;
  --bone: #f5efe3;
  --bone-soft: #d9d1c0;
  --amber: #d5a25d;
  --amber-soft: #f0cf98;
  --ink: #17271f;
  --line: rgb(245 239 227 / .2);
  --shadow: 0 18px 50px rgb(6 19 14 / .26);
  --serif: "Iowan Old Style", "STSong", "SimSun", serif;
  --sans: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; background: var(--forest-950); }
body { margin: 0; color: var(--bone); background: var(--forest-950); font-family: var(--sans); font-size: 16px; line-height: 1.7; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button { cursor: pointer; }

.page-loader { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 28px; background: var(--forest-950); transition: opacity .45s ease, visibility .45s ease; }
.page-loader__panel { width: min(100%, 320px); }
.page-loader__photo-wrap { width: 112px; aspect-ratio: 1; margin: 0 auto 22px; overflow: hidden; border: 1px solid rgb(245 239 227 / .34); border-radius: 50%; box-shadow: 0 12px 36px rgb(0 0 0 / .24); }
.page-loader__photo { width: 100%; height: 100%; object-fit: cover; object-position: 50% 38%; transform: scale(1.06); }
.page-loader__title { margin: 0 0 18px; color: var(--bone); text-align: center; font: 24px/1.3 var(--serif); }
.page-loader__progress { height: 3px; overflow: hidden; background: rgb(245 239 227 / .2); }
.page-loader__progress span { display: block; width: 0; height: 100%; background: var(--amber); transition: width .16s linear; }
.page-loader__meta { display: flex; justify-content: space-between; margin: 10px 0 0; color: var(--bone-soft); font-size: 12px; }
.page-loader.is-complete { visibility: hidden; opacity: 0; pointer-events: none; }

.section { position: relative; padding: clamp(72px, 11vw, 142px) 0; overflow: hidden; }
.section__inner { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
.eyebrow { margin: 0 0 18px; color: var(--amber-soft); font: 11px/1.4 var(--sans); letter-spacing: .22em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h2 { max-width: 12ch; margin-bottom: 0; color: var(--bone); font: clamp(42px, 6vw, 78px)/1.05 var(--serif); font-weight: 400; letter-spacing: 0; }
.section__intro { max-width: 38em; margin: 20px 0 0; color: var(--bone-soft); }

/* 封面保留大幅照片与下方内容的可见提示。 */
.hero { position: relative; min-height: 92svh; display: flex; align-items: flex-end; overflow: hidden; background: var(--forest-900); }
.hero__image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: center; background: var(--forest-950); }
.hero__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgb(12 28 21 / .18) 10%, transparent 40%, rgb(12 28 21 / .84) 100%); }
.hero__ring { display: none; }
.hero__vertical { position: absolute; z-index: 2; top: 15%; right: 12%; color: var(--bone); writing-mode: vertical-rl; font: clamp(36px, 5vw, 68px)/1.3 var(--serif); letter-spacing: .16em; }
.hero__content { position: relative; z-index: 2; width: min(1120px, calc(100% - 40px)); margin: 0 auto; padding: 0 0 clamp(70px, 10vw, 124px); }
.hero__content .eyebrow { margin-bottom: 18px; }
.hero__names { display: flex; align-items: center; gap: 18px; margin: 0; color: var(--bone); font: clamp(30px, 5vw, 66px)/1.1 var(--serif); font-weight: 400; }
.hero__names i { width: 5px; height: 5px; border-radius: 50%; background: var(--amber); }
.hero__date { margin: 18px 0 0; color: var(--amber-soft); font-size: clamp(16px, 2vw, 22px); letter-spacing: .1em; }
.hero__scroll { position: absolute; z-index: 3; bottom: 25px; left: 50%; display: grid; justify-items: center; gap: 7px; transform: translateX(-50%); color: var(--bone-soft); font-size: 11px; letter-spacing: .08em; white-space: nowrap; }
.hero__scroll i { display: block; width: 1px; height: 30px; background: var(--amber); animation: drift 1.8s ease-in-out infinite; transform-origin: top; }

.invitation { background: var(--forest-900); }
.invitation__grid { display: grid; grid-template-columns: minmax(220px, .85fr) minmax(0, 1.15fr); gap: clamp(38px, 10vw, 150px); align-items: start; }
.invitation__copy { max-width: 550px; color: var(--bone-soft); font-size: clamp(17px, 2.2vw, 22px); }
.invitation__copy p { margin-bottom: 20px; }
.signature { color: var(--amber-soft); font-family: var(--serif); }

.information { background: var(--forest-800); }
.information__layout { display: grid; grid-template-columns: 1fr auto; gap: 48px; align-items: end; margin-top: 55px; border-top: 1px solid var(--line); }
.information__list { margin: 0; }
.information__list > div { display: grid; grid-template-columns: 110px minmax(0, 1fr); align-items: center; gap: 18px; padding: 17px 0; border-bottom: 1px solid var(--line); }
.information__list dt { color: var(--amber-soft); font-size: 13px; }
.information__list dd { margin: 0; color: var(--bone); font-size: 19px; }
.map-actions { display: flex; flex-wrap: wrap; gap: 10px; padding-bottom: 16px; }
.button { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; padding: 10px 18px; border: 1px solid var(--amber); border-radius: 0; text-decoration: none; transition: transform .2s ease, background-color .2s ease, color .2s ease; }
.button:hover { transform: translateY(-2px); }
.button:active { transform: translateY(1px); }
.button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--amber-soft); outline-offset: 3px; }
.button--solid { background: var(--amber); color: var(--forest-950); }
.button--solid:hover { background: var(--amber-soft); }
.button--ghost { color: var(--amber-soft); }
.button--ghost:hover { background: var(--amber); color: var(--forest-950); }
.button--full { width: 100%; border: 0; }

.countdown { padding: clamp(46px, 7vw, 76px) 0; background: var(--forest-950); text-align: center; }
.countdown p { margin-bottom: 24px; color: var(--amber-soft); font-family: var(--serif); font-size: clamp(19px, 3vw, 28px); }
.countdown__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 680px; margin: 0 auto; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.countdown__unit { padding: 17px 10px 14px; border-right: 1px solid var(--line); }
.countdown__unit:last-child { border-right: 0; }
.countdown__number { display: block; color: var(--bone); font: clamp(30px, 5vw, 58px)/1 var(--serif); }
.countdown__label { display: block; margin-top: 8px; color: var(--bone-soft); font-size: 12px; }

.gallery-section { background: var(--forest-900); }
.carousel { position: relative; margin-top: 46px; }
.carousel__track { display: flex; gap: 16px; width: min(1120px, calc(100% - 40px)); margin: 0 auto; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__slide { flex: 0 0 min(78vw, 820px); display: grid; place-items: center; min-height: min(72svh, 680px); overflow: hidden; background: var(--forest-950); scroll-snap-align: center; box-shadow: var(--shadow); }
.carousel__slide img { width: 100%; height: min(72svh, 680px); object-fit: contain; object-position: center; }
.carousel__button { position: absolute; top: 50%; width: 42px; height: 42px; border: 1px solid var(--amber); background: rgb(16 37 31 / .72); color: var(--amber-soft); font-size: 28px; line-height: 1; transform: translateY(-50%); }
.carousel__button:hover { background: var(--amber); color: var(--forest-950); }
.carousel__button--prev { left: 18px; }
.carousel__button--next { right: 18px; }
.carousel__dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: calc(100% - 40px); margin: 24px auto 0; }
.carousel__dot { width: 16px; height: 3px; border: 0; background: rgb(245 239 227 / .28); }
.carousel__dot.is-active { background: var(--amber); }

.story { background: var(--forest-800); }
.timeline { position: relative; max-width: 760px; margin-top: 64px; }
.timeline::before { content: ""; position: absolute; top: 6px; bottom: 10px; left: 9px; width: 1px; background: var(--amber); }
.timeline__item { position: relative; display: grid; grid-template-columns: 108px minmax(0, 1fr); gap: 28px; padding: 0 0 47px 37px; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__item::before { content: ""; position: absolute; top: 4px; left: 5px; width: 9px; height: 9px; border: 1px solid var(--amber); background: var(--forest-800); transform: rotate(45deg); }
.timeline__date { color: var(--amber-soft); font-size: 13px; letter-spacing: .04em; }
.timeline__title { margin: 0 0 8px; color: var(--bone); font: 25px/1.25 var(--serif); }
.timeline__text { margin: 0; color: var(--bone-soft); }

.schedule { background: var(--forest-900); }
.schedule__list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 53px; border-top: 1px solid var(--line); }
.schedule__item { padding: 24px 18px 8px 0; border-right: 1px solid var(--line); }
.schedule__item:not(:first-child) { padding-left: 18px; }
.schedule__item:last-child { border-right: 0; }
.schedule__time { color: var(--amber); font: 26px/1 var(--serif); }
.schedule__title { margin: 18px 0 5px; color: var(--bone); font-size: 18px; }
.schedule__detail { margin: 0; color: var(--bone-soft); font-size: 13px; }

.rsvp { background: var(--forest-800); }
.rsvp__layout { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(42px, 10vw, 150px); }
.rsvp__notice { margin-top: 24px; color: var(--amber-soft); font-size: 13px; }
.rsvp__form { display: grid; align-content: start; align-items: stretch; gap: 9px; text-align: left; }
.rsvp__form label { display: flex; align-items: center; min-height: 20px; margin-top: 10px; color: var(--amber-soft); font-size: 13px; }
.rsvp__form input, .rsvp__form select, .rsvp__form textarea { width: 100%; border: 1px solid rgb(245 239 227 / .28); border-radius: 0; background: rgb(16 37 31 / .28); color: var(--bone); padding: 12px 13px; text-align: left; }
.rsvp__form input::placeholder, .rsvp__form textarea::placeholder { color: rgb(245 239 227 / .5); }
.rsvp__form select option { color: var(--ink); }
.form-error { min-height: 24px; margin: 4px 0 0; color: #f4b0a1; font-size: 13px; }
.rsvp__success { grid-column: 2; border-top: 1px solid var(--amber); padding-top: 24px; }
.rsvp__success h3 { margin-bottom: 6px; color: var(--amber-soft); font: 28px/1.2 var(--serif); font-weight: 400; }
.rsvp__success p { margin: 0; color: var(--bone-soft); }

.footer { padding: 100px 0 115px; background: var(--forest-950); text-align: center; }
.footer h2 { max-width: none; font-size: clamp(38px, 6vw, 66px); }
.footer p { max-width: 520px; margin: 18px auto 0; color: var(--bone-soft); }
.footer__signature { color: var(--amber-soft) !important; font-family: var(--serif); font-size: 22px; }
.footer__date { font-size: 13px; }
.music-toggle { position: fixed; z-index: 20; top: 18px; right: 18px; display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 8px 11px; border: 1px solid rgb(245 239 227 / .48); border-radius: 0; background: rgb(16 37 31 / .72); color: var(--bone); backdrop-filter: blur(10px); }
.music-toggle:hover { border-color: var(--amber); color: var(--amber-soft); }
.music-toggle:disabled { cursor: not-allowed; opacity: .7; }
.music-toggle__icon { color: var(--amber); font-size: 17px; }
.music-toggle__text { font-size: 12px; }

.reveal { opacity: 0; transform: translate3d(0, 34px, 0); transition: opacity .72s ease, transform .72s cubic-bezier(.22, .72, .18, 1); }
.reveal--from-left { transform: translate3d(-42px, 0, 0); }
.reveal--from-right { transform: translate3d(42px, 0, 0); }
.reveal--zoom { transform: scale(.96); }
.reveal.is-visible { opacity: 1; transform: none; }
.hero__vertical, .hero__content, .hero__scroll { opacity: 0; }
body.is-ready .hero__vertical { animation: slide-down .75s .12s cubic-bezier(.22, .72, .18, 1) forwards; }
body.is-ready .hero__content { animation: slide-up .8s .24s cubic-bezier(.22, .72, .18, 1) forwards; }
body.is-ready .hero__scroll { animation: fade-in .6s .8s ease forwards; }
@keyframes drift { 0%, 100% { opacity: .35; transform: scaleY(.65); } 50% { opacity: 1; transform: scaleY(1); } }
@keyframes slide-up { from { opacity: 0; transform: translate3d(0, 34px, 0); } to { opacity: 1; transform: none; } }
@keyframes slide-down { from { opacity: 0; transform: translate3d(0, -28px, 0); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 720px) {
  .section { padding: 74px 0; }
  h2 { max-width: none; font-size: 40px; line-height: 1.15; }
  .section__inner, .hero__content, .carousel__track { width: min(100% - 36px, 560px); }
  .hero__vertical { right: 9%; top: 13%; font-size: 36px; }
  .hero__ring { right: 6%; top: 8%; width: 122px; }
  .hero__scroll { bottom: 10px; }
  .hero__scroll span { display: none; }
  .invitation__grid, .rsvp__layout { grid-template-columns: 1fr; gap: 31px; }
  .information__layout { grid-template-columns: 1fr; gap: 22px; margin-top: 38px; }
  .map-actions { padding-bottom: 0; }
  .map-actions .button { flex: 1; }
  .carousel__slide { flex-basis: 88vw; min-height: min(66svh, 560px); }
  .carousel__slide img { height: min(66svh, 560px); }
  .carousel__button { display: none; }
  .timeline { margin-top: 44px; }
  .timeline__item { grid-template-columns: 82px minmax(0, 1fr); gap: 17px; padding-left: 29px; }
  .schedule__list { grid-template-columns: 1fr 1fr; }
  .schedule__item:nth-child(2) { border-right: 0; }
  .schedule__item:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .schedule__item:nth-child(3) { padding-left: 0; }
  .rsvp__success { grid-column: auto; }
}
@media (max-width: 440px) {
  .hero__names { display: grid; gap: 7px; }
  .hero__names i { display: none; }
  .hero__date { letter-spacing: .03em; }
  .information__list > div { grid-template-columns: 80px minmax(0, 1fr); gap: 12px; }
  .countdown__unit { padding-inline: 4px; }
  .countdown__number { font-size: 28px; }
  .countdown__label { font-size: 11px; }
  .timeline__item { grid-template-columns: 1fr; gap: 5px; }
  .schedule__list { grid-template-columns: 1fr; }
  .schedule__item, .schedule__item:nth-child(2), .schedule__item:nth-child(3) { padding: 20px 0; border-right: 0; border-top: 1px solid var(--line); }
  .schedule__item:first-child { border-top: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
  .hero__vertical, .hero__content, .hero__scroll { opacity: 1; }
}

/* 防止相册横向内容把整页网格撑宽，保证照片从手机画布左侧完整出现。 */
.page { min-width: 0; }
.page > * { min-width: 0; }
.page--gallery .carousel { width: 100%; min-width: 0; }
.page--gallery .carousel__track { width: calc(100% - 32px); max-width: 560px; min-width: 0; }

/* 用照片填充页面的留白区。照片保持 contain / 安全裁切，文字层始终在上方。 */
.page .section__inner { position: relative; z-index: 2; }
.page-art { position: absolute; z-index: 1; display: block; pointer-events: none; object-fit: cover; opacity: .52; filter: saturate(.82); box-shadow: 0 22px 70px rgb(6 19 14 / .24); }
.page-art--invitation { right: -8%; bottom: -5%; width: 58%; aspect-ratio: 3 / 4; object-position: 50% 34%; transform: rotate(6deg); mix-blend-mode: screen; opacity: .3; }
.page-art--information { top: 8%; right: -8%; width: 43%; aspect-ratio: 3 / 4; object-position: 48% 40%; transform: rotate(-5deg); opacity: .36; }
.page-art--countdown { right: 0; bottom: 0; width: 100%; height: 49%; object-position: center 38%; opacity: .2; mask-image: linear-gradient(to bottom, transparent 0%, #000 24%, #000 100%); }
.page-art--story { top: 7%; right: -10%; width: 51%; height: 86%; object-position: 51% center; opacity: .24; mask-image: linear-gradient(to right, transparent 0%, #000 38%, #000 100%); }
.page-art--schedule { right: -8%; bottom: -7%; width: 60%; height: 42%; object-position: 50% 42%; opacity: .3; mask-image: linear-gradient(to top, #000 0%, transparent 100%); }
.page-art--rsvp { top: 0; left: 0; width: 47%; height: 100%; object-position: 42% center; opacity: .16; mask-image: linear-gradient(to right, #000 0%, transparent 96%); }
.page-art--footer { top: 11%; left: 50%; width: min(230px, 51%); aspect-ratio: 1; border-radius: 50%; object-position: center; opacity: .28; transform: translateX(-50%); mask-image: radial-gradient(circle, #000 0 58%, transparent 73%); }
.page--countdown .section__inner, .page--footer .section__inner { position: relative; z-index: 2; }
.page--countdown .section__inner { padding-bottom: 9dvh; }
.page--footer .section__inner { padding-top: 20dvh; }
.page--gallery .section__inner { padding-top: 1dvh; }
.page--gallery .carousel { position: relative; z-index: 2; }
.page--gallery .carousel__track { width: calc(100% - 32px); max-width: 560px; min-width: 0; }
.page--gallery .carousel__slide { flex-basis: min(100%, 560px); min-height: min(58dvh, 570px); }
.page--gallery .carousel__slide img { height: min(58dvh, 570px); }
.page--gallery .carousel__dots { margin-top: 12px; }
.page--letter .invitation__grid { align-items: center; }
.page--letter .invitation__copy { max-width: 61%; margin-left: auto; }
.page--details .information__layout { max-width: 86%; }
.page--timeline .section__inner { max-width: 88%; margin-left: 6%; }
.page--schedule .section__inner { max-width: 88%; margin-left: 6%; }
.page--rsvp .rsvp__layout { max-width: 90%; margin-left: 5%; }
.page--rsvp .rsvp__form { background: rgb(16 37 31 / .38); padding: 14px; border: 1px solid rgb(245 239 227 / .18); backdrop-filter: blur(4px); }

@media (max-width: 720px) {
  .page-art { opacity: .34; }
  .page-art--invitation { right: -16%; bottom: -3%; width: 62%; }
  .page-art--information { top: 5%; right: -13%; width: 42%; }
  .page-art--countdown { height: 46%; opacity: .24; }
  .page-art--story { right: -19%; width: 58%; opacity: .22; }
  .page-art--schedule { right: -12%; bottom: -4%; width: 64%; height: 38%; }
  .page-art--rsvp { width: 61%; opacity: .18; }
  .page-art--footer { top: 13%; width: min(190px, 54%); }
  .page--letter .invitation__copy { max-width: 70%; }
  .page--details .information__layout { max-width: 88%; }
  .page--gallery .section__inner { padding-top: 0; }
  .page--gallery .carousel__slide, .page--gallery .carousel__slide img { min-height: min(55dvh, 500px); height: min(55dvh, 500px); }
  .page--rsvp .rsvp__layout { max-width: 92%; margin-left: 4%; }
}

/* 整页请柬：以 19.5:9（高:宽）为设计画布，实际显示随手机安全区自适应。 */
html, body { height: 100%; overflow: hidden; }
body { display: grid; place-items: center; }
.page-deck {
  width: min(100vw, calc(100dvh * 9 / 19.5));
  height: 100dvh;
  margin: 0 auto;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  box-shadow: 0 0 70px rgb(0 0 0 / .22);
}
.page-deck::-webkit-scrollbar { display: none; }
.page {
  width: 100%;
  min-height: 100dvh;
  height: 100dvh;
  max-height: 100dvh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow: hidden;
  isolation: isolate;
}
.page.section, .page.footer, .page.countdown { display: grid; align-items: center; padding: clamp(42px, 7dvh, 70px) 0; }
.page .section__inner { width: min(calc(100% - 38px), 560px); }
.page h2 { font-size: clamp(35px, 5.6dvh, 54px); }
.page .section__intro { margin-top: 13px; font-size: 14px; line-height: 1.55; }
.hero.page { min-height: 100dvh; }
.hero__content { width: min(calc(100% - 38px), 560px); padding-bottom: clamp(70px, 10dvh, 104px); }
.hero__vertical { font-size: clamp(31px, 5dvh, 48px); }
.page-index {
  position: fixed;
  z-index: 30;
  right: max(14px, calc((100vw - min(100vw, 46.1538dvh)) / 2 + 14px));
  bottom: max(15px, env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: 22px 42px 22px;
  align-items: center;
  gap: 7px;
  color: rgb(245 239 227 / .72);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}
.page-index__current { color: var(--amber-soft); font-size: 12px; }
.page-index__rule { height: 1px; overflow: hidden; background: rgb(245 239 227 / .24); }
.page-index__rule i { display: block; width: 100%; height: 100%; background: var(--amber); transform: scaleX(.111); transform-origin: left; transition: transform .55s cubic-bezier(.22, .72, .18, 1); }

/* 每页使用独立的舞台动作；首次进入后停在最终状态。 */
.page:not(.hero) .eyebrow,
.page:not(.hero) h2,
.page--letter .invitation__copy,
.page--details .information__layout,
.page--count #countdown-label,
.page--count .countdown__unit,
.page--gallery .section__intro,
.page--gallery .carousel,
.page--timeline .timeline__item,
.page--schedule .section__intro,
.page--schedule .schedule__item,
.page--rsvp .rsvp__heading,
.page--rsvp .rsvp__form,
.page--finale p { opacity: 0; }

.page--letter.is-active .eyebrow { animation: page-letter-mark .55s .08s ease forwards; }
.page--letter.is-active h2 { animation: page-letter-title .9s .16s cubic-bezier(.16,.78,.2,1) forwards; }
.page--letter.is-active .invitation__copy { animation: page-letter-copy .8s .38s cubic-bezier(.22,.72,.18,1) forwards; }

.page--details.is-active .eyebrow { animation: page-details-label .5s .08s ease forwards; }
.page--details.is-active h2 { animation: page-details-title .75s .16s cubic-bezier(.2,.8,.2,1) forwards; }
.page--details.is-active .information__layout { animation: page-details-lines .85s .34s cubic-bezier(.16,.78,.2,1) forwards; }

.page--count.is-active #countdown-label { animation: page-count-label .65s .08s ease forwards; }
.page--count.is-active .countdown__unit { animation: page-count-tile .72s cubic-bezier(.2,.85,.25,1) forwards; }
.page--count.is-active .countdown__unit:nth-child(1) { animation-delay: .18s; }
.page--count.is-active .countdown__unit:nth-child(2) { animation-delay: .27s; }
.page--count.is-active .countdown__unit:nth-child(3) { animation-delay: .36s; }
.page--count.is-active .countdown__unit:nth-child(4) { animation-delay: .45s; }

.page--gallery.is-active .eyebrow { animation: page-gallery-label .55s .08s ease forwards; }
.page--gallery.is-active h2 { animation: page-gallery-heading .78s .16s cubic-bezier(.2,.8,.2,1) forwards; }
.page--gallery.is-active .section__intro { animation: page-gallery-heading .7s .28s ease forwards; }
.page--gallery.is-active .carousel { animation: page-gallery-photo 1s .35s cubic-bezier(.16,.78,.2,1) forwards; }

.page--timeline.is-active .eyebrow,
.page--timeline.is-active h2 { animation: page-timeline-heading .72s .1s cubic-bezier(.2,.8,.2,1) forwards; }
.page--timeline.is-active .timeline__item { animation: page-timeline-item .72s cubic-bezier(.2,.8,.2,1) forwards; }
.page--timeline.is-active .timeline__item:nth-child(1) { animation-delay: .26s; }
.page--timeline.is-active .timeline__item:nth-child(2) { animation-delay: .4s; }
.page--timeline.is-active .timeline__item:nth-child(3) { animation-delay: .54s; }

.page--schedule.is-active .eyebrow { animation: page-schedule-heading .6s .08s ease forwards; }
.page--schedule.is-active h2,
.page--schedule.is-active .section__intro { animation: page-schedule-heading .72s .16s ease forwards; }
.page--schedule.is-active .schedule__item { animation: page-schedule-card .66s cubic-bezier(.16,.78,.2,1) forwards; }
.page--schedule.is-active .schedule__item:nth-child(1) { animation-delay: .3s; }
.page--schedule.is-active .schedule__item:nth-child(2) { animation-delay: .4s; }
.page--schedule.is-active .schedule__item:nth-child(3) { animation-delay: .5s; }
.page--schedule.is-active .schedule__item:nth-child(4) { animation-delay: .6s; }

.page--rsvp.is-active .rsvp__heading { animation: page-rsvp-heading .78s .1s cubic-bezier(.2,.8,.2,1) forwards; }
.page--rsvp.is-active .rsvp__form { animation: page-rsvp-form .85s .3s cubic-bezier(.16,.78,.2,1) forwards; }

.page--finale.is-active h2 { animation: page-finale-title 1s .12s cubic-bezier(.16,.78,.2,1) forwards; }
.page--finale.is-active p { animation: page-finale-copy .75s ease forwards; }
.page--finale.is-active p:nth-of-type(1) { animation-delay: .38s; }
.page--finale.is-active p:nth-of-type(2) { animation-delay: .52s; }
.page--finale.is-active p:nth-of-type(3) { animation-delay: .64s; }

@keyframes page-letter-mark { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }
@keyframes page-letter-title { from { opacity: 0; transform: translateY(50px) rotate(-2deg); clip-path: inset(0 0 100%); } to { opacity: 1; transform: none; clip-path: inset(0); } }
@keyframes page-letter-copy { from { opacity: 0; transform: translateX(38px); } to { opacity: 1; transform: none; } }
@keyframes page-details-label { from { opacity: 0; letter-spacing: .45em; } to { opacity: 1; letter-spacing: .22em; } }
@keyframes page-details-title { from { opacity: 0; transform: scale(.78); transform-origin: left; } to { opacity: 1; transform: none; } }
@keyframes page-details-lines { from { opacity: 0; transform: translateY(34px); clip-path: inset(0 0 100%); } to { opacity: 1; transform: none; clip-path: inset(0); } }
@keyframes page-count-label { from { opacity: 0; filter: blur(8px); } to { opacity: 1; filter: none; } }
@keyframes page-count-tile { from { opacity: 0; transform: perspective(500px) rotateX(-70deg) translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes page-gallery-label { from { opacity: 0; transform: translateY(-18px); } to { opacity: 1; transform: none; } }
@keyframes page-gallery-heading { from { opacity: 0; transform: translateX(-35px); } to { opacity: 1; transform: none; } }
@keyframes page-gallery-photo { from { opacity: 0; transform: scale(1.12); clip-path: inset(0 48%); } to { opacity: 1; transform: none; clip-path: inset(0); } }
@keyframes page-timeline-heading { from { opacity: 0; transform: translateY(-24px); } to { opacity: 1; transform: none; } }
@keyframes page-timeline-item { from { opacity: 0; transform: translateX(-40px); } to { opacity: 1; transform: none; } }
@keyframes page-schedule-heading { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: none; } }
@keyframes page-schedule-card { from { opacity: 0; transform: translateY(32px) scale(.92); } to { opacity: 1; transform: none; } }
@keyframes page-rsvp-heading { from { opacity: 0; transform: translateX(-42px); } to { opacity: 1; transform: none; } }
@keyframes page-rsvp-form { from { opacity: 0; transform: translateX(42px); } to { opacity: 1; transform: none; } }
@keyframes page-finale-title { from { opacity: 0; filter: blur(12px); transform: scale(1.18); } to { opacity: 1; filter: none; transform: none; } }
@keyframes page-finale-copy { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

@media (max-width: 720px) {
  .page-deck { width: 100vw; }
  .page.section, .page.footer, .page.countdown { padding: clamp(34px, 5.5dvh, 54px) 0; }
  .page h2 { font-size: clamp(32px, 5.1dvh, 43px); line-height: 1.08; }
  .invitation__grid { gap: clamp(22px, 4dvh, 34px); }
  .invitation__copy { font-size: clamp(15px, 2.25dvh, 18px); line-height: 1.65; }
  .invitation__copy p { margin-bottom: 12px; }
  .information__layout { gap: 16px; margin-top: clamp(25px, 4dvh, 38px); }
  .information__list > div { padding: clamp(10px, 1.8dvh, 16px) 0; }
  .countdown__grid { width: 100%; }
  .carousel { margin-top: clamp(22px, 3.5dvh, 36px); }
  .carousel__slide { flex-basis: calc(100vw - 48px); min-height: min(52dvh, 500px); }
  .carousel__slide img { height: min(52dvh, 500px); }
  .carousel__dots { margin-top: 15px; gap: 6px; }
  .carousel__dot { width: 11px; }
  .timeline { margin-top: clamp(27px, 4dvh, 42px); }
  .timeline__item { grid-template-columns: 78px minmax(0, 1fr); gap: 14px; padding: 0 0 clamp(20px, 3.2dvh, 33px) 27px; }
  .timeline__title { font-size: clamp(19px, 2.8dvh, 24px); }
  .timeline__text { font-size: 13px; line-height: 1.55; }
  .schedule__list { grid-template-columns: 1fr 1fr; margin-top: clamp(24px, 3.8dvh, 40px); }
  .schedule__item, .schedule__item:nth-child(2), .schedule__item:nth-child(3) { padding: 15px 12px; border-top: 1px solid var(--line); border-right: 1px solid var(--line); }
  .schedule__item:nth-child(1), .schedule__item:nth-child(2) { border-top: 0; }
  .schedule__item:nth-child(2), .schedule__item:nth-child(4) { border-right: 0; }
  .schedule__time { font-size: 22px; }
  .schedule__title { margin-top: 10px; font-size: 16px; }
  .schedule__detail { font-size: 12px; line-height: 1.45; }
  .rsvp__layout { gap: clamp(13px, 2.2dvh, 22px); }
  .rsvp__heading h2 { font-size: clamp(29px, 4.5dvh, 39px); }
  .rsvp__notice { display: none; }
  .rsvp__form { gap: 4px; }
  .rsvp__form label { margin-top: 4px; font-size: 12px; }
  .rsvp__form input, .rsvp__form select, .rsvp__form textarea { padding: 8px 10px; }
  .rsvp__form textarea { min-height: 58px; max-height: 72px; }
  .form-error { min-height: 18px; margin: 0; }
  .page-index { right: 14px; }
}

@media (max-height: 680px) {
  .page .eyebrow { margin-bottom: 10px; }
  .page h2 { font-size: 31px; }
  .page .section__intro { display: none; }
  .timeline { margin-top: 20px; }
  .timeline__item { padding-bottom: 15px; }
  .timeline__text { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .carousel__slide, .carousel__slide img { min-height: 48dvh; height: 48dvh; }
  .rsvp__heading .section__intro { display: none; }
  .rsvp__form textarea { min-height: 44px; height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  .page-deck { scroll-behavior: auto; }
  .page * { opacity: 1 !important; transform: none !important; filter: none !important; clip-path: none !important; }
}
