/* Site loader, shared by the case-study pages. Brand mark + indeterminate line, no fake percentage. */
html.tv-loading {
  overflow: hidden;
}

/* Hide the page until the loader is on screen so content never flashes
   first; the 8s failsafe reveals it if a script stalls. */
html.tv-loading body > :not(.tv-loader) {
  visibility: hidden;
  animation: tv-failsafe 0s 8s forwards;
}

@keyframes tv-failsafe {
  to {
    visibility: visible;
  }
}

.tv-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.tv-loader.tv-hide {
  opacity: 0;
  pointer-events: none;
}

.tv-mark {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  display: block;
  animation: tv-breathe 1.8s cubic-bezier(0.45, 0, 0.55, 1) infinite alternate;
}

.tv-line {
  position: relative;
  width: 160px;
  height: 2px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
}

.tv-line::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 40%;
  background: var(--indigo);
  border-radius: 2px;
  animation: tv-sweep 1.4s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

.tv-cap {
  font-family: "Schibsted Grotesk", system-ui, sans-serif;
  font-size: 13.5px;
  letter-spacing: 0.005em;
  color: var(--ink-soft);
}

.tv-loader.tv-hide .tv-mark {
  transform: translateY(-6px);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes tv-breathe {
  from {
    transform: translateY(2px);
    opacity: 0.82;
  }
  to {
    transform: translateY(-2px);
    opacity: 1;
  }
}

@keyframes tv-sweep {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(250%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .tv-mark,
  .tv-line::after {
    animation: none;
  }
  .tv-line::after {
    width: 100%;
    opacity: 0.35;
  }
  .tv-loader,
  .tv-loader.tv-hide .tv-mark {
    transition: none;
  }
}

