/* bungee.systems: the name over ink in water. One ground, one face, one canvas. */
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 100 900; font-stretch: 62% 125%; font-display: block; src: url(/assets/fonts/archivo.woff2) format("woff2"); }

:root { --ink: #06080d; --light: #f2f4f8; --mist: #8a90a0; --cyan: #39d2ff; color-scheme: dark; }
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; background: var(--ink); overflow: hidden; }
body { font-family: "Archivo", "Helvetica Neue", Arial, sans-serif; color: var(--light); }
::selection { background: var(--light); color: var(--ink); }

#app { position: fixed; inset: 0; display: grid; place-items: center; }
.fluid { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.plain .fluid { display: none; }
.plain #app::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse 52% 44% at 50% 50%, rgba(92, 120, 209, .16), transparent 70%); }

/* the name: real text, letters that spring in and stretch towards the hand */
#name {
  position: relative; margin: 0; z-index: 2; padding: .22em .36em .16em; overflow: visible;
  font-weight: 700; letter-spacing: -0.02em; line-height: 1; white-space: nowrap;
  font-size: clamp(2.2rem, 10.5vw, 9.5rem); text-align: center; cursor: default;
  text-shadow: 0 2px 24px rgba(5, 8, 20, .6), 0 0 28px rgba(57, 210, 255, .18);
}
#name .l {
  display: inline-block; width: var(--slot, auto); text-align: center; font-stretch: var(--w, 78%);
  transform: translateY(var(--lift, 0)) ;
  transition: font-stretch .55s cubic-bezier(.22, 1.6, .36, 1), transform .55s cubic-bezier(.22, 1.6, .36, 1);
}
#name:not(.in) .l { transform: translateY(115%); font-stretch: 62%; transition: none; }
#name.in .l { animation: rise 1.1s cubic-bezier(.2, 1.35, .3, 1) both; animation-delay: var(--d, 0s); }
#name .l[data-dot="true"] { color: var(--cyan); text-shadow: 0 0 18px rgba(57, 210, 255, .8); }
#name .l.live { color: var(--cyan); opacity: .75; }
/* reticle rings behind the name: segmented, turning slowly against each other */
.rings { position: absolute; left: 50%; top: 50%; width: min(118vmin, 1180px); height: min(118vmin, 1180px); transform: translate(-50%, -50%); z-index: 1; pointer-events: none; opacity: .85; }
.rings circle { fill: none; stroke: var(--cyan); stroke-width: .7; transform-origin: 0 0; vector-effect: non-scaling-stroke; }
.rings .r1 { stroke-dasharray: 60 24 6 24; stroke-opacity: .35; animation: spin 48s linear infinite; }
.rings .r2 { stroke-dasharray: 1 5; stroke-opacity: .5; animation: spin 90s linear infinite reverse; }
.rings .r3 { stroke-dasharray: 120 180; stroke-opacity: .22; stroke-width: 1.2; animation: spin 30s linear infinite reverse; }
.rings .r4 { stroke-dasharray: 2 10; stroke-opacity: .25; animation: spin 140s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
/* the rail under the name: ticks, and a marker that tracks the pointer */
#name .rail { position: absolute; left: .36em; right: .36em; bottom: .02em; height: 6px; pointer-events: none;
  background: repeating-linear-gradient(90deg, rgba(57, 210, 255, .45) 0 1px, transparent 1px 12px) bottom / 100% 3px no-repeat, linear-gradient(rgba(57, 210, 255, .35), rgba(57, 210, 255, .35)) bottom / 100% 1px no-repeat; opacity: 0; }
#name.locked .rail { opacity: 1; transition: opacity .6s .6s; }
#name .rail i { position: absolute; bottom: -2px; width: 2px; height: 10px; margin-left: -1px; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); left: var(--rail, 50%); transition: left .18s cubic-bezier(.2, .8, .2, 1); }
/* a brief split flicker on the lettering every seven seconds */
#name.locked .l { animation: split 7s steps(1, end) infinite; }
#name.locked .l[data-dot="true"] { animation: none; }
@keyframes split {
  0%, 95.5% { text-shadow: 0 2px 24px rgba(5, 8, 20, .6), 0 0 28px rgba(57, 210, 255, .18); transform: translateY(var(--lift, 0)); }
  96% { text-shadow: -3px 0 0 rgba(57, 210, 255, .9), 3px 0 0 rgba(20, 70, 255, .9); transform: translate(2px, var(--lift, 0)); }
  97% { text-shadow: 3px 0 0 rgba(57, 210, 255, .9), -3px 0 0 rgba(20, 70, 255, .9); transform: translate(-2px, var(--lift, 0)); }
  97.6%, 100% { text-shadow: 0 2px 24px rgba(5, 8, 20, .6), 0 0 28px rgba(57, 210, 255, .18); transform: translateY(var(--lift, 0)); }
}
/* corner brackets that draw in once the name has locked */
#name .frame { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
#name .frame path { fill: none; stroke: var(--cyan); stroke-width: 1.25; stroke-dasharray: 100; stroke-dashoffset: 100; opacity: 0; }
#name.locked .frame path { animation: draw .9s cubic-bezier(.2, .8, .2, 1) .1s forwards; }
@keyframes draw { 0% { stroke-dashoffset: 100; opacity: .9; } 100% { stroke-dashoffset: 0; opacity: .55; } }
#name .probe { position: absolute; left: 0; top: 0; visibility: hidden; white-space: pre; font-stretch: 78%; pointer-events: none; }
@keyframes rise {
  0% { transform: translateY(115%); font-stretch: 62%; opacity: 0; }
  40% { opacity: 1; }
  100% { transform: translateY(var(--lift, 0)); font-stretch: var(--w, 78%); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  #name .l, #name.in .l, #name.locked .l { animation: none; transition: none; transform: none; font-stretch: 78%; }
  .rings circle { animation: none; }
  #name.locked .frame path { animation: none; stroke-dashoffset: 0; opacity: .55; }
}
@media (max-width: 760px) {
  #name { font-size: clamp(2.2rem, 12vw, 5rem); }
}
