/* Boje, raspored i animacije početne strane. */
* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: #152b40;
}

body {
  font-family: ui-rounded, "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  color: white;
}

main {
  height: 100svh;
  min-height: 540px;
  position: relative;
  overflow: hidden;
  background: #152b40;
}

.scene {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.scene-logo {
  position: absolute;
  width: 55%;
  top: 50%;
  left: 22%;
}
.shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(14, 31, 47, 0.6), transparent 23%);
  pointer-events: none;
}

.title {
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  width: 29%;
  text-align: center;
}

h1 {
  margin: 0;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: 0.025em;
  text-shadow:
    0 3px 0 #173248,
    0 6px 20px #0e243b;
  font-size: clamp(26px, 3.3vw, 70px);
}

.line {
  display: block;
  white-space: nowrap;
}
/* 
.line:last-child {
  font-size: 1.48em;
  color: #ffd777;
  margin-top: 0.05em;
} */

.letter {
  display: inline-block;
  opacity: 0;
  animation: arrive 0.85s cubic-bezier(0.2, 0.85, 0.3, 1.2) forwards;
  animation-delay: calc(var(--i) * 65ms + 180ms);
}

.space {
  width: 0.26em;
}



.announcement {
  position: absolute;
  bottom: 10%;
  left: 80%;
  transform: translateX(-50%);
  text-align: center;
  padding: 15px 30px;
  border: 1px solid #ffffff40;
  border-radius: 24px;
  background: #183044dd;
  box-shadow: 0 10px 35px #152b4030;
  backdrop-filter: blur(12px);
  opacity: 0;
  animation: notice 1s 1.6s forwards;
  white-space: nowrap;
}

.announcement--lower {
  bottom: 4%;
}

.soon {
  display: block;
  color: #ffd777;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.32em;
  margin-bottom: 6px;
}

.invitation {
  font-size: clamp(16px, 1.25vw, 23px);
  font-weight: 800;
  letter-spacing: 0.12em;
}

.spark {
  position: absolute;
  color: #ffe3a1;
  font-size: 22px;
  opacity: 0;
  animation: twinkle 4s infinite;
  pointer-events: none;
}

.spark:nth-of-type(1) {
  left: -7%;
  top: 15%;
  animation-delay: 1.1s;
}

.spark:nth-of-type(2) {
  right: -5%;
  top: 50%;
  animation-delay: 2s;
}

.spark:nth-of-type(3) {
  left: 18%;
  top: -20%;
  animation-delay: 2.8s;
}

@keyframes arrive {
  0% {
    opacity: 0;
    transform: translateY(-28px) scale(0.35) rotate(-8deg);
  }

  65% {
    opacity: 1;
    transform: translateY(5px) scale(1.12) rotate(2deg);
  }

  100% {
    opacity: 1;
    transform: none;
  }
}

@keyframes notice {
  to {
    opacity: 1;
  }
}

@keyframes twinkle {
  0%,
  65%,
  100% {
    opacity: 0;
    transform: scale(0.5);
  }

  78% {
    opacity: 0.9;
    transform: scale(1.15);
  }

  90% {
    opacity: 0.3;
    transform: scale(0.85);
  }
}

@media (max-aspect-ratio: 4/3) {
  main {
    min-height: 600px;
    background: radial-gradient(ellipse at 50% 20%, #35516a, #122738 75%);
  }

  .scene {
    object-fit: contain;
  }

  .shade {
    background: linear-gradient(
      0deg,
      #122738 3%,
      transparent 35%,
      transparent 65%,
      #152b4040
    );
  }

  .title {
    top: 9%;
    width: 85%;
  }

  h1 {
    font-size: clamp(32px, 7vw, 65px);
  }


  .announcement {
    align-items: center;
    bottom: 10%;
    left: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 16px 24px;
    gap: 8px;
  }
  .announcement--lower {
    bottom: 2%;
  }
  .invitation {
    font-size: 16px;
  }

  .spark:nth-of-type(1) {
    left: 5%;
  }

  .spark:nth-of-type(2) {
    right: 5%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .letter,
  .announcement {
    animation: none;
    opacity: 1;
  }

  .spark {
    display: none;
  }
}

.youtube-link {
  bottom: 2%;
  left: 50%;

  padding: 10px 20px;
  border-radius: 24px;
  background: #c90000;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background 0.2s,
    box-shadow 0.2s;
}

.youtube-link:hover {
  background: #a80000;
}

.youtube-link:focus-visible {
  outline: 3px solid #ffd777;
  outline-offset: 4px;
}
