/* Holodepth — Procedural geometry demos (parametric, noise, regenerate, L-system) */

figure.doc-proc-demo {
  margin-block: 1rem 0;
  margin-inline: 0;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}

.doc-proc-demo {
  border-radius: var(--radius, 14px);
  border: 1px solid rgba(94, 200, 255, 0.16);
  background: linear-gradient(
    165deg,
    rgba(10, 12, 22, 0.98) 0%,
    rgba(4, 6, 14, 0.99) 100%
  );
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.45) inset,
    0 16px 40px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.doc-proc-demo__hud {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.7rem 0.9rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(4, 6, 12, 0.72);
  font-family: var(--font-sans, system-ui, sans-serif);
  font-size: 0.78rem;
}

.doc-proc-demo__hud-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem 1rem;
}

.doc-proc-demo__tag {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(140, 200, 255, 0.88);
}

.doc-proc-demo__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.55rem 1rem;
}

.doc-proc-demo__field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.68rem;
  font-weight: 600;
  color: rgba(200, 215, 245, 0.88);
  min-width: 8.5rem;
}

.doc-proc-demo__field input[type="range"] {
  width: 100%;
  max-width: 220px;
  accent-color: #5ec8ff;
}

.doc-proc-demo__field-val {
  font-family: var(--font-mono, "JetBrains Mono", ui-monospace, monospace);
  font-size: 0.62rem;
  font-weight: 500;
  color: rgba(150, 230, 255, 0.95);
}

.doc-proc-demo__seg {
  display: inline-flex;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.25);
  padding: 3px;
  gap: 2px;
}

.doc-proc-demo__seg-btn {
  appearance: none;
  border: 0;
  margin: 0;
  cursor: pointer;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.55);
  background: transparent;
  transition: color 0.15s ease, background 0.15s ease;
}

.doc-proc-demo__seg-btn:hover {
  color: rgba(255, 255, 255, 0.88);
}

.doc-proc-demo__seg-btn[aria-pressed="true"] {
  color: #0b1020;
  background: linear-gradient(135deg, #5ec8ff 0%, #b56cff 100%);
}

.doc-proc-demo__btn {
  appearance: none;
  border: 1px solid rgba(255, 210, 120, 0.35);
  border-radius: 8px;
  padding: 0.35rem 0.65rem;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 600;
  cursor: pointer;
  color: rgba(255, 235, 200, 0.95);
  background: rgba(255, 200, 80, 0.12);
}

.doc-proc-demo__btn:hover {
  background: rgba(255, 200, 80, 0.2);
}

.doc-proc-demo__punch {
  margin: 0.15rem 0 0;
  font-size: 0.7rem;
  line-height: 1.45;
  color: rgba(255, 220, 160, 0.92);
}

.doc-proc-demo__viewport-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: min(58vh, 400px);
  background: radial-gradient(ellipse at 50% 42%, rgba(28, 48, 78, 0.35), rgba(4, 6, 12, 0.96));
}

.doc-proc-demo__viewport {
  position: absolute;
  inset: 0;
}

.doc-proc-demo__viewport canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  cursor: grab;
}

.doc-proc-demo__viewport canvas:active {
  cursor: grabbing;
}

.doc-proc-demo__caption {
  margin: 0;
  padding: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(0, 0, 0, 0.18);
}

.doc-proc-demo__caption .doc-demo-cap {
  padding: 0.7rem 0.9rem 0.85rem;
  font-size: 0.82rem;
  line-height: 1.5;
  color: rgba(210, 220, 245, 0.84);
}

@media (max-width: 560px) {
  .doc-proc-demo__controls {
    flex-direction: column;
    align-items: stretch;
  }
}
