/* ============================================================
   Secciones — Libia Montoya Orozco
   ============================================================ */

/* ---------- Navegación ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  transition: background .3s ease, box-shadow .3s ease, padding .3s ease;
  padding: 22px 0;
}
.nav--solid {
  background: oklch(0.969 0.014 80 / 0.92);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--sand);
  padding: 14px 0;
}
.nav__row { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.nav__brand {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink);
  line-height: 1;
}
.nav__brand span { display: block; font-family: var(--sans); font-size: 0.6rem; font-weight: 700; letter-spacing: 0.28em; text-transform: uppercase; color: var(--terra); margin-top: 4px; }
.nav__links { display: flex; align-items: center; gap: 6px; }
.nav__link {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.86rem;
  letter-spacing: 0.04em;
  padding: 0.5em 0.9em;
  border-radius: var(--radius);
  color: var(--ink-soft);
  cursor: pointer;
  transition: color .15s ease, background .15s ease;
  background: none; border: none;
}
.nav__link:hover { color: var(--ink); }
.nav__link.active { color: var(--terra); }

.nav__toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; color: var(--ink); }
.nav__toggle svg { display: block; }

/* ---------- HERO ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; color: var(--paper); overflow: hidden; }
.hero__bg { position: absolute; inset: 0; z-index: 0; }
.hero__bg .ph { width: 100%; height: 100%; align-items: flex-start; justify-content: flex-end; }
.hero__bg .ph__label { margin: 96px 32px 0 0; }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 38%; }
.hero__scrim {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(to top, oklch(0.255 0.026 52 / 0.92) 0%, oklch(0.28 0.03 52 / 0.55) 38%, oklch(0.3 0.03 52 / 0.18) 70%, oklch(0.3 0.03 52 / 0.30) 100%);
}
.hero__inner { position: relative; z-index: 2; width: 100%; padding-bottom: 9vh; padding-top: 140px; }
.hero__eyebrow { color: oklch(0.82 0.07 55); letter-spacing: 0.3em; }
.hero__name {
  font-size: clamp(3.2rem, 9vw, 7.2rem);
  font-weight: 500;
  margin: 0.18em 0 0.12em;
  line-height: 0.94;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 30px oklch(0.2 0.02 50 / 0.4);
}
.hero__tagline {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.5rem, 3.6vw, 2.6rem);
  font-weight: 400;
  color: oklch(0.93 0.03 70);
  max-width: 22ch;
  margin: 0 0 1.6em;
  line-height: 1.18;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.hero__cta .btn { white-space: nowrap; }
.hero__scroll {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  z-index: 2; color: oklch(0.92 0.02 70); opacity: 0.8;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-family: var(--sans); font-size: 0.66rem; letter-spacing: 0.24em; text-transform: uppercase;
  animation: float 2.4s ease-in-out infinite;
}
@keyframes float { 0%,100%{ transform: translate(-50%,0);} 50%{ transform: translate(-50%,8px);} }

/* ---------- Secciones genéricas ---------- */
.section { padding: clamp(72px, 11vw, 130px) 0; }
.section--alt { background: var(--cream-2); }
.section__head { max-width: 640px; margin-bottom: 56px; }
.section__head--center { margin-left: auto; margin-right: auto; text-align: center; }
.section__title { font-size: clamp(2.4rem, 5.2vw, 3.7rem); color: var(--ink); margin: 0.2em 0 0.35em; }
.section__lead { font-size: 1.12rem; color: var(--ink-soft); }

/* ---------- LIBROS · cuadrícula ---------- */
.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: clamp(28px, 4vw, 52px);
}
.book-card { cursor: pointer; text-align: left; background: none; border: none; padding: 0; font: inherit; color: inherit; }
.book-card__cover {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform .3s cubic-bezier(.2,.7,.2,1), box-shadow .3s ease;
}
.book-card__cover::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(105deg, oklch(1 0 0 / 0.18) 0%, transparent 22%, transparent 100%);
  pointer-events: none;
}
.book-card:hover .book-card__cover { transform: translateY(-8px) rotate(-0.6deg); box-shadow: var(--shadow-lg); }
.book-card__meta { margin-top: 18px; }
.book-card__title { font-size: 1.5rem; color: var(--ink); line-height: 1.1; }
.book-card__genre { font-family: var(--sans); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--terra); margin-top: 6px; }
.book-card__hint { font-family: var(--sans); font-size: 0.84rem; color: var(--ink-faint); margin-top: 8px; display: inline-flex; align-items: center; gap: 6px; }
.book-card:hover .book-card__hint { color: var(--terra); }

/* portada — diseño tipográfico del placeholder */
.cover-art {
  position: absolute; inset: 0;
  background: linear-gradient(160deg, oklch(0.46 0.05 58) 0%, oklch(0.33 0.04 50) 100%);
  color: oklch(0.93 0.03 78);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 22px 20px;
}
.cover-art__top { font-family: var(--sans); font-size: 0.6rem; letter-spacing: 0.24em; text-transform: uppercase; opacity: 0.7; }
.cover-art__title { font-family: var(--serif); font-size: clamp(1.6rem, 3vw, 2rem); line-height: 1.0; font-weight: 600; }
.cover-art__rule { width: 36px; height: 2px; background: oklch(0.78 0.10 55); margin: 12px 0; }
.cover-art__author { font-family: var(--sans); font-size: 0.66rem; letter-spacing: 0.2em; text-transform: uppercase; opacity: 0.85; }
.cover-art__deco { position: absolute; right: -30px; bottom: -30px; width: 150px; height: 150px; border: 1.5px solid oklch(0.78 0.10 55 / 0.4); border-radius: 50%; }
.cover-art__deco2 { position: absolute; right: 10px; bottom: 10px; width: 90px; height: 90px; border: 1.5px solid oklch(0.78 0.10 55 / 0.25); border-radius: 50%; }

/* portada con imagen real */
.cover-img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
/* en la ficha: imagen completa, sin recorte */
.modal__cover--img { aspect-ratio: auto; box-shadow: var(--shadow-md); max-width: 320px; }
.modal__cover--img .cover-img { height: auto; object-fit: contain; }

/* ---------- BLOG · El alma en tus manos ---------- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: clamp(20px, 3vw, 32px);
}
.blog-card {
  display: flex; flex-direction: column;
  width: 100%;
  text-align: left;
  font: inherit;
  cursor: pointer;
  background: var(--paper);
  border: 1px solid var(--sand);
  border-radius: 8px;
  padding: clamp(26px, 3vw, 36px);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform .3s cubic-bezier(.2,.7,.2,1), box-shadow .3s ease, border-color .3s ease;
}
.blog-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: var(--sand-deep); }
.blog-card__date { font-family: var(--sans); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--terra); }
.blog-card__title { font-family: var(--serif); font-size: 1.7rem; color: var(--ink); line-height: 1.1; margin: 0.5em 0 0.45em; }
.blog-card__excerpt { font-family: var(--serif); font-style: italic; font-size: 1.05rem; color: var(--ink-soft); line-height: 1.45; margin: 0; }
.blog-card__hint { margin-top: auto; padding-top: 22px; font-family: var(--sans); font-size: 0.84rem; font-weight: 600; color: var(--ink-faint); display: inline-flex; align-items: center; gap: 6px; transition: color .15s ease; }
.blog-card:hover .blog-card__hint { color: var(--terra); }
/* ---------- RELATO (modal del blog) ---------- */
.modal--post { max-width: 680px; }
.post-modal__body { padding: clamp(34px, 4.5vw, 60px); }
.post-modal__date { font-family: var(--sans); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--terra); margin-bottom: clamp(22px, 3vw, 32px); }
.post-modal__text { font-family: var(--serif); font-size: clamp(1.15rem, 1.6vw, 1.35rem); line-height: 1.7; color: var(--ink-soft); }
.post-modal__text p { margin: 0 0 1.1em; }
.post-modal__text p:last-child { margin-bottom: 0; }
.post-modal__share { margin-top: clamp(28px, 4vw, 40px); padding-top: 26px; border-top: 1px solid var(--sand); display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.post-modal__msg { font-family: var(--sans); font-size: 0.9rem; font-weight: 600; color: var(--terra); }

/* ---------- FICHA (modal) ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: oklch(0.255 0.026 52 / 0.62);
  backdrop-filter: blur(6px);
  display: flex; align-items: flex-start; justify-content: center;
  overflow-y: auto;
  padding: 5vh 20px;
  animation: fade .25s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal {
  position: relative;
  width: 100%; max-width: 960px;
  background: var(--paper);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: pop .32s cubic-bezier(.2,.8,.2,1);
}
@keyframes pop { from { opacity: 0; transform: translateY(24px) scale(.98); } to { opacity: 1; transform: none; } }
.modal__close {
  position: absolute; top: 16px; right: 16px; z-index: 5;
  width: 42px; height: 42px; border-radius: 50%;
  background: oklch(0.985 0.008 85 / 0.9); border: 1px solid var(--sand);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  color: var(--ink); transition: background .15s ease, transform .15s ease;
}
.modal__close:hover { background: var(--sand); transform: rotate(90deg); }
.modal__grid { display: grid; grid-template-columns: 0.85fr 1.15fr; }
.modal__coverwrap { background: var(--cream-2); padding: 44px; display: flex; align-items: center; justify-content: center; }
.modal__cover { width: 100%; max-width: 280px; aspect-ratio: 2/3; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); position: relative; }
.modal__body { padding: clamp(32px, 4vw, 52px); }
.modal__genre { color: var(--terra); }
.modal__title { font-size: clamp(2.2rem, 4vw, 3rem); color: var(--ink); margin: 0.15em 0 0.5em; }
.modal__synopsis { color: var(--ink-soft); font-size: 1.05rem; }
.modal__buy { margin-top: 32px; padding-top: 28px; border-top: 1px solid var(--sand); }
.modal__buy-label { display: flex; align-items: center; gap: 10px; font-family: var(--sans); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 16px; }
.modal__buy-label::after { content: ""; flex: 1; height: 1px; background: var(--sand); }
.modal__buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.modal__buttons .btn--buy { flex: 1 1 auto; min-width: 180px; justify-content: center; }
.modal__soon { font-family: var(--serif); font-style: italic; font-size: 1.15rem; color: var(--ink-soft); margin: 0; }

/* ---------- SOBRE LA AUTORA ---------- */
.about { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(40px, 6vw, 80px); align-items: center; }
.about__photo { position: relative; }
.about__photo .ph { aspect-ratio: 4/5; border-radius: 6px; box-shadow: var(--shadow-md); }
.about__img { width: 100%; aspect-ratio: 4/5; object-fit: cover; object-position: center 30%; border-radius: 6px; box-shadow: var(--shadow-md); }
.about__photo-frame { position: absolute; inset: -16px -16px 16px 16px; border: 1.5px solid var(--terra); border-radius: 6px; z-index: -1; }
.about__bio { font-size: 1.12rem; color: var(--ink-soft); }
.about__bio .lead { font-family: var(--serif); font-size: 1.7rem; font-style: italic; color: var(--ink); line-height: 1.3; margin-bottom: 0.7em; }
.about__socials { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; }
.social-btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--sans); font-weight: 600; font-size: 0.88rem;
  padding: 0.65em 1.1em; border-radius: 100px;
  border: 1.5px solid var(--sand-deep); color: var(--ink-soft);
  cursor: pointer; transition: all .15s ease; background: none;
}
.social-btn:hover { border-color: var(--terra); color: var(--terra); transform: translateY(-2px); }
.social-btn svg { display: block; }

/* ---------- CONTACTO / NEWSLETTER ---------- */
.newsletter { background: linear-gradient(155deg, oklch(0.345 0.035 54) 0%, oklch(0.275 0.028 50) 100%); color: oklch(0.93 0.02 78); border-radius: 12px; padding: clamp(44px, 6vw, 76px); position: relative; overflow: hidden; }
.newsletter__deco { position: absolute; right: -60px; top: -60px; width: 280px; height: 280px; border: 1.5px solid oklch(0.78 0.10 55 / 0.18); border-radius: 50%; }
.newsletter__deco2 { position: absolute; right: 40px; bottom: -90px; width: 200px; height: 200px; border: 1.5px solid oklch(0.78 0.10 55 / 0.12); border-radius: 50%; }
.newsletter__inner { position: relative; z-index: 1; max-width: 620px; }
.newsletter__eyebrow { color: oklch(0.82 0.08 55); }
.newsletter__title { font-size: clamp(2.2rem, 4.5vw, 3.4rem); color: oklch(0.96 0.02 80); margin: 0.2em 0 0.4em; }
.newsletter__lead { font-size: 1.1rem; color: oklch(0.86 0.03 75); margin-bottom: 2em; }
.nl-form { display: flex; gap: 12px; flex-wrap: wrap; }
.nl-form__field { flex: 1 1 260px; position: relative; }
.nl-form input {
  width: 100%; font-family: var(--sans); font-size: 1rem;
  padding: 1em 1.1em; border-radius: var(--radius);
  border: 1.5px solid oklch(0.6 0.03 60 / 0.5);
  background: oklch(0.98 0.01 80 / 0.95); color: var(--ink);
  transition: border .15s ease, box-shadow .15s ease;
}
.nl-form input:focus { outline: none; border-color: var(--terra); box-shadow: 0 0 0 3px oklch(0.605 0.115 42 / 0.25); }
.nl-form input.err { border-color: oklch(0.6 0.18 28); }
.nl-form__msg { font-size: 0.82rem; margin-top: 8px; min-height: 1.2em; }
.nl-form__msg.err { color: oklch(0.78 0.13 30); }
.nl-form__msg.ok { color: oklch(0.82 0.1 150); }
.nl-success { display: flex; align-items: center; gap: 14px; font-family: var(--serif); font-size: 1.5rem; font-style: italic; color: oklch(0.95 0.02 80); }
.nl-success__check { width: 46px; height: 46px; border-radius: 50%; background: var(--buy); display: flex; align-items: center; justify-content: center; flex: none; color: white; }
.newsletter__fine { font-size: 0.8rem; color: oklch(0.78 0.02 75); margin-top: 18px; }

/* ---------- FOOTER ---------- */
.footer { background: var(--cream-2); border-top: 1px solid var(--sand); padding: 54px 0 40px; }
.footer__row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 22px; }
.footer__brand { font-family: var(--serif); font-size: 1.5rem; color: var(--ink); }
.footer__tag { font-family: var(--serif); font-style: italic; color: var(--ink-soft); }
.footer__links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer__links button { background: none; border: none; cursor: pointer; font-family: var(--sans); font-size: 0.86rem; color: var(--ink-soft); transition: color .15s ease; }
.footer__links button:hover { color: var(--terra); }
.footer__legal { font-size: 0.78rem; color: var(--ink-faint); margin-top: 32px; text-align: center; }

/* ---------- Responsive ---------- */
.nav__drawer { display: none; }

@media (max-width: 860px) {
  .nav__links { display: none; }
  .nav__toggle { display: block; }
  .nav__drawer {
    display: block; position: fixed; inset: 0 0 0 auto; width: min(82vw, 340px);
    background: var(--paper); box-shadow: var(--shadow-lg); z-index: 60;
    transform: translateX(100%); transition: transform .3s cubic-bezier(.2,.8,.2,1);
    padding: 90px 28px 28px; display: flex; flex-direction: column; gap: 4px;
  }
  .nav__drawer.open { transform: none; }
  .nav__drawer .nav__link { font-size: 1.05rem; padding: 0.8em 0.4em; border-bottom: 1px solid var(--sand); border-radius: 0; text-align: left; }
  .nav__scrim { position: fixed; inset: 0; background: oklch(0.255 0.026 52 / 0.4); z-index: 55; }

  .modal__grid { grid-template-columns: 1fr; }
  .modal__coverwrap { padding: 36px 36px 0; }
  .modal__cover { max-width: 200px; }
  .about { grid-template-columns: 1fr; }
  .about__photo { max-width: 420px; }
  .about__photo-frame { inset: -10px -10px 10px 10px; }
}

@media (max-width: 520px) {
  body { font-size: 16px; }
  .wrap { padding: 0 20px; }
  .hero__cta { flex-direction: column; align-items: stretch; }
  .hero__cta .btn { justify-content: center; }
  .modal__buttons .btn--buy { min-width: 100%; }
  .nl-form { flex-direction: column; }
}
