/*
 * Sobre Martha (TASK-0005): page-sobre-martha.php, sólo en esa página.
 * Referencia: https://preview.kelgu.com/marthaalles/sobre-martha/v2/
 *
 * Usa los tipos comunes de v4.css (ma4-wrap, ma4-section, ma4-eyebrow, ma4-h2, ma4-pill,
 * ma4-btn-dark, ma4-collections, tarjetas ma4-svc) y sólo variables de tokens.css. Las clases
 * propias llevan «ma4-ab-». Movimiento: el de la home (hover y foco dentro de no-preference; las
 * entradas, con «ma4-anima»).
 */

/* ------------------------------------------------------------------------------------------
 * Base (la de main.ma4-home)
 * --------------------------------------------------------------------------------------- */

/* GeneratePress pone .site-content en flex; style.css baja todo <main> 26 px. */
main#main.ma4-about { flex: 1 1 auto; width: 100%; min-width: 0; margin: 0 !important; padding: 0; font-family: var(--font-text); color: var(--ink); background: var(--bg); font-size: 17px; line-height: 1.6; }
:where(.ma4-about) a { color: var(--accent-strong); }
:where(.ma4-about) a:hover { color: var(--ink); }
:where(.ma4-about) :is(h1, h2, h3, p, ul, ol, li, figure) { margin: 0; padding: 0; }
:where(.ma4-about) *, :where(.ma4-about) *::before, :where(.ma4-about) *::after { box-sizing: border-box; }

/* ------------------------------------------------------------------------------------------
 * Presentación: retrato editorial. El texto ocupa la mitad izquierda del .ma4-wrap (su borde
 * derecho cae en el centro de la ventana) y el retrato, la mitad derecha de la sección, de alto
 * completo y hasta el borde de la ventana; object-position deja la cara en el tercio superior.
 * --------------------------------------------------------------------------------------- */

.ma4-ab-intro { position: relative; display: flex; min-height: clamp(600px, calc(100vh - 81px), 860px); min-height: clamp(600px, calc(100svh - 81px), 860px); }
.ma4-ab-intro-grid { display: flex; width: 100%; }
.ma4-ab-intro-copy { width: 50%; display: flex; flex-direction: column; gap: 22px; padding: 88px 56px 88px 0; }
.ma4-ab-intro h1 { margin: 0; font-family: var(--font-display); font-weight: var(--weight-medium); font-size: clamp(44px, 4.6vw, 72px); line-height: 1; letter-spacing: -.025em; color: var(--ink); }
.ma4-ab-intro-title { max-width: 22ch; font-family: var(--font-display); font-weight: var(--weight-medium); font-size: clamp(24px, 2.4vw, 32px); line-height: 1.2; letter-spacing: -.012em; text-wrap: balance; }
.ma4-ab-intro-sub { max-width: 52ch; font-size: 19px; color: var(--ink-soft); }
.ma4-ab-facts { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 20px 24px; padding-top: 10px; }
.ma4-ab-fact { display: flex; flex-direction: column; gap: 2px; padding-right: 24px; border-right: 1px solid var(--line); }
.ma4-ab-fact:last-child { border-right: 0; padding-right: 0; }
.ma4-ab-fact strong { font-family: var(--font-display); font-weight: var(--weight-medium); font-size: 40px; line-height: 1.1; letter-spacing: -.01em; font-variant-numeric: lining-nums tabular-nums; }
.ma4-ab-fact span { font-size: 14px; color: var(--ink-mute); }

.ma4-ab-photo { position: absolute; top: 0; right: 0; bottom: 0; width: 50%; background: var(--bg-sand); }
.ma4-ab-photo img { display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 50% 10%; }

.ma4-ab-lead-sec { padding: 64px 0 96px; }
.ma4-ab-lead { max-width: 64ch; font-size: 20px; line-height: 1.65; color: var(--ink-soft); }

/* ------------------------------------------------------------------------------------------
 * Su obra: el texto y, al lado, las tapas de los títulos que nombra, en un estante.
 * --------------------------------------------------------------------------------------- */

.ma4-ab-work { background: var(--bg-sand); }
.ma4-ab-work-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: 64px; align-items: start; }
.ma4-ab-work-text { display: flex; flex-direction: column; gap: 22px; }
.ma4-ab-work-text p { max-width: 62ch; color: var(--ink-soft); }
.ma4-ab-work-text .ma4-btn-dark { align-self: flex-start; margin-top: 6px; }
.ma4-ab-cited { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 120px; }
.ma4-ab-label { font-size: 14px; font-weight: var(--weight-semibold); color: var(--ink-soft); }
:where(.ma4-about) .ma4-ab-shelf { list-style: none; margin: 0; padding: 22px 18px 0; display: flex; align-items: flex-end; gap: 14px; background: var(--surface); border-radius: 14px 14px 0 0; border-bottom: 10px solid var(--line); }
.ma4-ab-shelf li { flex: 1 1 0; min-width: 0; }
.ma4-ab-shelf a { display: block; }
.ma4-ab-shelf img { display: block; width: 100%; height: auto; border-radius: 3px; box-shadow: var(--shadow-cover); transform-origin: 50% 100%; }
.ma4-ab-shelf a:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 3px; }
.ma4-ab-collections { margin-top: 56px; }

/* ------------------------------------------------------------------------------------------
 * Quién es Martha Alles: la foto en la firma de libros y la biografía.
 * --------------------------------------------------------------------------------------- */

.ma4-ab-who { background: var(--surface); }
.ma4-ab-who-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: start; }
.ma4-ab-who-photo { position: sticky; top: 120px; }
.ma4-ab-who-photo img { display: block; width: 100%; height: auto; aspect-ratio: 800 / 474; object-fit: cover; border-radius: 20px; }
.ma4-ab-who-text { display: flex; flex-direction: column; gap: 22px; }
.ma4-ab-who-text p { max-width: 62ch; color: var(--ink-soft); }
.ma4-ab-editions { display: flex; flex-direction: column; gap: 16px; margin-top: 8px; padding: 28px; border-radius: 20px; background: var(--bg); }
:where(.ma4-about) .ma4-ab-editions ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: end; }
.ma4-ab-editions a { display: flex; flex-direction: column; gap: 10px; color: var(--ink); text-decoration: none; font-size: 15px; font-weight: var(--weight-semibold); line-height: 1.3; }
.ma4-ab-editions a:hover { color: var(--accent-strong); }
.ma4-ab-editions img { display: block; width: 100%; max-width: 132px; height: auto; border-radius: 3px; box-shadow: var(--shadow-cover); transform-origin: 50% 100%; }
.ma4-ab-editions a:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 3px; }

/* ------------------------------------------------------------------------------------------
 * Tablet y celular
 * --------------------------------------------------------------------------------------- */

@media (max-width: 1000px) {
  .ma4-ab-work-grid, .ma4-ab-who-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .ma4-ab-intro-copy { padding: 64px 32px 64px 0; }
  .ma4-ab-facts { gap: 14px 16px; }
  .ma4-ab-fact { padding-right: 16px; }
  .ma4-ab-fact strong { font-size: 32px; }
  .ma4-ab-fact span { font-size: 13px; line-height: 1.35; }
  .ma4-ab-cited, .ma4-ab-who-photo { position: static; }
  .ma4-ab-who-photo { max-width: 640px; }
}
@media (max-width: 760px) {
  /* El retrato arriba, a todo el ancho (4:5), y el texto debajo. */
  .ma4-ab-intro { display: block; min-height: 0; }
  .ma4-ab-photo { position: static; width: 100%; aspect-ratio: 4 / 5; }
  .ma4-ab-intro-copy { width: auto; padding: 40px 0 0; }
  .ma4-ab-intro-sub { font-size: 17px; }
  .ma4-ab-facts { gap: 14px; }
  .ma4-ab-fact { padding-right: 14px; }
  .ma4-ab-fact strong { font-size: 30px; }
  .ma4-ab-lead-sec { padding: 48px 0 72px; }
  .ma4-ab-lead { font-size: 18px; }
  :where(.ma4-about) .ma4-ab-shelf { gap: 8px; padding: 16px 12px 0; }
  .ma4-ab-editions { padding: 22px; }
  :where(.ma4-about) .ma4-ab-editions ul { gap: 14px; }
  .ma4-ab-editions a { font-size: 14px; }
}

/* ------------------------------------------------------------------------------------------
 * Movimiento
 * --------------------------------------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  /* Tapas: se levantan y se inclinan apenas, como en la biblioteca de la home. */
  .ma4-ab-shelf img, .ma4-ab-editions img { transition: transform .5s cubic-bezier(.2, .7, .2, 1), box-shadow .5s cubic-bezier(.2, .7, .2, 1); }
  .ma4-ab-shelf a:hover img, .ma4-ab-shelf a:focus-visible img, .ma4-ab-editions a:hover img, .ma4-ab-editions a:focus-visible img { transform: translateY(-10px) rotate(-2deg); box-shadow: var(--shadow-cover-lift); }
}

/* Entradas: las de v4.css; el retrato sólo se funde, quieto. */
.ma4-anima .ma4-ab-photo.ma4-rv { transform: none; transition: opacity 1.4s ease; transition-delay: .12s; }
