:root {
  --ink: #272421;
  --paper: #f3ece5;
  --cream: #fffaf4;
  --rose: #a35855;
  --sage: #727b67;
  --line: rgba(39, 36, 33, 0.18);
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Avenir Next", Avenir, "Helvetica Neue", sans-serif;
}

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

.opening {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--cream);
  background: #281f1e;
  transition: opacity .9s ease, visibility .9s ease;
}
.opening::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(34,25,25,.76), rgba(34,25,25,.36)),
    url("assets/photos/photo_001.jpg") center 36% / cover;
  filter: saturate(.72);
}
.opening__glow {
  position: absolute;
  width: 48vmax;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(200, 131, 120, .22);
  filter: blur(80px);
  animation: breathe 5s ease-in-out infinite alternate;
}
.opening__card { position: relative; width: min(680px, 100%); text-align: center; }
.opening__eyebrow, .kicker {
  display: block;
  margin-bottom: 24px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .28em;
  text-transform: uppercase;
}
.opening h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(64px, 11vw, 132px);
  font-weight: 400;
  line-height: .83;
  letter-spacing: -.055em;
}
.opening p { max-width: 430px; margin: 34px auto; font-size: 17px; line-height: 1.7; }
.opening.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 54px;
  padding: 0 28px;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  transition: transform .25s ease, background .25s ease;
}
.button:hover { transform: translateY(-2px); }
.button--light { color: var(--ink); background: var(--cream); }
.button--dark { color: var(--cream); background: var(--ink); }

.progress { position: fixed; inset: 0 0 auto; z-index: 70; height: 3px; }
.progress span { display: block; width: 0; height: 100%; background: var(--rose); }

.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; overflow: hidden; color: white; }
.hero__image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
.hero__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(24,20,19,.12) 10%, rgba(24,20,19,.76) 100%); }
.hero__content { position: relative; z-index: 2; width: min(1240px, calc(100% - 48px)); margin: 0 auto; padding: 0 0 9vh; }
.hero h2, .section h2, .footer h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -.045em;
}
.hero h2 { max-width: 850px; font-size: clamp(54px, 9vw, 128px); line-height: .88; }
.hero h2 em { color: #f1c7bf; font-weight: 400; }
.scroll-cue { display: inline-flex; gap: 16px; margin-top: 42px; color: white; font-size: 12px; font-weight: 700; letter-spacing: .13em; text-decoration: none; text-transform: uppercase; }
.hero__note { position: absolute; z-index: 2; right: 28px; top: 50%; font-family: var(--serif); font-style: italic; transform: rotate(90deg); transform-origin: right top; opacity: .7; }

.section { position: relative; width: min(1240px, calc(100% - 48px)); margin: 0 auto; padding: 140px 0; }
.section__number { position: absolute; top: 64px; left: 0; color: var(--rose); font-family: var(--serif); font-size: 18px; }
.kicker--dark { color: var(--rose); }
.story { display: grid; grid-template-columns: 1.1fr .9fr; gap: 10vw; align-items: center; }
.story h2, .moments h2, .thanks h2, .letter h2 { font-size: clamp(44px, 6.4vw, 84px); line-height: .98; }
.lead { margin: 38px 0 0; max-width: 580px; font-size: clamp(18px, 2vw, 24px); line-height: 1.65; }
.story__photo { margin: 0; transform: rotate(2deg); }
.story__photo img { width: 100%; aspect-ratio: 3/4; object-fit: cover; box-shadow: 0 30px 70px rgba(49,36,31,.18); }
.story__photo figcaption { margin-top: 18px; font-family: var(--serif); font-size: 14px; font-style: italic; text-align: center; }

.moments { width: min(1380px, calc(100% - 32px)); padding-top: 90px; }
.moments__header { display: flex; justify-content: space-between; gap: 48px; align-items: end; width: min(1240px, calc(100% - 16px)); margin: 0 auto 72px; }
.moments__header > p { max-width: 300px; margin: 0; line-height: 1.7; }
.gallery { display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-rows: 90px; gap: 14px; }
.gallery__item { position: relative; overflow: hidden; border: 0; padding: 0; cursor: zoom-in; background: #ded4ca; opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.gallery__item.visible { opacity: 1; transform: none; }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2,.7,.2,1), filter .4s ease; }
.gallery__item:hover img { transform: scale(1.045); filter: saturate(1.08); }
.gallery__item:nth-child(6n+1), .gallery__item:nth-child(6n+4) { grid-column: span 5; grid-row: span 5; }
.gallery__item:nth-child(6n+2), .gallery__item:nth-child(6n+5) { grid-column: span 3; grid-row: span 4; }
.gallery__item:nth-child(6n+3), .gallery__item:nth-child(6n+6) { grid-column: span 4; grid-row: span 5; }
.gallery__item.is-extra { display: none; }
.gallery.is-expanded .gallery__item.is-extra { display: block; }
.gallery__action { display: flex; justify-content: center; margin-top: 44px; }

.interlude { position: relative; min-height: 88svh; display: grid; place-items: center; overflow: hidden; color: white; }
.interlude > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 58%; }
.interlude__shade { position: absolute; inset: 0; background: rgba(29,31,27,.42); }
.interlude blockquote { position: relative; z-index: 1; margin: 0; padding: 40px; font-family: var(--serif); font-size: clamp(38px, 6vw, 78px); line-height: 1.07; text-align: center; }
.interlude blockquote span { display: block; height: 54px; color: #f2c4bc; font-size: 100px; }

.thanks__header { max-width: 920px; }
.thanks__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 72px; }
.thanks__card { min-height: 340px; padding: 34px; border: 1px solid var(--line); background: rgba(255,250,244,.56); }
.thanks__card span { color: var(--rose); font-family: var(--serif); }
.thanks__card h3 { margin: 98px 0 18px; font-family: var(--serif); font-size: 30px; font-weight: 400; }
.thanks__card p { margin: 0; line-height: 1.7; }

.letter { display: grid; grid-template-columns: .85fr 1.15fr; gap: 5vw; align-items: center; padding-bottom: 180px; }
.letter__photos { position: relative; min-height: 700px; }
.letter__photos img { position: absolute; width: 68%; aspect-ratio: 3/4; object-fit: cover; box-shadow: 0 30px 70px rgba(49,36,31,.16); }
.letter__photos img:first-child { top: 0; left: 0; transform: rotate(-4deg); }
.letter__photos img:last-child { right: 0; bottom: 0; transform: rotate(5deg); }
.letter__paper { position: relative; padding: clamp(36px, 7vw, 88px); background: var(--cream); box-shadow: 0 25px 80px rgba(49,36,31,.1); }
.letter__paper::before { content: ""; position: absolute; inset: 18px; border: 1px solid var(--line); pointer-events: none; }
.letter__paper p { position: relative; margin: 30px 0 0; font-family: var(--serif); font-size: clamp(18px, 2vw, 23px); line-height: 1.72; }
.signature { position: relative; margin-top: 48px; color: var(--rose); font-family: var(--serif); font-size: 34px; font-style: italic; }

.footer { padding: 14vh 24px; color: var(--cream); background: var(--ink); text-align: center; }
.footer p { margin: 0 0 18px; color: rgba(255,250,244,.62); letter-spacing: .08em; }
.footer h2 { font-size: clamp(58px, 10vw, 130px); }
.replay { margin-top: 48px; border: 0; border-bottom: 1px solid rgba(255,255,255,.35); padding: 8px 0; color: white; background: transparent; cursor: pointer; }

.lightbox { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 28px 80px; background: rgba(22,19,18,.96); }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: calc(100svh - 80px); object-fit: contain; }
.lightbox__close, .lightbox__nav { position: absolute; z-index: 2; border: 0; color: white; background: transparent; cursor: pointer; }
.lightbox__close { top: 18px; right: 24px; font-size: 44px; }
.lightbox__nav { top: 50%; font-size: 64px; transform: translateY(-50%); }
.lightbox__nav--prev { left: 22px; }
.lightbox__nav--next { right: 22px; }
.lightbox__counter { position: absolute; bottom: 18px; color: rgba(255,255,255,.7); font-size: 12px; letter-spacing: .15em; }

.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s ease, transform .9s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@keyframes breathe { to { transform: scale(1.18); opacity: .6; } }

@media (max-width: 800px) {
  .opening h1 { font-size: clamp(62px, 22vw, 98px); }
  .opening p { font-size: 15px; }
  .hero__content { width: calc(100% - 34px); padding-bottom: 8vh; }
  .hero h2 { font-size: clamp(52px, 16vw, 88px); }
  .hero__note { display: none; }
  .section { width: calc(100% - 34px); padding: 100px 0; }
  .story, .letter { grid-template-columns: 1fr; gap: 60px; }
  .story__copy { order: 1; }
  .story__photo { order: 2; width: 92%; margin: 0 auto; }
  .moments { width: calc(100% - 20px); }
  .moments__header { display: block; width: calc(100% - 14px); margin-bottom: 44px; }
  .moments__header > p { margin-top: 24px; }
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 150px; gap: 8px; }
  .gallery__item:nth-child(n) { grid-column: span 1; grid-row: span 2; }
  .gallery__item:nth-child(4n+1), .gallery__item:nth-child(4n+4) { grid-column: span 2; grid-row: span 2; }
  .thanks__grid { grid-template-columns: 1fr; }
  .thanks__card { min-height: 280px; }
  .thanks__card h3 { margin-top: 72px; }
  .letter__photos { min-height: 560px; }
  .letter__paper { padding: 48px 34px; }
  .lightbox { padding: 50px 16px; }
  .lightbox__nav { top: auto; bottom: 6px; font-size: 48px; }
}

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