/* EastDTC — scroll to top (SVG animated) */

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.eastdtc-scroll-top {
  --eastdtc-scroll-top-size: 52px;
  position: fixed;
  right: clamp(16px, 3vw, 28px);
  bottom: clamp(20px, 4vw, 32px);
  z-index: 45;
  width: var(--eastdtc-scroll-top-size);
  height: var(--eastdtc-scroll-top-size);
  padding: 0;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  background: transparent;
  box-shadow:
    0 8px 28px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(126, 200, 255, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.92);
  transition:
    opacity 0.35s ease,
    visibility 0.35s ease,
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.3s ease;
}

.eastdtc-scroll-top:not([hidden]) {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.eastdtc-scroll-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.eastdtc-scroll-top:hover {
  box-shadow:
    0 12px 36px rgba(0, 0, 0, 0.55),
    0 0 24px rgba(126, 200, 255, 0.25),
    0 0 12px rgba(230, 0, 18, 0.2);
  transform: translateY(-2px) scale(1.06);
}

.eastdtc-scroll-top:focus-visible {
  outline: 2px solid rgba(126, 200, 255, 0.65);
  outline-offset: 3px;
}

.eastdtc-scroll-top__svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.eastdtc-scroll-top__track {
  transition: stroke 0.3s ease;
}

.eastdtc-scroll-top:hover .eastdtc-scroll-top__track {
  stroke: rgba(126, 200, 255, 0.38);
}

.eastdtc-scroll-top__progress {
  transition: stroke-dashoffset 0.12s linear;
}

.eastdtc-scroll-top__orbit {
  transform-origin: 28px 28px;
  animation: eastdtc-scroll-top-orbit 10s linear infinite;
}

@keyframes eastdtc-scroll-top-orbit {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.eastdtc-scroll-top__star {
  animation: eastdtc-scroll-top-twinkle 2.4s ease-in-out infinite;
}

.eastdtc-scroll-top__star--2 { animation-delay: 0.6s; }
.eastdtc-scroll-top__star--3 { animation-delay: 1.2s; }
.eastdtc-scroll-top__star--4 { animation-delay: 1.8s; }

@keyframes eastdtc-scroll-top-twinkle {
  0%, 100% { opacity: 0.45; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.15); }
}

.eastdtc-scroll-top__arrows {
  transform-origin: 28px 28px;
}

.eastdtc-scroll-top__chevron--1 {
  animation: eastdtc-scroll-top-rise 1.8s ease-in-out infinite;
}

.eastdtc-scroll-top__chevron--2 {
  animation: eastdtc-scroll-top-rise 1.8s ease-in-out infinite;
  animation-delay: 0.35s;
}

@keyframes eastdtc-scroll-top-rise {
  0%, 100% { opacity: 1; transform: translateY(2px); }
  45% { opacity: 0.35; transform: translateY(-5px); }
}

.eastdtc-scroll-top:hover .eastdtc-scroll-top__chevron--1,
.eastdtc-scroll-top:hover .eastdtc-scroll-top__chevron--2 {
  animation-duration: 1.1s;
}

.eastdtc-scroll-top:hover .eastdtc-scroll-top__orbit {
  animation-duration: 6s;
}

@media (prefers-reduced-motion: reduce) {
  .eastdtc-scroll-top__orbit,
  .eastdtc-scroll-top__star,
  .eastdtc-scroll-top__chevron--1,
  .eastdtc-scroll-top__chevron--2 {
    animation: none;
  }

  .eastdtc-scroll-top {
    transition: opacity 0.2s ease, visibility 0.2s ease;
  }

  .eastdtc-scroll-top:hover {
    transform: translateY(0) scale(1);
  }
}

@media screen and (max-width: 749px) {
  .eastdtc-scroll-top {
    --eastdtc-scroll-top-size: 46px;
    right: 14px;
    bottom: 18px;
  }
}
