/* Outfit (SIL Open Font License, ver fonts/OFL.txt), alojada en la propia web: sin peticiones a Google */
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../fonts/outfit-latin.woff2") format('woff2');
}
:root {
  /* Paleta del libro: rojo de cubierta, tinta, el gris exacto del fondo de las fotos, blanco y la banda negra */
  --rojo: #c63232;
  --rojo-hondo: #a82727;
  --tinta: #1c1a1a;
  --gris: #dedede;          /* = fondo de las fotos procesadas: el libro se funde con la sección */
  --blanco: #ffffff;
  --suave: #5b5858;
  --linea: #d4d1d0;
  --negro: #141212;
  --display: 'Outfit', 'Helvetica Neue', Arial, sans-serif;
  --body: 'Outfit', 'Helvetica Neue', Arial, sans-serif;
  /* Layout: una columna en móvil con el orden de la maqueta; en escritorio el libro pasa a la derecha del texto */
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--blanco); color: var(--tinta); font-family: var(--body); font-size: 17px; line-height: 1.5; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { text-wrap: balance; margin: 0; font-family: var(--display); }
p { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--rojo); outline-offset: 4px; border-radius: 3px; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding-inline: 22px; }
.r { color: var(--rojo); }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--rojo); }
.fundido {
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 3.5%, #000 96.5%, transparent 100%), linear-gradient(to bottom, transparent 0, #000 3.5%, #000 96.5%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent 0, #000 3.5%, #000 96.5%, transparent 100%), linear-gradient(to bottom, transparent 0, #000 3.5%, #000 96.5%, transparent 100%);
  mask-composite: intersect;
}

/* ---------- Botones ---------- */
.btn-rojo { border: 0; cursor: pointer; background: var(--rojo); color: var(--blanco); font-family: var(--display); font-weight: 700; font-size: 16px; letter-spacing: .08em; text-transform: uppercase; line-height: 1.2; text-align: left;
  padding: 19px 54px 19px 24px; clip-path: polygon(0 0, 100% 0, calc(100% - 20px) 50%, 100% 100%, 0 100%);
  transition: background .2s ease, padding .3s cubic-bezier(.2,.7,.2,1); }
.btn-rojo:hover { background: var(--rojo-hondo); padding-right: 70px; }
.btn-rojo:active { background: var(--rojo-hondo); }
.enlace-grande { border: 0; background: none; cursor: pointer; padding: 2px 4px 6px 0; font-family: var(--display); font-weight: 700; font-size: clamp(24px, 3.4vw, 30px); line-height: 1.15; color: var(--tinta); text-align: left; display: inline-flex; align-items: baseline; gap: 12px;
  background-image: linear-gradient(var(--rojo), var(--rojo)); background-repeat: no-repeat; background-size: 100% 5px; background-position: 0 100%;
  transition: background-size .35s cubic-bezier(.2,.7,.2,1), color .25s ease, padding .35s ease; }
.enlace-grande .flecha { color: var(--rojo); transition: transform .3s ease, color .25s ease; }
.enlace-grande:hover, .enlace-grande:active { background-size: 100% 100%; color: var(--blanco); padding-left: 10px; }
.enlace-grande:hover .flecha, .enlace-grande:active .flecha { color: var(--blanco); transform: translateX(6px); }
@media (hover: none) { .enlace-grande .flecha { animation: empuje 2.6s ease-in-out infinite; } }
@keyframes empuje { 0%, 62%, 100% { transform: translateX(0); } 78% { transform: translateX(8px); } }
.btn-negro { border: 0; cursor: pointer; background: var(--tinta); color: var(--blanco); font-weight: 600; font-size: 16px; padding: 13px 20px; display: inline-flex; gap: 10px; align-items: center; transition: background .2s ease; }
.btn-negro:hover, .btn-negro:active { background: var(--rojo); }
.btn-negro .flecha { transition: transform .3s ease; }
.btn-negro:hover .flecha { transform: translateX(5px); }
.enlace-txt { border: 0; background: none; padding: 0; cursor: pointer; font-weight: 700; color: var(--rojo); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; }
.enlace-txt:hover { color: var(--rojo-hondo); }

/* =================== PORTADA =================== */
.hero { background: var(--gris); padding-block: 44px 56px; }
.hero-in { display: grid; grid-template-columns: 1fr; grid-template-areas: "titulo" "ano" "libro" "lead"; }
.titulo { grid-area: titulo; font-family: var(--display); color: var(--tinta); line-height: 1.05; }
.titulo .t1 { display: block; font-weight: 800; font-size: clamp(36px, 7vw, 60px); letter-spacing: -.01em; }
.titulo .t2 { display: block; font-weight: 300; font-size: clamp(30px, 5.8vw, 50px); letter-spacing: -.005em; margin-top: 2px; }
.ano { grid-area: ano; font-family: var(--display); font-weight: 800; color: var(--rojo); font-size: clamp(96px, 19vw, 190px); line-height: .86; letter-spacing: -.035em; margin-top: 8px; }
.libro-wrap { grid-area: libro; width: min(100%, 440px); justify-self: center; margin-block: 8px 10px; }
.lead { grid-area: lead; color: var(--suave); font-size: 19px; max-width: 34ch; }
@media (min-width: 860px) {
  .hero { padding-block: 72px; }
  .hero-in { grid-template-columns: 1.05fr .95fr; grid-template-rows: auto auto 1fr; grid-template-areas: "titulo libro" "ano libro" "lead libro"; column-gap: 40px; }
  .libro-wrap { align-self: center; width: 100%; max-width: 480px; margin: 0; }
  .lead { margin-top: 28px; font-size: 20px; }
}

/* =================== BANDA ROJA =================== */
.banda-roja { background: var(--rojo); color: var(--blanco); padding-block: 34px 36px; }
.banda-roja p { font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: clamp(30px, 7.4vw, 74px); line-height: 1.02; letter-spacing: -.005em; text-wrap: balance; }

/* =================== CADA DÍA, TRES COSAS =================== */
.tres { padding-block: 72px 60px; }
.tres ol { list-style: none; margin: 26px 0 0; padding: 0; border-top: 1px solid var(--linea); max-width: 760px; }
.tres li { display: grid; grid-template-columns: 64px 1fr; column-gap: 16px; row-gap: 6px; padding-block: 26px; border-bottom: 1px solid var(--linea); align-items: center; }
.tres h3 { font-size: clamp(25px, 3.4vw, 31px); font-weight: 600; line-height: 1.15; }
.tres p { grid-column: 2; color: var(--suave); max-width: 54ch; }
.tres p strong { color: var(--tinta); font-weight: 700; }
.num { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-size: 22px; font-weight: 600; grid-row: span 2; align-self: start;
  border: 2px solid var(--rojo); background: var(--blanco); color: var(--rojo); animation: latido 3s ease-out infinite; }
.num.d2 { animation-delay: .5s; } .num.d3 { animation-delay: 1s; }
@keyframes latido { 0% { box-shadow: 0 0 0 0 rgba(198,50,50,.38), 0 0 14px rgba(198,50,50,.18); } 70% { box-shadow: 0 0 0 14px rgba(198,50,50,0), 0 0 14px rgba(198,50,50,.18); } 100% { box-shadow: 0 0 0 0 rgba(198,50,50,0), 0 0 14px rgba(198,50,50,.18); } }

/* =================== ASÍ ES POR DENTRO =================== */
.dentro { background: var(--gris); padding-block: 64px 56px; }
.dentro-in { display: grid; gap: 18px; align-items: center; }
.dentro h2 { font-size: clamp(27px, 4vw, 36px); font-weight: 400; line-height: 1.24; margin-top: 16px; max-width: 21ch; }
.dentro h2 strong { font-weight: 700; }
.dentro-foto { display: grid; gap: 14px; justify-items: end; }
.hojear { border: 0; padding: 0; background: none; cursor: pointer; display: block; width: 100%; }
.hojear img { transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.hojear:hover img { transform: scale(1.02) rotate(-.4deg); }
.dentro-foto .btn-negro { margin-right: 6%; }
@media (min-width: 860px) { .dentro-in { grid-template-columns: .85fr 1.15fr; gap: 36px; } }

/* =================== FRASE =================== */
.frase { background: var(--rojo); color: var(--blanco); padding-block: 76px; }
.frase blockquote { margin: 0; font-size: clamp(27px, 4.6vw, 42px); font-weight: 400; line-height: 1.22; max-width: 24ch; text-wrap: balance; }

/* =================== PRÓLOGO =================== */
.prologo { padding-block: 64px; }
/* Los dos bloques forman un grupo centrado en la pantalla; dentro, foto a la izquierda y texto a la derecha */
.personas { width: fit-content; max-width: 100%; margin-inline: auto; display: grid; gap: 34px; }
.persona { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px; }
.persona + .persona { border-top: 1px solid var(--linea); padding-top: 34px; }
.persona > div:last-child { flex: 1 1 260px; max-width: 440px; }
.prologo .cita { font-weight: 400; line-height: 1.3; margin-top: 6px; }
/* Extracto del prólogo: del mismo ancho que el grupo, sin ensancharlo */
.extracto { margin: 0; width: 0; min-width: 100%; position: relative; background: #f6f5f4; padding: 34px 28px 26px; }
.extracto::before { content: "«"; position: absolute; top: -34px; left: 22px; font-family: var(--display); font-weight: 800; font-size: 72px; line-height: 1; color: var(--rojo); }
.extracto blockquote { margin: 0; display: grid; gap: 12px; font-size: 19px; line-height: 1.5; }
.extracto strong { font-weight: 700; }
.extracto figcaption { margin-top: 16px; font-size: 13px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--suave); }
.retrato { width: 132px; height: 132px; border-radius: 50%; flex: none; overflow: hidden; background: var(--gris); display: grid; place-items: center; box-shadow: 0 0 0 4px var(--blanco), 0 0 0 6px var(--rojo); position: relative; }
.retrato img { width: 100%; height: 100%; object-fit: cover; }
.retrato .iniciales { font-family: var(--display); font-weight: 700; font-size: 38px; color: #a9a5a4; letter-spacing: .02em; }
.retrato .falta { position: absolute; bottom: 18px; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: #8d8988; }
.prologo .con { font-size: 17px; color: var(--suave); }
.prologo .nombre { font-family: var(--display); font-weight: 800; font-size: clamp(28px, 4.4vw, 40px); line-height: 1.05; letter-spacing: .01em; margin-top: 4px; }
.prologo .cargo { font-weight: 300; font-size: clamp(20px, 3vw, 26px); margin-top: 2px; }

/* =================== LIBRO + DESCÚBRELO =================== */
.final { background: var(--gris); padding-block: 20px 72px; }
.abierto img { margin-inline: auto; width: min(100%, 920px); }
.descubre { margin-top: 28px; display: grid; gap: 28px; }
.descubre h2 { font-size: clamp(36px, 5.6vw, 54px); font-weight: 700; line-height: 1.05; margin: 12px 0 12px; }
.descubre .txt { font-size: 18px; max-width: 44ch; color: var(--suave); }
.descubre .enlace-grande { margin-top: 22px; }
.aviso-caja { background: var(--blanco); padding: 30px 26px 28px; display: grid; gap: 18px; justify-items: start; box-shadow: 0 24px 50px -30px rgba(0,0,0,.35); }
.aviso-caja h3 { font-size: clamp(26px, 3.6vw, 32px); font-weight: 700; line-height: 1.12; }
.aviso-caja .grupo { font-size: 17px; }
.aviso-caja .pronto { font-size: 15px; color: var(--suave); border-top: 1px solid var(--linea); padding-top: 14px; width: 100%; }
.aviso-caja .nota { display: block; font-size: 13px; margin-bottom: 6px; }
@media (min-width: 860px) { .descubre { grid-template-columns: 1fr 1fr; align-items: center; gap: 48px; } .aviso-caja { padding: 36px 34px 30px; } }

/* =================== PIE =================== */
.pie { padding-block: 44px; }
.pie-in { display: grid; gap: 30px; }
.pie-titulo { font-family: var(--display); line-height: 1.12; }
.pie-titulo .t1 { display: block; font-weight: 800; font-size: 24px; }
.pie-titulo .t2 { display: block; font-weight: 300; font-size: 22px; }
.pie-titulo .autor { display: block; font-weight: 400; font-size: 16px; color: var(--suave); margin-top: 10px; }
.logos { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 24px 44px; padding-bottom: 8px; }
/* --base = parte de la imagen que queda por debajo de la línea base del texto, medida en el propio archivo */
.logo { width: auto; mix-blend-mode: multiply; height: var(--h); margin-bottom: calc(var(--h) * var(--base) * -1); }
.logo-bo { --h: 48px; --base: .1198; }   /* base de «Online»: fila 106,5 de 121 */
.logo-jc { --h: 60px; --base: .0723; }   /* base de «jóvenescatólicos»: fila 147,5 de 159 */
@media (min-width: 860px) { .pie-in { grid-template-columns: 1fr auto; align-items: center; } }
.banda { background: var(--negro); color: var(--blanco); padding-block: 18px; }
.banda ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 30px; font-size: 13px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; }
.banda a { color: var(--blanco); text-decoration: none; opacity: .85; }
.banda a::before { content: "— "; opacity: .6; }
.banda a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }

/* =========================================================
   LECTOR DE LA MUESTRA · páginas que se deslizan
   ========================================================= */
#lector { margin: 0; padding: 0; border: 0; width: 100%; height: 100%; max-width: none; max-height: none; background: var(--gris); color: var(--tinta); }
#lector::backdrop { background: var(--gris); }
.lector-in { height: 100%; display: grid; grid-template-rows: auto 1fr auto; position: relative; }
.lector-cab { display: flex; align-items: center; gap: 14px; padding: 14px 20px; }
.lector-cab h2 { font-size: 16px; font-weight: 400; margin-right: auto; }
.lector-cab h2 b { font-weight: 700; }
.cerrar { border: 1px solid #b9b5b4; background: var(--blanco); color: var(--tinta); border-radius: 999px; padding: 7px 16px; cursor: pointer; font-size: 15px; }
.cerrar:hover { background: #f2f1f0; }
.carrusel { display: flex; align-items: center; gap: var(--gap, 18px); overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; min-height: 0; perspective: 1400px; -webkit-overflow-scrolling: touch; }
.carrusel::-webkit-scrollbar { display: none; }
.carrusel:focus-visible { outline-offset: -4px; }
.hoja { flex: 0 0 auto; margin: 0; width: var(--pw, 300px); aspect-ratio: 1049 / 1489; scroll-snap-align: center; scroll-snap-stop: always; background: var(--blanco); box-shadow: 0 22px 44px -24px rgba(0,0,0,.45), 0 2px 6px rgba(0,0,0,.08); cursor: zoom-in; padding: 0; border: 0; transform-origin: 50% 50%; will-change: transform, opacity; }
.hoja img { width: 100%; height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.lector-pie { display: grid; gap: 12px; justify-items: center; padding: 12px 20px 22px; }
.lector-nav { display: flex; align-items: center; gap: 14px; }
.flechas { width: 44px; height: 44px; border-radius: 50%; border: 1px solid #b9b5b4; background: var(--blanco); color: var(--tinta); cursor: pointer; font-size: 22px; line-height: 1; }
.flechas:hover:not(:disabled) { border-color: var(--tinta); }
.flechas:disabled { opacity: .35; cursor: default; }
.puntos { display: flex; gap: 7px; align-items: center; }
.puntos button { width: 8px; height: 8px; padding: 0; border-radius: 50%; border: 0; background: #b3afae; cursor: pointer; transition: width .25s ease, background .25s ease; }
.puntos button[aria-current="true"] { width: 24px; border-radius: 4px; background: var(--rojo); }
.lector-pag { font-size: 14px; color: var(--suave); font-variant-numeric: tabular-nums; min-height: 1.5em; }
.zoom { position: absolute; inset: 0; z-index: 5; background: var(--gris); overflow: auto; -webkit-overflow-scrolling: touch; }
.zoom img { width: clamp(700px, 210vw, 1049px); max-width: none; margin: 64px auto 24px; background: var(--blanco); box-shadow: 0 22px 44px -24px rgba(0,0,0,.45); }
.zoom .cerrar { position: fixed; top: 14px; right: 14px; z-index: 6; box-shadow: 0 4px 14px rgba(0,0,0,.15); }
.zoom-pista { position: fixed; top: 22px; left: 20px; z-index: 6; font-size: 13px; color: var(--suave); }

/* =================== FORMULARIOS =================== */
#aviso { border: 0; padding: 0; width: min(480px, calc(100% - 24px)); max-height: calc(100% - 32px); color: var(--tinta); background: var(--blanco); box-shadow: 0 30px 80px rgba(0,0,0,.4); }
#aviso::backdrop { background: rgba(28,26,26,.62); }
.aviso-cab { position: relative; padding: 0 24px 0 92px; min-height: 92px; display: flex; align-items: center; border-bottom: 1px solid var(--linea); }
.aviso-cinta { position: absolute; left: 24px; top: 0; width: 50px; text-align: center; font-family: var(--display); }
.aviso-cinta .m { background: var(--tinta); color: var(--blanco); font-size: 10px; letter-spacing: .06em; padding: 3px 0; }
.aviso-cinta .n { background: var(--rojo); color: var(--tinta); font-weight: 800; font-size: 19px; line-height: .95; padding: 5px 0 16px; clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 78%, 0 100%); }
.aviso-cab h2 { font-size: 21px; font-weight: 700; line-height: 1.15; padding-right: 74px; }
.aviso-cab .cerrar { position: absolute; right: 16px; top: 16px; font-size: 14px; padding: 6px 12px; }
.form { padding: 20px 24px 24px; display: grid; gap: 16px; }
.form > p { color: var(--suave); }
.campo { display: grid; gap: 6px; }
.campo label { font-weight: 600; font-size: 15px; }
.campo label small { font-weight: 400; color: var(--suave); }
.campo input, .campo textarea { font: 16px var(--body); padding: 12px 2px 10px; border: 0; border-bottom: 2px solid var(--linea); border-radius: 0; background: transparent; color: var(--tinta); resize: vertical; }
.campo input:focus, .campo textarea:focus { outline: none; border-bottom-color: var(--tinta); }
.campo [aria-invalid="true"] { border-bottom-color: var(--rojo); }
.error { color: var(--rojo-hondo); font-size: 14px; }
.error:empty { display: none; }
.check { display: grid; grid-template-columns: 20px 1fr; gap: 10px; font-size: 14px; color: var(--suave); align-items: start; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--rojo); }
.form .btn-rojo { justify-self: start; }
.form-estado { font-size: 15px; color: var(--rojo-hondo); }
.form-estado:empty { display: none; }
.trampa { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.check a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.btn-rojo[aria-busy="true"] { opacity: .7; cursor: progress; }
.gracias { padding: 28px 24px; display: grid; gap: 14px; justify-items: start; }
.gracias h3 { font-size: 28px; font-weight: 700; }
.gracias p { color: var(--suave); }
#aviso:not([data-modo="grupo"]) [data-solo="grupo"], #aviso[data-modo="grupo"] [data-solo="aviso"] { display: none; }
[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* =================== PÁGINAS LEGALES =================== */
.legal-cab { background: var(--gris); padding-block: 28px; }
.legal-cab a { text-decoration: none; color: var(--tinta); font-family: var(--display); line-height: 1.05; display: inline-block; }
.legal-cab .t1 { display: block; font-weight: 800; font-size: 24px; }
.legal-cab .t2 { display: block; font-weight: 300; font-size: 20px; }
.legal-txt { padding-block: 48px 72px; max-width: 760px; }
.legal-txt h1 { font-size: clamp(32px, 5vw, 44px); font-weight: 800; margin-bottom: 8px; }
.legal-txt .fecha { color: var(--suave); font-size: 14px; margin-bottom: 32px; }
.legal-txt h2 { font-size: 22px; font-weight: 700; margin: 34px 0 10px; }
.legal-txt p, .legal-txt li { color: #3a3737; margin-bottom: 12px; }
.legal-txt ul { padding-left: 20px; }
.legal-txt a { color: var(--rojo-hondo); }
.pendiente { background: #fff1a8; padding: 0 4px; font-weight: 600; }
.volver { display: inline-block; margin-top: 28px; font-weight: 700; color: var(--tinta); }
