/* ══════════════════════════════════════════════════════════
   HERO — titular display + vitrina de capturas reales en 3D
   Las imágenes de assets/img/hero/ son screenshots de los propios
   demos de portfolio/: se regeneran corriendo el sitio en headless,
   no hay stock de terceros involucrado.
   ══════════════════════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: 7.5rem;
  padding-bottom: 4.5rem;
  overflow: hidden;
}

/* Trama de puntos, desvanecida hacia los bordes */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(255, 255, 255, .06) 1px, transparent 1px);
  background-size: 36px 36px;
  -webkit-mask-image: radial-gradient(70% 60% at 25% 45%, #000, transparent 75%);
  mask-image: radial-gradient(70% 60% at 25% 45%, #000, transparent 75%);
}

/* Foco naranjo que respira detrás de la vitrina */
.hero__spot {
  position: absolute;
  top: 42%;
  right: -6%;
  width: 46rem;
  height: 46rem;
  transform: translateY(-50%);
  pointer-events: none;
  background: radial-gradient(circle, rgba(249, 115, 22, .28), rgba(249, 115, 22, .07) 45%, transparent 70%);
  filter: blur(12px);
  animation: spotBreath 9s ease-in-out infinite;
}

@keyframes spotBreath {
  0%, 100% { opacity: .75; transform: translateY(-50%) scale(1); }
  50%      { opacity: 1;   transform: translateY(-50%) scale(1.08); }
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: clamp(2rem, 4vw, 3rem);
  width: 100%;
}

/* ── Fila superior ── */
.hero__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}

.hero__status {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  font-size: var(--label-size);
  font-weight: 500;
  letter-spacing: var(--label-track);
  text-transform: uppercase;
  color: var(--fg-2);
}

.hero__status .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--live);
  animation: livePulse 2.4s ease-out infinite;
}

@keyframes livePulse {
  0%   { box-shadow: 0 0 0 0 rgba(34, 197, 94, .5); }
  70%  { box-shadow: 0 0 0 9px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.hero-typing {
  font-size: .82rem;
  letter-spacing: .04em;
  color: var(--fg-3);
}

.typing-static { color: var(--fg-3); }
.typing-dynamic { color: var(--brand); }

.typing-cursor {
  color: var(--brand);
  animation: caret 1s steps(2) infinite;
}

@keyframes caret {
  0%, 49%   { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* ── Rejilla principal ── */
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
}

/* ── Copy ── */
.hero__title {
  font-family: var(--font-display);
  font-size: var(--display-1);
  font-weight: 800;
  line-height: .95;
  letter-spacing: var(--display-track);
  color: var(--fg);
  margin-bottom: 1.75rem;
}

.hero__title em {
  display: inline-block;
  letter-spacing: 0;
  /* Resplandor tenue para que la palabra de marca "prenda" */
  text-shadow: 0 0 42px rgba(249, 115, 22, .35);
}

.hero__lede {
  font-size: clamp(1.02rem, 1.4vw, 1.18rem);
  color: var(--fg-2);
  max-width: 46ch;
  line-height: 1.6;
}

.hero__lede strong {
  color: var(--fg);
  font-weight: 600;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .85rem;
  margin-top: 2rem;
}

.hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem 2rem;
  margin-top: 2.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.hero__fact {
  display: flex;
  align-items: baseline;
  gap: .45rem;
  font-size: .82rem;
  color: var(--fg-2);
}

.hero__fact b {
  color: var(--fg);
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* ══════════════════════════════════════
   VITRINA — tres capturas apiladas en perspectiva
   ══════════════════════════════════════ */
.hero__showcase {
  position: relative;
  aspect-ratio: 1 / .92;
  perspective: 1600px;
}

.shot {
  position: absolute;
  border-radius: 12px;
  overflow: hidden;
  background: var(--ink-700);
  border: 1px solid rgba(255, 255, 255, .13);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .9), 0 0 0 1px rgba(0, 0, 0, .4);
  transition: transform .7s var(--ease-out), box-shadow .5s var(--ease-out);
  will-change: transform;
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
}

/* Barra de navegador falsa: hace legible que son sitios web */
.shot__bar {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 10px;
  background: rgba(18, 20, 25, .96);
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.shot__bar i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .18);
}

.shot__bar i:first-child { background: var(--brand); }

/* Cascada: atrás arriba-derecha, frente abajo-izquierda */
.shot--back {
  z-index: 1;
  top: 0;
  right: 0;
  width: 74%;
  transform: rotate(3deg);
  opacity: .55;
  filter: saturate(.6);
  animation: shotFloat 11s ease-in-out infinite;
}

.shot--mid {
  z-index: 2;
  top: 20%;
  right: 14%;
  width: 78%;
  transform: rotate(-2deg);
  opacity: .8;
  filter: saturate(.8);
  animation: shotFloat 9s ease-in-out infinite .6s;
}

.shot--front {
  z-index: 3;
  bottom: 8%;
  left: 0;
  width: 88%;
  transform: rotate(-1deg);
  animation: shotFloat 8s ease-in-out infinite 1.2s;
}

@keyframes shotFloat {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -12px; }
}

/* Al pasar el mouse las tres se abren en abanico */
.hero__showcase:hover .shot--back  { transform: rotate(5deg) translate(3%, -5%); opacity: .7; }
.hero__showcase:hover .shot--mid   { transform: rotate(-3.5deg) translate(2%, -2%); opacity: .95; }
.hero__showcase:hover .shot--front { transform: rotate(0deg) translate(-2%, 3%) scale(1.02); }

/* Etiqueta del proyecto en primer plano.
   La insignia "Demo" es deliberada: son proyectos de muestra. */
.shot__tag-badge {
  display: inline-block;
  margin-right: .5rem;
  padding: .12rem .45rem;
  border-radius: var(--radius-full);
  background: var(--brand);
  color: var(--brand-ink);
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.shot__tag {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  display: inline-flex;
  align-items: center;
  padding: .4rem .85rem;
  border-radius: var(--radius-full);
  background: rgba(8, 9, 11, .78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, .14);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--fg);
}

.hero__showcase-link {
  position: absolute;
  right: 0;
  bottom: -2.5rem;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: var(--label-size);
  letter-spacing: var(--label-track);
  text-transform: uppercase;
  color: var(--fg-3);
  transition: color var(--transition);
}

.hero__showcase-link:hover { color: var(--brand); }

.hero__showcase-link i { transition: transform var(--transition); }
.hero__showcase-link:hover i { transform: translateX(4px); }

/* ── Indicador de scroll ── */
.hero__scroll {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-size: var(--label-size);
  letter-spacing: var(--label-track);
  text-transform: uppercase;
  color: var(--fg-3);
  transition: color var(--transition);
}

.hero__scroll:hover { color: var(--brand); }

.hero__scroll i { animation: scrollNudge 2s ease-in-out infinite; }

@keyframes scrollNudge {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(4px); }
}

/* ══════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════ */
@media (max-width: 1024px) {
  .hero {
    min-height: auto;
    padding-top: 7rem;
    padding-bottom: 3.5rem;
  }

  .hero__grid {
    grid-template-columns: 1fr;
    gap: 3.5rem;
  }

  .hero-typing { display: none; }

  .hero__spot {
    top: auto;
    bottom: 0;
    right: -20%;
    width: 34rem;
    height: 34rem;
    transform: none;
  }

  /* En una columna la cascada se aplana: solo dos capturas y menos alto */
  .hero__showcase { aspect-ratio: 1 / .68; }

  .shot--back { display: none; }
  .shot--mid { top: 0; right: 0; width: 72%; }
  .shot--front { bottom: 0; left: 0; width: 86%; }

  .hero__showcase-link { bottom: -2rem; }
}

@media (max-width: 640px) {
  .hero__actions {
    width: 100%;
    margin-top: 1.75rem;
  }

  .hero__actions .btn {
    flex: 1 1 100%;
    max-width: 340px;
  }

  .hero__facts { gap: .5rem 1.5rem; }

  .hero__showcase { aspect-ratio: 1 / .62; }

  .shot--mid { width: 66%; }
  .shot--front { width: 88%; }

  .shot__tag {
    left: .6rem;
    bottom: .6rem;
    font-size: .66rem;
    padding: .3rem .65rem;
  }

  .hero__scroll { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__status .dot,
  .hero__scroll i,
  .hero__spot,
  .typing-cursor,
  .shot { animation: none; }
}
