/* «Рекорды воды России»: сцены-сравнения (префикс rk-) */

/* подписи на картинке */
.trip svg .rk-big { font: 900 72px/1 var(--text); fill: var(--water-deep); paint-order: stroke; stroke: #fff; stroke-width: 10px; stroke-linejoin: round; }
.trip svg .rk-sub { font: 800 26px/1 var(--text); fill: var(--ink); paint-order: stroke; stroke: #fff; stroke-width: 7px; stroke-linejoin: round; }
.trip svg .rk-name { font: 900 30px/1 var(--text); fill: var(--ink); paint-order: stroke; stroke: #fff; stroke-width: 7px; stroke-linejoin: round; }
.trip svg .rk-lbl { font: 800 22px/1 var(--text); fill: var(--ink); paint-order: stroke; stroke: #fff; stroke-width: 6px; stroke-linejoin: round; }
.trip svg .rk-sm { font-size: 19px; }
.trip svg .rk-note { fill: var(--ink-soft); }
.trip svg .rk-dep { fill: #fff; stroke: #1a5f9e; }
.trip svg .rk-cnt { font: 900 32px/1 var(--text); fill: #c0614f; paint-order: stroke; stroke: #fff; stroke-width: 8px; stroke-linejoin: round; }
.trip svg .rk-cnt-xl { font-size: 40px; }
.trip svg .rk-km { font: 900 21px/1 var(--text); fill: #c0614f; paint-order: stroke; stroke: #fff; stroke-width: 6px; stroke-linejoin: round; }

/* сцены сменяют друг друга */
.rk-sc { opacity: 0; visibility: hidden; transition: opacity .45s ease, visibility .45s; }
.rk-sc.on { opacity: 1; visibility: visible; }

/* Катя переходит от рекорда к рекорду */
.rk-katya { transition: transform .9s ease; pointer-events: none; }
.rk-kbob { animation: rk-bob 2.6s ease-in-out infinite; }

/* Байкал */
.rk-tw { transition: none; }
.rk-wave { animation: rk-wave 4s linear infinite; }
.rk-bob { animation: rk-bob 2.2s ease-in-out infinite; }
#rk-sub { transition: transform 1s ease-in-out; }
.rk-bubbles circle { opacity: 0; }
.trip.dive .rk-bubbles circle { animation: rk-rise 1.1s ease-out 2; }
.trip.dive .rk-bubbles circle:nth-child(2) { animation-delay: .25s; }
.trip.dive .rk-bubbles circle:nth-child(3) { animation-delay: .5s; }

/* Ладога: Москвы ложатся одна за другой; Каспий: Ладоги */
.rk-ms, .rk-li { opacity: 0; }
.rk-ms.on, .rk-li.on { opacity: 1; }
.rk-ms.on, .rk-li.on > use { animation: rk-pop .5s ease-out both; }
.rk-ms, .rk-li > use { transform-box: fill-box; transform-origin: center; }
.rk-ripple { opacity: 0; }
.trip.moscow .rk-ripple, .trip.ladoga .rk-ripple { animation: rk-ripple 1s ease-out; }
.rk-cross { opacity: 0; }

/* реки-ленты */
.rk-rv, .rk-rv0x, .rk-rv1x, .rk-rv2x { transition: opacity .4s ease; }
.rk-boat { opacity: 0; }

/* Енисей */
.rk-flow path { animation: rk-flow 1.4s linear infinite; }
.rk-pw { transform-box: fill-box; transform-origin: 50% 100%; }
.trip.sec .rk-pw { animation: rk-fill .8s ease-out both; animation-delay: calc(var(--i) * .07s); }
.trip.sec .rk-hand2 { animation: rk-spin 1s linear; }
.rk-hand { transform-origin: 0 0; }

/* Эльбрус */
.rk-melt { opacity: 0; stroke-dasharray: 6 94; }
.trip.melt .rk-melt { opacity: 1; animation: rk-melt 1.6s linear 2; }
#rk-climber { transition: transform .8s ease-in-out; }
.rk-flag { opacity: 0; transition: opacity .3s ease; }
.trip.rk-top .rk-flag { opacity: 1; }
.trip.rk-top .rk-flag path:last-child { animation: rk-pop .6s ease-out; transform-box: fill-box; transform-origin: 0 50%; }
.rk-t10, .rk-t10line { transition: opacity .2s ease; }

/* водохранилище и ГЭС */
.rk-glow { opacity: 0; transition: opacity .4s ease; }
.rk-win { transition: fill .3s ease; }
.rk-house.on .rk-glow { opacity: .75; }
.rk-house.on .rk-win { fill: #ffd84a; }
.rk-win { transform-box: fill-box; transform-origin: center; }
.rk-house.on .rk-win { animation: rk-pop .5s ease-out; }
.rk-turb { transform-origin: 0 0; }
.trip.light .rk-turb { animation: rk-spin .6s linear 4; }
.rk-gushw { opacity: 0; }
.trip.light .rk-gushw { opacity: 1; animation: rk-flow2 .5s linear 6; }

/* гейзеры: фонтан бьёт заново на каждое нажатие */
.rk-ft { opacity: 0; pointer-events: none; }
.rk-ftin { transform-box: fill-box; transform-origin: 50% 100%; }
.rk-gy.go .rk-ft { opacity: 1; }
.rk-gy.go .rk-ftin { animation: rk-gush 2.4s ease-out both; }
.rk-steam circle { animation: rk-steam 2.4s ease-out infinite; }
.rk-steam circle:nth-child(2) { animation-delay: 1.1s; }

/* болото-губка */
#rk-swater { transition: y .9s ease, height .9s ease; }
.rk-rain path { stroke: #4aa6e6; stroke-width: 4; stroke-linecap: round; opacity: 0; }
.trip.rain .rk-rain path, .trip.rk-wet .rk-rain path { animation: rk-fall .7s linear 4; }
.rk-rain path:nth-child(2n) { animation-delay: .25s !important; }
.rk-rain path:nth-child(3n) { animation-delay: .45s !important; }
.rk-dr { fill: #fff; transition: fill .3s ease; }
.rk-dr.on { fill: #4aa6e6; }
.rk-seep { opacity: 0; transition: opacity .4s ease; }
.trip.rk-full .rk-seep { opacity: 1; animation: rk-flow 1s linear infinite; }

/* Карелия */
.rk-lk { opacity: 0; transform-box: fill-box; transform-origin: center; }
.rk-lk.on { opacity: 1; animation: rk-pop .5s ease-out both; }

@keyframes rk-bob { 50% { transform: translateY(-5px); } }
@keyframes rk-wave { to { transform: translateX(-40px); } }
@keyframes rk-rise { from { transform: translateY(0); opacity: 1; } to { transform: translateY(-34px); opacity: 0; } }
@keyframes rk-pop { 0% { transform: scale(.2); opacity: 0; } 70% { transform: scale(1.15); opacity: 1; } 100% { transform: scale(1); } }
@keyframes rk-ripple { from { opacity: 1; } to { opacity: 0; } }
@keyframes rk-flow { to { stroke-dashoffset: -60; } }
@keyframes rk-flow2 { to { stroke-dashoffset: -38; } }
@keyframes rk-fill { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes rk-spin { to { transform: rotate(360deg); } }
@keyframes rk-melt { from { stroke-dashoffset: 0; } to { stroke-dashoffset: -100; } }
@keyframes rk-gush { 0% { transform: scaleY(.05); opacity: 1; } 22% { transform: scaleY(1.05); } 32% { transform: scaleY(1); } 70% { opacity: 1; } 100% { transform: scaleY(.9); opacity: 0; } }
@keyframes rk-steam { from { transform: translateY(0); opacity: .9; } to { transform: translateY(-40px); opacity: 0; } }
@keyframes rk-fall { from { transform: translateY(-10px); opacity: 0; } 25% { opacity: 1; } to { transform: translateY(110px); opacity: 0; } }

/* карточки: число рекорда крупно, кнопки в ряд, ссылка на регион */
.rk-cbig { display: block; margin-top: 6px; font: 900 34px/1.1 var(--text); color: var(--water); }
.trip-card .rk-cbig + h2 { margin-top: 2px; }
.rk-acts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.rk-go { font-weight: 800; }
.rk-go a { color: var(--water-deep); }

/* двенадцать кружков помещаются в одну строку и на телефоне */
@media (max-width: 860px) {
  .trip[data-story="rekordy"] .trip-dots { gap: 3px; }
  .trip[data-story="rekordy"] .trip-dots button { width: 25px; height: 25px; font-size: 11px; }
  .rk-cbig { font-size: 28px; }
}

/* без анимаций: нужное состояние видно сразу */
@media (prefers-reduced-motion: reduce) {
  .trip.rain .rk-rain path, .trip.rk-wet .rk-rain path { opacity: 1; transform: translateY(60px); }
  .trip.melt .rk-melt { stroke-dasharray: 10 14; }
  .rk-ms.on, .rk-li.on, .rk-lk.on { opacity: 1; }
}
