/* -----------------------------------------
   PAGE TRANSITION (Osmo-style panel + CCG logo)
----------------------------------------- */

.ccg-pt {
  /* Background colour and logo width are set on the element from the Customizer */
  --ccg-pt-bg: #000;
  --ccg-pt-logo: #fff;
  --ccg-pt-logo-width: 20rem;

  z-index: 2147483000; /* above Salient header and off-canvas menu */
  pointer-events: none;
  position: fixed;
  inset: 0;
  overflow: hidden;
  overflow: clip;
}

.ccg-pt__panel {
  color: var(--ccg-pt-bg);
  background-color: currentColor;
  visibility: hidden;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 100%;
  left: 0;
}

.ccg-pt__panel-top,
.ccg-pt__panel-bottom {
  display: flex;
  flex-flow: column;
  align-items: center;
  width: 100%;
  height: 0%;
  position: absolute;
  left: 0;
  overflow: hidden;
}

.ccg-pt__panel-top {
  transform-origin: bottom;
  bottom: calc(100% - 1px);
}

.ccg-pt__panel-bottom {
  transform-origin: top;
  justify-content: flex-end;
  top: calc(100% - 1px);
}

.ccg-pt__panel-circle {
  background-color: currentColor;
  border-radius: 50%;
  width: 125%;
  height: 500%;
  position: absolute;
}

.ccg-pt__logo {
  color: var(--ccg-pt-logo);
  opacity: 0;
  visibility: hidden;
  width: min(var(--ccg-pt-logo-width), 66vw);
  display: flex;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.ccg-pt__logo svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

/* The "arriving covered" state is added by an inline <style> from functions.php */

@media (prefers-reduced-motion: reduce) {
  .ccg-pt {
    display: none;
  }
}
