/* ═══════════════════════════════════════════════
   POSTELUZ — ar.css
   Estilos específicos de la página de AR.
   Siempre cargar DESPUÉS de global.css.
   ═══════════════════════════════════════════════ */

/* ───────────────────────────────────────────────
   OVERRIDE BASE para página AR
   La página AR necesita ocupar toda la pantalla
   sin scroll — diferente al resto del sitio.
─────────────────────────────────────────────── */
html, body {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: transparent !important;
  background-color: transparent !important;
}

/* ───────────────────────────────────────────────
   PANTALLA DE INICIO — UI OVERLAY
─────────────────────────────────────────────── */
#ui-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--teal-deep);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.ar-start-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 320px;
  gap: 1.2rem;
}

.ar-start-logo {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 300;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 0.5rem;
}

.ar-start-logo span {
  color: var(--gold);
}

.ar-illus-name {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 300;
  font-style: italic;
  color: var(--white);
  line-height: 1.2;
}

.ar-start-instruction {
  font-size: 0.75rem;
  line-height: 1.8;
  color: var(--white-50);
  letter-spacing: 0.05em;
}

.ar-start-instruction strong {
  color: var(--white);
  font-weight: 400;
}

/* Icono de cámara/escaneo */
.ar-scan-icon {
  width: 64px;
  height: 64px;
  border: 1px solid var(--white-20);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0.5rem 0;
  animation: breathe 3s ease-in-out infinite;
}

.ar-scan-icon svg {
  width: 28px;
  height: 28px;
  color: var(--gold);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
}

@keyframes breathe {
  0%, 100% { transform: scale(1);   border-color: var(--white-20); }
  50%       { transform: scale(1.05); border-color: rgba(240,192,64,0.4); }
}

/* Botón activar */
#activate-btn {
  width: 100%;
  padding: 1rem 2rem;
  background: var(--gold);
  color: var(--ink);
  border: none;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity var(--transition), transform 0.15s;
  margin-top: 0.5rem;
}

#activate-btn:hover   { opacity: 0.9; }
#activate-btn:active  { transform: scale(0.98); }

/* Link volver */
.ar-back-link {
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--white-50);
  transition: color var(--transition);
  margin-top: 0.5rem;
}

.ar-back-link:hover { color: var(--white); }

/* ───────────────────────────────────────────────
   LOADING OVERLAY
─────────────────────────────────────────────── */
#loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(6, 14, 13, 0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 1px solid var(--white-20);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

#loading-overlay p {
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--white-50);
}

/* ───────────────────────────────────────────────
   HUD — interfaz mínima durante AR activo
─────────────────────────────────────────────── */
#ar-hud {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  pointer-events: none;
  background: linear-gradient(to top, rgba(6,14,13,0.6) 0%, transparent 100%);
}

#ar-hud.hidden { display: none; }

.hud-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 300;
  font-style: italic;
  color: var(--white);
  text-shadow: 0 1px 8px rgba(0,0,0,0.5);
}

.hud-badge {
  font-size: 0.55rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* ───────────────────────────────────────────────
   A-FRAME CANVAS
─────────────────────────────────────────────── */
a-scene {
  position: fixed;
  inset: 0;
  z-index: 1;
}

/* ───────────────────────────────────────────────
   MINDAR VIEWER — ocupa toda la pantalla
─────────────────────────────────────────────── */
mindar-viewer {
  position: fixed;
  inset: 0;
  z-index: 1;
  width: 100vw;
  height: 100vh;
}
