/* ═══════════════════════════════════════════════════════════
   UnboringBooks — Hoja de estilos compartida
   Estética: editorial limpia, fondo crema, acento rojo,
   display con carácter (Bricolage Grotesque) + cuerpo DM Sans
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400;12..96,600;12..96,800&family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;1,9..40,400&display=swap');

:root {
  --red:   #E8401F;   /* acento */
  --ink:   #1A1714;   /* texto y fondos oscuros */
  --white: #FFFFFF;
  --cream: #F4EFE6;   /* fondo principal */
  --muted: #8A8275;   /* texto secundario */
  --line:  #DDD5C7;   /* bordes suaves */
  --yellow:#F5C800;   /* cover kakuro */
  --blue:  #D6EEF8;   /* cover dinosaurios */
  --maxw:  1120px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .display {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.02em;
}

a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ─── HEADER ─────────────────────────────────────────────── */
header.site {
  position: sticky; top: 0; z-index: 50;
  background: rgba(244,239,230,0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
header.site .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 88px;
}
.logo {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800; font-size: 22px; letter-spacing: -0.03em;
  color: var(--ink); text-decoration: none;
}
.logo b { color: var(--red); }
nav.main a {
  color: var(--ink); font-weight: 500; font-size: 15px;
  margin-left: 28px; text-decoration: none;
}
nav.main a:hover { color: var(--red); }
.nav-toggle { display: none; background: none; border: 0; font-size: 24px; cursor: pointer; color: var(--ink); }

@media (max-width: 720px) {
  nav.main { display: none; position: absolute; top: 88px; left: 0; right: 0;
    background: var(--cream); border-bottom: 1px solid var(--line);
    flex-direction: column; padding: 16px 24px; }
  nav.main.open { display: flex; }
  nav.main a { margin: 8px 0; }
  .nav-toggle { display: block; }
}

/* ─── HERO ───────────────────────────────────────────────── */
.hero { padding: 80px 0 32px; }
.hero .eyebrow {
  display: inline-block; font-size: 13px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--red); margin-bottom: 20px;
}
.hero h1 { font-size: clamp(40px, 7vw, 76px); max-width: 14ch; }
.hero h1 em { font-style: normal; color: var(--red); }
.hero p.lead {
  font-size: 19px; color: var(--muted);
  max-width: 52ch; margin-top: 22px;
}
.hero .cta { margin-top: 34px; display: flex; gap: 14px; flex-wrap: wrap; }

/* ─── BOTONES ────────────────────────────────────────────── */
.btn {
  display: inline-block; font-family: 'DM Sans', sans-serif;
  font-weight: 600; font-size: 15px; padding: 13px 26px;
  border-radius: 999px; border: 2px solid var(--ink);
  cursor: pointer; transition: transform .12s ease, background .15s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary { background: var(--ink); color: var(--cream); }
.btn-primary:hover { background: var(--red); border-color: var(--red); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--cream); }

/* ─── SECCIONES ──────────────────────────────────────────── */
section { padding: 64px 0; }
.section-head { margin-bottom: 40px; }
.section-head h2 { font-size: clamp(28px, 4vw, 44px); }
.section-head p { color: var(--muted); margin-top: 10px; max-width: 56ch; }

/* ─── GRID DE LIBROS ─────────────────────────────────────── */
.books { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 28px; }
.book { background: var(--white); border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease; }
.book:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(26,23,20,0.10); }
.book .cover {
  aspect-ratio: 3/4; display: flex; align-items: center; justify-content: center;
  font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800;
  font-size: 26px; text-align: center; padding: 24px; color: var(--ink); line-height: 1.05;
}
.cover.bk-kk { background: var(--yellow); }
.cover.bk-ki { background: #FFE9A8; }
.cover.bk-dn { background: var(--blue); }
.cover.bk-su { background: #E4DCF5; }
.cover.bk-ki2{ background: #FBD0C2; }
.cover.bk-sa { background: #CDEBD7; }
.book .meta { padding: 18px; }
.book .meta .tag { font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--red); }
.book .meta h3 { font-size: 19px; margin: 6px 0 4px; }
.book .meta p { font-size: 14px; color: var(--muted); }

/* ─── NEWSLETTER ─────────────────────────────────────────── */
.newsletter { background: var(--ink); color: var(--cream); border-radius: 20px; padding: 56px 40px; text-align: center; }
.newsletter h2 { font-size: clamp(26px, 4vw, 40px); color: var(--cream); }
.newsletter p { color: rgba(244,239,230,0.7); margin-top: 12px; max-width: 48ch; margin-inline: auto; }
.nl-form { margin-top: 28px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.nl-form input {
  font-family: 'DM Sans', sans-serif; font-size: 15px; padding: 13px 18px;
  border-radius: 999px; border: 0; min-width: 280px; background: var(--cream); color: var(--ink);
}
.nl-ok { display: none; margin-top: 16px; color: var(--yellow); font-weight: 600; }

/* ─── FORMULARIOS ────────────────────────────────────────── */
.field { margin-bottom: 16px; text-align: left; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; font-family: 'DM Sans', sans-serif; font-size: 15px;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--white); color: var(--ink);
}
.field input:focus, .field textarea:focus { outline: 2px solid var(--red); border-color: var(--red); }
.form-card { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 36px; max-width: 480px; }

/* ─── TABS (registro/login) ──────────────────────────────── */
.tabs { display: flex; gap: 6px; background: var(--cream); padding: 5px; border-radius: 999px; margin-bottom: 24px; }
.tab { flex: 1; padding: 10px; border-radius: 999px; text-align: center; cursor: pointer;
  border: none; background: transparent; font-family: 'DM Sans', sans-serif;
  color: var(--muted); font-weight: 500; font-size: 15px; }
.tab.active { background: var(--ink); color: var(--white); }

/* ─── DESCARGAS ──────────────────────────────────────────── */
.dl-section { margin-bottom: 28px; }
.dl-section h4 { font-family: 'Bricolage Grotesque', sans-serif; font-size: 18px; margin-bottom: 12px; }
.dl-item { display: flex; align-items: center; gap: 14px; background: var(--white);
  border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 10px; }
.dl-icon { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center;
  justify-content: center; font-size: 22px; flex-shrink: 0; background: var(--cream); }
.dl-item-info { flex: 1; }
.dl-item-info strong { display: block; font-size: 15px; }
.dl-item-info span { font-size: 13px; color: var(--muted); }
.dl-btn { font-family: 'DM Sans', sans-serif; font-weight: 600; font-size: 14px;
  padding: 10px 18px; border-radius: 999px; border: 2px solid var(--ink); background: var(--ink);
  color: var(--cream); cursor: pointer; }
.dl-btn:hover { background: var(--red); border-color: var(--red); }

/* ─── NOTAS / LEGAL ──────────────────────────────────────── */
.legal-note { font-size: 12px; color: var(--muted); text-align: center; margin-top: 14px; line-height: 1.6; }
.legal-note a { color: var(--red); }

.legal-body { max-width: 740px; margin: 0 auto; }
.legal-body h1 { font-size: clamp(30px, 5vw, 48px); margin-bottom: 8px; }
.legal-body h2 { font-size: 22px; margin: 32px 0 10px; }
.legal-body p, .legal-body li { color: var(--ink); margin-bottom: 12px; }
.legal-body ul { padding-left: 22px; }
.legal-body .updated { color: var(--muted); font-size: 14px; margin-bottom: 28px; }

/* ─── FOOTER ─────────────────────────────────────────────── */
footer.site { border-top: 1px solid var(--line); padding: 48px 0 40px; margin-top: 40px; }
footer.site .cols { display: flex; flex-wrap: wrap; gap: 40px; justify-content: space-between; }
footer.site .logo { margin-bottom: 12px; display: inline-block; }
footer.site .fcol h5 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted); margin-bottom: 12px; }
footer.site .fcol a { display: block; color: var(--ink); font-size: 14px; margin-bottom: 8px; }
footer.site .fcol a:hover { color: var(--red); }
footer.site .copy { margin-top: 36px; font-size: 13px; color: var(--muted); }

/* ─── UTILIDADES ─────────────────────────────────────────── */
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.hidden { display: none; }

/* ═══════════════════════════════════════════════════════════
   AÑADIDOS v3: cookies, checkboxes, "próximamente", ficha libro
   ═══════════════════════════════════════════════════════════ */

/* ─── BANNER DE COOKIES ──────────────────────────────────── */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 100;
  max-width: 560px; margin: 0 auto;
  background: var(--ink); color: var(--cream);
  border-radius: 16px; padding: 22px 24px;
  box-shadow: 0 20px 60px rgba(26,23,20,0.35);
  display: none;
}
.cookie-banner.show { display: block; animation: cb-up .3s ease; }
@keyframes cb-up { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.cookie-banner h4 { font-family: 'Bricolage Grotesque', sans-serif; font-size: 18px; margin-bottom: 8px; color: var(--cream); }
.cookie-banner p { font-size: 14px; color: rgba(244,239,230,0.75); margin-bottom: 16px; }
.cookie-banner p a { color: var(--yellow); }
.cookie-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cookie-actions .btn { font-size: 14px; padding: 10px 20px; }
.cookie-btn-accept { background: var(--yellow); color: var(--ink); border-color: var(--yellow); }
.cookie-btn-accept:hover { background: var(--white); border-color: var(--white); }
.cookie-btn-reject, .cookie-btn-prefs { background: transparent; color: var(--cream); border-color: rgba(244,239,230,0.4); }
.cookie-btn-reject:hover, .cookie-btn-prefs:hover { background: rgba(244,239,230,0.12); }

/* Panel de preferencias (dentro del banner) */
.cookie-prefs { margin: 4px 0 16px; display: none; }
.cookie-prefs.show { display: block; }
.cookie-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-top: 1px solid rgba(244,239,230,0.15); }
.cookie-row:first-child { border-top: 0; }
.cookie-row .ck-text { flex: 1; }
.cookie-row .ck-text strong { display: block; font-size: 14px; color: var(--cream); }
.cookie-row .ck-text span { font-size: 13px; color: rgba(244,239,230,0.65); }
.cookie-row input[type="checkbox"] { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--yellow); }
.cookie-row input:disabled { opacity: 0.6; }

/* ─── CASILLAS EN FORMULARIOS ────────────────────────────── */
.check { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 14px; }
.check input[type="checkbox"] { width: 18px; height: 18px; margin-top: 3px; flex-shrink: 0; accent-color: var(--red); cursor: pointer; }
.check label { font-size: 14px; color: var(--ink); line-height: 1.5; cursor: pointer; }
.check label .req { color: var(--red); }

/* ─── ETIQUETA "PRÓXIMAMENTE" ────────────────────────────── */
.book.soon { opacity: 0.78; }
.book.soon .cover { position: relative; filter: saturate(0.7); }
.book .badge-soon {
  position: absolute; top: 12px; right: 12px;
  background: var(--ink); color: var(--cream);
  font-family: 'DM Sans', sans-serif; font-weight: 600; font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.08em;
  padding: 5px 11px; border-radius: 999px;
}

/* ─── FICHA DE LIBRO ─────────────────────────────────────── */
.book-detail { display: grid; grid-template-columns: 320px 1fr; gap: 48px; align-items: start; }
@media (max-width: 760px) { .book-detail { grid-template-columns: 1fr; gap: 28px; } }
.book-detail .cover-lg {
  aspect-ratio: 3/4; border-radius: 16px; display: flex; align-items: center; justify-content: center;
  font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: 34px;
  text-align: center; padding: 30px; color: var(--ink); line-height: 1.05;
  border: 1px solid var(--line);
}
.book-detail .info .tag { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--red); }
.book-detail .info h1 { font-size: clamp(30px, 5vw, 50px); margin: 8px 0 16px; }
.book-detail .info p.lead { font-size: 18px; color: var(--ink); margin-bottom: 20px; }
.book-detail .specs { list-style: none; padding: 0; margin: 22px 0; border-top: 1px solid var(--line); }
.book-detail .specs li { display: flex; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.book-detail .specs li span:first-child { color: var(--muted); }
.placeholder-note { background: #FFF8E8; border: 1px dashed var(--yellow); border-radius: 10px; padding: 12px 16px; font-size: 13px; color: #7a6a2e; margin: 16px 0; }

/* Tarjetas de libro que son enlaces: sin subrayado ni color de link */
a.book, a.book:hover { text-decoration: none; color: inherit; }
a.book .meta h3 { color: var(--ink); }

/* Portadas reales en las tarjetas */
.book .cover.has-img { padding: 0; }
.book .cover.has-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Separador entre disponibles y próximamente */
.soon-divider { display: flex; align-items: center; gap: 16px; margin: 48px 0 28px; }
.soon-divider::before, .soon-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.soon-divider span { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
/* Forzar 3 columnas en la fila de disponibles (en pantallas anchas) */
.books-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 720px) { .books-3 { grid-template-columns: 1fr; } }

/* Casillas dentro del bloque oscuro de newsletter */
.nl-checks { max-width: 460px; margin: 18px auto 0; text-align: left; }
.check-dark label { color: rgba(244,239,230,0.85); }
.check-dark label a { color: var(--yellow); }
.check-dark input[type="checkbox"] { accent-color: var(--yellow); }

/* ─── Lockup logo: isotipo + texto (cabecera/footer) ──────── */
.logo-lockup { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.logo-lockup:hover { text-decoration: none; }
.logo-lockup img { display: block; }
.logo-lockup .logo-text {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800; letter-spacing: -0.03em; line-height: 1;
  color: var(--ink);
}
.logo-lockup .logo-text b { color: var(--red); font-weight: 800; }
/* header: isotipo grande (doble) + texto */
header.site .logo-lockup img { height: 52px; }
header.site .logo-lockup .logo-text { font-size: 26px; }
/* footer: algo menor */
footer.site .logo-lockup img { height: 44px; }
footer.site .logo-lockup .logo-text { font-size: 22px; }
@media (max-width: 720px){
  header.site .logo-lockup img { height: 44px; }
  header.site .logo-lockup .logo-text { font-size: 22px; }
}

/* Frase del QR al pie del catálogo: tipografía de títulos, tamaño contenido */
.qr-note {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-top: 48px;
}


/* Catálogo: encabezados de sección simples (estilo v10) */
.cat-sub { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800;
  font-size: clamp(24px, 3.5vw, 34px); letter-spacing: -0.02em;
  margin: 56px 0 8px; color: var(--ink); }
.cat-sub:first-of-type { margin-top: 16px; }
.cat-sub + .cat-sub-desc { color: var(--muted); margin: 0 0 28px; font-size: 16px; }
