:root {
  color-scheme: light;
  --ink: #272127;
  --photo-mat: #e9e3d5;
  --paper: #f6eee4;
  --muted: #5b5257;
  --line: #c8c7b7;
  --accent: #953d45;
  --serif: Georgia, 'Times New Roman', serif;
  font-family: system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; text-underline-offset: .3em; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
.skip { position: fixed; left: 1rem; top: -5rem; z-index: 2; background: var(--paper); padding: 1rem; }
.skip:focus { top: 1rem; }
header, footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.35rem 5vw;
}
header { border-bottom: 1px solid var(--line); }
.wordmark { font: bold 1.28rem var(--serif); text-decoration: none; }
.wordmark i { font-weight: normal; }
nav { display: flex; gap: clamp(.9rem, 3vw, 3rem); }
nav a, footer a { font-size: .85rem; }
main { overflow-x: clip; }
#opening {
  position: fixed;
  inset: 0;
  margin: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  background: #1c1a1b;
  color: #f3e9dc;
}
#opening[open] { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
#opening img { width: 100%; height: 100%; max-height: 100dvh; object-fit: cover; object-position: 17% center; }
#opening > div { align-self: center; padding: clamp(1.5rem, 7vw, 8rem); }
#opening h2 { font-size: clamp(3rem, 7vw, 8rem); }
#opening h2 em, h1 em, .legacy h3 em { color: #953d45; }
#opening h2 em { color: #e7b2aa; }
#enter { margin-top: 2rem; padding: .7rem 1rem; }
#enter span { margin-left: 1.5rem; }
body:has(#opening[open]) { overflow: hidden; }
.hero { text-align: center; padding: clamp(3rem, 7vw, 7rem) 1.5rem 2.5rem; }
h1, h2, figure, p { margin: 0; }
h1, h2, .legacy h3 { font-family: var(--serif); font-weight: 400; }
h1, .legacy h3 { font-size: clamp(3.6rem, 9vw, 9rem); line-height: .95; letter-spacing: -.07em; }
.hero p { max-width: 108ch; text-wrap: balance; margin: 1.3rem auto 0; color: var(--muted); line-height: 1.55; }
.sequence { --reveal: 0; height: 135svh; }
.contact-sheet {
  position: sticky;
  top: 0;
  height: 100svh;
  display: grid;
  place-items: center;
  isolation: isolate;
  overflow: clip;
}
.side-photos {
  position: absolute;
  top: 10%;
  display: grid;
  gap: clamp(.5rem, 2vw, 2rem);
  width: 22%;
  opacity: calc(1 - var(--reveal));
}
.photos-left { left: 3%; transform: translateX(calc(-45% * var(--reveal))); }
.photos-right { right: 3%; transform: translateX(calc(45% * var(--reveal))); }
.side-photos img { display: block; width: 100%; height: min(29svh, 23vw); object-fit: cover; border-radius: .4rem; }
.photos-left img:first-child, .photos-right img:last-child { height: min(36svh, 28vw); }
.side-photos .couple-portrait { object-position: center top; }
.photos-right { top: 15%; }
.feature-frame {
  position: relative;
  width: calc(44% + 56% * var(--reveal));
  height: calc(74% + 26% * var(--reveal));
  border-radius: calc(12px * (1 - var(--reveal)));
  overflow: hidden;
  color: #fff8ec;
  background: #1c1a1b;
}
.feature-frame img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 47%; }
.feature-frame > span {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  display: flex;
  gap: 1rem;
  padding: .65rem .85rem;
  background: #1c1a1be8;
  font-size: .86rem;
}
.feature-frame:focus-visible { outline-offset: -5px; }
.collection { border-top: 1px solid var(--line); padding: 4.5rem 5vw 6rem; }
.section-head { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.section-head p { color: var(--muted); white-space: nowrap; }
h2 { font-size: clamp(2.5rem, 6vw, 5.6rem); line-height: 1; letter-spacing: -.05em; }
.filters { display: flex; flex-wrap: wrap; gap: .55rem; margin: 1.5rem 0 2.4rem; }
.filters button { border: 1px solid var(--line); background: transparent; border-radius: 99px; padding: .55rem .9rem; font-size: .85rem; }
.filters button[aria-pressed=true], .filters button:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 225px), 1fr)); gap: 2.25rem 1.4rem; }
.card { display: block; min-width: 0; background: transparent; border: 0; padding: 0; text-align: left; }
.frame { display: grid; place-items: center; height: clamp(225px, 24vw, 370px); padding: 1rem; background: var(--photo-mat); }
.frame img { width: 100%; height: 100%; min-height: 0; object-fit: contain; transition: transform .25s; }
.card:hover img { transform: scale(1.035); }
.card-label { display: block; padding-top: .7rem; font-family: var(--serif); font-size: 1.13rem; }
.card-caption { display: block; margin-top: .25rem; color: var(--muted); font-size: .85rem; }
.film { background: var(--ink); color: var(--paper); display: grid; grid-template-columns: 1fr 2fr; gap: 2rem; padding: 5rem 5vw; align-items: center; }
.film p { margin-top: 1rem; }
.film-player { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; background: #111; }
footer { font-size: .85rem; }
dialog { width: min(1050px, 100% - 1.5rem); max-height: 97dvh; overflow: auto; padding: .9rem; border: 1px solid #80867c; background: #1b271f; color: var(--paper); }
dialog::backdrop { background: #0d150fed; }
.viewer-top, .viewer-info { display: flex; justify-content: space-between; align-items: center; gap: .75rem; }
.viewer-top { margin-bottom: .6rem; }
.viewer-info { text-align: center; margin-top: .75rem; }
.viewer-info h2 { font-size: clamp(1.2rem, 3vw, 2rem); letter-spacing: 0; }
.viewer-info p { margin-top: .45rem; font-size: .85rem; }
dialog button { background: transparent; border: 1px solid #80867c; min-height: 44px; min-width: 44px; padding: .4rem .65rem; }
dialog button:hover { background: #394b3d; }
dialog button:focus-visible { outline-color: var(--paper); }
#photo { display: block; width: 100%; height: min(66dvh, 760px); object-fit: contain; }
@media (max-width: 720px) {
  .film { grid-template-columns: 1fr; }
  #opening[open] { grid-template-columns: 1fr; grid-template-rows: 47svh 1fr; }
  #opening img { max-height: 47svh; object-position: 17% 35%; }
  .sequence { height: 116svh; }
  .feature-frame { width: calc(64% + 36% * var(--reveal)); height: calc(66% + 34% * var(--reveal)); }
  .side-photos { width: 29%; top: 19%; }
  .photos-left { left: -9%; }
  .photos-right { right: -9%; top: 24%; }
  .side-photos img, .photos-left img:first-child, .photos-right img:last-child { height: 25svh; }
  .photos-left img.couple-portrait, .photos-right img.couple-portrait {
    width: 62%;
    height: auto;
    max-height: 25svh;
    object-fit: contain;
  }
  .photos-left .couple-portrait { justify-self: end; }
  .photos-right .couple-portrait { justify-self: start; }
  .hero { padding-top: 3rem; padding-bottom: 3.6rem; }
  .cover { margin-inline: .4rem; }
  .collection { padding-block: 3rem; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem .75rem; }
  .frame { height: 190px; padding: .5rem; }
}
@media (max-width: 375px) {
  .wordmark { font-size: 1rem; }
  nav { gap: .55rem; }
  nav a { font-size: .75rem; }
  .frame { height: 155px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }

@media (prefers-reduced-motion: reduce) {
  .sequence { --reveal: 0 !important; height: auto; }
  .contact-sheet { position: relative; height: 73svh; }
}

#title:focus { outline: none; }
.legacy {
  container-type: inline-size;
  position: relative;
  grid-column: 1 / -1;
  align-self: center;
  padding-block: 1.5rem;
}
.legacy h3 {
  margin: 0 0 1.15rem;
  font-size: min(clamp(3.6rem, 9vw, 9rem), 16cqw);
  white-space: nowrap;
}
.legacy p { max-width: 60ch; line-height: 1.65; }
.legacy p + p { margin-top: 1rem; }
.legacy-portrait {
  width: min(86%, 32rem);
  margin: 2.5rem auto 1.5rem;
  padding: clamp(.6rem, 1vw, 1rem);
  background: var(--photo-mat);
  transform: rotate(-8deg);
}
.legacy-portrait-window {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1224 / 826;
}
.legacy-portrait-window img {
  position: absolute;
  display: block;
  width: 112.01%;
  height: auto;
  left: -5.96%;
  top: -8.47%;
}
@media (min-width: 1200px) {
  .gallery { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .legacy {
    grid-column: 2 / -1;
    align-self: stretch;
    padding: 0 0 clamp(3rem, 6vw, 8rem) clamp(.75rem, 3vw, 3.5rem);
  }
  .legacy h3 { font-size: min(6.7vw, 10cqw, 9rem); }
  .legacy p { max-width: min(60ch, 49%); }
  .legacy-portrait {
    position: absolute;
    right: -1vw;
    bottom: 0;
    width: 30vw;
    transform: rotate(-13deg);
    margin: 0;
  }
}

#viewer { background: #242424; border-color: #777; }
#viewer::backdrop { background: #111e; }
#viewer button { border-color: #777; }
#viewer button:hover { background: #393939; }

.legacy-group {
  position: relative;
  width: min(100%, 48rem);
  aspect-ratio: 1120 / 595;
  mask-image: linear-gradient(to bottom, #000 72%, rgb(0 0 0 / 80%) 82%, rgb(0 0 0 / 30%) 94%, transparent 100%);
  margin: 1rem auto 0;
  overflow: hidden;
}
.legacy-group img {
  position: absolute;
  display: block;
  width: 173.04%;
  height: auto;
  left: -18.57%;
  top: -131.60%;
  clip-path: polygon(10.73% 100.00%, 11.30% 92.53%, 11.20% 86.36%, 11.66% 81.64%, 12.49% 76.92%, 12.75% 73.95%, 11.56% 70.83%, 11.71% 69.67%, 13.31% 68.00%, 14.91% 67.63%, 15.79% 65.38%, 17.08% 64.15%, 18.83% 63.86%, 19.97% 64.51%, 20.85% 65.82%, 22.50% 63.64%, 23.74% 63.13%, 23.43% 60.89%, 23.94% 59.14%, 25.18% 57.62%, 27.14% 57.18%, 28.69% 58.06%, 29.77% 59.94%, 29.93% 61.61%, 30.55% 60.81%, 31.99% 58.78%, 33.49% 58.13%, 35.24% 58.27%, 36.95% 59.36%, 38.18% 61.39%, 39.27% 65.17%, 40.30% 70.32%, 41.85% 73.15%, 42.67% 71.92%, 43.50% 68.58%, 44.48% 65.89%, 46.13% 64.73%, 47.47% 65.02%, 48.04% 61.54%, 49.02% 59.94%, 50.52% 59.72%, 51.44% 61.61%, 51.81% 67.42%, 54.02% 67.49%, 54.54% 64.59%, 55.88% 62.55%, 57.02% 62.48%, 58.20% 63.64%, 58.82% 65.38%, 59.08% 60.23%, 59.55% 58.35%, 60.63% 57.11%, 62.02% 56.82%, 63.16% 58.06%, 63.57% 60.96%, 63.31% 64.59%, 65.53% 66.04%, 66.77% 68.14%, 67.70% 71.84%, 68.42% 77.07%, 68.16% 82.15%, 67.44% 86.72%, 67.18% 90.86%, 68.37% 93.03%, 68.32% 100.00%);
}
@media (min-width: 1200px) {
  .legacy { padding-bottom: 0; }
  .legacy-portrait { top: 11vw; bottom: auto; }
  .legacy-group { width: 58vw; margin: .45rem 0 -6rem -12vw; }
  .gallery:has(.legacy) > .card:last-of-type { padding-top: 4vw; align-self: start; }
}
