@font-face {
  font-family: "Fjeld Serif";
  src: url("/fjeld.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; background: #05070a; overflow: hidden; }
#frame, #film {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s ease;
}
#frame { z-index: 0; }
#film { z-index: 1; }
#frame.on, #film.on { opacity: 1; }
#wordmark {
  position: fixed;
  inset: 0;
  z-index: 2;
  display: grid;
  place-content: center;
  justify-items: center;
  font-family: "Fjeld Serif", Georgia, serif;
  font-weight: 600;
  font-size: clamp(4.5rem, 16vw, 11rem);
  letter-spacing: 0.34em;
  text-indent: 0.34em; /* optically recenter: letter-spacing adds a trailing gap */
  opacity: 0;
  pointer-events: none;
  /* layer 1: travelling glint · layer 2: cold metallic vertical gradient */
  background-image:
    linear-gradient(100deg, transparent 42%, rgba(255, 255, 255, 0.95) 50%, transparent 58%),
    linear-gradient(180deg, #ffffff 0%, #eef3f5 38%, #a9bfcc 72%, #dde5e9 100%);
  background-size: 260% 100%, 100% 100%;
  background-position: -160% 0, 0 0;
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: blur(16px) drop-shadow(0 3px 30px rgba(0, 0, 0, 0.6));
  transform: scale(1.12);
}
#wordmark.on {
  animation:
    fjeld-reveal 3.4s cubic-bezier(0.16, 0.6, 0.2, 1) forwards,
    fjeld-glint 2.2s ease-in-out 3.6s forwards;
}
@keyframes fjeld-reveal {
  0% {
    opacity: 0;
    letter-spacing: 0.34em;
    text-indent: 0.34em;
    filter: blur(16px) drop-shadow(0 3px 30px rgba(0, 0, 0, 0.6));
    transform: scale(1.12);
  }
  55% { opacity: 1; }
  100% {
    opacity: 1;
    letter-spacing: 0.07em;
    text-indent: 0.07em;
    filter: blur(0) drop-shadow(0 3px 30px rgba(0, 0, 0, 0.6));
    transform: scale(1);
  }
}
@keyframes fjeld-glint {
  from { background-position: -160% 0, 0 0; }
  to { background-position: 220% 0, 0 0; }
}
/* thin rule growing beneath the wordmark */
#wordmark::after {
  content: "";
  width: 100%;
  height: 1px;
  margin-top: 1.6rem;
  background: linear-gradient(90deg, transparent, rgba(244, 242, 236, 0.75), transparent);
  transform: scaleX(0);
  transition: transform 1.8s cubic-bezier(0.16, 0.6, 0.2, 1) 1.4s;
}
#wordmark.on::after { transform: scaleX(1); }
@media (prefers-reduced-motion: reduce) {
  #wordmark.on {
    animation: none;
    opacity: 1;
    letter-spacing: 0.07em;
    text-indent: 0.07em;
    filter: blur(0) drop-shadow(0 3px 30px rgba(0, 0, 0, 0.6));
    transform: none;
  }
  #wordmark.on::after { transition: none; transform: scaleX(1); }
}
#mail {
  position: fixed;
  right: 1.2rem;
  bottom: 1rem;
  z-index: 3;
  color: rgba(244, 242, 236, 0.45);
  text-decoration: none;
  font-size: 1.05rem;
}
#mail:hover { color: rgba(244, 242, 236, 0.9); }
#archive-link {
  position: fixed;
  left: 1.2rem;
  bottom: 1rem;
  z-index: 3;
  color: rgba(244, 242, 236, 0.45);
  text-decoration: none;
  font-family: "Fjeld Serif", Georgia, serif;
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  opacity: 0;
  transition: opacity 2.4s ease;
}
#archive-link.on { opacity: 1; }
#archive-link:hover { color: rgba(244, 242, 236, 0.9); }
