/* ==========================================================================
   01 · Hero
   ========================================================================== */

.hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: calc(100vh - 7.5rem);
  background-color: var(--color-bg-light);
}

/* Fotografía de fondo con velo oscuro (negro cálido) hacia la izquierda.
   El velo tiene muchos pasos intermedios para que se desvanezca de forma
   progresiva, sin una línea marcada, y es más oscuro detrás del texto
   (contraste del texto de 6:1 o más, medido sobre la foto).
   La foto va en --hero-photo; el layout la pide primero con un preload, con
   las mismas direcciones (si cambia acá, cambiar también en layout.php) */
.hero-bg {
  --hero-photo: url('../../assets/images/hero-juntos-2.webp?v=3');
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image:
    linear-gradient(90deg,
      rgba(var(--rgb-ink), 0.95) 0%,
      rgba(var(--rgb-ink), 0.92) 26%,
      rgba(var(--rgb-ink), 0.86) 34%,
      rgba(var(--rgb-ink), 0.76) 40%,
      rgba(var(--rgb-ink), 0.62) 46%,
      rgba(var(--rgb-ink), 0.46) 52%,
      rgba(var(--rgb-ink), 0.3) 58%,
      rgba(var(--rgb-ink), 0.17) 64%,
      rgba(var(--rgb-ink), 0.08) 70%,
      rgba(var(--rgb-ink), 0.03) 76%,
      transparent 84%),
    var(--hero-photo);
  background-size: cover;
  background-position: right center;
  background-repeat: no-repeat;
  pointer-events: none;
}

.hero-body {
  position: relative;
  z-index: 2;
  display: flex;
  flex: 1;
  align-items: center;
  padding-top: var(--space-64);
  padding-bottom: var(--space-48);
}

.hero-content {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 36.25rem;
}

/* El H1 reúne el pretítulo y el titular: el contenedor no impone tipografía,
   cada parte tiene la suya */
.hero-heading {
  font: inherit;
  letter-spacing: normal;
  color: inherit;
}

/* Pretítulo: fluye como texto, con los íconos en la misma línea */
.hero-eyebrow {
  display: block;
  margin-bottom: var(--space-24);
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.7;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(var(--rgb-white), 0.95);
}

.hero-eyebrow svg {
  display: inline-block;   /* el reset deja los svg en bloque: acá van en la línea del texto */
  width: 1.125rem;
  height: 1.125rem;
  margin-right: 0.5rem;
  vertical-align: -0.22em;
  stroke: var(--color-primary);
}

.hero-eyebrow-sep {
  margin: 0 0.625rem;
  color: var(--color-primary);
}

.hero-title {
  display: block;
  margin-bottom: var(--space-24);
  color: var(--color-white);
}

/* Palabra con subrayado manuscrito */
.text-highlight {
  position: relative;
  display: inline-block;
  white-space: nowrap;
  color: var(--color-primary);
}

.text-highlight::after {
  content: '';
  position: absolute;
  bottom: -0.25rem;
  left: 0;
  width: 100%;
  height: 0.75rem;
  background-color: var(--color-highlight-stroke);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 12' preserveAspectRatio='none'%3E%3Cpath d='M2,10 Q50,-2 98,10' stroke='black' stroke-width='3' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat 0 0 / 100% 100%;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 12' preserveAspectRatio='none'%3E%3Cpath d='M2,10 Q50,-2 98,10' stroke='black' stroke-width='3' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat 0 0 / 100% 100%;
  pointer-events: none;
}

.hero-description {
  max-width: 31.25rem;
  margin-bottom: var(--space-32);
  color: rgba(var(--rgb-white), 0.85);
}

/* Palabras clave de la bajada: apenas más peso y blanco pleno (sin color) */
.hero-description strong {
  font-weight: 600;
  color: var(--color-white);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-16);
}

.hero-actions .btn-secondary {
  border-color: var(--color-white);
}

.hero-actions .btn-secondary:hover {
  background-color: var(--color-bg-alt);
  border-color: var(--color-bg-alt);
  color: var(--color-primary);
}

/* Prueba social: avatares superpuestos + dato de trayectoria */
.hero-proof {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 2.25rem;
}

/* Los círculos nunca se achican: si falta lugar, el texto pasa a otra línea */
.hero-proof-avatars {
  display: flex;
  flex-shrink: 0;
}

.hero-proof-avatars > * {
  flex-shrink: 0;
}

.hero-proof-avatars img,
.hero-proof-flower {
  width: 2.75rem;
  height: 2.75rem;
  border: 2px solid rgba(var(--rgb-white), 0.9);
  border-radius: 50%;
  object-fit: cover;
}

.hero-proof-avatars > * + * {
  margin-left: -0.75rem;
}

/* La flor siempre queda adelante: los avatares pasan por detrás */
.hero-proof-avatars img {
  position: relative;
  z-index: 1;
}

.hero-proof-flower {
  position: relative;
  z-index: 2;
}

/* Último círculo: la flor de la marca */
.hero-proof-flower {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-primary);
}

.hero-proof-flower::before {
  content: '';
  width: 1.375rem;
  height: 1.375rem;
  background-color: var(--color-white);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='24' r='22'/%3E%3Ccircle cx='74.7' cy='42' r='22'/%3E%3Ccircle cx='65.3' cy='71' r='22'/%3E%3Ccircle cx='34.7' cy='71' r='22'/%3E%3Ccircle cx='25.3' cy='42' r='22'/%3E%3Ccircle cx='50' cy='50' r='24'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='24' r='22'/%3E%3Ccircle cx='74.7' cy='42' r='22'/%3E%3Ccircle cx='65.3' cy='71' r='22'/%3E%3Ccircle cx='34.7' cy='71' r='22'/%3E%3Ccircle cx='25.3' cy='42' r='22'/%3E%3Ccircle cx='50' cy='50' r='24'/%3E%3C/svg%3E") no-repeat center / contain;
}

.hero-proof-text {
  font-size: 0.9375rem;
  line-height: 1.4;
  color: rgba(var(--rgb-white), 0.8);
}

.hero-proof-text strong {
  display: block;
  font-size: 1rem;
  color: var(--color-white);
}

/* --- Trust bar ---
   Translúcida sobre la foto, con un velo oscuro degradado detrás para que el
   texto blanco se lea sobre cualquier zona de la imagen */
.trust-bar {
  position: relative;
  z-index: 5;
  padding: 1.5rem 0;
  background: linear-gradient(to top, rgba(var(--rgb-ink), 0.82), rgba(var(--rgb-ink), 0.55));
  backdrop-filter: blur(0.75rem);
  -webkit-backdrop-filter: blur(0.75rem);
  border-top: 1px solid rgba(var(--rgb-white), 0.12);
}

.trust-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 2.5rem;
  max-width: 60rem;
  margin: 0 auto;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.trust-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 3rem;
  height: 3rem;
  border-radius: 0.875rem;
  border: 1px solid rgba(var(--rgb-white), 0.14);
}

.trust-icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

.trust-icon--red {
  background-color: rgba(var(--rgb-joy-red), 0.28);
  color: var(--color-joy-red-light);
}

.trust-icon--blue {
  background-color: rgba(var(--rgb-joy-blue), 0.28);
  color: var(--color-joy-blue-light);
}

.trust-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.25;
}

.trust-text strong {
  font-size: 1.0625rem;
  font-weight: 800;
  white-space: nowrap;
  color: var(--color-white);
}

.trust-text span {
  font-size: 0.875rem;
  color: rgba(var(--rgb-white), 0.82);
}

/* Ítem como enlace: la flecha avanza y el texto se subraya al pasar el mouse */
.trust-link {
  justify-content: center;
  padding: 0.5rem 1rem;
  border-radius: 1rem;
  transition: background-color var(--transition-fast);
}

.trust-link:hover {
  background-color: rgba(var(--rgb-white), 0.08);
}

.trust-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin-left: 0.5rem;
  border-radius: 50%;
  background-color: rgba(var(--rgb-white), 0.12);
  color: var(--color-white);
  transition: transform var(--transition-fast), background-color var(--transition-fast);
}

.trust-link:hover .trust-arrow {
  transform: translateX(3px);
  background-color: var(--color-primary);
}

.trust-divider {
  width: 1px;
  height: 2.25rem;
  background-color: rgba(var(--rgb-white), 0.2);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .hero-bg {
    background-image:
      linear-gradient(90deg,
        rgba(var(--rgb-ink), 0.96) 0%,
        rgba(var(--rgb-ink), 0.93) 30%,
        rgba(var(--rgb-ink), 0.88) 38%,
        rgba(var(--rgb-ink), 0.8) 44%,
        rgba(var(--rgb-ink), 0.68) 50%,
        rgba(var(--rgb-ink), 0.52) 56%,
        rgba(var(--rgb-ink), 0.36) 62%,
        rgba(var(--rgb-ink), 0.22) 68%,
        rgba(var(--rgb-ink), 0.11) 75%,
        rgba(var(--rgb-ink), 0.04) 82%,
        transparent 90%),
      var(--hero-photo);
    background-position: 85% center;
  }

  .hero-content {
    max-width: 30rem;
  }
}

/* Mobile: la foto queda arriba (con las caras a la vista) y el texto abajo,
   sobre un degradé que oscurece desde la mitad. El bloque de texto entra
   completo en la primera pantalla; la trust bar queda justo debajo. */
@media (max-width: 768px) {
  .hero-section {
    min-height: auto;
  }

  /* La foto ocupa la parte de arriba (la cara queda sobre el pretítulo) y
     sigue, bajo un velo, detrás del titular y la bajada; se funde en el fondo
     oscuro antes de los botones */
  .hero-bg {
    background-color: rgb(var(--rgb-ink));
    background-image:
      linear-gradient(180deg,
        transparent 0%,
        rgba(var(--rgb-ink), 0.06) 8%,
        rgba(var(--rgb-ink), 0.2) 14%,
        rgba(var(--rgb-ink), 0.42) 20%,
        rgba(var(--rgb-ink), 0.62) 25%,
        rgba(var(--rgb-ink), 0.72) 30%,
        rgba(var(--rgb-ink), 0.76) 40%,
        rgba(var(--rgb-ink), 0.8) 50%,
        rgba(var(--rgb-ink), 0.84) 56%,
        rgba(var(--rgb-ink), 0.94) 61%,
        rgb(var(--rgb-ink)) 64%),
      var(--hero-photo);
    background-position: 0 0, 60% top;
    background-size: 100% 100%, auto 64%;
  }

  .hero-body {
    align-items: flex-end;
    min-height: calc(100svh - var(--header-height));
    padding-top: 24svh;
    padding-bottom: 2.5rem;
  }

  /* Alineado a la izquierda, como en escritorio y el resto de las secciones:
     la bajada tiene cinco o seis renglones y se lee mejor con un borde parejo */
  .hero-content {
    align-items: flex-start;
    max-width: 100%;
    text-align: left;
  }

  /* Velo suave que acompaña al texto: según el alto del celular el texto queda
     más arriba o más abajo sobre la foto, así que un poco de oscuro sale del
     propio bloque. Es liviano para que la foto se siga viendo, y se desvanece
     en los dos extremos (sin bordes) */
  .hero-content::before {
    content: '';
    position: absolute;
    top: -7rem;
    left: 50%;
    z-index: -1;
    width: 100vw;
    height: 26rem;
    background: linear-gradient(180deg,
      transparent 0%,
      rgba(var(--rgb-ink), 0.12) 15%,
      rgba(var(--rgb-ink), 0.36) 27%,
      rgba(var(--rgb-ink), 0.34) 75%,
      transparent 100%);
    transform: translateX(-50%);
    pointer-events: none;
  }

  /* Sobre la foto: una sombra difusa separa el texto del fondo y el rojo
     más claro del subrayado mantiene "solo." visible */
  .hero-eyebrow,
  .hero-title {
    text-shadow: 0 1px 14px rgba(var(--rgb-ink), 0.55);
  }

  /* "solo." alineado a la izquierda cae sobre una zona de la foto con algún
     reflejo claro: además de la sombra difusa lleva un halo oscuro pegado a
     las letras (≥3:1 medido sobre la foto en 360, 390 y 430 px) */
  .text-highlight {
    color: var(--color-highlight-stroke);
    text-shadow: 0 1px 14px rgba(var(--rgb-ink), 0.55), 0 0 0.35em rgba(var(--rgb-ink), 0.7);
  }

  .hero-eyebrow {
    margin-bottom: 1.25rem;
  }

  /* Siempre en dos líneas: "El futuro / no se camina solo.". La segunda mide
     8,33 veces el tamaño de letra; en celulares angostos (menos de 390 px) la
     letra se achica justo lo necesario para que entre en el ancho disponible
     (el margen del contenedor es max(1.5rem, 5vw)) */
  .hero-title {
    margin-bottom: 1.25rem;
    font-size: min(var(--font-h1-size), calc((100vw - 2 * max(1.5rem, 5vw)) / 8.6));
  }

  .hero-description {
    margin-bottom: 1.75rem;
    font-size: 1.0625rem;
  }

  .hero-actions {
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero-proof {
    margin-top: 1.75rem;
    text-align: left;
  }

  /* Trust bar: dos fichas lado a lado (ícono arriba, texto abajo) */
  .trust-bar {
    padding: 1rem 0 1.25rem;
  }

  .trust-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }

  .trust-divider,
  .trust-arrow {
    display: none;
  }

  .trust-link {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0.75rem;
    min-height: 100%;
    padding: 1rem;
    border: 1px solid rgba(var(--rgb-white), 0.12);
    border-radius: 1.25rem;
    background-color: rgba(var(--rgb-white), 0.06);
  }

  .trust-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
  }

  .trust-icon svg {
    width: 1.25rem;
    height: 1.25rem;
  }

  .trust-text strong {
    font-size: 0.9375rem;
    white-space: normal;
  }

  .trust-text span {
    font-size: 0.8125rem;
  }
}

@media (max-width: 576px) {
  /* En el celular se ve sólo una franja de la foto: va recortada (1240 px, con
     la misma nitidez y 30 % menos de peso). El recorte deja el 60 % de lo
     sobrante a la izquierda, así el ancla "60% top" cae en el mismo punto y se
     ve exactamente igual que con la foto entera */
  .hero-bg {
    --hero-photo: url('../../assets/images/hero-juntos-2-cel.webp?v=1');
  }

  /* Pretítulo en una sola línea y más chico (acompaña al titular, no compite
     con él). Sin el birrete y con el pin de ubicación como separador entra
     desde 360 px; en pantallas más angostas "Burzaco" baja entero a la línea
     siguiente, empezando por el pin */
  .hero-eyebrow {
    font-size: 0.75rem;
    letter-spacing: 0.04em;
  }

  .hero-eyebrow-item {
    white-space: nowrap;
  }

  .hero-eyebrow svg {
    width: 1.2em;
    height: 1.2em;
    margin-right: 0.3em;
  }

  .hero-eyebrow-item:first-child svg,
  .hero-eyebrow-sep {
    display: none;
  }

  .hero-eyebrow-sep + .hero-eyebrow-item svg {
    margin-left: 0.4em;
  }
}
