/* Hallmark v2.0.0 · Nacréide · sculptures de mémoire · 2026-12-02 */
/* Critique: engraved metal, nested gimbals and faceted crystal make each scroll gesture a spatial instrument. */
/* answered 29: the cyan halo identifies the energy target; metallic depth uses neutral shadows. */
/* waive scroll-pattern: the user requests both sculptures and the atmospheric journey to respond on phones. */
:root {
  --sculpture-pearl: #f5f4e7;
  --sculpture-metal-light: #f8fff8;
  --sculpture-metal-soft: #bbd0d5;
  --sculpture-metal-mid: #6b8f9b;
  --sculpture-metal-dark: #233f53;
  --sculpture-metal-deep: #102a3f;
  --sculpture-cyan: #7febf5;
  --sculpture-ice: #c3fbff;
  --sculpture-gold: #e1bd86;
  --sculpture-shadow: #031323;
  --sculpture-clear: #82e5ee00;
  --sculpture-faint: #aff4f51c;
  --sculpture-line: #b2f3f53d;
}
.narrative-object {
  min-width: 0;
  width: min(100%, 620px);
  margin: 32px 0 32px;
  isolation: isolate;
}
.narrative-object .object-stage {
  position: relative;
  width: 100%;
  height: clamp(245px, 30vw, 350px);
  overflow: clip;
  perspective: 700px;
  background: radial-gradient(ellipse at 50% 50%, var(--sculpture-faint), var(--sculpture-clear) 68%);
}
.narrative-object canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}
.narrative-object figcaption {
  max-width: 47ch;
  margin: 4px 0 0;
  color: var(--night-muted);
  font-size: 13px;
  line-height: 1.65;
}
.narrative-object .object-stage::before,
.narrative-object .object-stage::after {
  content: '';
  position: absolute;
  pointer-events: none;
}
.narrative-object[data-sculpture=philosophie] .object-stage::before {
  width: 61%;
  aspect-ratio: 1;
  left: 19.5%;
  top: 10%;
  border: 5px solid var(--sculpture-metal-soft);
  border-bottom-color: var(--sculpture-metal-dark);
  border-right-color: var(--sculpture-metal-light);
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--sculpture-ice), 0 0 20px var(--sculpture-faint);
  transform: rotateX(63deg) rotateY(15deg) rotateZ(-30deg);
}
.narrative-object[data-sculpture=philosophie] .object-stage::after {
  width: 25%;
  height: 61%;
  left: 37.5%;
  top: 13%;
  background: linear-gradient(103deg, var(--sculpture-metal-light), var(--sculpture-cyan) 48%, var(--sculpture-metal-dark) 49%, var(--sculpture-metal-soft));
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  transform: rotateZ(-15deg) rotateY(18deg);
}
.narrative-object[data-sculpture=ambition] .object-stage::before {
  width: 35%;
  aspect-ratio: 1;
  right: 12%;
  top: 18%;
  border: 2px solid var(--sculpture-ice);
  border-radius: 50%;
  background: repeating-radial-gradient(circle, var(--sculpture-clear) 0 14%, var(--sculpture-line) 14.5% 15.5%, var(--sculpture-clear) 16% 28%);
  transform: rotateY(-36deg) rotateZ(9deg);
  box-shadow: 0 0 35px var(--sculpture-faint);
}
.narrative-object[data-sculpture=ambition] .object-stage::after {
  width: 58%;
  height: 15px;
  top: 45%;
  left: 12%;
  background: linear-gradient(90deg, var(--sculpture-clear), var(--sculpture-cyan) 30%, var(--sculpture-metal-light));
  clip-path: polygon(0 46%, 88% 40%, 87% 0, 100% 50%, 87% 100%, 88% 60%, 0 54%);
  transform: rotateZ(-8deg);
}
.narrative-object[data-renderer=projection-3d] .object-stage::before,
.narrative-object[data-renderer=projection-3d] .object-stage::after { opacity: 0; }
@media (max-width: 720px) {
  .narrative-object { margin-top: 20px; margin-bottom: 24px; }
  .narrative-object .object-stage { height: 260px; }
  .narrative-object figcaption { font-size: 12px; line-height: 1.65; }
}
@media (max-width: 350px) {
  .narrative-object .object-stage { height: 225px; }
}
@media (orientation: landscape) and (max-height: 525px) {
  .narrative-object .object-stage { height: 230px; }
}
@media (prefers-reduced-motion: reduce) {
  body:not(.motion-opt-in) .narrative-object .object-stage::before,
  body:not(.motion-opt-in) .narrative-object .object-stage::after { animation: none; transition: none; }
}

/* One GPU canvas moves between the two figures. Their painted fallback stays ready underneath. */
.narrative-object .narrative-webgl-canvas { z-index: 2; }
.narrative-object .narrative-webgl-canvas[hidden] { display: none; }
.narrative-object[data-gpu=ready] .narrative-2d { opacity: 0; }
.narrative-object[data-gpu=ready] .object-stage::before,
.narrative-object[data-gpu=ready] .object-stage::after { opacity: 0; }

.narrative-object .instrument-poster {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  z-index: 1;
}
.narrative-object .instrument-poster[hidden] { display: none; }
.narrative-object[data-poster-ready=true] .narrative-2d,
.narrative-object[data-gpu=ready] .instrument-poster { opacity: 0; }
.narrative-object .object-stage:has(.instrument-poster)::before,
.narrative-object .object-stage:has(.instrument-poster)::after { opacity: 0; }
