/* TuaLua 17: mini-diploma de 30 plumas (HTML/CSS), versión clara del diploma PDF
   (docs/diploma_30_plumas). Marcado en templates/_diploma_mini.html; lo cargan la
   home (hoja con la muestra) y el chat (popup al ganarlo). Tipografías OFL locales. */
@font-face {
  font-family: 'Fraunces Diploma';
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url('fonts/diploma/Fraunces-Medium.ttf') format('truetype');
}
@font-face {
  font-family: 'Fraunces Diploma';
  font-weight: 400;
  font-style: italic;
  font-display: swap;
  src: url('fonts/diploma/Fraunces-Italic.ttf') format('truetype');
}
@font-face {
  font-family: 'DM Sans Diploma';
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url('fonts/diploma/DMSans-Regular.ttf') format('truetype');
}
@font-face {
  font-family: 'DM Sans Diploma';
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url('fonts/diploma/DMSans-SemiBold.ttf') format('truetype');
}

/* La hoja es 1123 x 794 (A4 horizontal); todo se escala con el ancho del contenedor. */
.dpl {
  --dpl-papel: #faf5ec;
  --dpl-tinta: #0f1517;
  --dpl-suave: #4a5557;
  --dpl-teal: #2a6b6b;
  --dpl-oro: #d9a92a;
  --dpl-marco: #e8dcb0;
  container-type: inline-size;
  position: relative;
  display: flex;
  width: 100%;
  max-width: 560px;
  aspect-ratio: 1123 / 794;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 6px;
  background: var(--dpl-papel);
  color: var(--dpl-tinta);
  font-family: 'DM Sans Diploma', 'DM Sans', system-ui, sans-serif;
  text-align: left;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}
.dpl > * { --u: calc(100cqw / 1123); }
.dpl p { margin: 0; }

.dpl-banda {
  flex: 0 0 28%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 7% 0 8%;
  box-sizing: border-box;
  background: #0d1215;
  color: #fff;
  text-align: center;
}
.dpl-logo { width: 70%; height: auto; }
.dpl-pluma { width: calc(var(--u) * 46); height: auto; margin-bottom: calc(var(--u) * -34); }
.dpl-treinta {
  font-family: 'Fraunces Diploma', Georgia, serif;
  font-weight: 500;
  font-size: calc(var(--u) * 190);
  line-height: 1;
  color: #f5c842;
}
.dpl-banda-pie {
  font-weight: 600;
  font-size: max(7px, calc(var(--u) * 17));
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.dpl-cuerpo {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 7% 0 6.5%;
}
.dpl-cuerpo::before {
  content: '';
  position: absolute;
  inset: 3% 2.5% 3% 1.5%;
  border: 1px solid var(--dpl-marco);
  pointer-events: none;
}
.dpl-kicker {
  font-weight: 600;
  font-size: max(7px, calc(var(--u) * 15));
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--dpl-teal);
}
.dpl-reconoce { margin-top: 3%; font-size: max(9px, calc(var(--u) * 25)); color: var(--dpl-suave); }
.dpl-nombre {
  margin-top: 1%;
  font-family: 'Fraunces Diploma', Georgia, serif;
  font-weight: 500;
  font-size: max(15px, calc(var(--u) * 66));
  line-height: 1.1;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.dpl-filete { display: block; width: 24%; height: max(2px, calc(var(--u) * 4)); margin: 4% 0; background: var(--dpl-oro); }
.dpl-texto { font-size: max(9px, calc(var(--u) * 27)); line-height: 1.45; color: #2c3a3c; }
.dpl-texto strong { font-weight: 600; }
.dpl-firma {
  margin-top: 8%;
  font-family: 'Fraunces Diploma', Georgia, serif;
  font-style: italic;
  font-size: max(9px, calc(var(--u) * 28));
  color: var(--dpl-teal);
}

/* Sello mientras todavía es una muestra. */
.dpl-sello {
  position: absolute;
  top: 9%;
  right: 5%;
  padding: 0.15em 0.7em;
  border: 2px solid rgba(217, 169, 42, 0.9);
  border-radius: 4px;
  background: rgba(250, 245, 236, 0.85);
  color: #a97f10;
  font-weight: 600;
  font-size: max(9px, calc(var(--u) * 30));
  letter-spacing: 0.25em;
  text-transform: uppercase;
  transform: rotate(-9deg);
}
