/* page-propaganda - the 88x31 button page.
   Viola Cherchi, 2025-26 */

/* ============================================
   PROPAGANDA - WEB BUTTONS
   ============================================ */

/* the global h1 clamp maxes at 13rem - fine for one-word heroes,
   too loud for a prose page. scoped here, this file only loads
   on the propaganda template. */
[data-layout="prose"] h1 {
  font-size: clamp(2.5rem, 2rem + 3.5vw, 5.5rem);
}

[data-button-card] {
  border: 1px solid var(--mid);
  padding: var(--s-l);
  margin-block: var(--s-xl);
  background: var(--dark);
}

[data-button-card] figure {
  margin: 0 0 var(--s-l);
}

/* the hero rendering: the same GIF scaled up, nearest-neighbour,
   so the pixels stay pixels */
[data-button-card] figure > img:first-child {
  width: min(100%, 352px);
  height: auto;
  image-rendering: pixelated;
  display: block;
}

[data-button-card] figcaption {
  font-family: var(--font-mono);
  font-size: var(--scale-000);
  color: var(--grey);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-block: var(--s-s);
}

[data-button-card] figcaption span {
  text-transform: none;
  letter-spacing: normal;
}

/* actual size - rendered at native 88x31, no scaling */
[data-button-card] img[data-actual-size] {
  width: 88px;
  height: 31px;
  display: block;
}

[data-button-card] pre {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.6;
  color: var(--cyan);
  background: var(--black);
  border: 1px solid var(--mid);
  padding: var(--s-s) var(--s-m);
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  margin-block: var(--s-m);
}

[data-copy-snippet] {
  font-family: var(--font-mono);
  font-size: var(--scale-00);
  color: var(--red-text);
  background: none;
  border: 1px solid var(--red);
  padding: var(--s-xs) var(--s-m);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: background 0.2s, color 0.2s;
}

[data-copy-snippet]:hover,
[data-copy-snippet]:focus-visible {
  background: var(--red);
  color: var(--black);
}

/* copied state - JS sets the attribute value, CSS reacts */
[data-copy-snippet="done"] {
  color: var(--cyan);
  border-color: var(--cyan);
}

[data-copy-snippet="done"]:hover,
[data-copy-snippet="done"]:focus-visible {
  background: var(--cyan);
  color: var(--black);
}

/* --- reduced motion: freeze nothing here; GIFs are the only
   motion and browsers honour their own controls. transitions off. --- */
@media (prefers-reduced-motion: reduce) {
  [data-copy-snippet] { transition: none !important; }
}
[data-reduced-motion] [data-copy-snippet] { transition: none !important; }
