/*
 * The "CORA" view inside the demo dashboard (home page and Operate page).
 *
 *   .cora-view                 wrapper of the view
 *     .cora-ring               visible window; its width is given by the page
 *       .cora-drawing          the drawing at a fixed size, scaled by
 *                              operate-live.js to fit the window
 *         .cora-brain          canvas with the animated brain
 *         .cora-graphic        ring, leader lines and labels (.cora-labels)
 *         .cora-stage          kicker, wordmark and tagline on top of the ring
 *
 * Sizes inside .cora-drawing are in the drawing's own pixels: the drawing is
 * scaled as a whole, so they are not sizes on the page. Text that has to stay
 * readable is scaled back with --ol-unscale (set by the script) and then
 * shows at --fs-micro.
 */

.cora-view {
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.cora-view .cora-ring {
  position: relative;
  flex: none;
  width: min(660px, 100%);
  height: 400px; /* until the script has measured */
  margin: 0 auto;
  overflow: hidden;
}

.cora-drawing {
  position: relative;
  width: 1200px; /* until the script has measured */
  height: 900px; /* keep in step with DRAWING.height in operate-live.js */
  transform-origin: 0 0;
}

.cora-brain {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.cora-graphic {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(960px, 100%);
  height: auto;
  display: block;
  overflow: visible;
}

.cora-spin,
.cora-spin-back {
  transform-origin: 620px 500px;
}
.cora-spin { animation: cora-spin 30s linear infinite; }
.cora-spin-back { animation: cora-spin-back 90s linear infinite; }

/* The graphic is 1240 units wide and shown 960 px wide; the factor turns page pixels into its units. */
.cora-labels {
  font-family: var(--font);
  font-size: calc(var(--fs-micro) * var(--ol-unscale, 1.7) * 1240 / 960);
  font-weight: 600;
  letter-spacing: 0.06em;
}

.cora-labels text {
  fill: #c2c2c2;
  dominant-baseline: central;
  transform: translateY(-4px);
}

/* too narrow for labels: the ring stands alone */
.cora-ring--compact .cora-labels {
  display: none;
}

.cora-stage {
  position: relative;
  z-index: 2;
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.cora-rise {
  margin-top: 274px;
  animation: cora-rise 1.1s ease-out both;
}

.cora-kicker {
  display: block;
  color: var(--accent);
  font-size: calc(var(--fs-micro) * var(--ol-unscale, 1.7));
  font-weight: 600;
  letter-spacing: 0.22em;
  line-height: 1.6;
  text-transform: uppercase;
}

.cora-wordmark {
  margin: 16px 0 0;
  padding-left: 0.09em;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 9.625rem;
  line-height: 1.05;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-shadow: 0 0 48px #0a0a0a, 0 0 24px #0a0a0a;
}

/* a dark plate behind the tagline keeps it readable on the brain */
.cora-plate {
  display: inline-block;
  margin: 14px 0 0;
  padding: 12px 70px 14px;
  background: radial-gradient(ellipse closest-side, rgba(10, 10, 10, 0.93) 62%, rgba(10, 10, 10, 0) 100%);
}

.cora-tagline {
  display: block;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 700;
  font-size: 2.5rem;
  line-height: 1.15;
  color: var(--coral);
  text-shadow: 0 0 22px #0a0a0a;
}

@keyframes cora-spin {
  to { transform: rotate(360deg); }
}

@keyframes cora-spin-back {
  to { transform: rotate(-360deg); }
}

@keyframes cora-rise {
  from { opacity: 0; transform: translateY(18px); }
}

@media (prefers-reduced-motion: reduce) {
  .cora-view *,
  .cora-view *::before,
  .cora-view *::after {
    animation: none !important;
  }
}
