/* tarjeta.css — la tarjeta digital del consejo.
 *
 * Los colores son los de la marca (servidor/web/css/sitio.css), copiados como
 * valores y no importados: esta hoja vive embebida en el binario y aquella en
 * disco, y una página pública de una sola vista no debe cargar las 800 líneas
 * del sitio para usar seis colores.
 *
 * `[hidden]` va primero y con !important: el atributo equivale a un
 * `display:none` del navegador que cualquier regla con `display` pisa en
 * silencio (lección del 2026-09-18, dos veces el mismo día).
 */
[hidden] { display: none !important; }

@font-face {
  font-family: "Fraunces";
  src: url("/fuentes/fraunces-var.woff2") format("woff2-variations");
  font-weight: 300 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Plex Sans";
  src: url("/fuentes/plexsans-var.woff2") format("woff2-variations");
  font-weight: 300 700; font-style: normal; font-display: swap;
}

:root {
  --noche: #0a3f5f;
  --noche-hondo: #062c44;
  --dorado: #d6a83f;
  --dorado-claro: #e8c46a;
  --celeste: #42c2f3;
  --blanco: #ffffff;
  --tenue: #b9c9d4;
  --cuadro: rgba(255, 255, 255, .06);
  --borde: rgba(214, 168, 63, .45);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
.tj-fondo {
  min-height: 100vh;
  background: radial-gradient(120% 80% at 50% 0%, #0f4f76 0%, var(--noche-hondo) 60%, #041d2e 100%);
  color: var(--blanco);
  font-family: "Plex Sans", system-ui, sans-serif;
  padding: 16px;
  display: flex; justify-content: center; align-items: flex-start;
}

.tj {
  width: 100%; max-width: 440px;
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.02));
  border: 1px solid var(--borde);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.6);
}

.tj__cabeza { display: flex; gap: 14px; padding: 16px 16px 8px; align-items: stretch; }
.tj__foto {
  width: 44%; max-width: 180px; height: auto; aspect-ratio: 1;
  object-fit: cover; border-radius: 16px; border: 2px solid var(--dorado);
  flex-shrink: 0;
}
/* El logotipo de un negocio no se recorta como un retrato: entero, sobre
   blanco, con aire alrededor (cualquier forma de logo cabe). */
.tj__logo { object-fit: contain; background: #fff; padding: 10px; }
.tj__quien { display: flex; flex-direction: column; min-width: 0; }
.tj__nombre {
  font-family: "Fraunces", Georgia, serif; font-weight: 600;
  font-size: 1.55rem; line-height: 1.1; margin: 2px 0 6px;
}
.tj__marca {
  margin: 0 0 auto; color: var(--dorado); font-size: .64rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; line-height: 1.4;
}
.tj__cargo {
  margin: 12px 0 2px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.14);
  font-size: .82rem; font-weight: 600;
}
.tj__area, .tj__ciudad { margin: 2px 0; color: var(--tenue); font-size: .76rem; line-height: 1.35; }
.tj__ciudad { display: flex; align-items: center; gap: 4px; }
.tj__ciudad .ti { width: 13px; height: 13px; }

.tj__principal { padding: 10px 16px 4px; display: grid; gap: 10px; }
.tj-boton {
  display: flex; justify-content: center; align-items: center; gap: 10px;
  min-height: 54px; border-radius: 14px; text-decoration: none;
  font-weight: 700; font-size: 1.02rem;
}
.tj-boton--lleno {
  background: linear-gradient(90deg, var(--dorado-claro), var(--dorado));
  color: #2b1f05; box-shadow: 0 10px 24px -12px rgba(214,168,63,.8);
}
.tj-boton--borde { border: 1.5px solid var(--dorado); color: var(--dorado-claro); }
.tj-boton:focus-visible, .tj-cuadro:focus-visible, .tj-chico:focus-visible {
  outline: 3px solid var(--celeste); outline-offset: 2px;
}
.tj__pista { margin: 2px 0 6px; text-align: center; color: var(--tenue); font-size: .74rem; font-style: italic; }

.tj__rejilla { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 10px 16px 16px; }
.tj-cuadro {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 16px 8px; border-radius: 14px; background: var(--cuadro);
  color: var(--blanco); text-decoration: none; text-align: center; min-width: 0;
}
/* Con número impar de cuadros (sin LinkedIn, o sin teléfono) el último
 * ocupa la fila entera en vez de quedarse solo a media fila. La plantilla
 * NO pinta los cuadros ausentes, así que :nth-child cuenta sólo los reales. */
.tj-cuadro:last-child:nth-child(odd) { grid-column: 1 / -1; }
.tj-cuadro .ti {
  width: 36px; height: 36px; padding: 9px; border-radius: 50%;
  background: rgba(214,168,63,.22); color: var(--dorado-claro);
}
.tj-cuadro__rotulo { font-size: .66rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--tenue); }
.tj-cuadro__dato { font-size: .84rem; font-weight: 600; overflow-wrap: anywhere; }

.tj__compartir { border-top: 1px solid rgba(255,255,255,.1); padding: 16px; }
.tj__rotulo {
  margin: 0 0 12px; text-align: center; color: var(--dorado);
  font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
}
.tj__dos { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tj-chico {
  display: flex; justify-content: center; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 10px; border-radius: 10px; border: 0;
  background: var(--cuadro); color: var(--blanco); font: inherit;
  font-size: .88rem; font-weight: 600; text-decoration: none; cursor: pointer;
}
.tj-chico .ti { width: 16px; height: 16px; }
.tj-chico--dorado { background: rgba(214,168,63,.2); color: var(--dorado-claro); }

.tj__qr { margin-top: 8px; }
.tj__qr summary { list-style: none; }
.tj__qr summary::-webkit-details-marker { display: none; }
.tj__qr img {
  display: block; width: 100%; max-width: 320px; height: auto;
  margin: 14px auto 0; border-radius: 12px; background: #fff;
}

.tj__pie {
  display: flex; justify-content: center; align-items: center; gap: 8px;
  padding: 12px; border-top: 1px solid rgba(255,255,255,.1);
  color: var(--tenue); font-size: .74rem;
}

@media (max-width: 360px) {
  .tj__cabeza { flex-direction: column; align-items: center; text-align: center; }
  .tj__foto { width: 70%; }
  .tj__ciudad { justify-content: center; }
}
