/*
 * ANIM09 R02 · BARE OBSIDIAN · Бивис
 * Пакет: VNISHGLOBAL-20260730-ANIM09-R02-BARE-OBSIDIAN
 * sha256 архива: 720d5aaa1ca245dafd24f82331b9da7d837258e2b42a68dbb66d1aa54f45d1a0
 *
 * Только компонентные правила из его styles.css. Глобальные строки standalone-
 * страницы (:root, *, html/body, overflow:hidden, min-width, чёрный фон) НЕ
 * перенесены по его же инструкции, раздел 6.
 */

@font-face {
  font-family: "Onest";
  src: url("./assets/anim09/onest-variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

.anim09 {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 480px;
  overflow: hidden;
  background: #020303;
  font-family: "Onest", Arial, sans-serif;
}

.anim09-stage {
  position: absolute;
  inset: 0;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
}

.anim09-stage.is-dragging { cursor: grabbing; }

.anim09-stage canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  outline: none;
  transition: opacity .55s ease;
  -webkit-tap-highlight-color: transparent;
}

.anim09.webgl-ready .anim09-stage canvas { opacity: 1; }

.anim09-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  transition: opacity .4s ease, visibility .4s ease;
}

.anim09.webgl-ready .anim09-fallback {
  visibility: hidden;
  opacity: 0;
}

.anim09-fallback-stone {
  position: relative;
  display: flex;
  width: min(76%, 620px);
  aspect-ratio: .96;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  clip-path: polygon(9% 4%, 88% 2%, 98% 18%, 96% 79%, 82% 97%, 15% 96%, 2% 80%, 4% 18%);
  padding: 18%;
  background:
    radial-gradient(circle at 48% 35%, rgba(117, 86, 39, .3), transparent 42%),
    linear-gradient(140deg, #28241f, #080b0e 58%, #020304);
  box-shadow:
    0 0 0 1px rgba(245, 207, 119, .55),
    0 34px 100px rgba(0, 0, 0, .75);
  transform: perspective(1200px) rotateX(-5deg) rotateY(-10deg);
  text-align: center;
}

.anim09-fallback-stone img {
  width: 58%;
  height: auto;
  margin-bottom: 11%;
  filter: brightness(1.35) contrast(1.15) saturate(.92);
}

.anim09-fallback-stone b {
  color: #ffe3a0;
  font-size: clamp(12px, 2vw, 24px);
  letter-spacing: .1em;
  text-shadow: 0 2px 8px #000;
}

.anim09-fallback-stone small {
  margin-top: 12px;
  color: #f0c972;
  font-size: clamp(7px, .9vw, 12px);
  letter-spacing: .16em;
}

.anim09-fallback-stone i {
  width: 62px;
  height: 1px;
  margin: 24px;
  background: #e7c77d;
}

.anim09-fallback-stone p {
  max-width: 32ch;
  margin: 0;
  color: #f0ece2;
  font-size: clamp(9px, 1vw, 14px);
  font-style: italic;
  line-height: 1.55;
}

@media (max-width: 620px) {
  .anim09 { min-height: 420px; }
  .anim09-fallback-stone { width: min(88%, 430px); }
}

@media (prefers-reduced-motion: reduce) {
  .anim09-stage canvas,
  .anim09-fallback { transition: none; }
}

/* embedded: правило стоит ПОСЛЕ mobile media query, иначе она вернёт min-height */
.anim09.anim09--component {
  width: 100%;
  height: 100%;
  min-height: 0;
}

/* ---- посадка в #authority: ровно то место и те габариты, где стоял артефакт ---- */
.authority .anim09--component {
  position: absolute;
  z-index: 2;
  top: 50%;
  right: 4vw;
  /* r7: -20% к площади r6 - сторона /1.118 */
  width: min(44vw, 711px);
  height: auto;
  aspect-ratio: 1;
  translate: 0 -50%;
  /* бесшовно: фон секции, без окантовок и подложек (канон шефа) */
  background: transparent;
}
.authority .anim09--component .anim09-stage { background: transparent; }

@media (max-width: 900px) {
  .authority .anim09--component { right: 1vw; width: min(49vw, 620px); }
}

/* на узком камень встаёт в поток под текстом: абсолют прятал его за карточками */
@media (max-width: 760px) {
  .authority { min-height: 0; }
  .authority .anim09--component {
    /* ГРАБЛЯ: static ломает containing block - .anim09-stage растягивался на всю секцию */
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    width: min(100%, 440px);
    max-width: 100%;
    height: 440px;
    min-height: 440px;
    margin: 26px auto 0;
    translate: none;
    aspect-ratio: auto;
  }
  .authority-ripples { display: none; }
}
