/* marca.css — componentes del lenguaje visual de Método L.I.D.E.R.A.™
   Portados de los prototipos de Majo (lidera-ingresar / lidera-accesos /
   lidera-inicio / lidera-sesiones), que repiten los mismos gestos en las 5 pantallas.

   Requiere tokens.css cargado antes. Ninguna regla de acá define un color suelto.

   Se carga DESPUÉS de base.css y ANTES de las hojas específicas de cada pantalla. */

/* ============================================================
   1. FILETE DORADO CON ROMBO
   El separador firma del método. Aparece en las 4 pantallas de Majo.
   Uso: <div class="filete" aria-hidden="true"><i></i><span></span><i></i></div>
   ============================================================ */
.filete {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: var(--space-5) 0;
}
.filete i {
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, rgba(161, 122, 60, 0.5), transparent);
}
.filete i:first-child {
  flex: none;
  width: 46px;
  background: linear-gradient(90deg, var(--gold), rgba(161, 122, 60, 0.5));
}
.filete span {
  width: 5px;
  height: 5px;
  flex: none;
  background: var(--gold);
  transform: rotate(45deg);
}

/* Variante centrada del login: se traza desde el centro hacia afuera. */
.filete--centrado {
  justify-content: center;
  gap: 12px;
  width: 190px;
  margin-left: auto;
  margin-right: auto;
}
.filete--centrado i:first-child {
  flex: 1;
  width: auto;
  background: linear-gradient(90deg, transparent, var(--gold));
}
.filete--centrado i:last-child {
  background: linear-gradient(90deg, var(--gold), transparent);
}

/* ============================================================
   2. MUESCA / ARCO DORADO
   El mismo gesto del arco del logo, en miniatura, en la esquina superior
   derecha de las tarjetas de acceso.
   Uso: agregar la clase .con-muesca a la tarjeta.
   ============================================================ */
.con-muesca {
  position: relative;
  overflow: hidden;
}
.con-muesca::before {
  content: "";
  position: absolute;
  top: -18px;
  right: -18px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(161, 122, 60, 0.35);
  pointer-events: none;
}

/* ============================================================
   3. CABECERA CON DEGRADADO
   ============================================================ */
.cabecera-marca {
  background: var(--header-gradient);
  color: var(--cream);
}
.cabecera-marca h1,
.cabecera-marca h2 {
  font-family: var(--font-heading);
  font-weight: 500;
  color: var(--cream);
  margin: 0;
}
.cabecera-marca .seccion {
  display: block;
  margin-top: 5px;
  /* Accesibilidad: el prototipo usa 10.5px; se sube al piso legible. */
  font-size: var(--font-min-nav);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-light);
}

/* ============================================================
   4. TIPOGRAFÍA EDITORIAL DE PANTALLA
   eyebrow → título → bajada, el trío que abre cada pantalla de Majo.
   ============================================================ */
.eyebrow {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}
.titulo-pantalla {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 29px;
  line-height: 1.12;
  color: var(--burgundy);
  margin: 7px 0 0;
}
.bajada {
  margin: 8px 0 0;
  font-size: var(--font-min-body);
  font-weight: 300;
  line-height: 1.55;
  /* Accesibilidad: el prototipo usa .6; se sube al piso legible. */
  color: var(--text-soft);
}

/* ============================================================
   5. ENLACE "VOLVER"
   Majo lo agregó a propósito en Sesiones: las pantallas se abren desde
   Accesos y no había forma de volver sin el gesto del navegador.
   Accesibilidad: el prototipo no tenía padding — se le da área táctil real.
   ============================================================ */
.volver {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 400;
  color: var(--text-soft);
  text-decoration: none;
  margin-bottom: var(--space-4);
  padding: 10px 10px 10px 0;
  min-height: var(--touch-min);
  transition: color var(--transition-suave);
}
.volver svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.volver:hover { color: var(--burgundy); }

/* ============================================================
   6. BOTÓN ICÓNICO DE CABECERA (salir)
   Accesibilidad: el prototipo lo tenía en 40×40; el mínimo táctil es 44×44.
   ============================================================ */
.btn-icono-cabecera {
  flex: none;
  width: var(--touch-min);
  height: var(--touch-min);
  display: grid;
  place-items: center;
  border: 1px solid rgba(201, 164, 92, 0.35);
  border-radius: 11px;
  background: transparent;
  color: var(--cream);
  cursor: pointer;
  transition: background var(--transition-suave), border-color var(--transition-suave);
}
.btn-icono-cabecera svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.btn-icono-cabecera:hover {
  background: rgba(201, 164, 92, 0.14);
  border-color: var(--gold-light);
}

/* ============================================================
   7. ANIMACIONES DE ENTRADA
   Las tarjetas asoman escalonadas. Los delays se aplican con
   --delay-index en el elemento, para no escribir una regla por posición.
   ============================================================ */
@keyframes asomar {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@keyframes aparecer {
  to { opacity: 1; }
}
@keyframes subir {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes trazar {
  to { transform: scaleX(1); }
}

.asoma {
  animation: asomar 0.5s cubic-bezier(0.22, 0.7, 0.3, 1) both;
  animation-delay: calc(var(--delay-index, 0) * 0.06s);
}

/* ============================================================
   8. ACCESIBILIDAD TRANSVERSAL
   ============================================================ */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Todo lo animado se apaga si la persona pidió menos movimiento. */
@media (prefers-reduced-motion: reduce) {
  .asoma,
  .filete i,
  [class*="anim-"] {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   8b. AVISO DE RESULTADO DE GUARDADO
   Se queda hasta el próximo guardado; no es un flash de 2 segundos.
   ============================================================ */
.dp-aviso {
  border-radius: 12px;
  padding: 12px 14px;
  font-size: var(--font-min-body);
  line-height: 1.5;
  margin-bottom: var(--space-4);
}
.dp-aviso--ok {
  background: rgba(59, 109, 17, 0.1);
  border-left: 3px solid var(--success);
  color: var(--text-body);
}
.dp-aviso--error {
  background: var(--danger-bg);
  border-left: 3px solid var(--danger);
  color: var(--danger);
}

/* ============================================================
   9. MARCO MÓVIL
   Los prototipos son mobile-first con un lienzo de 430px centrado sobre
   el burdeos hondo.
   ============================================================ */
.marco-telefono {
  width: 100%;
  max-width: var(--max-width-phone);
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--cream);
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Firma del manual y de la página pública. */
.firma-david { display: block; margin-top: 18px; font-size: 12px; opacity: .85; }
