/* ═══════════════════════════════════════════════════════════
   HERO.CSS
   ═══════════════════════════════════════════════════════════ */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

/* ── Fondo con parallax ─────────────────────────────────── */
.hero-bg {
  position: absolute;
  inset: -8%;
  background-image: url('https://images.unsplash.com/photo-1593113598332-cd288d649433?w=1800&q=80&auto=format');
  background-size: cover;
  background-position: center;
  transform: translateY(var(--parallax-y, 0px));
  transition: transform 0.08s linear;
  will-change: transform;
}

/* Gradiente overlay multicapa */
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      165deg,
      rgba(120, 12, 17, 0.88) 0%,
      rgba(168, 24, 30, 0.78) 35%,
      rgba(26, 26, 26, 0.65) 70%,
      rgba(10, 10, 10, 0.72) 100%
    );
}

/* Patrón de textura sutil */
.hero-texture {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.025'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

/* Orbe animado */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(80px);
  will-change: transform;
}

.hero-orb-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(232,160,32,0.18) 0%, transparent 70%);
  top: -150px;
  right: -100px;
  animation: orbFloat1 14s ease-in-out infinite;
}

.hero-orb-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(214,32,39,0.22) 0%, transparent 70%);
  bottom: 50px;
  left: -80px;
  animation: orbFloat2 18s ease-in-out infinite;
}

@keyframes orbFloat1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(-30px, 40px) scale(1.06); }
  66%       { transform: translate(20px, -20px) scale(0.96); }
}

@keyframes orbFloat2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%       { transform: translate(40px, -30px) scale(1.08); }
}

/* ── Contenido ──────────────────────────────────────────── */
.hero-content {
  position: relative;
  z-index: 2;
  padding-top: 6rem;
  padding-bottom: 8rem;
}

/* Grid hero: texto + tarjeta logo Cáritas */
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 34%);
  gap: clamp(2rem, 4.5vw, 3.75rem);
  align-items: center;
}

.hero-main {
  min-width: 0;
}

.hero-logo-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 0;
  animation: heroLogoEnter 900ms cubic-bezier(0.22, 1, 0.36, 1) 0.28s both;
}

.hero-logo-float {
  animation: heroLogoFloat 5.2s ease-in-out 1s infinite;
  width: 100%;
  max-width: 380px;
  display: flex;
  justify-content: center;
}

.hero-logo-card {
  position: relative;
  width: 100%;
  padding: clamp(1.35rem, 3vw, 2.1rem) clamp(1.5rem, 3vw, 2.25rem);
  border-radius: 1.5rem;
  /* Cristal: se ve el hero detrás, sin bloque blanco plano */
  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.34) 0%,
      rgba(255, 252, 250, 0.2) 42%,
      rgba(255, 255, 255, 0.14) 100%
    );
  border: none;
  box-shadow:
    0 8px 40px rgba(35, 6, 10, 0.28),
    0 2px 0 rgba(255, 255, 255, 0.35) inset,
    0 0 0 1px rgba(232, 160, 32, 0.14) inset;
  backdrop-filter: blur(16px) saturate(1.18);
  -webkit-backdrop-filter: blur(16px) saturate(1.18);
  overflow: hidden;
  transition:
    transform 420ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* Halo suave solo detrás del área del logo: contraste para el azul tipográfico */
.hero-logo-card::before {
  content: '';
  position: absolute;
  inset: 10% 6% 12%;
  border-radius: 0.9rem;
  background: radial-gradient(
    ellipse 95% 85% at 48% 48%,
    rgba(255, 255, 255, 0.46) 0%,
    rgba(255, 255, 255, 0.12) 58%,
    transparent 72%
  );
  opacity: 0.85;
  animation: heroLogoSpotlight 8s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

.hero-logo-card:hover {
  transform: scale(1.025);
  box-shadow:
    0 12px 48px rgba(35, 6, 10, 0.34),
    0 2px 0 rgba(255, 255, 255, 0.42) inset,
    0 0 28px rgba(245, 200, 66, 0.08),
    0 0 0 1px rgba(232, 160, 32, 0.2) inset;
}

@keyframes heroLogoSpotlight {
  0%, 100% { opacity: 0.72; transform: scale(1); }
  50%      { opacity: 0.92; transform: scale(1.02); }
}

.hero-logo-shine {
  position: absolute;
  inset: -20% -40%;
  background: linear-gradient(
    105deg,
    transparent 0%,
    transparent 42%,
    rgba(255, 255, 255, 0.42) 50%,
    transparent 58%,
    transparent 100%
  );
  transform: translateX(-100%) skewX(-12deg);
  animation: heroLogoShine 8.5s ease-in-out infinite;
  pointer-events: none;
  mix-blend-mode: overlay;
  z-index: 1;
}

.hero-logo-img {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  max-width: 320px;
  height: auto;
  max-height: 132px;
  margin-inline: auto;
  object-fit: contain;
  object-position: center;
}

@keyframes heroLogoEnter {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes heroLogoFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-7px); }
}

@keyframes heroLogoShine {
  0%, 72% {
    transform: translateX(-100%) skewX(-12deg);
    opacity: 0;
  }
  76% { opacity: 1; }
  84% {
    transform: translateX(100%) skewX(-12deg);
    opacity: 0;
  }
  100% {
    transform: translateX(100%) skewX(-12deg);
    opacity: 0;
  }
}

@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .hero-logo-wrap {
    order: 2;
    justify-content: center;
    max-width: 420px;
    margin-inline: auto;
    padding-top: 0.25rem;
  }

  .hero-main {
    order: 1;
  }

  .hero-logo-float {
    max-width: 340px;
    animation-duration: 5.5s;
  }

  .hero-logo-img {
    max-width: 280px;
    max-height: 118px;
  }
}

@media (max-width: 768px) {
  .hero-logo-float {
    max-width: 300px;
  }

  .hero-logo-card {
    padding: 1.25rem 1.4rem;
    border-radius: 1.35rem;
  }

  .hero-logo-img {
    max-width: 240px;
    max-height: 100px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-logo-wrap,
  .hero-logo-float,
  .hero-logo-shine,
  .hero-logo-card::before {
    animation: none !important;
  }

  .hero-logo-wrap {
    opacity: 1;
    transform: none;
  }

  .hero-logo-card::before {
    opacity: 0.8;
    transform: none;
  }

  .hero-logo-card:hover {
    transform: none;
  }
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.22);
  backdrop-filter: blur(10px);
  color: rgba(255,255,255,0.9);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.45rem 1rem;
  border-radius: 100px;
  margin-bottom: 1.6rem;
  animation: fadeSlideUp 0.8s var(--ease) 0.1s both;
}

.hero-eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--oro);
  animation: pulse 2.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; box-shadow: 0 0 0 0 rgba(232,160,32,0.5); }
  50%       { transform: scale(1.2); opacity: 0.8; box-shadow: 0 0 0 6px rgba(232,160,32,0); }
}

.hero-heading {
  font-family: var(--font-display);
  font-size: clamp(5.5rem, 13vw, 10.5rem);
  line-height: 0.92;
  letter-spacing: 0.02em;
  color: var(--blanco);
  text-shadow: 0 4px 30px rgba(0,0,0,0.25);
  animation: fadeSlideUp 0.85s var(--ease) 0.25s both;
  max-width: min(780px, 100%);
}

.hero-heading .line-accent {
  display: block;
  color: var(--oro-brillante);
  -webkit-text-stroke: 0;
  position: relative;
}

.hero-heading .line-stroke {
  display: block;
  color: transparent;
  -webkit-text-stroke: 2px rgba(255,255,255,0.5);
}

.hero-body {
  max-width: 500px;
  color: rgba(255,255,255,0.82);
  font-size: clamp(0.95rem, 1.8vw, 1.1rem);
  line-height: 1.75;
  margin-top: 1.4rem;
  font-weight: 400;
  animation: fadeSlideUp 0.85s var(--ease) 0.42s both;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2.5rem;
  animation: fadeSlideUp 0.85s var(--ease) 0.58s both;
}

/* ── Stat ticker en el hero ─────────────────────────────── */
.hero-stats {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 3;
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid rgba(255,255,255,0.12);
}

.hero-stats-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.hero-stat {
  padding: 1.4rem 1rem;
  text-align: center;
  color: white;
  border-right: 1px solid rgba(255,255,255,0.1);
  transition: background var(--trans);
}

.hero-stat:last-child { border-right: none; }

.hero-stat:hover { background: rgba(255,255,255,0.06); }

.hero-stat-num {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  color: var(--oro-brillante);
  line-height: 1;
  letter-spacing: 0.02em;
}

.hero-stat-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  margin-top: 0.3rem;
  line-height: 1.25;
  max-width: 12rem;
  margin-left: auto;
  margin-right: auto;
}

/* ── Scroll indicator ───────────────────────────────────── */
.hero-scroll-cue {
  position: absolute;
  bottom: 100px;
  right: 3rem;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  animation: fadeSlideUp 1s var(--ease) 1s both;
}

.hero-scroll-cue span {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  writing-mode: vertical-rl;
}

.hero-scroll-line {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.4), transparent);
  animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
  0%   { transform: scaleY(0); transform-origin: top; }
  50%  { transform: scaleY(1); transform-origin: top; }
  51%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ── Animación entrada ──────────────────────────────────── */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: none; }
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 992px) {
  .hero-stats-inner { grid-template-columns: repeat(2, 1fr); }
  .hero-stat:nth-child(2) { border-right: none; }
  .hero-stat:nth-child(n+3) { border-top: 1px solid rgba(255,255,255,0.1); }
}

@media (max-width: 768px) {
  .hero-scroll-cue { display: none; }
  .hero-heading { font-size: clamp(4rem, 18vw, 7rem); }
}

@media (max-width: 480px) {
  .hero-stat-label { font-size: 0.62rem; letter-spacing: 0.06em; max-width: none; }
}
