/* ============================================================
   Realidad aumentada · Trimble SiteVision
   Marco tipo tablet para las capturas de AR grabadas en faena.
   Las capturas conservan la interfaz de la app a propósito: es la
   prueba de que son reales y no un render.
   ============================================================ */

.ar-device {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 10px;
  background: linear-gradient(160deg, var(--graphite-800), var(--graphite-950));
  border: 1px solid var(--hairline-hi);
  box-shadow: var(--shadow-lg);
}
/* filo superior: da el volumen de carcasa sin dibujar un marco literal */
.ar-device::before {
  content: "";
  position: absolute;
  inset: 1px 1px auto;
  height: 1px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  pointer-events: none;
}
.ar-device__screen {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: calc(var(--radius-lg) - 5px);
  background: #000;
  aspect-ratio: 4 / 3;
}
.ar-device__screen video,
.ar-device__screen img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ar-device--square .ar-device__screen { aspect-ratio: 1 / 1; }
.ar-device--wide   .ar-device__screen { aspect-ratio: 620 / 296; }
/* captura vertical: no debe estirarse a todo el ancho de la columna */
.ar-device--reel { width: min(100%, 380px); margin-inline: auto; }
.ar-device--reel .ar-device__screen { aspect-ratio: 694 / 1280; }

/* Toma de cámara: alguien filma a quien sostiene el iPad, así que se ven a la
   vez la pantalla y la faena. No lleva carcasa de tablet — sería un tablet
   dentro de un tablet. */
.ar-device--field {
  width: min(100%, 400px);
  margin-inline: auto;
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
}
.ar-device--field::before { content: none; }
.ar-device--field .ar-device__screen {
  aspect-ratio: 478 / 850;
  border-radius: var(--radius-md);
  border: 1px solid var(--hairline-hi);
  box-shadow: var(--shadow-lg);
}

/* etiqueta flotante sobre la pantalla */
.ar-device__tag {
  position: absolute;
  left: var(--space-4);
  top: var(--space-4);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-tech);
  text-transform: uppercase;
  color: var(--text-hi);
  background: rgba(11, 13, 15, 0.72);
  border: 1px solid var(--hairline-hi);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.ar-device__tag b { color: var(--cat-yellow); font-weight: 700; }
.ar-device__tag::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 0 rgba(180, 224, 74, 0.6);
  animation: ar-pulse 2.4s var(--ease-out) infinite;
}
@keyframes ar-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(180, 224, 74, 0.55); }
  70%  { box-shadow: 0 0 0 9px rgba(180, 224, 74, 0); }
  100% { box-shadow: 0 0 0 0 rgba(180, 224, 74, 0); }
}

/* pie técnico bajo el marco */
.ar-device__cap {
  margin: var(--space-3) 0 0;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-tech);
  text-transform: uppercase;
  color: var(--text-lo);
}

@media (prefers-reduced-motion: reduce) {
  .ar-device__tag::before { animation: none; }
}
@media (max-width: 680px) {
  .ar-device { padding: 7px; }
  .ar-device--field { padding: 0; }
  .ar-device__tag { font-size: 9px; padding: 4px 7px; letter-spacing: 0.12em; }
  .ar-device--reel { width: min(100%, 300px); }
}

/* ── Panel destacado: la toma desde afuera ─────────────────────────── */
.ar-outside {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(24px, 3vw, 48px);
  align-items: center;
  padding: clamp(20px, 2.6vw, 40px);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(900px 420px at 88% -20%, rgba(255, 205, 17, 0.07), transparent 62%),
    var(--surface-1);
}
@media (min-width: 900px) {
  .ar-outside { grid-template-columns: minmax(0, 400px) minmax(0, 1fr); }
}
.split + .ar-outside { margin-top: var(--space-8); }

/* ── Franja de capacidades de la herramienta ───────────────────────── */
.ar-caps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-top: clamp(24px, 3vw, 40px);
}
.ar-caps__cell {
  background: var(--surface-1);
  padding: clamp(18px, 2.2vw, 26px);
}
.ar-caps__key {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-tech);
  text-transform: uppercase;
  color: var(--cat-yellow);
  margin-bottom: var(--space-3);
}
.ar-caps__val {
  margin: 0;
  color: var(--text-md);
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
}
