/* ===== Custom scroll cursor (Apple-style liquid-glass indicator) ===== */
body.is-scrolling,
body.is-scrolling * {
  cursor: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0MCIgaGVpZ2h0PSI0MCIgdmlld0JveD0iMCAwIDQwIDQwIj48Y2lyY2xlIGN4PSIyMCIgY3k9IjIwIiByPSIxNy41IiBmaWxsPSJyZ2JhKDQ3LDk1LDIyNCwwLjU1KSIgc3Ryb2tlPSJyZ2JhKDI1NSwyNTUsMjU1LDAuNjUpIiBzdHJva2Utd2lkdGg9IjEuNSIvPjxwYXRoIGQ9Ik0xNCAxNyBMMjAgMjMgTDI2IDE3IiBmaWxsPSJub25lIiBzdHJva2U9IiNmZmZmZmYiIHN0cm9rZS13aWR0aD0iMi41IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz48L3N2Zz4=") 20 20, auto;
}

/* ===== Back to top button (liquid glass) ===== */
.back-to-top {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(47, 95, 224, .55);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, .35);
  box-shadow: 0 8px 24px rgba(47, 95, 224, .35), inset 0 1px 0 rgba(255, 255, 255, .4);
  display: grid;
  place-items: center;
  color: #fff;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity var(--dur-base) var(--ease-standard), transform var(--dur-base) var(--ease-standard), visibility var(--dur-base), background var(--dur-fast);
  z-index: 90;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: rgba(47, 95, 224, .75); transform: translateY(-3px); }
.back-to-top:active { transform: translateY(-1px); }

@media (prefers-reduced-motion: reduce) {
  body.is-scrolling, body.is-scrolling * { cursor: auto; }
}

/* ===== Signature motif: floating isometric icon platforms ===== */
.icon-float {
  position: relative;
  animation: iconFloat 5s ease-in-out infinite;
}
.icon-float__shadow {
  transform-origin: center;
  animation: shadowPulse 5s ease-in-out infinite;
}
.icon-float.delay-1 { animation-delay: .6s; }
.icon-float.delay-1 .icon-float__shadow { animation-delay: .6s; }
.icon-float.delay-2 { animation-delay: 1.2s; }
.icon-float.delay-2 .icon-float__shadow { animation-delay: 1.2s; }
.icon-float.delay-3 { animation-delay: 1.8s; }
.icon-float.delay-3 .icon-float__shadow { animation-delay: 1.8s; }

@keyframes iconFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes shadowPulse {
  0%, 100% { opacity: .8; transform: scaleX(1); }
  50% { opacity: .5; transform: scaleX(.88); }
}

@media (prefers-reduced-motion: reduce) {
  .icon-float, .icon-float__shadow { animation: none; }
}

/* Radar sweep (network monitoring icon) */
.radar-sweep {
  transform-origin: 60px 44px;
  animation: radarSweep 3.2s linear infinite;
}
@keyframes radarSweep { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .radar-sweep { animation: none; }
}

/* ===== Scroll reveal ===== */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--dur-slow) var(--ease-standard), transform var(--dur-slow) var(--ease-standard);
}
.reveal.in-view { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ===== Misc keyframes ===== */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes popIn {
  0% { transform: scale(.5); opacity: 0; }
  70% { transform: scale(1.08); }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Copy-to-clipboard toast */
.copy-toast {
  position: fixed;
  bottom: var(--space-6);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--color-ink);
  color: #fff;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-full);
  font-size: var(--fs-small);
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-base) var(--ease-standard), transform var(--dur-base) var(--ease-standard);
  z-index: 300;
  box-shadow: var(--shadow-lg);
}
.copy-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
