/* Happy Studio — piezas del tema WordPress que no existían en el export estático.
 * Mismo sistema que caso-blog.css: rem de Figma (2531px / 27.97) y overrides
 * en px por debajo de 991px.
 */

/* ---------- Base (antes en <style> de cada HTML) ---------- */
body { opacity: 0; }
body.on { opacity: 1; }
.debug-image { display: none !important; }
.reveal-word { display: inline-block; }

.hp-collage-img { cursor: grab; user-select: none; -webkit-user-drag: none; }
.hp-collage-img:active { cursor: grabbing; }

/* Header fijo debajo de la barra de administración. */
.admin-bar .hp-nav { top: 32px; }
@media screen and (max-width: 782px) {
  .admin-bar .hp-nav { top: 46px; }
}

/* El email del footer ahora es un enlace. */
a.hp-footer-contact-line { display: block; text-decoration: none; }

/* ---------- Splash: cambio de escena con "Meh" ---------- */
.section-happy .titulo-pregunta,
.section-happy .text-legal-happy,
.imagen-fondo { transition: opacity .35s ease; }
.splash-swap .imagen-fondo,
.splash-swap .section-happy .titulo-pregunta,
.splash-swap .section-happy .text-legal-happy { opacity: 0 !important; }
.imagen-fondo:not([src]) { visibility: hidden; }

/* ---------- Caso: ficha técnica ---------- */
.cs-ficha {
  margin: 0 0 4.08rem 11.58rem;
  border-top: 1px solid rgba(18, 18, 18, .15);
}
.cs-ficha-list {
  grid-column-gap: 3rem;
  grid-row-gap: 1.43rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding-top: 1.79rem;
  display: grid;
}
.cs-ficha-item { margin: 0; }
.cs-ficha-item.is-wide { grid-column: span 2; }
.cs-ficha dt {
  color: #838383;
  letter-spacing: -.04em;
  margin-bottom: .36rem;
  font-family: Playfair Display, serif;
  font-size: 1.07rem;
  font-style: italic;
  font-weight: 500;
  line-height: 1.15;
}
.cs-ficha dd {
  color: #121212;
  letter-spacing: -.04em;
  margin: 0;
  font-family: Barlow, sans-serif;
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.25;
}

/* ---------- Caso: listas ---------- */
.cs-list {
  margin: 1.14rem 0;
  padding-left: 1.1em;
}
.cs-list li { margin-bottom: .72rem; }
.cs-list li::marker { color: #121212; }
.cs-block-inner > .cs-p + .cs-p { margin-top: 1.14rem; }

/* Relacionados: nombre del proyecto bajo la imagen. */
.cs-related-item { color: #121212; text-decoration: none; display: block; }
.cs-related-name {
  letter-spacing: -.04em;
  margin-top: .86rem;
  font-family: Barlow, sans-serif;
  font-size: 1.25rem;
  line-height: 1.15;
  display: block;
}

/* ---------- Preguntas frecuentes (casos y blog) ---------- */
.hp-faq {
  grid-column-gap: 3rem;
  grid-template-columns: 1fr 1fr;
  margin: 5.04rem 0;
  display: grid;
}
.hp-faq-title {
  color: #121212;
  letter-spacing: -.09em;
  margin: 0;
  font-family: Barlow, sans-serif;
  font-size: 4.58rem;
  font-weight: 500;
  line-height: 1.03;
}
.hp-faq-item { border-top: 1px solid rgba(18, 18, 18, .2); }
.hp-faq-item:last-child { border-bottom: 1px solid rgba(18, 18, 18, .2); }
.hp-faq-q {
  color: #000;
  letter-spacing: -.04em;
  cursor: pointer;
  padding: 1.29rem 2.5rem 1.29rem 0;
  font-family: Playfair Display, serif;
  font-size: 1.72rem;
  font-style: italic;
  font-weight: 500;
  line-height: 1.15;
  list-style: none;
  position: relative;
}
.hp-faq-q::-webkit-details-marker { display: none; }
.hp-faq-q::after {
  content: "+";
  font-family: Barlow, sans-serif;
  font-style: normal;
  font-weight: 400;
  position: absolute;
  top: 1.1rem;
  right: 0;
  transition: transform .3s;
}
.hp-faq-item[open] .hp-faq-q::after { transform: rotate(45deg); }
.hp-faq-a {
  color: #000;
  letter-spacing: -.04em;
  padding: 0 0 1.43rem;
  font-family: Barlow, sans-serif;
  font-size: 1.25rem;
  line-height: 1.3;
}
.hp-faq.is-post { grid-template-columns: 1fr; grid-row-gap: 2rem; }
.hp-faq.is-post .hp-faq-q { font-size: 1.97rem; }
.hp-faq.is-post .hp-faq-a { font-size: 1.5rem; }

/* ---------- Entrada del blog: bloques de Gutenberg ---------- */
.bp-body h3 {
  color: #121212;
  letter-spacing: -.05em;
  margin: 1.79rem 0 1.07rem;
  font-family: Playfair Display, serif;
  font-size: 2.57rem;
  font-style: italic;
  font-weight: 500;
  line-height: 1.15;
}
.bp-body ul,
.bp-body ol {
  color: #000;
  margin: 0 0 1.3em;
  padding-left: 1.2em;
  font-family: Barlow, sans-serif;
  font-size: 1.97rem;
  line-height: 1.3;
}
.bp-body li { margin-bottom: .4em; }
.bp-body figure { margin: 0; }
.bp-body figure.bp-inline,
.bp-body .wp-block-image.bp-inline {
  width: calc(100% + 1.43rem);
  max-width: none;
  margin: 2.43rem 0 1.43rem -.715rem;
  aspect-ratio: auto;
}
.bp-body figure.bp-inline img {
  object-fit: cover;
  width: 100%;
  height: auto;
  aspect-ratio: 1706 / 893;
  display: block;
}
.bp-body figcaption {
  color: #838383;
  margin-top: .5rem;
  font-family: Barlow, sans-serif;
  font-size: 1.07rem;
}
.bp-body a { color: inherit; text-decoration: underline; }
.bp-body a:hover { color: #838383; }
.bp-body .wp-block-buttons { margin: 2rem 0; }
.bp-body .wp-block-button__link,
.bp-body .bp-cta {
  color: #121212;
  background-color: var(--fosfo);
  border-radius: 0;
  padding: .5rem 1.25rem .64rem;
  font-family: Barlow, sans-serif;
  font-size: 1.72rem;
  font-weight: 500;
  text-decoration: none;
  display: inline-block;
}
.bp-updated { color: #838383; }

/* ---------- Formulario: avisos y campo trampa ---------- */
.bp-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.bp-notice {
  margin: 0 0 2rem;
  padding: 1rem 1.25rem;
  font-family: Barlow, sans-serif;
  font-size: 1.25rem;
  line-height: 1.3;
}
.bp-notice.is-ok { background-color: var(--fosfo); color: #121212; }
.bp-notice.is-error { background-color: #121212; color: #fff; }

/* ---------- 404 ---------- */
.hp-404 { min-height: 60vh; }
.hp-404 .bl-excerpt { margin-bottom: 2rem; }

@media screen and (max-width: 991px) {
  .cs-ficha { margin: 0 0 48px; }
  .cs-ficha-list { grid-template-columns: 1fr 1fr; grid-column-gap: 20px; grid-row-gap: 16px; padding-top: 20px; }
  .cs-ficha dt { font-size: 15px; }
  .cs-ficha dd, .cs-related-name { font-size: 17px; }
  .hp-faq { grid-template-columns: 1fr; grid-row-gap: 24px; margin: 48px 0; }
  .hp-faq-title { font-size: 44px; }
  .hp-faq-q, .hp-faq.is-post .hp-faq-q { font-size: 22px; padding: 16px 32px 16px 0; }
  .hp-faq-q::after { top: 14px; }
  .hp-faq-a, .hp-faq.is-post .hp-faq-a { font-size: 17px; padding-bottom: 18px; }
  .bp-body h3 { font-size: 26px; }
  .bp-body ul, .bp-body ol { font-size: 20px; }
  .bp-body .wp-block-button__link, .bp-body .bp-cta { font-size: 20px; }
  .bp-notice { font-size: 16px; }
}
@media screen and (max-width: 479px) {
  .cs-ficha-list { grid-template-columns: 1fr; }
  .cs-ficha-item.is-wide { grid-column: auto; }
}
