@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 200;
  font-display: swap;
  src: url("fonts/inter-latin-200.woff2") format("woff2");
}

html {
  color-scheme: dark;
  background: #000;
  height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  background: #000;
  color: rgba(255, 255, 255, 0.8);
  overflow: hidden;
}

#scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: #000;
}

#scene canvas,
#bh-still {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

#bh-still {
  object-fit: cover;
  object-position: center center;
  z-index: 1;
}

main {
  position: relative;
  z-index: 1;
}

.caption {
  position: fixed;
  left: 50%;
  top: 84%;
  bottom: auto;
  transform: translateX(-50%);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  margin: 0;
  max-width: calc(100% - 2.5rem);
  font-family: "Inter", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 200;
  font-size: clamp(0.78rem, 0.55rem + 0.72vw, 1.12rem);
  letter-spacing: 0.11em;
  line-height: 1.45;
  text-align: center;
  white-space: nowrap;
  color: rgba(244, 242, 238, 0.82);
  text-shadow: 0 0 22px rgba(0, 0, 0, 0.85), 0 1px 2px rgba(0, 0, 0, 0.9);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.line {
  display: inline-block;
}

.smile {
  position: absolute;
  left: calc(100% + 0.48em);
  top: 0.06em;
  font-size: 0.8em;
  letter-spacing: 0;
  color: rgba(244, 242, 238, 0.72);
  opacity: 0;
  animation: fade-smile 1.6s ease 1.7s forwards;
}

@keyframes fade-smile {
  from { opacity: 0; }
  to { opacity: 1; }
}

::selection {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

@media (max-width: 520px) {
  .caption {
    top: 88%;
    letter-spacing: 0.07em;
    font-size: clamp(0.68rem, 3.15vw, 0.84rem);
  }
}

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