/* ===============================================================
   Base de la página sobre la cámara y pantalla de arranque.
   El video de la cámara va detrás de todo (lo pone MindAR): el
   fondo del body pasa al lienzo, así que el video queda encima.
   =============================================================== */

:root {
    --ar-text:   #f5f5f7;
    --ar-text-2: rgba(245, 245, 247, 0.62);
    --ar-edge:   rgba(255, 255, 255, 0.16);
    --ar-accent: #d05716;
    --ar-ease:   cubic-bezier(0.32, 0.72, 0, 1);
}

* , *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; }

body {
    margin: 0;
    overflow: hidden;
    background: #000;
    font-family: "Archivo", ui-sans-serif, system-ui, sans-serif;
    font-variation-settings: "wdth" 100;
    color: var(--ar-text);
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

.a-enter-vr, .a-orientation-modal { display: none !important; }

/* --- Arranque: cubre la pantalla mientras se pide la cámara ----- */

.ar-boot {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 60;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 18px;
    padding: 24px;
    background: #06111d;
    text-align: center;
    transition: opacity 0.6s var(--ar-ease), visibility 0.6s;
}

.ar-boot[hidden] { display: grid !important; opacity: 0; visibility: hidden; pointer-events: none; }

.ar-boot p { margin: 0; font-size: 0.9375rem; color: var(--ar-text-2); max-width: 30ch; line-height: 1.45; }
/* los pasos del arranque de la cámara, en chico: sirven para saber dónde se detuvo */
.ar-boot .ar-boot-detail { max-width: 42ch; margin-top: 6px; font-size: 0.6875rem; line-height: 1.4; opacity: 0.6; }

.ar-boot .ar-boot-title {
    font-size: 1.25rem;
    font-variation-settings: "wdth" 112, "wght" 700;
    letter-spacing: -0.02em;
    color: var(--ar-text);
}

/* Cuando la cámara no abre: siempre dos caminos (reintentar o ver el mapa 2D sin cámara). */
.ar-boot-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 4px; }

.ar-boot-actions a,
.ar-boot-actions button {
    display: inline-flex;
    align-items: center;
    height: 46px;
    padding: 0 22px;
    border: 0;
    border-radius: 999px;
    font: inherit;
    font-size: 0.9375rem;
    font-variation-settings: "wdth" 100, "wght" 600;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: filter 0.2s linear, transform 0.35s var(--ar-ease);
}

.ar-boot-actions .is-primary { background: var(--ar-accent); color: #fff; }

.ar-boot-actions .is-quiet {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--ar-edge);
    color: var(--ar-text);
}

.ar-boot-actions a:active, .ar-boot-actions button:active { transform: scale(0.95); filter: brightness(1.08); }

/* Único movimiento no provocado por el usuario en estas pantallas:
   señala que el sistema está trabajando, no decora. */
.ar-boot-dots { display: flex; gap: 7px; }
.ar-boot-dots i {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--ar-text-2);
    animation: ar-pulse 1.25s var(--ar-ease) infinite;
}
.ar-boot-dots i:nth-child(2) { animation-delay: 0.14s; }
.ar-boot-dots i:nth-child(3) { animation-delay: 0.28s; }

@keyframes ar-pulse {
    0%, 70%, 100% { opacity: 0.28; transform: scale(0.82); }
    35%           { opacity: 1;    transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    .ar-boot-dots i { animation: none; opacity: 0.6; }
}
