/* ───────── Aviso de privacidad — visor de consulta ───────── */

.aviso-body {
  background: var(--paper-2);
  color: var(--ink);
  font-family: "Space Grotesk", system-ui, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Bloquea selección y el menú de "guardar" del móvil en todo el documento */
.aviso-body,
.av-doc,
.av-pg {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}
/* ...menos donde sí hace falta poder copiar */
.av-note, .av-note a, .av-back, .av-foot { -webkit-user-select: text; user-select: text; }

/* ── Barra superior ── */
.av-bar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem var(--pad);
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.av-brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  text-decoration: none; color: var(--ink);
  font-weight: 700; letter-spacing: 0.04em; font-size: 0.9rem;
}
.av-logo { height: 30px; width: auto; }
.av-back {
  font-family: "Space Mono", monospace;
  font-size: 0.78rem; letter-spacing: 0.04em;
  color: var(--steel); text-decoration: none;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 2px;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.av-back:hover { background: var(--steel); color: #fff; border-color: var(--steel); }

/* ── Encabezado ── */
.av-main { flex: 1; padding: clamp(2rem, 6vw, 4rem) var(--pad) 3rem; }
.av-head { max-width: 820px; margin: 0 auto clamp(1.5rem, 4vw, 2.5rem); }
.av-kicker {
  font-family: "Space Mono", monospace;
  font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 0.6rem;
}
.av-head h1 {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 700; letter-spacing: -0.02em;
  margin: 0 0 0.7rem; line-height: 1.05;
}
.av-sub { margin: 0; color: var(--ink-3); font-size: 0.95rem; line-height: 1.6; max-width: 62ch; }

/* Pista de zoom: solo tiene sentido en pantallas táctiles angostas */
.av-hint { display: none; }
@media (max-width: 760px) and (pointer: coarse) {
  .av-hint {
    display: flex; align-items: center; gap: 0.5rem;
    margin: 1rem 0 0;
    font-family: "Space Mono", monospace;
    font-size: 0.72rem; letter-spacing: 0.03em;
    color: var(--ink-3);
  }
  .av-hint::before {
    content: ""; flex: none;
    width: 14px; height: 14px;
    border: 1.5px solid var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(255,107,26,0.15);
  }
}

/* ── El documento ── */
.av-doc {
  position: relative;
  max-width: 820px; margin: 0 auto;
  display: flex; flex-direction: column; gap: clamp(0.8rem, 2vw, 1.4rem);
}
.av-pg {
  aspect-ratio: 612 / 792;
  background: #fff center top / 100% auto no-repeat;
  border: 1px solid var(--line);
  box-shadow: 0 2px 16px rgba(15,22,32,0.07);
  border-radius: 2px;
}
.av-pg.is-idle {
  background-image: none;
  display: grid; place-items: center;
}
.av-pg.is-idle::after {
  content: "";
  width: 26px; height: 26px;
  border: 2px solid var(--line);
  border-top-color: var(--steel);
  border-radius: 50%;
  animation: av-spin .8s linear infinite;
}
@keyframes av-spin { to { transform: rotate(360deg); } }

/* Capa transparente encima: intercepta arrastres y pulsaciones largas */
.av-shield {
  position: absolute; inset: 0;
  z-index: 5;
  background: transparent;
  pointer-events: auto;
}

/* ── Nota al pie ── */
.av-note {
  max-width: 820px; margin: clamp(1.5rem, 4vw, 2.5rem) auto 0;
  padding: 1rem 1.2rem;
  background: #fff;
  border-left: 3px solid var(--accent);
  font-size: 0.88rem; line-height: 1.65; color: var(--ink-2);
}
.av-note a { color: var(--steel); font-weight: 600; }

.av-foot {
  padding: 1.5rem var(--pad);
  border-top: 1px solid var(--line);
  text-align: center;
  font-family: "Space Mono", monospace;
  font-size: 0.72rem; letter-spacing: 0.06em;
  color: var(--ink-3);
}

/* ── Al imprimir no se entrega el documento ── */
@media print {
  .av-doc, .av-shield, .av-bar { display: none !important; }
  .aviso-body::before {
    content: "El aviso de privacidad de Insumos Matesismex es de consulta en pantalla. Para solicitar una copia escriba a administracion@matesismex.mx";
    display: block; padding: 3rem; font-size: 14pt; line-height: 1.6;
  }
}

@media (max-width: 560px) {
  .av-bar { padding-inline: 1rem; }
  .brand-txt, .av-brand span { font-size: 0.8rem; }
}
