:root { color-scheme: dark; }

body {
  position: relative;
  box-sizing: border-box;
  display: grid;
  place-items: center;
  min-height: 100svh;
  margin: 0;
  padding: 24px;
  background: #101318;
  text-align: center;
}

.backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  pointer-events: none;
}

main { position: relative; width: min(100%, clamp(320px, 43vw, 640px)); }

.logo {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: -4%;
}

h1 {
  margin: 0;
  color: #f1deb1;
  font: 600 clamp(28px, 4vw, 46px)/1.15 Alegreya, Georgia, serif;
  text-shadow: 0 2px 6px #101318, 0 3px 16px #101318;
}

.typewriter { display: none; }

@media (prefers-reduced-motion: no-preference) {
  .with-motion .backdrop, .with-motion .logo { opacity: 0; }
  .with-motion.is-ready .backdrop { animation: backdrop-in 950ms ease-out both; }
  .with-motion.is-ready .logo { animation: logo-in 700ms 240ms ease-out both; }

  .with-motion h1 { display: inline-grid; }
  .with-motion h1 > span { grid-area: 1 / 1; white-space: nowrap; }
  .with-motion .still-copy { visibility: hidden; }
  .with-motion .typewriter { display: block; text-align: left; }
  .final-dot { animation: dot-blink 600ms steps(1, end) 5; }
}

@keyframes backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes logo-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes dot-blink {
  50% { opacity: 0; }
}
