/* Звенья — пример истории вещи. Название вещи держится наверху; знаки — крупно рядом, без колец и мигания. */
.vv { --head: 61px; --bar: 64px; }
.it { position: relative; }
.it + .it { margin-top: 80px; }

/* общие с вариантом B: смысл знака, описание, притонировка вокруг выбранного места */
.va__mean { display: block; font: 600 clamp(44px, 6vw, 96px)/1 var(--f-display); margin: 10px 0 16px; }
.va__text { color: var(--ink-soft); font-size: clamp(16px, 1.3vw, 19px); max-width: 38ch; }
.vb__spot { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at var(--x) var(--y), transparent var(--r), rgba(24, 16, 10, .66) calc(var(--r) + 48px)); }
.it__hots button { aspect-ratio: 1; }

/* закреплённая строка с названием вещи */
.it__bar { position: sticky; top: var(--head); z-index: 20; height: var(--bar); display: flex; align-items: center; gap: 18px; padding: 0 var(--gutter); background: color-mix(in srgb, var(--bg, var(--paper)) 94%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.it__bar .mono { flex: none; }
.it__name { font-size: clamp(24px, 2.6vw, 36px); line-height: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.it__tag { margin-left: auto; flex: none; font: 500 13px/1 var(--f-mono); color: var(--ink-soft); letter-spacing: .06em; }
#bag .it__bar { margin-top: var(--head); }

/* вещь целиком и её смысл: фото рядом с текстом с первого экрана */
.it__open { max-width: var(--maxw); margin: 0 auto; padding: 40px var(--gutter) 64px; display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 80px); align-items: center; }
/* фото вещи — в общей рамке .zv-frame (styles.css) */
.it__photo { margin: 0; justify-self: center; width: min(100%, calc((100svh - var(--head) - var(--bar) - 150px) * .75)); }
.it__photo .zv-frame img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: 50% 40%; }
.it__about .lead { margin-top: 0; }
.it__purpose { margin-top: 28px; border-top: 1px solid var(--line); padding-top: 14px; }
.it__purpose p:not(.mono) { margin-top: 8px; color: var(--ink-soft); max-width: 52ch; }
.it__slice { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 28px 0 0; border-top: 1px solid var(--line); }
.it__slice div { padding: 12px 16px 12px 0; border-bottom: 1px solid var(--line); }
.it__slice div:nth-child(even) { padding-left: 16px; border-left: 1px solid var(--line); }
.it__slice dt { font: 500 12px/1.4 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--terra); }
.it__slice dd { margin: 4px 0 0; font: 600 20px/1.2 var(--f-display); }
.it__slice--sm dd { font-size: 18px; }
.it__next { margin-top: 28px; color: var(--ink-soft); }

/* крышка развёрнуто: закреплённая сцена, шаги — прокруткой */
.it__read { height: 320svh; }
.it__stage { position: sticky; top: calc(var(--head) + var(--bar)); height: calc(100svh - var(--head) - var(--bar)); max-width: var(--maxw); margin: 0 auto; padding: 24px var(--gutter); display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: clamp(28px, 5vw, 80px); }
.it__lid { position: relative; margin: 0; height: min(100%, 720px, 44vw); /* 44vw — на 1024 крышка не выдавливает текст за край */ aspect-ratio: 1; transition: width .5s var(--ease); }
.it__lid img { width: 100%; height: 100%; display: block; }

/* выделение: вся схема притонирована, знаки текущего шага — терракотой поверх */
.it__lid > img { opacity: .28; }
.it__hl { position: absolute; inset: 0; pointer-events: none; transition: opacity .6s var(--ease); }
.it__hl > div { position: absolute; inset: 0; background: var(--terra); -webkit-mask: url(assets/svg/drum-alania.svg) center / 100% 100% no-repeat; mask: url(assets/svg/drum-alania.svg) center / 100% 100% no-repeat; }
.it__stage.is-whole .it__hl { opacity: 0; }

/* «Вместе»: схема растворяется, в том же круге раскрывается настоящая сумка;
   всадник на фото сначала совпадает со всадником схемы, потом фото отъезжает до всей вещи */
.it__lid > img { transition: opacity 1.2s var(--ease), transform 1.6s var(--ease); }
.it__real { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; clip-path: circle(0% at 50% 50.5%); transition: clip-path 1.3s var(--ease); pointer-events: none; }
.it__real img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; display: block; transform-origin: 37.5% 46.2%; transform: translate(12.5%, 4.3%) scale(1.6); transition: transform 2.2s var(--ease) .15s; }
.it__stage.is-whole .it__real { clip-path: circle(50% at 50% 50%); }
.it__stage.is-whole .it__real img { transform: none; }
.it__stage.is-whole .it__lid > img { opacity: 0; transform: scale(1.04); }
.it__stage.is-whole .it__hots { pointer-events: none; }

/* варианты перехода (черновик для выбора): data-t на крышке */
/* круг (выбран Александром 21.10): край раскрытия мягкий — растушёвка вместо резкого среза,
   по краю бежит тёплый свет, к концу он уходит за границу круга */
@property --rv { syntax: '<percentage>'; inherits: true; initial-value: 0%; }
.it__lid[data-t="circle"] .it__real { clip-path: none; -webkit-mask: radial-gradient(circle at 50% 50.5%, #000 calc(var(--rv) - 14%), transparent var(--rv)); mask: radial-gradient(circle at 50% 50.5%, #000 calc(var(--rv) - 14%), transparent var(--rv)); transition: --rv 2s cubic-bezier(.4, 0, .3, 1); }
.it__lid[data-t="circle"] .it__real::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 50.5%, transparent calc(var(--rv) - 22%), rgba(255, 238, 205, .5) calc(var(--rv) - 9%), transparent calc(var(--rv) - 1%)); mix-blend-mode: screen; }
.it__lid[data-t="circle"] .it__real img { filter: blur(5px) sepia(.35); transition: transform 2.2s var(--ease) .15s, filter 1.6s var(--ease) .25s; }
.it__stage.is-whole .it__lid[data-t="circle"] .it__real { --rv: 100%; }
.it__stage.is-whole .it__lid[data-t="circle"] .it__real img { filter: none; }
@property --ring { syntax: '<length>'; inherits: false; initial-value: 0px; }
/* кольца: фото проступает концентрическими кольцами от всадника, кольца толстеют до сплошного */
.it__lid[data-t="rings"] .it__real { -webkit-mask: repeating-radial-gradient(circle at 50% 50.5%, #000 0 var(--ring), transparent var(--ring) 26px); mask: repeating-radial-gradient(circle at 50% 50.5%, #000 0 var(--ring), transparent var(--ring) 26px); transition: clip-path 1.5s var(--ease), --ring 1.5s var(--ease) .45s; }
.it__stage.is-whole .it__lid[data-t="rings"] .it__real { --ring: 27px; }
/* тиснение: линии схемы темнеют и вдавливаются, потом под ними проступает фото */
.it__lid[data-t="emboss"] .it__real, .it__lid[data-t="develop"] .it__real { clip-path: circle(50% at 50% 50%); opacity: 0; transition: opacity 1.2s var(--ease) .9s; }
.it__stage.is-whole .it__lid[data-t="emboss"] > img { opacity: 0; transition: opacity .5s var(--ease); }
/* оттиск: вся схема тёмно-коричневой, с бликом снизу и тенью сверху, как вдавлено в кожу */
.it__stage.is-whole .it__lid[data-t="emboss"] .it__hl { -webkit-mask: none !important; mask: none !important; opacity: 0; animation: zvPress 2s var(--ease) forwards; filter: drop-shadow(0 1.5px 0 rgba(255, 248, 235, .9)) drop-shadow(0 -1px 0 rgba(20, 12, 6, .55)); }
.it__stage.is-whole .it__lid[data-t="emboss"] .it__hl > div { background: #4a3423; }
@keyframes zvPress { 0% { opacity: 0; transform: scale(1.01); } 30% { opacity: 1; transform: scale(.99); } 55% { opacity: 1; transform: scale(.99); } 100% { opacity: 0; transform: scale(.99); } }
/* проявление: фото проступает из размытой сепии, как фото на главной */
.it__lid[data-t="develop"] .it__real { transition: opacity 1s var(--ease) .1s; }
.it__lid[data-t="develop"] .it__real img { filter: sepia(.9) saturate(.5) blur(12px) contrast(.8); transition: filter 2.2s var(--ease) .2s, transform 2.4s var(--ease) .15s; }
.it__stage.is-whole .it__lid[data-t="develop"] .it__real img { filter: none; }
.it__stage.is-whole .it__lid[data-t="emboss"] .it__real, .it__stage.is-whole .it__lid[data-t="develop"] .it__real { opacity: 1; }
.it__lid.no-tr, .it__lid.no-tr * { transition: none !important; animation: none !important; }
.it__fx { margin-top: 18px; color: var(--ink-soft); display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.it__fx[hidden] { display: none; }
.it__fx button { all: unset; cursor: pointer; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); text-transform: none; letter-spacing: 0; font: 500 13px/1.2 var(--f-body); }
.it__fx button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.it__fx button:focus-visible { outline: 2px solid var(--terra); outline-offset: 2px; }
/* «уменьшить движение» — переход к настоящей вещи остаётся (мягкий режим, см. main.js) */

/* отметка текущего знака — тонкий неподвижный круг */
.it__mark { position: absolute; left: 0; top: 0; width: 0; aspect-ratio: 1; border: 2px solid var(--terra); border-radius: 50%; pointer-events: none; opacity: 0; transform: translate(-50%, -50%); transition: left .5s var(--ease), top .5s var(--ease), width .5s var(--ease), opacity .3s; }
.it__mark.is-on { opacity: 1; }

/* точки наведения: неподвижные, заметные при наведении */
.it__hots { position: absolute; inset: 0; }
.it__hots button { all: unset; position: absolute; transform: translate(-50%, -50%); border-radius: 50%; cursor: pointer; }
/* платок: метки элементов видны всегда — неподвижные, без мигания */
.sc__cloth .it__hots button::after { content: ""; position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; background: radial-gradient(circle, var(--terra) 0 4px, #f4ede1 4.5px 8px, transparent 8.5px); box-shadow: 0 0 0 1.5px rgba(43, 32, 22, .55), 0 2px 8px rgba(30, 20, 12, .35); transition: transform .2s var(--ease), opacity .2s; }
.sc__cloth .it__hots button:hover::after { transform: scale(1.2); }
.sc__cloth .it__hots button.is-on::after { opacity: 0; }
.it__hots button:focus-visible { outline: 2px solid var(--terra); outline-offset: 2px; }

/* знак крупно */
.it__panel { display: grid; gap: 24px; align-content: center; justify-items: start; }
.it__big { width: clamp(180px, 30svh, 280px); aspect-ratio: 1; border-radius: 50%; background: #fff no-repeat; background-color: var(--paper-2, #efe5d4); box-shadow: 0 18px 40px -20px rgba(30, 20, 12, .45); }
.it__big { position: relative; }
.it__big::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle, transparent 56%, var(--paper-2, #efe5d4) 70%); pointer-events: none; }
.it__big--sm { width: clamp(130px, 12vw, 180px); }
.it__big.is-whole { display: none; }
.it__txt .va__mean { font-size: clamp(40px, 4.4vw, 72px); }
.it__txt .va__text { max-width: 46ch; }
.it__gap { margin-top: 20px; border: 1px dashed var(--ink-soft); padding: 12px 16px; max-width: 46ch; }
.it__gap .mono { color: var(--ink-soft); }
.it__gap p:not(.mono) { margin-top: 6px; color: var(--ink-soft); font-size: 15px; }

/* платок: закреплённая сцена, остальное полотно притонировано вокруг текущего элемента */
.sc__read { height: calc(var(--steps, 8) * 70svh); }
.sc__cloth--bowl { aspect-ratio: 787 / 1400 !important; }
#bowlRead .sc__cloth { height: min(100%, 760px); }
.sc__cloth { position: relative; margin: 0; height: min(100%, 720px, 44vw); aspect-ratio: 1; --x: 50%; --y: 50%; --r: 0px; }
.sc__cloth img { width: 100%; height: 100%; display: block; }
.sc__cloth .vb__spot { opacity: 0; transition: opacity .6s var(--ease); }
.sc__cloth.is-on .vb__spot { opacity: 1; }
.sc__side { min-width: 0; }
.sc__lead { color: var(--ink-soft); font-size: clamp(16px, 1.25vw, 19px); max-width: 48ch; }
.sc__intro .it__slice { margin-top: 20px; }
.sc__panel { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 16px 20px; align-items: center; }
.sc__panel[hidden], .sc__intro[hidden] { display: none; }
.sc__scheme { width: clamp(84px, 7vw, 110px); aspect-ratio: 1; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--terra); background: var(--paper); }
.sc__scheme svg { width: 62%; height: 62%; }
.sc__scheme svg path, .sc__scheme svg rect, .sc__scheme svg circle { fill: none; stroke: currentColor; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.sc__scheme svg .f { fill: currentColor; stroke: none; }
.sc__scheme img { width: 70%; height: 70%; object-fit: contain; }
.sc__scheme:empty { display: none; }
.sc__txt { grid-column: 1 / -1; }
.sc__txt .va__mean { font-size: clamp(36px, 3.6vw, 56px); }
.sc__txt .is-gap { color: var(--ink-soft); }
.sc__panel.is-whole { grid-template-columns: 1fr; }
.sc__panel.is-whole .va__text { font: 600 clamp(20px, 1.9vw, 26px)/1.35 var(--f-display); color: var(--ink); max-width: 40ch; }
.sc__hint { margin-top: 24px; color: var(--ink); }

@media (max-width: 900px) {
  .vv { --bar: 56px; }
  .it__bar { gap: 12px; }
  .it__bar .mono, .it__tag { display: none; }
  .it__name { font-size: 21px; }
  .it__open { grid-template-columns: 1fr; padding-top: 24px; }
  .it__photo { width: min(100%, 36svh); }
  .it__stage { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); align-items: start; justify-items: center; gap: 14px; padding-top: 14px; }
  .it__lid { height: auto; width: min(100%, 44svh); }
  .it__stage.is-whole .it__lid { width: min(100%, 26svh); }
  .it__panel { grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: start; width: 100%; }
  .it__big { width: 96px; }
  .it__txt .va__mean { font-size: 34px; margin: 4px 0 6px; }
  .it__txt .va__text { font-size: 15px; }
  .it__gap { padding: 8px 12px; margin-top: 10px; }
  .sc__cloth { height: auto; width: min(100%, 44svh); }
  .sc__lead { font-size: 15px; }
  .it__slice--sm dd { font-size: 15px; }
  .it__slice--sm div { padding-top: 8px; padding-bottom: 8px; }
  .sc__panel { grid-template-columns: auto auto minmax(0, 1fr); gap: 10px 14px; }
  .sc__panel .it__big--sm { width: 84px; }
  .sc__scheme { width: 64px; }
  .sc__txt .va__mean { font-size: 32px; margin: 4px 0 6px; }
  .sc__txt .va__text { font-size: 15px; }
  .sc__hint { margin-top: 12px; }
  .sc__side { width: 100%; }

}

/* на главной: шапка прячется при прокрутке — строка с названием вещи встаёт к самому верху; истории — внутри слоёв эпох */
.layers .it, .signs .rd { --head: 0px; --bar: 64px; }
.layer .it { margin: 48px 0 0; }
.layer .it__bar { padding: 0; }
.layer .it__open, .layer .it__stage, .layer .sc__read .it__stage { padding-left: 0; padding-right: 0; }
.signs .rd { margin-top: 24px; }
/* тёмный слой (эпоха бронзы): цвета истории — под тёмный фон */
.layer[data-layer="4"] .it { --ink: var(--paper); --ink-soft: #d9cbb5; --line: rgba(255, 255, 255, .16); --paper-2: #4a3a2e; color: var(--paper); }
.layer[data-layer="4"] .sc__scheme { background: #3a2d23; color: var(--ochre-lt); }
.layer[data-layer="4"] .it__slice dt, .layer[data-layer="4"] .sc__name { color: var(--ochre-lt); }
.layer[data-layer="4"] .zv-frame::before { border-color: rgba(255, 255, 255, .22); }
@media (max-width: 900px) { .layers .it, .signs .rd { --bar: 56px; } }

.signs .rd { --bar: 0px; }
@media (max-width: 900px) { #bowlRead .sc__cloth { height: auto; width: min(100%, 25svh); } }
#bowlRead .vb__spot { background: radial-gradient(circle at var(--x) var(--y), rgba(255, 240, 215, .08) var(--r), rgba(10, 6, 3, .48) calc(var(--r) + 34px)); }
