@font-face {
  font-family: Lato;
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("assets/fonts/lato-bold.ttf") format("truetype");
}

@font-face {
  font-family: "Shantell Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("assets/fonts/shantell-sans-medium.ttf") format("truetype");
}

* { box-sizing: border-box; }
html { font-size: 14pt; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 3rem;
  color: #000;
  background: #35393d;
  text-align: center;
}

/* The fixed background keeps the original texture and photo framing. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: url("assets/images/background-noise.svg"),
    linear-gradient(180deg, rgba(75,78,82,.149), rgba(22,23,25,.529)),
    url("assets/images/bg.jpg");
  background-size: 512px, cover, cover;
  background-position: center;
  background-repeat: repeat, no-repeat, no-repeat;
}

/* CSS replaces the original JavaScript loading overlay. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2;
  background: #35393d;
  pointer-events: none;
  animation: uncover 1s ease-in-out both;
}

.note {
  width: 44rem;
  max-width: 100%;
  padding: 4.5rem;
  background: #fff6a1 url("assets/images/paper-noise.svg") center / 512px repeat;
  box-shadow: 0 3.75rem 7.125rem .75rem rgba(0,0,0,.42);
  transform: scale(.644);
  animation: arrive .75s ease .5s both;
}
.note > * { margin: 0 auto; }
.note img { display: block; max-width: 100%; height: auto; }
.pin { width: 5.75rem; animation: pin-drop .25s linear 1s both; }
.note .butterfly { width: 20rem; margin-top: 2rem; margin-bottom: 2rem; animation: fade-in 1s ease both; }
h1 {
  font: 700 4rem/1 Lato, sans-serif;
  letter-spacing: .25rem;
  animation: fade-in 1s ease both;
}
.note p {
  margin-top: 1.75rem;
  font: 500 1.5rem/1.25 "Shantell Sans", cursive;
  letter-spacing: .225rem;
  text-transform: uppercase;
}

@keyframes uncover {
  from { opacity: 1; }
  to { opacity: 0; visibility: hidden; }
}
@keyframes arrive {
  from { opacity: 0; transform: perspective(1000px) rotateX(6.375deg) scale(.644); }
  to { opacity: 1; transform: perspective(1000px) rotateX(0) scale(.644); }
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes pin-drop {
  0% { opacity: 0; transform: translateY(-.225rem); }
  33% { opacity: 1; transform: translateY(.225rem); }
  90% { opacity: 1; transform: translateY(-.05625rem); }
  100% { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1680px) { html { font-size: 10pt; } }
@media (max-width: 980px) { html { font-size: 9pt; } }
@media (max-width: 736px) {
  html { font-size: 12pt; }
  body { padding: 2rem 1rem; }
  .note { padding: 3rem 2rem; }
  .pin { width: 2.5rem; }
  .note .butterfly { width: 12rem; margin-top: 1.5rem; margin-bottom: 1.5rem; }
  h1 { font-size: 3.5rem; letter-spacing: .21875rem; }
  .note p { letter-spacing: .196875rem; }
}
@media (max-width: 480px) { .note p { margin-top: 1.53125rem; } }
@media (max-width: 360px) {
  body { padding: 1.5rem .75rem; }
  .note { padding: 2.25rem 1.5rem; }
  .note p { margin-top: 1.3125rem; }
}

/* Content is immediately visible for visitors who request less motion. */
@media (prefers-reduced-motion: reduce) {
  *, body::after { animation: none !important; }
  body::after { display: none; }
}
