/* v07 The Climb: the HUD over the POV stage, and the climbing-hold markers. */
.hud { position: fixed; inset: 0; z-index: 20; pointer-events: none; color: #fff; }
.hud::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 210px; background: linear-gradient(180deg, rgba(10, 14, 40, .78), rgba(10, 14, 40, 0)); }
.hud::after { content: ''; position: absolute; inset: 0; background: #fff; opacity: 0; }
.hud.is-freeze::after { animation: flash .42s ease-out; }
@keyframes flash { 0% { opacity: .55; } 100% { opacity: 0; } }

.hud-top { position: absolute; left: 0; right: 0; top: 0; padding: calc(12px + var(--sat)) 64px 0 16px; display: grid; gap: 8px; max-width: 760px; margin: 0 auto; }
.hud-row { display: flex; align-items: center; gap: 10px; min-height: 22px; }
.hud-steps { display: flex; gap: 5px; align-items: flex-end; }
.hud-steps i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, .3); transition: background .3s; }
.hud-steps i:nth-child(2) { height: 12px; } .hud-steps i:nth-child(3) { height: 15px; } .hud-steps i:nth-child(4) { height: 18px; } .hud-steps i:nth-child(5) { height: 21px; } .hud-steps i:nth-child(6) { height: 24px; }
.hud-steps i { border-radius: 5px; }
.hud-steps i.is-good { background: var(--good); } .hud-steps i.is-bad { background: var(--bad); } .hud-steps i.is-now { background: #fff; animation: blink 1s ease-in-out infinite alternate; }
@keyframes blink { to { opacity: .45; } }
.hud-lv { font: 800 12px/1 var(--ui); letter-spacing: .12em; text-transform: uppercase; opacity: .85; }
.hud-q { display: grid; gap: 4px; text-shadow: 0 2px 10px rgba(0, 0, 0, .55); }
.hud-q b { font: 900 clamp(26px, 7.4vw, 40px)/1.05 var(--display); letter-spacing: -.01em; }
.hud-q span { font: 700 15px/1.3 var(--ui); opacity: .92; max-width: 34em; }
.hud.is-buildup .hud-q b { font-size: clamp(20px, 5.6vw, 28px); }
.hud-q.is-q b { animation: qin .45s cubic-bezier(.2, 1.3, .4, 1) both; }
.hud-q.is-q span { animation: rise .5s ease both .12s; }
@keyframes qin { from { opacity: 0; transform: translateY(-10px) scale(.92); } to { opacity: 1; transform: none; } }

/* the verdict after the tap */
.hud-verdict { justify-self: start; display: grid; gap: 6px; padding: 14px 16px; border-radius: 18px; background: var(--snow); color: var(--ink); box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .6);
  animation: vin .5s cubic-bezier(.2, 1.3, .4, 1) both; min-width: 240px; max-width: 100%; text-shadow: none; }
@keyframes vin { from { opacity: 0; transform: translateY(-16px) scale(.94); } to { opacity: 1; transform: none; } }
.v-big { font: 900 30px/1 var(--display); }
.hud-verdict.is-good .v-big { color: #138a55; } .hud-verdict.is-ok .v-big { color: #a86400; } .hud-verdict.is-bad .v-big { color: #d93b30; }
.v-sub { font: 700 15px/1.3 var(--ui); color: var(--ink-2); }
.v-times { display: flex; gap: 8px; margin-top: 2px; }
.v-times > span { display: grid; gap: 2px; padding: 7px 10px; border-radius: 10px; background: var(--snow-2); font: 800 18px/1 var(--ui); font-variant-numeric: tabular-nums; min-width: 84px; }
.v-times small { font: 700 11px/1 var(--ui); color: var(--ink-3); text-transform: uppercase; letter-spacing: .08em; }

/* the rope timer */
.hud-bottom { position: absolute; left: 16px; right: 16px; bottom: calc(16px + var(--sab)); max-width: 620px; margin: 0 auto; transition: opacity .3s, transform .3s; }
.hud.is-buildup .hud-bottom, .hud.is-reveal .hud-bottom { opacity: 0; transform: translateY(12px); }
.rt { position: relative; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px;
  background: rgba(14, 18, 52, .86); box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .6); }
.rt-num { font: 900 30px/1 var(--display); font-variant-numeric: tabular-nums; min-width: 64px; }
.rt-num::after { content: 's'; font: 800 14px/1 var(--ui); opacity: .7; margin-left: 2px; }
.rt.is-idle .rt-num::after { content: ''; }
.rt-rope { position: relative; height: 16px; border-radius: 99px; background: rgba(255, 255, 255, .16); overflow: hidden; }
.rt-rope i { position: absolute; inset: 0; border-radius: 99px; transform-origin: 0 50%;
  background: repeating-linear-gradient(-55deg, #ffb347 0 7px, #ff7a4a 7px 14px); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .18); }
.rt.is-low .rt-rope i { background: repeating-linear-gradient(-55deg, #ff5a4e 0 7px, #c81e3a 7px 14px); }
.rt.is-low { animation: tremble .18s linear infinite; }
@keyframes tremble { 25% { translate: -1.5px 0; } 75% { translate: 1.5px 0; } }
.rt-gap { position: absolute; left: 14px; bottom: calc(100% + 8px); padding: 6px 10px; border-radius: 99px; background: var(--bad); font: 800 13px/1 var(--ui); white-space: nowrap; }
.rt-gap:empty { display: none; }
.rt.is-done { opacity: .0; }

/* the fog in Scanning */
.hud-fog { position: absolute; inset: -10%; opacity: 0; transition: opacity .6s ease;
  background: radial-gradient(40% 30% at 20% 40%, rgba(235, 240, 255, .9), transparent 70%), radial-gradient(45% 35% at 80% 55%, rgba(235, 240, 255, .85), transparent 70%), radial-gradient(50% 30% at 50% 80%, rgba(235, 240, 255, .8), transparent 70%); }
.hud-fog.is-in { opacity: .85; animation: fogdrift 3s ease-in-out infinite alternate; }
.hud-fog.is-thin { opacity: .16; animation: fogdrift 6s ease-in-out infinite alternate; }
@keyframes fogdrift { to { transform: translateX(4%); } }

/* pressure: the edges burn as he closes in */
.hud-glow { position: absolute; inset: 0; opacity: 0; transition: opacity .3s; box-shadow: inset 0 0 0 0 rgba(255, 60, 60, 0); }
.hud.is-press .hud-glow { opacity: 1; box-shadow: inset 0 0 60px 10px rgba(255, 60, 60, .4); }
.hud[data-threat=left] .hud-glow { background: linear-gradient(90deg, rgba(255, 50, 50, .55), transparent 22%); }
.hud[data-threat=right] .hud-glow { background: linear-gradient(270deg, rgba(255, 50, 50, .55), transparent 22%); }
.hud[data-threat=behind] .hud-glow { background: linear-gradient(0deg, rgba(255, 50, 50, .55), transparent 26%); }
@keyframes burn { from { opacity: .55; } to { opacity: 1; } }

/* the real clip */
.hud-reveal { position: absolute; left: 16px; right: 16px; bottom: calc(16px + var(--sab)); max-width: 620px; margin: 0 auto; pointer-events: auto; }
.rv-card { display: grid; gap: 10px; padding: 16px; border-radius: 20px; background: rgba(14, 18, 52, .92); box-shadow: 0 16px 40px -16px rgba(0, 0, 0, .7); }
.rv-saw { margin: 0; font: 600 15px/1.4 var(--ui); color: rgba(255, 255, 255, .92); }
.kicker--light { color: rgba(255, 255, 255, .75); }
.hud.is-reveal::before { height: 260px; }

/* ---------- the climbing holds (markers) ---------- */
.pt-mk .hold { position: relative; isolation: isolate; width: 62px; height: 62px; display: grid; place-items: center; animation: holdin .5s cubic-bezier(.2, 1.5, .4, 1) both; animation-delay: calc(var(--i) * 90ms); }
@keyframes holdin { from { opacity: 0; transform: scale(.3) rotate(-30deg); } to { opacity: 1; transform: none; } }
.pt-mk .hold svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.pt-mk .hold::after { content: ''; position: absolute; inset: -14px; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 201, 74, .55), rgba(255, 201, 74, 0)); z-index: -1; }
.pt-mk.is-pro .hold::after { background: radial-gradient(closest-side, rgba(34, 181, 115, .7), rgba(34, 181, 115, 0)); }
.pt-mk.is-mine .hold::after, .pt-mk.is-dim .hold::after { display: none; }
.hold-sh { fill: rgba(0, 0, 0, .35); }
.hold-b { fill: var(--hold); stroke: #fff; stroke-width: 3.5; transition: fill .25s; }
.hold-hi { fill: rgba(255, 255, 255, .55); }
.pt-mk .hold b { position: relative; font: 900 24px/1 var(--display); color: #3a1d00; }
.pt-mk .hold::before { content: ''; position: absolute; inset: -9px; border-radius: 50%; border: 3px solid rgba(255, 214, 110, .9); animation: ring 1.5s ease-out infinite; }
.pt-mk:hover .hold, .pt-mk:active .hold { transform: scale(1.08); }
.pt-stage.pt-pressing .hold-b { fill: #ffd56a; }
.pt-stage.pt-answered .hold::before { display: none; }
.pt-mk.is-pro .hold-b { fill: var(--good); }
.pt-mk.is-pro .hold b { color: #fff; }
.pt-mk.is-pro .hold { animation: grab .6s cubic-bezier(.2, 1.6, .4, 1) both; }
.pt-mk.is-mine .hold-b { fill: var(--bad); }
.pt-mk.is-mine .hold b { color: #fff; }
.pt-mk.is-mine .hold { animation: crumble .55s ease both; }
@keyframes grab { 0% { transform: scale(1); } 40% { transform: scale(1.3); } 100% { transform: scale(1.12); } }
@keyframes crumble { 0%, 100% { transform: none; } 20% { transform: translateX(-6px) rotate(-8deg); } 40% { transform: translateX(6px) rotate(6deg); } 60% { transform: translate(-3px, 4px) rotate(-3deg); } 80% { transform: translate(2px, 6px); } }
.pt-mk[data-edge=l]::before { border-right-color: var(--hold); }
.pt-mk[data-edge=r]::before { border-left-color: var(--hold); }
.pt-paths path { stroke: rgba(255, 228, 160, .9); }
.pt-paths ellipse { fill: rgba(255, 214, 110, .3); }

@media (min-width: 900px) {
  .hud-top { padding-left: 32px; padding-right: 80px; }
  .hud-q b { font-size: 40px; }
  .hud-bottom, .hud-reveal { bottom: 28px; }
}
