/* ═══════════════════════════════════════════════════════════════
   CA CONTAINERS UY — hero.css
   Requiere: header.css (variables :root compartidas)
═══════════════════════════════════════════════════════════════ */

/* ── Utilidad accesible ─────────────────────────────────────── */
.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;
}

/* ═══════════════════════════════════════════════════════════════
   SECCIÓN RAÍZ
═══════════════════════════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 100svh;          /* usa svh para evitar el salto en móvil */
  min-height: 100vh;           /* fallback */
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}

/* ═══════════════════════════════════════════════════════════════
   FONDO — imagen + overlay + grain
═══════════════════════════════════════════════════════════════ */
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;

  /* Fallback industrial si no hay imagen */
  background-color: #0d1a14;
  background-image: url("/public/images/hero/hero-bg.png");
    /* linear-gradient(135deg, #0d1a14 0%, #1a3326 50%, #0d1a14 100%); */

  background-size: cover;
  background-position: center 35%;
  background-repeat: no-repeat;

  /* Ken Burns suave */
  animation: hero-zoom 22s ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes hero-zoom {
  from { transform: scale(1);    }
  to   { transform: scale(1.06); }
}

/* Overlay: oscurece la foto para legibilidad del texto */
.hero__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      105deg,
      rgba(8, 22, 16, 0.82) 0%,
      rgba(8, 22, 16, 0.60) 55%,
      rgba(8, 22, 16, 0.35) 100%
    );
}

/* Grain sutil — da sensación de material, industrial */
.hero__noise {
  position: absolute;
  inset: 0;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  pointer-events: none;
}

/* Línea de acento verde izquierda (detalle visual, desktop) */
.hero::before {
  content: '';
  position: absolute;
  left: 0;
  top: 15%;
  bottom: 15%;
  width: 3px;
  background: var(--clr-brand);
  border-radius: 0 2px 2px 0;
  z-index: 2;
  opacity: 0.7;
}

/* ═══════════════════════════════════════════════════════════════
   LAYOUT INTERIOR
═══════════════════════════════════════════════════════════════ */
.hero__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 100px 24px 80px;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 48px;
  align-items: center;
}

/* ═══════════════════════════════════════════════════════════════
   COLUMNA IZQUIERDA
═══════════════════════════════════════════════════════════════ */
.hero__content {
  display: flex;
  flex-direction: column;
  gap: 24px;
  animation: hero-fade-up 0.75s cubic-bezier(.22,1,.36,1) both;
}

@keyframes hero-fade-up {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0);    }
}

/* ── Pills / tags ───────────────────────────────────────────── */
.hero__tags {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero__tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(29, 137, 111, 1);
  background: rgba(29, 137, 111, 0.14);
  border: 1px solid rgba(29, 137, 111, 0.35);
  padding: 5px 11px;
  border-radius: var(--radius-pill);
}

/* ── H1 ─────────────────────────────────────────────────────── */
.hero__title {
  font-family: var(--font-display);
  font-size: clamp(38px, 5.5vw, 68px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: #ffffff;
  margin: 0;
  text-wrap: balance;
}

.hero__title-accent {
  font-style: italic;
  color: var(--clr-brand);
  /* no usar subrayado, solo color + cursiva = suficiente */
}

/* ── Lead ───────────────────────────────────────────────────── */
.hero__lead {
  font-family: var(--font-body);
  font-size: clamp(16px, 1.8vw, 18px);
  font-weight: 400;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.78);
  margin: 0;
  max-width: 520px;
}

/* ── CTAs ───────────────────────────────────────────────────── */
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 4px;
}

/* Primario — WhatsApp */
.hero__cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
  background: #25d366;
  text-decoration: none;
  padding: 13px 26px;
  border-radius: var(--radius-pill);
  border: 2px solid #25d366;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition:
    background var(--transition-fast),
    border-color var(--transition-fast),
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
}

.hero__cta-primary:hover {
  background: #1db954;
  border-color: #1db954;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.40);
}
.hero__cta-primary:active { transform: translateY(0); box-shadow: none; }

/* Secundario — Ver proyectos */
.hero__cta-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  color: rgba(255,255,255,0.88);
  text-decoration: none;
  padding: 13px 22px;
  border-radius: var(--radius-pill);
  border: 2px solid rgba(255,255,255,0.30);
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition:
    color var(--transition-fast),
    border-color var(--transition-fast),
    background var(--transition-fast),
    transform var(--transition-fast);
}

.hero__cta-secondary:hover {
  color: #ffffff;
  border-color: rgba(255,255,255,0.70);
  background: rgba(255,255,255,0.07);
  transform: translateY(-2px);
}
.hero__cta-secondary:active { transform: translateY(0); }

/* ── Stats ──────────────────────────────────────────────────── */
.hero__stats {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 8px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.10);
}

.hero__stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 24px 0 0;
}

.hero__stat:first-child { padding-left: 0; }

.hero__stat-num {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  line-height: 1;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.hero__stat-sup {
  font-size: 20px;
  vertical-align: super;
  color: var(--clr-brand);
}

.hero__stat-label {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,0.52);
  line-height: 1.35;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.hero__stat-sep {
  width: 1px;
  height: 36px;
  background: rgba(255,255,255,0.15);
  margin: 0 24px 0 0;
  flex-shrink: 0;
  align-self: center;
}

/* ═══════════════════════════════════════════════════════════════
   COLUMNA DERECHA — aside
═══════════════════════════════════════════════════════════════ */
.hero__aside {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: hero-fade-up 0.75s 0.2s cubic-bezier(.22,1,.36,1) both;
}

/* ── Tarjeta testimonio (glassmorphism) ─────────────────────── */
.hero__review {
  margin: 0;
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  overflow: hidden;
}

/* Acento de borde superior verde */
.hero__review::before {
  content: '';
  position: absolute;
  top: 0; left: 24px; right: 24px;
  height: 2px;
  background: linear-gradient(
    90deg,
    var(--clr-brand) 0%,
    transparent 100%
  );
  border-radius: 2px;
}

.hero__review-stars {
  display: flex;
  gap: 3px;
}

.hero__review-quote {
  margin: 0;
}
.hero__review-quote p {
  font-family: var(--font-body);
  font-size: 15px;
  font-style: italic;
  line-height: 1.6;
  color: rgba(255,255,255,0.90);
  margin: 0;
}

.hero__review-person {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Avatar circular */
.hero__review-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--clr-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: white;
  border: 2px solid rgba(255,255,255,0.20);
  /* Fallback con initial via data-fallback */
}

.hero__review-avatar[data-fallback]::after {
  content: attr(data-fallback);
}
.hero__review-avatar[data-fallback] img { display: none; }

.hero__review-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero__review-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hero__review-name {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
}

.hero__review-loc {
  display: flex;
  align-items: center;
  gap: 3px;
  font-family: var(--font-body);
  font-size: 12px;
  color: rgba(255,255,255,0.50);
}

/* Pill "verificado" */
.hero__review-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  color: var(--clr-brand);
  background: rgba(29, 137, 111, 0.15);
  border: 1px solid rgba(29, 137, 111, 0.30);
  border-radius: var(--radius-pill);
  padding: 4px 10px;
  width: fit-content;
}

/* ── Badge flotante "30 días" ───────────────────────────────── */
.hero__badge-float {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,0.07);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 12px;
  padding: 14px 18px;

  /* Pulso sutil de entrada */
  animation: badge-pop 0.5s 0.55s cubic-bezier(.34,1.56,.64,1) both;
}

@keyframes badge-pop {
  from { opacity: 0; transform: scale(0.88); }
  to   { opacity: 1; transform: scale(1);    }
}

.hero__badge-float-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--clr-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  flex-shrink: 0;
}

.hero__badge-float-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.hero__badge-float-text strong {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1;
  letter-spacing: -0.01em;
}

.hero__badge-float-text span {
  font-family: var(--font-body);
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* ═══════════════════════════════════════════════════════════════
   SCROLL INDICATOR
═══════════════════════════════════════════════════════════════ */
.hero__scroll {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  z-index: 3;
  animation: hero-fade-up 1s 0.9s cubic-bezier(.22,1,.36,1) both;
}

.hero__scroll-line {
  width: 1.5px;
  height: 36px;
  background: linear-gradient(
    to bottom,
    rgba(255,255,255,0.55),
    rgba(255,255,255,0)
  );
  border-radius: 2px;
  animation: scroll-line 2s ease-in-out infinite;
}

@keyframes scroll-line {
  0%, 100% { opacity: 0.6; transform: scaleY(1); }
  50%       { opacity: 0.2; transform: scaleY(0.6); }
}

.hero__scroll-label {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.38);
}

/* Focus visible accesible */
.hero__cta-primary:focus-visible,
.hero__cta-secondary:focus-visible {
  outline: 2px solid rgba(255,255,255,0.9);
  outline-offset: 3px;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════════ */

/* ≤ 1100px — aside más compacto */
@media (max-width: 1100px) {
  .hero__grid {
    grid-template-columns: 1fr 300px;
    gap: 32px;
  }
  .hero__stat-num { font-size: 30px; }
}

/* ≤ 860px — una sola columna */
@media (max-width: 860px) {
  .hero__grid {
    grid-template-columns: 1fr;
  }

  .hero__aside {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 14px;
  }

  .hero__review {
    flex: 1;
    min-width: 260px;
  }

  .hero__badge-float {
    flex: 0 0 auto;
    align-self: flex-start;
  }

  .hero::before { display: none; }
}

/* ≤ 600px */
@media (max-width: 600px) {
  .hero__inner { padding: 80px 20px 72px; }

  .hero__aside {
    flex-direction: column;
  }

  .hero__stats {
    gap: 16px 0;
  }

  .hero__stat {
    padding: 0 16px 0 0;
  }

  .hero__stat-sep {
    margin-right: 16px;
  }

  .hero__stat-num { font-size: 28px; }

  .hero__actions { flex-direction: column; align-items: flex-start; }
  .hero__cta-primary,
  .hero__cta-secondary { width: 100%; justify-content: center; }

  .hero__scroll { display: none; }
}

/* ≤ 400px */
@media (max-width: 400px) {
  .hero__title { font-size: 34px; }
  .hero__tag { font-size: 11.5px; }
}

/* Reducir movimiento */
@media (prefers-reduced-motion: reduce) {
  .hero__bg { animation: none; }
  .hero__content,
  .hero__aside,
  .hero__badge-float { animation: none; }
  .hero__scroll-line { animation: none; }
}