/* GoldFx Digger EA · Portada de la página
   Mismo mundo que el diario del portal: papel de certificado de día, tarjeta negra mate de noche.
   Una familia (Archivo); su ancho expandido en mayúsculas hace de punzón de sello.
   Escala de letra: 0.6875 (punzón), 0.8125 (nota), 0.9375 (texto), 1.0625 (título), 2.5 (frase). */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("/fuentes/archivo-latin.woff2") format("woff2");
}
:root {
  color-scheme: light;
  --papel: #eef0ed;
  --hoja: #ffffff;
  --hoja-2: #f5f6f4;
  --tinta: #14171a;
  --tinta-2: #4b5258;
  --tinta-3: #5f666c;
  --regla: #dde0dc;
  --regla-2: #bcc1bd;
  --fuente: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --papel: #0a0b0c;
    --hoja: #141618;
    --hoja-2: #1b1e21;
    --tinta: #eceae5;
    --tinta-2: #b0b4b6;
    --tinta-3: #8b9093;
    --regla: #262a2d;
    --regla-2: #3c4145;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: 1fr auto;
  background: var(--papel);
  color: var(--tinta);
  font-family: var(--fuente);
  font-size: 0.9375rem;
  line-height: 1.45;
  font-optical-sizing: auto;
  scrollbar-color: var(--regla-2) transparent;
}
::selection { background: var(--tinta); color: var(--hoja); }
:focus-visible { outline: 2px solid var(--tinta); outline-offset: 2px; border-radius: 2px; }
h1, p, dl, dd { margin: 0; }

/* Punzón: mayúsculas en el ancho expandido de la familia */
.punzon, dt {
  font-stretch: 122%;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-size: 0.6875rem;
  font-weight: 600;
}

main {
  display: grid;
  place-items: center;
  padding: 40px max(16px, env(safe-area-inset-right, 0px)) 28px max(16px, env(safe-area-inset-left, 0px));
}

/* ---------- la hoja ---------- */
.certificado {
  position: relative;
  width: 100%;
  max-width: 880px;
  background: var(--hoja);
  border: 1px solid var(--regla-2);
  border-radius: 3px;
  padding: 40px 44px 34px;
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  grid-template-areas:
    "casa cuerpo"
    "casa ficha"
    "casa accion";
  gap: 0 40px;
  align-items: start;
}
.certificado::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid var(--regla);
  border-radius: 1px;
  pointer-events: none;
}

.casa {
  grid-area: casa;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.casa img { display: block; width: 148px; height: 148px; }
.nombre {
  font-size: 0.9375rem;
  font-weight: 700;
  font-stretch: 108%;
  letter-spacing: 0.005em;
  line-height: 1.1;
  white-space: nowrap;
}

.cuerpo {
  grid-area: cuerpo;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-right: 176px;
  min-width: 0;
}
h1 {
  font-size: 2.5rem;
  font-weight: 700;
  font-stretch: 96%;
  letter-spacing: -0.025em;
  line-height: 1;
}
h1 span { display: block; text-wrap: balance; }
.que {
  color: var(--tinta-2);
  max-width: 52ch;
  margin-right: -176px;
  text-wrap: balance;
}

/* ---------- la estampa ---------- */
.estampa {
  position: absolute;
  top: 34px;
  right: 38px;
  transform: rotate(-6deg);
  border: 2px solid currentColor;
  border-radius: 3px;
  padding: 7px 13px 6px;
  text-align: center;
  line-height: 1.35;
  color: var(--tinta-3);
  box-shadow: inset 0 0 0 2px var(--hoja), inset 0 0 0 3px currentColor;
  opacity: 0.92;
  animation: golpe 220ms cubic-bezier(0.16, 1, 0.3, 1) 240ms both;
}
.estampa b { display: block; font-size: 0.8125rem; font-weight: 800; letter-spacing: 0.12em; }
.estampa span { display: block; font-stretch: 104%; letter-spacing: 0.08em; font-weight: 500; }
@keyframes golpe {
  from { transform: rotate(-6deg) scale(1.9); opacity: 0; filter: blur(3px); }
  60% { opacity: 1; filter: blur(0); }
  to { transform: rotate(-6deg) scale(1); opacity: 0.92; }
}

/* ---------- la ficha ---------- */
.ficha {
  grid-area: ficha;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 20px;
  margin-top: 28px;
  border-top: 1px solid var(--regla-2);
}
.ficha > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 0 13px;
  border-bottom: 1px solid var(--regla);
  min-width: 0;
}
dt { color: var(--tinta-3); }
dd {
  font-size: 1.0625rem;
  font-weight: 600;
  font-stretch: 104%;
  letter-spacing: -0.005em;
  line-height: 1.25;
}

/* ---------- la acción ---------- */
.accion {
  grid-area: accion;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  margin-top: 24px;
}
.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--regla-2);
  border-radius: 4px;
  background: transparent;
  color: var(--tinta);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background 160ms, border-color 160ms, color 160ms;
}
.boton:hover { border-color: var(--tinta); }
.boton:active { background: var(--hoja-2); }
.boton.primario { background: var(--tinta); border-color: var(--tinta); color: var(--hoja); }
.boton.primario:hover { background: var(--tinta-2); border-color: var(--tinta-2); }
.boton.primario:active { background: var(--tinta-3); border-color: var(--tinta-3); }
.boton svg { width: 16px; height: 16px; flex: none; }
.nota { flex-basis: 100%; font-size: 0.8125rem; color: var(--tinta-2); }
.nota b { font-weight: 600; color: var(--tinta); }

/* ---------- la salvedad ---------- */
footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 0 max(16px, env(safe-area-inset-right, 0px)) max(24px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  text-align: center;
  font-size: 0.8125rem;
  color: var(--tinta-3);
}
footer p { max-width: 76ch; text-wrap: pretty; }

/* ---------- una columna ---------- */
@media (max-width: 900px) {
  .certificado {
    max-width: 560px;
    padding: 30px 32px 28px;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "casa" "cuerpo" "ficha" "accion";
  }
  .casa { align-items: flex-start; gap: 10px; margin-bottom: 26px; }
  .casa img { width: 104px; height: 104px; }
  .cuerpo { padding-right: 0; }
  .que { margin-right: 0; }
  .estampa { top: 44px; right: 30px; }
  .ficha { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 26px; }
}
@media (max-width: 560px) {
  main { padding-top: 16px; padding-bottom: 20px; }
  .certificado { padding: 24px 22px 24px; }
  .casa img { width: 88px; height: 88px; }
  .estampa { top: 34px; right: 20px; padding: 6px 10px 5px; }
  .estampa b { letter-spacing: 0.09em; }
  .accion { flex-direction: column; align-items: stretch; }
  .boton { width: 100%; }
  .nota { text-align: center; }
}

@media (max-width: 350px) {
  .certificado { padding-inline: 18px; }
  .casa img { width: 72px; height: 72px; }
  h1 { font-stretch: 88%; }
  .ficha { gap: 0 14px; }
  dd { font-size: 0.9375rem; font-stretch: 100%; }
  .estampa { right: 14px; padding: 5px 8px 4px; }
  .estampa b { letter-spacing: 0.05em; }
}

@media (prefers-reduced-motion: reduce) {
  .estampa { animation: none; }
  .boton { transition: none; }
}
