@import url("https://fonts.googleapis.com/css2?family=Lexend+Giga:wght@100..900&family=Playwrite+VN:wght@100..400&display=swap");

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  width: 100vw;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 1rem;
  color: #f1f5f9;
  text-align: center;
  background: linear-gradient(135deg, #020003, #001f24, #11548f, #8f1849);
  background-size: 400% 400%;
  animation: gradientMove 10s ease infinite;
}

.ambient-quote {
  position: fixed;
  z-index: 0;
  --quote-width: 30rem;
  --hidden-clip: inset(0 100% 0 0);
  width: min(var(--quote-width), calc(100vw - 2rem));
  padding: 0.45em 0.7em;
  clip-path: var(--hidden-clip);
  color: rgba(241, 245, 249, 0.78);
  font-family: "Playwrite VN", cursive;
  font-size: clamp(0.8rem, 1.2vw, 1rem);
  line-height: 1.6;
  text-align: left;
  white-space: nowrap;
  animation: quoteType 20s steps(38, end) infinite;
}

.quote-top {
  --quote-width: 20rem;
  --hidden-clip: inset(0 0 0 100%);
  top: clamp(0.5rem, 2vw, 1rem);
  right: clamp(0.5rem, 2vw, 1.25rem);
  direction: rtl;
  text-align: right;
  animation-delay: 10s;
}

.quote-bottom {
  --quote-width: 25rem;
  bottom: clamp(0.15rem, 2vw, 0.25rem);
  left: clamp(0.5rem, 2vw, 1.25rem);
}

.container {
  position: relative;
  z-index: 1;
  width: min(100%, 42rem);
  padding: 2rem;
}

h1 {
  margin: 0 0 1.5rem;
  font-family: "Lexend Giga", Arial, Helvetica, sans-serif;
  font-size: clamp(2.4rem, 8vw, 4rem);
  font-weight: 700;
  line-height: 1.15;
  animation: fadeIn 1s ease-in-out;
}

p {
  margin-bottom: 1rem;
  color: #f1f5f9;
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(1rem, 3vw, 1.15rem);
  line-height: 1.55;
}

.highlight {
  color: #f1f5f9;
  font-weight: 700;
}

.divider {
  width: 40%;
  height: 1px;
  margin: 1.5rem auto;
  background: rgba(241, 245, 249, 0.45);
}

em {
  font-family: "Playwrite VN", cursive;
}

small {
  color: rgba(241, 245, 249, 0.68);
}

button {
  padding: 0.5rem;
  border: 0.1rem solid #f1f5f9;
  border-radius: 0.4rem;
  background: rgba(255, 255, 255, 0.05);
  color: #f1f5f9;
  cursor: pointer;
}

button:hover {
  background: rgba(255, 255, 255, 0.3);
}

@keyframes fadeIn {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes gradientMove {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

@keyframes quoteType {
  0%,
  5% {
    clip-path: var(--hidden-clip);
  }

  20%,
  30% {
    clip-path: inset(0);
  }

  45%,
  100% {
    clip-path: var(--hidden-clip);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
