/* The specimen window reserves the same space for WebGL and its static facet. */
.v-hero:has(.mineral-stage) {
  background: radial-gradient(ellipse at 78% 47%, #16345770, transparent 48%), linear-gradient(135deg,#060b15,#0b1529 64%,#090f19);
}
.mineral-stage {
  align-self: center;
  min-width: 0;
  padding: 0;
}
.mineral-window {
  position: relative;
  isolation: isolate;
  aspect-ratio: 1.25;
  background: radial-gradient(ellipse at center,#386fbb44,transparent 65%);
}
.mineral-window::before {
  content: "";
  position: absolute;
  inset: 12% 20%;
  background: url("/assets/illustrations/azurite-cut.svg") center / contain no-repeat;
  filter: drop-shadow(0 0 16px #619cff);
}
.mineral-window:has(canvas[data-webgl="ok"]:not([hidden]))::before { opacity: 0; }
.mineral-window .v-hero-canvas:not([hidden]) {
  display: block;
  z-index: 1;
  inset: -12% 0;
  width: 100%;
  height: 124%;
  opacity: 1;
}
.mineral-orbit, .mineral-orbit::after {
  position: absolute;
  inset: 15% 4%;
  border: 1px solid #a6cfff45;
  border-radius: 50%;
  transform: rotate(-22deg) scaleY(.7);
}
.mineral-orbit::after { content: ""; inset: -12% 5%; transform: rotate(46deg); border-style: dashed; opacity: .55; }
.mineral-preview {
  position: relative;
  z-index: 2;
  margin: 0 auto;
  max-width: 32rem;
  background: linear-gradient(125deg,#1a2d47,#0d1727);
  border: 1px solid #a0c7ff42;
  border-radius: 14px;
  box-shadow: 0 18px 42px #01040a66;
}
.mineral-preview summary {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 18px 10px 10px;
  cursor: pointer; font-weight: 650;
}
.mineral-preview summary::-webkit-details-marker { display: none; }
.mineral-preview summary::after { content: "+"; margin-left: auto; color: #a6cfff; font-size: 22px; }
.mineral-preview[open] summary::after { content: "−"; }
.mineral-thumbnail {
  width: 68px; height: 40px; border-radius: 6px;
  background: #0c1322 url("/assets/shots/quick-start.webp") center / cover;
}
.v-hero:has(.mineral-stage) .v-accent-word {
  color: #a2caff; background: linear-gradient(100deg,#ebf7ff,#8cb5ff 56%,#77e5da);
  background-clip: text; -webkit-text-fill-color: transparent;
}
body:has(.mineral-stage) .v-statement {
  background: linear-gradient(110deg,#101f36,#0b121e 75%);
  border-block: 1px solid #95bfff25;
}
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    body:has(.mineral-stage) .v-header::after {
      content: ""; position: absolute; inset: auto 0 0; height: 2px;
      background: linear-gradient(90deg,#598fff,#84e1d8); transform-origin: left;
      animation: mineral-reading linear both; animation-timeline: scroll(root);
    }
    .mineral-orbit { animation: mineral-turn linear both; animation-timeline: view(); }
  }
}
@keyframes mineral-reading { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes mineral-turn { from { transform: rotate(-34deg) scaleY(.6); } to { transform: rotate(10deg) scaleY(.82); } }
@media (max-width: 900px) {
  .mineral-window { max-height: 330px; margin-inline: auto; }
}

@media (min-width: 1000px) and (min-height: 680px) and (prefers-reduced-motion: no-preference) {
  .v-hero:has(.mineral-stage) .v-hero-grid {
    position: sticky;
    top: 12vh;
  }
  .v-hero:has(.mineral-stage) .v-hero-foot {
    margin-top: 48vh;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .mineral-window {
    transform: perspective(1000px) translateZ(calc(80px * var(--mineral-progress, 0)));
  }
}
.v-faq .v-faq-grid {
  grid-template-columns: max-content minmax(0, 1fr);
}
@media (max-width: 980px) {
  .v-faq .v-faq-grid { grid-template-columns: minmax(0, 1fr); }
  .v-faq .v-faq-grid > h2 { position: static; }
}
:root {
  --az-motion-ease: cubic-bezier(.2,.75,.2,1);
  --az-glass-border: rgb(161 198 240 / 22%);
}
.v-scenarios.story-active { overflow: clip; }
.story-active .v-scenario-list { display: flex; gap: 18px; border: 0; perspective: 1300px; }
.v-scenario-list .v-scenario {
  position: relative;
  padding: clamp(22px,3vw,44px);
  border: 1px solid var(--az-glass-border);
  border-radius: 18px;
  background: linear-gradient(125deg,#17283c,#0c1522 72%);
  box-shadow: inset 0 1px 0 #d2eaff0d;
}
.story-active .v-scenario { flex: 0 0 46%; min-height: 245px; }
.v-scenario-list:not(.story-active .v-scenario-list) { gap: 14px; border: 0; }
.v-scenario::before {
  content: ""; display: block; width: 48px; height: 48px; margin-bottom: 27px;
  background: var(--scenario-art) center / contain no-repeat;
}
.v-scenario:nth-child(1) { --scenario-art: url("/assets/illustrations/lfg.svg"); }
.v-scenario:nth-child(2) { --scenario-art: url("/assets/illustrations/socials.svg"); }
.v-scenario:nth-child(3) { --scenario-art: url("/assets/illustrations/support.svg"); }
.v-scenario:nth-child(4) { --scenario-art: url("/assets/illustrations/levels.svg"); }
.mineral-window {touch-action: pan-y;}
@media (prefers-reduced-motion: no-preference) {
  .feedback-dialog {
    opacity: 0; translate: 0 10px;
    transition: opacity .2s var(--az-motion-ease), translate .22s var(--az-motion-ease),
                display .22s allow-discrete, overlay .22s allow-discrete;
  }
  .feedback-dialog[open] { opacity: 1; translate: 0 0; }
  @starting-style { .feedback-dialog[open] { opacity: 0; translate: 0 10px; } }
}

.mineral-window {
  perspective: 1050px;
  background: radial-gradient(ellipse at 52% 55%, #284c6b55, transparent 67%);
}
.mineral-preview summary { transition: background .24s ease; border-radius: inherit; }
.mineral-preview summary:hover { background: #a0cfff10; }
.mineral-preview[open] { background: #101c2c; }
@media (max-width: 720px) {
  .mineral-window { width: 100%; }

}
.mineral-stage:has(.mineral-preview[open]) .mineral-window { display: none; }
.mineral-stage .mineral-preview { background: #101b2b; }
.mineral-preview summary { min-height: 58px; padding-inline: 20px; }
.setup-demo { margin: 4px 16px 12px; padding: 0; border: 0; min-width: 0; }
.setup-demo legend { padding: 4px 4px 12px; color: #a8bdd4; font-size: 14px; }
.demo-module { display: flex; align-items: center; gap: 12px; padding: 12px; cursor: pointer; border-top: 1px solid #344358; }
.demo-module strong,.demo-module small { display: block; }
.demo-module strong { color: #eff6ff; font-size: 17px; }
.demo-module small,.demo-caption { color: #b3c3d7; font-size: 14px; }
.demo-module input { margin-left: auto; width: 20px; height: 20px; accent-color: #769dff; flex-shrink: 0; }
.demo-module:has(:checked) { background: #17283e; }
.demo-caption { margin: 0 20px 8px; }
.demo-link { display: inline-block; margin: 0 20px 16px; color: #afd2ff; padding-block: 6px; }
.mineral-preview .demo-en,html:lang(en) .mineral-preview .demo-ru { display: none; }
html:lang(en) .mineral-preview .demo-en { display: inline; }
/* Keep the preview trigger anchored while its content changes. */
.mineral-stage { display: flex; flex-direction: column; justify-content: flex-start; align-self: start; }
.mineral-stage .mineral-preview { order: -1; width: 100%; max-width: none; margin: 0; }
.v-hero:has(.mineral-stage) .v-hero-grid { align-items: start; }
.v-hero:has(.mineral-stage) h1 { max-width: none; font-size: clamp(48px,5.25vw,80px); line-height: .99; }
@media (max-width: 980px) {
  body.v1 .v-nav-actions { margin-inline-start: auto; }
  .v-hero:has(.mineral-stage) { padding-top: 36px; }
  .v-hero:has(.mineral-stage) h1 { font-size: clamp(42px,10vw,70px); }
}
