/* Verdict reveal: gavel strikes the podium, "Verdict delivered" slams in, results rise.
   Base styles are the finished frame, so reduced-motion (animation: none) shows the end state. */

.vr-overlay {
  position: fixed; inset: 0; z-index: 10000;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background: radial-gradient(ellipse at 50% 55%, #1b1b1b 0%, #070707 70%);
  color: var(--paper, #FFE95C);
  overflow: hidden; cursor: pointer;
  animation: vrIn .3s ease-out both;
}
.vr-overlay.out { animation: vrOut .45s ease-in forwards; pointer-events: none; }

.vr-overlay::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: #fff; opacity: 0;
  animation: vrFlash .3s ease-out .62s both;
}
.vr-overlay::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(255, 255, 255, .025) 3px 4px);
}

.vr-cam {
  position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%;
  animation: vrCam 1.05s cubic-bezier(.4, 0, .6, 1) both;
}
.vr-fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; }
.vr-rays {
  position: absolute; left: 50%; top: 46%; width: 190vmax; height: 190vmax; margin: -95vmax 0 0 -95vmax; pointer-events: none;
  background: repeating-conic-gradient(from 0deg, rgba(255, 233, 92, .26) 0 5deg, transparent 5deg 15deg);
  -webkit-mask-image: radial-gradient(circle, #000 0, transparent 34%); mask-image: radial-gradient(circle, #000 0, transparent 34%);
  opacity: .55; animation: vrRays 3s linear .62s both;
}
.vr-stage {
  position: relative; width: min(440px, 82vw, 44vh);
  animation: vrShake .36s cubic-bezier(.36, .07, .19, .97) .62s both;
}
.vr-crack { fill: none; stroke: #fff; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.vr-crack.c1 { filter: drop-shadow(0 0 4px rgba(255, 255, 255, .9)); }
.vr-crack { stroke-dasharray: 1; stroke-dashoffset: 1; animation: vrCrack 1.5s ease-out .62s both; }
.vr-svg { display: block; width: 100%; height: auto; overflow: visible; }

.vr-podium { fill: var(--paper, #FFE95C); stroke: #000; stroke-width: 5; stroke-linejoin: round; }
.vr-podium-dark { fill: #000; }
.vr-block { fill: #7a4a22; stroke: #000; stroke-width: 5; }
.vr-handle { fill: #7a4a22; stroke: #000; stroke-width: 5; }
.vr-head { fill: var(--pen, #1A2FB8); stroke: #000; stroke-width: 5; }
.vr-band { fill: var(--paper, #FFE95C); stroke: #000; stroke-width: 4; }

.vr-gavel {
  transform-box: view-box; transform-origin: 300px 140px;
  transform: rotate(0deg);
  animation: vrGavel .6s linear .15s both;
}

.vr-ring {
  fill: none; stroke: var(--paper, #FFE95C); stroke-width: 5; opacity: 0;
  transform-box: fill-box; transform-origin: center;
  animation: vrRing .5s ease-out .62s both;
}
.vr-spark {
  stroke: var(--paper, #FFE95C); stroke-width: 6; stroke-linecap: round; opacity: 0;
  transform-origin: 200px 172px;
  animation: vrSpark .45s ease-out .62s both;
}

.vr-title {
  margin: 0; text-align: center; text-transform: uppercase;
  font-family: "Archivo", system-ui, sans-serif; font-stretch: 112%; font-weight: 900;
  font-size: clamp(34px, 8.4vw, 76px); line-height: .95; letter-spacing: .01em;
  color: var(--paper, #FFE95C);
  text-shadow: 0 0 0 rgba(255, 0, 200, 0), 0 0 0 rgba(0, 255, 255, 0), 0 4px 0 #000, 0 0 36px rgba(255, 233, 92, .35);
  transform: rotate(-2deg);
  animation: vrSlam .28s cubic-bezier(.2, 1.4, .4, 1) .74s both;
}
.vr-sub {
  margin: 4px 0 0; padding: 0 20px; max-width: 80vw; text-align: center;
  font: 600 clamp(13px, 2.2vw, 17px)/1.4 "Archivo", system-ui, sans-serif; letter-spacing: .06em;
  color: rgba(255, 255, 255, .7);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  animation: vrFade .4s ease-out 1s both;
}
.vr-skip {
  z-index: 4;
  position: absolute; bottom: 18px; right: 20px;
  font: 600 12px "Archivo", system-ui, sans-serif; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(255, 255, 255, .45);
  animation: vrFade .4s ease-out .5s both;
}

@keyframes vrIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes vrOut { to { opacity: 0; transform: scale(1.04); } }
@keyframes vrFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes vrFlash { 0% { opacity: .85; } 100% { opacity: 0; } }
@keyframes vrShake {
  0%, 100% { transform: translate(0, 0) rotate(0); }
  15% { transform: translate(-9px, 7px) rotate(-.7deg); }
  30% { transform: translate(8px, -6px) rotate(.6deg); }
  45% { transform: translate(-6px, 4px) rotate(-.4deg); }
  60% { transform: translate(4px, -3px) rotate(.3deg); }
  80% { transform: translate(-2px, 1px); }
}
@keyframes vrGavel {
  0%   { transform: rotate(38deg); animation-timing-function: cubic-bezier(.2, .8, .3, 1); }
  55%  { transform: rotate(74deg); }
  72%  { transform: rotate(74deg); animation-timing-function: cubic-bezier(.6, 0, 1, .6); }
  80%  { transform: rotate(0deg);  animation-timing-function: cubic-bezier(.2, .8, .4, 1); }
  88%  { transform: rotate(13deg); animation-timing-function: ease-in; }
  94%  { transform: rotate(0deg); }
  100% { transform: rotate(0deg); }
}
@keyframes vrCam {
  0%   { transform: scale(1); }
  58%  { transform: scale(1.14); animation-timing-function: ease-out; }
  64%  { transform: scale(.965); }
  76%  { transform: scale(1.025); }
  100% { transform: scale(1); }
}
@keyframes vrRays { 0% { opacity: 0; transform: rotate(0); } 8% { opacity: .9; } 100% { opacity: .35; transform: rotate(46deg); } }
@keyframes vrCrack { 0% { opacity: 1; stroke-dashoffset: 1; } 12% { stroke-dashoffset: 0; opacity: 1; } 70% { opacity: .85; stroke-dashoffset: 0; } 100% { opacity: 0; stroke-dashoffset: 0; } }
@keyframes vrRing { 0% { opacity: .9; transform: scale(.25); } 100% { opacity: 0; transform: scale(2.6); } }
@keyframes vrSpark {
  0% { opacity: 1; transform: rotate(var(--a)) scale(.2); }
  100% { opacity: 0; transform: rotate(var(--a)) scale(1.9); }
}
@keyframes vrSlam {
  0% { opacity: 0; transform: rotate(-6deg) scale(2.6); text-shadow: -14px 0 0 rgba(255, 0, 200, .95), 14px 0 0 rgba(0, 255, 255, .95), 0 4px 0 #000, 0 0 60px rgba(255, 233, 92, .8); }
  45% { opacity: 1; }
  100% { opacity: 1; transform: rotate(-2deg) scale(1); text-shadow: 0 0 0 rgba(255, 0, 200, 0), 0 0 0 rgba(0, 255, 255, 0), 0 4px 0 #000, 0 0 36px rgba(255, 233, 92, .35); }
}

/* results screen: sections rise in one after another once the overlay is gone */
#screen-results.verdict-in > * { animation: vrRise .55s cubic-bezier(.2, .8, .3, 1) both; }
#screen-results.verdict-in > :nth-child(1) { animation-delay: .00s; }
#screen-results.verdict-in > :nth-child(2) { animation-delay: .14s; }
#screen-results.verdict-in > :nth-child(3) { animation-delay: .26s; }
#screen-results.verdict-in > :nth-child(4) { animation-delay: .36s; }
#screen-results.verdict-in > :nth-child(5) { animation-delay: .46s; }
#screen-results.verdict-in > :nth-child(6) { animation-delay: .54s; }
#screen-results.verdict-in > :nth-child(n+7) { animation-delay: .62s; }
@keyframes vrRise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
#screen-results.verdict-in .result-card .big-score { animation: vrPop .6s cubic-bezier(.2, 1.5, .4, 1) .35s both; }
@keyframes vrPop { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .vr-overlay, .vr-overlay::before, .vr-cam, .vr-rays, .vr-crack, .vr-stage, .vr-gavel, .vr-ring, .vr-spark, .vr-title, .vr-sub, .vr-skip,
  #screen-results.verdict-in > *, #screen-results.verdict-in .result-card .big-score { animation: none !important; }
  .vr-overlay::before, .vr-ring, .vr-spark, .vr-fx, .vr-rays, .vr-crack { display: none; }
}
