/* Yachay: secciones de la home posteriores al hero. */

/* Título de sección compartido (Cormorant) */
.saber__title,
.piedra__title,
.materiales__title {
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 1.2rem + 2.2vw, 2.75rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -.01em;
  text-wrap: balance;
}

/* Cuerpo de texto de sección: Work Sans 300, 15 px, interlineado 1.5 */
.saber__lead,
.piedra__text > p:not(.eyebrow),
.materiales__item p,
.saber__pillars p {
  margin: 0;
  color: var(--fg-muted);
  font-size: .9375rem;
  font-weight: 300;
  line-height: var(--lh-body);
}

/* ───────── El saber integrado ───────── */
.saber { padding-block: var(--section-y); border-top: 1px solid var(--rule); }
.saber__grid { display: grid; grid-template-columns: minmax(0, 17rem) minmax(0, 1fr); gap: 1.5rem 4rem; align-items: start; }
.saber__aside { display: flex; flex-direction: column; align-items: flex-start; gap: 2.5rem; }
.saber__eyebrow { margin: 0; padding-top: .75rem; }
/* Sello: el isotipo como grafismo estático. El margen negativo compensa el aire interno del dibujo. */
.saber__seal {
  --w: clamp(7rem, 10vw, 10.5rem);
  display: block;
  width: var(--w);
  margin-left: calc(var(--w) * -.117);
  aspect-ratio: 1284 / 1225;
  background: var(--fg);
  opacity: .55;
  -webkit-mask: url("../img/isotipo-yachay.svg") center / contain no-repeat;
  mask: url("../img/isotipo-yachay.svg") center / contain no-repeat;
}
.saber__body { position: relative; }
.saber__title { max-width: 22ch; }
/* Prueba: perfil de los Andes arriba a la derecha. Se activa con la clase saber--andes en la sección. */
.saber__horizon { display: none; }
.saber--andes .saber__horizon {
  --w: 14rem;
  display: block;
  position: absolute;
  top: .75rem;
  right: 0;
  width: var(--w);
  aspect-ratio: 64 / 26;
  background: var(--fg);
  opacity: .3;
  -webkit-mask: url("../img/glifos/glifo-andes.svg") center / 100% auto no-repeat;
  mask: url("../img/glifos/glifo-andes.svg") center / 100% auto no-repeat;
}
.saber__lead { max-width: 44rem; margin-bottom: 3.5rem; }
.saber__br { display: none; }

.saber__pillars {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
  list-style: none;
}
.saber__pillars li { padding: 1.5rem 2rem 1.75rem; border-left: 1px solid var(--rule); }
.saber__pillars li:first-child { padding-left: 0; border-left: 0; }
.saber__n { display: block; font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; color: var(--fg-muted); }
.saber__name { margin: .75rem 0; font-family: var(--font-display); font-size: clamp(1.5rem, 1.2rem + 1vw, 1.875rem); font-weight: 400; line-height: 1.15; }
.saber__pillars p { max-width: 24rem; }

/* ───────── Banda oscura ───────── */
.band {
  --band-bg: #1f1b19;
  --band-fg: #f1eee6;
  --band-muted: #bdb8ad;
  background: var(--band-bg);
  color: var(--band-fg);
}
/* Tema noche: la banda es el inverso del papel (crema sobre grafito) */
:root[data-theme="dark"] .band { --band-bg: #e7e4dc; --band-fg: #242321; --band-muted: #4d4b45; }
.band .eyebrow { color: var(--band-muted); }

/* La piedra enseña: imagen a medio paño (de borde a borde de la pantalla) y texto en la otra mitad */
.piedra {
  display: grid;
  grid-template-columns: minmax(var(--gutter), 1fr) minmax(0, calc(var(--container) / 2)) minmax(0, calc(var(--container) / 2)) minmax(var(--gutter), 1fr);
}
.piedra__media { position: relative; grid-column: 1 / 3; margin: 0; min-height: min(46rem, 82svh); }
.piedra__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.piedra__text { grid-column: 3 / 4; align-self: center; padding: var(--section-y) 0 var(--section-y) clamp(2rem, 5vw, 5rem); }
.piedra__text .piedra__eyebrow { margin: 0 0 1.25rem; }
.piedra__title { max-width: 20ch; color: var(--band-fg); }
.piedra__text > p:not(.eyebrow) { max-width: 30rem; color: var(--band-muted); }
.piedra__text > p.piedra__epigrafe {
  max-width: 26rem;
  margin: 2rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid currentColor;
  border-top-color: color-mix(in oklch, currentColor 25%, transparent);
  color: var(--band-fg);
  font-family: var(--font-display, "Cormorant Garamond", Georgia, serif);
  font-size: clamp(1.25rem, 1.6vw, 1.55rem);
  font-style: italic;
  line-height: 1.35;
}

/* ───────── Materiales y proceso ───────── */
.materiales { padding-block: var(--section-y); border-top: 1px solid var(--rule); }
.band + .materiales { border-top: 0; }
.materiales__grid { display: grid; grid-template-columns: minmax(0, 17rem) minmax(0, 1fr); gap: 1.5rem 4rem; align-items: start; }
.materiales__eyebrow { margin: 0; padding-top: .75rem; }
.materiales__title { max-width: 20ch; margin-bottom: 3rem; }
.materiales__body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3rem; align-items: stretch; }

.materiales__list { display: grid; grid-template-rows: repeat(3, 1fr); margin: 0; padding: 0; border-top: 1px solid var(--rule); list-style: none; }
.materiales__item {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr);
  gap: 1.5rem;
  align-content: center;
  align-items: start;
  padding-block: 1.5rem;
  border-bottom: 1px solid var(--rule);
}
.materiales__name { margin: 0 0 .5rem; font-family: var(--font-display); font-size: clamp(1.5rem, 1.2rem + 1vw, 1.875rem); font-weight: 400; line-height: 1.15; }
.materiales__media { display: grid; grid-template-rows: 1fr 1fr; gap: 1rem; margin: 0; }
.materiales__media figure { margin: 0; aspect-ratio: 3 / 2; overflow: hidden; border-radius: var(--radius-media); background: var(--placeholder); }
.materiales__media img { width: 100%; height: 100%; object-fit: cover; }
.materiales__note { margin: 1.5rem 0 0; color: var(--fg-muted); font-size: .8125rem; font-weight: 300; line-height: var(--lh-body); }

/* Glifos: máscara con el color del tema. --k corrige el tamaño óptico de cada dibujo. */
.glifo {
  display: block;
  width: 3.5rem;
  aspect-ratio: 1;
  background: var(--fg);
  -webkit-mask: var(--g) center / calc(var(--k, 1) * 100%) no-repeat;
  mask: var(--g) center / calc(var(--k, 1) * 100%) no-repeat;
}
.glifo--piedras { --g: url("../img/glifos/glifo-piedras.svg"); }
.glifo--plata   { --g: url("../img/glifos/glifo-plata.svg"); }
.glifo--macrame { --g: url("../img/glifos/glifo-macrame02.svg"); }

/* ───────── Responsive ───────── */
@media (min-width: 56.01rem) {
  .saber__br { display: inline; }
}
@media (max-width: 70rem) {
  .saber--andes .saber__horizon { display: none; }
}
@media (max-width: 56rem) {
  .saber__grid,
  .materiales__grid { grid-template-columns: 1fr; }
  .saber__eyebrow,
  .materiales__eyebrow { padding-top: 0; }
  .saber__seal { display: none; }

  .piedra { display: block; }
  .piedra__media { min-height: 0; aspect-ratio: 4 / 3; }
  .piedra__text { padding: 2.5rem var(--gutter) 3rem; }

  .materiales__body { grid-template-columns: 1fr; gap: 2rem; }
  .materiales__media { grid-template-rows: none; grid-template-columns: 1fr 1fr; gap: .75rem; }
  .materiales__media figure { aspect-ratio: 4 / 5; }
}
@media (max-width: 43.75rem) {
  .saber__pillars { grid-template-columns: 1fr; }
  .saber__pillars li { padding: 1.25rem 0; border-left: 0; border-top: 1px solid var(--rule); }
  .saber__pillars li:first-child { padding-top: 1.5rem; border-top: 0; }
}
