:root {
  color-scheme: light;
  --ink: #4b2d38;
  --berry: #783e53;
  --muted: #684b55;
  --blush: #f6e3e7;
  --ivory: #fffbf7;
  --stroke: #d4abb6;
  --serif: "Cormorant Garamond", Georgia, serif;
  --calligraphy: "Great Vibes", "Brush Script MT", cursive;
  --sans: "Jost", system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--ivory); color: var(--ink); font: 500 1.25rem/1.5 var(--serif); }
h1, h2, p, blockquote { margin: 0; }
a { color: inherit; text-underline-offset: .22em; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--berry); outline-offset: 5px; }
.script { font-family: var(--calligraphy); font-weight: 400; }
.eyebrow, .cover-date, .open-label {
  font: 500 .875rem/1.5 var(--sans);
  letter-spacing: .17em;
  text-transform: uppercase;
}
.opening {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  position: relative;
  isolation: isolate;
  text-align: center;
  overflow: hidden;
  padding: clamp(2.5rem, 7vh, 5rem) 1rem;
  background: radial-gradient(ellipse at center, #fffaf6, #f5dde2);
}
.cover-art, .floral::before {
  background: url("./botanical.webp") center / cover no-repeat;
  pointer-events: none;
  position: absolute;
  inset: 0;
}
.cover-art { z-index: -2; }
.opening::after {
  position: absolute;
  z-index: -1;
  pointer-events: none;
  content: "";
  inset: 1rem;
  border: 1px solid #a76a7b60;
}
.cover-content { width: min(100%, 42rem); }
.cover-content > .eyebrow { margin-bottom: .65rem; color: var(--berry); }
.cover-title { font-size: clamp(4rem, 11.5vw, 7.8rem); line-height: 1.05; color: #6c384b; }
.cover-title span { font-size: .61em; }
.cover-date { margin: .55rem 0 2.3rem; color: var(--muted); letter-spacing: .12em; }
.envelope-button {
  border: 0;
  padding: 0;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 1.6rem;
  color: var(--berry);
  background: transparent;
  cursor: pointer;
}
.envelope {
  display: block;
  position: relative;
  isolation: isolate;
  width: clamp(14.25rem, 67vw, 25rem);
  aspect-ratio: 1.64;
  border-radius: .35rem;
  box-shadow: 0 22px 43px #67445439, 0 3px 7px #67445424;
  perspective: 850px;
  transition: transform .35s ease;
}
.envelope-button:hover .envelope { transform: translateY(-5px); }
.envelope-back, .envelope-front, .flap { position: absolute; inset: 0; border-radius: inherit; }
.envelope-back { background: #be8899; }
.letter {
  position: absolute;
  inset: 10% 7% 4%;
  display: grid;
  place-items: start center;
  padding-top: 10%;
  border: 4px double #d9afbc;
  color: var(--berry);
  background: linear-gradient(130deg, #fffdf9, #f9e9ea);
  font: 400 clamp(2rem, 6vw, 3.4rem)/1 var(--calligraphy);
  transition: transform .65s .25s cubic-bezier(.16,.76,.34,1);
}
.letter i { font-style: normal; }
.envelope-front {
  z-index: 2;
  background:
    linear-gradient(153deg, transparent 49.65%, #b0788a55 49.85%, transparent 50.25%) left top / 51% 72% no-repeat,
    linear-gradient(207deg, transparent 49.65%, #b0788a55 49.85%, transparent 50.25%) right top / 51% 72% no-repeat,
    linear-gradient(135deg, #f2d3da, #e1aeba);
  clip-path: polygon(0 0, 50% 61%, 100% 0, 100% 100%, 0 100%);
}
.flap {
  z-index: 3;
  clip-path: polygon(0 0, 100% 0, 50% 64%);
  background: linear-gradient(158deg, #f6dbe0, #dfadbc);
  transform-origin: center top;
  transition: transform .65s ease, z-index 0s .24s;
}
.seal {
  position: absolute;
  z-index: 4;
  inset: 61% auto auto 50%;
  display: grid;
  grid-auto-flow: column;
  gap: .12em;
  place-content: center;
  width: 27%;
  max-width: 5rem;
  aspect-ratio: 1;
  transform: translate(-50%, -50%) rotate(-9deg);
  border-radius: 46% 53% 42% 49%;
  border: 5px double #f7d0dc;
  background: radial-gradient(circle at 34% 25%, #dfa1b3, #b96f88 58%, #94536c);
  color: #fff7f7;
  font: 600 clamp(.9rem, 3vw, 1.45rem)/1 var(--serif);
  box-shadow: 0 3px 4px #77384f58, inset 0 0 4px #90546e;
  transition: opacity .28s ease;
}
.seal i { font-weight: 400; }
.open-label { display: inline-block; border-bottom: 1px solid var(--stroke); padding: .5rem .25rem; }
.opening-active .seal, .opening-active .open-label { opacity: 0; }
.opening-active .flap { transform: rotateX(180deg); z-index: 0; }
.opening-active .letter { transform: translateY(-62%); }
.opening-active .cover-title, .opening-active .cover-date, .opening-active .eyebrow { opacity: 0; transition: opacity .45s; }
.petals { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
.petals span {
  position: absolute;
  top: -8%;
  left: var(--left);
  width: var(--size);
  aspect-ratio: .83;
  border-radius: 76% 12% 67% 31%;
  background: linear-gradient(140deg, #f5d3dd, #d795ab);
  opacity: 0;
  animation: falling 1.52s var(--delay) ease-in both;
}
@keyframes falling {
  12% { opacity: .88; }
  100% { transform: translate(var(--drift), 107vh) rotate(400deg); opacity: .25; }
}
main { text-align: center; }
.floral { position: relative; isolation: isolate; overflow: hidden; }
.floral::before {
  z-index: -1;
  content: "";
  inset: -3.5rem 0 0;
  opacity: .77;
  transform: translateY(var(--parallax-y, 0px));
}
.invitation { padding: clamp(1.25rem, 8vw, 6rem); }
.paper {
  width: min(100%, 48rem);
  margin-inline: auto;
  padding: clamp(1.5rem, 6vw, 4.5rem) clamp(1rem, 6vw, 3.5rem);
  background: #fffbf5e8;
  border: 1px solid #d7b4bf;
  box-shadow: 0 12px 40px #6b394b13, inset 0 0 0 .38rem #fffbf580, inset 0 0 0 .44rem #d7b4bf76;
}
.monogram {
  display: inline-grid;
  grid-auto-flow: column;
  gap: .14em;
  place-content: center;
  margin: 0 auto 1.3rem;
  min-width: 4rem;
  aspect-ratio: 1;
  border: 3px double var(--stroke);
  border-radius: 50%;
  color: var(--berry);
  font: 500 1.15rem/1 var(--serif);
}
.arabic { margin-bottom: 1.25rem; }
.arabic img { display: block; width: min(100%, clamp(13.75rem, 58vw, 22rem)); height: auto; margin-inline: auto; }
.intro { max-width: 31rem; margin: 1rem auto 0; }
.names { margin: 1.8rem auto 1.75rem; }
.names h2 { color: var(--berry); font-size: clamp(2.2rem, 8vw, 4.2rem); line-height: 1.1; }
.names p { margin-top: .2rem; }
.amp { display: block; font-size: 2.4rem; color: #986379; line-height: 1; margin: .6rem 0; }
.details-link { display: inline-block; margin-top: .5rem; color: var(--berry); font: 500 .95rem/1.5 var(--sans); }
.ceremony, .closing { padding: clamp(3rem, 7vw, 6rem) 1.1rem; }
.ceremony { background: #f6e3e7; border-block: 1px solid #d7b4bf; }
.section-inner { max-width: 47rem; margin-inline: auto; }
.section-inner h2 { font: 500 clamp(2rem, 6.5vw, 3.55rem)/1.05 var(--serif); margin: .6rem 0; }
.time { margin: .8rem 0; }
.venue { font-size: 1.4rem; font-weight: 600; }
.actions { display: flex; justify-content: center; align-items: flex-start; flex-wrap: wrap; gap: .7rem; margin: 1.4rem auto 0; }
.calendar > summary { list-style: none; }
.calendar > summary::-webkit-details-marker { display: none; }
.calendar[open] { flex-basis: 100%; }
.calendar-options { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; max-width: 28rem; margin: .8rem auto 0; }
.calendar-options .calendar-note { flex-basis: 100%; margin-top: .15rem; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 1px solid var(--berry);
  border-radius: 2rem;
  padding: .55rem 1.05rem;
  background: var(--berry);
  color: white;
  font: 500 .92rem/1.4 var(--sans);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.button.outline { background: transparent; color: var(--berry); }
.button:hover { background: #633044; color: white; }
.countdown { display: flex; justify-content: center; max-width: 26rem; margin: 2.25rem auto 0; }
.countdown > div { flex: 1; display: grid; gap: .25rem; padding-inline: .2rem; }
.countdown > div + div { border-left: 1px solid var(--stroke); }
.countdown strong { color: var(--berry); font: 500 clamp(2rem, 8vw, 3rem)/1 var(--serif); font-variant-numeric: tabular-nums; }
.countdown span { font: 400 .86rem/1.3 var(--sans); color: var(--muted); }
#countdown-ended { margin-top: 2rem; }
.calendar-note { margin-top: .7rem; color: var(--muted); font: 400 .875rem/1.5 var(--sans); }
.closing { background: #fff5f4; }
.closing::before { opacity: .28; }
.closing blockquote { font: italic 500 clamp(1.75rem, 5vw, 3rem)/1.2 var(--serif); margin: 0 auto .8rem; }
.closing .eyebrow { color: var(--berry); }
.gift { margin: 1.4rem auto 0; }
.await-reveal { opacity: 0; translate: 0 18px; transition: opacity .7s ease, translate .7s ease; }
.await-reveal.in-view, .await-reveal:focus-within { opacity: 1; translate: 0; }
@media (max-width: 47rem) and (orientation: portrait) {
  .cover-art { background-size: auto 100%; background-position: 52% center; opacity: .74; }
  .opening::after { inset: .68rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}