/* ===== Vote page ===== */

/* ---------- progress panel ---------- */
.progress { padding-bottom: clamp(18px, 3vw, 26px); }
.progress-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.reset {
  font-family: "Silkscreen", monospace; font-weight: 700; font-size: 13px; color: #9a6a2c;
}
.segments {
  display: grid; grid-template-columns: repeat(10, 1fr); gap: clamp(4px, 1vw, 10px);
  margin-top: 14px;
}
.seg {
  height: clamp(22px, 3.5vw, 34px);
  background: #f3dc98;
  border: 4px solid var(--brown-dark);
  border-radius: 8px;
  box-shadow: inset 0 4px 0 rgba(150, 95, 10, .18);
  transition: background .3s ease;
  animation: segIn .5s var(--spring) both;
  animation-delay: calc(.8s + var(--i) * 60ms);
}
.seg.on {
  background: linear-gradient(180deg, #ffe066, #f7b733);
  box-shadow: inset 0 -5px 0 rgba(0,0,0,.12), inset 0 4px 0 rgba(255,255,255,.55);
  animation: segPop .55s var(--spring) both;
}
.seg.off { opacity: .45; border-style: dashed; }
@keyframes segIn { from { opacity: 0; transform: scale(.2); } to { opacity: 1; transform: none; } }
@keyframes segPop {
  0% { transform: scale(1); } 40% { transform: scale(1.3, .8); } 70% { transform: scale(.9, 1.15); } 100% { transform: scale(1); }
}
.progress.done .pixel-label { background: var(--leaf-dark); animation: bump .6s var(--spring); }

/* ---------- grid ---------- */
.vote-grid {
  width: min(1100px, 100%);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: clamp(12px, 2vw, 22px);
  perspective: 900px;
}
@media (max-width: 900px) { .vote-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .vote-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- card ---------- */
.vcard {
  --rx: 0deg; --ry: 0deg; --lift: 0px;
  position: relative;
  display: flex; flex-direction: column;
  text-decoration: none; color: var(--brown-dark);
  background: var(--gold-0);
  border: 4px solid var(--brown-dark);
  border-radius: 22px;
  box-shadow: 0 8px 0 var(--c2), 0 8px 0 4px var(--brown-dark), 0 18px 24px rgba(150, 95, 10, .22);
  transform: translateY(var(--lift)) rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  transition: transform .5s var(--spring), box-shadow .3s ease;
  animation: cardIn .8s var(--spring) both;
  animation-delay: calc(.6s + var(--i) * 70ms);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}
.vcard:hover, .vcard:focus-visible { --lift: -8px; transition: transform .15s ease-out, box-shadow .3s ease; }
.vcard:focus-visible { outline: 4px dashed var(--gold-4); outline-offset: 5px; }
.vcard:active { --lift: 4px; }
@keyframes cardIn {
  from { opacity: 0; transform: translateY(40px) rotateX(-50deg) scale(.7); }
  to   { opacity: 1; transform: translateY(var(--lift)) rotateX(var(--rx)) rotateY(var(--ry)); }
}

/* colourful top */
.vtop {
  position: relative;
  height: clamp(86px, 11vw, 110px);
  border-radius: 17px 17px 0 0;
  background:
    repeating-conic-gradient(rgba(255,255,255,.14) 0 25%, transparent 0 50%) 0 0 / 20px 20px,
    linear-gradient(180deg, var(--c1), var(--c2));
  border-bottom: 4px solid var(--brown-dark);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  box-shadow: inset 0 5px 0 rgba(255,255,255,.35), inset 0 -6px 0 rgba(0,0,0,.12);
}
/* shine sweep on hover */
.vtop::after {
  content: ""; position: absolute; top: -30%; bottom: -30%; width: 45%; left: -70%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.7), transparent);
  transform: skewX(-20deg);
  transition: left .7s var(--out);
}
.vcard:hover .vtop::after { left: 130%; }

.vicon {
  display: block;
  filter:
    drop-shadow(3px 0 0 #fff) drop-shadow(-3px 0 0 #fff)
    drop-shadow(0 3px 0 #fff) drop-shadow(0 -3px 0 #fff)
    drop-shadow(0 5px 0 rgba(59, 32, 9, .3));
  animation: iconBob 2.6s var(--soft) infinite;
  animation-delay: calc(var(--i) * -260ms);
  transform: translateZ(30px);
}
.vcard:hover .vicon { animation: iconSpin .8s var(--spring); }
@keyframes iconBob {
  0%, 100% { transform: translateY(0) rotate(-6deg); }
  50%      { transform: translateY(-6px) rotate(6deg); }
}
@keyframes iconSpin {
  0%   { transform: scale(1) rotate(0); }
  50%  { transform: scale(1.35) rotate(200deg); }
  100% { transform: scale(1.15) rotate(360deg); }
}

.vnum {
  position: absolute; top: 8px; left: 8px;
  font-family: "Silkscreen", monospace; font-weight: 700; font-size: 13px;
  background: var(--brown-dark); color: var(--gold-1);
  padding: 2px 8px 3px; border-radius: 8px;
  transform: rotate(-6deg);
}

.vbody {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 12px 10px 14px;
  text-align: center;
}
.vname { font-size: clamp(16px, 1.8vw, 20px); line-height: 1.05; }

.vbtn {
  font-family: "Silkscreen", monospace; font-weight: 700; font-size: 14px; letter-spacing: 1px;
  color: #fff;
  background: linear-gradient(180deg, var(--c1), var(--c2));
  border: 3px solid var(--brown-dark);
  border-radius: 12px;
  padding: 6px 16px 7px;
  box-shadow: inset 0 3px 0 rgba(255,255,255,.4), 0 4px 0 var(--brown-dark);
  text-shadow: 0 2px 0 rgba(0,0,0,.25);
  display: inline-flex; align-items: center; gap: 6px;
  transition: transform .35s var(--spring);
}
.vcard:hover .vbtn { transform: scale(1.1); animation: pulseBtn 1s var(--soft) infinite .3s; }
@keyframes pulseBtn { 50% { transform: scale(1.04); } }

/* coming soon (no link yet) */
.vcard.soon .vbtn {
  background: #d9c79a; color: var(--brown-dark); text-shadow: none;
}
.vcard.soon .lock { display: inline-block; animation: lockHop 2.4s var(--soft) infinite; animation-delay: calc(var(--i) * -240ms); }
.vcard.soon:hover .lock { animation: lockJiggle .5s var(--soft) infinite; }
@keyframes lockHop { 0%, 70%, 100% { transform: translateY(0); } 80% { transform: translateY(-4px); } 90% { transform: translateY(0); } }
@keyframes lockJiggle { 25% { transform: rotate(-14deg); } 75% { transform: rotate(14deg); } }
.vcard.soon .ribbon {
  position: absolute; top: 14px; right: -34px;
  transform: rotate(38deg);
  background: var(--brown-dark); color: var(--gold-2);
  font-family: "Silkscreen", monospace; font-weight: 700; font-size: 11px; letter-spacing: 1px;
  padding: 3px 36px;
}

/* voted today */
.stamp {
  position: absolute; left: 50%; top: 42%;
  font-family: "Silkscreen", monospace; font-weight: 700; font-size: 18px; letter-spacing: 1px;
  color: #fff; background: var(--leaf-dark);
  border: 4px solid var(--brown-dark); border-radius: 12px;
  padding: 4px 12px 5px;
  box-shadow: 0 4px 0 var(--brown-dark);
  transform: translate(-50%, -50%) rotate(-12deg) scale(0);
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  transform-style: preserve-3d;
}
.vcard.voted .stamp { animation: stamp .55s var(--spring) forwards; }
.vcard.voted .vtop, .vcard.voted .vbody { opacity: .7; }
@keyframes stamp {
  0%   { opacity: 0; transform: translate(-50%, -50%) rotate(-30deg) scale(2.4); }
  100% { opacity: 1; transform: translate(-50%, -50%) rotate(-12deg) scale(1) translateZ(40px); }
}
