/* Applewhite Books — paleta tomada del Canva */
:root {
  --verde: #0c7d47;
  --verde-osc: #095c35;
  --verde-suave: #eef6f0;
  --dorado: #d0a933;
  --texto: #2c3a33;
  --texto-suave: #5d6b63;
  --borde: #dfe9e2;
  --blanco: #fff;
  --radio: 16px;
  --sombra: 0 10px 30px rgba(12, 60, 35, .08);
  --titulos: 'Poppins', system-ui, sans-serif;
  --cuerpo: 'Inter', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  font: 16px/1.65 var(--cuerpo);
  color: var(--texto);
  background: var(--blanco);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--verde); }
h1, h2, h3 { font-family: var(--titulos); line-height: 1.2; margin: 0; color: var(--texto); }
svg { width: 1.15em; height: 1.15em; flex: none; }

.contenedor { width: min(1160px, 100% - 32px); margin-inline: auto; }

.acuarela {
  background: var(--blanco) url('img/acuarela.webp') center / cover no-repeat;
}

/* Botones */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  padding: .8em 1.5em; border-radius: 999px;
  font: 600 .95rem var(--titulos); text-decoration: none;
  border: 2px solid transparent; cursor: pointer;
  transition: background .2s, color .2s, transform .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-verde { background: var(--verde); color: var(--blanco); }
.btn-verde:hover { background: var(--verde-osc); box-shadow: 0 6px 16px rgba(12, 125, 71, .25); }
.btn-borde { border-color: var(--verde); color: var(--verde); background: rgba(255, 255, 255, .7); }
.btn-borde:hover { background: var(--verde); color: var(--blanco); }
.btn-chico { padding: .55em 1.1em; font-size: .88rem; }

.antetitulo {
  margin: 0 0 .6rem;
  font: 600 .78rem var(--titulos); letter-spacing: .12em; text-transform: uppercase;
  color: var(--verde);
}

/* Barra superior */
.barra {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.barra.con-sombra { border-color: var(--borde); box-shadow: 0 2px 14px rgba(0, 0, 0, .04); }
.barra-in { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.marca img { width: 180px; }
.menu { display: flex; align-items: center; gap: 1.6rem; }
.menu a:not(.btn) {
  font: 500 .93rem var(--titulos); color: var(--texto); text-decoration: none;
  padding: .3em 0; border-bottom: 2px solid transparent;
}
.menu a:not(.btn):hover { color: var(--verde); border-color: var(--verde); }
.menu-btn { display: none; }

/* Portada */
.hero { overflow: hidden; }
.hero-in {
  display: grid; grid-template-columns: 1.1fr .9fr; align-items: end; gap: 2rem;
  min-height: min(640px, calc(100vh - 72px));
}
.hero-texto { align-self: center; padding: 3rem 0; }
.hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); font-weight: 700; letter-spacing: -.01em; }
.hero h1 span { color: var(--verde); display: block; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--texto-suave); max-width: 30em; margin: 1.1rem 0 2rem; }
.acciones { display: flex; flex-wrap: wrap; gap: .8rem; }
.hero-foto { position: relative; margin: 0; align-self: end; }
.hero-foto img { width: 100%; max-height: 600px; object-fit: contain; object-position: bottom; }
.hero-cita {
  margin: 2.6rem 0 0; padding-left: 1rem; max-width: 24em;
  border-left: 3px solid var(--dorado);
  font: 500 1.05rem/1.5 var(--titulos); font-style: italic; color: var(--verde);
}

/* Secciones */
.seccion { padding: clamp(4rem, 8vw, 6.5rem) 0; }
.seccion-suave { background: var(--verde-suave); }
.titular { text-align: center; max-width: 640px; margin: 0 auto 3rem; }
.titular h2 { font-size: clamp(1.7rem, 3.2vw, 2.3rem); font-weight: 700; }
.titular p:not(.antetitulo) { color: var(--texto-suave); margin: .8rem 0 0; }

/* Libros */
.libros { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; }
.libro {
  display: flex; flex-direction: column;
  background: var(--blanco); border: 1px solid var(--borde); border-radius: var(--radio);
  overflow: hidden; transition: box-shadow .25s, transform .25s;
}
.libro:hover { box-shadow: var(--sombra); transform: translateY(-3px); }
.libro-portada { background: var(--verde-suave); padding: 2rem 2rem 0; }
.libro-portada img {
  width: 62%; margin: 0 auto; border-radius: 4px 10px 10px 4px;
  box-shadow: -1px 0 0 rgba(0, 0, 0, .08), 0 14px 28px rgba(0, 0, 0, .18);
  transform: translateY(1.2rem);
}
.libro-cuerpo { display: flex; flex-direction: column; flex: 1; padding: 2.2rem 1.5rem 1.5rem; }
.etiqueta {
  align-self: flex-start; margin-bottom: .8rem;
  font: 600 .72rem var(--titulos); letter-spacing: .06em; text-transform: uppercase;
  color: var(--verde); background: var(--verde-suave); padding: .3em .8em; border-radius: 999px;
}
.libro h3 { font-size: 1.25rem; font-weight: 700; }
.libro-sub { margin: .2rem 0 0; color: var(--texto-suave); font-size: .93rem; }
.libro-autor { margin: .5rem 0 0; font-size: .88rem; font-style: italic; color: var(--texto-suave); }
.libro-resumen { margin: 1rem 0 .4rem; font-size: .95rem; }
.libro details { font-size: .93rem; color: var(--texto-suave); margin-bottom: 1.2rem; }
.libro summary {
  cursor: pointer; list-style: none; font-weight: 600; color: var(--verde); font-size: .88rem;
}
.libro summary::-webkit-details-marker { display: none; }
.libro summary::after { content: ' +'; }
.libro details[open] summary::after { content: ' –'; }
.libro details p { margin: .7rem 0 0; }
.libro-pie { margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--borde); }
.precio { font: 700 1.35rem var(--titulos); color: var(--texto); }
.libro-precio { display: flex; align-items: center; justify-content: space-between; margin-bottom: .8rem; }
.libro-botones { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.libro-botones .btn { justify-content: center; padding-inline: .6em; }
.btn-icono {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  border: 1.5px solid var(--borde); color: var(--verde); font-size: 1.05rem;
  transition: border-color .2s, background .2s;
}
.btn-icono:hover { border-color: var(--verde); background: var(--verde-suave); }

/* Nosotros */
.nosotros-texto { max-width: 760px; margin: 0 auto; text-align: center; font-size: 1.05rem; }
.nosotros-texto strong { color: var(--verde); font-weight: 600; }
.autores {
  list-style: none; padding: 0; margin: 3rem auto 0;
  display: flex; justify-content: center; gap: clamp(1.5rem, 5vw, 4rem); flex-wrap: wrap;
}
.autores li { text-align: center; width: 170px; }
.autores img {
  width: 150px; height: 150px; object-fit: cover; border-radius: 50%; margin: 0 auto .9rem;
  border: 4px solid var(--blanco); box-shadow: var(--sombra);
}
.autores span { font: 600 .95rem/1.35 var(--titulos); }

/* Cita */
.cita { overflow: hidden; }
.cita-in { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 2rem; }
.cita img { align-self: end; max-height: 460px; width: auto; margin: 2rem auto 0; }
.cita blockquote {
  margin: 0; font: 600 clamp(1.4rem, 2.8vw, 2rem)/1.4 var(--titulos); color: var(--verde);
  max-width: 14em;
}

/* Dónde comprar */
.canales { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem; max-width: 900px; margin-inline: auto; }
.canal {
  display: flex; align-items: center; gap: 1rem;
  padding: 1.3rem 1.4rem; border-radius: var(--radio);
  border: 1px solid var(--borde); background: var(--blanco);
  text-decoration: none; color: var(--texto);
  transition: border-color .2s, box-shadow .2s;
}
.canal:hover { border-color: var(--verde); box-shadow: var(--sombra); }
.canal-ico {
  display: grid; place-items: center; width: 50px; height: 50px; border-radius: 14px;
  background: var(--verde); color: var(--blanco); font-size: 1.35rem;
}
.canal-txt { flex: 1; display: flex; flex-direction: column; }
.canal-txt strong { font: 600 1.05rem var(--titulos); }
.canal-txt small { color: var(--texto-suave); font-size: .86rem; }
.canal-flecha {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  background: var(--dorado); color: var(--blanco); transition: transform .2s;
}
.canal:hover .canal-flecha { transform: translateX(3px); }
.tiendas { margin-top: 3.5rem; text-align: center; }
.tiendas p { font: 600 .78rem var(--titulos); letter-spacing: .12em; text-transform: uppercase; color: var(--texto-suave); }
.tiendas ul {
  list-style: none; padding: 0; margin: 1.2rem 0 0;
  display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 1.2rem;
}
.tiendas li {
  width: 120px; height: 120px; border-radius: 14px; overflow: hidden;
  background: var(--blanco); border: 1px solid var(--borde);
  display: grid; place-items: center;
}
.tiendas img { width: 100%; height: 100%; object-fit: contain; }

/* Redes */
.redes-botones { justify-content: center; margin-top: 1.6rem; }
.tiktok-marco { max-width: 780px; margin: 0 auto; }
.tiktok-marco .tiktok-embed { margin: 0 auto !important; }
.tiktok-marco section a { color: var(--verde); font-weight: 600; }

/* Memorias */
.memorias { display: grid; grid-template-columns: .8fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.memorias-foto img {
  border-radius: 6px; box-shadow: 0 18px 40px rgba(0, 0, 0, .18);
  transform: rotate(-2deg); transition: transform .3s;
}
.memorias-foto:hover img { transform: rotate(0); }
.memorias-texto h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 700; }
.memorias-texto h2 span { font-weight: 500; color: var(--texto-suave); font-size: .7em; }
.memorias-fechas { font: 600 1rem var(--titulos); color: var(--verde); margin: .5rem 0 1.4rem; }
.memorias-texto p { max-width: 34em; }
.memorias-texto strong { font-weight: 600; }
.memorias-firma { font-style: italic; color: var(--texto-suave); margin-bottom: 1.8rem; }

/* Pie y contacto */
.pie { background: var(--verde-osc); color: rgba(255, 255, 255, .85); }
.pie-in {
  display: grid; grid-template-columns: 1fr 1fr; gap: 3rem;
  padding: 4rem 0 3rem;
}
.pie-marca img { width: 220px; }
.pie-marca p { max-width: 22em; margin: 1.2rem 0 0; }
.pie h2 { color: var(--blanco); font-size: 1.4rem; margin-bottom: 1.2rem; }
.pie ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .8rem; }
.pie li { display: flex; align-items: center; gap: .7rem; }
.pie li a, .pie li span { color: inherit; text-decoration: none; }
.pie li a:hover { color: var(--blanco); text-decoration: underline; }
.redes { display: flex; gap: .7rem; margin-top: 1.6rem; }
.redes a {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .35); color: var(--blanco); font-size: 1.1rem;
  transition: background .2s, color .2s;
}
.redes a:hover { background: var(--blanco); color: var(--verde-osc); }
.pie-final {
  border-top: 1px solid rgba(255, 255, 255, .15);
  padding: 1.1rem 0; font-size: .82rem; color: rgba(255, 255, 255, .65);
}

/* Tableta */
@media (max-width: 980px) {
  .libros { grid-template-columns: repeat(2, 1fr); }
  .canales { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; }
  .menu { gap: 1.1rem; }
}

/* Celular */
@media (max-width: 820px) {
  .menu-btn {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 44px; border: 0; background: none; cursor: pointer; padding: 10px;
  }
  .menu-btn span { height: 2px; background: var(--texto); border-radius: 2px; transition: transform .25s, opacity .25s; }
  .menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .menu {
    position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--blanco); border-bottom: 1px solid var(--borde);
    padding: .5rem 16px 1.2rem; box-shadow: 0 12px 24px rgba(0, 0, 0, .06);
    display: none;
  }
  .menu.abierto { display: flex; }
  .menu a:not(.btn) { padding: .85rem 0; border-bottom: 1px solid var(--borde); }
  .menu a:not(.btn):hover { border-color: var(--borde); }
  .menu .btn { margin-top: 1rem; justify-content: center; }
  .marca img { width: 150px; }

  .hero-in { grid-template-columns: 1fr; min-height: 0; gap: 0; text-align: center; }
  .hero-texto { padding: 3rem 0 1.5rem; }
  .lead { margin-inline: auto; }
  .acciones { justify-content: center; }
  .hero-foto { max-width: 270px; margin: 0 auto; }
  .hero-cita { margin: 2rem auto 0; font-size: .95rem; text-align: left; }

  .cita-in { grid-template-columns: 1fr; text-align: center; gap: 0; }
  .cita blockquote { margin: 3rem auto 0; }
  .cita img { max-height: 340px; }

  .memorias { grid-template-columns: 1fr; text-align: center; }
  .memorias-foto { max-width: 300px; margin: 0 auto; }
  .memorias-texto p { margin-inline: auto; }

  .pie-in { grid-template-columns: 1fr; gap: 2.5rem; padding-top: 3rem; }
}

@media (max-width: 560px) {
  .libros { grid-template-columns: 1fr; }
  .libro-portada img { width: 52%; }
  .autores { gap: .8rem; flex-wrap: nowrap; }
  .autores li { width: 33%; max-width: 120px; }
  .autores img { width: 92px; height: 92px; }
  .autores span { font-size: .85rem; }
  .tiendas ul { gap: .6rem; flex-wrap: nowrap; }
  .tiendas li { width: 74px; height: 74px; border-radius: 10px; }
}

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