/* Estilo M.A.F. · Ismael Segura
   Hoja común para web, landing, panel, cuestionarios, materiales y plantillas.
   Sale del cuestionario M.A.F. y de las infografías de Ismael (oct 2026).
   Si cambia un color o una letra, se cambia aquí y cambia en todo. */

/* ---------- Letras ---------- */
@font-face { font-family: "Cinzel"; src: url("../fonts/cinzel-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Cinzel"; src: url("../fonts/cinzel-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Cinzel"; src: url("../fonts/cinzel-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Lora"; src: url("../fonts/lora-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Lora"; src: url("../fonts/lora-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Lora"; src: url("../fonts/lora-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Lora"; src: url("../fonts/lora-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Great Vibes"; src: url("../fonts/great-vibes-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }

/* ---------- Colores y medidas ---------- */
:root {
  /* Negros */
  --maf-negro: #050301;        /* fondo de infografías y portadas (el mismo del escudo) */
  --maf-negro-banda: #111110;  /* banda de cabecera del cuestionario */
  --maf-negro-alto: #1A1813;   /* superficies sobre negro */

  /* Oros. Sobre negro todos valen para texto. */
  --maf-oro-claro: #F8D890;    /* arriba del degradado y brillos */
  --maf-oro: #E6B45A;          /* oro de texto y líneas sobre negro */
  --maf-oro-fuerte: #E0A040;   /* abajo del degradado */
  --maf-oro-linea: #E9CB8C;    /* recuadros finos */
  --maf-degradado: linear-gradient(180deg, #F8D890 0%, #ECC070 45%, #E0A040 100%);

  /* Sobre crema el oro solo va en detalles. Para texto dorado, --maf-oro-crema. */
  --maf-oro-plano: #B88A3E;    /* círculos, números y barras (2,8:1, nunca texto) */
  --maf-oro-crema: #8A6528;    /* texto dorado sobre crema (4,7:1) */

  /* Claros */
  --maf-crema: #F6F2E7;        /* páginas para leer */
  --maf-linea-crema: #D9D0C0;  /* líneas y pistas sobre crema */
  --maf-blanco: #F5F2EC;       /* texto sobre negro */
  --maf-texto: #111110;        /* texto sobre crema */
  --maf-texto-suave: #5E584D;  /* texto secundario sobre crema (6,3:1) */
  --maf-gris-noche: #B9B1A3;   /* texto secundario sobre negro (9,7:1) */

  --maf-titulo: "Cinzel", "Trajan Pro", Georgia, serif;
  --maf-texto-fuente: "Lora", Georgia, "Times New Roman", serif;
  --maf-manuscrita: "Great Vibes", "Snell Roundhand", cursive;

  --maf-radio: 16px;
  --maf-linea-fina: 1.5px;
}

/* ---------- Temas ---------- */
.maf-noche { background: var(--maf-negro); color: var(--maf-blanco); font-family: var(--maf-texto-fuente); }
.maf-crema { background: var(--maf-crema); color: var(--maf-texto); font-family: var(--maf-texto-fuente); }

/* ---------- Títulos ---------- */
.maf-titulo {
  font-family: var(--maf-titulo); font-weight: 700; text-transform: uppercase;
  letter-spacing: .02em; line-height: 1.02; margin: 0;
  color: var(--maf-oro);
  background: var(--maf-degradado); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.maf-crema .maf-titulo { background: none; -webkit-text-fill-color: currentColor; color: var(--maf-texto); }
.maf-titulo-blanco { background: none; -webkit-text-fill-color: currentColor; color: var(--maf-blanco); }
.maf-apartado { font-family: var(--maf-titulo); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--maf-oro); margin: 0 0 .3em; }
.maf-crema .maf-apartado { color: var(--maf-oro-crema); }

/* Subtítulo en versalitas espaciadas: MENTALIDAD · ALIMENTACIÓN */
.maf-versalitas { font-family: var(--maf-titulo); font-weight: 400; text-transform: uppercase; letter-spacing: .28em; font-size: .82em; }

/* Frase manuscrita de acento: «Se trata de ver más.» */
.maf-manuscrita { font-family: var(--maf-manuscrita); font-weight: 400; font-size: 1.9em; line-height: 1.1; color: var(--maf-oro-claro); }
.maf-crema .maf-manuscrita { color: var(--maf-oro-crema); }

/* Cifras: siempre en Lora. En Cinzel el 1 parece una I. */
.maf-cifra { font-family: var(--maf-texto-fuente); font-weight: 700; font-variant-numeric: lining-nums; }

/* Palabras clave en oro */
.maf-destacado { color: var(--maf-oro); font-weight: 700; }
.maf-crema .maf-destacado { color: var(--maf-oro-crema); }

/* ---------- Separador: línea fina con estrella de cuatro puntas ---------- */
.maf-separador { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--maf-oro); }
.maf-separador::before, .maf-separador::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, currentColor 30%, currentColor 70%, transparent); opacity: .8; }
.maf-separador::before { background: linear-gradient(90deg, transparent, currentColor); }
.maf-separador::after { background: linear-gradient(90deg, currentColor, transparent); }
.maf-estrella { flex: none; width: 18px; height: 18px; background: url("../img/estrella.svg") center / contain no-repeat; }
.maf-crema .maf-separador { color: var(--maf-oro-plano); }

/* ---------- Recuadro de línea dorada ---------- */
.maf-recuadro { border: var(--maf-linea-fina) solid var(--maf-oro-linea); border-radius: var(--maf-radio); padding: 20px 24px; background: rgba(10, 9, 7, .55); }
.maf-crema .maf-recuadro { border-color: var(--maf-oro-plano); background: #FBF8F1; }
.maf-recuadro > :first-child { margin-top: 0; }
.maf-recuadro > :last-child { margin-bottom: 0; }

/* Pregunta final, grande y centrada */
.maf-pregunta { text-align: center; padding: 26px 28px; }
.maf-pregunta .maf-titulo { font-size: clamp(22px, 3.4vw, 34px); line-height: 1.18; }

/* ---------- Lista con estrellas ---------- */
.maf-lista { list-style: none; padding: 0; margin: 0; }
.maf-lista li { position: relative; padding-left: 30px; margin: 6px 0; }
.maf-lista li::before { content: ""; position: absolute; left: 0; top: .28em; width: 18px; height: 18px; background: url("../img/estrella.svg") center / contain no-repeat; }

/* ---------- Iconos de línea en círculo dorado ---------- */
.maf-icono { display: inline-grid; place-items: center; flex: none; width: 56px; height: 56px; border-radius: 50%; border: 2px solid var(--maf-oro); color: var(--maf-oro); }
.maf-icono svg { width: 55%; height: 55%; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.maf-crema .maf-icono { border-color: var(--maf-oro-plano); color: var(--maf-oro-crema); }

/* Fila de icono + título + explicación (lista de «Cómo me defino») */
.maf-fila { display: flex; gap: 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid rgba(233, 203, 140, .25); }
.maf-fila:last-child { border-bottom: 0; }
.maf-fila h4 { font-family: var(--maf-titulo); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--maf-oro); margin: 0; font-size: 1em; }
.maf-fila p { margin: 2px 0 0; }

/* ---------- Piezas del cuestionario (páginas para leer) ---------- */
.maf-banda { background: var(--maf-negro-banda); color: var(--maf-blanco); padding: 18px 24px; display: flex; justify-content: space-between; align-items: flex-start; }
.maf-banda-marca { font-family: var(--maf-titulo); font-weight: 700; color: var(--maf-oro); letter-spacing: .06em; }
.maf-banda-bloque { display: block; margin-top: 6px; font-family: var(--maf-titulo); font-weight: 600; font-size: .85em; letter-spacing: .08em; text-transform: uppercase; }
.maf-banda-paso { color: var(--maf-oro); font-size: .85em; font-family: var(--maf-texto-fuente); }

.maf-progreso { height: 4px; border-radius: 4px; background: var(--maf-linea-crema); overflow: hidden; }
.maf-progreso > span { display: block; height: 100%; background: var(--maf-oro-plano); border-radius: 4px; }

.maf-numero { display: inline-grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--maf-oro-plano); color: var(--maf-negro-banda); font-family: var(--maf-texto-fuente); font-weight: 700; font-size: 15px; }

.maf-opcion { display: flex; gap: 14px; align-items: center; padding: 12px 4px; cursor: pointer; }
.maf-opcion input { appearance: none; -webkit-appearance: none; margin: 0; width: 20px; height: 20px; border: 1.5px solid var(--maf-oro-plano); border-radius: 3px; background: #fff; flex: none; display: grid; place-items: center; }
.maf-opcion input[type="radio"] { border-radius: 50%; }
.maf-opcion input:checked { background: var(--maf-oro-plano); box-shadow: inset 0 0 0 3px #fff; }
.maf-opcion input:focus-visible { outline: 2px solid var(--maf-oro-crema); outline-offset: 2px; }

/* Lema al pie: CONÓCETE · ENTIENDE · TRANSFORMA · SÉ LIBRE */
.maf-lema { text-align: center; font-family: var(--maf-titulo); font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--maf-oro); }
.maf-crema .maf-lema { color: var(--maf-oro-crema); }

/* ---------- Botón ---------- */
.maf-boton { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 26px; border: 0; border-radius: 999px; background: var(--maf-degradado); color: var(--maf-negro); font-family: var(--maf-titulo); font-weight: 700; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; cursor: pointer; }
.maf-boton:hover { filter: brightness(1.06); }
.maf-boton:focus-visible { outline: 2px solid var(--maf-oro-claro); outline-offset: 3px; }
.maf-boton-linea { background: transparent; color: var(--maf-oro); box-shadow: inset 0 0 0 var(--maf-linea-fina) var(--maf-oro-linea); }
.maf-crema .maf-boton { background: var(--maf-negro-banda); color: var(--maf-oro-claro); }

/* ---------- Escudo ---------- */
/* El escudo tiene el fondo negro dentro de la imagen: va siempre sobre negro. Sobre crema, dentro de .maf-banda o de un bloque negro. */
.maf-escudo { display: block; width: 100%; max-width: 280px; height: auto; aspect-ratio: 1; mix-blend-mode: lighten; }
/* lighten funde el negro de la imagen con el fondo negro de la página, sin tocar el dibujo. */

/* ---------- Continuidad: la imagen de luz se funde con la página ---------- */
/* La imagen no va como foto: sin bordes, se funde con el negro (screen) y sus cortes se desvanecen. */
.maf-luz { position: relative; z-index: 1; display: block; max-width: 100%; height: auto; mix-blend-mode: screen; pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 12%, #000 92%, transparent 100%), linear-gradient(to right, transparent 0, #000 24%, #000 86%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to bottom, transparent 0, #000 12%, #000 92%, transparent 100%), linear-gradient(to right, transparent 0, #000 24%, #000 86%, transparent 100%);
  mask-composite: intersect; }
/* Resplandor cálido detrás, para que la luz de la imagen ilumine la página */
.maf-luz-marco { position: relative; }
.maf-luz-marco::before { content: ""; position: absolute; inset: 8% -20% 5% -30%; background: radial-gradient(ellipse at 55% 55%, rgba(224, 160, 64, .16), transparent 62%); pointer-events: none; }

/* ---------- Continuidad: hilo de luz que recorre la página (js/hilo-maf.js) ---------- */
[data-hilo-lienzo] { position: relative; }
.maf-hilo { position: absolute; left: 0; top: 0; z-index: 0; overflow: visible; pointer-events: none; }
.maf-hilo-halo { fill: none; stroke: #E0A040; stroke-width: 7; stroke-linecap: round; opacity: .55; }
.maf-hilo-linea { fill: none; stroke: url(#maf-oro-hilo); stroke-width: 1.8; stroke-linecap: round; }
.maf-hilo-cabeza { fill: #FFF1C9; transition: opacity .3s; }
.maf-hilo-chispas circle { fill: #F8D890; opacity: 0; transition: opacity .8s; }
.maf-hilo-chispas circle.maf-visible { animation: maf-titila 4s ease-in-out infinite; }
@keyframes maf-titila { 0%, 100% { opacity: .15; } 50% { opacity: .85; } }
/* Lo que está por encima del hilo tapa la línea (los iconos llevan fondo negro) */
[data-hilo-lienzo] > *:not(.maf-hilo) { position: relative; z-index: 1; }
.maf-icono { background: var(--maf-negro); transition: box-shadow .6s, color .6s, border-color .6s; }
.maf-icono.maf-encendido, .maf-encendido .maf-icono { box-shadow: 0 0 0 4px rgba(248, 216, 144, .08), 0 0 22px rgba(224, 160, 64, .45); border-color: var(--maf-oro-claro); color: var(--maf-oro-claro); }
.maf-recuadro { transition: box-shadow .8s, border-color .8s; }
.maf-recuadro.maf-encendido { border-color: var(--maf-oro-claro); box-shadow: 0 0 34px rgba(224, 160, 64, .22), inset 0 0 24px rgba(224, 160, 64, .06); }
/* Puntos de paso invisibles para que el hilo rodee los títulos en vez de cruzarlos */
.maf-hilo-paso { position: absolute; width: 1px; height: 1px; pointer-events: none; }
.maf-estrella.maf-encendido { filter: drop-shadow(0 0 6px rgba(248, 216, 144, .9)); }
@media (prefers-reduced-motion: reduce) { .maf-hilo-chispas circle.maf-visible { animation: none; opacity: .5; } }
