/**
 * filosofia.css — Página /filosofia/ completa (7 secciones).
 *
 * Depende de: tokens.css. Secciones: hero manifiesto → statement →
 * historia → campo → comunidad → espacios → cta. Utilidades compartidas
 * de la página con prefijo .lm-filo-* (todo vive dentro de main.lm-filo).
 *
 * Animaciones: reveals con inview.js (los hijos con --d inline se revelan
 * en cascada cuando su contenedor [data-lm-inview] recibe .is-inview) y
 * carruseles de fundido con fade-carousel.js (.lm-filo-fade).
 */

/* ==========================================================================
   Utilidades de la página
   ========================================================================== */

/* Astra envuelve la plantilla en .ast-container con display:flex (fila,
   pensado para contenido + sidebar): sin esto, el main como flex-item crece
   a su max-content (los 96rem del hero) y deja un HUECO blanco a la derecha
   en pantallas anchas, en toda la altura de la página. */
main.lm-filo {
  width: 100%;
  min-width: 0;
}

/* Reveal en cascada: cualquier elemento con --d inline dentro de un
   contenedor observado. Las filas de ESPACIOS se observan a sí mismas. */
.lm-filo [data-lm-inview] [style*="--d:"] {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.7s ease var(--d, 0s),
    transform 0.7s ease var(--d, 0s);
}
.lm-filo [data-lm-inview].is-inview [style*="--d:"] {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .lm-filo [data-lm-inview] [style*="--d:"] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Kicker compartido (eyebrow de sección) */
.lm-filo-kicker {
  display: block;
  font-family: var(--font-text);
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--secondary);
}
.lm-filo-kicker--light {
  color: var(--primary);
}

/* Placeholder de imagen (mientras llegan las fotos reales):
   franjas suaves + la hoja de la marca centrada */
.lm-filo-ph {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: repeating-linear-gradient(
    45deg,
    var(--surface-container),
    var(--surface-container) 14px,
    var(--surface-container-high) 14px,
    var(--surface-container-high) 28px
  );
  color: var(--outline);
}
.lm-filo-ph svg {
  width: 2.75rem;
  height: 2.75rem;
  opacity: 0.7;
}

/* Carrusel de fundido (hero + historia): fotos apiladas, solo opacity */
.lm-filo-fade {
  position: relative;
  overflow: hidden;
  border-radius: 1.5rem;
  aspect-ratio: 4 / 3;
}
.lm-filo-fade__slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.lm-filo-fade__slide.is-active {
  opacity: 1;
}
.lm-filo-fade__slide img,
.lm-filo-fade__slide .lm-filo-ph {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
@media (prefers-reduced-motion: reduce) {
  .lm-filo-fade__slide {
    transition: none;
  }
}

/* ==========================================================================
   1. Hero manifiesto
   ========================================================================== */
.lm-filo-hero {
  padding: 8.5rem 1rem 4rem; /* despeja la pill fija del header */
}
.lm-filo-hero__inner {
  max-width: 96rem;
  margin: 0 auto;
  display: grid;
  gap: 2.5rem;
  align-items: center;
}
.lm-filo-hero__title {
  margin: 0.75rem 0 0;
  font-family: var(--font-heading);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 0.95;
}
.lm-filo-hero__word {
  display: block;
  font-size: min(15vw, 5.5rem);
  color: var(--tertiary);
}
.lm-filo-hero__word:nth-child(2) {
  color: var(--secondary);
}
.lm-filo-hero__word:nth-child(3) {
  color: transparent;
  -webkit-text-stroke: 2px var(--tertiary);
}
.lm-filo-hero__media {
  position: relative;
}
/* OJO: aspect-ratio + max-height juntos ENCOGEN el ancho para conservar la
   proporción (no solo recortan alto) — por eso el cap de altura solo vive
   en ≥1024, acompañado de margin-inline:auto para que el encogimiento
   quede centrado y no pegado a la izquierda. */
.lm-filo-hero__media .lm-filo-fade {
  aspect-ratio: 4 / 5; /* retrato en móvil, a todo el ancho */
}
@media (min-width: 640px) and (max-width: 1023.98px) {
  .lm-filo-hero__media .lm-filo-fade {
    aspect-ratio: 3 / 2; /* paisaje en la banda tablet (4/5 daría 900px+) */
  }
}
.lm-filo-hero__hashtag {
  display: none;
  font-family: var(--font-text);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.35em;
  color: var(--on-surface-variant);
  writing-mode: vertical-rl;
}

@media (min-width: 1024px) {
  .lm-filo-hero__inner {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 4rem;
  }
  .lm-filo-hero__word {
    font-size: min(8.5vw, 8rem);
  }
  .lm-filo-hero__media .lm-filo-fade {
    aspect-ratio: 4 / 5;
    max-height: 34rem;
    margin-inline: auto; /* el ancho se deriva del cap: centrado, no a la izquierda */
  }
  .lm-filo-hero__hashtag {
    display: block;
    position: absolute;
    top: 0.5rem;
    right: -2.75rem;
  }
}

/* ==========================================================================
   2. Statement central
   ========================================================================== */
.lm-filo-statement {
  padding: 5rem 1rem;
}
.lm-filo-statement__inner {
  max-width: 56rem;
  margin: 0 auto;
  text-align: center;
}
.lm-filo-statement__title {
  margin: 0;
  font-family: var(--font-text);
  font-weight: 600;
  /* piso de 1.75rem: a 390px el 6vw puro daba 23px — muy tímido para un statement */
  font-size: clamp(1.75rem, 6vw, 3rem);
  line-height: 1.2;
  color: var(--on-surface);
}
.lm-filo-statement__text {
  margin: 1.5rem auto 0;
  max-width: 40rem;
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--on-surface-variant);
}

/* ==========================================================================
   3. Historia
   ========================================================================== */
.lm-filo-historia {
  padding: 4rem 1rem;
}
.lm-filo-historia__inner {
  max-width: 96rem;
  margin: 0 auto;
  display: grid;
  gap: 2.5rem;
  align-items: center;
}
.lm-filo-historia__title {
  margin: 0.75rem 0 0;
  font-family: var(--font-heading);
  font-size: min(9vw, 3.5rem);
  color: var(--tertiary);
}
.lm-filo-historia__copy {
  margin: 1.25rem 0 0;
  max-width: 36rem;
  font-family: var(--font-text);
  font-size: 1rem;
  line-height: 1.8;
  color: var(--on-surface-variant);
}

@media (min-width: 1024px) {
  .lm-filo-historia__inner {
    grid-template-columns: 0.95fr 1.05fr;
    gap: 5rem;
  }
}

/* ==========================================================================
   4. Banda "el campo colombiano"
   ========================================================================== */
.lm-filo-campo {
  padding: 6rem 1rem;
  background: var(--tertiary);
  color: var(--on-tertiary);
}
.lm-filo-campo__inner {
  max-width: 72rem;
  margin: 0 auto;
}
.lm-filo-campo__title {
  margin: 0.75rem 0 0;
  font-family: var(--font-heading);
  font-size: min(10vw, 5rem);
  text-transform: uppercase;
  line-height: 1;
  color: var(--primary);
}
.lm-filo-campo__text {
  margin: 1.75rem 0 0;
  max-width: 46rem;
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.8;
  color: color-mix(in srgb, var(--on-tertiary) 84%, transparent);
}
.lm-filo-campo__statements {
  margin: 3rem 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid color-mix(in srgb, var(--on-tertiary) 25%, transparent);
}
.lm-filo-campo__statements li {
  padding: 1.375rem 0;
  border-bottom: 1px solid color-mix(in srgb, var(--on-tertiary) 25%, transparent);
  font-family: var(--font-text);
  font-weight: 600;
  font-size: min(4.5vw, 1.75rem);
  line-height: 1.3;
}

/* ==========================================================================
   5. Comunidad (carrusel scroll-snap con flechas, como categorías)
   ========================================================================== */
.lm-filo-comunidad {
  padding: 5rem 1rem;
}
.lm-filo-comunidad__inner {
  max-width: 96rem;
  margin: 0 auto;
}
.lm-filo-comunidad__title {
  margin: 0 0 2rem;
  font-family: var(--font-heading);
  font-size: min(9vw, 3.5rem);
  color: var(--tertiary);
}
.lm-filo-carousel__viewport {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.lm-filo-carousel__viewport::-webkit-scrollbar {
  display: none;
}
/* Encaje exacto: 1 foto por vista en móvil, 2 en tablet y 3 en desktop —
   la última siempre remata alineada con el borde del contenedor (nada de
   fotos partidas a la derecha). */
.lm-filo-carousel__slide {
  flex: 0 0 100%;
  margin: 0;
  aspect-ratio: 4 / 3;
  border-radius: 1.5rem;
  overflow: hidden;
  scroll-snap-align: start;
}
@media (min-width: 640px) {
  .lm-filo-carousel__slide {
    flex-basis: calc((100% - 1rem) / 2);
  }
}
@media (min-width: 1024px) {
  .lm-filo-carousel__slide {
    flex-basis: calc((100% - 2rem) / 3);
  }
}
.lm-filo-carousel__slide img,
.lm-filo-carousel__slide .lm-filo-ph {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.lm-filo-carousel__nav {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
}
.lm-filo-carousel__btn {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 9999px;
  border: 1px solid var(--outline-variant);
  background: var(--surface-container-lowest);
  color: var(--on-surface);
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    opacity 0.2s ease;
}
.lm-filo-carousel__btn:hover:not(:disabled) {
  background: var(--tertiary);
  color: var(--on-tertiary);
}
.lm-filo-carousel__btn:disabled {
  opacity: 0.35;
  cursor: default;
}

/* ==========================================================================
   6. ESPACIOS — carrusel cinematográfico estilo Apple TV
   (tarjetas panorámicas a sangre, slide activo centrado con los vecinos
   asomando, pill blanca "Reservar" y paginación de puntos)
   ========================================================================== */
.lm-filo-espacios {
  padding: 6rem 0;
  background: var(--surface-container-low);
  overflow: hidden;
}
.lm-filo-espacios__header {
  max-width: 72rem;
  margin: 0 auto 2.5rem;
  padding: 0 1rem;
}
.lm-filo-espacios__title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: min(14vw, 6rem);
  text-transform: uppercase;
  line-height: 1;
  color: var(--tertiary);
}
.lm-filo-espacios__subtitle {
  margin: 1rem 0 0;
  max-width: 34rem;
  font-family: var(--font-text);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--on-surface-variant);
}

.lm-filo-showcase__viewport {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  /* margen fantasma a los lados para que el primero y el último
     también puedan viajar al centro */
  padding: 0 max(1rem, calc((100% - min(88vw, 68rem)) / 2));
}
.lm-filo-showcase__viewport::-webkit-scrollbar {
  display: none;
}
.lm-filo-showcase__card {
  position: relative;
  flex: 0 0 min(88vw, 68rem);
  /* móvil: 4/3 — con 16/9 la tarjeta quedaba en 193px de alto y el overlay
     (nombre + pill) se comía casi toda la foto */
  aspect-ratio: 4 / 3;
  border-radius: 1.75rem;
  overflow: hidden;
  scroll-snap-align: center;
  background: var(--surface-container-high);
}
@media (min-width: 640px) {
  .lm-filo-showcase__card {
    aspect-ratio: 16 / 9;
  }
}
@media (min-width: 900px) {
  .lm-filo-showcase__card {
    aspect-ratio: 21 / 9;
  }
}
.lm-filo-showcase__media {
  position: absolute;
  inset: 0;
}
.lm-filo-showcase__media img,
.lm-filo-showcase__media .lm-filo-ph {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.lm-filo-showcase__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 1rem;
  padding: min(5vw, 2.5rem);
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0) 55%);
}
.lm-filo-showcase__name {
  margin: 0;
  font-family: var(--font-text);
  font-weight: 700;
  font-size: min(6vw, 2.25rem);
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}
.lm-filo-showcase__cta {
  display: inline-flex;
  align-items: center;
  height: 2.75rem;
  padding: 0 1.625rem;
  border-radius: 9999px;
  background: var(--surface-container-lowest);
  color: var(--on-surface);
  font-family: var(--font-text);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease;
}
.lm-filo-showcase__cta:hover {
  transform: scale(1.05);
}

/* Pie del carrusel: puntos centrados + flechas a la derecha */
.lm-filo-showcase__footer {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1.75rem;
  padding: 0 1rem;
  min-height: 3rem;
}
.lm-filo-showcase__dots {
  display: flex;
}
/* El botón es la zona táctil (44px de alto, generosa para el pulgar);
   el punto visible es el ::before */
.lm-filo-showcase__dots button {
  position: relative;
  width: 1.25rem;
  height: 2.75rem;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none; /* Astra le pinta una cajita gris a todo button */
  cursor: pointer;
  transition: width 0.3s ease;
}
.lm-filo-showcase__dots button.is-active {
  width: 2.125rem;
}
.lm-filo-showcase__dots button::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background: color-mix(in srgb, var(--on-surface) 25%, transparent);
  transition:
    background 0.3s ease,
    width 0.3s ease;
}
.lm-filo-showcase__dots button.is-active::before {
  width: 1.375rem;
  background: var(--on-surface);
}
.lm-filo-showcase__nav {
  position: absolute;
  right: 1rem;
  display: none;
  gap: 0.75rem;
}
@media (min-width: 768px) {
  .lm-filo-showcase__nav {
    display: flex;
  }
}

/* ==========================================================================
   7. CTA final
   ========================================================================== */
.lm-filo-cta {
  padding: 6rem 1rem 7rem;
  text-align: center;
}
.lm-filo-cta__title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: min(10vw, 4.5rem);
  color: var(--tertiary);
}
.lm-filo-cta__text {
  margin: 1rem auto 0;
  max-width: 32rem;
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--on-surface-variant);
}
.lm-filo-cta__button {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  margin-top: 2rem;
  height: 3.5rem;
  padding: 0 2.25rem;
  border-radius: 9999px;
  background: var(--tertiary);
  color: var(--on-tertiary);
  font-family: var(--font-text);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}
.lm-filo-cta__button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
}
