/* The crew on the home page (Crew.dc.html): the polished figures on one open stage (crew3d.js), no frames,
   a soft copper glow behind them; under each, its job in a notched stone column; then Logbook, which has no figure:
   a framed panel of text only. Without WebGL the stage shows the dither portraits in a row. */

.cr {
  padding-block: 96px 64px;
  background: var(--page);
}
.cr-head {
  display: grid;
  gap: 16px;
  max-width: 860px;
  margin-bottom: 40px;
}
.cr-head h2 {
  margin: 0;
  color: #fff;
  text-wrap: balance;
}
.cr-head p { margin: 0; color: var(--text-2); }
.cr-kind {
  color: var(--copper-300);
  text-transform: uppercase;
}

/* the stage: open, no frame; the glow fades out well past its edges */
.cr-stage {
  position: relative;
  height: 340px;
  margin-top: 24px;
}
.cr-stage::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -40px;
  width: 100vw;
  height: 150%;
  transform: translateX(-50%);
  background: radial-gradient(60% 55% at 50% 72%, rgba(237, 103, 15, .16), transparent 70%);
  pointer-events: none;
}
.cr-stage:not(.is-live) .cr-fallback { display: grid; }
.cr-stage.is-live .cr-fallback { display: none; }
.cr-fallback {
  position: absolute;
  inset: 0;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}
.cr-fallback img { display: block; width: 100%; height: auto; image-rendering: pixelated; }
.cr-fig {
  position: absolute;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.cr-fig::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: -6px;
  z-index: -1;
  height: 14px;
  background: radial-gradient(closest-side, rgba(0, 0, 0, .55), transparent);
}
.cr-fig:focus-visible { outline: 2px solid var(--copper-300); outline-offset: 2px; }
.cr-fig-art {
  display: block;
  width: 100%;
  height: 100%;
  background-repeat: no-repeat;
  animation: cr-bob 2.6s steps(4, end) infinite alternate;
}
.cr-fig:nth-of-type(2) .cr-fig-art { animation-delay: -.8s; }
.cr-fig:nth-of-type(3) .cr-fig-art { animation-delay: -1.5s; }
.cr-fig:nth-of-type(4) .cr-fig-art { animation-delay: -.4s; }
.cr-fig:nth-of-type(5) .cr-fig-art { animation-delay: -2s; }
.cr-fig.is-hi .cr-fig-art { animation: cr-hop .42s steps(6, end) 3; }
@keyframes cr-bob { to { transform: translateY(-3px); } }
@keyframes cr-hop {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}
.cr-say-bubble {
  position: absolute;
  left: 50%;
  top: -12px;
  padding: 3px 10px;
  background: #fff;
  color: #000;
  opacity: 0;
  transform: translate(-50%, 6px);
  transition: opacity .12s steps(2, end), transform .12s steps(2, end);
  white-space: nowrap;
  pointer-events: none;
}
.cr-say-bubble::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 8px;
  height: 6px;
  margin-left: -4px;
  background: #fff;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}
.cr-fig.is-hi .cr-say-bubble { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) {
  .cr-fig-art, .cr-fig.is-hi .cr-fig-art { animation: none; }
}
.cr-info {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.cr-col {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
  padding: 18px 16px 20px;
  background: var(--surface);
  clip-path: var(--px-notch);
  transition: background-color 0.3s steps(3, end);
}
.cr-col.is-on { background: var(--surface-2); }
.cr-step {
  color: var(--copper-300);
  text-transform: uppercase;
}
.cr-name { margin: 0; }
.cr-say {
  padding: 0;
  border: 0;
  background: none;
  color: #fff;
  font: inherit;
  cursor: pointer;
}
.cr-say:hover { color: var(--copper-300); }
.cr-say:focus-visible { outline: 2px solid var(--copper-400); outline-offset: 2px; }
.cr-job {
  margin: 0;
  color: var(--text-2);
}
.cr-eyes {
  display: grid;
  gap: 4px;
  margin: 4px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--surface-2);
  color: var(--text-3);
}
.cr-eyes .t-cap-sm {
  color: var(--text-3);
  text-transform: uppercase;
}

/* Logbook: a framed panel of text, no figure */
.cr-log {
  position: relative;
  display: grid;
  margin-top: 16px;
  padding: 12px;
}
.cr-log > .pframe { color: var(--surface-2); }
.cr-log .cr-body {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 20px 24px;
  background: var(--surface);
}

.cr-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  margin-top: 32px;
}
.cr-foot p {
  margin: 0;
  max-width: 640px;
  color: var(--text-2);
}
.cr-note {
  margin: 20px 0 0;
  max-width: 760px;
  color: var(--text-3);
}

@media (max-width: 1199px) {
  .cr-info { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .cr-info { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}
@media (max-width: 639px) {
  .cr { padding-block: 64px 48px; }
    .cr-fallback { grid-template-columns: repeat(3, minmax(0, 1fr)); align-content: center; }
  .cr-info { grid-template-columns: minmax(0, 1fr); }
  .cr-col { padding: 14px 14px 16px; }
  .cr-log { padding: 8px; }
  .cr-log .cr-body { padding: 14px 14px 16px; }
}
@media (max-width: 639px) {
  .cr-stage { height: 390px; }
}
