/* ==========================================================
   PIXATHON — problem statements (/ps)
   The four statements, then the PDF with Blox on top.
   ========================================================== */
.ps {
  --blox-w: clamp(104px, 13vw, 150px);
  --blox-h: calc(var(--blox-w) * 28 / 31);
  --blox-right: clamp(20px, 6vw, 56px);
  padding-bottom: clamp(48px, 8vh, 88px);
}
.ps-head { padding: clamp(28px, 6vh, 64px) 0 clamp(24px, 4vh, 40px); }
.ps-head .page-title { font-size: clamp(30px, 7.4vw, 84px); }
/* "Problem statements" is long for a phone, so it may wrap (it isn't scrambled) */
#revealed-title { font-size: clamp(28px, 6.2vw, 76px); line-height: 1.02; white-space: normal; text-wrap: balance; outline: none; }
.ps-head .lede a { color: var(--navy); text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* ---------- Blox on a card's top edge, with a speech bubble ---------- */
.ps-pdf { margin-top: calc(var(--blox-h) + 16px); }
.ps-blox {
  position: absolute;
  right: var(--blox-right);
  bottom: calc(100% + 2px);
  width: var(--blox-w);
  height: var(--blox-h);
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.ps-blox img {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  transform-origin: 50% 100%;
}
.ps-blox.hop img { animation: blox-hop .45s var(--ease-out); }
.ps-blox:focus-visible { outline: none; }
.ps-blox:focus-visible img { filter: drop-shadow(0 -3px 0 var(--gold)); }
@keyframes blox-hop {
  0% { transform: none; }
  30% { transform: translateY(-14px) scale(.96, 1.04); }
  60% { transform: translateY(0) scale(1.05, .95); }
  100% { transform: none; }
}

.ps-say {
  position: absolute;
  right: calc(var(--blox-right) + var(--blox-w) + 14px);
  bottom: calc(100% + var(--blox-h) * .52);
  max-width: min(280px, calc(100% - var(--blox-right) - var(--blox-w) - 30px));
  margin: 0;
  padding: 10px 12px;
  background: var(--navy);
  color: var(--cream);
  font-family: var(--f-pixel);
  font-size: 11px;
  letter-spacing: .05em;
  line-height: 1.6;
  box-shadow: 4px 4px 0 var(--gold);
  transform-origin: 100% 50%;
}
.ps-say::after { content: ""; position: absolute; right: -10px; top: 50%; width: 10px; height: 10px; margin-top: -5px; background: var(--navy); }
.ps-say.pop { animation: say-pop .35s var(--ease-spring); }
@keyframes say-pop {
  from { opacity: 0; transform: scale(.85); }
  to { opacity: 1; transform: none; }
}

/* ---------- the statements ---------- */
.ps-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ps-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  height: 100%;
  padding: 22px 22px 20px;
  color: inherit;
  text-decoration: none;
  transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out);
}
a.ps-item:hover { transform: translate(-3px, -3px); box-shadow: 9px 9px 0 var(--gold); }
a.ps-item:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
.ps-num {
  display: grid;
  place-items: center;
  width: 64px; height: 64px;
  background: var(--gold);
  color: var(--navy-deep);
  font-family: var(--f-pixel);
  font-weight: 700;
  font-size: 26px;
  box-shadow: inset 4px 4px 0 #F0C75C, inset -4px -4px 0 var(--gold-deep), 5px 5px 0 var(--navy-deep);
}
.ps-item .label { display: block; margin: 2px 0 6px; font-size: 11px; color: var(--gold-deep); }
.ps-item h2 { margin: 0; font-size: clamp(21px, 2.3vw, 26px); line-height: 1.2; color: var(--navy); }
.ps-item .tag { margin: 6px 0 12px; font-style: italic; color: var(--ink-2); }
.ps-item .go { font-family: var(--f-pixel); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--navy); }
.ps-item .go .arrow { display: inline-block; transition: transform .25s var(--ease-out); }
a.ps-item:hover .go .arrow { transform: translateX(4px); }
/* the list arrives one card at a time */
.ps-revealed.in .ps-list li { animation: card-in .55s var(--ease-out) both; }
.ps-revealed.in .ps-list li:nth-child(2) { animation-delay: .06s; }
.ps-revealed.in .ps-list li:nth-child(3) { animation-delay: .12s; }
.ps-revealed.in .ps-list li:nth-child(4) { animation-delay: .18s; }
@keyframes card-in { from { opacity: 0; transform: translateY(18px); } }

.ps-pdf { padding: clamp(18px, 3vw, 28px); scroll-margin-top: calc(var(--nav-h) + var(--blox-h) + 24px); }
.ps-pdf-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.ps-pdf-meta { margin: 6px 0 0; font-size: 14px; color: var(--ink-3); }
.ps-pdf-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.ps-pdf-view {
  display: block;
  width: 100%;
  height: min(88vh, 1180px);
  border: 2px solid var(--navy);
  background: var(--cream-2);
}
.ps-pdf-note { margin: 0; padding: 16px; border: 2px dashed var(--grid); color: var(--ink-2); }

@media (max-width: 820px) {
  .ps-list { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .ps-pdf-actions .btn { flex: 1 1 100%; }
  .ps-num { width: 52px; height: 52px; font-size: 21px; }
  .ps-item { gap: 14px; padding: 18px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .ps-revealed.in .ps-list li { animation: none; }
}
