@font-face { font-family: Poppins; src: url(/fonts/poppins-200.woff2) format("woff2"); font-weight: 200; font-display: swap; }
@font-face { font-family: Poppins; src: url(/fonts/poppins-300.woff2) format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: Poppins; src: url(/fonts/poppins-500.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: Poppins; src: url(/fonts/poppins-600.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url(/fonts/instrument-sans-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url(/fonts/instrument-sans-500.woff2) format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --ink: #fff;
  --dim: rgba(255,255,255,.42);
  --faint: rgba(255,255,255,.16);
  --accent: #8B7BFF;
  --ok: #5CE0B0;
  --bad: #FF7A93;
  --text: "Instrument Sans", "Segoe UI", sans-serif;
  --enter: cubic-bezier(.16,.8,.2,1);
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: #000; color: var(--ink); font-family: var(--text); overflow: hidden; -webkit-font-smoothing: antialiased; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

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

/* the name sits exactly in the middle of the screen; the atom is drawn around it */
.wordmark {
  position: fixed; left: 50%; top: 50%; z-index: 1;
  margin: 0; transform: translate(-50%, -50%);
  font: 200 clamp(52px, 10.5vw, 120px)/1 Poppins, var(--text);
  letter-spacing: -0.045em;
  color: var(--ink);
  /* ExtraLight: strokes are 68% thinner than the first SemiBold version. */
  user-select: none; pointer-events: none; white-space: nowrap;
  animation: reveal 4.2s .6s var(--enter) both;
}
.wordmark span { color: var(--accent); }

.gate {
  position: fixed; left: 50%; top: calc(50% + clamp(26px, 5.25vw, 60px) + 118px); z-index: 1;
  width: min(340px, calc(100% - 48px)); transform: translateX(-50%);
  animation: fade 3s 3.6s ease both;
}
.field { position: relative; display: flex; align-items: center; height: 52px; border-bottom: 1px solid var(--faint); transition: border-color .4s; }
.field::after { content: ""; position: absolute; left: 0; bottom: -1px; height: 1px; width: 100%; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform .6s var(--enter); }
.field:focus-within::after { transform: scaleX(1); }
.field input {
  flex: 1; min-width: 0; height: 100%; padding: 0;
  background: none; border: 0; outline: 0; border-radius: 0;
  color: var(--ink); caret-color: var(--accent);
  font: 400 17px var(--text); letter-spacing: .01em;
}
.field input::placeholder { color: var(--dim); }
.field input:-webkit-autofill { -webkit-text-fill-color: var(--ink); transition: background-color 9999s; }

.field button {
  position: relative; flex: none; width: 36px; height: 36px; margin-right: -4px;
  display: grid; place-items: center; cursor: pointer;
  background: none; border: 1px solid var(--faint); border-radius: 50%;
  transition: background .35s, border-color .35s, transform .35s var(--enter);
}
.field button:hover { background: var(--ink); border-color: var(--ink); }
.field button:hover svg { stroke: #000; }
.field button:focus-visible { outline: 1px solid var(--ink); outline-offset: 4px; }
.field button svg { position: absolute; width: 17px; height: 17px; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: opacity .25s, transform .4s var(--enter), stroke .3s; }
.tick { opacity: 0; transform: scale(.7); }
.tick path { stroke-dasharray: 26; stroke-dashoffset: 26; }

.msg { height: 20px; margin: 14px 0 0; font-size: 13px; letter-spacing: .02em; color: var(--bad); text-align: center; }

/* states */
.gate.checking .field button { opacity: .5; cursor: progress; }
.gate.error .field { border-color: var(--bad); animation: shake .45s; }
.gate.ok .field { border-color: var(--ok); }
.gate.ok .field button { background: var(--ok); border-color: var(--ok); }
.gate.ok .field button svg { stroke: #000; }
.gate.ok .arrow { opacity: 0; transform: scale(.6); }
.gate.ok .tick { opacity: 1; transform: none; }
.gate.ok .tick path { animation: draw .45s .1s ease forwards; }
.gate.ok .msg { color: var(--ok); }
.gate.ok input { color: var(--dim); }

body.leaving .wordmark, body.leaving .gate, body.leaving .foot { transition: opacity .8s ease; opacity: 0; }
body.leaving::after { content: ""; position: fixed; inset: 0; background: #000; opacity: 0; animation: fadeIn .7s .3s forwards; z-index: 5; }

.foot {
  position: fixed; left: 0; right: 0; bottom: 30px; z-index: 1; text-align: center;
  font-size: 11px; font-weight: 500; letter-spacing: .38em; text-transform: uppercase; color: var(--dim);
  animation: fade 3s 4.6s ease both;
}

@keyframes reveal { from { opacity: 0; letter-spacing: .06em; filter: blur(10px); } to { opacity: 1; letter-spacing: -0.045em; filter: blur(0); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadeIn { to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01s !important; animation-delay: 0s !important; transition-duration: .01s !important; }
}
