@font-face {
  font-family: "Josefin Sans";
  src: url("/assets/josefin-sans-600.woff2") format("woff2");
  font-weight: 600;
  font-display: block;
}

:root {
  --reveal-at: 6.2s;   /* wordmark begins to surface */
  --sigil-at: 11.11s;  /* ∴ arrives */
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0b1219;
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

#field {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* Wordmark: brushed chrome with a travelling glint */
#mark {
  position: fixed;
  right: clamp(20px, 3.2vw, 56px);
  bottom: clamp(48px, 15vh, 160px);
  display: flex;
  gap: 0.42em;
  font-family: "Josefin Sans", sans-serif;
  font-weight: 600;
  font-size: clamp(30px, 6.2vw, 112px);
  line-height: 1;
  letter-spacing: 0.01em;
  color: transparent;
  background-image:
    linear-gradient(105deg,
      transparent 0%, transparent 42%,
      rgba(255,255,255,0.95) 48%, rgba(255,255,255,1) 50%, rgba(255,255,255,0.95) 52%,
      transparent 58%, transparent 100%),
    linear-gradient(180deg,
      #ffffff 0%, #eef1f4 30%, #b9c1c9 48%, #f7f9fb 54%, #d4dae0 72%, #9aa4ae 100%);
  background-size: 300% 100%, 100% 100%;
  background-position: 150% 0, 0 0;
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 1px 0 rgba(0,0,0,0.25)) drop-shadow(0 6px 18px rgba(0,0,0,0.35));
  opacity: 0;
  animation:
    surface 3.6s cubic-bezier(.2,.7,.1,1) var(--reveal-at) forwards,
    glint 7s ease-in-out calc(var(--reveal-at) + 2.4s) infinite;
}

@keyframes surface {
  0%   { opacity: 0; letter-spacing: 0.18em; transform: translateY(6px); }
  60%  { opacity: 1; }
  100% { opacity: 1; letter-spacing: 0.01em; transform: none; }
}

@keyframes glint {
  0%   { background-position: 150% 0, 0 0; }
  35%  { background-position: -50% 0, 0 0; }
  100% { background-position: -50% 0, 0 0; }
}

/* ∴ — the quiet mark */
#sigil {
  position: fixed;
  left: 50%;
  bottom: clamp(14px, 3.4vh, 32px);
  transform: translateX(-50%);
  font-family: "Josefin Sans", sans-serif;
  font-weight: 600;
  font-size: clamp(18px, 1.8vw, 26px);
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.55);
  opacity: 0;
  animation: sigil 4s ease var(--sigil-at) forwards;
}

@keyframes sigil {
  to { opacity: 1; }
}

/* 11:11 local time: the mark changes */
#sigil.eleven {
  color: rgba(255,255,255,0.9);
  text-shadow: 0 0 12px rgba(255,255,255,0.6);
  animation: sigil 1.5s ease forwards, breathe 3.3s ease-in-out infinite;
}

@keyframes breathe {
  50% { text-shadow: 0 0 22px rgba(255,255,255,0.9); }
}

@media (max-width: 640px) {
  #mark {
    right: 50%;
    transform: translateX(50%);
    flex-direction: column;
    align-items: center;
    gap: 0.12em;
    font-size: clamp(40px, 15vw, 72px);
    animation:
      surface-m 3.6s cubic-bezier(.2,.7,.1,1) var(--reveal-at) forwards,
      glint 7s ease-in-out calc(var(--reveal-at) + 2.4s) infinite;
  }
  @keyframes surface-m {
    0%   { opacity: 0; letter-spacing: 0.18em; transform: translate(50%, 6px); }
    60%  { opacity: 1; }
    100% { opacity: 1; letter-spacing: 0.01em; transform: translate(50%, 0); }
  }
}

@media (prefers-reduced-motion: reduce) {
  #mark, #sigil { animation: none; opacity: 1; letter-spacing: 0.01em; }
}
