:root {
  --paper: #f4efe9;
  --paper-2: #ece3db;
  --ink: #252321;
  --muted: #79716b;
  --wine: #795057;
  --sage: #dfe4dc;
  --dark: #171717;
  --serif: "Iowan Old Style", "Baskerville", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--paper); }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.is-locked { overflow: hidden; }
img, video { display: block; width: 100%; }
button { font: inherit; }

.progress {
  position: fixed;
  z-index: 50;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: rgba(255,255,255,.18);
  pointer-events: none;
}
.progress span {
  display: block;
  height: 100%;
  width: 0;
  transform-origin: left center;
  background: rgba(255,255,255,.88);
}

.hero {
  position: relative;
  min-height: 100svh;
  color: white;
  overflow: hidden;
}
.hero__image {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  object-position: 50% 42%;
  transform: scale(1.025);
  animation: heroIn 1.8s cubic-bezier(.2,.8,.2,1) both;
}
.hero__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10,10,10,.08) 25%, rgba(10,10,10,.18) 55%, rgba(10,10,10,.72) 100%),
    linear-gradient(90deg, rgba(10,10,10,.12), transparent 55%);
}
.hero__content {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: max(8.5rem, calc(var(--safe-bottom) + 7rem));
  padding: 0 7vw;
}
.eyebrow {
  margin: 0 0 1rem;
  font-size: .72rem;
  font-weight: 650;
  letter-spacing: .22em;
  text-transform: uppercase;
}
.hero h1 {
  max-width: 22rem;
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.7rem, 12vw, 5rem);
  line-height: .98;
  letter-spacing: -.04em;
  text-wrap: balance;
}
.hero__sub {
  margin: 1.4rem 0 0;
  font-size: .88rem;
  opacity: .82;
}
.scroll-cue {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: max(1.8rem, calc(var(--safe-bottom) + 1rem));
  width: 30px;
  height: 46px;
  transform: translateX(-50%);
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 99px;
}
.scroll-cue span {
  position: absolute;
  left: 50%;
  top: 8px;
  width: 3px;
  height: 7px;
  transform: translateX(-50%);
  border-radius: 99px;
  background: white;
  animation: scrollCue 1.8s ease-in-out infinite;
}

.section-pad { padding: 16vh 7vw; }
.statement {
  min-height: 78svh;
  display: grid;
  place-content: center;
  background: var(--paper);
}
.statement .eyebrow { color: var(--wine); }
.statement h2,
.before-final h2 {
  max-width: 30rem;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.25rem, 9.6vw, 4.3rem);
  font-weight: 400;
  line-height: 1.03;
  letter-spacing: -.035em;
  text-wrap: balance;
}
.statement--dark {
  min-height: 92svh;
  color: #f5f1ec;
  background: var(--dark);
}
.statement--dark .eyebrow { color: #b89da2; }

.photo-story {
  background: #f7f3ef;
}
.section-warm { background: var(--paper-2); }
.section-sage { background: var(--sage); }
.photo-card {
  max-width: 34rem;
  margin: 0 auto;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 2px;
  box-shadow: 0 28px 70px rgba(52, 39, 31, .12);
}
.photo-card img { height: 100%; object-fit: cover; }
.photo-card--tall { aspect-ratio: 3 / 4; }
.caption {
  max-width: 28rem;
  margin: 2.8rem auto 0;
  font-family: var(--serif);
  font-size: clamp(1.55rem, 6.4vw, 2.45rem);
  line-height: 1.18;
  letter-spacing: -.02em;
  text-align: center;
  text-wrap: balance;
}
.caption--left { text-align: left; }

.duo {
  position: relative;
  min-height: 110svh;
  background: #d9d2cb;
}
.duo__item {
  width: 72%;
  max-width: 29rem;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(38, 29, 25, .18);
}
.duo__item img { height: 100%; object-fit: cover; }
.duo__item--lower {
  width: 64%;
  margin: -7vh 0 0 auto;
  aspect-ratio: 3 / 4;
}
.duo__text {
  max-width: 27rem;
  margin: 4rem 0 0;
  font-family: var(--serif);
  font-size: clamp(1.55rem, 6vw, 2.45rem);
  line-height: 1.18;
}

.landscape { background: #f7f3ef; }
.landscape__main {
  max-width: 42rem;
  margin: 0 auto;
  overflow: hidden;
  aspect-ratio: 3 / 4;
}
.landscape__main img {
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.full-photo {
  position: relative;
  min-height: 100svh;
  color: white;
  overflow: hidden;
}
.full-photo > img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  object-position: 50% 38%;
}
.full-photo__veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.03) 25%, rgba(0,0,0,.72) 100%);
}
.full-photo__text {
  position: absolute;
  z-index: 2;
  left: 7vw;
  right: 7vw;
  bottom: max(4rem, calc(var(--safe-bottom) + 3rem));
  max-width: 31rem;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2rem, 8.5vw, 3.8rem);
  line-height: 1.05;
  letter-spacing: -.035em;
}
.full-photo__text span { color: #f1dfe2; }

.video-section { background: #111; color: white; }
.video-section .eyebrow { color: #bd9fa5; }
.video-shell {
  overflow: hidden;
  border-radius: 3px;
  box-shadow: 0 35px 85px rgba(0,0,0,.4);
  background: #000;
}
.video-shell video { max-height: 78svh; object-fit: contain; }

.before-final {
  min-height: 110svh;
  background: var(--paper);
}
.formal-photo {
  max-width: 34rem;
  margin: 0 auto;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  box-shadow: 0 24px 65px rgba(49, 40, 34, .12);
}
.formal-photo img { height: 100%; object-fit: cover; }
.before-final__copy {
  display: grid;
  justify-items: start;
  max-width: 34rem;
  margin: 4rem auto 0;
}
.before-final__copy .eyebrow { color: var(--wine); }
.question-button {
  margin-top: 2rem;
  min-height: 56px;
  padding: .95rem 1.35rem;
  border: 1px solid rgba(37,35,33,.6);
  border-radius: 999px;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  transition: color .25s ease, background .25s ease, transform .25s ease;
}
.question-button:active { transform: scale(.98); }
@media (hover:hover) {
  .question-button:hover { color: white; background: var(--ink); }
}

.proposal {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: calc(var(--safe-top) + 2rem) 7vw calc(var(--safe-bottom) + 2rem);
  color: #fff9f4;
  background: #541f2a;
  opacity: 0;
  visibility: hidden;
  transition: opacity .8s ease, visibility .8s step-end;
  overflow: hidden;
}
.proposal.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity .8s ease, visibility 0s step-start;
}
.proposal__glow {
  position: absolute;
  width: 75vw;
  height: 75vw;
  border-radius: 50%;
  background: rgba(255,221,218,.14);
  filter: blur(60px);
  animation: glow 4s ease-in-out infinite alternate;
}
.proposal__content {
  position: relative;
  z-index: 3;
  max-width: 36rem;
  text-align: center;
  transform: translateY(22px);
  opacity: 0;
}
.proposal.is-open .proposal__content {
  animation: proposalIn 1.1s .35s cubic-bezier(.2,.8,.2,1) forwards;
}
.proposal__intro {
  margin: 0 0 2rem;
  font-size: .8rem;
  line-height: 1.6;
  letter-spacing: .16em;
  text-transform: uppercase;
  opacity: .72;
}
.proposal h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(3rem, 13vw, 6rem);
  font-weight: 400;
  line-height: .96;
  letter-spacing: -.045em;
  text-wrap: balance;
}
.proposal__heart {
  margin-top: 2rem;
  font-size: 1.6rem;
  animation: heartbeat 1.8s ease-in-out infinite;
}
.proposal__signature {
  min-height: 1.4em;
  margin: 1.7rem 0 0;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-style: italic;
  opacity: .78;
}
#confetti {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.sound-button {
  position: fixed;
  z-index: 60;
  right: 1rem;
  bottom: max(1rem, calc(var(--safe-bottom) + .7rem));
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255,255,255,.42);
  border-radius: 50%;
  color: white;
  background: rgba(20,20,20,.3);
  backdrop-filter: blur(10px);
}
.sound-button.is-playing .sound-button__icon { animation: spinNote 3s linear infinite; }

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1);
}
.reveal.in-view { opacity: 1; transform: none; }
.delay-1 { transition-delay: .12s; }
.delay-2 { transition-delay: .24s; }

@keyframes heroIn { from { transform: scale(1.09); filter: saturate(.85); } to { transform: scale(1.025); filter: none; } }
@keyframes scrollCue { 0% { opacity:0; transform:translate(-50%,0); } 30% { opacity:1; } 100% { opacity:0; transform:translate(-50%,18px); } }
@keyframes proposalIn { to { transform:none; opacity:1; } }
@keyframes heartbeat { 0%,100% { transform:scale(1); } 15% { transform:scale(1.2); } 28% { transform:scale(1); } 42% { transform:scale(1.12); } 58% { transform:scale(1); } }
@keyframes glow { to { transform:scale(1.18); opacity:.7; } }
@keyframes spinNote { to { transform:rotate(360deg); } }

@media (min-width: 740px) {
  .section-pad { padding-left: max(7vw, calc((100vw - 720px) / 2)); padding-right: max(7vw, calc((100vw - 720px) / 2)); }
  .hero__content, .full-photo__text { left: max(7vw, calc((100vw - 720px) / 2)); right: auto; }
  .hero__image { object-position: center 38%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
