/* ==========================================================================
   RODOLFO NAVARRO VEGA | HOJA DE ESTILOS PRINCIPAL (styles.css)
   Página web oficial de autor y presentación editorial.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. RESET Y ESTILOS BASE
   Configuración elemental de caja, scroll suave y tipografía global.
   -------------------------------------------------------------------------- */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  background: #fff;
  color: #22251f;
  font-family: "DM Sans", sans-serif;
  font-size: 15px;
  line-height: 1.7;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Envoltura estándar de secciones con ancho máximo y padding horizontal */
.section-wrap {
  max-width: 1240px;
  margin: auto;
  padding-left: 7.5%;
  padding-right: 7.5%;
}

/* Utilidad de accesibilidad para lectores de pantalla */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}


/* --------------------------------------------------------------------------
   2. TIPOGRAFÍA Y COMPONENTES GLOBALES
   Encabezados, subtítulos, botones e hipervínculos reutilizables.
   -------------------------------------------------------------------------- */
/* Subtítulos pequeños en mayúsculas (eyebrow text) */
.eyebrow {
  font-size: 18px;
  letter-spacing: 0.2em;
  font-weight: 700;
  color: #8c7659;
  margin: 0 0 22px;
}

/* Títulos principales con tipografía con serifa fluida (Playfair Display) */
.hero h1,
.section-heading h2,
.about h2,
.books .about-copy h2,
.feature h2,
.newsletter h2 {
  font: 500 clamp(48px, 6vw, 82px) / 1.05 "Playfair Display", serif;
  letter-spacing: -0.045em;
  margin: 0 0 25px;
}

/* Énfasis estilizado dentro de los títulos */
.hero h1 em,
.section-heading h2 em,
.about h2 em,
.books .about-copy h2 em,
.feature h2 em,
.newsletter h2 em {
  font-weight: 400;
  color: #a27c54;
}

/* Texto introductorio de mayor tamaño */
.lead {
  max-width: 450px;
  color: #666;
  font-size: 18px;
  text-align: justify;
}

/* Párrafos de texto descriptivo general */
.body-copy {
  color: #666;
  max-width: 490px;
  font-size: 18px;
  text-align: justify;
}

/* Botones principales con efecto hover */
.button {
  display: inline-flex;
  gap: 26px;
  align-items: center;
  padding: 15px 22px;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: transform 0.25s, background 0.25s;
}

.button:hover {
  transform: translateY(-3px);
}

.button-dark {
  background: #94a6bf;
  color: #ffffff;
  border-radius: 3px;
}

.button-dark:hover {
  background: #7d8fa7;
}

.button-outline {
  border: 1px solid #999184;
}

.button-outline:hover {
  background: #292d26;
  color: #ffffff;
}

/* Enlaces estilo texto con espaciado */
.text-link {
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Botón "Leer más..." para textos desplegables */
.read-more-toggle {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: #7d8fa7;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.read-more-toggle:hover {
  color: #292d26;
}

.read-more.is-open .read-more-toggle {
  display: none;
}

.read-more-content {
  animation: readMoreFade 0.4s ease;
}

@keyframes readMoreFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.underlined {
  border-bottom: 1px solid #b9a78f;
  padding-bottom: 7px;
}


/* --------------------------------------------------------------------------
   3. ENCABEZADO Y NAVEGACIÓN (SITE HEADER & NAV)
   Barra superior fija (sticky), logotipo de autor y menú de enlaces.
   -------------------------------------------------------------------------- */
.site-header {
  height: 88px;
  padding: 0 7.5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(30, 35, 28, 0.1);
}

/* Identidad / Marca del autor */
.brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* Logotipo SVG en el header y footer */
.brand-logo {
  display: block;
  height: 34px;
  width: auto;
}

/* Menú de navegación principal */
.nav {
  display: flex;
  align-items: center;
  gap: 36px;
  font-size: 16px;
  letter-spacing: 0.04em;
}

.nav a {
  transition: opacity 0.25s;
}

.nav a:hover {
  opacity: 0.55;
}

/* Botón de llamada a la acción en la barra de navegación */
.nav .nav-cta {
  border: 1px solid #292d26;
  padding: 11px 19px;
  border-radius: 3px;
}

/* Elementos de menú móvil ocultos en pantallas grandes */
.nav-toggle,
.menu-button {
  display: none;
}


/* --------------------------------------------------------------------------
   4. SECCIÓN HERO (PORTADA / INICIO)
   Bloque de presentación principal, composición gráfica del libro y llamadas a la acción.
   -------------------------------------------------------------------------- */
.hero {
  min-height: 690px;
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  column-gap: 80px;
  align-items: center;
  position: relative;
  padding-top: 65px;
  padding-bottom: 100px;
  overflow: hidden;
  max-width: none;
  padding-left: max(7.5%, calc((100% - 1050px) / 2));
  padding-right: max(7.5%, calc((100% - 1050px) / 2));
  background-color: #e9e9e9;
  background-image: 
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='280' height='280'%3E%3Cfilter id='paper' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.52' numOctaves='4' stitchTiles='stitch' result='grain'/%3E%3CfeTurbulence type='turbulence' baseFrequency='0.025 0.08' numOctaves='3' stitchTiles='stitch' result='fiber'/%3E%3CfeBlend mode='multiply' in='grain' in2='fiber' result='blended'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.18 0 0 0 0 0.16 0 0 0 0 0.14 0 0 0 0.15 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23paper)'/%3E%3C/svg%3E"),
    linear-gradient(90deg, rgba(148, 166, 191, 0.34) 40%, #f4f4f4 40%);
  background-repeat: repeat, no-repeat;
  background-size: 280px 280px, 100% 100%;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-top: 35px;
}

/* Composición artística en el Hero */
.hero-art {
  height: 480px;
  position: relative;
  display: grid;
  place-items: center;
}

.art-circle {
  width: min(390px, 85%);
  aspect-ratio: 1;
  border-radius: 50%;
  background: #bda392;
  position: absolute;
  left: 5%;
  top: 5%;
}

/* Portada 3D del libro en el hero */
.book-cover {
  position: relative;
  width: 240px;
  height: 350px;
  padding: 28px 25px;
  box-shadow: 24px 25px 50px #2223;
  color: #f4eee3;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transform: rotate(5deg);
  background: linear-gradient(145deg, #324050, #252e2b);
}

/* Portada real del libro: sección 1 (hero) y sección 4 (Mi obra) */
.hero-book {
  padding: 0;
  overflow: hidden;
  background: #252e2b;
  border-radius: 2px 4px 4px 2px;
  /* Canto de páginas (derecha/abajo) + sombra de apoyo del libro */
  box-shadow:
    2px 2px 0 #f3eee4,
    4px 4px 0 #ddd6c8,
    5px 5px 0 #f3eee4,
    7px 7px 0 #cfc7b8,
    24px 28px 45px rgba(34, 34, 34, 0.28),
    8px 10px 16px rgba(34, 34, 34, 0.18);
}

.hero-book img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* En "Mi obra": portada centrada en la tarjeta y aire extra antes del título */
.book-card .hero-book {
  margin: 10px auto 0;
  transform: none;
  /* 1.7x la portada del hero (240x350), sin desbordar en móvil */
  width: min(408px, 100%);
  height: auto;
  aspect-ratio: 240 / 350;
}

.book-card .hero-book ~ .book-info {
  max-width: min(408px, 100%);
}

.book-card .hero-book + .book-info {
  margin-top: 30px;
}

/* Lomo: pliegue de la tapa a la izquierda y brillo suave sobre la portada */
.hero-book::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg,
      rgba(0, 0, 0, 0.35) 0%,
      rgba(255, 255, 255, 0.18) 2.5%,
      rgba(0, 0, 0, 0.18) 4.5%,
      rgba(255, 255, 255, 0.06) 7%,
      rgba(255, 255, 255, 0) 12%),
    linear-gradient(115deg,
      rgba(255, 255, 255, 0.12) 0%,
      rgba(255, 255, 255, 0) 45%,
      rgba(0, 0, 0, 0.08) 100%);
}

.book-cover small,
.cover small {
  font-size: 8px;
  letter-spacing: 0.16em;
}

.book-cover strong {
  font: 600 33px / 1.05 "Playfair Display", serif;
}

.book-cover i {
  font: italic 12px "Playfair Display", serif;
}

.book-cover b {
  font: 500 28px "Playfair Display", serif;
  align-self: flex-end;
}

.art-note {
  position: absolute;
  left: 0;
  bottom: 30px;
  font-size: 9px;
  letter-spacing: 0.2em;
  line-height: 1.8;
}

/* Indicador inferior de número de sección y scroll cue */
.hero-bottom {
  position: absolute;
  bottom: 30px;
  left: max(7.5%, calc((100% - 1050px) / 2));
  right: max(7.5%, calc((100% - 1050px) / 2));
  display: flex;
  justify-content: space-between;
  color: #8b897f;
  font-size: 9px;
  letter-spacing: 0.15em;
}

.scroll-cue b {
  font-size: 16px;
  margin-left: 12px;
}


/* --------------------------------------------------------------------------
   5. SECCIÓN SOBRE EL AUTOR (ABOUT)
   Retrato o imagen de presentación, biografía, firma y cita de autor.
   -------------------------------------------------------------------------- */
.about {
  padding-top: 130px;
  padding-bottom: 130px;
  /* Dos columnas: biografía (izq.) + recuadro de trayectoria (der.) */
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11%;
  align-items: center;
  max-width: none;
  padding-left: max(7.5%, calc((100% - 1050px) / 2));
  padding-right: max(7.5%, calc((100% - 1050px) / 2));
  background-image: linear-gradient(90deg, #ffffff 70%, #f4f4f4 70%);
}

.about-image {
  position: relative;
  min-height: 510px;
}

.portrait-placeholder {
  min-height: 490px;
  width: 82%;
  margin-left: auto;
  /* Degradado algo más oscuro para que el texto claro se lea bien */
  background: linear-gradient(150deg, #8f8676, #6b6c60 55%, #3a423a);
  display: flex;
  align-items: flex-start;
  /* Espacio inferior para que el pie de foto no tape el contenido */
  padding: 48px 40px;
  color: #f7f2e8;
}

/* Trayectoria del autor dentro del recuadro */
.portrait-facts {
  width: 100%;
}

.portrait-role {
  font: 500 26px / 1.2 "Playfair Display", serif;
  margin: 0 0 26px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(247, 242, 232, 0.35);
}

.portrait-role em {
  font-weight: 400;
  color: #e6dfd2;
}

.portrait-facts ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 18px;
}

.portrait-facts li {
  font-size: 15px;
  line-height: 1.45;
}

.portrait-facts li span {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #e6dfd2;
  margin-bottom: 3px;
}

/* Frase célebre bajo el nombre del autor */
.about-quote {
  position: relative;
  margin: 28px 0 30px;
  padding: 6px 0 6px 28px;
  border-left: 2px solid #9b7957;
}

.about-quote p {
  margin: 0;
  font: italic 400 clamp(20px, 2vw, 25px) / 1.45 "Playfair Display", serif;
  color: #292d26;
}

.about h2,
.books .about-copy h2,
.feature h2 {
  font-size: clamp(42px, 5vw, 64px);
}

.about .text-link,
.books .about-copy .text-link {
  display: inline-block;
  margin-top: 20px;
}

/* Enlace centrado bajo el recuadro de la sección 2 */
.about > .text-link {
  margin-top: 0;
  max-width: 560px;
  text-align: center;
  line-height: 1.6;
}

.signature {
  font: italic 27px "Playfair Display", serif;
  color: #9b7957;
  margin-top: 35px;
}


/* --------------------------------------------------------------------------
   6. BANDA DE CIFRAS DESTACADAS (NUMBERS / STATS)
   Franja con métricas, estadísticas o conceptos clave del autor.
   -------------------------------------------------------------------------- */
.numbers {
  background: #f4f4f4 ;
  padding: 130px 10%;
  display: flex;
  justify-content: space-around;
  text-align: center;
}

.numbers div {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.numbers strong {
  font: 500 65px "Playfair Display", serif;
  color: #9b7957;
}

.numbers span {
  font-size: 18px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: #66665e;
}


/* --------------------------------------------------------------------------
   7. SECCIÓN BIBLIOTECA Y CATÁLOGO DE LIBROS (BOOKS)
   Grilla con las portadas de los libros publicados y sus detalles.
   -------------------------------------------------------------------------- */
.events,
.books,
.blog {
  padding-top: 130px;
  padding-bottom: 130px;
}

.section-heading {
  display: flex;
  justify-content: center;
  align-items: end;
  margin-bottom: 55px;
  text-align: center;
}

.section-heading h2 {
  font-size: clamp(44px, 5vw, 65px);
  margin: 0;
}

.heading-note {
  font-size: 14px;
  color: #666;
  margin: 0 0 8px;
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr); /* cambiamos el 1er numero segun la cantidad de columnas que querramos */
  gap: 35px;
}

.book-card {
  min-width: 0;
}

/* Portada individual de libro con efecto hover */
.cover {
  height: 470px;
  max-width: 310px;
  margin: auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 28px;
  color: #f5eee2;
  box-shadow: 15px 18px 35px #28251d22;
  transition: transform 0.35s;
}

.book-card:hover .cover {
  transform: translateY(-9px) rotate(-1deg);
}

.cover b {
  font: 600 38px / 1.05 "Playfair Display", serif;
}

.cover span {
  font-size: 9px;
  letter-spacing: 0.2em;
}

/* Diseños cromáticos para las distintas portadas */
.cover-one {
  background: linear-gradient(145deg, #8758b1, #390b4a);
  border-radius: 10px;
}

.cover-two {
  background: linear-gradient(145deg, #6b7566, #26372f);
}

.cover-three {
  background: linear-gradient(145deg, #c1a77c, #70604c);
}

/* Información de cada libro (título, categoría y enlace) */
.book-info {
  max-width: 280px;
  margin: 20px auto 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.book-info h3,
.event-row h3,
.blog-card h3 {
  font: 500 21px "Playfair Display", serif;
  margin: 0 0 4px;
}

.book-info p {
  font-size: 11px;
  color: #85847b;
  margin: 0;
}

.book-info > a {
  font-size: 22px;
}

.center-action {
  text-align: center;
  margin-top: 55px;
}


/* --------------------------------------------------------------------------
   8. BANDA DE CITA DESTACADA (QUOTE BAND)
   Franja oscura con una cita reflexiva y autoría en tipografía editorial.
   -------------------------------------------------------------------------- */
.quote-band {
  background-image: linear-gradient(
    130deg,
    #ebebeb 0%,
    #ebebeb 11%,
    #383E59 11%,
    #383E59 89%,
    #ebebeb 89%,
    #ebebeb 100%
  );
  color: #f5f1e9;
  text-align: center;
  padding: 130px 12%;
}

.quote-band .eyebrow {
  color: #c4a47d;
}

.quote-band blockquote {
  font: 400 clamp(28px, 4vw, 40px) / 1.25 "Playfair Display", serif;
  max-width: 850px;
  margin: 60px auto 60px;
}

.quote-band > span {
  font-size: 9px;
  letter-spacing: 0.2em;
  color: #c4b8a5;
}


/* --------------------------------------------------------------------------
   9. SECCIÓN AGENDA Y EVENTOS (EVENTS)
   Lista en formato fila con fechas, presentaciones y firmas de libros.
   -------------------------------------------------------------------------- */
.event-row {
  display: grid;
  grid-template-columns: 180px 1fr 130px;
  gap: 30px;
  align-items: center;
  border-top: 1px solid #d6cfc3;
  padding: 28px 0;
}

.event-row:last-child {
  border-bottom: 1px solid #d6cfc3;
}

.event-date {
  display: flex;
  flex-direction: column;
  color: #a27c54;
}

.event-date strong {
  font: 40px "Playfair Display", serif;
}

.event-date span {
  font-size: 9px;
  letter-spacing: 0.13em;
}

.event-row .eyebrow {
  margin-bottom: 7px;
}

.event-row h3 {
  font-size: 24px;
}

.event-row p:not(.eyebrow) {
  color: #77776f;
  font-size: 12px;
  margin: 6px 0 0;
}

.event-row > a {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}


/* --------------------------------------------------------------------------
   10. SECCIÓN PRÓXIMA PUBLICACIÓN / DESTACADO (FEATURED BOOK)
   Banner amplio que promociona un próximo lanzamiento editorial.
   -------------------------------------------------------------------------- */
.feature {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10%;
  align-items: center;
  justify-items: center;
  text-align: center;
  background-color: #f4f4f4;
  padding-top: 130px;
  padding-bottom: 130px;
  max-width: none;
  padding-left: max(7.5%, calc((100% - 1050px) / 2));
  padding-right: max(7.5%, calc((100% - 1050px) / 2));
}

.feature .body-copy {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.feature-visual {
  min-height: 420px;
  background: #bda392;
  display: grid;
  place-items: center;
  position: relative;
}

.feature-book {
  height: 330px;
  width: 225px;
  background: linear-gradient(145deg, #324050, #252e2b);
  color: #f4eee3;
  box-shadow: 20px 22px 40px #2224;
  padding: 25px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transform: rotate(4deg);
}

.feature-book span,
.feature-book small {
  font-size: 8px;
  letter-spacing: 0.15em;
}

.feature-book b {
  font: 600 34px / 1.1 "Playfair Display", serif;
}


/* --------------------------------------------------------------------------
   11. SECCIÓN CUADERNO / BLOG (ESCRITOS Y ARTÍCULOS)
   Tarjetas con imagen de cabecera y enlaces a los escritos del autor.
   -------------------------------------------------------------------------- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.blog-image {
  height: 210px;
  margin-bottom: 24px;
  background-size: cover;
  background-position: center;
}

/* Fondos ilustrativos degradados para cada tarjeta del blog */
.blog-image-one {
  background: linear-gradient(135deg, #a89b85, #596153);
}

.blog-image-two {
  background: linear-gradient(135deg, #b9a27e, #6d5847);
}

.blog-image-three {
  background: linear-gradient(135deg, #8a8d7b, #3f4b43);
}

.blog-card .eyebrow {
  font-size: 8px;
  margin-bottom: 12px;
}

.blog-card h3 {
  font-size: 22px;
  min-height: 58px;
}

.blog-card .text-link {
  display: inline-block;
  margin-top: 12px;
}


/* --------------------------------------------------------------------------
   12. SECCIÓN BOLETÍN Y CONTACTO (NEWSLETTER)
   Formulario de suscripción por correo electrónico con estilo minimalista.
   -------------------------------------------------------------------------- */
.newsletter {
  background: #30382f;
  color: #f5f1e9;
  text-align: center;
  padding: 100px 7.5%;
}

.newsletter .eyebrow {
  color: #c4a47d;
}

.newsletter h2 {
  font-size: clamp(44px, 5vw, 64px);
  margin-bottom: 18px;
}

.newsletter-inner > p:not(.eyebrow) {
  color: #c7c6bd;
  font-size: 13px;
}

.newsletter form {
  display: flex;
  max-width: 510px;
  margin: 35px auto 15px;
  border-bottom: 1px solid #aaa99e;
}

.newsletter input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  padding: 15px 5px;
  color: #ffffff;
  outline: none;
  font: 13px "DM Sans", sans-serif;
}

.newsletter input::placeholder {
  color: #c5c3b9;
}

.newsletter button {
  background: #c4a47d;
  color: #242a24;
  border: 0;
  padding: 0 20px;
  font: 600 10px "DM Sans", sans-serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}

.newsletter small {
  font-size: 9px;
  color: #a9aaa0;
}


/* --------------------------------------------------------------------------
   12.1 SECCIÓN: INFORMACIÓN Y REDES (#informacion-redes)
   Tarjeta flotante con canales de contacto y barra de redes sociales.
   -------------------------------------------------------------------------- */
.info-social {
  background: linear-gradient(180deg, #f4f4f4 95px, #22262d 95px);
  padding: 35px 7.5% 130px;
  position: relative;
}

.info-social-card {
  max-width: 820px;
  margin: 0 auto;
  background-color: #bda392;
  border-radius: 12px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.22);
  padding: 50px 35px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 35px;
  align-items: center;
  position: relative;
  z-index: 2;
}

.info-social-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.info-social-icon {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  color: #ffffff;
}

.info-social-item h3 {
  font: 600 20px / 1.25 "Playfair Display", Georgia, serif;
  color: #ffffff;
  margin: 0 0 8px;
}

.info-social-item a {
  font-family: "DM Sans", sans-serif;
  font-size: 13.5px;
  color: #ffffff;
  text-decoration: none;
  opacity: 0.95;
  transition: opacity 0.2s ease, text-decoration 0.2s ease;
  word-break: break-all;
}

.info-social-item a:hover {
  opacity: 1;
  text-decoration: underline;
}

.social-links-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 32px;
  margin-top: 52px;
  position: relative;
  z-index: 2;
}

.social-btn {
  width: 52px;
  height: 52px;
  background: #7f7872;
  color: #ffffff;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.social-btn:hover {
  background: #999089;
  transform: translateY(-2px);
}

/* Fila destacada de WhatsApp */
.whatsapp-row {
  display: flex;
  justify-content: center;
  margin-top: 52px;
  position: relative;
  z-index: 2;
}

.whatsapp-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #25d366;
  color: #ffffff;
  font-family: "DM Sans", sans-serif;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: 50px;
  box-shadow: 0 4px 18px rgba(37, 211, 102, 0.35);
  transition: background-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
  text-decoration: none;
}

.whatsapp-btn:hover {
  background: #20ba5a;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.5);
  color: #ffffff;
}

.whatsapp-btn svg {
  width: 22px;
  height: 22px;
}


/* --------------------------------------------------------------------------
   12.2 SECCIÓN: FORMULARIO DE CONTACTO (#contacto-form)
   Formulario minimalista con validación y envío por PHPMailer.
   -------------------------------------------------------------------------- */
.contact-section {
  padding-top: 130px;
  padding-bottom: 130px;
  background-color: #ffffff;
}

.contact-inner {
  max-width: 820px;
  margin: 0 auto;
}

.contact-header {
  text-align: center;
  margin-bottom: 45px;
}

.contact-header h2 {
  font: 500 clamp(40px, 5vw, 68px) / 1.1 "Playfair Display", serif;
  letter-spacing: -0.04em;
  margin: 0;
  color: #22251f;
}

.contact-header h2 em {
  font-weight: 400;
  color: #a27c54;
}

/* Alertas de estado de envío */
.contact-alert {
  padding: 16px 22px;
  border-radius: 6px;
  margin-bottom: 25px;
  font-size: 14.5px;
  line-height: 1.5;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: fadeIn 0.3s ease;
}

.contact-alert .alert-icon {
  font-size: 18px;
  font-weight: 700;
  flex-shrink: 0;
}

.contact-alert.alert-success {
  background-color: #f0f9f2;
  color: #1e7e34;
  border: 1px solid #c3e6cb;
}

.contact-alert.alert-error {
  background-color: #fdf3f2;
  color: #c82333;
  border: 1px solid #f5c6cb;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Grilla del formulario */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  position: relative;
}

.form-input {
  width: 100%;
  background-color: #eeeeee;
  border: 1.5px solid transparent;
  border-radius: 4px;
  padding: 16px 20px;
  font-family: "DM Sans", sans-serif;
  font-size: 15px;
  color: #22251f;
  transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.form-input::placeholder {
  color: #6c757d;
  opacity: 1;
}

.form-input:focus {
  background-color: #ffffff;
  border-color: #94a6bf;
  outline: none;
  box-shadow: 0 0 0 3px rgba(148, 166, 191, 0.25);
}

.form-input.input-error {
  border-color: #dc3545;
  background-color: #fff9f9;
}

.form-textarea {
  resize: vertical;
  min-height: 155px;
  line-height: 1.6;
}

.field-error {
  font-size: 12px;
  color: #dc3545;
  margin-top: 6px;
  display: none;
  font-weight: 500;
}

/* Botón de envío (SEND MESSAGE) */
.form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 5px;
}

.button-send {
  background-color: #94a6bf;
  color: #ffffff;
  border: 0;
  border-radius: 4px;
  padding: 16px 36px;
  font-family: "DM Sans", sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(148, 166, 191, 0.45);
  transition: background-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.button-send:hover {
  background-color: #7f93ae;
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(148, 166, 191, 0.6);
}

.button-send:disabled,
.button-send.is-loading {
  opacity: 0.75;
  cursor: wait;
  transform: none;
  box-shadow: none;
}


/* --------------------------------------------------------------------------
   13. PIE DE PÁGINA (FOOTER)
   Copyright, menciones y créditos finales.
   -------------------------------------------------------------------------- */
.footer {
  padding: 35px 7.5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.footer p,
.footer > a:last-child {
  font-size: 11px;
  color: #77776f;
}

.footer-credit {
  font-size: 10px;
  color: #77776f;
}

.footer-credit a {
  color: #77776f;
  text-decoration: none;
}

.footer-credit a:hover {
  text-decoration: underline;
}


/* --------------------------------------------------------------------------
   14. ANIMACIONES AL HACER SCROLL (SCROLL REVEAL & STAGGERED EFFECTS)
   Animaciones fluidas con IntersectionObserver: Fade-In, Slide-Up, Slide-Left, Slide-Right y Staggered.
   -------------------------------------------------------------------------- */

/* Solo se ocultan los elementos cuando JavaScript ha inicializado el observador */
.js-reveal-ready .reveal,
.js-reveal-ready .reveal-item {
  opacity: 0;
  will-change: opacity, transform;
  transition: opacity 0.95s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.95s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Tipos de desplazamiento y transformación inicial */
.js-reveal-ready .reveal,
.js-reveal-ready .reveal-up,
.js-reveal-ready .reveal-item {
  transform: translateY(38px);
}

.js-reveal-ready .reveal-left {
  transform: translateX(-45px);
}

.js-reveal-ready .reveal-right {
  transform: translateX(45px);
}

.js-reveal-ready .reveal-scale {
  transform: scale(0.92) translateY(20px);
}

.js-reveal-ready .reveal-fade {
  transform: none;
}

/* Estado activo cuando el elemento entra en viewport */
.js-reveal-ready .reveal.is-revealed,
.js-reveal-ready .reveal-item.is-revealed {
  opacity: 1;
  transform: translate(0, 0) scale(1);
}

/* Retardos escalonados fijos (Stagger Delays) */
.delay-1 { transition-delay: 0.12s !important; }
.delay-2 { transition-delay: 0.24s !important; }
.delay-3 { transition-delay: 0.36s !important; }
.delay-4 { transition-delay: 0.48s !important; }
.delay-5 { transition-delay: 0.60s !important; }

/* Cascada automática para grupos de elementos (Stagger Group) */
.js-reveal-ready .stagger-group.is-revealed .reveal-item:nth-child(1) { transition-delay: 0.05s; }
.js-reveal-ready .stagger-group.is-revealed .reveal-item:nth-child(2) { transition-delay: 0.18s; }
.js-reveal-ready .stagger-group.is-revealed .reveal-item:nth-child(3) { transition-delay: 0.31s; }
.js-reveal-ready .stagger-group.is-revealed .reveal-item:nth-child(4) { transition-delay: 0.44s; }
.js-reveal-ready .stagger-group.is-revealed .reveal-item:nth-child(5) { transition-delay: 0.57s; }

/* Efecto especial para la sección de cifras (Count-Up) */
.numbers strong {
  display: inline-block;
  font-variant-numeric: tabular-nums;
  transition: transform 0.4s ease, color 0.4s ease;
}

.numbers div:hover strong {
  transform: translateY(-4px) scale(1.05);
  color: #b08960;
}

.symbol-infinity {
  display: inline-block;
  transform-origin: center;
  transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.is-revealed .symbol-infinity {
  animation: infinityPulse 3s ease-in-out infinite alternate;
}

@keyframes infinityPulse {
  0% { transform: scale(1); }
  100% { transform: scale(1.15); }
}

/* Efecto de elevación suave para portadas y tarjetas */
.book-card {
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease;
}

.book-card:hover {
  transform: translateY(-6px);
}

/* Suave flotación sutil del círculo decorativo del Hero */
@keyframes artCircleFloat {
  0% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-8px) scale(1.02); }
  100% { transform: translateY(0) scale(1); }
}

.art-circle {
  animation: artCircleFloat 6s ease-in-out infinite;
}


/* --------------------------------------------------------------------------
   15. PREFERENCIA DE MOVIMIENTO REDUCIDO (ACCESIBILIDAD)
   Desactiva transiciones y animaciones para usuarios sensibles al movimiento.
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}


/* --------------------------------------------------------------------------
   16. DISEÑO RESPONSIVO: TABLETS Y PANTALLAS MEDIANAS (MAX-WIDTH: 900PX)
   Ajuste de proporciones, padding y tamaños tipográficos intermedios.
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .site-header {
    padding: 0 5%;
    height: 76px;
  }

  .section-wrap {
    padding-left: 5%;
    padding-right: 5%;
  }

  .nav {
    gap: 18px;
  }

  .hero {
    min-height: 610px;
    column-gap: 50px;
  }

  .hero-art {
    height: 400px;
  }

  .book-cover {
    width: 205px;
    height: 310px;
  }

  .about {
    gap: 7%;
  }

  .portrait-placeholder {
    min-height: 420px;
    padding: 40px 30px;
  }

  .about-image {
    min-height: 440px;
  }

  .cover {
    height: 310px;
    padding: 22px;
  }

  .cover b {
    font-size: 31px;
  }

  .feature {
    padding-left: 7%;
    padding-right: 7%;
  }

  .info-social-card {
    padding: 40px 20px;
    gap: 18px;
  }

  .info-social-item h3 {
    font-size: 18px;
  }

  .info-social-item a {
    font-size: 12.5px;
  }
}


/* --------------------------------------------------------------------------
   17. DISEÑO RESPONSIVO: MÓVILES (MAX-WIDTH: 640PX)
   Menú desplegable tipo hamburguesa y disposición en columnas individuales.
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
  .site-header {
    height: 70px;
  }

  .brand-logo {
    height: 28px;
  }

  /* Botón hamburguesa interactivo */
  .menu-button {
    display: flex;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 10px;
  }

  .menu-button span {
    width: 23px;
    height: 2px;
    background: #292d26;
  }

  /* Menú desplegable móvil posicionado bajo la barra */
  .nav {
    display: none;
    position: absolute;
    top: 69px;
    left: 0;
    right: 0;
    background: #ffffff;
    padding: 22px 7%;
    border-bottom: 1px solid #ddd5c8;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav a {
    padding: 13px 0;
    border-bottom: 1px solid #e5ded2;
  }

  .nav .nav-cta {
    border: 0;
    padding: 13px 0;
  }

  /* Abre el menú al marcar el checkbox toggle */
  .nav-toggle:checked ~ .nav {
    display: flex;
  }

  /* Reorganización del Hero a una sola columna */
  .hero {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding-top: 0px;
    padding-bottom: 85px;
    min-height: 0;
    background-color: #e9e9e9;
    /* background-image: 
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='280' height='280'%3E%3Cfilter id='paper' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.52' numOctaves='4' stitchTiles='stitch' result='grain'/%3E%3CfeTurbulence type='turbulence' baseFrequency='0.025 0.08' numOctaves='3' stitchTiles='stitch' result='fiber'/%3E%3CfeBlend mode='multiply' in='grain' in2='fiber' result='blended'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.18 0 0 0 0 0.16 0 0 0 0 0.14 0 0 0 0.15 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23paper)'/%3E%3C/svg%3E"),
      linear-gradient(180deg, rgba(148, 166, 191, 0.34) 48%, #f4f4f4 48%); */
    background-repeat: repeat, no-repeat;
    background-size: 280px 280px, 100% 100%;
  }

  .hero h1 {
    font-size: 57px;
  }

  /* Texto descriptivo del libro más pequeño en celular */
  .hero .body-copy {
    font-size: 15px;
    line-height: 1.6;
  }

  .hero-art {
    height: 390px;
    margin-top: 25px;
  }

  .art-circle {
    display: none;
  }

  .book-cover {
    width: 195px;
    height: 290px;
  }

  .hero-bottom {
    left: 5%;
    right: 5%;
    bottom: 25px;
  }

  .scroll-cue {
    font-size: 8px;
  }

  /* Sección sobre el autor a columna única */
  .about {
    grid-template-columns: 1fr;
    padding-top: 75px;
    padding-bottom: 80px;
    gap: 45px;
  }

  .about-image {
    min-height: 390px;
  }

  .portrait-placeholder {
    min-height: 370px;
    width: 85%;
    margin-left: 0;
    padding: 32px 24px;
  }

  .portrait-role {
    font-size: 22px;
    margin-bottom: 20px;
    padding-bottom: 16px;
  }

  .portrait-facts li {
    font-size: 14px;
  }

  .about-quote {
    margin: 22px 0 24px;
    padding-left: 22px;
  }

  .about h2,
  .books .about-copy h2,
  .feature h2 {
    font-size: 48px;
  }

  /* Banda de números compacta */
  .numbers {
    padding: 30px 5%;
    gap: 15px;
  }

  .numbers strong {
    font-size: 28px;
  }

  .numbers span {
    font-size: 8px;
    line-height: 1.4;
  }

  /* Ajuste de espaciados de secciones */
  .events,
  .books,
  .blog {
    padding-top: 80px;
    padding-bottom: 80px;
  }

  .section-heading {
    display: block;
    margin-bottom: 35px;
  }

  .section-heading h2 {
    font-size: 49px;
  }

  .heading-note {
    margin-top: 15px;
  }

  /* Grilla de libros a 1 columna */
  .book-grid {
    grid-template-columns: 1fr;
    gap: 42px;
  }

  .cover {
    height: 390px;
    width: 100%;
    max-width: 290px;
  }

  .cover b {
    font-size: 40px;
  }

  .book-info {
    max-width: 290px;
  }

  /* Banda de cita */
  .quote-band {
    padding: 75px 7%;
  }

  .quote-band blockquote {
    font-size: 31px;
  }

  /* Fila de eventos en formato móvil */
  .event-row {
    grid-template-columns: 75px 1fr;
    gap: 17px;
    padding: 23px 0;
  }

  .event-date strong {
    font-size: 30px;
  }

  .event-date span {
    font-size: 7px;
  }

  .event-row h3 {
    font-size: 20px;
  }

  .event-row p:not(.eyebrow) {
    font-size: 11px;
  }

  .event-row > a {
    grid-column: 2;
  }

  /* Próxima publicación a 1 columna */
  .feature {
    grid-template-columns: 1fr;
    padding: 75px 5%;
    gap: 35px;
  }

  .feature-visual {
    min-height: 370px;
  }

  .feature-book {
    height: 290px;
    width: 200px;
  }

  /* Blog a 1 columna */
  .blog-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .blog-image {
    height: 230px;
  }

  .blog-card h3 {
    min-height: 0;
  }

  /* Formulario de newsletter apilado */
  .newsletter {
    padding: 75px 6%;
  }

  .newsletter form {
    flex-direction: column;
    border: 0;
    gap: 10px;
  }

  .newsletter input {
    border-bottom: 1px solid #aaa99e;
    padding: 15px;
  }

  .newsletter button {
    padding: 16px;
  }

  /* Pie de página vertical */
  .footer {
    padding: 30px 5%;
    flex-direction: column;
    text-align: center;
    gap: 13px;
  }

  .footer p {
    margin: 0;
  }

  /* PERSONALIZADOS */
  .eyebrow {
    font-size: 14px;
  }

  .info-social {
    background: linear-gradient(180deg, #f4f4f4 60px, #22262d 60px);
    padding: 25px 5% 50px;
  }

  .info-social-card {
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 38px 20px;
  }

  .contact-section {
    padding-top: 70px;
    padding-bottom: 80px;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .button-send {
    width: 100%;
    text-align: center;
  }

  /* Animaciones adaptadas a móviles: desplazamientos suaves y proporcionales a pantallas pequeñas */
  .js-reveal-ready .reveal,
  .js-reveal-ready .reveal-up,
  .js-reveal-ready .reveal-item {
    transform: translateY(22px);
  }

  .js-reveal-ready .reveal-left {
    transform: translateX(-18px);
  }

  .js-reveal-ready .reveal-right {
    transform: translateX(18px);
  }
}
