.afk-screen {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  background: rgba(4, 8, 13, .18);
  backdrop-filter: blur(10px) brightness(.72) saturate(.82);
  perspective: 1100px;
  transition: opacity .7s cubic-bezier(.2, .8, .2, 1), backdrop-filter .7s ease;
}

.afk-screen[hidden] { display: none; }
.afk-screen.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.footer-afk-trigger {
  padding: 0;
  color: var(--magenta);
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
  transition: color .2s ease, text-shadow .2s ease;
}

.footer-afk-trigger:hover,
.footer-afk-trigger:focus-visible {
  color: #ff6fa5;
  outline: 0;
  text-shadow: 0 0 10px rgba(255, 46, 123, .42);
}

.afk-logo-motion {
  perspective: 1000px;
  transform-style: preserve-3d;
  will-change: transform;
  animation: afk-turn 22s linear infinite;
}

.afk-logo-breathe {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.5vw, 22px);
  color: rgba(237, 242, 247, .92);
  transform-origin: center;
  transform-style: preserve-3d;
  animation: afk-breathe 5.5s ease-in-out infinite;
}

.afk-logo-symbol {
  position: relative;
  display: block;
  width: clamp(120px, 17vw, 250px);
  height: clamp(120px, 17vw, 250px);
  transform-style: preserve-3d;
}

.afk-logo-symbol img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.afk-logo-front {
  transform: translateZ(22px);
  filter: drop-shadow(0 0 22px rgba(46, 234, 255, .34));
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.afk-logo-depth {
  opacity: 0;
  filter: brightness(.23) saturate(.8) drop-shadow(0 0 16px rgba(0, 73, 89, .42));
  transform: translateZ(-22px);
  animation: afk-back-face-logo 22s linear infinite;
}

.afk-logo-symbol::after {
  position: absolute;
  z-index: -1;
  right: 7%;
  bottom: -12%;
  left: 7%;
  height: 20%;
  content: "";
  border-radius: 50%;
  background: rgba(46, 234, 255, .2);
  filter: blur(13px);
  transform: translateZ(-35px) rotateX(72deg);
}

.afk-wordmark-stack {
  position: relative;
  display: block;
  transform-style: preserve-3d;
}

.afk-wordmark-front,
.afk-wordmark-back {
  display: block;
  font-size: clamp(2.5rem, 7vw, 7.25rem);
  font-weight: 800;
  letter-spacing: -.075em;
  line-height: .9;
  white-space: nowrap;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.afk-wordmark-front {
  text-shadow: 1px 1px 0 rgba(101, 220, 235, .18), 8px 9px 0 rgba(5, 42, 53, .48), 0 0 25px rgba(46, 234, 255, .14);
  transform: translateZ(22px);
}

.afk-wordmark-back {
  position: absolute;
  inset: 0;
  color: rgba(76, 108, 116, .92);
  text-shadow: -7px 9px 0 rgba(2, 16, 21, .75), 0 0 18px rgba(9, 78, 91, .2);
  transform: translateZ(-22px);
  -webkit-backface-visibility: visible;
  backface-visibility: visible;
  animation: afk-back-face-text 22s linear infinite;
}

@keyframes afk-breathe {
  0%, 100% { transform: scale(.96); }
  50% { transform: scale(1.035); }
}

@keyframes afk-turn {
  from { transform: rotateY(0deg); }
  to { transform: rotateY(360deg); }
}

@keyframes afk-back-face-logo {
  0%, 24.99% { opacity: 0; }
  25%, 74.99% { opacity: .7; }
  75%, 100% { opacity: 0; }
}

@keyframes afk-back-face-text {
  0%, 24.99% { opacity: 0; }
  25%, 74.99% { opacity: 1; }
  75%, 100% { opacity: 0; }
}

@media (max-width: 620px) {
  .afk-logo-breathe { flex-direction: column; gap: 19px; }
  .afk-wordmark-front, .afk-wordmark-back { font-size: clamp(2.5rem, 14vw, 4.8rem); }
}

@media (prefers-reduced-motion: reduce) {
  .afk-logo-motion, .afk-logo-breathe, .afk-logo-depth, .afk-wordmark-back { animation: none; }
  .afk-logo-depth, .afk-wordmark-back { opacity: 0; }
}
