/* ==========================================================================
   NEWPROTECT — Biblioteca de materiales (/materiales y /materiales/*)
   Clases prefijadas .ma-  ·  Usa los tokens y el vocabulario de styles.css
   ========================================================================== */

/* Retícula propia (4 / 8 / 12 col): los hijos ocupan todo el ancho en móvil */
.ma-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: var(--gap); row-gap: clamp(28px, 4vw, 56px); }
@media (min-width: 720px) { .ma-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .ma-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); } }
.ma-grid > * { grid-column: 1 / -1; min-width: 0; }

/* Titulares */
.ma-title { font-size: var(--fs-h1); font-weight: 300; line-height: 1.06; letter-spacing: -.02em; max-width: 15ch; }
.ma-title--wide { max-width: 20ch; }
.ma-lead { font-size: var(--fs-lead); line-height: 1.7; color: var(--anthracite); max-width: 34em; }
.ma-statement { font-size: clamp(1.5rem, 1.05rem + 1.9vw, 2.625rem); font-weight: 300; line-height: 1.25; letter-spacing: -.015em; max-width: 26em; text-wrap: balance; }
.ma-statement em { font-family: var(--serif); font-style: italic; font-size: 1.08em; }
.ma-statement--sm { font-size: clamp(1.25rem, 1rem + 1.1vw, 1.875rem); line-height: 1.35; max-width: 30em; }
.ma-sub { font-size: 1.3125rem; font-weight: 300; line-height: 1.25; margin-bottom: 10px; }

/* Secciones de texto: cabecera a la izquierda, cuerpo a la derecha */
.ma-sec { padding-block: clamp(40px, 5.5vw, 88px); }
.ma-aside { display: grid; gap: 24px var(--gap); grid-template-columns: 1fr; border-top: 1px solid var(--line); padding-top: clamp(28px, 3vw, 44px); }
.ma-aside__head .h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.25rem); line-height: 1.12; }
.ma-aside__head .label { margin-bottom: 18px; display: block; }
.ma-aside__body { min-width: 0; }
@media (min-width: 1024px) {
  .ma-aside { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .ma-aside__head { grid-column: 1 / 5; }
  .ma-aside__body { grid-column: 6 / 13; }
  .ma-aside--sticky .ma-aside__head { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; }
  .ma-aside--wide .ma-aside__head { grid-column: 1 / 4; }
  .ma-aside--wide .ma-aside__body { grid-column: 5 / 13; }
}
.ma-aside__body .prose p { max-width: 38em; }

/* Cabecera dividida: texto + fotografía vertical */
.ma-hero { padding-bottom: clamp(56px, 7vw, 112px); align-items: end; }
.ma-hero .ma-title { margin-bottom: clamp(20px, 2.4vw, 32px); }
@media (min-width: 1024px) {
  .ma-hero__text { grid-column: 1 / 7; align-self: end; }
  .ma-hero__media { grid-column: 8 / 13; }
}
.ma-hero__media .ph { max-height: 82vh; }

/* Datos de un vistazo (dl con líneas) */
.ma-facts { border-top: 1px solid var(--line); margin-top: clamp(28px, 3vw, 44px); max-width: 40em; }
.ma-facts > div { display: grid; grid-template-columns: 1fr; gap: 4px 20px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.ma-facts dt { font-size: var(--fs-label); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); font-weight: 500; line-height: 1.5; padding-top: 3px; }
.ma-facts dd { font-size: .9688rem; color: var(--anthracite); }
@media (min-width: 560px) { .ma-facts > div { grid-template-columns: minmax(7rem, 11rem) 1fr; } }

/* Ficha en filas (término / descripción) */
.ma-dl { border-top: 1px solid var(--line); }
.ma-dl > div { display: grid; grid-template-columns: 1fr; gap: 6px 24px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.ma-dl dt { font-size: 1.25rem; font-weight: 300; line-height: 1.25; }
.ma-dl dd { color: var(--anthracite); font-size: .9688rem; max-width: 38em; }
@media (min-width: 720px) { .ma-dl > div { grid-template-columns: minmax(0, .75fr) minmax(0, 1.5fr); align-items: baseline; } }
.ma-dl--stack > div { grid-template-columns: 1fr; }

/* Dos columnas con líneas (sin tarjetas) */
.ma-pairs { display: grid; grid-template-columns: 1fr; border-top: 1px solid var(--line); }
.ma-pairs > div { padding: 24px 0 28px; border-bottom: 1px solid var(--line); }
.ma-pairs h3 { font-size: 1.3125rem; font-weight: 300; margin-bottom: 8px; }
.ma-pairs p { color: var(--anthracite); font-size: .9688rem; max-width: 30em; }
@media (min-width: 900px) { .ma-pairs { grid-template-columns: 1fr 1fr; column-gap: calc(var(--gap) * 2); } }

/* Lista numerada con términos destacados (factores a valorar) */
.ma-rows li > span { display: block; }
.ma-rows strong { font-weight: 500; color: var(--ink); }
.bg-ink .ma-rows strong { color: var(--paper); }
.ma-rows li { padding-block: 16px; }
.bg-warm .rows, .bg-warm .rows li, .bg-warm .ma-dl, .bg-warm .ma-dl > div { border-color: var(--mineral); }

/* Nota de limitaciones: filete a la izquierda */
.ma-note { border-left: 1px solid var(--ink); padding-left: clamp(20px, 2.6vw, 40px); max-width: 44em; }
.ma-note p + p { margin-top: 1.1em; }
.ma-note p { color: var(--anthracite); }
.ma-note .ma-statement--sm + p { margin-top: 1.4em; }

/* Enlaces en fila */
.ma-links { display: flex; flex-wrap: wrap; gap: 4px 36px; margin-top: clamp(24px, 3vw, 36px); }

/* Pie de ficha: lectura relacionada + otros tejidos */
.ma-read { border-top: 1px solid var(--line); }
.ma-read a { display: grid; grid-template-columns: 1fr auto; gap: 6px 24px; align-items: center; padding: 22px 0; border-bottom: 1px solid var(--line); transition: padding var(--t-fast) var(--ease); }
.ma-read .c { grid-column: 1; color: var(--muted); }
.ma-read .t { grid-column: 1; font-size: var(--fs-h3); font-weight: 300; line-height: 1.2; }
.ma-read .a { grid-row: 1 / span 2; grid-column: 2; width: 22px; height: 1px; background: currentColor; transition: width var(--t-fast) var(--ease); }
.ma-read a:hover { padding-left: 12px; }
.ma-read a:hover .a { width: 40px; }
@media (min-width: 900px) {
  .ma-read a { grid-template-columns: 11em 1fr auto; }
  .ma-read .c, .ma-read .t { grid-column: auto; }
  .ma-read .a { grid-row: auto; grid-column: auto; }
}
.ma-others__label { margin-top: clamp(40px, 5vw, 64px); color: var(--muted); }
.ma-others { display: flex; flex-wrap: wrap; gap: 0 28px; margin-top: 6px; }
.ma-others a { display: inline-flex; align-items: center; min-height: 44px; font-size: .9375rem; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; color: var(--anthracite); transition: text-decoration-color var(--t-fast) var(--ease); }
.ma-others a:hover { text-decoration-color: transparent; color: var(--ink); }

/* ---------- /materiales · colección asimétrica ---------- */
.ma-coll { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: var(--gap); row-gap: clamp(56px, 8vw, 128px); }
.ma-it { display: block; grid-column: 1 / 4; min-width: 0; }
.ma-it:nth-child(even) { grid-column: 2 / 5; }
.ma-it__cap { margin-top: 20px; display: grid; grid-template-columns: auto 1fr; column-gap: 20px; align-items: baseline; }
.ma-it__n { font-size: var(--fs-label); letter-spacing: .2em; color: var(--muted); }
.ma-it__name { font-size: var(--fs-h3); font-weight: 300; line-height: 1.1; }
.ma-it__txt { grid-column: 2; color: var(--muted); font-size: .9375rem; margin-top: 8px; max-width: 26em; }
.ma-it .link { grid-column: 2; margin-top: 10px; justify-self: start; }
.ma-it:hover .link { text-decoration-color: transparent; }
.ma-it:hover .link::after { transform: translateX(6px); }
.ma-coll__note { grid-column: 1 / -1; align-self: end; }
@media (min-width: 720px) {
  .ma-coll { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .ma-it { grid-column: 1 / 6; }
  .ma-it:nth-child(even) { grid-column: 4 / 9; }
}
@media (min-width: 1024px) {
  .ma-coll { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .ma-it--1 { grid-column: 1 / 6; }
  .ma-it--2 { grid-column: 8 / 12; margin-top: clamp(120px, 15vw, 260px); }
  .ma-it--3 { grid-column: 3 / 7; }
  .ma-it--4 { grid-column: 8 / 13; margin-top: clamp(64px, 8vw, 140px); }
  .ma-it--5 { grid-column: 1 / 5; }
  .ma-it--6 { grid-column: 6 / 10; margin-top: clamp(96px, 12vw, 200px); }
  .ma-it--7 { grid-column: 2 / 7; }
  .ma-coll__note { grid-column: 8 / 13; padding-bottom: 12px; }
}

/* ---------- Lana · dos fotografías ---------- */
@media (min-width: 1024px) {
  .ma-duo__a { grid-column: 1 / 6; }
  .ma-duo__b { grid-column: 7 / 13; margin-top: clamp(96px, 12vw, 220px); }
}
.ma-duo__b .caption { max-width: 32em; }

/* ---------- Bouclé · foto fija + lista de apartados ---------- */
.ma-sticky { display: grid; gap: 40px var(--gap); grid-template-columns: 1fr; }
.ma-sticky__media .ph { max-height: calc(100svh - var(--header-h) - 64px); }
.ma-sticky__head { margin-bottom: clamp(36px, 5vw, 64px); }
.ma-sticky__head .ma-title { margin-bottom: 24px; }
.ma-sticky__list > section { border-top: 1px solid var(--line); padding: clamp(28px, 3.4vw, 48px) 0; display: grid; grid-template-columns: 40px 1fr; gap: 6px 12px; }
.ma-sticky__list > section:last-child { border-bottom: 1px solid var(--line); }
.ma-sticky__list .n { font-size: var(--fs-label); letter-spacing: .2em; color: var(--muted); padding-top: 9px; }
.ma-sticky__list h2 { font-size: var(--fs-h3); line-height: 1.15; margin-bottom: 14px; }
.ma-sticky__list > section > div { grid-column: 2; min-width: 0; }
.ma-sticky__list p { color: var(--anthracite); max-width: 36em; }
.ma-sticky__list p + p { margin-top: 1em; }
.ma-sticky__list .rows { margin-top: 18px; }
@media (min-width: 1024px) {
  .ma-sticky { grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: start; }
  .ma-sticky__media { grid-column: 1 / 6; position: sticky; top: calc(var(--header-h) + 24px); }
  .ma-sticky__body { grid-column: 7 / 13; }
}

/* ---------- Terciopelo · cabecera a sangre ---------- */
.ma-hero-full { height: clamp(580px, 90vh, 920px); }
.ma-hero-full .hero__title { max-width: 15ch; }
.ma-hero-full__top { position: absolute; z-index: 2; left: 0; right: 0; top: calc(var(--header-h) + clamp(24px, 3vw, 40px)); }
.ma-hero-full .crumbs { margin: 0; color: rgba(247, 246, 242, .85); }
.ma-hero-full .crumbs a:hover { color: var(--paper); }
@media (max-width: 719px) { .ma-hero-full > .hero__img { object-position: 50% 55%; } }

/* Tabla editorial de composiciones */
.ma-table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.ma-table caption { text-align: left; font-size: .875rem; color: var(--muted); padding-bottom: 20px; max-width: 44em; caption-side: top; }
.ma-table th, .ma-table td { text-align: left; vertical-align: top; padding: 20px 28px 20px 0; border-bottom: 1px solid var(--line); font-weight: 400; }
.ma-table thead th { font-size: var(--fs-label); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); font-weight: 500; border-top: 1px solid var(--line); padding-block: 14px; }
.ma-table tbody th { font-size: 1.3125rem; font-weight: 300; width: 22%; }
.ma-table td { color: var(--anthracite); }
.ma-table td:last-child { padding-right: 0; }
@media (max-width: 799px) {
  .ma-table, .ma-table tbody, .ma-table tr, .ma-table th, .ma-table td { display: block; width: 100%; }
  .ma-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .ma-table tr { border-top: 1px solid var(--line); padding: 20px 0; }
  .ma-table tbody th, .ma-table td { border: 0; padding: 0 0 8px; width: 100%; }
  .ma-table td::before { content: attr(data-label); display: block; font-size: var(--fs-label); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); font-weight: 500; margin-bottom: 4px; }
  .ma-table tr:last-child { border-bottom: 1px solid var(--line); }
}

/* ---------- Fibras sintéticas · familia en tipografía ---------- */
.ma-family { border-top: 1px solid var(--ink); }
.ma-family li { display: grid; grid-template-columns: 1fr; gap: 6px 24px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.ma-family .t { font-size: var(--fs-h2); font-weight: 300; line-height: 1.05; letter-spacing: -.015em; overflow-wrap: anywhere; }
.ma-family .d { color: var(--muted); max-width: 30em; font-size: .9688rem; }
@media (min-width: 900px) { .ma-family li { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: baseline; } }
.ma-split2 { display: grid; gap: 40px var(--gap); grid-template-columns: 1fr; }
@media (min-width: 1024px) {
  .ma-split2 { grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: start; }
  .ma-split2__a { grid-column: 1 / 8; }
  .ma-split2__b { grid-column: 9 / 13; position: sticky; top: calc(var(--header-h) + 24px); }
}
.ma-aside__body .ma-pairs { margin-top: 28px; }

/* ---------- Tejidos mixtos · gran enunciado ---------- */
.ma-bigline { font-size: clamp(2.25rem, 1.2rem + 4.4vw, 5rem); font-weight: 300; line-height: 1.02; letter-spacing: -.025em; text-wrap: balance; }
@media (min-width: 1024px) {
  .ma-mix__media { grid-column: 1 / 6; }
  .ma-mix__text { grid-column: 7 / 13; align-self: center; }
}
.ma-mix__text .prose { margin-top: clamp(24px, 3vw, 40px); }
.ma-combos { border-top: 1px solid var(--line); margin-top: 20px; }
.ma-combos li { padding: 14px 0; border-bottom: 1px solid var(--line); color: var(--anthracite); font-size: .9688rem; }
.ma-combos strong { font-weight: 500; color: var(--ink); }

/* ---------- Auxiliares de reparto en la retícula .ma-grid ---------- */
@media (min-width: 1024px) {
  .ma-hero__side { grid-column: 8 / 13; align-self: end; }
  .ma-two__a { grid-column: 1 / 6; }
  .ma-two__b { grid-column: 7 / 13; }
}
.ma-hero__side { display: grid; gap: 24px; }
.bg-warm .ma-read, .bg-warm .ma-read a { border-color: var(--mineral); }
