/* Lacey & Audrey at 30
   Palette from the room itself: plum-black, ivory, chandelier gold, feather purple. */

:root {
  --ink: #14101A;
  --ink-2: #1B1523;
  --ivory: #F2EBDD;
  --ash: #A79FB0;
  --gold: #C9A961;
  --plum: #5B3A8C;

  --display: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --body: "Mulish", "Avenir Next", "Helvetica Neue", Arial, sans-serif;

  --pad: clamp(20px, 5vw, 72px);
  --gap: clamp(8px, 1vw, 14px);
  --maxw: 1440px;
  --u: calc((min(100vw, var(--maxw)) - 2 * var(--pad) - 11 * var(--gap)) / 12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--ivory);
  font-family: var(--body);
  font-weight: 300;
  font-size: clamp(16px, 1.05vw + 12px, 19px);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img, video { display: block; max-width: 100%; }

h1, h2, p { margin: 0; }

a { color: inherit; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }

/* ---------- Front door ---------- */

.door {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 44% 56%;
  grid-template-areas: "words portrait";
  max-width: var(--maxw);
  margin: 0 auto;
}

.door-portrait {
  grid-area: portrait;
  margin: 0;
  position: relative;
  padding: clamp(16px, 3vw, 44px) clamp(16px, 3vw, 44px) clamp(16px, 3vw, 44px) 0;
  align-self: stretch;
}

.door-portrait img {
  width: 100%;
  height: 100%;
  max-height: calc(100svh - 2 * clamp(16px, 3vw, 44px));
  object-fit: cover;
  object-position: 50% 30%;
  clip-path: inset(0 0 0 0);
}

/* a thin gold mount, offset like a print set in a frame */
.door-portrait::after {
  content: "";
  position: absolute;
  inset: calc(clamp(16px, 3vw, 44px) + 14px) calc(clamp(16px, 3vw, 44px) + 14px) calc(clamp(16px, 3vw, 44px) + 14px) 14px;
  border: 1px solid var(--gold);
  opacity: .55;
  pointer-events: none;
}

.door-words {
  grid-area: words;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--pad);
  padding-bottom: clamp(40px, 8vh, 96px);
}

.names {
  font-family: var(--display);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(64px, 9.5vw, 156px);
  line-height: .92;
  letter-spacing: -.01em;
  display: flex;
  flex-direction: column;
}

.names .name { display: block; overflow: hidden; padding-bottom: .14em; margin-bottom: -.14em; }
.names .name > span { display: block; }

.names .amp {
  display: block;
  overflow: hidden;
  color: var(--gold);
  font-size: .62em;
  line-height: 1.1;
  padding-left: .55em;
}
.names .amp > span { display: block; }

.door-line {
  margin-top: clamp(22px, 3vh, 40px);
  font-family: var(--display);
  font-style: normal;
  font-size: clamp(20px, 1.6vw, 26px);
  color: var(--ivory);
  overflow: hidden;
}
.door-line { padding-bottom: .2em; margin-bottom: -.2em; }
.door-line > span { display: block; }

.door-date {
  margin-top: 8px;
  color: var(--ash);
  max-width: 34ch;
  overflow: hidden;
}
.door-date { padding-bottom: .25em; margin-bottom: -.25em; }
.door-date > span { display: block; }

.door-cue {
  margin-top: clamp(28px, 5vh, 60px);
  display: inline-block;
  width: 24px;
  height: 64px;
  position: relative;
}
.cue-line {
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(var(--gold), transparent);
  transform-origin: top;
}

/* ---------- Note ---------- */

.note {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(72px, 12vh, 160px) var(--pad);
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: var(--gap);
}

.note-inner {
  grid-column: 4 / 11;
}

.note h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(30px, 3.4vw, 54px);
  line-height: 1.12;
  letter-spacing: -.005em;
  max-width: 20ch;
  margin-bottom: clamp(28px, 4vh, 48px);
}

.note p {
  max-width: 58ch;
  font-size: 1.06em;
}
.note p + p { margin-top: 1.3em; }

.note .verse {
  font-family: var(--display);
  font-size: clamp(26px, 2.6vw, 42px);
  line-height: 1.25;
  max-width: 24ch;
}
.note .verse + .verse,
.note .who + .verse { margin-top: 1.4em; }

.note .who {
  margin-top: .5em;
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(20px, 1.8vw, 28px);
  color: var(--gold);
}

/* ---------- Section heads ---------- */

.section-head {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad) clamp(28px, 4vh, 48px);
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: var(--gap);
  align-items: baseline;
}

.section-head h2 {
  grid-column: 1 / 5;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(38px, 4.6vw, 72px);
  line-height: 1;
}

.section-head p {
  grid-column: 5 / 11;
  color: var(--ash);
  max-width: 44ch;
}

/* ---------- Gallery ---------- */

.evening {
  padding-top: clamp(40px, 6vh, 80px);
  border-top: 1px solid rgba(201, 169, 97, .22);
  margin: 0 var(--pad);
}

.evening .section-head { padding-left: 0; padding-right: 0; }

.gallery {
  max-width: calc(var(--maxw) - 2 * var(--pad));
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: var(--u);
  grid-auto-flow: dense;
  gap: var(--gap);
}

.tile {
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--ink-2);
  cursor: zoom-in;
  overflow: hidden;
  display: block;
}

.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .9s cubic-bezier(.2, .7, .2, 1);
}

.tile:hover img { transform: scale(1.025); }

.tile.tall     { grid-column: span 5; grid-row: span 7; }
.tile.wide     { grid-column: span 7; grid-row: span 5; }
.tile.portrait { grid-column: span 4; grid-row: span 6; }
.tile.square   { grid-column: span 3; grid-row: span 3; }
.tile.mid      { grid-column: span 5; grid-row: span 4; }
.tile.low      { grid-column: span 5; grid-row: span 3; }

/* ---------- Moments ---------- */

.moments {
  max-width: var(--maxw);
  margin: clamp(72px, 12vh, 160px) auto 0;
  padding: clamp(40px, 6vh, 80px) var(--pad) 0;
  border-top: 1px solid rgba(201, 169, 97, .22);
}

.moments .section-head { padding-left: 0; padding-right: 0; }

.clips {
  display: grid;
  grid-template-columns: minmax(0, 420px) minmax(0, 340px);
  gap: clamp(16px, 2vw, 32px);
  align-items: start;
}

.clip { margin: 0; }

.clip video {
  width: 100%;
  aspect-ratio: 9 / 16;
  background: var(--ink-2);
  object-fit: cover;
}

.clip figcaption {
  margin-top: 12px;
  color: var(--ash);
  font-size: .92em;
  max-width: 32ch;
}

/* ---------- Close ---------- */

.close {
  max-width: var(--maxw);
  margin: clamp(80px, 14vh, 180px) auto 0;
  padding: clamp(48px, 8vh, 96px) var(--pad) clamp(40px, 6vh, 72px);
  border-top: 1px solid rgba(201, 169, 97, .22);
}

.close-names {
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(34px, 5vw, 76px);
  line-height: 1.05;
}
.amp-small { color: var(--gold); font-size: .75em; }

.close-line { margin-top: 14px; font-family: var(--display); font-size: 1.15em; }

.close-credit { margin-top: 40px; color: var(--ash); font-size: .9em; }

/* ---------- Lightbox ---------- */

.lightbox {
  border: 0;
  padding: 0;
  margin: 0;
  width: 100vw;
  height: 100svh;
  max-width: none;
  max-height: none;
  background: rgba(20, 16, 26, .96);
  color: var(--ivory);
}
.lightbox::backdrop { background: transparent; }

.lb-img {
  position: absolute;
  inset: 0;
  margin: auto;
  max-width: min(94vw, 1500px);
  max-height: 88svh;
  width: auto;
  height: auto;
  object-fit: contain;
}

.lb-close, .lb-prev, .lb-next {
  position: absolute;
  background: transparent;
  border: 0;
  color: var(--ivory);
  font-family: var(--display);
  font-size: 44px;
  line-height: 1;
  cursor: pointer;
  padding: 12px 18px;
  opacity: .8;
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover { opacity: 1; }
.lb-close { top: 10px; right: 14px; }
.lb-prev  { left: 8px;  top: 50%; transform: translateY(-50%); font-size: 64px; }
.lb-next  { right: 8px; top: 50%; transform: translateY(-50%); font-size: 64px; }

.lb-count {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  color: var(--ash);
  font-size: .9em;
}

/* ---------- The one page-load sequence ---------- */

@media (prefers-reduced-motion: no-preference) {
  .door-portrait img { animation: reveal 1.4s cubic-bezier(.7, 0, .2, 1) both; }
  .names .name > span,
  .names .amp > span,
  .door-line > span,
  .door-date > span { animation: rise 1.1s cubic-bezier(.2, .8, .2, 1) both; }
  .names .name:nth-child(1) > span { animation-delay: .35s; }
  .names .amp > span               { animation-delay: .5s; }
  .names .name:nth-child(3) > span { animation-delay: .6s; }
  .door-line > span                { animation-delay: .95s; }
  .door-date > span                { animation-delay: 1.05s; }
  .cue-line { animation: grow 1s cubic-bezier(.2, .8, .2, 1) 1.5s both; }
}

@keyframes reveal {
  from { clip-path: inset(100% 0 0 0); }
  to   { clip-path: inset(0 0 0 0); }
}
@keyframes rise {
  from { transform: translateY(110%); }
  to   { transform: translateY(0); }
}
@keyframes grow {
  from { transform: scaleY(0); }
  to   { transform: scaleY(1); }
}

/* ---------- Narrow screens ---------- */

@media (max-width: 860px) {
  .door {
    grid-template-columns: 1fr;
    grid-template-areas: "portrait" "words";
    min-height: 0;
  }
  .door-portrait { padding: 0; }
  .door-portrait img { height: min(78svh, 160vw); max-height: none; }
  .door-portrait::after { inset: 14px; }
  .door-words { padding-top: clamp(28px, 6vh, 48px); padding-bottom: clamp(40px, 8vh, 72px); }
  .names { font-size: clamp(60px, 18vw, 112px); }

  .note-inner { grid-column: 1 / 13; }

  .section-head { display: block; }
  .section-head p { margin-top: 14px; }

  .gallery {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: auto;
    grid-auto-flow: dense;
  }
  .tile { grid-row: auto !important; }
  .tile.tall     { grid-column: span 1; aspect-ratio: 3 / 4; }
  .tile.portrait { grid-column: span 2; aspect-ratio: 4 / 5; }
  .tile.square   { grid-column: span 1; aspect-ratio: 1; }
  .tile.wide, .tile.mid, .tile.low { grid-column: span 2; aspect-ratio: 4 / 3; }

  .clips { grid-template-columns: 1fr; }
  .clip.lead { grid-column: 1; }
  .clip video { max-height: 80svh; aspect-ratio: 9 / 16; }

  .lb-prev, .lb-next { font-size: 48px; padding: 20px 10px; }
}

/* ---------- Feature clip card (links to its own page) ---------- */

.clip-feature {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: clamp(16px, 2.5vw, 40px);
  align-items: center;
  margin-top: clamp(40px, 6vh, 72px);
  color: inherit;
  text-decoration: none;
}

.cf-poster {
  position: relative;
  display: block;
  background: var(--ink-2);
  overflow: hidden;
}

.cf-poster img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform .9s cubic-bezier(.2, .7, .2, 1);
}
.clip-feature:hover .cf-poster img { transform: scale(1.02); }

.cf-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: clamp(56px, 6vw, 84px);
  height: auto;
  transform: translate(-50%, -50%);
  color: var(--ivory);
  opacity: .9;
  filter: drop-shadow(0 2px 12px rgba(0, 0, 0, .5));
}

.cf-words { display: block; }

.cf-title {
  display: block;
  font-family: var(--display);
  font-size: clamp(28px, 3vw, 48px);
  line-height: 1.05;
}

.cf-line {
  display: block;
  margin-top: 12px;
  color: var(--ash);
  max-width: 34ch;
}

.cf-go {
  display: inline-block;
  margin-top: 22px;
  font-family: var(--display);
  font-style: italic;
  font-size: 1.3em;
  color: var(--gold);
  border-bottom: 1px solid transparent;
}
.clip-feature:hover .cf-go { border-bottom-color: var(--gold); }

/* ---------- The clip's own page ---------- */

.watch {
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(24px, 5vh, 56px) var(--pad) clamp(48px, 8vh, 96px);
}

.watch-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  color: var(--ash);
  font-size: .95em;
  margin-bottom: clamp(28px, 5vh, 56px);
}
.watch-top a { text-decoration: none; color: var(--ash); }
.watch-top a:hover { color: var(--ivory); }

.watch h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(36px, 4.5vw, 64px);
  line-height: 1;
}

.watch video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--ink-2);
  margin-top: clamp(20px, 3vh, 32px);
}

.watch .cap {
  margin-top: 14px;
  color: var(--ash);
  max-width: 50ch;
}

.watch .back {
  display: inline-block;
  margin-top: 40px;
  font-family: var(--display);
  font-style: italic;
  font-size: 1.3em;
  color: var(--gold);
  text-decoration: none;
}
.watch .back:hover { border-bottom: 1px solid var(--gold); }

@media (max-width: 860px) {
  .clips { grid-template-columns: 1fr; }
  .clip-feature { grid-template-columns: 1fr; }
}
