@import url("https://fonts.googleapis.com/css2?family=Almarai:wght@300;400;700;800&family=Marhey:wght@300..700&family=Reem+Kufi:wght@400;500;600;700&display=swap");

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  font-family: "Almarai", sans-serif;
}

html,
body {
  width: 100%;
  height: 100%;
}

body {
    padding-top: 100px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  background-color: #ebe2d7;
}

.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.55), transparent 38%),
    linear-gradient(180deg, #efe6db 0%, #e6d5c3 100%);
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

.loading-screen--hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.rose-loader {
  position: relative;
  width: 88px;
  height: 140px;
  animation: rose-bloom 3s ease-in-out infinite;
}

.rose-loader__petal,
.rose-loader__core,
.rose-loader__stem,
.rose-loader__leaf {
  position: absolute;
}

.rose-loader__petal {
  width: 40px;
  height: 58px;
  left: 24px;
  top: 8px;
  border-radius: 80% 80% 70% 70%;
  background: linear-gradient(180deg, #f7efe7 0%, #d7b892 100%);
  box-shadow: inset -4px -10px 18px rgba(61, 78, 64, 0.1);
  transform-origin: bottom center;
}

.rose-loader__petal--one {
  transform: rotate(-34deg) translateY(4px);
}

.rose-loader__petal--two {
  transform: rotate(-12deg) translateY(-2px);
}

.rose-loader__petal--three {
  transform: rotate(12deg) translateY(-2px);
}

.rose-loader__petal--four {
  transform: rotate(34deg) translateY(4px);
}

.rose-loader__core {
  width: 28px;
  height: 28px;
  left: 30px;
  top: 34px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff8ef 0%, #d7b892 72%, #9f7a4e 100%);
  box-shadow: 0 0 0 6px rgba(215, 184, 146, 0.12);
}

.rose-loader__stem {
  width: 8px;
  height: 64px;
  left: 40px;
  top: 56px;
  border-radius: 999px;
  background: linear-gradient(180deg, #7e9a78 0%, #3d4e40 100%);
}

.rose-loader__leaf {
  width: 26px;
  height: 14px;
  top: 84px;
  border-radius: 999px 999px 999px 0;
  background: linear-gradient(135deg, #9bb091 0%, #3d4e40 100%);
}

.rose-loader__leaf--left {
  left: 20px;
  transform: rotate(-28deg);
}

.rose-loader__leaf--right {
  left: 42px;
  border-radius: 999px 999px 0 999px;
  transform: rotate(28deg);
}

.loading-screen__text {
  color: #3d4e40;
  font-size: 13px;
  letter-spacing: 0.5px;
}

.continer {
  position: relative;
  width: min(430px, 100vw);
  height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  opacity: 0;
  transform: translateY(22px) scale(0.98);
}

body.page-ready .continer {
  animation: page-reveal 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.continer {
  position: relative;
  width: min(430px, 100vw);
  height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

img.main-wallpaper {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.texts {
  font-family: "Almarai", sans-serif;
  position: absolute;
  top: 24%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: #3d4e40;
}

.texts h1 {
  font-family: "Reem Kufi", sans-serif;
  letter-spacing: 0.2px;
  animation: name-float 4.8s cubic-bezier(0.45, 0, 0.2, 1) infinite;
  transform-origin: center;
  will-change: transform;
  font-size: 30px;
  font-weight: 100;
}

.texts h1:nth-of-type(1) {
  animation-delay: 0s;
}

.texts h1:nth-of-type(2) {
  animation-delay: 0.45s;
}

.text-image {
  width: 40%;
}

.divaider-img {
  width: 40%;
}

.texts .first {
  width: 79%;
  display: flex;
  font-size: 10px;
  margin: 0 auto;
  justify-content: center;
  line-height: 1.5;
}

.and {
  margin-top: -5px;
  margin-bottom: -10px;
  width: 20%;
}

.second {
  margin-top: 5px;
  font-size: 10px;
}

/* مربع التفاصيل */
.box-details {
  position: absolute;
  top: 51%;
  left: 50%;
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  border-radius: 10px;
  background-color: #3d4e40;
  width: 90%;
  margin: 0 auto;
  transform: translate(-50%, -50%);
  text-align: center;
  color: #ded7c4;
  justify-content: center;
  gap: 20px;
  padding: 10px;
  border: 1px solid #ded7c45d;
}

.box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #ded7c4;
  font-size: 12px;
  gap: 5px;
}

.box:not(:last-child) {
  border-left: 1px solid rgba(215, 184, 146, 0.18);
  padding-left: 18px;
}

.box h3 {
  font-size: 10px;
}

.box p {
  color: #e7e7e7;
  font-weight: 600;
}

.box h6 {
  width: 110%;
}

.box img {
  width: 25px;
  margin-bottom: 5px;
  animation: detail-icon-float 3.8s cubic-bezier(0.45, 0, 0.2, 1) infinite;
  transform-origin: center;
  will-change: transform;
}
.box img.wedding {
  width: 35px;
  margin-top: -20px;
  margin-bottom: 0;
  animation-duration: 4.4s;
  animation-delay: 0.25s;
}


/* مربع التهنئة */
.middle-text {
    position: absolute;
    top: 82%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    justify-content: center;
}

.middle-text-img{
width: 120%;
}

@keyframes page-reveal {
  0% {
    opacity: 0;
    transform: translateY(28px) scale(0.96);
    filter: blur(10px);
  }

  60% {
    opacity: 1;
    transform: translateY(-4px) scale(1.01);
    filter: blur(0);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes rose-bloom {
  0%,
  100% {
    transform: scale(0.95) rotate(-2deg);
  }

  50% {
    transform: scale(1.04) rotate(2deg);
  }
}

body.page-ready .rose-loader {
  animation: rose-close 0.8s ease forwards;
}

@keyframes rose-close {
  0% {
    transform: scale(1.04) rotate(0deg);
    opacity: 1;
  }

  100% {
    transform: scale(0.45) rotate(18deg);
    opacity: 0;
  }
}

@keyframes name-float {
  0% {
    transform: translateY(0) scale(1);
  }

  25% {
    transform: translateY(-2px) scale(1.01);
  }

  50% {
    transform: translateY(0) scale(1);
  }

  75% {
    transform: translateY(2px) scale(0.995);
  }

  100% {
    transform: translateY(0) scale(1);
  }
}

@keyframes detail-icon-float {
  0% {
    transform: translateY(0) rotate(0deg) scale(1);
  }

  20% {
    transform: translateY(-2px) rotate(-0.7deg) scale(1.01);
  }

  50% {
    transform: translateY(0) rotate(0deg) scale(1);
  }

  80% {
    transform: translateY(2px) rotate(0.7deg) scale(0.995);
  }

  100% {
    transform: translateY(0) rotate(0deg) scale(1);
  }
}

@media (max-width: 420px) {
.box-details {
top: 55%;
}
.middle-text {
top: 81%;
}
}
@media (min-width: 768px) {
    body {
        padding-top: 0px;
    }
  .continer {
    width: min(520px, 100vw);
  }

  .texts {
    top: 25%;
  }

  .text-image,
  .divaider-img {
    width: 36%;
  }

  .texts .first {
    width: 72%;
    font-size: 11px;
  }

  .second {
    font-size: 11px;
  }

  .box-details {
    width: 86%;
    gap: 16px;
    top:65%
  }

  .box {
    font-size: 13px;
  }

  .box h3,
  .box h6 {
    font-size: 11px;
  }

  .middle-text {
    top: 90%;
  }

  .middle-text-img {
    width: 112%;
  }
}

@media (min-width: 1200px) {
    body {
        padding-top: 0px;
    }
  .continer {
    width: min(560px, 100vw);
  }

  .texts {
    top: 28%;
  }

  .box-details {
    top: 71%;
    width: 74%;
    gap: 12px;
  }

  .box {
    width: 100%;
    justify-content: center;
    gap: 10px;
    padding-bottom: 12px;
  }

  .box:not(:last-child) {
    padding-left: 0
  }

  .box:last-child {
    padding-bottom: 0;
  }

  .box img.wedding {
    margin-top: 0;
  }

  .middle-text {
    top: 92%;
  }

  .middle-text-img {
    width: 108%;
  }
}