/* =============================================================================
   Úrsula Llanos · web de autora
   Paleta nocturna (misterio) con acentos dorados; la sección de Helena Llanos
   va en papel antiguo (novela histórica).
   ========================================================================== */

:root {
  --noche: #0a0f1d;
  --noche-2: #0e1528;
  --noche-3: #172039;
  --linea: rgba(214, 179, 106, .24);
  --texto: #efe9dd;
  --texto-suave: #bdb6a8;
  --oro: #d6b36a;
  --oro-claro: #ecd39a;
  --oro-oscuro: #6f5016;
  --papel: #f5eddc;
  --tinta: #2b2116;
  --tinta-suave: #574836;
  --carmesi: #9b2335;
  --aviso: #f0b429;

  --f-titulo: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --f-texto: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ancho: 1200px;
  --cabecera-alto: 68px;
  --curva: cubic-bezier(.2, .7, .2, 1);
  --sombra-libro: 0 22px 40px -20px rgba(0, 0, 0, .85), 0 8px 16px -8px rgba(0, 0, 0, .6);
}

/* --- Base ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--cabecera-alto) + 8px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--noche);
  color: var(--texto);
  font-family: var(--f-texto);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--oro-claro); text-underline-offset: 3px; }
a:hover { color: #fff; }
:focus-visible { outline: 2px solid var(--oro); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--f-titulo);
  font-weight: 600;
  line-height: 1.08;
  text-wrap: balance;
}
p { margin: 0 0 1em; }

.contenedor { width: min(100% - 2rem, var(--ancho)); margin-inline: auto; }

.visualmente-oculto {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.saltar {
  position: absolute; left: 1rem; top: -100px; z-index: 100;
  padding: .6rem 1rem; border-radius: 6px;
  background: var(--oro); color: #1a1408; font-weight: 600; text-decoration: none;
}
.saltar:focus { top: 1rem; }

.icono-externo { display: inline-block; width: .85em; height: .85em; margin-left: .4em; flex: none; }

/* --- Botones y etiquetas -------------------------------------------------- */
.boton {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: .8rem 1.4rem;
  border: 1px solid transparent; border-radius: 999px;
  font: 600 .95rem/1.2 var(--f-texto); letter-spacing: .02em;
  text-decoration: none; cursor: pointer;
  transition: transform .25s var(--curva), background-color .25s, color .25s, border-color .25s, box-shadow .25s;
}
.boton--oro {
  background: linear-gradient(180deg, #e6c886, #c9a254);
  color: #1a1408;
  box-shadow: 0 10px 26px -12px rgba(214, 179, 106, .7);
}
.boton--oro:hover { color: #1a1408; transform: translateY(-2px); box-shadow: 0 16px 32px -12px rgba(214, 179, 106, .85); }
.boton--fantasma { border-color: rgba(236, 211, 154, .5); background: transparent; color: var(--texto); }
.boton--fantasma:hover { color: #fff; background: rgba(236, 211, 154, .1); border-color: var(--oro); }
.boton--libro {
  min-height: 40px; padding: .55rem 1rem; font-size: .84rem;
  border-color: rgba(214, 179, 106, .55); color: var(--oro-claro);
}
.boton--libro:hover { background: var(--oro); border-color: var(--oro); color: #1a1408; }

.etiqueta {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .32rem .75rem; border-radius: 999px;
  font-size: .7rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; line-height: 1.3;
}
.etiqueta--viva { background: var(--carmesi); color: #fff; }
.etiqueta--viva::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: #ffd9de;
  animation: latido 1.8s ease-in-out infinite;
}
.etiqueta--oro { background: rgba(214, 179, 106, .14); border: 1px solid rgba(214, 179, 106, .45); color: var(--oro-claro); }

.ku {
  display: flex; align-items: flex-start; gap: .4rem;
  margin: 0 0 .9rem;
  font-size: .72rem; font-weight: 600; letter-spacing: .03em; line-height: 1.35;
  color: var(--oro-claro);
}
.ku svg { width: 15px; height: 15px; flex: none; margin-top: .02em; }

/* Marcador de contenido pendiente: muy visible a propósito. */
.pendiente {
  margin: 1.25rem 0;
  padding: 1rem 1.15rem;
  border: 2px dashed var(--aviso);
  border-radius: 10px;
  background: repeating-linear-gradient(-45deg, rgba(240, 180, 41, .1) 0 12px, rgba(240, 180, 41, .03) 12px 24px);
  color: #ffe3a3;
  font-size: .92rem; line-height: 1.55; text-align: left;
}
.pendiente > strong:first-child {
  display: inline-block; margin-right: .5rem; padding: .15rem .5rem; border-radius: 4px;
  background: var(--aviso); color: #1a1408;
  font-size: .68rem; letter-spacing: .14em; text-transform: uppercase;
}

/* --- Cabecera ------------------------------------------------------------- */
.cabecera {
  position: fixed; inset: 0 0 auto; z-index: 50;
  height: var(--cabecera-alto);
  display: flex; align-items: center;
  transition: background-color .4s, box-shadow .4s;
}
.cabecera--solida {
  background: rgba(10, 15, 29, .84);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  backdrop-filter: blur(12px) saturate(140%);
  box-shadow: 0 1px 0 var(--linea);
}
.cabecera__fila { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }

.marca {
  font-family: var(--f-titulo); font-size: 1.55rem; font-weight: 600; line-height: 1;
  color: var(--texto); text-decoration: none; letter-spacing: .01em;
}
.marca:hover { color: var(--oro-claro); }

.menu ul { display: flex; align-items: center; gap: .2rem; margin: 0; padding: 0; list-style: none; }
.menu a {
  position: relative; display: block;
  padding: .5rem .8rem; border-radius: 999px;
  color: var(--texto); text-decoration: none;
  font-size: .88rem; font-weight: 500; letter-spacing: .04em;
}
.menu a::after {
  content: ""; position: absolute; left: .8rem; right: .8rem; bottom: .3rem; height: 1px;
  background: var(--oro); transform: scaleX(0); transform-origin: left;
  transition: transform .35s var(--curva);
}
.menu a:hover::after, .menu a.activo::after { transform: scaleX(1); }
.menu a.menu__destacado { margin-left: .4rem; border: 1px solid var(--oro); color: var(--oro-claro); }
.menu a.menu__destacado::after { display: none; }
.menu a.menu__destacado:hover { background: var(--oro); color: #1a1408; }

.menu-boton { display: none; }

@media (max-width: 1000px) {
  .menu-boton {
    display: inline-grid; place-items: center;
    width: 44px; height: 44px;
    border: 1px solid var(--linea); border-radius: 50%;
    background: rgba(10, 15, 29, .5); color: var(--texto); cursor: pointer;
  }
  .menu-boton__icono, .menu-boton__icono::before, .menu-boton__icono::after {
    display: block; width: 18px; height: 1.5px; background: currentColor; border-radius: 2px;
    transition: transform .3s var(--curva), opacity .2s;
  }
  .menu-boton__icono { position: relative; }
  .menu-boton__icono::before, .menu-boton__icono::after { content: ""; position: absolute; left: 0; }
  .menu-boton__icono::before { top: -6px; }
  .menu-boton__icono::after { top: 6px; }
  .menu-boton[aria-expanded="true"] .menu-boton__icono { background: transparent; }
  .menu-boton[aria-expanded="true"] .menu-boton__icono::before { transform: translateY(6px) rotate(45deg); }
  .menu-boton[aria-expanded="true"] .menu-boton__icono::after { transform: translateY(-6px) rotate(-45deg); }

  .js .menu {
    position: fixed; inset: var(--cabecera-alto) 0 auto 0;
    background: rgba(10, 15, 29, .97);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--linea);
    opacity: 0; visibility: hidden; transform: translateY(-10px);
    transition: opacity .3s, transform .3s var(--curva), visibility 0s .3s;
  }
  .js .menu.menu--abierto { opacity: 1; visibility: visible; transform: none; transition: opacity .3s, transform .3s var(--curva); }
  .js .menu ul { flex-direction: column; align-items: stretch; padding: .75rem 1rem 1.25rem; }
  .js .menu a { padding: .85rem 1rem; font-size: 1.05rem; }
  .js .menu a.menu__destacado { margin: .5rem 0 0; text-align: center; }
  html:not(.js) .menu { display: none; }
}

/* --- Portada (hero) ------------------------------------------------------------ */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; align-items: center;
  min-height: 100vh; min-height: 100svh;
  padding: calc(var(--cabecera-alto) + 2.5rem) 0 6rem;
  background:
    radial-gradient(90% 70% at 78% 18%, #1f2d52 0%, rgba(20, 30, 58, .6) 40%, transparent 72%),
    linear-gradient(180deg, #0c1326 0%, var(--noche) 100%);
}
.hero::after {
  content: ""; position: absolute; inset: auto 0 0; height: 140px; z-index: 0;
  background: linear-gradient(180deg, transparent, var(--noche));
  pointer-events: none;
}
.hero__ambiente { position: absolute; inset: 0; z-index: -1; pointer-events: none; }

.hero__luna {
  position: absolute; top: 9%; right: 5%;
  width: clamp(100px, 11vw, 170px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 38% 36%, #fffaf0 0%, #f3e6c4 38%, #cdb98d 70%, #a8946a 100%);
  opacity: .7;
  box-shadow: 0 0 60px 10px rgba(243, 230, 196, .22), 0 0 180px 60px rgba(243, 230, 196, .1);
  animation: respira 10s ease-in-out infinite;
}
.hero__luna::after {
  /* nube fina que cruza la luna */
  content: ""; position: absolute; inset: 42% -70% 36% -70%;
  background: radial-gradient(closest-side, rgba(14, 21, 42, .55), transparent);
  filter: blur(12px);
  animation: nube 38s ease-in-out infinite alternate;
}

.hero__haz {
  /* haz de un faro lejano que barre la noche */
  position: absolute; left: 0; top: 64%;
  width: 160vmax; height: 160vmax;
  translate: 0 -50%;
  transform-origin: 0 50%;
  background: conic-gradient(from 72deg at 0 50%, transparent 0deg, rgba(255, 238, 196, .09) 7deg, rgba(255, 238, 196, .03) 12deg, transparent 16deg);
  filter: blur(4px);
  mix-blend-mode: screen;
  animation: barrido 16s ease-in-out infinite alternate;
}

.hero__niebla {
  position: absolute; left: -50%; width: 200%;
  background:
    radial-gradient(ellipse 22% 42% at 18% 62%, rgba(196, 206, 230, .16), transparent 70%),
    radial-gradient(ellipse 26% 36% at 46% 72%, rgba(196, 206, 230, .12), transparent 70%),
    radial-gradient(ellipse 24% 46% at 72% 58%, rgba(196, 206, 230, .15), transparent 70%),
    radial-gradient(ellipse 18% 30% at 92% 70%, rgba(196, 206, 230, .1), transparent 70%);
  filter: blur(18px);
  will-change: transform;
}
.hero__niebla--1 { bottom: -12%; height: 60%; animation: niebla 70s linear infinite alternate; }
.hero__niebla--2 { bottom: -22%; height: 50%; opacity: .85; animation: niebla 95s linear infinite alternate-reverse; }

.hero__grano {
  position: absolute; inset: 0; opacity: .08; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.hero__rejilla {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: 3rem;
}

.hero__texto > * { animation: entrar 1.1s var(--curva) both; }
.hero__texto > :nth-child(2) { animation-delay: .12s; }
.hero__texto > :nth-child(3) { animation: nombre 1.6s var(--curva) .2s both; }
.hero__texto > :nth-child(4) { animation-delay: .55s; }
.hero__texto > :nth-child(5) { animation-delay: .7s; }
.hero__texto > :nth-child(6) { animation-delay: .85s; }

.hero__aviso {
  display: inline-flex; align-items: center; flex-wrap: wrap; gap: .4rem .65rem;
  margin-bottom: 1.8rem; padding: .35rem 1rem .35rem .4rem;
  border: 1px solid var(--linea); border-radius: 999px;
  background: rgba(255, 255, 255, .05);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  color: var(--texto); font-size: .86rem; line-height: 1.35; text-decoration: none;
  transition: border-color .3s, background-color .3s;
}
.hero__aviso:hover { color: #fff; border-color: var(--oro); background: rgba(214, 179, 106, .1); }
.hero__aviso .etiqueta { padding: .22rem .6rem; font-size: .64rem; }

.hero__antetitulo {
  margin-bottom: 1.1rem;
  color: var(--oro); font-size: .8rem; font-weight: 600; letter-spacing: .28em; text-transform: uppercase;
}
.hero__nombre {
  font-size: clamp(3.4rem, 9.2vw, 7.6rem); font-weight: 600; line-height: .92; letter-spacing: -.01em;
  color: #fbf6ea;
  text-shadow: 0 4px 40px rgba(0, 0, 0, .55);
}
.hero__lema {
  margin: 1.1rem 0 1.4rem;
  font-family: var(--f-titulo); font-style: italic; font-weight: 500;
  font-size: clamp(1.55rem, 3.3vw, 2.5rem); line-height: 1.2;
  color: var(--oro-claro);
}
.hero__dato { color: var(--texto-suave); font-size: .98rem; letter-spacing: .02em; text-wrap: balance; }
.hero__antetitulo { text-wrap: balance; }
.hero__acciones { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }

.hero__portadas {
  position: relative;
  height: clamp(340px, 40vw, 520px);
  perspective: 1400px;
  animation: entrar 1.4s var(--curva) .45s both;
}
.hero__pila {
  /* se inclina un poco siguiendo al ratón (js/principal.js) */
  position: absolute; inset: 0;
  transform: rotateY(calc(var(--giro-y, 0) * 1deg)) rotateX(calc(var(--giro-x, 0) * 1deg));
  transition: transform .9s var(--curva);
}
.hero__portada {
  position: absolute; top: 50%; left: 50%;
  width: clamp(160px, 18.5vw, 260px);
  translate: -50% -50%;
  transition: transform .8s var(--curva), filter .8s;
}
.hero__portada .tapa { animation: flotar 7s ease-in-out infinite; }
.hero__portada:nth-child(1) { transform: translateX(-56%) rotate(-9deg) scale(.84); filter: brightness(.72); }
.hero__portada:nth-child(2) { transform: translateX(56%) rotate(8deg) scale(.84); filter: brightness(.72); }
.hero__portada:nth-child(1) .tapa { animation-delay: -2.3s; }
.hero__portada:nth-child(2) .tapa { animation-delay: -4.6s; }
.hero__portada:nth-child(3) { z-index: 2; }
.hero__portadas:hover .hero__portada:nth-child(1) { transform: translateX(-74%) rotate(-13deg) scale(.86); filter: brightness(.88); }
.hero__portadas:hover .hero__portada:nth-child(2) { transform: translateX(74%) rotate(12deg) scale(.86); filter: brightness(.88); }
.hero__portadas:hover .hero__portada:nth-child(3) { transform: translateY(-8px) scale(1.03); }
.hero__portada .tapa { box-shadow: 0 40px 60px -24px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255, 255, 255, .06); }

.hero__bajar {
  position: absolute; left: 50%; bottom: 1.8rem; z-index: 2;
  width: 26px; height: 42px; translate: -50% 0;
  border: 1.5px solid rgba(236, 211, 154, .55); border-radius: 14px;
}
.hero__bajar::before {
  content: ""; position: absolute; left: 50%; top: 8px;
  width: 4px; height: 8px; margin-left: -2px; border-radius: 2px;
  background: var(--oro);
  animation: rueda 2.2s var(--curva) infinite;
}

@media (max-width: 900px) {
  .hero { min-height: auto; padding: calc(var(--cabecera-alto) + 2.5rem) 0 5.5rem; }
  .hero__rejilla { grid-template-columns: 1fr; gap: 2.5rem; text-align: center; }
  .hero__acciones { justify-content: center; }
  .hero__portadas { height: 300px; }
  .hero__portada { width: 150px; }
  /* la luna asoma por detrás de las portadas */
  .hero__luna { top: auto; bottom: 280px; right: 11%; width: 92px; }
  .hero__aviso { justify-content: center; padding: .45rem 1rem; border-radius: 18px; }
  .hero__antetitulo { font-size: .74rem; letter-spacing: .2em; }
}

/* --- Portadas de libro (comunes) -------------------------------------------- */
.tapa {
  position: relative; display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 3px 6px 6px 3px;
  background: var(--noche-3);
  box-shadow: var(--sombra-libro);
  container-type: inline-size;
}
.tapa img {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%; object-fit: cover;
  transition: opacity .7s ease, transform .7s var(--curva);
}
.js .tapa img { opacity: 0; }
.js .tapa img.cargada { opacity: 1; }
.tapa--sin-imagen img { display: none; }

/* lomo: sombra y brillo en el borde izquierdo */
.tapa::after {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(90deg, rgba(0, 0, 0, .38) 0, rgba(255, 255, 255, .14) 2.4%, rgba(0, 0, 0, .1) 5%, transparent 10%, transparent 94%, rgba(0, 0, 0, .18));
}
/* destello al pasar el ratón */
.tapa::before {
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: linear-gradient(115deg, transparent 32%, rgba(255, 255, 255, .26) 48%, transparent 62%);
  transform: translateX(-130%);
}

/* Portada tipográfica de reserva (si la imagen no carga) */
.portada-reserva {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: 18px 12px 22px; padding: 13cqi 10cqi 15cqi;
  text-align: center; color: #f4ead3;
  background:
    radial-gradient(120% 60% at 50% 18%, rgba(255, 255, 255, .1), transparent 60%),
    linear-gradient(165deg, var(--t1, #26385f), var(--t2, #0b1224));
}
.portada-reserva::before {
  content: ""; position: absolute; inset: 6px; inset: 4.5cqi;
  border: 1px solid rgba(214, 179, 106, .55);
  box-shadow: inset 0 0 0 3px transparent, inset 0 0 0 4px rgba(214, 179, 106, .22);
  pointer-events: none;
}
.portada-reserva__autora {
  font: 600 .62rem/1.2 var(--f-texto); font-size: 5.6cqi;
  letter-spacing: .24em; text-transform: uppercase; color: var(--oro);
}
.portada-reserva__titulo {
  font-family: var(--f-titulo); font-weight: 600; line-height: 1.05;
  font-size: 1.15rem; font-size: 12.5cqi;
  text-wrap: balance;
}
.portada-reserva__adorno {
  position: relative; width: 46%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--oro), transparent);
}
.portada-reserva__adorno::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px;
  background: var(--oro); transform: rotate(45deg);
}
[data-tono="0"] { --t1: #26385f; --t2: #0a1122; }
[data-tono="1"] { --t1: #5e1d29; --t2: #1b080d; }
[data-tono="2"] { --t1: #1f4237; --t2: #08140f; }
[data-tono="3"] { --t1: #27495a; --t2: #0a161d; }
[data-tono="4"] { --t1: #44284f; --t2: #130a17; }
[data-tono="5"] { --t1: #4d3b25; --t2: #160f07; }

/* --- Secciones ---------------------------------------------------------------- */
.seccion { position: relative; padding: clamp(4.5rem, 9vw, 7.5rem) 0; }
.seccion__cabecera { max-width: 48rem; margin: 0 auto clamp(2.5rem, 5vw, 3.75rem); text-align: center; }
.seccion h2 { font-size: clamp(2.3rem, 5vw, 3.6rem); }
.seccion__cabecera h2::after {
  content: ""; display: block; width: 120px; height: 12px; margin: 1.1rem auto 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='12'%3E%3Cpath d='M0 6h50M70 6h50' stroke='%23d6b36a' stroke-width='1'/%3E%3Cpath d='M60 1l5 5-5 5-5-5z' fill='%23d6b36a'/%3E%3C/svg%3E") center / contain no-repeat;
}
.antetitulo {
  display: block; margin-bottom: .8rem;
  color: var(--oro); font-family: var(--f-texto);
  font-size: .78rem; font-weight: 600; letter-spacing: .26em; text-transform: uppercase; line-height: 1.4;
}
.seccion__entradilla { max-width: 40rem; margin: 1.1rem auto 0; color: var(--texto-suave); font-size: 1.08rem; }

.enlace-autora { margin: clamp(2.5rem, 5vw, 3.5rem) 0 0; text-align: center; }
.enlace-autora a {
  display: inline-flex; align-items: center;
  font-weight: 500; text-decoration-color: rgba(214, 179, 106, .5);
}

/* --- Novedades ---------------------------------------------------------------- */
.novedades { background: linear-gradient(180deg, var(--noche) 0%, var(--noche-2) 100%); }
.novedades__rejilla { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.25rem, 3vw, 2.25rem); }

.novedad {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; grid-template-columns: minmax(130px, 190px) minmax(0, 1fr); align-items: center;
  gap: clamp(1.25rem, 2.5vw, 2rem);
  padding: clamp(1.4rem, 3vw, 2.25rem);
  border: 1px solid var(--linea); border-radius: 18px;
  background: linear-gradient(150deg, rgba(31, 44, 80, .9), rgba(14, 21, 40, .95));
}
.novedad::before {
  content: ""; position: absolute; z-index: -1;
  width: 70%; aspect-ratio: 1; top: -35%; right: -25%;
  background: radial-gradient(closest-side, rgba(214, 179, 106, .16), transparent);
  animation: respira 9s ease-in-out infinite;
}
.novedad h3 { font-size: clamp(1.7rem, 2.6vw, 2.25rem); margin: .9rem 0 .4rem; }
.novedad__autora { color: var(--oro); font-size: .86rem; font-weight: 500; letter-spacing: .04em; margin-bottom: .8rem; }
.novedad__cuerpo > p:not([class]) { color: var(--texto-suave); font-size: .98rem; }
.novedad__portada { display: block; perspective: 900px; }
.novedad__portada .tapa, .libro__portada .tapa, .historico__portada .tapa {
  transition: transform .6s var(--curva), box-shadow .6s;
}
.novedad:hover .tapa { transform: translateY(-6px) rotateY(-8deg); }
.novedad:hover .tapa::before { transform: translateX(130%); transition: transform 1s ease; }

@media (max-width: 1020px) { .novedades__rejilla { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
  .novedad { grid-template-columns: 1fr; text-align: left; }
  .novedad__portada { width: 58%; max-width: 210px; margin: 0 auto .25rem; }
}

.novedad__acciones { display: flex; flex-wrap: wrap; gap: .6rem; }

/* --- Noelia Villarroel ------------------------------------------------------------- */
.noelia {
  overflow: hidden;
  background:
    radial-gradient(60% 70% at 85% 30%, rgba(155, 35, 53, .14), transparent 70%),
    radial-gradient(50% 60% at 10% 90%, rgba(214, 179, 106, .07), transparent 70%),
    var(--noche);
}
.noelia__rejilla { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); align-items: center; gap: clamp(2.5rem, 6vw, 5rem); }
.noelia__texto h2 { font-size: clamp(2.5rem, 5.4vw, 4rem); }
.noelia__lema { margin: .9rem 0 1.4rem; font-family: var(--f-titulo); font-style: italic; font-size: clamp(1.35rem, 2.4vw, 1.75rem); line-height: 1.25; color: var(--oro-claro); }
.noelia__texto > p:not([class]) { color: var(--texto-suave); max-width: 36rem; }
.noelia__texto .boton { margin-top: .75rem; }

.expediente {
  position: relative;
  margin-top: 28px; padding: 2.4rem 2.2rem 2.2rem;
  border-radius: 2px 14px 14px 14px;
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(255, 255, 255, .5), transparent 55%),
    linear-gradient(170deg, #efe3c3, #e2d0a4);
  color: var(--tinta);
  box-shadow: 0 40px 70px -35px rgba(0, 0, 0, .95), 0 2px 0 rgba(255, 255, 255, .4) inset;
  rotate: -1.5deg;
}
.expediente::after {
  /* textura de cartulina */
  content: ""; position: absolute; inset: 0; border-radius: inherit; opacity: .35; mix-blend-mode: multiply; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.7' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .4 0 0 0 0 .25 0 0 0 .4 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)'/%3E%3C/svg%3E");
}
.expediente__pestana {
  position: absolute; left: 0; bottom: 100%; margin: 0;
  padding: .35rem 1.4rem .25rem; border-radius: 10px 14px 0 0;
  background: #e9dab3; color: var(--oro-oscuro);
  font-size: .72rem; font-weight: 600; letter-spacing: .26em; text-transform: uppercase;
}
.expediente__balanza { position: absolute; top: 1.4rem; right: 1.5rem; width: 46px; height: 46px; color: rgba(111, 80, 22, .55); }
.expediente__datos { position: relative; z-index: 1; margin: 0; }
.expediente__datos > div { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 1rem; padding: .7rem 0; border-bottom: 1px dashed rgba(111, 80, 22, .35); }
.expediente__datos > div:last-child { border-bottom: 0; }
.expediente__datos dt { color: var(--tinta-suave); font-size: .7rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; padding-top: .35rem; }
.expediente__datos dd { margin: 0; font-family: var(--f-titulo); font-size: 1.35rem; font-weight: 600; line-height: 1.2; }
.expediente__datos a { color: var(--tinta); text-decoration-color: rgba(111, 80, 22, .5); }
.expediente__datos a:hover { color: var(--carmesi); }
.expediente :focus-visible { outline-color: var(--oro-oscuro); }
.expediente__sello {
  position: absolute; right: 1.4rem; bottom: 1.3rem; z-index: 2;
  padding: .3rem .9rem; border: 3px double rgba(155, 35, 53, .78); border-radius: 6px;
  color: rgba(155, 35, 53, .82); font-size: 1.05rem; font-weight: 600; letter-spacing: .28em; text-transform: uppercase;
  rotate: -14deg; pointer-events: none;
}
.js .expediente.visible .expediente__sello { animation: sello .55s cubic-bezier(.3, 1.6, .5, 1) .6s both; }

.tira { margin-top: clamp(3rem, 6vw, 4.5rem); }
.tira__rotulo { margin-bottom: 1.2rem; color: var(--oro); font-size: .78rem; font-weight: 600; letter-spacing: .26em; text-transform: uppercase; text-align: center; }
.tira__lista { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 1.1rem; margin: 0; padding: 0; list-style: none; }
.tira__libro { display: block; color: var(--texto-suave); text-decoration: none; perspective: 800px; }
.tira__libro .tapa { transition: transform .5s var(--curva), box-shadow .5s; }
.tira__libro:hover .tapa, .tira__libro:focus-visible .tapa { transform: translateY(-6px) rotateY(-8deg); box-shadow: 0 26px 40px -20px rgba(0, 0, 0, .9), 0 0 0 1px rgba(214, 179, 106, .35); }
.tira__libro:hover .tapa::before { transform: translateX(130%); transition: transform 1s ease; }
.tira__titulo { display: block; margin-top: .65rem; font-family: var(--f-titulo); font-size: 1rem; font-weight: 600; line-height: 1.15; color: var(--texto); text-wrap: balance; }
.tira__libro:hover .tira__titulo { color: var(--oro-claro); }

@media (max-width: 900px) {
  .noelia__rejilla { grid-template-columns: 1fr; }
  .expediente { max-width: 520px; width: 100%; margin-inline: auto; }
  .tira__lista {
    display: flex; overflow-x: auto; gap: 1rem; padding-bottom: .5rem; scrollbar-width: none;
    scroll-snap-type: x proximity;
    -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent);
  }
  .tira__lista::-webkit-scrollbar { display: none; }
  .tira__lista > li { flex: 0 0 116px; scroll-snap-align: start; }
}
@media (max-width: 480px) {
  .expediente { padding: 2rem 1.3rem 1.6rem; rotate: -1deg; }
  .expediente__datos > div { grid-template-columns: 1fr; gap: .15rem; }
  .expediente__datos dt { padding-top: 0; }
  .expediente__balanza { width: 36px; height: 36px; top: 1rem; right: 1rem; }
}

/* --- Opiniones de lectores ---------------------------------------------------------- */
.estrellas { color: var(--oro); letter-spacing: .12em; font-size: .95rem; line-height: 1; white-space: nowrap; }
.estrellas__vacias { color: rgba(214, 179, 106, .28); }

.opiniones {
  background:
    radial-gradient(50% 60% at 50% 0%, rgba(214, 179, 106, .09), transparent 70%),
    var(--noche-2);
}
.opiniones .seccion__cabecera { margin-bottom: 1rem; }
.opiniones__total {
  margin: 0 auto clamp(2.5rem, 5vw, 3.5rem); text-align: center;
  color: var(--texto-suave); font-size: 1.05rem;
}
.opiniones__lista { columns: 3 300px; column-gap: 1.5rem; margin: 0; padding: 0; list-style: none; }
.opinion { break-inside: avoid; margin: 0 0 1.5rem; }
.opinion figure {
  position: relative; margin: 0; padding: 1.8rem 1.6rem 1.4rem;
  border: 1px solid var(--linea); border-radius: 16px;
  background: linear-gradient(160deg, rgba(31, 44, 80, .65), rgba(14, 21, 40, .85));
  transition: translate .4s var(--curva), border-color .4s, box-shadow .4s;
}
.opinion figure::before {
  content: "“"; position: absolute; top: .3rem; right: 1.1rem;
  font-family: var(--f-titulo); font-size: 5rem; line-height: 1; color: rgba(214, 179, 106, .2);
  pointer-events: none;
}
.opinion:hover figure { translate: 0 -4px; border-color: rgba(214, 179, 106, .5); box-shadow: 0 24px 40px -28px rgba(0, 0, 0, .9); }
.opinion blockquote { margin: .9rem 0 1.1rem; }
.opinion blockquote p { margin: 0; font-family: var(--f-titulo); font-size: 1.28rem; font-weight: 500; line-height: 1.4; color: var(--texto); }
.opinion figcaption { color: var(--texto-suave); font-size: .82rem; line-height: 1.45; }
.opinion figcaption a, .noelia__opinion figcaption a { color: var(--oro-claro); text-decoration-color: rgba(214, 179, 106, .5); }

.noelia__opinion { margin: 1.4rem 0 1.6rem; padding: .2rem 0 .2rem 1.2rem; border-left: 2px solid rgba(196, 70, 90, .7); max-width: 36rem; }
.noelia__opinion blockquote { margin: 0 0 .5rem; }
.noelia__opinion blockquote p { margin: 0; font-family: var(--f-titulo); font-style: italic; font-size: 1.3rem; line-height: 1.35; color: var(--texto); }
.noelia__opinion figcaption { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; color: var(--texto-suave); font-size: .82rem; }
.noelia__opinion .estrellas { font-size: .8rem; }

@media (max-width: 700px) {
  .opiniones__lista {
    columns: auto; display: flex; gap: 1rem; overflow-x: auto; padding-bottom: .6rem;
    scroll-snap-type: x mandatory; scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent);
  }
  .opiniones__lista::-webkit-scrollbar { display: none; }
  .opinion { flex: 0 0 82%; margin: 0; scroll-snap-align: start; }
  .opinion figure { height: 100%; }
}

/* --- Ficha ampliada (diálogo) ------------------------------------------------------- */
html:has(.ficha[open]) { overflow: hidden; }
.ficha {
  width: min(900px, 100% - 2rem); max-width: none; max-height: calc(100dvh - 2rem);
  margin: auto; padding: 0; border: 0; overflow: visible;
  background: transparent; color: var(--texto);
}
.ficha::backdrop { background: rgba(4, 7, 15, .74); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.ficha[open] .ficha__caja { animation: ficha-entra .45s var(--curva) both; }
.ficha[open]::backdrop { animation: ficha-fondo .35s ease both; }
.ficha__caja {
  position: relative;
  display: grid; grid-template-columns: minmax(170px, 250px) minmax(0, 1fr); gap: clamp(1.4rem, 3vw, 2.4rem); align-items: start;
  max-height: calc(100dvh - 2rem); overflow: auto; overscroll-behavior: contain;
  padding: clamp(1.4rem, 3.5vw, 2.4rem);
  border: 1px solid var(--linea); border-radius: 20px;
  background: radial-gradient(70% 60% at 100% 0%, rgba(214, 179, 106, .1), transparent 60%), linear-gradient(155deg, #1c2849, #0e1528);
  box-shadow: 0 50px 90px -40px rgba(0, 0, 0, .95);
}
.ficha__cerrar {
  position: absolute; top: .9rem; right: .9rem; z-index: 2;
  display: grid; place-items: center; width: 42px; height: 42px;
  border: 1px solid var(--linea); border-radius: 50%;
  background: rgba(10, 15, 29, .7); color: var(--texto); cursor: pointer;
  transition: background-color .25s, border-color .25s, rotate .3s var(--curva);
}
.ficha__cerrar svg { width: 16px; height: 16px; }
.ficha__cerrar:hover { background: rgba(214, 179, 106, .16); border-color: var(--oro); rotate: 90deg; }
.ficha__portada .tapa { width: 100%; }
.ficha__autora { margin: 0 0 .5rem; color: var(--oro); font-size: .76rem; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; }
.ficha__titulo { padding-right: 2.6rem; margin-bottom: .9rem; font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
.ficha__etiquetas { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .9rem; margin-bottom: .5rem; }
.ficha__etiquetas > * { margin: 0; }
.ficha__etiquetas .historico__fecha { color: var(--oro-claro); }
.ficha__etiquetas:empty { display: none; }
.ficha__sinopsis { margin: .4rem 0 1.2rem; }
.ficha__sinopsis p { margin: 0 0 .9em; color: var(--texto-suave); font-size: 1.02rem; line-height: 1.7; }

@media (max-width: 640px) {
  .ficha__caja { grid-template-columns: 1fr; }
  .ficha__portada { width: 42%; max-width: 170px; }
  .ficha__titulo { font-size: 1.8rem; }
}

/* --- Catálogo -------------------------------------------------------------------- */
.catalogo { background: var(--noche-2); }

.filtros { display: none; }
.js .filtros { display: flex; flex-direction: column; align-items: center; gap: 1.1rem; margin-bottom: 1rem; }

.buscador { position: relative; width: min(100%, 460px); }
.buscador svg { position: absolute; left: 1.05rem; top: 50%; width: 18px; height: 18px; translate: 0 -50%; color: var(--oro); pointer-events: none; }
.buscador input {
  width: 100%; min-height: 48px; padding: .8rem 1.1rem .8rem 2.9rem;
  border: 1px solid var(--linea); border-radius: 999px;
  background: rgba(255, 255, 255, .04); color: var(--texto);
  font: inherit; font-size: 1rem;
  transition: border-color .25s, background-color .25s, box-shadow .25s;
}
.buscador input::placeholder { color: #9d978b; }
.buscador input:focus { outline: none; border-color: var(--oro); background: rgba(255, 255, 255, .07); box-shadow: 0 0 0 4px rgba(214, 179, 106, .16); }

.anios { display: flex; flex-wrap: wrap; justify-content: center; gap: .45rem; max-width: 900px; }
.chip {
  position: relative; /* contiene su texto oculto dentro del carrusel en móvil */
  flex: none; min-height: 38px; padding: .4rem .85rem;
  border: 1px solid var(--linea); border-radius: 999px;
  background: transparent; color: var(--texto-suave);
  font: 500 .86rem/1 var(--f-texto); font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: background-color .25s, color .25s, border-color .25s, transform .25s var(--curva);
}
.chip:hover { color: var(--texto); border-color: var(--oro); }
.chip[aria-pressed="true"] { background: var(--oro); border-color: var(--oro); color: #1a1408; }
.chip__n { margin-left: .4rem; font-size: .74em; opacity: .7; }

@media (max-width: 700px) {
  .anios {
    flex-wrap: nowrap; justify-content: flex-start; width: 100%;
    overflow-x: auto; padding: 0 0 .5rem; scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent);
    mask-image: linear-gradient(90deg, #000 85%, transparent);
  }
  .anios::-webkit-scrollbar { display: none; }
}

.resultado { min-height: 1.6em; margin: 0 0 2.25rem; text-align: center; color: var(--texto-suave); font-size: .9rem; }

.rejilla-libros {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr));
  gap: 2.75rem 1.75rem;
  margin: 0; padding: 0; list-style: none;
}
.libro[hidden] { display: none; }
.libro article { display: flex; flex-direction: column; height: 100%; }
.libro__portada { position: relative; display: block; margin-bottom: 1.1rem; perspective: 900px; }
.libro__portada:hover .tapa, .libro:focus-within .tapa {
  transform: translateY(-8px) rotateY(-9deg) rotateX(2deg);
  box-shadow: 0 30px 50px -22px rgba(0, 0, 0, .9), 0 0 0 1px rgba(214, 179, 106, .35), 0 0 40px -10px rgba(214, 179, 106, .35);
}
.libro__portada:hover .tapa::before, .libro:focus-within .tapa::before { transform: translateX(130%); transition: transform 1s ease; }
.libro__portada:hover img { transform: scale(1.03); }

.libro__cinta {
  position: absolute; top: 12px; left: -6px; z-index: 5;
  padding: .3rem .65rem;
  background: var(--carmesi); color: #fff;
  font-size: .64rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  box-shadow: 0 6px 14px -6px rgba(0, 0, 0, .7);
}
.libro__cinta::after {
  content: ""; position: absolute; left: 0; bottom: -5px;
  border-top: 5px solid #5c1420; border-left: 6px solid transparent;
}

.libro__titulo { font-size: 1.32rem; line-height: 1.12; margin-bottom: .3rem; transition: color .3s; }
.libro:hover .libro__titulo { color: var(--oro-claro); }
.libro__fecha { margin: 0 0 .55rem; color: var(--oro-claro); font-size: .82rem; letter-spacing: .04em; }
.libro .ku { margin-bottom: .55rem; }

/* Serie: casos de Noelia Villarroel o misterio juvenil */
.etiqueta-serie {
  display: inline-flex; align-items: center; gap: .35rem; width: fit-content;
  margin: 0 0 .6rem; padding: .2rem .6rem .2rem .45rem; border-radius: 999px;
  font-size: .66rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; line-height: 1.3;
}
.etiqueta-serie svg { width: 13px; height: 13px; flex: none; }
.etiqueta-serie--noelia { background: rgba(155, 35, 53, .24); border: 1px solid rgba(196, 70, 90, .55); color: #f5ccd3; }
.etiqueta-serie--juvenil { background: rgba(64, 160, 140, .16); border: 1px solid rgba(96, 190, 168, .5); color: #b4ecdd; }

/* Sinopsis: sin JS se despliega aquí; con JS abre la ficha ampliada */
.sinopsis { margin: 0 0 .9rem; }
.sinopsis > summary {
  display: inline-flex; align-items: center; gap: .45rem;
  min-height: 32px; cursor: pointer; list-style: none;
  color: var(--texto); font-size: .84rem; font-weight: 600;
  text-decoration: underline; text-decoration-color: rgba(214, 179, 106, .5); text-underline-offset: 4px;
}
.sinopsis > summary::-webkit-details-marker { display: none; }
.sinopsis > summary::before {
  content: "+"; display: inline-grid; place-items: center; width: 18px; height: 18px; flex: none;
  border: 1px solid rgba(214, 179, 106, .6); border-radius: 50%;
  color: var(--oro); font-size: .8rem; line-height: 1; text-decoration: none;
}
.sinopsis[open] > summary::before { content: "−"; }
.sinopsis > summary:hover { color: var(--oro-claro); text-decoration-color: var(--oro); }
.sinopsis__texto { margin-top: .6rem; color: var(--texto-suave); font-size: .9rem; line-height: 1.6; }
.sinopsis__texto p { margin: 0 0 .7em; }
.libro .boton--libro { margin-top: auto; align-self: flex-start; }

.libro--aparece { animation: aparece .5s var(--curva) both; }

.sin-resultados { padding: 2rem 0 1rem; text-align: center; color: var(--texto-suave); }

@media (max-width: 560px) {
  .rejilla-libros { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.25rem 1rem; }
  .libro__titulo { font-size: 1.18rem; }
  .libro .boton--libro { align-self: stretch; padding-inline: .6rem; }
}

/* --- Helena Llanos (papel antiguo) ------------------------------------------------ */
.helena {
  color: var(--tinta);
  background:
    radial-gradient(70% 50% at 8% 0%, rgba(255, 255, 255, .65), transparent 60%),
    radial-gradient(60% 55% at 100% 100%, rgba(150, 110, 50, .14), transparent 65%),
    var(--papel);
}
.helena::before {
  /* textura de papel muy suave */
  content: ""; position: absolute; inset: 0; opacity: .25; mix-blend-mode: multiply; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.6' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .55 0 0 0 0 .45 0 0 0 0 .3 0 0 0 .35 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)'/%3E%3C/svg%3E");
}
.helena > .contenedor { position: relative; }
.helena h2 { color: var(--tinta); }
.helena .antetitulo { color: var(--oro-oscuro); margin-bottom: .7rem; }
.helena .seccion__cabecera h2::after { filter: brightness(.55) saturate(1.4); }
.helena .seccion__entradilla { color: var(--tinta-suave); }

.helena__libros {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.25rem, 3vw, 2.25rem);
  margin: 0; padding: 0; list-style: none;
}
.historico {
  display: flex; flex-direction: column;
  padding: 1.6rem 1.5rem 1.75rem;
  border: 1px solid rgba(111, 80, 22, .2); border-radius: 16px;
  background: rgba(255, 252, 245, .62);
  box-shadow: 0 24px 44px -32px rgba(60, 40, 10, .55);
  transition: translate .4s var(--curva), box-shadow .4s, opacity .9s var(--curva), transform .9s var(--curva);
}
.historico:hover { translate: 0 -5px; box-shadow: 0 32px 50px -30px rgba(60, 40, 10, .6); }
.historico__portada { position: relative; display: block; width: 62%; margin: 0 auto 1.5rem; perspective: 900px; }
.historico:hover .tapa { transform: rotateY(-8deg); }
.historico:hover .tapa::before { transform: translateX(130%); transition: transform 1s ease; }
.historico__texto { display: flex; flex-direction: column; flex: 1; }
.historico h3 { font-size: 1.75rem; color: var(--tinta); margin-bottom: .25rem; }
.historico__fecha { margin: 0 0 .7rem; color: var(--oro-oscuro); font-size: .82rem; font-weight: 600; letter-spacing: .04em; }
.historico h3 + .historico__resumen { margin-top: .55rem; }
.helena .sinopsis > summary { color: var(--tinta); text-decoration-color: rgba(111, 80, 22, .5); }
.helena .sinopsis > summary::before { border-color: rgba(111, 80, 22, .6); color: var(--oro-oscuro); }
.helena .sinopsis > summary:hover { color: var(--oro-oscuro); }
.helena .sinopsis__texto { color: #3b3024; }
.historico__resumen { color: #3b3024; font-size: .98rem; line-height: 1.6; }
.helena .ku { color: var(--oro-oscuro); }
.historico .boton--libro { margin-top: auto; align-self: flex-start; color: var(--oro-oscuro); border-color: rgba(111, 80, 22, .5); }
.historico .boton--libro:hover { background: var(--tinta); border-color: var(--tinta); color: var(--papel); }
.helena .enlace-autora a { color: var(--oro-oscuro); }
.helena .enlace-autora a:hover { color: var(--tinta); }
.helena :focus-visible { outline-color: var(--oro-oscuro); }

@media (max-width: 900px) {
  .helena__libros { grid-template-columns: 1fr; }
  .historico { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 1.25rem; align-items: start; padding: 1.25rem; }
  .historico__portada { width: 100%; margin: 0; }
  .historico h3 { font-size: 1.5rem; }
}
@media (max-width: 420px) {
  .historico { grid-template-columns: 96px minmax(0, 1fr); gap: 1rem; }
  .historico .boton--libro { align-self: stretch; }
}

/* --- Sobre la autora --------------------------------------------------------------- */
.autora { background: var(--noche); }
.autora__rejilla { display: grid; grid-template-columns: minmax(220px, 340px) minmax(0, 1fr); align-items: start; gap: clamp(2rem, 6vw, 5rem); }
@media (min-width: 801px) { .autora__retrato { position: sticky; top: calc(var(--cabecera-alto) + 2.5rem); } }
.autora__bio { max-width: 44rem; margin-top: 1.4rem; }
.autora__bio p { color: var(--texto-suave); }
.autora__bio .autora__entrada { font-family: var(--f-titulo); font-size: clamp(1.35rem, 2.2vw, 1.6rem); line-height: 1.4; color: var(--texto); }
.autora__bio .autora__cita {
  margin: 1.8rem 0 0; padding-left: 1.2rem; border-left: 2px solid var(--oro);
  font-family: var(--f-titulo); font-style: italic; font-size: clamp(1.25rem, 2vw, 1.45rem); line-height: 1.4; color: var(--oro-claro);
}
.autora__bio a { color: var(--oro-claro); text-decoration-color: rgba(214, 179, 106, .5); }
.autora__retrato {
  position: relative; overflow: hidden;
  display: grid; place-items: center;
  aspect-ratio: 4 / 5;
  border: 1px solid var(--linea); border-radius: 999px 999px 18px 18px;
  background:
    radial-gradient(70% 50% at 50% 30%, rgba(214, 179, 106, .16), transparent 70%),
    linear-gradient(180deg, var(--noche-3), var(--noche-2));
}
.autora__retrato::before {
  content: ""; position: absolute; inset: 10px;
  border: 1px solid rgba(214, 179, 106, .2); border-radius: inherit;
}
.autora__retrato--foto { place-items: stretch; background: var(--noche-3); }
.autora__retrato--foto img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 30%;
  border-radius: inherit;
}
.autora__retrato--foto::before { z-index: 1; border-color: rgba(214, 179, 106, .45); }
.autora__retrato--foto::after {
  /* funde la parte de abajo con el fondo nocturno */
  content: ""; position: absolute; inset: auto 0 0; height: 30%; z-index: 1; border-radius: inherit;
  background: linear-gradient(transparent, rgba(10, 15, 29, .55));
  pointer-events: none;
}
.autora__monograma { font-family: var(--f-titulo); font-style: italic; font-weight: 500; font-size: clamp(4.5rem, 9vw, 6.5rem); color: var(--oro); letter-spacing: -.02em; }
.autora__foto-pendiente {
  position: absolute; bottom: 1.4rem; left: 50%; translate: -50% 0;
  padding: .2rem .6rem; border: 1px dashed var(--aviso); border-radius: 4px;
  color: #ffe3a3; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap;
}
.autora h2 { font-size: clamp(2.4rem, 5vw, 3.6rem); }

.cifras { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; margin: 2rem 0 2.25rem; }
.cifra { display: flex; flex-direction: column-reverse; justify-content: flex-end; padding-top: 1rem; border-top: 1px solid var(--linea); }
.cifra dd {
  margin: 0; line-height: 1;
  font-family: var(--f-titulo); font-weight: 600; font-size: clamp(2.3rem, 4.6vw, 3.3rem);
  font-variant-numeric: lining-nums tabular-nums;
  color: var(--oro-claro);
}
.cifra dt { margin-top: .5rem; color: var(--texto-suave); font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; line-height: 1.35; }

@media (max-width: 800px) {
  .autora__rejilla { grid-template-columns: 1fr; }
  .autora__retrato { width: min(240px, 70%); margin: 0 auto; }
}

/* --- Boletín ------------------------------------------------------------------------ */
.boletin { background: radial-gradient(60% 70% at 50% 0%, rgba(214, 179, 106, .1), transparent 70%), var(--noche-2); }
.boletin__caja {
  position: relative; overflow: hidden;
  max-width: 780px; margin: 0 auto; padding: clamp(1.75rem, 5vw, 3.5rem);
  border: 1px solid var(--linea); border-radius: 24px;
  background: linear-gradient(160deg, rgba(31, 44, 80, .75), rgba(10, 15, 29, .85));
  text-align: center;
}
.boletin__caja::before {
  /* reflejo dorado que recorre el borde */
  content: ""; position: absolute; inset: 0; padding: 1px; border-radius: inherit; pointer-events: none;
  background: linear-gradient(110deg, transparent 38%, rgba(236, 211, 154, .75) 50%, transparent 62%);
  background-size: 300% 100%;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: brillo-borde 9s linear infinite;
}
.boletin .pendiente { margin-top: 0; margin-bottom: 1.75rem; }
.boletin__icono { width: 54px; height: 54px; margin: 0 auto 1rem; color: var(--oro); animation: flotar 5s ease-in-out infinite; }
.boletin h2 { font-size: clamp(2rem, 4.2vw, 2.9rem); }
.boletin__entradilla { max-width: 34rem; margin: 1rem auto 0; color: var(--texto-suave); }

.boletin__form {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .75rem;
  max-width: 540px; margin: 1.9rem auto 0; text-align: left;
}
.boletin__form input[type="email"] {
  min-height: 50px; padding: .8rem 1.2rem;
  border: 1px solid var(--linea); border-radius: 999px;
  background: rgba(255, 255, 255, .05); color: var(--texto);
  font: inherit; font-size: 1rem;
}
.boletin__form input[type="email"]::placeholder { color: #9d978b; }
.boletin__form input[type="email"]:focus { outline: none; border-color: var(--oro); box-shadow: 0 0 0 4px rgba(214, 179, 106, .16); }
.boletin__form .boton { min-height: 50px; }
.consentimiento { grid-column: 1 / -1; display: flex; align-items: flex-start; gap: .6rem; color: var(--texto-suave); font-size: .85rem; line-height: 1.45; cursor: pointer; }
.consentimiento input { width: 18px; height: 18px; margin: .1rem 0 0; flex: none; accent-color: var(--oro); }
.boletin__estado { grid-column: 1 / -1; min-height: 1.4em; margin: 0; color: var(--oro-claro); font-size: .9rem; }

@media (max-width: 560px) {
  .boletin__form { grid-template-columns: 1fr; }
}

/* --- Pie --------------------------------------------------------------------------------- */
.pie { padding: 3.75rem 0 2rem; border-top: 1px solid var(--linea); background: #070b16; color: var(--texto-suave); font-size: .95rem; }
.pie__rejilla { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.pie .marca { display: block; margin-bottom: .5rem; font-size: 1.9rem; }
.pie__lema { font-family: var(--f-titulo); font-style: italic; font-size: 1.2rem; color: var(--oro-claro); }
.pie__titulo { margin-bottom: .7rem; color: var(--oro); font-size: .74rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; }
.pie ul { margin: 0; padding: 0; list-style: none; }
.pie li + li { margin-top: .35rem; }
.pie a { color: var(--texto); text-decoration-color: rgba(214, 179, 106, .5); }
.pie a:hover { color: var(--oro-claro); }
.pie__legal { margin-top: 2.75rem; padding-top: 1.5rem; border-top: 1px solid rgba(255, 255, 255, .07); font-size: .8rem; text-align: center; }

@media (max-width: 700px) {
  .pie__rejilla { grid-template-columns: 1fr; text-align: center; }
}

/* --- Enlaces a las páginas de cada libro desde la portada ------------------------------ */
.libro__titulo a, .historico h3 a { color: inherit; text-decoration: none; }
.libro__titulo a:hover, .historico h3 a:hover { text-decoration: underline; text-decoration-color: var(--oro); text-underline-offset: 4px; }
.noelia__botones { display: flex; flex-wrap: wrap; gap: .7rem; margin: .75rem 0 0; }
.noelia__texto .noelia__botones .boton { margin-top: 0; }
.ficha__pagina { display: inline-block; margin: 0 0 1rem; font-size: .9rem; font-weight: 600; }
.ficha__pagina[hidden] { display: none; }
.ficha__pagina + .ficha__amazon { margin-left: 0; }
.ficha__cuerpo .ficha__pagina { margin-right: 1.25rem; }

/* --- Páginas interiores: libro y sagas ------------------------------------------------ */
.interior { padding-top: calc(var(--cabecera-alto) + 1.25rem); }
.migas { margin-bottom: clamp(1.5rem, 4vw, 2.5rem); font-size: .82rem; color: var(--texto-suave); }
.migas ol { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0; padding: 0; list-style: none; }
.migas li + li::before { content: "›"; margin-right: .35rem; color: var(--oro); }
.migas a { color: var(--texto-suave); text-decoration: none; }
.migas a:hover { color: var(--oro-claro); text-decoration: underline; }
.migas [aria-current] { color: var(--texto); }

.libro-pagina {
  display: grid; grid-template-columns: minmax(200px, 330px) minmax(0, 1fr); align-items: start;
  gap: clamp(1.75rem, 5vw, 4rem); padding-bottom: clamp(2.5rem, 6vw, 4rem);
}
.libro-pagina__portada { perspective: 1000px; }
.libro-pagina__portada .tapa { width: 100%; box-shadow: 0 40px 60px -28px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255, 255, 255, .06); }
.libro-pagina h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); margin-bottom: .9rem; }
.libro-pagina__saga { margin: 0 0 1rem; }
.libro-pagina__saga a {
  display: inline-block; padding: .3rem .8rem; border-radius: 999px;
  border: 1px solid rgba(196, 70, 90, .55); background: rgba(155, 35, 53, .22); color: #f5ccd3;
  font-size: .78rem; font-weight: 600; letter-spacing: .06em; text-decoration: none;
}
.libro-pagina__saga a:hover { background: rgba(155, 35, 53, .4); color: #fff; }
.libro-pagina__sinopsis { max-width: 42rem; margin-top: 1.25rem; }
.libro-pagina__sinopsis p { color: var(--texto-suave); font-size: 1.08rem; line-height: 1.75; }
.libro-pagina .ku { margin: 1.3rem 0 1.1rem; font-size: .8rem; }
.libro-pagina__acciones { margin: 0; }
.libro-pagina__opinion { margin-top: 2.2rem; }

.saga-nav {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem;
  padding: 1.3rem 0; border-top: 1px solid var(--linea); border-bottom: 1px solid var(--linea);
}
.saga-nav__enlace { display: flex; flex-direction: column; gap: .25rem; color: var(--texto); text-decoration: none; font-family: var(--f-titulo); font-size: 1.2rem; line-height: 1.2; }
.saga-nav__enlace span { color: var(--oro); font-family: var(--f-texto); font-size: .7rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.saga-nav__enlace--siguiente { align-items: flex-end; text-align: right; }
.saga-nav__enlace:hover { color: var(--oro-claro); }
.saga-nav__todos { color: var(--oro-claro); font-size: .86rem; font-weight: 600; white-space: nowrap; }

.relacionados h2 { margin-bottom: 1.8rem; font-size: clamp(1.8rem, 3.5vw, 2.4rem); }
.mini-libros { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1.25rem; margin: 0; padding: 0; list-style: none; }
.mini-libro a { display: block; color: var(--texto); text-decoration: none; perspective: 800px; }
.mini-libro .tapa { transition: transform .5s var(--curva), box-shadow .5s; }
.mini-libro a:hover .tapa, .mini-libro a:focus-visible .tapa { transform: translateY(-6px) rotateY(-8deg); }
.mini-libro__titulo { display: block; margin-top: .6rem; font-family: var(--f-titulo); font-size: 1.05rem; font-weight: 600; line-height: 1.15; }
.mini-libro a:hover .mini-libro__titulo { color: var(--oro-claro); }

.saga-cabecera { max-width: 46rem; padding-bottom: clamp(2rem, 5vw, 3rem); }
.saga-cabecera h1 { font-size: clamp(2.6rem, 6vw, 4.2rem); }
.saga-cabecera p:not([class]) { color: var(--texto-suave); font-size: 1.08rem; }
.orden { display: grid; gap: 1.25rem; margin: 0 0 clamp(3rem, 6vw, 5rem); padding: 0; list-style: none; }
.orden__caso {
  display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 1.5rem; align-items: start;
  padding: 1.25rem; border: 1px solid var(--linea); border-radius: 14px;
  background: linear-gradient(150deg, rgba(31, 44, 80, .5), rgba(14, 21, 40, .7));
}
.orden__portada { display: block; }
.orden__numero { margin: 0 0 .3rem; color: var(--oro); font-size: .72rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.orden__texto h2 { margin-bottom: .5rem; font-size: 1.6rem; }
.orden__texto h2 a { color: var(--texto); text-decoration: none; }
.orden__texto h2 a:hover { color: var(--oro-claro); }
.orden__texto > p:not([class]) { margin-bottom: .9rem; color: var(--texto-suave); font-size: .95rem; }
.orden__acciones { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.2rem; margin: 0; }
.orden__sinopsis { font-size: .86rem; font-weight: 600; }

@media (max-width: 900px) {
  .mini-libros { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .libro-pagina { grid-template-columns: 1fr; }
  .libro-pagina__portada { width: 60%; max-width: 240px; margin: 0 auto; }
  .saga-nav { grid-template-columns: 1fr 1fr; }
  .saga-nav__todos { grid-column: 1 / -1; grid-row: 2; text-align: center; }
}
@media (max-width: 560px) {
  .orden__caso { grid-template-columns: 84px minmax(0, 1fr); gap: 1rem; padding: 1rem; }
  .orden__texto h2 { font-size: 1.3rem; }
}

/* --- Aparición al hacer scroll ------------------------------------------------------- */
.js .revelar {
  opacity: 0; transform: translateY(28px);
  transition: opacity .9s var(--curva), transform .9s var(--curva), translate .4s var(--curva), box-shadow .4s;
  transition-delay: calc(var(--retraso, 0) * 1ms), calc(var(--retraso, 0) * 1ms), 0s, 0s;
}
.js .revelar.visible { opacity: 1; transform: none; }

/* --- Animaciones ------------------------------------------------------------------------- */
@keyframes entrar { from { opacity: 0; transform: translateY(18px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes nombre { from { opacity: 0; letter-spacing: .18em; filter: blur(10px); } to { opacity: 1; letter-spacing: -.01em; filter: none; } }
@keyframes flotar { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
@keyframes respira { 0%, 100% { opacity: .66; scale: 1; } 50% { opacity: .82; scale: 1.04; } }
@keyframes nube { from { transform: translateX(-35%); } to { transform: translateX(35%); } }
@keyframes barrido { from { rotate: -14deg; } to { rotate: 10deg; } }
@keyframes niebla { from { transform: translate3d(-10%, 0, 0); } to { transform: translate3d(10%, 0, 0); } }
@keyframes rueda { 0% { opacity: 0; transform: translateY(-2px); } 30% { opacity: 1; } 80% { opacity: 0; transform: translateY(12px); } 100% { opacity: 0; } }
@keyframes latido { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }
@keyframes aparece { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes brillo-borde { from { background-position: 100% 0; } to { background-position: -200% 0; } }
@keyframes sello { from { opacity: 0; scale: 1.9; } 60% { opacity: 1; } to { opacity: 1; scale: 1; } }
@keyframes ficha-entra { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes ficha-fondo { from { opacity: 0; } to { opacity: 1; } }

/* --- Sin animaciones si el sistema lo pide ------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: .001ms !important;
    transition-delay: 0s !important;
  }
  .js .revelar { opacity: 1; transform: none; }
  .hero__haz, .hero__niebla, .hero__luna, .hero__luna::after { animation: none !important; }
}
