/* ============================================================
   LOOM — Componentes
   ------------------------------------------------------------
   Piezas reutilizables del sistema visual. Cada componente se
   construye SOLO con tokens de loom-tokens.css: si un valor
   aparece literal aqui, es un bug.

   La especificidad se apoya en clases, nunca en IDs, para que
   el editor de bloques pueda sobrescribir sin pelear.

   Los componentes existen en dos "mundos":
     - .loom-dark  (marketing LOOM, fondo oscuro)
     - .loom-paper (lectura, fondo claro)
   Los componentes son iguales en ambos; solo cambian las
   variables que heredan del contexto.
   ============================================================ */

/* ─── CONTEXTO ─────────────────────────────────────────────
   body.loom-dark  -> marketing de LOOM (fondo oscuro)
   body.loom-paper -> superficie clara (articulos, lectura) */

body.loom-dark {
  background: var(--loom-canvas);
  color: var(--loom-text);
}

body.loom-paper {
  background: var(--loom-paper);
  color: var(--loom-paper-ink);
}

/* ─── SUPERFICIE BASE ────────────────────────────────────────
   El fondo oscuro no es plano: lleva un halo superior y
   grano. El halo da profundidad, el grano da tactilidad. */

.loom-dark-surface {
  position: relative;
  isolation: isolate;
}

.loom-dark-surface::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: var(--loom-halo);
  pointer-events: none;
}

.loom-dark-surface::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: var(--loom-grain);
  opacity: var(--loom-grain-opacity);
  pointer-events: none;
}

/* ─── SECCION ────────────────────────────────────────────────
   Shell de seccion. Padding vertical por escala, fondo por
   variante. Todo el sitio usa esta clase para el ritmo
   vertical. */

.loom-section {
  position: relative;
  padding-top: var(--loom-space-3xl);
  padding-bottom: var(--loom-space-3xl);
}

.loom-section--tight {
  padding-top: var(--loom-space-2xl);
  padding-bottom: var(--loom-space-2xl);
}

.loom-section--loose {
  padding-top: var(--loom-space-4xl);
  padding-bottom: var(--loom-space-4xl);
}

/* Variantes de fondo. El ritmo de secciones es lo que evita
   que el sitio se sienta como una hoja larga. */
.loom-section--canvas {
  background: var(--loom-canvas);
}

.loom-section--surface {
  background: var(--loom-surface-1);
}

.loom-section--panel {
  background: var(--loom-ink-panel);
}

.loom-section--deep {
  background: var(--loom-void);
}

/* Borde superior hairline con degradado lima. */
.loom-rule {
  height: 1px;
  border: 0;
  margin: 0;
  background: linear-gradient(90deg, var(--loom-lime) 0%, transparent 42%);
  opacity: .55;
}

.loom-rule--centered {
  background: linear-gradient(90deg, transparent 0%, var(--loom-lime) 50%, transparent 100%);
}

/* ─── KICKER ──────────────────────────────────────────────────
   Micro etiqueta. Es el ancla de la jerarquia editorial:
   antes de cualquier titular hay una pista de que va. */

.loom-kicker {
  display: inline-flex;
  align-items: center;
  gap: var(--loom-space-xs);
  margin: 0 0 var(--loom-space-md);
  font-family: var(--loom-body);
  font-size: var(--loom-fs-kicker);
  font-weight: 700;
  letter-spacing: var(--loom-ls-kicker);
  text-transform: uppercase;
  color: var(--loom-lime);
}

.loom-kicker::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--loom-lime);
  flex: none;
}

.loom-kicker--plain::before {
  display: none;
}

/* ─── INDICE ──────────────────────────────────────────────────
   Numeral de seccion. Cifras tabulares para que 01 y 02
   ocupen el mismo ancho. */

.loom-index {
  font-family: var(--loom-display);
  font-size: var(--loom-fs-meta);
  font-weight: 800;
  letter-spacing: var(--loom-ls-wide);
  font-variant-numeric: tabular-nums;
  color: var(--loom-lime);
}

/* ─── TIPOGRAFIA ───────────────────────────────────────────── */

.loom-display {
  font-family: var(--loom-display);
  font-size: var(--loom-fs-display);
  font-weight: 800;
  line-height: var(--loom-lh-display);
  letter-spacing: var(--loom-ls-display);
  color: var(--loom-text);
  text-wrap: balance;
}

.loom-h1 {
  font-family: var(--loom-display);
  font-size: var(--loom-fs-h1);
  font-weight: 800;
  line-height: var(--loom-lh-tight);
  letter-spacing: var(--loom-ls-display);
  color: var(--loom-text);
  text-wrap: balance;
}

.loom-h2 {
  font-family: var(--loom-display);
  font-size: var(--loom-fs-h2);
  font-weight: 700;
  line-height: var(--loom-lh-tight);
  letter-spacing: var(--loom-ls-heading);
  color: var(--loom-text);
  text-wrap: balance;
}

.loom-h3 {
  font-family: var(--loom-display);
  font-size: var(--loom-fs-h3);
  font-weight: 700;
  line-height: var(--loom-lh-heading);
  letter-spacing: var(--loom-ls-heading);
  color: var(--loom-text);
}

/* Acento serif: frases de autor, cifras grandes, citas.
   Es lo que da el caracter editorial. */
.loom-serif {
  font-family: var(--loom-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -.01em;
}

.loom-lede {
  margin: 0;
  max-width: 62ch;
  font-size: var(--loom-fs-lead);
  line-height: 1.6;
  color: var(--loom-text-2);
}

.loom-body-text {
  margin: 0;
  font-size: var(--loom-fs-body);
  line-height: var(--loom-lh-body);
  color: var(--loom-text-2);
}

.loom-meta {
  font-family: var(--loom-body);
  font-size: var(--loom-fs-meta);
  font-weight: 500;
  line-height: var(--loom-lh-tight-body);
  color: var(--loom-text-3);
}

/* ─── BOTONES ─────────────────────────────────────────────────
   Primario: fondo lima, texto tinta. Es la inversion exacta
   del mark de LOOM, no una coincidencia. */

.loom-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--loom-space-xs);
  padding: 15px 28px;
  font-family: var(--loom-body);
  font-size: var(--loom-fs-sm);
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--loom-radius-pill);
  cursor: pointer;
  transition: background-color var(--loom-dur) var(--loom-ease),
              border-color var(--loom-dur) var(--loom-ease),
              color var(--loom-dur) var(--loom-ease),
              transform var(--loom-dur) var(--loom-ease),
              box-shadow var(--loom-dur) var(--loom-ease);
}

/* Las variantes se declaran con doble clase a proposito: asi un
   selector de enlace del tema (`.nav a`, (0,1,1)) no puede pisar
   el color del boton ((0,2,0)). Sin esto, el boton del header se
   quedaba con texto claro sobre fondo lima, ilegible. */

.loom-btn.loom-btn--primary {
  background: var(--loom-lime);
  border-color: var(--loom-lime);
  color: var(--loom-text-inverse);
}

.loom-btn.loom-btn--primary:hover,
.loom-btn.loom-btn--primary:focus-visible {
  background: var(--loom-lime-hi);
  border-color: var(--loom-lime-hi);
  transform: translateY(-2px);
  box-shadow: var(--loom-glow-lime);
}

/* Ghost: solo borde. Para acciones secundarias. */
.loom-btn.loom-btn--ghost {
  background: transparent;
  border-color: var(--loom-border-2);
  color: var(--loom-text);
}

.loom-btn.loom-btn--ghost:hover,
.loom-btn.loom-btn--ghost:focus-visible {
  border-color: var(--loom-lime);
  color: var(--loom-lime);
  transform: translateY(-2px);
}

/* Link con flecha: la flecha se desplaza al hacer hover. */
.loom-btn.loom-btn--link {
  padding: 0;
  background: none;
  border: 0;
  color: var(--loom-lime);
  border-radius: 0;
}

.loom-btn.loom-btn--link:hover,
.loom-btn.loom-btn--link:focus-visible {
  color: var(--loom-lime-hi);
}

.loom-btn.loom-btn--link .loom-btn__arrow {
  display: inline-block;
  transition: transform var(--loom-dur) var(--loom-ease);
}

.loom-btn.loom-btn--link:hover .loom-btn__arrow,
.loom-btn.loom-btn--link:focus-visible .loom-btn__arrow {
  transform: translateX(4px);
}

/* ─── FOCO ────────────────────────────────────────────────────
   Un solo anillo de foco en todo el sitio. Visible sobre
   fondo oscuro y sobre fondo claro. */

.loom-dark :focus-visible,
.loom-btn:focus-visible,
.loom-card:focus-visible {
  outline: 2px solid var(--loom-lime);
  outline-offset: 3px;
  border-radius: var(--loom-radius-xs);
}

/* ─── TARJETA ───────────────────────────────────────────────── */

.loom-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: var(--loom-space-lg);
  background: var(--loom-surface-1);
  border: 1px solid var(--loom-border);
  border-radius: var(--loom-radius);
  transition: border-color var(--loom-dur) var(--loom-ease),
              transform var(--loom-dur) var(--loom-ease),
              background-color var(--loom-dur) var(--loom-ease),
              box-shadow var(--loom-dur) var(--loom-ease);
}

.loom-card:hover {
  background: var(--loom-surface-2);
  border-color: var(--loom-border-lime);
  transform: translateY(-3px);
  box-shadow: var(--loom-shadow-2);
}

/* Tarjeta con acento: un borde superior de color la marca
   como la destacada del grupo. */
.loom-card--accent {
  border-top: 3px solid var(--loom-lime);
  padding-top: calc(var(--loom-space-lg) - 2px);
}

.loom-card__title {
  margin: 0 0 var(--loom-space-xs);
  font-family: var(--loom-display);
  font-size: var(--loom-fs-h3);
  font-weight: 700;
  line-height: var(--loom-lh-heading);
  letter-spacing: var(--loom-ls-heading);
  color: var(--loom-text);
}

.loom-card__body {
  margin: 0;
  font-size: var(--loom-fs-sm);
  line-height: var(--loom-lh-body);
  color: var(--loom-text-2);
}

.loom-card__meta {
  margin-top: auto;
  padding-top: var(--loom-space-md);
  font-size: var(--loom-fs-meta);
  font-weight: 500;
  color: var(--loom-text-3);
}

/* ─── PANEL ───────────────────────────────────────────────────
   Bloque con el verde de marca. Se usa para los bloques
   destacados y para el CTA final. */

.loom-panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: var(--loom-space-2xl);
  background: var(--loom-ink-panel);
  border: 1px solid var(--loom-border);
  border-radius: var(--loom-radius-lg);
}

.loom-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--loom-halo);
}

.loom-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: var(--loom-grain);
  opacity: var(--loom-grain-opacity);
}

/* ─── STAT ────────────────────────────────────────────────────
   Cifra grande + etiqueta. Para resultados. */

.loom-stat__value {
  font-family: var(--loom-display);
  font-size: clamp(38px, 5vw, 68px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: var(--loom-ls-display);
  font-variant-numeric: tabular-nums;
  color: var(--loom-lime);
}

.loom-stat__label {
  margin: var(--loom-space-xs) 0 0;
  font-size: var(--loom-fs-meta);
  font-weight: 500;
  line-height: var(--loom-lh-tight-body);
  color: var(--loom-text-3);
}

/* ─── CITA ────────────────────────────────────────────────────
   Cita editorial en serif. Rompe el ritmo de las tarjetas. */

.loom-quote {
  margin: 0;
  font-family: var(--loom-serif);
  font-style: italic;
  font-size: clamp(20px, 2.2vw, 30px);
  line-height: 1.42;
  letter-spacing: -.01em;
  color: var(--loom-text);
  text-wrap: pretty;
}

.loom-quote__source {
  margin: var(--loom-space-md) 0 0;
  font-family: var(--loom-body);
  font-style: normal;
  font-size: var(--loom-fs-meta);
  font-weight: 500;
  letter-spacing: var(--loom-ls-wide);
  text-transform: uppercase;
  color: var(--loom-text-3);
}

/* ─── TAG ───────────────────────────────────────────────────── */

.loom-tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  font-family: var(--loom-body);
  font-size: var(--loom-fs-meta);
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--loom-text-2);
  background: var(--loom-surface-2);
  border: 1px solid var(--loom-border);
  border-radius: var(--loom-radius-pill);
}

.loom-tag--lime {
  color: var(--loom-lime);
  background: var(--loom-lime-wash);
  border-color: var(--loom-border-lime);
}

/* ─── MEDIA ───────────────────────────────────────────────────
   Slot de imagen con ratio y placeholder. El sitio no depende
   de imagenes externas: el slot define el espacio y el fondo. */

.loom-media {
  position: relative;
  overflow: hidden;
  background: var(--loom-surface-2);
  border: 1px solid var(--loom-border);
  border-radius: var(--loom-radius);
}

.loom-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.loom-media--4x3 { aspect-ratio: 4 / 3; }
.loom-media--16x9 { aspect-ratio: 16 / 9; }
.loom-media--1x1 { aspect-ratio: 1 / 1; }
.loom-media--3x4 { aspect-ratio: 3 / 4; }

/* ─── LISTA ───────────────────────────────────────────────────
   Lista con marca lime en vez de vineta generica. */

.loom-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.loom-list__item {
  position: relative;
  padding: var(--loom-space-sm) 0 var(--loom-space-sm) var(--loom-space-lg);
  border-bottom: 1px solid var(--loom-border);
}

.loom-list__item::before {
  content: "";
  position: absolute;
  top: calc(var(--loom-space-sm) + .55em);
  left: 0;
  width: 8px;
  height: 8px;
  background: var(--loom-lime);
  border-radius: 1px;
  transform: rotate(45deg);
}

/* ─── APARICION AL ENTRAR ─────────────────────────────────────
   Mejora progresiva: si el navegador no soporta
   scroll-timeline, el contenido se ve normal. */

@supports (animation-timeline: view()) {
  .loom-reveal {
    animation: loom-reveal-in linear both;
    animation-timeline: view();
    animation-range: entry 8% cover 26%;
  }

  @keyframes loom-reveal-in {
    from {
      opacity: 0;
      transform: translateY(28px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

/* ─── PREFERS-REDUCED-MOTION ───────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .loom-btn,
  .loom-card,
  .loom-btn__arrow {
    transition: none !important;
  }

  .loom-btn:hover,
  .loom-card:hover,
  .loom-btn--link:hover .loom-btn__arrow {
    transform: none !important;
  }

  @supports (animation-timeline: view()) {
    .loom-reveal {
      animation: none !important;
      opacity: 1 !important;
      transform: none !important;
    }
  }
}

/* ============================================================
   ARQUETIPOS EDITORIALES
   ------------------------------------------------------------
   Las piezas que sustituyen a las rejillas de tarjetas.

   La diferencia con la version anterior no es el color: es la
   FORMA. Una pagina hecha de cajas iguales se ve como plantilla
   aunque este bien pintada. Estos componentes rompen la
   repeticion: manifiesto, indice, declaracion, linea de tiempo,
   cifra y banda de imagen.

   REGLA DEL LIME: aqui el lime es relleno, marca o filete.
   Nunca es el color de un titular grande.
   ============================================================ */

/* ─── HERO EDITORIAL ─────────────────────────────────────────
   El titular ocupa el ancho completo. Debajo, la franja de
   metadatos a la izquierda y la ranura de imagen a la derecha,
   alineadas al mismo alto. Es la composicion de una revista:
   el titular manda, la imagen acompaña.

   NO es texto-izquierda + tarjeta-derecha. */

.loom-hero-editorial {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  grid-template-areas:
    "head  head"
    "body  media";
  column-gap: var(--loom-space-2xl);
  align-items: start;
}

.loom-hero-editorial__head { grid-area: head; }
.loom-hero-editorial__body { grid-area: body; }
.loom-hero-editorial__media { grid-area: media; }

@media (max-width: 900px) {
  .loom-hero-editorial {
    grid-template-columns: 1fr;
    grid-template-areas:
      "head"
      "media"
      "body";
    row-gap: var(--loom-space-xl);
  }
}

.loom-hero-editorial__title {
  margin: 0;
  font-family: var(--loom-display);
  font-size: var(--loom-fs-display);
  font-weight: 800;
  line-height: var(--loom-lh-display);
  letter-spacing: var(--loom-ls-display);
  color: var(--loom-text);
  text-wrap: balance;
}

.loom-hero-editorial__rule {
  height: 1px;
  margin: var(--loom-space-lg) 0 var(--loom-space-md);
  border: 0;
  background: linear-gradient(90deg, var(--loom-lime) 0%, var(--loom-border) 28%, transparent 100%);
}

.loom-hero-editorial__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--loom-space-xl);
  margin: 0 0 var(--loom-space-lg);
}

.loom-hero-editorial__metaItem {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.loom-hero-editorial__metaLabel {
  margin: 0;
  font-size: var(--loom-fs-kicker);
  font-weight: 700;
  letter-spacing: var(--loom-ls-kicker);
  text-transform: uppercase;
  color: var(--loom-text-3);
}

.loom-hero-editorial__metaValue {
  margin: 0;
  font-size: var(--loom-fs-sm);
  font-weight: 600;
  color: var(--loom-text);
}

/* ─── RANURA DE MEDIO ────────────────────────────────────────
   La imagen no es un adorno: es parte de la composicion.

   El placeholder esta disenado para que se vea INTENCIONAL, no
   como una imagen faltante: tres capas de luz (lime arriba a la
   izquierda, aqua abajo a la derecha, y el degrade de
   superficie) mas el grano. El resultado es una superficie
   atmosferica que aguanta bien hasta que haya una foto real. */

.loom-slot {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(62% 92% at 14% 0%, var(--loom-slot-lime) 0%, transparent 55%),
    radial-gradient(54% 80% at 82% 100%, var(--loom-slot-aqua) 0%, transparent 58%),
    radial-gradient(40% 70% at 58% 42%, var(--loom-slot-light) 0%, transparent 62%),
    linear-gradient(152deg, var(--loom-surface-2) 0%, var(--loom-canvas) 48%, var(--loom-ink-panel) 100%);
  border: 1px solid var(--loom-border);
}

.loom-slot::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: var(--loom-grain);
  opacity: calc(var(--loom-grain-opacity) * 3.2);
}

/* La imagen llena la ranura y se recorta sola al ratio de la ranura.
   Asi una sola imagen sirve para varias ranuras de distinto formato. */
.loom-slot img,
.loom-slot > picture > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Con imagen, la marca de esquina se aparta: ya hay composicion. */
.loom-slot--filled::after {
  content: none;
}

/* Marca de esquina: senala que la ranura esta reservada para una foto.
   Solo aparece en las ranuras sin imagen (--filled la desactiva).
   Dos lineas en L, no un rectangulo: menos ruido, mas editorial. */
.loom-slot::after {
  content: "";
  position: absolute;
  top: 16px;
  left: 16px;
  width: 30px;
  height: 30px;
  border-top: 1px solid var(--loom-lime);
  border-left: 1px solid var(--loom-lime);
  opacity: .65;
}

.loom-slot--3x4 { aspect-ratio: 3 / 4; }
.loom-slot--4x3 { aspect-ratio: 4 / 3; }
.loom-slot--16x9 { aspect-ratio: 16 / 9; }
.loom-slot--21x9 { aspect-ratio: 21 / 9; }
.loom-slot--1x1 { aspect-ratio: 1 / 1; }

/* ─── CAPA CON PARALLAX ────────────────────────────────────
   La imagen de fondo se mueve mas lento que el scroll.

   REGLA DURA: NINGUN ancestro de la imagen puede tener
   `overflow: hidden`. Un ancestro con overflow crea un
   CONTENEDOR DE SCROLL, y la timeline `view()` deja de avanzar:
   la animacion se congela en su valor inicial y el parallax no se
   mueve. Sin errores en la consola: simplemente no avanza.

   Por eso:
     - El recorte se hace con `clip-path`, que recorta igual pero
       no crea contenedor de scroll.
     - El contenedor de pagina usa `overflow: clip` (ver loom.css).

   El ancho lo fija `max-width: none`: el layout limitado de
   WordPress aplica max-width a los hijos directos, y el fondo se
   quedaria en 1200px en vez de ocupar todo el ancho.

   Ojo: `overflow-x: clip` con `overflow-y: visible` NO sirve,
   porque el `visible` computa a `auto` y vuelve a crear el
   contenedor. */

.loom-parallax-layer {
  position: absolute;
  inset: 0;
  max-width: none !important;
  margin-inline: 0 !important;
  z-index: 0;
  clip-path: inset(0);
  pointer-events: none;

  /* Cuanto se mueve la imagen, en px. El JS lo lee de aqui, asi que
     el recorrido se ajusta en un solo sitio. */
  --loom-parallax-travel: 400px;
}

/* La imagen es mas alta que su caja (880px de holgura: 440px arriba y
   440px abajo) para que al desplazarse nunca se vea un borde. Ese margen
   es el que permite que el recorrido sea amplo y se note. */
.loom-parallax-layer img {
  position: absolute;
  top: -440px;
  left: 0;
  width: 100%;
  height: calc(100% + 880px);
  object-fit: cover;
  object-position: center;
}

/* El parallax lo calcula loom-motion.js con JavaScript.
   No se usa `animation-timeline: view()` a proposito: las animaciones
   por scroll solo existen en Chrome y Edge 115+, y en el resto de
   navegadores el fondo se queda quieto sin dar ningun error. Con JS
   funciona en todos.

   El transform lo aplica el JS como estilo en linea, asi que aqui no
   debe haber ninguna animacion de transform: pelearian. */

/* ─── MANIFIESTO ─────────────────────────────────────────────
   Columnas separadas por filete. Sin cajas, sin bordes de
   tarjeta: el filete ES el diseño. */

.loom-manifest {
  display: grid;
  grid-template-columns: repeat(var(--loom-manifest-cols, 3), minmax(0, 1fr));
  border-top: 1px solid var(--loom-border);
}

@media (max-width: 900px) {
  .loom-manifest {
    grid-template-columns: 1fr;
  }
}

.loom-manifest__item {
  padding: var(--loom-space-lg) var(--loom-space-lg) var(--loom-space-lg) 0;
  border-left: 1px solid var(--loom-border);
  padding-left: var(--loom-space-lg);
}

.loom-manifest__item:first-child {
  border-left: 0;
  padding-left: 0;
}

@media (max-width: 900px) {
  .loom-manifest__item {
    border-left: 0;
    border-top: 1px solid var(--loom-border);
    padding-left: 0;
  }

  .loom-manifest__item:first-child {
    border-top: 0;
  }
}

.loom-manifest__title {
  margin: var(--loom-space-2xs) 0 var(--loom-space-xs);
  font-family: var(--loom-display);
  font-size: var(--loom-fs-h4);
  font-weight: 700;
  line-height: var(--loom-lh-heading);
  letter-spacing: var(--loom-ls-heading);
  color: var(--loom-text);
}

.loom-manifest__body {
  margin: 0;
  font-size: var(--loom-fs-sm);
  line-height: var(--loom-lh-body);
  color: var(--loom-text-2);
}

/* ─── INDICE DE SERVICIOS ────────────────────────────────────
   El indice de una revista: numero, titulo grande, descripcion y
   etiquetas. Al pasar el cursor, un fondo barre desde la
   izquierda. */

.loom-svc-index {
  border-top: 1px solid var(--loom-border);
}

.loom-svc-row {
  position: relative;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: var(--loom-space-lg);
  align-items: start;
  padding: var(--loom-space-2xl) var(--loom-space-md) var(--loom-space-2xl) 0;
  border-bottom: 1px solid var(--loom-border);
  isolation: isolate;
  text-decoration: none;
  transition: color var(--loom-dur) var(--loom-ease);
}

/* El barrido. clip-path hace que el fondo "entre" desde la
   izquierda en vez de aparecer de golpe. */
.loom-svc-row::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--loom-surface-1);
  clip-path: inset(0 100% 0 0);
  transition: clip-path var(--loom-dur-slow) var(--loom-ease-out);
}

.loom-svc-row:hover::before,
.loom-svc-row:focus-within::before {
  clip-path: inset(0 0 0 0);
}

@media (max-width: 780px) {
  .loom-svc-row {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: var(--loom-space-md);
    padding-right: 0;
    padding-top: var(--loom-space-lg);
    padding-bottom: var(--loom-space-lg);
  }

  .loom-svc-row__meta {
    grid-column: 2;
  }
}

.loom-svc-row__number {
  font-family: var(--loom-display);
  font-size: var(--loom-fs-meta);
  font-weight: 800;
  letter-spacing: var(--loom-ls-wide);
  font-variant-numeric: tabular-nums;
  color: var(--loom-lime);
  padding-top: 10px;
}

/* El titulo manda: es grande y del color del texto. La
   descripcion es apoyo: mas chica y mas apagada. */
.loom-svc-row__title {
  margin: 0 0 var(--loom-space-sm);
  font-family: var(--loom-display);
  font-size: clamp(26px, 3.2vw, 44px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: var(--loom-ls-heading);
  color: var(--loom-text);
  transition: color var(--loom-dur) var(--loom-ease);
}

.loom-svc-row:hover .loom-svc-row__title {
  color: var(--loom-lime);
}

.loom-svc-row__body {
  margin: 0;
  max-width: 58ch;
  font-size: var(--loom-fs-sm);
  line-height: var(--loom-lh-body);
  color: var(--loom-text-2);
}

.loom-svc-row__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  max-width: 15rem;
  padding-top: 12px;
}

/* ─── DECLARACION ────────────────────────────────────────────
   Una frase. Sin nada mas. El respiro es el recurso.

   Cuando la seccion lleva imagen de fondo con parallax, el
   contenido va por encima del scrim. */

.loom-statement {
  position: relative;
  z-index: 2;
  padding-block: var(--loom-space-4xl);
  text-align: center;
}

.loom-statement__text {
  margin: 0 auto;
  max-width: 20ch;
  font-family: var(--loom-serif);
  font-style: italic;
  font-size: clamp(38px, 6vw, 84px);
  line-height: 1.08;
  letter-spacing: -.02em;
  color: var(--loom-text);
  text-wrap: balance;
}

.loom-statement__text em {
  font-style: italic;
  color: var(--loom-lime);
}

.loom-statement__note {
  margin: var(--loom-space-lg) auto 0;
  max-width: 52ch;
  font-size: var(--loom-fs-sm);
  line-height: var(--loom-lh-body);
  color: var(--loom-text-3);
}

/* ─── LINEA DE TIEMPO ────────────────────────────────────────
   Una espina vertical que se dibuja al hacer scroll. */

.loom-timeline {
  position: relative;
  padding-left: var(--loom-space-2xl);
}

/* Espina base: siempre visible. */
.loom-timeline::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 0;
  width: 1px;
  background: var(--loom-border);
}

/* Progreso: la parte lima que avanza con el scroll. */
.loom-timeline::after {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 0;
  width: 1px;
  background: var(--loom-lime);
  transform: scaleY(0);
  transform-origin: top;
}

@supports (animation-timeline: view()) {
  .loom-timeline::after {
    animation: loom-spine linear both;
    animation-timeline: view();
    animation-range: entry 10% cover 55%;
  }
}

@keyframes loom-spine {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}

.loom-timeline__item {
  position: relative;
  padding-bottom: var(--loom-space-2xl);
}

.loom-timeline__item:last-child {
  padding-bottom: 0;
}

/* El punto de la espina. */
.loom-timeline__item::before {
  content: "";
  position: absolute;
  top: 9px;
  left: calc(-1 * var(--loom-space-2xl) + 3px);
  width: 9px;
  height: 9px;
  background: var(--loom-lime);
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--loom-canvas);
}

.loom-timeline__number {
  margin: 0 0 var(--loom-space-2xs);
  font-family: var(--loom-display);
  font-size: var(--loom-fs-meta);
  font-weight: 800;
  letter-spacing: var(--loom-ls-wide);
  font-variant-numeric: tabular-nums;
  color: var(--loom-lime);
}

.loom-timeline__title {
  margin: 0 0 var(--loom-space-xs);
  font-family: var(--loom-display);
  font-size: var(--loom-fs-h3);
  font-weight: 700;
  line-height: var(--loom-lh-heading);
  letter-spacing: var(--loom-ls-heading);
  color: var(--loom-text);
}

.loom-timeline__body {
  margin: 0;
  max-width: 62ch;
  font-size: var(--loom-fs-sm);
  line-height: var(--loom-lh-body);
  color: var(--loom-text-2);
}

/* ─── CIFRA ──────────────────────────────────────────────────
   Una sola cifra, enorme. No tres columnas de estadisticas. */

.loom-figure {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr);
  gap: var(--loom-space-2xl);
  align-items: center;
}

@media (max-width: 780px) {
  .loom-figure {
    grid-template-columns: 1fr;
    gap: var(--loom-space-lg);
  }
}

.loom-figure__value {
  margin: 0;
  font-family: var(--loom-display);
  font-size: clamp(88px, 15vw, 200px);
  font-weight: 800;
  line-height: .84;
  letter-spacing: -.05em;
  font-variant-numeric: tabular-nums;
  color: var(--loom-lime);
}

.loom-figure__label {
  margin: 0 0 var(--loom-space-sm);
  font-family: var(--loom-display);
  font-size: var(--loom-fs-h3);
  font-weight: 700;
  line-height: var(--loom-lh-heading);
  letter-spacing: var(--loom-ls-heading);
  color: var(--loom-text);
}

.loom-figure__body {
  margin: 0;
  max-width: 52ch;
  font-size: var(--loom-fs-body);
  line-height: var(--loom-lh-body);
  color: var(--loom-text-2);
}

/* ─── BANDA DE MEDIO ─────────────────────────────────────────
   El peso fotografico de la pagina, sin depender de que haya
   fotos. */

.loom-media-band {
  position: relative;
  isolation: isolate;
}

/* Parallax muy suave: la imagen se desplaza un poco mas lento
   que el scroll. La tecnica (clip-path en vez de overflow) esta
   documentada en loom.css, en la capa con parallax. */

/* ─── ENLACE CON SUBRAYADO ──────────────────────────────────
   El lime como filete, nunca como color de texto. */

.loom-link {
  color: var(--loom-text);
  text-decoration: none;
  background-image: linear-gradient(var(--loom-lime), var(--loom-lime));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 1px;
  transition: background-size var(--loom-dur) var(--loom-ease),
              color var(--loom-dur) var(--loom-ease);
  padding-bottom: 2px;
}

.loom-link:hover,
.loom-link:focus-visible {
  color: var(--loom-text);
  background-size: 100% 1px;
}

/* ─── ENTRADA ESCALONADA ─────────────────────────────────────
   Los hijos entran uno detras de otro al cargar. */

@keyframes loom-rise {
  from {
    opacity: 0;
    transform: translateY(26px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.loom-stagger > * {
  animation: loom-rise .9s var(--loom-ease-out) both;
}

.loom-stagger > *:nth-child(1) { animation-delay: .05s; }
.loom-stagger > *:nth-child(2) { animation-delay: .14s; }
.loom-stagger > *:nth-child(3) { animation-delay: .23s; }
.loom-stagger > *:nth-child(4) { animation-delay: .32s; }
.loom-stagger > *:nth-child(5) { animation-delay: .41s; }
.loom-stagger > *:nth-child(6) { animation-delay: .50s; }
.loom-stagger > *:nth-child(7) { animation-delay: .59s; }
.loom-stagger > *:nth-child(8) { animation-delay: .68s; }

@media (prefers-reduced-motion: reduce) {
  .loom-stagger > * {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  @supports (animation-timeline: view()) {
    .loom-timeline::after {
      animation: none !important;
      transform: scaleY(1) !important;
    }

    .loom-media-band__inner {
      animation: none !important;
      transform: none !important;
    }
  }
}
