/* DigiFix link: the maker's mark in white on the dark pill, at the top right and at the very bottom.
   .digifix--corner sits at the top right of the screen, .digifix--bar is the full-width bar at the
   very bottom. The ice and ember glitches are played by digifix.js. */

.digifix {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  box-sizing: border-box; height: 56px; padding: 0 22px 0 16px; margin: 0;
  background: #0b0d11; color: #e9edf2; border: 0; border-radius: 999px;
  font: 700 21px/1 "Avenir Next", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, sans-serif;
  letter-spacing: 0.01em; text-decoration: none; white-space: nowrap; isolation: isolate;
  box-shadow: inset 0 0 0 1px rgba(139, 227, 255, 0.2), 0 10px 26px rgba(11, 13, 17, 0.22);
  transition: box-shadow 0.3s, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  -webkit-font-smoothing: antialiased;
}
.digifix:hover, .digifix:focus-visible { color: #e9edf2; text-decoration: none; }
.digifix:focus-visible { outline: 2px solid #58c8f4; outline-offset: 3px; }
.digifix:hover { box-shadow: inset 0 0 0 1px rgba(139, 227, 255, 0.45), 0 0 30px rgba(88, 200, 244, 0.4), 0 0 60px rgba(255, 138, 31, 0.15); }
.digifix .df-ext { width: 18px; height: 18px; flex: none; fill: none; stroke: #58c8f4; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1); }
.digifix:hover .df-ext { transform: translate(2px, -2px); }
.digifix .df-logo { display: block; width: auto; height: 34px; max-width: none; flex: none; margin: 0; filter: drop-shadow(0 0 8px rgba(255, 170, 40, 0.35)); animation: df-breathe 6s ease-in-out infinite; }
/* A scanline tear that crosses the link now and then. */
.digifix::after {
  content: ""; position: absolute; left: 0; right: 0; top: var(--df-tear-y, 40%); height: var(--df-tear-h, 4px); pointer-events: none; opacity: 0; border-radius: 2px;
  background: linear-gradient(90deg, transparent, rgba(88, 200, 244, 0.55) 20%, rgba(255, 70, 50, 0.5) 60%, transparent); mix-blend-mode: screen;
}

/* Top right corner of the header. */
.digifix--corner { margin-left: 16px; flex: none; }
.digifix--corner:hover { transform: translateY(-1px); }

/* Full-width bar at the very bottom of the page. */
.digifix--bar {
  display: flex; width: 100%; height: 88px; padding: 0 24px; gap: 14px; border-radius: 0; font-size: 24px;
  background: radial-gradient(600px 120px at 50% 120%, rgba(255, 138, 31, 0.14), transparent 70%), radial-gradient(500px 120px at 50% -40%, rgba(88, 200, 244, 0.12), transparent 70%), #0b0d11;
  box-shadow: inset 0 1px 0 rgba(139, 227, 255, 0.18);
}
.digifix--bar:hover {
  background: radial-gradient(600px 120px at 50% 120%, rgba(255, 138, 31, 0.22), transparent 70%), radial-gradient(500px 120px at 50% -40%, rgba(88, 200, 244, 0.2), transparent 70%), #0b0d11;
  box-shadow: inset 0 1px 0 rgba(139, 227, 255, 0.45);
}
.digifix--bar .df-logo { width: auto; height: 44px; }
.digifix--bar::after { height: calc(var(--df-tear-h, 4px) * 1.5); }

/* Glitches, added and removed by digifix.js. */
.digifix.df-slice { animation: df-jolt 0.42s steps(3); }
.digifix.df-slice .df-logo { animation: df-logo-split 0.42s steps(4); }
.digifix.df-split .df-logo { animation: df-logo-split 0.3s steps(2); }
.digifix.df-flicker { animation: df-flicker 0.36s steps(1); }
.digifix.df-tear::after { animation: df-tear 0.32s steps(3); }
.digifix.df-tear .df-logo { animation: df-logo-jump 0.32s steps(2); }

@keyframes df-breathe { 50% { filter: drop-shadow(0 0 14px rgba(88, 200, 244, 0.55)); } }
@keyframes df-jolt { 33% { transform: translateX(2px) skewX(-6deg); } 66% { transform: translateX(-2px) skewX(4deg); } }
@keyframes df-logo-split { 50% { filter: drop-shadow(-3px 0 0 #58c8f4) drop-shadow(3px 0 0 #ff4632); transform: translateX(2px); } }
@keyframes df-logo-jump { 33% { transform: translate(-3px, 1px); filter: hue-rotate(60deg); } 66% { transform: translate(3px, -1px); filter: hue-rotate(-40deg); } }
@keyframes df-flicker { 0% { opacity: 1; } 20% { opacity: 0.35; } 40% { opacity: 1; } 60% { opacity: 0.6; } 80% { opacity: 1; } }
@keyframes df-tear { 0% { opacity: 1; transform: translateX(-12px); } 50% { opacity: 1; transform: translateX(10px); } 100% { opacity: 0; transform: none; } }

/* On phones the corner link gets a little smaller, so it fits beside any menu. */
@media (max-width: 640px) {
  .digifix--corner { height: 46px; padding: 0 12px; gap: 8px; margin-left: 10px; }
  .digifix--corner .df-logo { width: auto; height: 26px; }
  .digifix--corner .df-ext { width: 16px; height: 16px; }
  .digifix--bar { height: 76px; font-size: 21px; }
  .digifix--bar .df-logo { width: auto; height: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  .digifix, .digifix *, .digifix::after { animation: none !important; transition: none !important; }
}
