/* ==========================================================================
   Secciones del inicio debajo del hero, en el mismo mundo de la escena:
   demo con el zorro asomado, libros sobre la colina con estantería Premium,
   racha a todo el ancho, preguntas con el zorro y cierre con el zorro.
   Se carga después de landing-redesign.css y hero-scene.css.
   ========================================================================== */

.pl {
  --pl-hill: #e3ecff;
  --pl-shelf: #c7d7fe;
  --pl-bubble: #ffffff;
  --pl-bubble-line: #e2e8f0;
  --pl-bubble-es: #1d4ed8;
  /* Suelo y sol de las escenas pequeñas (preguntas y cierre), como en el hero */
  --hs-ground: #c7d7fe;
  --hs-sun: #fbbf24;
}

body.active .pl {
  --pl-hill: #0f1a30;
  --pl-shelf: #22407f;
  --pl-bubble: #1e293b;
  --pl-bubble-line: rgba(148, 163, 184, 0.3);
  --pl-bubble-es: #93c5fd;
  --hs-ground: #3b5bb5;
  --hs-sun: #fde68a;
}

/* El hero ya no deja un hueco grande antes de la demo */
.pl-hero + #pl-try {
  padding-top: 24px;
}

/* ---------- Demo única con pestañas ---------- */
.pl-try-stage {
  position: relative;
  max-width: 760px;
  margin: 96px auto 0;
}

.pl-try-card {
  position: relative;
  z-index: 1;
  overflow: hidden;
  border: 1px solid var(--lp-line);
  border-radius: 20px;
  background: var(--lp-surface);
  box-shadow: var(--lp-shadow-lg);
}

.pl-try-tabs {
  display: flex;
  gap: 6px;
  padding: 12px;
  overflow-x: auto;
  border-bottom: 1px solid var(--lp-line);
  background: var(--lp-soft);
}

.pl-try-tab {
  flex: none;
  padding: 6px 14px;
  border: 1.5px solid var(--lp-line);
  border-radius: 999px;
  background: var(--lp-surface);
  color: var(--lp-ink);
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.pl-try-tab small {
  margin-left: 4px;
  color: var(--lp-muted);
  font-size: 12px;
  font-weight: 700;
}

.pl-try-tab[aria-selected="true"] {
  border-color: #1d4ed8;
  background: #1d4ed8;
  color: #fff;
}

.pl-try-tab[aria-selected="true"] small { color: #dbeafe; }

.pl-try-tab:focus-visible {
  outline: 3px solid #f59e0b;
  outline-offset: 2px;
}

/* El lector va dentro de la tarjeta: sin segundo marco */
.pl-try-panel .dr {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

/* Zorro asomado con las patas en el borde del lector */
.hs-peek {
  position: absolute;
  right: 48px;
  bottom: 100%;
  margin-bottom: -10px;
  pointer-events: none;
}

.hs-peek svg {
  display: block;
  width: 120px;
  height: auto;
}

.hs-peek-fox { animation: hs-bob 5s ease-in-out infinite; }

.hs-peek-bubble {
  position: absolute;
  right: calc(100% + 8px);
  bottom: 34px;
  padding: 7px 14px;
  border: 2px solid var(--pl-bubble-line);
  border-radius: 16px;
  background: var(--pl-bubble);
  color: var(--lp-ink);
  box-shadow: 0 6px 16px -10px rgba(15, 23, 42, 0.5);
  text-align: center;
  white-space: nowrap;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
}

.hs-peek-bubble small {
  display: block;
  color: var(--pl-bubble-es);
  font-size: 13px;
  font-weight: 700;
}

.hs-peek-bubble::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -9px;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  transform: rotate(45deg);
  border-top: 2px solid var(--pl-bubble-line);
  border-right: 2px solid var(--pl-bubble-line);
  background: var(--pl-bubble);
}

/* Datos en una línea de etiquetas */
.pl-facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: 760px;
  margin: 26px auto 0;
  padding: 0;
  list-style: none;
}

.pl-facts li {
  padding: 6px 14px;
  border: 1px solid var(--lp-line);
  border-radius: 999px;
  background: var(--lp-surface);
  color: var(--lp-muted);
  font-size: 14px;
  font-weight: 700;
}

.pl-facts strong {
  color: var(--lp-navy);
  font-weight: 900;
}

/* ---------- Libros sobre la colina ---------- */
.pl-section.pl-section-hill {
  position: relative;
  margin-top: 60px;
  padding-top: 24px;
  background: var(--pl-hill);
}

.pl-hill-edge {
  position: absolute;
  left: 0;
  bottom: calc(100% - 1px);
  display: block;
  width: 100%;
  height: 60px;
  fill: var(--pl-hill);
}

.pl-premium { margin-top: 44px; }

.pl-premium .pl-group-head { margin-bottom: 16px; }

/* Estantería: portadas de pie sobre una balda */
.pl-shelf-covers {
  position: relative;
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 4px 4px 8px;
  scrollbar-width: thin;
}

.pl-shelf-covers::before {
  content: "";
  position: absolute;
  top: 158px;
  left: 0;
  right: 0;
  height: 12px;
  border-radius: 6px;
  background: var(--pl-shelf);
}

@media (min-width: 1000px) {
  .pl-shelf-covers::before { width: max(100%, 976px); }
}

.pl-book.pl-book-shelf {
  position: relative;
  flex: 0 0 104px;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}

.pl-book.pl-book-shelf:hover {
  transform: translateY(-4px);
  box-shadow: none;
}

.pl-book-shelf .pl-book-cover {
  width: 104px;
  border-radius: 6px;
  box-shadow: 0 8px 14px -8px rgba(15, 23, 42, 0.6);
}

/* En la portada pequeña solo cabe el candado de la etiqueta Premium */
.pl-book-shelf .pl-book-cover .book-lock-badge {
  left: auto;
  right: 6px;
  bottom: auto;
  top: 6px;
  padding: 0.35em;
}

.pl-book-shelf .pl-book-cover .book-lock-badge span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.pl-book-shelf .pl-book-cover .new-ribbon {
  top: auto;
  bottom: 6px;
  right: 6px;
}

.pl-book.pl-book-shelf h3 {
  margin-top: 26px;
  font-size: 14px;
  line-height: 1.25;
  text-align: left;
}

.pl-book-shelf .pl-book-title-es {
  margin-top: 2px;
  font-size: 12px;
  text-align: left;
}

/* ---------- Racha: la escena a todo el ancho y una tarjeta encima ---------- */
#pl-keep .pl-keep-scene { min-width: 0; }

#pl-keep .hs-panorama {
  height: 340px;
  min-height: 0;
  border: 0;
  border-radius: 24px;
}

.pl-keep-card {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  max-width: 900px;
  margin: -44px auto 0;
  padding: 28px 32px;
  border: 1px solid var(--lp-line);
  border-radius: 22px;
  background: var(--lp-surface);
  box-shadow: var(--lp-shadow-lg);
  text-align: left;
}

.pl-keep-copy h2 {
  margin: 0 0 10px;
  color: var(--lp-navy);
  font-size: clamp(1.8rem, 3.2vw, 2.4rem);
  line-height: 1.12;
}

.pl-keep-copy > p {
  margin: 0 0 18px;
  color: var(--lp-muted);
}

.pl-keep-copy .pl-feature-note {
  margin: 8px 0 0;
  color: var(--lp-muted);
  font-size: 13px;
}

.pl-keep-points {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pl-keep-points li {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  color: var(--lp-ink);
  font-size: 15px;
}

.pl-keep-points i {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--lp-soft);
  color: var(--lp-primary);
}

/* ---------- Preguntas con el zorro ---------- */
.pl-faq-grid {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

.pl-faq-side {
  display: grid;
  justify-items: center;
  gap: 8px;
  text-align: center;
}

.pl-faq-side h2 {
  margin: 0;
  color: var(--lp-navy);
  font-size: 2rem;
  line-height: 1.15;
}

.pl-faq-side p {
  margin: 0;
  color: var(--lp-muted);
}

.hs-faq-fox {
  position: relative;
  width: 210px;
  padding-top: 30px;
}

.hs-faq-fox svg {
  display: block;
  width: 100%;
  height: auto;
}

.hs-faq-bubble {
  position: absolute;
  top: 0;
  right: 0;
  padding: 2px 14px;
  border: 2px solid var(--pl-bubble-line);
  border-radius: 14px;
  background: var(--pl-bubble);
  color: var(--pl-bubble-es);
  font-size: 24px;
  font-weight: 900;
}

#pl-faq .pl-faq {
  max-width: none;
  margin: 0;
}

/* ---------- Cierre con el zorro ---------- */
.pl-close-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  max-width: 900px;
  margin: 0 auto;
  padding: 28px 32px;
  border: 1px solid var(--lp-line);
  border-radius: 22px;
  background: var(--lp-surface);
  box-shadow: var(--lp-shadow);
  text-align: left;
}

.pl-close-scene svg {
  display: block;
  width: 100%;
  height: auto;
}

.pl-close-quote { margin: 0 0 18px; }
.pl-close-quote p { margin: 0; }

.pl-close-quote .pl-quote-en {
  color: var(--lp-navy);
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.25;
}

.pl-close-quote .pl-quote-es {
  margin-top: 6px;
  color: var(--lp-muted);
  font-size: 1.05rem;
}

.pl-close-quote footer {
  margin-top: 6px;
  color: var(--lp-muted);
  font-size: 0.9rem;
}

.pl-close-copy .pl-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-start;
}

/* Deja sitio a la colina del pie de página */
.pl-close { padding-bottom: 40px; }

/* ---------- Tablet y móvil ---------- */
@media (max-width: 900px) {
  .pl-keep-card,
  .pl-faq-grid,
  .pl-close-card {
    grid-template-columns: 1fr;
  }

  .pl-close-scene svg { max-width: 200px; margin: 0 auto; }
}

@media (max-width: 600px) {
  .pl-try-stage { margin-top: 84px; }
  .hs-peek { right: 16px; }
  .hs-peek svg { width: 100px; }
  .hs-peek-bubble { bottom: 24px; font-size: 14px; }

  /* Proporción cercana a la de la escena, para que el niño no se corte por la izquierda */
  #pl-keep .hs-panorama { height: auto; aspect-ratio: 2.2 / 1; border-radius: 18px; }
  .pl-keep-card { margin-top: -36px; padding: 22px 18px; gap: 18px; }

  .pl-faq-grid { gap: 20px; }
  .hs-faq-fox { width: 170px; }

  .pl-close-card { padding: 22px 18px; }
  .pl-close-copy .pl-cta-row .pl-btn { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .hs-peek *,
  .hs-faq-fox *,
  .pl-close-scene * { animation: none !important; }
  .pl-book.pl-book-shelf:hover { transform: none; }
}
