/* ============================================================
   CONSTRUFACH — HERO SECTION
   ============================================================ */

/* ── Sección principal ─────────────────────────────────────── */
.hero-bg {
  min-height: 100vh;
  background-color: var(--navy);
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
}

/* Textura diagonal sutil sobre el fondo */
.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      -55deg,
      transparent,
      transparent 40px,
      rgba(255,255,255,0.018) 40px,
      rgba(255,255,255,0.018) 41px
    );
  pointer-events: none;
}

/* Acento rojo: barra vertical izquierda */
.hero-bg::after {
  content: '';
  position: absolute;
  left: 0;
  top: 10%;
  bottom: 10%;
  width: 4px;
  background: var(--red);
  border-radius: 0 2px 2px 0;
}

/* ── Contenedor ────────────────────────────────────────────── */
.hero-container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 6rem 3rem 4rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

/* ── Columna texto ─────────────────────────────────────────── */
.hero-text {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.hero-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(2.4rem, 4.5vw, 4rem);
  font-weight: 700;
  line-height: 1.08;
  color: var(--white);
  letter-spacing: -0.01em;
  text-transform: uppercase;

  /* Línea roja decorativa antes del título */
  padding-left: 1.25rem;
  border-left: 4px solid var(--red);
}

.hero-info {
  font-family: 'Barlow', sans-serif;
  font-size: 1.05rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.6;
  padding-left: 1.25rem;
}

/* ── Lista de servicios ────────────────────────────────────── */
.hero-services {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding-left: 1.25rem;
}

.hero-services li {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy);
  background: var(--white);
  padding: 0.3rem 0.85rem;
  border: 1px solid rgba(255,255,255,0.15);
  position: relative;
  clip-path: polygon(6px 0%, 100% 0%, calc(100% - 6px) 100%, 0% 100%);
  transition: background 0.25s ease, color 0.25s ease;
}

.hero-services li:hover {
  background: var(--red);
  color: var(--white);
}

/* ── Botones de acción ─────────────────────────────────────── */
.hero-links {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-left: 1.25rem;
  flex-wrap: wrap;
}

.hero-link {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.5rem;
  position: relative;
  overflow: hidden;
  transition: color 0.3s ease;
}

/* Primer link — relleno rojo */
.hero-link:first-child {
  background: var(--red);
  color: var(--white);
  border: 2px solid var(--red);
}

.hero-link:first-child::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--white);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease-out-expo);
}

.hero-link:first-child:hover {
  color: var(--red);
}

.hero-link:first-child:hover::before {
  transform: scaleX(1);
}

.hero-link:first-child .material-symbols-outlined,
.hero-link:first-child span {
  position: relative;
}

/* Segundo link — contorno blanco */
.hero-link:last-child {
  color: rgba(255, 255, 255, 0.8);
  border: 2px solid rgba(255, 255, 255, 0.3);
  background: transparent;
}

.hero-link:last-child::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.08);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease-out-expo);
}

.hero-link:last-child:hover {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.6);
}

.hero-link:last-child:hover::before {
  transform: scaleX(1);
}

.hero-link .material-symbols-outlined {
  font-size: 1rem;
  transition: transform 0.25s ease;
}

.hero-link:hover .material-symbols-outlined {
  transform: translate(3px, -3px);
}

/* ── Columna imagen ────────────────────────────────────────── */
.hero-img {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.hero-img img {
  width: 100%;
  max-width: 520px;
  height: auto;
  display: block;
  object-fit: contain;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,0.4));
}

/* ── Números / stats ───────────────────────────────────────── */
.hero-numbers {
  display: flex;
  gap: 0;
  width: 100%;
  max-width: 520px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(6px);
}

.hero-number {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.25rem 0.75rem;
  position: relative;
  transition: background 0.3s ease;
}

.hero-number:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 20%;
  bottom: 20%;
  width: 1px;
  background: rgba(255,255,255,0.12);
}

.hero-number:hover {
  background: rgba(218, 33, 65, 0.08);
}

.hero-number h2 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1;
  letter-spacing: -0.02em;
}

.hero-number span {
  font-family: 'Barlow', sans-serif;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  margin-top: 0.35rem;
  line-height: 1.4;
}

/* ── Accesibilidad ─────────────────────────────────────────── */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================
   ANIMACIONES ON SCROLL
   ============================================================ */

/* Estado inicial — invisible */
.animate-on-scroll {
  opacity: 0;
  will-change: transform, opacity;
}

.animate-on-scroll.zoom-in {
  transform: translateY(24px) scale(0.97);
  transition:
    opacity 0.65s var(--ease-out-expo),
    transform 0.65s var(--ease-out-expo);
}

.animate-on-scroll.fade-right {
  transform: translateX(40px);
  transition:
    opacity 0.7s var(--ease-out-expo),
    transform 0.7s var(--ease-out-expo);
}

/* Estado visible — activado por JS */
.animate-on-scroll.visible {
  opacity: 1;
  transform: none;
}

/* ── Stagger para hijos directos de .hero-text ─────────────── */
.hero-text .animate-on-scroll:nth-child(1) { transition-delay: 0.05s; }
.hero-text .animate-on-scroll:nth-child(2) { transition-delay: 0.15s; }
.hero-text .animate-on-scroll:nth-child(3) { transition-delay: 0.25s; }
.hero-text .animate-on-scroll:nth-child(4) { transition-delay: 0.35s; }

.hero-numbers .animate-on-scroll:nth-child(1) { transition-delay: 0.1s; }
.hero-numbers .animate-on-scroll:nth-child(2) { transition-delay: 0.2s; }
.hero-numbers .animate-on-scroll:nth-child(3) { transition-delay: 0.3s; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .hero-container {
    grid-template-columns: 1fr;
    padding: 5rem 1.5rem 3rem;
    gap: 3rem;
  }

  .hero-img {
    order: -1;
    align-items: center;
  }

  .hero-img img {
    max-width: 340px;
  }

  .hero-numbers {
    max-width: 100%;
  }

  .hero-title {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .hero-bg::after {
    display: none;
  }
}

@media (max-width: 480px) {
  .hero-links {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-link {
    width: 100%;
    justify-content: center;
  }
}