/**
 * Tutorial figure canvases — headers and mid-guide stills.
 * Stamp: 20261002b
 *
 * Scenes render through scene-vaporwave.js (procedural boxes, no logo stamp).
 * Pair with scene-vaporwave.css. Pictures stay as reduced-motion / no-WebGL fallbacks.
 */

.tut-header-canvas.why-card-media,
.tut-figure .why-card-media.scene-canvas,
.tut-header-canvas {
  position: relative;
  aspect-ratio: 1168 / 784;
  overflow: hidden;
  background: transparent;
  border: 1px solid var(--border, rgba(0, 0, 0, 0.08));
  border-radius: var(--plate-radius, 6px);
}

.tut-header-fallback,
.tut-figure .scene-fallback {
  position: absolute;
  inset: 0;
  z-index: 0;
  margin: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.tut-header-fallback,
.tut-figure .scene-fallback,
.tut-header-canvas > canvas,
.tut-figure .scene-canvas > canvas.scene-webgl {
  border-radius: inherit;
}

.tut-header-fallback img,
.tut-header-fallback .why-card-img,
.tut-figure .scene-fallback img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: inherit;
}

.tut-header-canvas > canvas,
.tut-figure .scene-canvas > canvas.scene-webgl {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 1;
}

.tut-header-canvas.scene-canvas--live > .tut-header-fallback,
.tut-figure .scene-canvas--live > .scene-fallback,
.scene-canvas--live > .tut-header-fallback {
  visibility: hidden;
  pointer-events: none;
}

.tut-figure .tut-header-canvas,
.tut-figure .scene-canvas {
  border-radius: var(--plate-radius, 6px);
}

@media (orientation: landscape) and (max-height: 520px) {
  .tut-header-canvas.why-card-media,
  .tut-figure .why-card-media.scene-canvas,
  .tut-header-canvas {
    aspect-ratio: 2 / 1;
  }
}

html[data-theme="dark"] .tut-header-canvas.why-card-media,
html[data-theme="dark"] .tut-figure .why-card-media.scene-canvas,
html[data-theme="dark"] .tut-header-canvas {
  border-color: color-mix(in srgb, var(--border-strong) 72%, var(--go-blue) 28%);
}

@media (prefers-reduced-motion: reduce) {
  .tut-header-canvas > canvas,
  .tut-figure .scene-canvas > canvas {
    display: none !important;
  }
  .tut-header-canvas.scene-canvas--live > .tut-header-fallback,
  .tut-figure .scene-canvas--live > .scene-fallback,
  .scene-canvas--live > .tut-header-fallback {
    visibility: visible;
  }
}
