@font-face {
  font-family: "Calling Code";
  src: url("assets/CallingCode-Regular.otf") format("opentype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  background: #f2f2f2;
  color: #171717;
  font-family: "Courier New", Courier, monospace;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; margin: 0; }

.page {
  min-height: 100vh;
  min-height: 100svh;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 3vh 20px 6vh;
  overflow: hidden;
}

.illustration {
  position: relative;
  flex: none;
  height: min(77svh, 920px);
  aspect-ratio: 2260 / 3102;
  max-width: 80vw;
}

.lottie {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.lottie { opacity: 0; }
.illustration.is-playing .lottie { opacity: 1; }

h1 {
  margin: 4.5vh 0 0;
  font-size: clamp(16px, 1vw, 21px);
  font-weight: 400;
  line-height: 1.3;
  text-align: center;
}

.typed {
  display: block;
  width: 0;
  overflow: hidden;
  white-space: nowrap;
  border-right: 2px solid currentColor;
  animation: type 2.8s steps(28, end) .25s forwards,
             caret .75s step-end infinite;
}

@keyframes type { to { width: 28ch; } }
@keyframes caret { 50% { border-color: transparent; } }

.contact-row { display: contents; }

.contact-label, .contact-link {
  position: absolute;
  top: 46%;
  font-family: "Calling Code", monospace;
  font-size: clamp(16px, 1.35vw, 27px);
  line-height: 1.3;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(30px);
  animation: rise .65s ease-out 3.2s forwards;
}

.contact-label { left: 9.5%; }
.contact-link { right: 9.5%; color: inherit; text-decoration: none; }
.contact-link:hover, .contact-link:focus-visible { text-decoration: underline; }

@keyframes rise { to { opacity: 1; transform: translateY(0); } }

@media (max-width: 900px) {
  .page { padding: 5svh 16px 7svh; }
  .illustration { height: min(62svh, 720px); max-width: 90vw; }
  h1 { margin-top: 3svh; font-size: clamp(13px, 2.4vw, 17px); }
  .contact-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 6svh;
  }
  .contact-label, .contact-link {
    position: static;
    font-size: clamp(15px, 3.2vw, 19px);
  }
}

@media (max-width: 600px) {
  .page {
    justify-content: center;
    padding: 24px 10px;
  }
  .illustration {
    height: min(72svh, 740px);
    max-width: 100%;
  }
  h1 { margin-top: 2svh; }
  .contact-row { margin-top: 3svh; }
  .contact-label { display: none; }
}

@media (max-width: 380px) {
  h1 { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .typed { width: 28ch; border: 0; animation: none; }
  .contact-label, .contact-link {
    opacity: 1;
    transform: none;
    animation: none;
  }
}
