@font-face {
  font-family: "Caveat";
  font-style: normal;
  font-weight: 600;
  font-display: block;
  src: url("/fonts/caveat-600-heading.woff2") format("woff2");
}

/* Studio's course cover stays opaque until the editor or player is ready. */
.loading-cover {
  --cover-bg: var(--bg, #fbfaf5);
  --cover-ink: var(--text, #102e3c);
  --cover-muted: var(--text-2, #34565e);
  --cover-ease: var(--ease-out, ease-out);
  box-sizing: border-box;
  font-family: var(--font, system-ui, sans-serif);
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(color-mix(in srgb, var(--cover-bg) 55%, transparent), var(--cover-bg) 92%),
    url("/hero-studio.webp") center top / cover,
    var(--cover-bg);
  color: var(--cover-ink);
}
.loading-cover.contained {
  position: absolute;
  z-index: 1;
  border-radius: inherit;
}
.loading-cover.leaving {
  animation: cover-out 0.45s var(--cover-ease) both;
  pointer-events: none;
}
/* The cover appears at once (fading in would show the page under it); its content rises in. */
.loading-cover-body {
  animation: cover-step 0.4s var(--cover-ease) both;
  display: grid;
  justify-items: center;
  gap: 14px;
  text-align: center;
}
.loading-cover-mark {
  width: 72px;
  height: 83px;
  margin-bottom: 6px;
}
.loading-cover-mark path {
  fill: none;
  stroke-linejoin: round;
  stroke-width: 2.6;
}
.loading-cover-mark .track {
  stroke: var(--cover-ink);
  opacity: 0.18;
}
/* The orange edge of the logo runs round the hexagon while the course opens. */
.loading-cover-mark .trace {
  stroke: #ce672e;
  stroke-dasharray: 22 78;
  stroke-linecap: round;
  animation: cover-trace 1.4s linear infinite;
}
.loading-cover-brand {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  margin: 0;
  font-size: clamp(34px, 6vw, 52px);
  line-height: 1;
}
.loading-cover-brand .brand-product {
  margin-left: -10px;
  color: inherit;
  font:
    600 1.8em/1 "Caveat",
    "Bradley Hand",
    "Segoe Script",
    cursive;
  transform: translateY(-1px);
}
.loading-cover-title {
  max-width: min(560px, 90vw);
  margin: 8px 0 0;
  /* A long course name wraps to a second line on phones before it is shortened. */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
  font-size: 17px;
  font-weight: 600;
}
.loading-cover-heading {
  margin: 0;
  font-size: clamp(1.5rem, 5vw, 2rem);
}
.loading-cover-action {
  color: inherit;
  text-underline-offset: 0.2em;
}
.loading-cover-step {
  margin: 0;
  color: var(--cover-muted);
  font-size: 15px;
  animation: cover-step 0.3s var(--cover-ease) both;
}

@keyframes cover-trace {
  to {
    stroke-dashoffset: -100;
  }
}
@keyframes cover-out {
  to {
    opacity: 0;
    scale: 1.03;
  }
}
@keyframes cover-step {
  from {
    opacity: 0;
    translate: 0 4px;
  }
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .loading-cover {
    --cover-bg: var(--bg, #0d232b);
    --cover-ink: var(--text, #e6f0ee);
    --cover-muted: var(--text-2, #aec3c6);
    background: var(--cover-bg);
  }
}
:root[data-theme="dark"] .loading-cover {
  background: var(--cover-bg);
}
@media (prefers-reduced-motion: reduce) {
  .loading-cover.leaving {
    animation-duration: 1ms;
  }
  .loading-cover-body,
  .loading-cover-step,
  .loading-cover-mark .trace {
    animation: none;
  }
  .loading-cover-mark .trace {
    stroke-dasharray: none;
  }
}

/* Pages rebuilt so far, reported by the importer. */
.loading-cover-bar {
  width: min(280px, 70vw);
  height: 4px;
  margin: 10px auto 0;
  border-radius: 2px;
  background: rgb(255 255 255 / 18%);
  overflow: hidden;
}
.loading-cover-bar > span {
  display: block;
  height: 100%;
  background: var(--brand-orange, #e07a3f);
  transition: width 0.2s ease-out;
}

@media (max-height: 440px) {
  .loading-cover-body {
    gap: 8px;
  }
  .loading-cover-mark {
    width: 48px;
    height: 55px;
    margin: 0;
  }
}
