html {
  scroll-behavior: smooth;
}

body.locked {
  overflow: hidden;
}

.glass {
  background: rgba(255, 255, 255, .76);
  border: 1px solid rgba(255, 255, 255, .55);
  backdrop-filter: blur(18px);
}

.glass-dark {
  background: rgba(31, 51, 40, .84);
  border: 1px solid rgba(255, 255, 255, .14);
  backdrop-filter: blur(18px);
}

.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity .8s ease, transform .8s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.input-modern {
  width: 100%;
  border: 1px solid transparent;
  background: #f4eee5;
  outline: none;
  transition: border-color .25s ease, box-shadow .25s ease, background .25s ease;
}

.input-modern:focus {
  background: #fff;
  border-color: #c8a86b;
  box-shadow: 0 0 0 4px rgba(200, 168, 107, .15);
}

#toast {
  transform: translate(-50%, 24px) scale(.96);
  opacity: 0;
  transition: opacity .3s ease, transform .3s ease;
}

#toast.show {
  transform: translate(-50%, 0) scale(1);
  opacity: 1;
}

#envelopeScreen {
  transition: opacity .9s ease, transform .9s ease;
}

#envelopeScreen.opened {
  opacity: 0;
  transform: translateY(-110%);
  pointer-events: none;
}

.envelope {
  perspective: 1000px;
}

.envelope-flap {
  transform-origin: top;
  transition: transform .9s cubic-bezier(.2, .8, .2, 1);
}

.envelope.open .envelope-flap {
  transform: rotateX(180deg);
}

.envelope-letter {
  transition: transform .9s cubic-bezier(.2, .8, .2, 1), opacity .5s ease;
}

.envelope.open .envelope-letter {
  transform: translateY(-48px);
  opacity: 1;
}

.map-frame iframe {
  filter: grayscale(1) contrast(.92);
  transition: filter .45s ease, transform .45s ease;
}

.map-frame:hover iframe {
  filter: grayscale(0);
  transform: scale(1.015);
}

.polaroid {
  background: #fff;
  padding: 14px 14px 42px;
  box-shadow: 0 18px 45px rgba(41, 48, 43, .18);
  transform: rotate(-2deg);
}

.qr-grid {
  background-image:
    linear-gradient(90deg, #1f3328 8px, transparent 8px),
    linear-gradient(#1f3328 8px, transparent 8px);
  background-size: 18px 18px;
}

.hero-bg {
  background-image:
    linear-gradient(rgba(31, 51, 40, .20), rgba(31, 51, 40, .78)),
    url('https://images.unsplash.com/photo-1519741497674-611481863552?auto=format&fit=crop&w=1920&q=85');
}

.footer-bg {
  background-image:
    linear-gradient(rgba(31, 51, 40, .62), rgba(31, 51, 40, .88)),
    url('https://images.unsplash.com/photo-1511285560929-80b456fea0bc?auto=format&fit=crop&w=1920&q=85');
}

.envelope-flap-shape {
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

.envelope-bottom-shape {
  clip-path: polygon(0 100%, 50% 42%, 100% 100%);
}

.envelope-left-shape {
  clip-path: polygon(0 0, 50% 42%, 0 100%);
}

.envelope-right-shape {
  clip-path: polygon(100% 0, 50% 42%, 100% 100%);
}

.gift-page {
  background-image:
    linear-gradient(rgba(251, 247, 239, .92), rgba(251, 247, 239, .98)),
    url('https://images.unsplash.com/photo-1523438885200-e635ba2c371e?auto=format&fit=crop&w=1920&q=80');
  background-position: center;
  background-size: cover;
  background-attachment: fixed;
}
