:root {
  --ink: #211d18;
  --paper: #f5efe4;
  --ivory: #fff9ed;
  --muted: #d9cdbb;
  --gold: #d7b77d;
  --gold-dark: #8a6734;
  --night: #11130f;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "DM Sans", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--night); color: var(--ivory); font: 400 16px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
body { margin: 0; overflow-x: hidden; background: var(--night); }
body.dialog-open { overflow: hidden; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.film-loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 28px;
  background: linear-gradient(180deg, #14110ecc 0%, #151712f2 45%, #151712f7 100%);
  color: var(--ivory);
  text-align: center;
  transition: opacity 500ms cubic-bezier(.22, 1, .36, 1), visibility 500ms, background 420ms ease;
}
.film-loader.is-ready {
  cursor: pointer;
  background: rgba(12, 14, 11, 0.28);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.film-loader.is-ready .film-loader-monogram,
.film-loader.is-ready .film-loader-title,
.film-loader.is-ready .film-loader-track,
.film-loader.is-ready .film-loader-pct,
.film-loader.is-ready .film-loader-label { display: none; }
.film-loader.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
.film-loader-monogram { width: 58px; height: 58px; margin-bottom: 8px; filter: drop-shadow(0 4px 18px #0007); }
.film-loader-title { margin: 0; font: 500 32px/1 var(--serif); letter-spacing: -.02em; }
.film-loader-label { margin: 0; color: #f2d6a5; font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; }
.film-loader-track { width: min(260px, 68vw); height: 2px; overflow: hidden; background: #ffffff1c; }
.film-loader-track span { display: block; width: 100%; height: 100%; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform 180ms linear; }
.film-loader-pct { margin: 0; color: #cbc6bb; font: 400 12px/1 var(--serif); letter-spacing: .04em; }
.film-loader-hint {
  margin: 0;
  color: #f2d6a5;
  font: 500 clamp(0.95rem, 2.8vw, 1.15rem)/1.5 var(--sans);
  letter-spacing: .12em;
  text-transform: uppercase;
  animation: tap-pulse 1.8s ease-in-out infinite;
  text-shadow: 0 2px 18px #000a;
}
.film-loader-hint[hidden] { display: none !important; }
@keyframes tap-pulse {
  0%, 100% { opacity: .72; }
  50% { opacity: 1; }
}

.journey { position: relative; height: 650vh; }
.journey-stage { position: sticky; top: 0; height: 100vh; height: 100dvh; min-height: 460px; overflow: hidden; isolation: isolate; }
.film-region { position: absolute; inset: 0; z-index: -2; background: #171914; }
#journey-video { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.film-region::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, #0b0d0a5c 0%, transparent 25%, transparent 55%, #0b0d0aa6 100%); }

.site-header { position: absolute; top: 0; left: 0; right: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: max(15px, env(safe-area-inset-top)) clamp(20px, 4vw, 58px) 12px; text-shadow: 0 1px 10px #000b; }
.header-place { color: #f7edde; font-size: 9px; letter-spacing: .15em; text-transform: uppercase; }
.header-link { min-height: 44px; padding: 0; border: 0; background: none; color: #fff8eb; cursor: pointer; font-size: 9px; letter-spacing: .14em; text-transform: uppercase; }
.header-link span { color: var(--gold); }

.copy-region { position: absolute; inset: 0; pointer-events: none; }
.chapter-copy { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 84px clamp(22px, 5vw, 70px) 92px; opacity: 0; visibility: hidden; text-align: center; transition: opacity 180ms linear, visibility 180ms; }
.chapter-copy.is-active { visibility: visible; pointer-events: auto; }
.copy-panel { width: min(100%, 680px); }
.eyebrow { margin: 0 0 14px; color: #f4d9aa; font-size: 10px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; text-shadow: 0 1px 10px #000; }
.chapter-copy h1, .chapter-copy h2 { margin: 0; font-family: var(--serif); font-weight: 500; letter-spacing: -.035em; text-shadow: 0 2px 24px #0009; }
.chapter-copy h1 { font-size: clamp(4rem, 14vw, 7.5rem); line-height: .8; }
.chapter-copy h1 span { display: block; }
.chapter-copy h1 em { display: block; margin: 8px 0; color: #f0d7aa; font-size: .42em; font-style: italic; line-height: 1; }
.chapter-copy h2 { font-size: clamp(2.8rem, 9vw, 5.6rem); line-height: .92; }
.chapter-copy h2 em { color: #f5ddb4; font-weight: 400; }
.copy-note { margin: 18px auto 0; max-width: 40ch; color: #fff8ed; font: 400 clamp(1rem, 2.2vw, 1.25rem)/1.55 var(--serif); text-shadow: 0 1px 12px #000c; }

.site-header { display: none; }
.chapter-1 {
  align-items: stretch;
  justify-content: stretch;
  padding: 8svh clamp(22px, 5vw, 70px) 11svh;
  color: var(--ivory);
}
.chapter-1::before {
  content: "";
  position: absolute;
  inset: 48% 0 0;
  z-index: -1;
  background: linear-gradient(0deg, #0e100ddd 0%, #11130fa6 55%, transparent);
}
.chapter-1 .eyebrow {
  color: #f4d9aa;
  text-shadow: 0 1px 10px #000;
  margin-bottom: 12px;
}
.chapter-1 h1 { text-shadow: 0 2px 22px #000a; }
.chapter-1 h1 em { color: #f0d7aa; }
.chapter-1 .copy-note,
.chapter-1 .hero-date {
  color: #fff8ed;
  text-shadow: 0 1px 12px #000c;
}
.hero-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  width: min(100%, 680px);
  height: 100%;
  margin-inline: auto;
  text-align: center;
}
.hero-brand { width: 100%; }
.hero-footer {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.chapter-1 .copy-note { margin: 0; }
.hero-date {
  margin: 0;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.hero-date span { display: block; margin-top: 5px; font-size: 9px; }
.countdown {
  width: min(100%, 390px);
  margin: 8px auto 0;
  padding: 16px 18px 18px;
  border: 1px solid rgba(255, 248, 235, 0.22);
  border-radius: 16px;
  background: rgba(18, 16, 12, 0.28);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  color: #fff8ed;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.18);
}
.countdown-label {
  display: block;
  margin-bottom: 10px;
  color: #f0d7aa;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: .15em;
  text-transform: uppercase;
  text-shadow: none;
}
.countdown-values { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.countdown-values span { display: flex; flex-direction: column; }
.countdown-values b { font: 600 clamp(1.2rem, 4vw, 1.7rem)/1 var(--serif); color: #fff8ed; text-shadow: 0 1px 10px #0008; }
.countdown-values small { margin-top: 4px; color: #e8d6b8; font-size: 7px; letter-spacing: .1em; text-transform: uppercase; }

.chapter-2 { align-items: flex-end; padding-bottom: 13svh; }
.chapter-2::before, .chapter-3::before, .chapter-4::before, .chapter-5::before { content: ""; position: absolute; inset: 42% 0 0; z-index: -1; background: linear-gradient(0deg, #0e100ddd 0%, #11130fa6 55%, transparent); }
.family-panel { max-width: 600px; }
.family-names { margin: 19px 0 0; color: var(--ivory); font: 500 clamp(1.2rem, 3vw, 1.55rem)/1.2 var(--serif); }
.family-divider { display: block; margin: 5px 0 -10px; color: var(--gold); font: italic 1rem var(--serif); }
.family-panel .copy-note { margin-top: 18px; }

.chapter-3, .chapter-4 { align-items: flex-end; padding-bottom: 12svh; }
.schedule-panel { max-width: 620px; }
.film-events { display: grid; gap: 0; margin: 24px auto 0; border-top: 1px solid #f3d49c66; border-bottom: 1px solid #f3d49c66; }
.film-events p { display: flex; align-items: baseline; justify-content: space-between; gap: 22px; margin: 0; padding: 11px 0; color: var(--ivory); }
.film-events p + p { border-top: 1px solid #ffffff22; }
.film-events span { flex: 0 0 auto; color: #efd29d; font-size: 10px; font-weight: 600; letter-spacing: .1em; }
.film-events strong { font: 500 clamp(1.1rem, 3vw, 1.35rem) var(--serif); text-align: right; }
.text-link { min-height: 44px; margin-top: 12px; padding: 0; border: 0; background: none; color: #f6dfb7; cursor: pointer; font-size: 9px; letter-spacing: .13em; text-decoration: underline; text-underline-offset: 4px; text-transform: uppercase; }

.chapter-5 { align-items: flex-end; padding-bottom: 11svh; }
.chapter-5::before { inset: 25% 0 0; background: linear-gradient(0deg, #080a09ed 0%, #0a0c0abf 58%, transparent); }
.finale-note { margin: 14px auto 0; max-width: 35ch; color: #e5dbca; font: 400 1rem/1.5 var(--serif); }
.rsvp-actions { display: flex; justify-content: center; gap: 10px; margin-top: 23px; }
.rsvp-button { min-height: 46px; padding: 0 18px; border: 1px solid #e6c88d; border-radius: 999px; background: #d6b575; color: #201b14; cursor: pointer; font-size: 10px; font-weight: 600; letter-spacing: .04em; }
.rsvp-button.secondary { background: #181913b8; color: var(--ivory); }
.rsvp-button:active, .header-link:active, .text-link:active, .scroll-cue:active, .music-toggle:active { transform: scale(.97); }

.journey-footer { position: absolute; right: clamp(20px, 4vw, 58px); bottom: max(10px, env(safe-area-inset-bottom)); left: clamp(20px, 4vw, 58px); z-index: 6; display: flex; align-items: center; gap: 18px; text-shadow: 0 1px 8px #000; }
.music-toggle { display: inline-flex; width: 44px; height: 44px; flex: 0 0 auto; align-items: center; justify-content: center; padding: 0; border: 0; background: none; color: var(--ivory); cursor: pointer; font-size: 22px; line-height: 1; filter: drop-shadow(0 1px 8px #000a); }
.music-toggle[hidden] { display: none; }
.music-icon-on { display: none; }
.music-toggle.is-on .music-icon-on { display: inline; }
.music-toggle.is-on .music-icon-off { display: none; }
.chapter-caption { display: flex; align-items: baseline; gap: 8px; margin: 0; color: #ddd2c1; font-size: 8px; letter-spacing: .12em; text-transform: uppercase; }
.chapter-caption b { color: var(--gold); font: 500 15px var(--serif); }
.scroll-cue { display: inline-flex; min-height: 34px; align-items: center; gap: 7px; margin-left: auto; padding: 4px 9px; border: 1px solid #d0b07a66; background: #161811b8; color: var(--ivory); cursor: pointer; font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.scroll-cue-arrow { color: var(--gold); font-size: 13px; animation: scroll-nudge 1.6s ease-in-out infinite; }
@keyframes scroll-nudge { 50% { transform: translateY(4px); } }
.media-status { position: absolute; right: 0; bottom: calc(100% + 8px); padding: 4px 7px; background: #151712b8; color: #f1d6a8; font-size: 9px; }
.progress { position: absolute; right: 0; bottom: 0; left: 0; z-index: 7; height: 2px; background: #ffffff1a; }
.progress span { display: block; width: 100%; height: 100%; background: var(--gold); transform: scaleX(0); transform-origin: left; }

dialog { width: min(620px, calc(100% - 28px)); max-height: calc(100dvh - 36px); margin: auto; padding: 38px 28px 30px; overflow-y: auto; border: 1px solid #aa9066; border-radius: 0; background: var(--paper); color: var(--ink); box-shadow: 0 24px 70px #0009; opacity: 0; transform: translateY(12px) scale(.985); transition: overlay 280ms allow-discrete, display 280ms allow-discrete, opacity 280ms ease, transform 320ms cubic-bezier(.22, 1, .36, 1); overscroll-behavior: contain; }
dialog[open] { opacity: 1; transform: none; }
@starting-style { dialog[open] { opacity: 0; transform: translateY(12px) scale(.985); } }
dialog::backdrop { background: #11130fd9; opacity: 0; transition: opacity 280ms ease, overlay 280ms allow-discrete, display 280ms allow-discrete; }
dialog[open]::backdrop { opacity: 1; }
@starting-style { dialog[open]::backdrop { opacity: 0; } }
dialog .eyebrow { color: var(--gold-dark); text-shadow: none; }
.dialog-close { position: absolute; top: 5px; right: 6px; width: 44px; height: 44px; border: 0; background: none; color: var(--ink); cursor: pointer; font: 300 28px/1 var(--sans); }
.dialog-title { margin: 7px 0 5px; font: 500 clamp(2.4rem, 7vw, 3.5rem)/1 var(--serif); letter-spacing: -.03em; }
.dialog-desc { margin: 0 0 22px; color: #6e6455; font-size: 13px; }
.modal-events-list { border-top: 1px solid #cbbfae; }
.modal-event-card { display: grid; grid-template-columns: 28px 1fr; gap: 12px; padding: 21px 0; border-bottom: 1px solid #cbbfae; }
.event-number { color: #9a7948; font-size: 10px; }
.modal-event-card p, .modal-event-card h3 { margin: 0; }
.modal-event-card .event-date { color: #8b6a3a; font-size: 9px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.modal-event-card h3 { margin: 5px 0 3px; font: 500 27px/1 var(--serif); }
.modal-event-card p:not(.event-date) { color: #51493e; font-size: 12px; }
.modal-event-card small { display: block; margin-top: 5px; color: #776c5d; font-size: 10px; }
.calendar-link { display: inline-flex; min-height: 44px; align-items: center; margin-top: 18px; color: #725326; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; text-underline-offset: 4px; }
.rsvp-family-tabs { display: flex; gap: 6px; margin-bottom: 18px; }
.family-tab { min-height: 44px; flex: 1; border: 1px solid #b9aa93; background: transparent; color: var(--ink); cursor: pointer; font-size: 11px; }
.family-tab.active { border-color: #886837; background: #dac69f; font-weight: 600; }
.contact-options { display: grid; gap: 7px; margin-bottom: 18px; }
.contact-option { display: flex; min-height: 55px; align-items: center; justify-content: space-between; padding: 9px 12px; border: 1px solid #c7baa7; cursor: pointer; }
.contact-option span { display: flex; flex-direction: column; }
.contact-option strong { font: 600 15px var(--serif); }
.contact-option small { color: #756a5b; font-size: 10px; }
.contact-option input { accent-color: #8a6734; }
form > label, .form-row label { display: block; margin: 14px 0; color: #5e5447; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
form label > span { color: #938878; text-transform: none; }
.rsvp-input { width: 100%; min-height: 44px; margin-top: 6px; padding: 10px; border: 1px solid #bdb09d; border-radius: 0; background: #fffaf2; color: var(--ink); font-size: 16px; letter-spacing: 0; text-transform: none; }
.rsvp-input:focus { outline: 2px solid #957342; outline-offset: 2px; }
textarea.rsvp-input { resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 110px; gap: 12px; }
.form-submit { width: 100%; margin-top: 4px; }

@media (min-width: 800px) {
  .chapter-copy { justify-content: flex-start; text-align: left; }
  .copy-panel { width: min(46vw, 610px); margin-left: clamp(3vw, 6vw, 90px); }
  .chapter-1 {
    align-items: stretch;
    padding: 72px clamp(22px, 5vw, 70px) 92px;
    color: var(--ivory);
  }
  .chapter-1::before {
    inset: 0 42% 0 0;
    background: linear-gradient(90deg, #0d100dc7 0%, #0d100d73 58%, transparent);
  }
  .chapter-1 .eyebrow, .chapter-1 .copy-note, .chapter-1 .hero-date {
    color: var(--ivory);
    text-shadow: 0 1px 12px #000;
  }
  .chapter-1 h1 { text-shadow: 0 2px 24px #0009; }
  .chapter-1 h1 span { display: inline; }
  .chapter-1 h1 em { display: inline-block; margin: 0 .12em; font-size: .5em; vertical-align: .14em; }
  .hero-panel {
    align-items: flex-start;
    text-align: left;
    margin-inline: 0;
    height: calc(100dvh - 164px);
    max-height: calc(100dvh - 164px);
  }
  .hero-footer { align-items: flex-start; }
  .hero-date span { display: inline; margin-left: 12px; }
  .countdown { margin-left: 0; }
  .chapter-2, .chapter-3, .chapter-4, .chapter-5 { align-items: center; padding-bottom: 92px; }
  .chapter-2::before, .chapter-3::before, .chapter-4::before, .chapter-5::before { inset: 0 42% 0 0; background: linear-gradient(90deg, #0c0e0cd6 0%, #0c0e0c75 62%, transparent); }
  .film-events, .copy-note { margin-left: 0; }
  .rsvp-actions { justify-content: flex-start; }
}

@media (max-width: 560px) {
  .chapter-caption { display: none; }
  .rsvp-actions { flex-direction: column; align-items: stretch; }
  .rsvp-button { width: 100%; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  dialog { padding: 36px 20px 25px; }
}

@media (max-height: 720px) and (max-width: 799px) {
  .chapter-copy { padding-top: 68px; padding-bottom: 66px; }
  .chapter-1 { padding-top: 6svh; padding-bottom: 9svh; }
  .chapter-copy h1 { font-size: clamp(3.2rem, 12vw, 4.2rem); }
  .chapter-copy h2 { font-size: clamp(2.25rem, 8vw, 3rem); }
  .hero-panel { gap: 14px; }
  .countdown { padding: 12px 14px 14px; margin-top: 4px; }
  .film-events { margin-top: 15px; }
  .copy-note, .finale-note { margin-top: 10px; }
  .chapter-1 .copy-note { margin-top: 0; }
  .rsvp-actions { margin-top: 15px; }
}

@media (orientation: landscape) and (max-height: 600px) {
  .journey-stage { min-height: 320px; }
  .chapter-copy { align-items: center; justify-content: flex-start; padding: 55px 70px; text-align: left; }
  .copy-panel { width: 52%; margin-left: 2vw; }
  .chapter-copy h1 { font-size: 45px; }
  .chapter-copy h1 span, .chapter-copy h1 em { display: inline; }
  .chapter-copy h2 { font-size: 36px; }
  .chapter-copy::before { inset: 0 38% 0 0; background: linear-gradient(90deg, #0d100dd1, transparent); }
  .chapter-1 { color: var(--ivory); padding: 40px 70px; }
  .chapter-1::before { inset: 0 38% 0 0; background: linear-gradient(90deg, #0d100dd1, transparent); }
  .chapter-1 .eyebrow, .chapter-1 .copy-note, .chapter-1 .hero-date { color: var(--ivory); text-shadow: 0 1px 10px #000; }
  .hero-panel { height: auto; max-height: none; align-items: flex-start; text-align: left; gap: 14px; margin-inline: 0; }
  .hero-footer { align-items: flex-start; }
  .countdown { margin: 4px 0 0; padding: 12px 14px; }
  .film-events { margin-top: 12px; }
  .rsvp-actions { margin-top: 12px; }
}

@media (hover: hover) {
  .header-link:hover, .text-link:hover, .calendar-link:hover { color: var(--gold); }
  .rsvp-button:hover { background: #ead29f; }
  .rsvp-button.secondary:hover { background: #28291f; }
}

html.static-journey .journey { height: auto; }
html.static-journey .journey-stage { position: relative; }
html.static-journey .scroll-cue, html.static-journey .progress { display: none; }

@media (prefers-reduced-motion: reduce) {
  .journey { height: auto; }
  .journey-stage { position: relative; }
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
