@font-face {
  font-family: "Hurricane";
  src: url("fonts/hurricane.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Cutive Mono";
  src: url("fonts/cutive-mono.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #5d5953;
  --script-ink: #67594f;
  --paper: #f5f4f0;
}

* { box-sizing: border-box; }
body {
  position: relative;
  margin: 0;
  color: var(--ink);
  min-height: 100vh;
  background: #fcfbf8;
  isolation: isolate;
  font-family: "Cutive Mono", "Courier New", monospace;
  font-weight: 400;
}
/* One continuous sheet of paper that scrolls with the page. */
body::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(#ffffffa6, #ffffffa6),
    url("images/paper.png") center / cover no-repeat;
}
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--script-ink); outline-offset: 7px; }
h1, h2, p { margin: 0; }
.script { font-family: "tt-disruptors", "Hurricane", "Brush Script MT", cursive; font-weight: 400; color: var(--script-ink); }
.save-the-date { width: min(100%, 1440px); margin-inline: auto; display: flex; flex-direction: column; }
.introduction { height: 1100px; position: relative; text-align: center; }
.date { position: absolute; top: 103px; width: 100%; font-size: 30px; letter-spacing: 5px; }
.date--sequenced .date-character { opacity: 0; }
.date--revealing .date-character { animation: date-fade-in 480ms ease-out calc(var(--index) * 110ms) forwards; }
@keyframes date-fade-in { to { opacity: 1; } }
.names { position: absolute; top: 310px; left: 50%; width: max-content; max-width: 90%; transform: translateX(-50%) rotate(-12deg); font-size: 150px; line-height: .98; text-align: center; }
.names-handwriting { display: block; width: 2.987em; max-width: 100%; height: auto; }
.venue { display: flex; align-items: center; gap: 44px; margin-inline: 9.1%; }
.venue-photo { display: block; width: 60%; height: auto; }
.venue-info { flex: 1; min-width: 0; padding-top: 35px; }
.venue h2 { white-space: nowrap; font-size: 77px; line-height: 1.2; }
.directions { display: flex; align-items: center; gap: 20px; text-decoration: none; font-size: 24px; line-height: 1.2; letter-spacing: 1.5px; }
.directions span { white-space: nowrap; text-decoration: underline dotted; text-underline-offset: 5px; }
.arrow { width: 50px; flex-shrink: 0; fill: none; stroke: var(--script-ink); stroke-width: 1.5; }
.details { margin-top: 270px; text-align: center; }
.details h2 { font-size: 117px; line-height: 1.15; }
.event-time { margin-top: 25px; font-size: 38px; line-height: 1.22; letter-spacing: 1px; }
.rsvp { margin-top: 85px; }
.rsvp p { font-size: 24px; letter-spacing: 1px; }
.rsvp-button { display: block; margin: 15px auto 0; border: 2px dashed var(--ink); border-radius: 100px; width: 330px; min-height: 68px; background: transparent; font-family: Georgia, serif; font-size: 27px; cursor: pointer; }
.rsvp-button:hover { background: #67594f0d; }
.memories { width: 980px; height: 800px; position: relative; align-self: center; margin-top: 230px; margin-bottom: 235px; }
.memories h2 { display: none; }
.forever-handwriting { display: block; width: 2.192em; height: auto; }
.handwriting-pending { visibility: hidden; }
.memory { display: block; position: absolute; height: auto; }
.collage-ready .memory:not(.memory--revealed) { opacity: 0; }
.engaged { width: 563px; top: 0; left: 200px; }
.lake { width: 535px; top: 275px; right: -20px; z-index: 1; }
.forever { width: 597px; top: 325px; left: 27px; z-index: 2; }
.rsvp-dialog { width: min(480px, calc(100% - 40px)); padding: 58px 28px 42px; border: 1px solid #b5aaa0; color: var(--ink); background: var(--paper) url("images/paper.jpg") center / cover; text-align: center; }
.rsvp-dialog::backdrop { background: #302a2570; }
.rsvp-dialog h2 { font-size: 65px; line-height: 1.1; margin-bottom: 25px; }
.rsvp-dialog p { font-size: 17px; line-height: 1.7; }
.rsvp-dialog p + p { margin-top: 24px; }
.close-dialog { position: absolute; top: 8px; right: 8px; width: 40px; height: 40px; border: 0; background: transparent; font-size: 30px; cursor: pointer; }

@media (prefers-reduced-motion: reduce) {
  .date--sequenced .date-character { opacity: 1; animation: none; }
  .handwriting-pending { visibility: visible; }
  .collage-ready .memory:not(.memory--revealed) { opacity: 1; }
}

@media (min-width: 701px) and (max-width: 1200px) {
  .introduction { height: 80vw; }
  .names { top: 22vw; font-size: 12vw; }
  .venue { gap: 3vw; }
  .venue-photo { width: 57%; }
  .venue h2 { font-size: 5.5vw; }
  .directions { font-size: 1.65vw; gap: 1.5vw; }
  .arrow { width: 3.3vw; }
  .details { margin-top: 19vw; }
  .memories { transform: scale(.75); margin-top: 100px; margin-bottom: 20px; width: 980px; max-width: 100%; }
  .engaged { left: 15%; }
  .lake { right: -5%; }
  .forever { left: -5%; }
}

@media (max-width: 700px) {
  .introduction { height: 205vw; max-height: 1080px; }
  .names { top: 62vw; font-size: 21vw; line-height: .99; }
  .date { top: 146vw; font-size: 7.1vw; letter-spacing: 3px; }
  .venue { display: block; margin-inline: 12.5%; }
  .venue-photo { width: 100%; height: 41vw; object-fit: cover; }
  .venue-info { padding-top: 0; }
  .venue h2 { font-size: 11.5vw; line-height: .95; margin-top: 1vw; margin-left: -1vw; }
  .directions { font-size: 3.25vw; letter-spacing: 1px; line-height: 1.15; gap: 8vw; margin-top: 3vw; }
  .arrow { width: 8vw; }
  .memories { order: 2; width: 100%; height: 104vw; margin-top: 39vw; margin-bottom: 0; }
  .memories h2 { display: block; position: absolute; top: 1vw; left: 13%; font-size: 11.6vw; line-height: .95; transform: rotate(-11deg); z-index: 3; }
  .engaged { width: 50%; top: 4vw; left: 36%; transform: rotate(15deg); }
  .lake { width: 51%; top: 34vw; left: 11%; right: auto; transform: rotate(-2deg); z-index: 2; }
  .forever { width: 55%; top: 58vw; left: 33%; transform: rotate(-23deg); z-index: 1; }
  .details { order: 3; margin-top: 28vw; margin-bottom: 65vw; }
  .details h2 { font-size: 16vw; line-height: 1.1; }
  .event-time { margin-top: 6vw; font-size: 4.8vw; line-height: 1.35; letter-spacing: .5px; }
  .rsvp { margin-top: 12vw; }
  .rsvp p { font-size: 3.1vw; letter-spacing: .5px; }
  .rsvp-button { width: 40vw; min-height: 8.5vw; font-size: 3.8vw; border-width: 1.5px; margin-top: 2vw; }
}
