
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  padding: 30px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: #f8d6e6;
  font-family: "Fredoka", sans-serif;
}

/* HOVEDINVITATION */

.invitation {
  position: relative;
  isolation: isolate;

  width: 100%;
  max-width: 1100px;
  min-height: 800px;
  overflow: hidden;

  background-image: url("img/striber.png");
  background-repeat: repeat;
  background-size: 420px auto;

  border: 8px solid white;
  border-radius: 35px;

  box-shadow: 0 20px 60px #a65c8030;
}

/* GARDINER */

.curtains {
  position: absolute;
  inset: 0;
  z-index: 1;

  width: 100%;
  height: 100%;
  object-fit: fill;

  pointer-events: none;
}

/* LYSEKRONE */

.chandelier {
  position: absolute;
  z-index: 3;

  top: -15px;
  left: 50%;

  width: 230px;
  height: auto;

  transform-origin: center top;
  animation: swing 5s ease-in-out infinite;

  pointer-events: none;
}

@keyframes swing {
  0%, 100% {
    transform: translateX(-50%) rotate(-3deg);
  }

  50% {
    transform: translateX(-50%) rotate(3deg);
  }
}

/* INDHOLD */

.invitation-content {
  position: relative;
  z-index: 2;

  max-width: 620px;
  margin: 0 auto;

  padding: 250px 30px 95px;

  text-align: center;
  color: #723050;
}

.top-text {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 5px;
}

/* OVERSKRIFT */

h1 {
  margin-top: 12px;

  font-family: "Great Vibes", cursive;
  font-size: 105px;
  font-weight: 400;
  line-height: 0.95;

  color: #bd5c89;
  text-shadow: 2px 3px white;
  
}

h1 span {
  display: block;
  margin-top: 18px;
  font-size: 72px;
}

/* 1 2 3 */

.birthday-ages {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;

  margin: 25px auto 10px;
}

.birthday-ages span {
  display: flex;
  justify-content: center;
  align-items: center;

  width: 95px;
  height: 110px;

  border-radius: 50%;

  background: #f5aecb;
  border: 4px solid white;

  font-size: 75px;
  font-weight: 700;
  color: white;

  text-shadow: 2px 3px #c77b9e;
  box-shadow: 0 6px 0 #dfa0bc;

  animation: bounce 3s ease-in-out infinite;
}

.birthday-ages span:nth-child(2) {
  background: #b4d9d2;
  animation-delay: .3s;
}

.birthday-ages span:nth-child(3) {
  background: #f3cf89;
  animation-delay: .6s;
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-9px);
  }
}

/* TEKST */

.birthday-subtitle {
  margin-top: 26px;

  font-size: 19px;
  font-weight: 700;
  letter-spacing: 2px;
  line-height: 1.6;
}

.party-divider {
  margin: 15px auto;
  color: #d4a951;
  font-size: 30px;
}

.invite-description {
  max-width: 420px;
  margin: 0 auto;
  padding: 22px 12px;

  font-size: 17px;
  line-height: 1.7;
    background: #ffffffed;
  border: 2px solid #e9b4c9;
  border-radius: 20px;

  box-shadow: 0 6px 0 #eabed1;
}


/* FESTDETALJER */

.party-details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;

  margin-top: 35px;
}

.detail {
  padding: 22px 12px;

  background: #fffaf0ed;
  border: 2px solid #e9b4c9;
  border-radius: 20px;

  box-shadow: 0 6px 0 #eabed1;
}

.detail span {
  display: block;
  margin-bottom: 8px;

  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
}

.detail strong {
  font-size: 15px;
}

/* KNAP */

#celebrateButton {
  margin-top: 38px;
  padding: 17px 28px;

  background: #bd5c89;
  color: white;

  border: 3px solid white;
  border-radius: 40px;

  font-family: "Fredoka", sans-serif;
  font-size: 14px;
  font-weight: 600;

  box-shadow: 0 6px 0 #964466;
  cursor: pointer;

  transition: .25s ease;
}

#celebrateButton:hover {
  transform: translateY(-5px);
  background: #d87fa6;
}

.bottom-text {
  margin-top: 30px;

  font-family: "Great Vibes", cursive;
  font-size: 38px;
}

/* KONFETTI */

#confettiContainer {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  overflow: hidden;
}

.confetti {
  position: absolute;
  top: -20px;

  width: 10px;
  height: 15px;

  animation: fall linear forwards;
}

@keyframes fall {
  to {
    transform: translateY(110vh) rotate(720deg);
    opacity: 0;
  }
}

/* TABLET */

@media (max-width: 900px) {

  .invitation {
    max-width: 650px;
  }

  .chandelier {
    width: 185px;
  }

  .invitation-content {
    padding-top: 225px;
  }

}

/* MOBIL */

@media (max-width: 600px) {

  body {
    padding: 8px;
  }

  .invitation {
    min-height: 100dvh;
    border-width: 5px;
    border-radius: 25px;
    background-size: 270px auto;
  }

  .chandelier {
    width: 140px;
    top: -10px;
  }

  .invitation-content {
    padding: 185px 35px 65px;
  }

  .top-text {
    font-size: 11px;
    letter-spacing: 3px;
  }

  h1 {
    font-size: 68px;
  }

  h1 span {
    font-size: 48px;
  }

  .birthday-ages {
    gap: 10px;
  }

  .birthday-ages span {
    width: 65px;
    height: 75px;
    font-size: 45px;
  }

  .birthday-subtitle {
    font-size: 14px;
  }

  .invite-description {
    font-size: 14px;
  }

  .party-details {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .detail {
    padding: 15px;
  }

  .bottom-text {
    font-size: 31px;
  }

  #celebrateButton {
    font-size: 12px;
    padding: 14px 20px;
  }

}

@media (max-width: 375px) {

  .invitation-content {
    padding-left: 24px;
    padding-right: 24px;
  }

  h1 {
    font-size: 58px;
  }

  h1 span {
    font-size: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}


/* =====================================
   BILLEDE AF TRUNTE
===================================== */

.trunte-photo {
  position: relative;
  width: fit-content;
  margin: 45px auto 55px;
}

/* OVAL BILLEDRAMME */

.trunte-photo-frame {
  width: 250px;
  height: 310px;
  padding: 10px;

  background: #f5bad2;

  border: 6px double #fffaf0;
  border-radius: 50%;

  box-shadow:
    0 0 0 5px #d98fb0,
    0 12px 30px #a85b8050;

  overflow: hidden;
  transform: rotate(-3deg);
  transition: transform .4s ease;
}

.trunte-photo-frame:hover {
  transform: rotate(0deg) scale(1.04);
}

/* SELVE BILLEDET */

.trunte-photo-frame img {
  width: 100%;
  height: 100%;

  object-fit: cover;
  object-position: center;

  border-radius: 50%;
}

/* SLØJFE */

.photo-bow {
  position: absolute;
  bottom: -35px;
  left: 50%;
  transform: translateX(-50%);

  font-size: 55px;
  z-index: 2;

  filter: drop-shadow(0 4px 3px #a85b8050);
}

/* STJERNER VED BILLEDET */

.photo-star {
  position: absolute;
  color: #d5a852;
  font-size: 38px;
  text-shadow: 2px 2px white;
  animation: photoTwinkle 3s ease-in-out infinite;
}

.star-left {
  top: 55px;
  left: -55px;
}

.star-right {
  bottom: 45px;
  right: -60px;
  animation-delay: 1s;
}

@keyframes photoTwinkle {
  0%, 100% {
    opacity: .5;
    transform: scale(.8) rotate(-10deg);
  }

  50% {
    opacity: 1;
    transform: scale(1.2) rotate(15deg);
  }
}

/* COMPUTER */

@media (min-width: 1024px) {
  .trunte-photo-frame {
    width: 280px;
    height: 350px;
  }
}

/* MOBIL */

@media (max-width: 600px) {
  .trunte-photo {
    margin: 35px auto 45px;
  }

  .trunte-photo-frame {
    width: 190px;
    height: 240px;
  }

  .photo-bow {
    font-size: 45px;
    bottom: -28px;
  }

  .photo-star {
    font-size: 27px;
  }

  .star-left {
    left: -35px;
  }

  .star-right {
    right: -35px;
  }
}



/* GARDINET BEVÆGER SIG */

.curtains {
  transform-origin: center top;
  animation: curtainMove 5s ease-in-out infinite;
}

@keyframes curtainMove {
  0%, 100% {
    transform: scaleX(1);
  }

  50% {
    transform: scaleX(1.10);
  }
}


.curtains {
  transform-origin: center top;
  animation: curtainOpen 2s ease-out forwards;
}

@keyframes curtainOpen {
  from {
    transform: scaleX(1.25);
    opacity: 0.7;
  }

  to {
    transform: scaleX(1);
    opacity: 1;
  }
}
