:root {
  color-scheme: light;
  --ink: #322621;
  --rose: #873f48;
  --gold: #ab7951;
  --line: #a4714a50;
  font-family: system-ui, sans-serif;
  color: var(--ink);
  background: #302a24;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100dvh;
  background: url("./media/slide-3415.webp") center / cover no-repeat;
}
[hidden] { display: none !important; }
button { font: inherit; }
button { cursor: pointer; }
button:focus-visible {
  outline: 2px solid var(--rose);
  outline-offset: 3px;
}

.invitation {
  width: min(1450px, 100%);
  margin: auto;
  padding: clamp(13px, 3.5vw, 56px);
}
.paper {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(320px, .86fr) minmax(0, 1.38fr);
  align-items: center;
  gap: clamp(15px, 2vw, 38px);
  min-height: min(760px, 88svh);
  padding: clamp(32px, 4vw, 76px);
  overflow: hidden;
  border: 1px solid #fff8e9b8;
  background: linear-gradient(110deg, #fffaf1b0 0%, #fff8ef9b 42%, #fff8ef75 100%);
  -webkit-backdrop-filter: blur(8px) saturate(112%);
  backdrop-filter: blur(8px) saturate(112%);
  box-shadow: inset 0 1px 0 #ffffffad, 0 18px 65px #2218114d;
}
.paper::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 12px;
  border: 1px solid var(--line);
  pointer-events: none;
}
.sprig { position: absolute; z-index: -1; width: clamp(150px, 25vw, 365px); pointer-events: none; }
.sprig-top { top: -18px; right: -25px; transform: rotate(172deg); opacity: .64; }
.sprig-bottom { bottom: -30px; left: -45px; opacity: .72; }

.message {
  --red: #ae3537;
  min-width: 0;
  color: var(--red);
  text-align: left;
}
.seal {
  --seal-size: clamp(105px, 13vw, 171px);
  position: relative;
  display: grid;
  align-items: center;
  width: var(--seal-size);
  min-height: clamp(114px, 15vw, 186px);
  margin: 0 0 13px -6px;
}
.seal span {
  font: 900 var(--seal-size)/.95 "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
}
.save-date {
  margin: 0 0 5px;
  font: 400 clamp(.875rem, 1.35vw, 1.2rem)/1.35 Georgia, "Times New Roman", serif;
  letter-spacing: .14em;
}
.date {
  margin: 0;
  font: 400 clamp(2.75rem, 5vw, 5rem)/1.05 Georgia, serif;
  letter-spacing: .025em;
  font-variant-numeric: lining-nums;
}
h1 {
  display: grid;
  justify-items: center;
  gap: 0;
  width: fit-content;
  max-width: 100%;
  margin: 7px 0 clamp(29px, 5vw, 62px);
  font: 400 clamp(1.54rem, 3vw, 3rem)/1.08 Georgia, "Times New Roman", serif;
  text-align: center;
  overflow-wrap: anywhere;
}
.couple-heart {
  font-size: .78em;
  line-height: .85;
}
.address {
  margin: 0;
  color: var(--ink);
  font: 600 .875rem/1.55 Georgia, serif;
  letter-spacing: .045em;
  text-transform: uppercase;
}
.guest {
  width: min(100%, 340px);
  min-height: 1.35em;
  margin: 8px 0 13px;
  padding-bottom: 5px;
  border-bottom: 1px dotted #7c5a51;
  font: italic 400 clamp(1.4rem, 2.8vw, 2.4rem)/1.13 Georgia, serif;
  overflow-wrap: anywhere;
}
.event {
  margin: 17px 0 20px;
  color: #231b17;
  font: 400 clamp(.95rem, 1.55vw, 1.15rem)/1.25 "Times New Roman", Times, serif;
}
.event p { margin: 0; }
.venue-label {
  font-size: .88em;
  font-weight: 700;
  text-transform: uppercase;
}
.event .venue-line {
  margin-top: 2px;
  font-size: clamp(2rem, 3.7vw, 3.35rem);
  font-style: italic;
  line-height: 1;
}
.venue-hall {
  font-size: .43em;
  white-space: nowrap;
}
.event .venue-address { margin-top: 5px; font-style: italic; }
.event .event-times { margin-top: 10px; font-style: italic; }
.event-times span { display: inline-block; white-space: nowrap; }
.event-times span + span:not([hidden])::before { content: " – "; white-space: pre; }
.event-times span[hidden] + span::before { content: none; }
.invitation-note, .honor-note {
  max-width: 33ch;
  margin: 0;
  color: #231b17;
  font: italic 400 clamp(.95rem, 1.55vw, 1.15rem)/1.32 "Times New Roman", Times, serif;
}

.gallery {
  width: min(100%, 710px);
  margin: auto;
}
.heart {
  position: relative;
  isolation: isolate;
  width: 100%;
  aspect-ratio: 1.09;
}
.tile {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: calc(var(--size) * 1.12);
  height: var(--size);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  pointer-events: none;
  transform: translate(-50%, -50%) rotate(var(--angle));
}
.tile img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  pointer-events: auto;
  box-shadow: 0 3px 9px #43261f40;
  transition: transform 230ms ease;
}
.tile:hover, .tile:focus-visible { z-index: 1; }
.tile:hover img, .tile:focus-visible img { transform: scale(1.13); }

dialog {
  width: min(1050px, calc(100% - 20px));
  max-width: none;
  padding: 0;
  border: 1px solid #eed5bd55;
  border-radius: 12px;
  color: #fff1e1;
  background: #271d1a;
}
dialog::backdrop { background: #211813db; }
.album { position: relative; display: grid; place-items: center; padding: 18px 55px 12px; }
.album img { max-width: 100%; height: 72dvh; max-height: 800px; object-fit: contain; }
.album p { margin: 8px 0 0; }
.icon {
  display: grid;
  place-items: center;
  position: absolute;
  z-index: 1;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid #eed5bd77;
  color: inherit;
  background: #271d1add;
  font-size: 1.65rem;
}
.close { top: 8px; right: 8px; }
.previous { top: 50%; left: 6px; }
.next { top: 50%; right: 6px; }

@media (max-width: 800px) {
  .paper { grid-template-columns: minmax(0, 1fr); gap: 26px; padding: 35px 23px 24px; }
  .message { width: min(100%, 450px); margin: auto; }
  .date { font-size: clamp(2.75rem, 10.4vw, 4.8rem); }
  h1 { font-size: clamp(1.6rem, 5.6vw, 2.75rem); }
  .gallery { width: min(100%, 570px); }
  .sprig { width: clamp(140px, 30vw, 245px); opacity: .51; }
  .sprig-bottom { opacity: .34; }
}
@media (max-width: 420px) {
  .album { padding-inline: 38px; }
  .album .icon { width: 35px; height: 37px; }
}
@media (prefers-reduced-motion: reduce) {
  .tile img { transition: none; }
}
