/* La Tarjeta Viva de GRAFIA (index.html). Colores y letra del sitio: fondo #071015, luz #FBBA00,
   Montserrat. Sin fundidos: lo que aparece llega de golpe. */
@font-face { font-family: "Montserrat"; src: url("/assets/fonts/montserrat-var.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
:root { --luz: #FBBA00; --tinta: #F2F1EE; --tenue: #A7ADB2; --fondo: #071015; }
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; background: var(--fondo); color: var(--tinta); font-family: "Montserrat", system-ui, sans-serif; overflow: hidden; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

.ta { position: fixed; inset: 0; }
.ta__escena { position: absolute; inset: 0; overflow: hidden; touch-action: none; }
/* MindAR mete su <video> y su <canvas> aquí: los dos a pantalla completa */
.ta__escena video, .ta__escena canvas { position: absolute !important; }
/* plan B: el cuarto de la escena, desenfocado, detrás de la tarjeta virtual */
.ta.sin-camara .ta__escena { background: radial-gradient(90% 70% at 50% 60%, rgba(251,186,0,.10), transparent 60%),
  url("/assets/video/escena-llega-960.webp") center / cover; }
.ta.sin-camara .ta__escena::before { content: ""; position: absolute; inset: 0; backdrop-filter: blur(16px) brightness(.4); -webkit-backdrop-filter: blur(16px) brightness(.4); }

/* LA MIRA: las cuatro esquinas de la tarjeta y su miniatura, para que se sepa qué buscar */
.ta__busca { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 18px; pointer-events: none; }
.ta__mira { position: relative; width: min(74vw, 340px); aspect-ratio: 9 / 5.5; }
.ta__mira img { position: absolute; inset: 22%; width: 56%; height: 56%; object-fit: cover; opacity: .55; }
.ta__mira span { position: absolute; width: 26px; height: 26px; border: 3px solid var(--luz); }
.ta__mira span:nth-child(1) { left: 0; top: 0; border-right: 0; border-bottom: 0; }
.ta__mira span:nth-child(2) { right: 0; top: 0; border-left: 0; border-bottom: 0; }
.ta__mira span:nth-child(3) { left: 0; bottom: 0; border-right: 0; border-top: 0; }
.ta__mira span:nth-child(4) { right: 0; bottom: 0; border-left: 0; border-top: 0; }
@media (prefers-reduced-motion: no-preference) { .ta__mira { animation: late 1.2s steps(2) infinite; } }
@keyframes late { 50% { scale: 1.04; } }
.ta__busca p { padding: 8px 14px; background: rgba(7,16,21,.72); font-size: 15px; font-weight: 600; }
.ta__busca .ta__link { pointer-events: auto; }

.ta__pista { position: absolute; left: 50%; bottom: max(78px, calc(env(safe-area-inset-bottom) + 66px)); translate: -50% 0; padding: 8px 14px;
  width: max-content; max-width: calc(100% - 32px); background: rgba(7,16,21,.72); font-size: 12px; line-height: 1.5; letter-spacing: .04em;
  text-align: center; pointer-events: none; }
.ta__barra { position: absolute; left: 0; right: 0; bottom: max(18px, env(safe-area-inset-bottom)); display: flex; justify-content: center; gap: 10px; }
.ta__web, .ta__mini { padding: 10px 14px; background: rgba(7,16,21,.78); border: 0; border-top: 1px solid var(--luz); color: var(--tinta);
  font: 600 12px "Montserrat", sans-serif; letter-spacing: .08em; cursor: pointer; }
.ta__mini { font-size: 16px; line-height: 1; padding: 8px 14px; }

/* LA ENTRADA */
.ta__entrada { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 16px; padding: 32px 24px; text-align: center;
  background: radial-gradient(120% 80% at 50% 30%, rgba(251,186,0,.12), transparent 60%), var(--fondo); }
.ta__logo { width: 170px; height: auto; }
.ta__entrada h1 { font-size: 30px; font-weight: 300; line-height: 1.1; letter-spacing: -.02em; }
.ta__entrada h1 b { font-weight: 700; color: var(--luz); }
.ta__entrada p { font-size: 14px; line-height: 1.5; color: var(--tenue); max-width: 30ch; }
.ta__abrir { margin-top: 6px; padding: 16px 30px; border: 0; background: var(--tinta); color: #0b1418; font: 700 15px "Montserrat", sans-serif;
  cursor: pointer; box-shadow: 0 0 34px rgba(251,186,0,.45); }
.ta__link { padding: 10px; border: 0; background: none; color: var(--tenue); font: 600 13px "Montserrat", sans-serif; text-decoration: underline; cursor: pointer; }
.ta__entrada small { font-size: 11px; color: #6f777c; max-width: 32ch; line-height: 1.5; }
.ta__carga { color: var(--luz) !important; font-weight: 600; }

.ta__texto { display: grid; gap: 16px; justify-items: center; }
.ta__texto .ta__abrir { width: min(100%, 300px); }

/* CON WEBXR (Android): la cámara la pinta el sistema; la página es solo la capa de los botones, transparente */
.ta.con-xr, .ta.con-xr .ta__escena { background: transparent; }
.ta.con-xr .ta__escena canvas { visibility: hidden; }

/* SIN TARJETA: la indicación y el botón de colocar */
.ta__mesa { position: absolute; left: 50%; top: max(24px, env(safe-area-inset-top)); translate: -50% 0; max-width: calc(100% - 32px);
  padding: 10px 16px; background: rgba(7,16,21,.78); border-top: 1px solid var(--luz); font-size: 13px; font-weight: 600; text-align: center; }
.ta__colocar { position: absolute; left: 50%; bottom: max(84px, calc(env(safe-area-inset-bottom) + 72px)); translate: -50% 0;
  padding: 16px 30px; border: 0; background: var(--tinta); color: #0b1418; font: 700 15px "Montserrat", sans-serif; cursor: pointer;
  box-shadow: 0 0 34px rgba(251,186,0,.45); }
.ta__colocar:disabled { opacity: .45; box-shadow: none; }
.ta__abrir--2 { margin-top: 0; background: transparent; color: var(--tinta); border: 1px solid rgba(242,241,238,.5); box-shadow: none; }

/* EN EL COMPUTADOR: la tarjeta en grande (es el marcador y trae su QR). En el teléfono no aparece: ahí están
   los dos botones de la cámara. */
.ta__escritorio { display: none; }
@media (min-width: 900px) and (hover: hover) and (pointer: fine) {
  .ta__entrada { grid-template-columns: minmax(0, 340px) minmax(0, 860px); place-content: center; align-items: center;
    column-gap: clamp(40px, 5vw, 88px); text-align: left; justify-items: start; }
  .ta__texto { justify-items: start; }
  .ta__abrir { display: none; }
  .ta__escritorio { display: block; width: 100%; }
  .ta__escritorio img { display: block; width: 100%; height: auto; box-shadow: 0 30px 60px -20px rgba(0,0,0,.8); }
  .ta__escritorio figcaption { margin-top: 16px; font-size: 13px; line-height: 1.6; color: var(--tenue); }
  .ta__escritorio b { display: inline-grid; place-items: center; width: 22px; height: 22px; margin: 0 6px 0 14px;
    background: var(--luz); color: #0b1418; font-size: 12px; }
  .ta__escritorio b:first-child { margin-left: 0; }
}
