/*
  Wish Post / stamp illustrations
  The three little scenes are deliberately drawn in CSS so the template
  picker stays completely self-contained and easy to recolour.
*/

.art {
  --ink: #402c3c;
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  isolation: isolate;
  border-radius: 24px;
  box-shadow: 0 16px 34px rgba(39, 24, 37, .14), inset 0 0 0 1px rgba(255, 255, 255, .65);
  transform: translateZ(0);
  font-family: "DM Sans", "PingFang SC", sans-serif;
}

.art::before {
  content: "";
  position: absolute;
  inset: 11px;
  z-index: 4;
  border: 1.5px dashed rgba(255, 255, 255, .78);
  border-radius: 15px;
  pointer-events: none;
}

.art::after {
  content: "";
  position: absolute;
  inset: 6px;
  z-index: 5;
  opacity: .45;
  pointer-events: none;
  /* small perforations along the edge, like a real postage stamp */
  background:
    radial-gradient(circle, rgba(255, 255, 255, .94) 0 2px, transparent 2.3px) 0 0 / 13px 13px repeat-x,
    radial-gradient(circle, rgba(255, 255, 255, .94) 0 2px, transparent 2.3px) 0 100% / 13px 13px repeat-x,
    radial-gradient(circle, rgba(255, 255, 255, .94) 0 2px, transparent 2.3px) 0 0 / 13px 13px repeat-y,
    radial-gradient(circle, rgba(255, 255, 255, .94) 0 2px, transparent 2.3px) 100% 0 / 13px 13px repeat-y;
  mix-blend-mode: screen;
}

.art i,
.art b,
.art em {
  position: absolute;
  display: block;
  font-style: normal;
  font-weight: 400;
  pointer-events: none;
}

.art i::before,
.art i::after,
.art b::before,
.art b::after,
.art em::before,
.art em::after {
  content: "";
  position: absolute;
  display: block;
}

/* Birthday / pink-orange cake */
.art.birthday {
  --ink: #753d4e;
  background:
    radial-gradient(circle at 83% 18%, rgba(255, 241, 178, .9) 0 8%, transparent 8.5%),
    radial-gradient(circle at 16% 78%, rgba(255, 255, 255, .35) 0 15%, transparent 15.5%),
    linear-gradient(135deg, #f7af99 0%, #f8c0a8 43%, #ef8c88 100%);
}

.birthday i {
  left: 27%;
  bottom: 20%;
  z-index: 2;
  width: 46%;
  height: 33%;
  border-radius: 9px 9px 15px 15px;
  background: linear-gradient(180deg, #fff8dd 0 15%, #f4a158 16% 53%, #de6c59 54% 100%);
  box-shadow: 0 11px 0 rgba(125, 58, 62, .15), inset 0 -10px 0 rgba(136, 54, 64, .13);
}

.birthday i::before {
  left: -4%;
  top: -16%;
  width: 108%;
  height: 25%;
  border-radius: 15px 15px 8px 8px;
  background: #fff9df;
  box-shadow: inset 0 -5px 0 #f7cbd1;
}

.birthday i::after {
  left: 19%;
  top: -44%;
  width: 9%;
  height: 48%;
  border-radius: 6px 6px 2px 2px;
  background: repeating-linear-gradient(135deg, #ec6e65 0 5px, #fff2bf 5px 10px);
  box-shadow: 14px 3px 0 -1px #f29b6e, 28px 1px 0 -1px #f29b6e;
}

.birthday b {
  left: 43.3%;
  top: 27%;
  z-index: 3;
  width: 7%;
  height: 11%;
  border-radius: 50% 50% 45% 45%;
  background: #ffe27f;
  box-shadow: 0 2px 0 #db8055;
  animation: birthday-flicker 1.4s ease-in-out infinite alternate;
}

.birthday b::before {
  left: 23%;
  top: -56%;
  width: 57%;
  height: 70%;
  border-radius: 55% 45% 55% 45%;
  background: #fff3a3;
  box-shadow: 0 0 13px 5px rgba(255, 216, 96, .45);
  transform: rotate(12deg);
}

.birthday b::after {
  left: 112%;
  top: -36%;
  width: 100%;
  height: 100%;
  border-radius: 50% 50% 45% 45%;
  background: #ffdc78;
  animation: birthday-flicker .9s .25s ease-in-out infinite alternate;
}

.birthday em {
  right: 15%;
  top: 17%;
  z-index: 3;
  color: var(--ink);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(13px, 2.3vw, 23px);
  letter-spacing: .18em;
  text-transform: uppercase;
  transform: rotate(4deg);
}

.birthday em::before {
  content: "HAPPY BIRTHDAY";
  position: relative;
  border-bottom: 1px solid rgba(117, 61, 78, .42);
  padding-bottom: 2px;
}

.birthday em::after {
  right: -19%;
  top: 120%;
  width: 29px;
  height: 14px;
  border-top: 1px solid rgba(117, 61, 78, .45);
  border-radius: 50%;
  transform: rotate(-21deg);
}

@keyframes birthday-flicker {
  from { transform: scale(.9) rotate(-4deg); filter: brightness(.96); }
  to { transform: scale(1.08) rotate(5deg); filter: brightness(1.18); }
}

/* Anniversary / midnight-blue moon and stars */
.art.anniversary {
  --ink: #f8e7b0;
  background:
    radial-gradient(circle at 79% 24%, rgba(255, 230, 161, .16) 0 16%, transparent 16.5%),
    radial-gradient(circle at 22% 68%, rgba(71, 130, 180, .3) 0 22%, transparent 22.5%),
    linear-gradient(140deg, #102b50 0%, #173e68 48%, #102543 100%);
}

.anniversary i {
  left: 26%;
  top: 24%;
  z-index: 2;
  width: 39%;
  height: 39%;
  border-radius: 50%;
  background: #ffe4a0;
  box-shadow: 0 0 0 11px rgba(255, 225, 157, .08), 0 0 34px rgba(255, 216, 130, .3);
  transform: rotate(-19deg);
}

.anniversary i::before {
  left: 28%;
  top: -6%;
  width: 89%;
  height: 89%;
  border-radius: 50%;
  background: #163961;
}

.anniversary i::after {
  left: 68%;
  top: 67%;
  width: 12%;
  height: 12%;
  border-radius: 50%;
  background: rgba(207, 159, 105, .33);
  box-shadow: -30px -15px 0 -2px rgba(207, 159, 105, .2), -4px -31px 0 -3px rgba(207, 159, 105, .22);
}

.anniversary b {
  right: 21%;
  top: 26%;
  z-index: 3;
  width: 5%;
  height: 8%;
  background: #fff0ba;
  clip-path: polygon(50% 0, 62% 36%, 100% 38%, 70% 58%, 81% 100%, 50% 74%, 19% 100%, 30% 58%, 0 38%, 38% 36%);
  filter: drop-shadow(0 0 6px rgba(255, 238, 158, .8));
  animation: star-drift 3.6s ease-in-out infinite;
}

.anniversary b::before {
  left: -230%;
  top: 210%;
  width: 70%;
  height: 70%;
  background: #b8daf0;
  clip-path: polygon(50% 0, 62% 36%, 100% 38%, 70% 58%, 81% 100%, 50% 74%, 19% 100%, 30% 58%, 0 38%, 38% 36%);
  opacity: .9;
}

.anniversary b::after {
  left: 310%;
  top: 178%;
  width: 48%;
  height: 48%;
  background: #d4eeff;
  clip-path: polygon(50% 0, 62% 36%, 100% 38%, 70% 58%, 81% 100%, 50% 74%, 19% 100%, 30% 58%, 0 38%, 38% 36%);
  opacity: .72;
}

.anniversary em {
  right: 13%;
  bottom: 20%;
  z-index: 3;
  color: var(--ink);
  font-size: clamp(12px, 2.1vw, 21px);
  letter-spacing: .2em;
  text-transform: uppercase;
  opacity: .95;
}

.anniversary em::before {
  content: "TOGETHER / ALWAYS";
  position: relative;
  padding: 7px 10px;
  border: 1px solid rgba(248, 231, 176, .6);
  border-radius: 3px;
  background: rgba(9, 26, 49, .24);
}

.anniversary em::after {
  left: -22%;
  top: -36%;
  width: 16px;
  height: 16px;
  border: 1px solid rgba(248, 231, 176, .65);
  border-radius: 50%;
}

@keyframes star-drift {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0); }
  50% { transform: translate3d(3px, -6px, 0) rotate(12deg); }
}

/* Love / wine-red envelope and a sealed heart */
.art.love {
  --ink: #ffe2d5;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 225, 209, .13) 0 18%, transparent 18.5%),
    radial-gradient(circle at 86% 82%, rgba(233, 134, 129, .21) 0 22%, transparent 22.5%),
    linear-gradient(135deg, #6e2034 0%, #8d2e3f 46%, #49172b 100%);
}

.love i {
  left: 23%;
  bottom: 22%;
  z-index: 2;
  width: 53%;
  height: 39%;
  border: 2px solid rgba(255, 224, 210, .92);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(255, 224, 210, .2), rgba(255, 224, 210, .07));
  box-shadow: 0 13px 0 rgba(37, 8, 20, .18), inset 0 0 0 6px rgba(89, 15, 36, .14);
}

.love i::before {
  left: 5%;
  top: -1%;
  width: 90%;
  height: 88%;
  border-bottom: 2px solid rgba(255, 224, 210, .72);
  transform: skewY(-29deg) rotate(-2deg);
  transform-origin: top left;
}

.love i::after {
  right: 5%;
  top: -1%;
  width: 90%;
  height: 88%;
  border-bottom: 2px solid rgba(255, 224, 210, .72);
  transform: skewY(29deg) rotate(2deg);
  transform-origin: top right;
}

.love b {
  left: 44%;
  top: 29%;
  z-index: 4;
  width: 16%;
  height: 16%;
  background: #f68d87;
  transform: rotate(-45deg);
  border-radius: 5px 0 5px 0;
  box-shadow: 0 0 0 6px rgba(246, 141, 135, .12), 0 7px 13px rgba(39, 4, 20, .24);
  animation: love-beat 1.7s ease-in-out infinite;
}

.love b::before,
.love b::after {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: inherit;
}

.love b::before { left: 0; top: -50%; }
.love b::after { left: 50%; top: 0; }

.love em {
  right: 13%;
  top: 17%;
  z-index: 3;
  color: var(--ink);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(15px, 2.7vw, 27px);
  letter-spacing: .16em;
  text-transform: uppercase;
  transform: rotate(4deg);
}

.love em::before {
  content: "SEALED WITH LOVE";
  position: relative;
  padding: 4px 8px;
  border-top: 1px solid rgba(255, 226, 213, .75);
  border-bottom: 1px solid rgba(255, 226, 213, .75);
}

.love em::after {
  left: -30%;
  top: 160%;
  width: 34px;
  height: 1px;
  background: rgba(255, 226, 213, .55);
  transform: rotate(-18deg);
}

@keyframes love-beat {
  0%, 35%, 100% { transform: rotate(-45deg) scale(1); }
  15% { transform: rotate(-45deg) scale(1.13); }
}

@media (prefers-reduced-motion: reduce) {
  .birthday b,
  .birthday b::after,
  .anniversary b,
  .love b { animation: none; }
}
