/* ACTIVATE · Noticias maquetadas como revista (solo noticias; los flashes no)
 * Rejilla de 12 columnas que nunca sale de los márgenes de la página.
 * Esquinas de marca: arriba-izquierda y abajo-derecha rectas; las otras dos, redondeadas. */

.art-page--noticia .art-body--mag { --mag-w: min(1080px, calc(100vw - 2 * clamp(20px, 5vw, 56px))); --corner: 0 22px 0 22px; }
.art-body--mag .mag {
  width: var(--mag-w);
  margin-left: calc((100% - var(--mag-w)) / 2);
  display: flex; flex-direction: column;
  gap: clamp(26px, 4vw, 52px);
}
.mag p { margin: 0 0 1.15em; font-size: clamp(15.5px, 1.25vw, 17px); line-height: 1.82; color: var(--fg); overflow-wrap: break-word; }
.mag p:last-child { margin-bottom: 0; }
.mag a { color: inherit; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }

/* entradilla con capitular */
.mag-lead { width: min(100%, 880px); }
.mag-lead p { font-size: clamp(20px, 2.5vw, 29px); line-height: 1.42; font-weight: 400; }
.mag-lead--long p { font-size: clamp(18px, 1.9vw, 22px); line-height: 1.55; }
.mag-lead p b, .mag-lead p strong { font-weight: 500; }
.mag-lead p::first-letter {
  float: left; font-family: var(--font-display); font-weight: 900; color: var(--accent);
  font-size: 3.6em; line-height: .82; padding: .06em .14em 0 0; text-transform: uppercase;
}

/* texto corrido: la columna se va desplazando para romper el bloque */
.mag-flow { width: min(100%, 700px); margin-left: 16%; }
.mag-flow + .mag-flow { margin-top: calc(-1 * clamp(26px, 4vw, 52px) + 1.15em); }

/* cabecera de sección: número grande calado */
.mag-sec { display: grid; grid-template-columns: auto 1fr; align-items: end; gap: 18px; padding-top: 10px; border-bottom: 1px solid var(--border); padding-bottom: 12px; }
.mag-sec-n { font-family: var(--font-display); font-weight: 900; font-size: clamp(48px, 7vw, 96px); line-height: .8; color: transparent; -webkit-text-stroke: 1.5px var(--accent); }
.mag-sec h3 { margin: 0; font-family: var(--font-display); font-weight: 900; text-transform: uppercase; font-size: clamp(17px, 2.2vw, 28px); line-height: 1.08; color: var(--fg); overflow-wrap: break-word; }

/* doble página: texto y pieza */
.mag-spread { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(20px, 3vw, 40px); align-items: start; }
.mag-spread-copy { grid-column: 1 / span 7; grid-row: 1; }
.mag-spread .mag-media { grid-column: 8 / span 5; grid-row: 1; }
.mag-spread--left .mag-media { grid-column: 1 / span 5; }
.mag-spread--left .mag-spread-copy { grid-column: 6 / span 7; }
.mag-spread--social .mag-media, .mag-spread--image .mag-media { position: sticky; top: 96px; }

/* la pieza puede ser también una frase, un detalle de la foto, una lista o un mosaico */
.mag-spread--video .mag-spread-copy { grid-column: 1 / span 6; }
.mag-spread--video .mag-media { grid-column: 7 / span 6; }
.mag-spread--left.mag-spread--video .mag-media { grid-column: 1 / span 6; }
.mag-spread--left.mag-spread--video .mag-spread-copy { grid-column: 7 / span 6; }
.mag-spread--quote > .mag-media, .mag-spread--detail > .mag-media, .mag-spread--list > .mag-media, .mag-spread--quote > .mag-spread-copy { align-self: center; }
.mag-spread .mag-quote, .mag-spread .mag-keys, .mag-spread .mag-cite { width: 100%; margin-left: 0; }
.mag-spread .mag-quote p { font-size: clamp(18px, 2vw, 26px); overflow-wrap: break-word; }
.mag-spread--left .mag-quote { border-left: 0; border-right: 3px solid var(--accent); }
.mag-detail { margin: 0; }
.mag-detail-img { width: 100%; aspect-ratio: 4 / 5; max-height: 520px; background-size: auto 135%; background-position: 62% 38%; background-color: var(--surface-2); border-radius: var(--corner); }
.mag-spread--left .mag-detail-img { background-position: 38% 42%; }
.mag-detail figcaption { margin-top: 8px; font-family: var(--font-mono); font-size: 9px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted-2); }
.mag-media--set .mag-rail { gap: 10px; }
.mag-media--set .mag-rail > :nth-child(even) { margin-top: 28px; }

/* piezas sueltas */
.mag-solo { display: flex; }
.mag-solo--wide .mag-media { width: 100%; }
.mag-solo--left .mag-media { width: min(100%, 620px); }
.mag-solo--right { justify-content: flex-end; }
.mag-solo--right .mag-media { width: min(100%, 620px); }

.mag-media { min-width: 0; }
.mag-media iframe { display: block; width: 100%; max-width: 100%; border: 0; }
.mag-media--video iframe { aspect-ratio: 16 / 9; height: auto; border-radius: var(--corner); }
.mag-media--audio iframe { min-height: 232px; border-radius: 12px; }
.mag-media figure { margin: 0; }
.mag-media img { display: block; width: 100%; height: auto; border-radius: var(--corner); }
.mag-media figcaption { margin-top: 8px; font-family: var(--font-mono); font-size: 9px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted-2); }

/* varias imágenes seguidas: mosaico escalonado */
.mag-rail { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 2vw, 28px); align-items: start; }
.mag-rail > :nth-child(even) { margin-top: clamp(20px, 5vw, 70px); }

/* dos columnas desniveladas */
.mag-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(24px, 4vw, 56px); align-items: start; }
.mag-cols > :nth-child(2) { margin-top: 3.2em; padding-top: 18px; border-top: 2px solid var(--accent); }

/* frase destacada (literal de la noticia) */
.mag-quote { width: min(100%, 880px); padding: clamp(22px, 3.5vw, 40px); background: var(--surface); border-radius: var(--corner); border-left: 3px solid var(--accent); box-sizing: border-box; }
.mag-quote--right { align-self: flex-end; }
.mag-quote p { margin: 0; font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: clamp(19px, 2.8vw, 36px); line-height: 1.16; color: var(--fg); }
.mag-quote--live p span { opacity: .2; transition: opacity .25s linear; }
.mag-quote--live p span.on { opacity: 1; }

/* franja de detalle de la foto principal */
.mag-band { margin: 0; }
.mag-band-img { width: 100%; aspect-ratio: 21 / 8; background-size: 150% auto; background-position: 62% 40%; border-radius: var(--corner); background-color: var(--surface-2); }
.mag-band figcaption { margin-top: 8px; text-align: right; font-family: var(--font-mono); font-size: 9px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted-2); }

/* listas como ficha de claves */
.mag-keys { width: min(100%, 780px); margin-left: 16%; background: var(--surface); border-radius: var(--corner); padding: clamp(18px, 3vw, 30px); box-sizing: border-box; }
.mag-keys ul, .mag-keys ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.mag-keys li { position: relative; padding-left: 24px; font-size: 15px; line-height: 1.65; color: var(--fg); }
.mag-keys li::before { content: ''; position: absolute; left: 0; top: .55em; width: 10px; height: 10px; background: var(--accent); border-radius: 0 5px 0 5px; }

.mag-cite { width: min(100%, 700px); margin-left: 16%; padding-left: 22px; border-left: 2px solid var(--accent); box-sizing: border-box; font-style: italic; }
.mag-cite blockquote { margin: 0; }
.mag-promo { border-top: 1px solid var(--border); padding-top: 16px; }
.mag-promo p { font-size: 13px; color: var(--muted-2); }

/* dentro de la revista los márgenes los pone la rejilla (anula los antiguos de .art-body) */
.art-body .mag-media iframe { margin: 0; }
.art-body .afm-embed iframe { margin: 0; max-width: none; min-height: 0; }

/* embebidos según el tema */
.afm-embed { width: 100%; max-width: 540px; margin: 0 auto; }
.afm-embed--instagram { position: relative; overflow: hidden; border-radius: 0 16px 0 16px; background: var(--surface); }
.afm-embed--instagram iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.afm-embed--instagram.is-dark .ig-base { filter: invert(.92) hue-rotate(180deg); }
.afm-embed--tiktok .tt-player { width: 100%; aspect-ratio: 9 / 16; border: 0; }

/* vinilo de progreso */
.mag-vinyl { position: fixed; left: 18px; bottom: 108px; z-index: 60; width: 56px; height: 56px; padding: 3px; border: 0; border-radius: 50%; cursor: pointer; background: conic-gradient(var(--accent) var(--progress, 0deg), var(--border) 0); }
.mag-vinyl[hidden] { display: none; }
.mag-vinyl-disc { display: block; width: 100%; height: 100%; border-radius: 50%; background: repeating-radial-gradient(circle, #15110d 0 2px, #2a231b 2px 3px); position: relative; }
.mag-vinyl-disc::after { content: ''; position: absolute; left: 50%; top: 5px; width: 2px; height: 9px; background: var(--accent); }
.mag-vinyl-pct { position: absolute; inset: 15px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--accent); color: #0a0806; font: 700 9px var(--font-mono); }

/* ---------- tableta ---------- */
@media (max-width: 900px) {
  .mag-flow, .mag-keys, .mag-cite { width: 100%; margin-left: 0; }
  .mag-spread { display: flex; flex-direction: column; gap: 22px; }
  .mag-spread .mag-media { width: 100%; }
  .mag-spread > .mag-media, .mag-spread > .mag-spread-copy { align-self: stretch; }
  .mag-spread--social .mag-media, .mag-spread--image .mag-media { position: static; }
  .mag-cols { grid-template-columns: 1fr; row-gap: 22px; }
  .mag-cols > :nth-child(2) { margin: 0 0 0 clamp(18px, 7vw, 56px); padding-top: 14px; }
}

/* ---------- móvil: otra lectura, no la de escritorio encogida ---------- */
@media (max-width: 640px) {
  .mag-lead p::first-letter { font-size: 3.2em; }

  /* el título de sección acompaña mientras se lee, como la pestaña de un disco */
  .mag-sec { position: sticky; top: 64px; z-index: 5; background: var(--bg); padding: 10px 0; gap: 12px; align-items: center; }
  .mag-sec-n { font-size: 34px; -webkit-text-stroke-width: 1px; }
  .mag-sec h3 { font-size: 13px; }

  /* la pieza entra como una polaroid ladeada, alternando lado, dentro del margen */
  .mag-spread .mag-media--social, .mag-solo .mag-media--social { width: 93%; transform: rotate(-1.1deg); box-shadow: 0 14px 34px rgba(0, 0, 0, .28); border-radius: 0 16px 0 16px; }
  .mag-spread--right .mag-media--social { align-self: flex-end; transform: rotate(1.1deg); }
  .mag-spread--left .mag-media--social { align-self: flex-start; }
  .mag-spread-copy { order: 0; }
  /* en el móvil las piezas siguen alternando: unas se arriman a la izquierda y otras a la derecha */
  .mag-spread > .mag-media--detail, .mag-spread > .mag-media--image { width: 86%; }
  .mag-spread--right > .mag-media--detail, .mag-spread--right > .mag-media--image { align-self: flex-end; }
  .mag-spread--left > .mag-media--detail, .mag-spread--left > .mag-media--image { align-self: flex-start; }
  .mag-spread--left .mag-quote { border-right: 0; }
  .mag-spread .mag-quote p { font-size: 21px; }

  /* carrete: se desliza con el dedo y asoma la siguiente foto */
  .mag-rail { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; padding-bottom: 10px; scrollbar-width: none; }
  .mag-rail::-webkit-scrollbar { display: none; }
  .mag-rail > * { flex: 0 0 82%; scroll-snap-align: start; }
  .mag-rail > :nth-child(even) { margin-top: 0; }

  /* la frase destacada, como la carátula de un single */
  .mag-quote { aspect-ratio: auto; min-height: 62vw; display: flex; align-items: flex-end; border-left: 0; border-bottom: 4px solid var(--accent); position: relative; overflow: hidden; }
  .mag-quote::before { content: ''; position: absolute; width: 74vw; height: 74vw; right: -30vw; top: -30vw; border-radius: 50%; background: repeating-radial-gradient(circle, transparent 0 7px, var(--border) 7px 8px); }
  .mag-quote p { position: relative; font-size: 22px; }

  .mag-band-img { aspect-ratio: 4 / 5; background-size: auto 130%; }
  .mag-vinyl { left: auto; right: 14px; bottom: 108px; width: 50px; height: 50px; }
  .mag-vinyl-pct { inset: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .mag-spread .mag-media--social, .mag-solo .mag-media--social { transform: none !important; }
}

/* en movil: el rastro en una linea y sin botones flotantes tapando el texto de la noticia */
@media (max-width: 640px) {
  .site-crumbs-inner { white-space: nowrap; overflow: hidden; }
  /* en noticias, flashes y eventos el titular ya está justo debajo: se quita del rastro en vez de cortarlo */
  body:has(.art-page) .site-crumbs-current, body:has(.art-page) .site-crumbs-inner > .site-crumbs-sep:nth-last-child(2),
  body:has(.ev-hero-title) .site-crumbs-current, body:has(.ev-hero-title) .site-crumbs-inner > .site-crumbs-sep:nth-last-child(2) { display: none; }
  body:has(.art-page--noticia) .contact-bar { display: none; }
  .mag-sec { top: 92px; }
}

/* la portada repetida dentro del texto se ve entera, sin ampliar */
html .mag-detail-img, html .mag-band-img { aspect-ratio: 16 / 9; max-height: none; background-size: contain; background-repeat: no-repeat; background-position: center; }
