/* holo.css -- the time-travel effect (js/holo.js): the warp between 2026 and 1999, the archived pages as a
 * slight holographic projection. Layers hang off <html>, so a transform or filter on <body> never moves them. */

/* ---- the archived pages: always a projection ---- */
/* the void behind a projection, seen while a page forms or breaks up */
html.holo-on.holo-in, html.holo-out { background: #02080c; }
html.holo-on body {
  text-shadow: .6px 0 rgba(255, 0, 90, .30), -.6px 0 rgba(0, 210, 255, .30);
  animation: holo-drift 11s ease-in-out infinite, holo-flicker 5.3s linear infinite;
}
@keyframes holo-drift {
  0%, 100% { transform: none; }
  25% { transform: translate(.4px, -.3px) skewX(.08deg); }
  50% { transform: translate(-.3px, .2px); }
  75% { transform: translate(.2px, .4px) skewX(-.06deg); }
}
@keyframes holo-flicker {
  0%, 100% { opacity: 1; }
  41% { opacity: 1; } 42% { opacity: .93; } 43% { opacity: 1; }
  77% { opacity: 1; } 77.6% { opacity: .88; } 78.4% { opacity: .98; } 79% { opacity: .91; } 80% { opacity: 1; }
}
html.holo-jolt body { translate: 4px 0; filter: hue-rotate(28deg) contrast(1.15); }

.holo-layer, .holo-band, .holo-slice { position: fixed; left: 0; right: 0; pointer-events: none; z-index: 2147483000; }
.holo-layer {
  top: 0; bottom: 0;
  background:
    repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0) 0 2px, rgba(0, 40, 70, .09) 2px 3px),
    radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 55%, rgba(0, 70, 110, .22) 100%),
    linear-gradient(rgba(70, 210, 255, .05), rgba(70, 210, 255, .05));
  animation: holo-roll 9s linear infinite;
}
@keyframes holo-roll { to { background-position: 0 30px, 0 0, 0 0; } }
.holo-band {
  top: 0; height: 13vh;
  background: linear-gradient(to bottom, rgba(120, 230, 255, 0), rgba(120, 230, 255, .10) 50%, rgba(120, 230, 255, 0));
  -webkit-backdrop-filter: blur(.7px) saturate(1.6) hue-rotate(-18deg);
  backdrop-filter: blur(.7px) saturate(1.6) hue-rotate(-18deg);
  animation: holo-band 8.5s linear infinite;
}
@keyframes holo-band { from { transform: translateY(-15vh); } to { transform: translateY(115vh); } }
.holo-slice { display: none; top: 50%; height: 6px; }
html.holo-jolt .holo-slice {
  display: block; translate: 12px 0; background: rgba(150, 240, 255, .14);
  -webkit-backdrop-filter: brightness(1.5) hue-rotate(90deg) blur(1px);
  backdrop-filter: brightness(1.5) hue-rotate(90deg) blur(1px);
}

/* arriving from 2026: projected in from a single line */
html.holo-on.holo-in body { animation: holo-materialize 1.9s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes holo-materialize {
  0% { opacity: 0; transform: scale(1.15, .004); filter: brightness(6) blur(2px); }
  15% { opacity: 1; transform: scale(1.08, .012); filter: brightness(5) blur(1px); }
  34% { opacity: .9; transform: scale(1, 1.05) skewX(2deg); filter: brightness(2) hue-rotate(40deg); }
  42% { opacity: .35; transform: translateX(-6px); }
  48% { opacity: 1; transform: translateX(5px) scaleY(.98); filter: brightness(1.4) blur(.4px); }
  56% { opacity: .7; transform: none; }
  64% { opacity: 1; transform: translateX(-2px) skewX(-.6deg); filter: hue-rotate(-30deg) contrast(1.2); }
  80% { opacity: .92; transform: none; filter: none; }
  100% { opacity: 1; transform: none; filter: none; }
}
html.holo-on.holo-in .holo-layer { animation: holo-roll 9s linear infinite, holo-beam 1.9s ease-out both; }
@keyframes holo-beam { 0% { opacity: 0; } 30% { opacity: 1; } 100% { opacity: 1; } }
/* page to page inside an archive: a short flicker */
html.holo-on.holo-flick body { animation: holo-flicker-in .6s steps(6) both; }
@keyframes holo-flicker-in {
  0% { opacity: 0; } 20% { opacity: .7; } 35% { opacity: .2; } 55% { opacity: 1; } 70% { opacity: .6; } 100% { opacity: 1; }
}

/* ---- leaving: the page breaks up like a failing projection ---- */
html.holo-out body { animation: holo-dissolve 2.9s ease-in forwards; }
@keyframes holo-dissolve {
  0% { transform: none; filter: none; opacity: 1; }
  18% { transform: skewX(.6deg); filter: hue-rotate(12deg); text-shadow: 2px 0 rgba(255, 0, 90, .5), -2px 0 rgba(0, 210, 255, .5); }
  36% { transform: translateX(-7px) skewX(-2deg); filter: blur(.5px) contrast(1.3) hue-rotate(60deg); opacity: .9; }
  40% { transform: translateX(9px); opacity: .55; }
  44% { transform: none; opacity: .95; }
  62% { transform: scaleY(1.02) skewX(4deg); filter: blur(1.5px) saturate(2) hue-rotate(-40deg); opacity: .7;
        text-shadow: 5px 0 rgba(255, 0, 90, .6), -5px 0 rgba(0, 210, 255, .6); }
  68% { transform: translateX(-12px) skewX(-6deg); opacity: .4; }
  72% { transform: scaleY(1.01); opacity: .8; }
  86% { transform: scale(1.3, .03); filter: brightness(3) blur(1px); opacity: .9; }
  100% { transform: scale(0, .002); filter: brightness(6) blur(2px); opacity: 0; }
}

/* the counter */
.holo-warp {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 2147483600;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-family: "Courier New", Courier, monospace; color: #8ff; text-align: center;
  background: rgba(0, 8, 16, 0); animation: holo-warp-dim 2.9s ease-in forwards;
}
.holo-warp::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; bottom: 0; pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0) 0 2px, rgba(0, 255, 255, .06) 2px 3px);
}
@keyframes holo-warp-dim { 0% { background-color: rgba(0, 8, 16, 0); } 30% { background-color: rgba(0, 8, 16, .55); } 100% { background-color: rgba(0, 8, 16, .96); } }
.holo-warp-cap { font-size: 15px; letter-spacing: .35em; color: #5df; animation: holo-blinkcap .8s steps(2, start) infinite; }
@keyframes holo-blinkcap { to { opacity: .35; } }
.holo-warp-date {
  margin: .25em 0; font-size: 7.2vw; font-weight: bold; letter-spacing: .04em; white-space: nowrap;
  text-shadow: 0 0 6px #0ff, 0 0 22px rgba(0, 255, 255, .6), 3px 0 rgba(255, 0, 90, .6), -3px 0 rgba(0, 120, 255, .6);
  animation: holo-date-jitter .13s steps(2) infinite;
}
@keyframes holo-date-jitter { 0% { transform: translateX(0); } 100% { transform: translateX(1.5px); } }
.holo-warp-bar { width: 60vw; height: 6px; border: 1px solid #5df; box-shadow: 0 0 8px #0ff; }
.holo-warp-fill { width: 0; height: 100%; background: #8ff; box-shadow: 0 0 10px #0ff; }
.holo-warp-dest { margin-top: 1em; font-size: 14px; letter-spacing: .15em; color: #9ef; opacity: .85; }
.holo-warp-present .holo-warp-date { color: #fff6c0; text-shadow: 0 0 6px #ffd, 0 0 22px rgba(255, 240, 150, .6), 3px 0 rgba(255, 0, 90, .5), -3px 0 rgba(0, 120, 255, .5); }
.holo-warp.holo-warp-flash { animation: holo-flash .45s ease-out forwards; }
@keyframes holo-flash { 0% { background-color: rgba(220, 255, 255, 1); } 100% { background-color: rgba(0, 8, 16, 1); } }
.holo-warp.holo-warp-flash > * { opacity: 0; transition: opacity .2s; }

/* back in 2026: the intro page settles into solid form */
html.holo-back body { animation: holo-solidify 1s ease-out both; }
@keyframes holo-solidify {
  0% { opacity: 0; filter: brightness(3) blur(3px); }
  40% { opacity: 1; filter: brightness(1.5) blur(1px); }
  100% { opacity: 1; filter: none; }
}

/* the interfering channel's set in the corner (js/interference.js), as on the tsac page */
.interf-set { position: fixed; top: 10px; right: 18px; z-index: 2147482000; display: flex; align-items: center; gap: 4px;
  cursor: pointer; user-select: none; background: rgba(255, 255, 255, .85); border-radius: 6px; padding: 3px 6px; }
.interf-img { height: 30px; width: auto; image-rendering: pixelated; }
.interf-arrow { width: 30px; height: 15px; image-rendering: pixelated; }
.interf-sw { font: bold 13px/1 "Comic Sans MS", "Comic Neue", cursive; color: #c00000; text-shadow: 1px 1px 0 #ffd600; }
.interf-sw.interf-on { color: #1d6b2a; }
.interf-set:hover .interf-sw { text-decoration: underline; }

/* motion off on request; never on paper */
html.holo-calm body, html.holo-calm .holo-layer { animation: none !important; }
html.holo-calm .holo-band, html.holo-calm .holo-slice { display: none; }
@media print {
  .holo-layer, .holo-band, .holo-slice, .holo-warp, .interf-set { display: none !important; }
  html.holo-on body { text-shadow: none; animation: none; }
}
