/* =============================================================================
   Portada de Fotolibros (index.html) · mobile-first
   Tokens de Livriz Folio (marca/colors_and_type.css): blanco y negro con un solo
   acento, Livriz Blue. Las fotos de la gente son lo más fuerte de la página.
   ============================================================================= */

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; background: var(--bg-1); color: var(--fg-1); font-family: var(--font-sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; }
a { color: var(--brand-accent); }
:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: 6px; }
h1, h2, p { margin: 0; }
.ms { font-family: 'Material Symbols Rounded'; font-weight: 400; font-style: normal; font-size: 20px; line-height: 1; display: inline-block; font-feature-settings: 'liga'; -webkit-font-smoothing: antialiased; flex-shrink: 0; }

/* ---- Botones ---- */
.boton { height: 44px; padding: 0 20px; border-radius: var(--radius-full); display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 500 14px/1 var(--font-sans); text-decoration: none; border: none; cursor: pointer; white-space: nowrap; transition: background var(--motion-duration-short), box-shadow var(--motion-duration-short), transform var(--motion-duration-short); }
.boton .ms { font-size: 20px; }
.boton.grande { height: 52px; padding: 0 26px; font-size: 16px; }
.boton.relleno { background: var(--brand-accent); color: #fff; }
.boton.relleno:hover { background: var(--brand-accent-hover); box-shadow: var(--elev-3); }
.boton.contorno { color: var(--brand-accent); border: 1px solid var(--border-2); background: var(--bg-1); }
.boton.contorno:hover { background: var(--brand-accent-soft); }
.boton.blanco { background: #fff; color: var(--brand-accent); }
.boton.blanco:hover { box-shadow: 0 8px 24px rgba(0,0,0,.2); transform: translateY(-1px); }
.boton.contorno-claro { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.5); }
.boton.contorno-claro:hover { background: rgba(255,255,255,.12); }

.sobretitulo { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; color: var(--brand-accent); }
.sobretitulo .ms { font-size: 18px; }

/* ---- Cabecera ---- */
.cabecera { position: sticky; top: 0; z-index: 30; height: 60px; display: flex; align-items: center; gap: 16px; padding: 0 16px; background: color-mix(in srgb, var(--bg-1) 88%, transparent); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); transition: box-shadow var(--motion-duration-medium); }
.cabecera.con-sombra { box-shadow: 0 1px 0 var(--border-1), 0 6px 20px rgba(0,0,0,.05); }
.marca { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--fg-1); margin-right: auto; }
.marca img { height: 24px; width: auto; display: block; }
.marca span { font-weight: 600; font-size: 15px; padding-left: 10px; border-left: 1px solid var(--border-2); line-height: 20px; }
.menu { display: none; gap: 28px; }
.menu a { color: var(--fg-2); text-decoration: none; font-size: 14px; font-weight: 500; }
.menu a:hover { color: var(--fg-1); }
.cabecera .boton { height: 40px; padding: 0 16px; font-size: 13px; }

/* ---- Portada ---- */
.hero { display: grid; gap: 40px; padding: 28px 16px 56px; max-width: 1240px; margin: 0 auto; }
.hero h1 { font: 600 42px/1.06 var(--font-sans); letter-spacing: -1.4px; margin: 14px 0 16px; }
.hero h1 em { font-family: 'Playfair Display', serif; font-style: italic; font-weight: 400; color: var(--brand-accent); letter-spacing: -.5px; }
.bajada { font-size: 17px; line-height: 27px; color: var(--fg-2); max-width: 560px; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.ctas .boton { flex: 1 1 auto; }
.garantias { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-wrap: wrap; gap: 10px 20px; }
.garantias li { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--fg-2); }
.garantias .ms { font-size: 18px; color: var(--status-success); }

/* Libro abierto de muestra */
.hero-escena { position: relative; min-height: 300px; display: flex; align-items: center; justify-content: center; perspective: 1600px; padding: 24px 0 36px; }
.hero-escena::before { content: ''; position: absolute; inset: 0 -16px; background: radial-gradient(60% 60% at 50% 55%, var(--blue-50), transparent 70%); z-index: -1; }
.libro3d { display: flex; width: min(100%, 560px); aspect-ratio: 2 / 1.36; transform: rotateX(14deg) rotateZ(-3deg); transform-style: preserve-3d; box-shadow: 0 40px 60px -20px rgba(15, 30, 61, .35), 0 12px 24px rgba(0,0,0,.12); border-radius: 4px; animation: flotar 7s ease-in-out infinite; }
.libro3d .pag { flex: 1; position: relative; overflow: hidden; background: #fff; }
.libro3d .pag.izq { border-radius: 4px 0 0 4px; }
.libro3d .pag.der { border-radius: 0 4px 4px 0; background: #fbf6f2; }
.libro3d .pag.izq img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; display: block; }
.libro3d .pag.izq::after { content: ''; position: absolute; top: 0; bottom: 0; right: 0; width: 18%; background: linear-gradient(90deg, transparent, rgba(0,0,0,.18)); }
.libro3d .pag.der::before { content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 14%; background: linear-gradient(270deg, transparent, rgba(0,0,0,.12)); z-index: 2; }
.titulo-libro-mock { position: absolute; left: 0; right: 0; bottom: 8%; text-align: center; color: #fff; font: italic 400 clamp(18px, 4.6vw, 30px)/1 'Playfair Display', serif; text-shadow: 0 2px 12px rgba(0,0,0,.45); }
.libro3d .foto { position: absolute; overflow: hidden; background: #ddd; }
.libro3d .foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.libro3d .f1 { left: 9%; top: 7%; width: 82%; height: 44%; }
.libro3d .f2 { left: 9%; top: 54%; width: 82%; height: 30%; }
.nota-mano { position: absolute; right: 9%; bottom: 4%; font: 700 clamp(15px, 3.6vw, 24px)/1 'Caveat', cursive; color: #a8676b; transform: rotate(-4deg); }
.sticker { position: absolute; pointer-events: none; filter: drop-shadow(0 6px 10px rgba(0,0,0,.14)); }
.hero-escena .s1 { width: 16%; left: 2%; top: 4%; animation: flotar 6s ease-in-out infinite reverse; }
.hero-escena .s2 { width: 12%; right: 4%; top: 0; animation: flotar 5s ease-in-out infinite; }
.hero-escena .s3 { width: 13%; right: 0; bottom: 2%; animation: flotar 8s ease-in-out infinite reverse; }
.chip-flotante { position: absolute; display: flex; align-items: center; gap: 8px; padding: 9px 14px 9px 10px; border-radius: var(--radius-full); background: var(--bg-1); box-shadow: var(--elev-4); font-size: 12px; font-weight: 600; white-space: nowrap; }
.chip-flotante .ms { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 17px; background: var(--brand-accent-soft); color: var(--brand-accent); }
.chip-flotante.c1 { left: 0; bottom: 6px; }
.chip-flotante.c2 { right: 0; top: 10px; }
.chip-flotante.c2 .ms { background: var(--status-success-soft); color: var(--status-success); }
@keyframes flotar { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }

/* ---- Bloques ---- */
.bloque { max-width: 1240px; margin: 0 auto; padding: 56px 16px; }
.encabezado { display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px; max-width: 720px; }
.bloque h2, .destacado h2 { font: 600 30px/1.15 var(--font-sans); letter-spacing: -.6px; }
.aparece { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--motion-easing-decelerate), transform .7s var(--motion-easing-decelerate); }
.aparece.visible { opacity: 1; transform: none; }

/* Momentos */
.tarjetas-evento { display: grid; gap: 14px; }
.tarjeta-evento { position: relative; display: block; border-radius: var(--radius-xl); overflow: hidden; aspect-ratio: 4 / 3; text-decoration: none; color: #fff; background: #222; isolation: isolate; }
.tarjeta-evento img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--motion-easing-standard); }
.tarjeta-evento::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.65)); }
.tarjeta-evento:hover img { transform: scale(1.05); }
.tarjeta-texto { position: absolute; left: 20px; right: 20px; bottom: 18px; z-index: 1; display: flex; flex-direction: column; gap: 4px; }
.tarjeta-texto b { font-size: 24px; font-weight: 600; }
.tarjeta-texto small { font-size: 14px; opacity: .9; }
.tarjeta-texto i { font-style: normal; font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; }
.tarjeta-texto i .ms { font-size: 18px; transition: transform var(--motion-duration-short); }
.tarjeta-evento:hover .tarjeta-texto i .ms { transform: translateX(4px); }
.mas-eventos { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; }
.mas-eventos > span { font-size: 14px; color: var(--fg-3); margin-right: 4px; }
.mas-eventos a { height: 38px; padding: 0 14px 0 10px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border-2); border-radius: var(--radius-full); text-decoration: none; color: var(--fg-1); font-size: 14px; font-weight: 500; }
.mas-eventos a .ms { color: var(--brand-accent); font-size: 18px; }
.mas-eventos a:hover { background: var(--brand-accent-soft); border-color: transparent; }

/* Pasos */
.lista-pasos { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.lista-pasos li { position: relative; padding: 24px 22px; border-radius: var(--radius-xl); background: var(--bg-2); border: 1px solid var(--border-1); display: flex; flex-direction: column; gap: 8px; overflow: hidden; }
.lista-pasos .numero { position: absolute; right: 16px; top: -10px; font: 600 96px/1 var(--font-sans); color: color-mix(in srgb, var(--brand-accent) 9%, transparent); }
.lista-pasos li > .ms { font-size: 30px; color: var(--brand-accent); }
.lista-pasos b { font-size: 18px; font-weight: 600; margin-top: 4px; }
.lista-pasos p { font-size: 14px; line-height: 22px; color: var(--fg-2); }

/* Destacados (texto + imagen) */
.destacado { display: grid; gap: 32px; align-items: center; }
.destacado-texto { display: flex; flex-direction: column; gap: 14px; }
.destacado-texto > p { font-size: 16px; line-height: 26px; color: var(--fg-2); }
.lista-check { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-direction: column; gap: 12px; }
.lista-check li { display: flex; gap: 12px; align-items: center; font-size: 15px; }
.lista-check .ms { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--brand-accent-soft); color: var(--brand-accent); font-size: 20px; }

.comparar { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.encuadre { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.marco-demo { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--elev-3); background: #ddd; }
.marco-demo > img:first-child { width: 100%; height: 100%; object-fit: cover; display: block; }
.encuadre:not(.bien) .marco-demo > img:first-child { filter: saturate(.6); opacity: .9; }
.encuadre.bien .marco-demo { box-shadow: 0 0 0 3px var(--brand-accent), var(--elev-4); }
.sticker-demo { position: absolute; width: 19%; left: 50.5%; top: 2%; transform: translateX(-50%) rotate(-6deg); filter: drop-shadow(0 3px 6px rgba(0,0,0,.25)); }
.encuadre figcaption { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--fg-3); }
.encuadre figcaption .ms { font-size: 18px; color: var(--status-danger); }
.encuadre.bien figcaption { color: var(--fg-1); }
.encuadre.bien figcaption .ms { color: var(--status-success); }

/* Funciones */
.grilla-funciones { display: grid; gap: 12px; }
.grilla-funciones article { padding: 22px; border-radius: var(--radius-lg); border: 1px solid var(--border-1); display: flex; flex-direction: column; gap: 8px; transition: box-shadow var(--motion-duration-medium), transform var(--motion-duration-medium); }
.grilla-funciones article:hover { box-shadow: var(--elev-3); transform: translateY(-2px); }
.grilla-funciones .ms { font-size: 28px; color: var(--brand-accent); }
.grilla-funciones b { font-size: 17px; font-weight: 600; }
.grilla-funciones p { font-size: 14px; line-height: 22px; color: var(--fg-2); }

/* Visor de PDF de muestra */
.visor-mock { border-radius: var(--radius-xl); background: #1c1c1c; color: #fff; overflow: hidden; box-shadow: 0 30px 60px -24px rgba(0,0,0,.45); }
.visor-mock-barra { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,.08); font-size: 13px; }
.visor-mock-barra b { font-weight: 600; }
.visor-mock-barra span { font-size: 10px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; color: #cfd9ff; background: rgba(110,149,245,.2); padding: 3px 9px; border-radius: var(--radius-full); }
.visor-mock-barra i { margin-left: auto; font-size: 18px; color: #bbb; }
.visor-mock-hoja { display: flex; margin: 28px 20px; aspect-ratio: 2 / 1.33; box-shadow: 0 18px 40px rgba(0,0,0,.5); position: relative; }
.visor-mock-hoja::after { content: ''; position: absolute; top: 0; bottom: 0; left: 50%; width: 30px; transform: translateX(-50%); background: linear-gradient(90deg, transparent, rgba(0,0,0,.12) 50%, transparent); }
.visor-mock-hoja .pag { flex: 1; position: relative; overflow: hidden; background: #fff; }
.visor-mock-hoja .pag > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.visor-mock-hoja .pag.blanca { background: #fbf6f2; }
.visor-mock-hoja .pag.blanca .foto { position: absolute; left: 12%; top: 9%; width: 76%; height: 66%; overflow: hidden; }
.visor-mock-hoja .pag.blanca .foto img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%; }
.visor-mock-hoja .pag.blanca span { position: absolute; left: 0; right: 0; bottom: 9%; text-align: center; color: #4a2f31; font: italic 400 clamp(14px, 3.4vw, 22px)/1 'Cormorant Garamond', serif; }
.visor-mock-pie { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-top: 1px solid rgba(255,255,255,.08); font-size: 12px; color: #9a9a9a; }
.visor-mock-pie .ms { font-size: 18px; color: #7ee2a8; }
.visor-mock-pie b { margin-left: auto; background: #6e95f5; color: #0a1330; padding: 8px 14px; border-radius: var(--radius-full); font-size: 12px; }

/* Formatos */
.lista-formatos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.formato { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 24px 8px 20px; border-radius: var(--radius-lg); background: var(--bg-2); border: 1px solid var(--border-1); }
.formato i { display: block; max-width: 100%; border-radius: 2px 6px 6px 2px; background: linear-gradient(135deg, #fff, #eef2fb); box-shadow: 0 0 0 1.5px var(--brand-accent), 6px 8px 0 -2px color-mix(in srgb, var(--brand-accent) 18%, transparent); margin-bottom: 8px; transform: scale(.8); }
.formato b { font-size: 15px; font-weight: 600; }
.formato small { font-size: 13px; color: var(--fg-3); }

/* Preguntas */
.lista-preguntas { display: flex; flex-direction: column; gap: 10px; max-width: 820px; }
.lista-preguntas details { border-radius: var(--radius-md); border: 1px solid var(--border-1); background: var(--bg-1); }
.lista-preguntas details[open] { border-color: var(--border-2); box-shadow: var(--elev-2); }
.lista-preguntas summary { list-style: none; cursor: pointer; padding: 18px 52px 18px 20px; font-size: 16px; font-weight: 600; position: relative; }
.lista-preguntas summary::-webkit-details-marker { display: none; }
.lista-preguntas summary::after { content: 'add'; font-family: 'Material Symbols Rounded'; font-weight: 400; font-size: 22px; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); color: var(--brand-accent); transition: transform var(--motion-duration-short); }
.lista-preguntas details[open] summary::after { content: 'remove'; }
.lista-preguntas details p { padding: 0 20px 20px; font-size: 15px; line-height: 24px; color: var(--fg-2); }

/* Cierre */
.cierre { position: relative; overflow: hidden; margin: 24px 16px 0; padding: 56px 24px; border-radius: var(--radius-xl); background: radial-gradient(120% 140% at 100% 0%, #2f6be0 0%, var(--brand-accent) 45%, #0a2a73 100%); color: #fff; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.cierre h2 { font: 600 32px/1.1 var(--font-sans); letter-spacing: -.6px; }
.cierre p { font-size: 16px; opacity: .9; }
.cierre .ctas { justify-content: center; margin-top: 16px; }
.cierre .c-s1 { width: 34%; max-width: 220px; left: -6%; top: -14%; opacity: .55; }
.cierre .c-s2 { width: 22%; max-width: 150px; right: 2%; bottom: 4%; opacity: .9; }

/* Pie */
.pie { max-width: 1240px; margin: 0 auto; padding: 36px 16px calc(36px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; }
.pie-fila { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.pie-fila img { margin-right: auto; height: 22px; width: auto; }
.pie-fila a { font-size: 14px; font-weight: 500; text-decoration: none; }
.pie p { font-size: 12px; line-height: 18px; color: var(--fg-3); }

/* ---- Tablet ---- */
@media (min-width: 640px) {
    .hero h1 { font-size: 54px; }
    .ctas .boton { flex: 0 0 auto; }
    .tarjetas-evento { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .tarjeta-evento { aspect-ratio: 3 / 4; }
    .lista-pasos { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .grilla-funciones { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .bloque h2, .destacado h2 { font-size: 36px; }
    .cierre h2 { font-size: 40px; }
}

/* ---- Escritorio ---- */
@media (min-width: 1000px) {
    .cabecera { height: 68px; padding: 0 32px; }
    .marca img { height: 26px; }
    .menu { display: flex; }
    .cabecera .boton { height: 42px; padding: 0 20px; font-size: 14px; }
    .hero { grid-template-columns: 1fr 1.08fr; align-items: center; gap: 48px; padding: 56px 32px 88px; min-height: calc(100vh - 68px); max-height: 900px; }
    .hero h1 { font-size: 68px; letter-spacing: -2px; }
    .bajada { font-size: 19px; line-height: 30px; }
    .hero-escena { min-height: 460px; }
    .chip-flotante { font-size: 13px; padding: 10px 16px 10px 10px; }
    .chip-flotante.c1 { left: -12px; bottom: 30px; }
    .chip-flotante.c2 { right: -12px; top: 40px; }
    .bloque { padding: 80px 32px; }
    .grilla-funciones { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
    .destacado { grid-template-columns: 1fr 1.1fr; gap: 72px; }
    .destacado.invertido .destacado-texto { order: 2; }
    .comparar { gap: 18px; }
    .formato { padding: 32px 12px 24px; }
    .formato i { transform: none; }
    .cierre { margin: 40px auto 0; max-width: 1176px; padding: 80px 32px; }
    .cierre h2 { font-size: 48px; }
    .pie { padding: 40px 32px; }
}

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