/* ==========================================================
   1. Portada
   ========================================================== */
.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: min(max(82vh, 680px), 760px);
  overflow: hidden;
  background: var(--c-night);
  color: var(--c-on-dark);
}

.hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top; /* techo de la casa siempre a la vista */
}

.hero__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(24, 28, 19, 0.92) 0%,
    rgba(24, 28, 19, 0.6) 38%,
    rgba(24, 28, 19, 0) 62%
  );
}

.hero__content {
  position: relative;
  display: grid;
  justify-items: start;
  gap: var(--space-3);
  padding-block: var(--space-8) var(--space-7);
}

.hero__title {
  font-family: var(--f-display);
  font-size: var(--fs-hero);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
}

.hero__subtitle {
  font-family: var(--f-display);
  font-size: var(--fs-lg);
  letter-spacing: 0.04em;
}

.hero__text {
  max-width: 30rem;
  margin-bottom: var(--space-3);
  color: rgba(243, 242, 236, 0.86);
}

/* Escritorio: collage a pantalla completa, sin desenfoque ni
   oscurecido. El texto se apoya solo en una sombra suave. */
@media (min-width: 900px) {
  .hero {
    min-height: 0;
    /* proporción de la imagen (40vw), pero nunca menos de 620px en notebooks */
    height: max(620px, 40vw);
  }

  .hero__img {
    object-position: left center; /* si se recorta, se pierde la derecha, no la casa */
  }

  /* Sombra suave solo abajo para que se lea el texto (sin desenfoque) */
  .hero__shade {
    background: linear-gradient(
      to top,
      rgba(24, 28, 19, 0.6) 0%,
      rgba(24, 28, 19, 0.25) 30%,
      rgba(24, 28, 19, 0) 50%
    );
  }

  /* El texto va pegado al margen izquierdo, en la parte de abajo,
     para que no tape la casa */
  .hero {
    align-items: flex-end;
  }

  .hero__content {
    max-width: none;
    margin: 0;
    padding-block: var(--space-5) clamp(1.5rem, 3vw, 3rem);
    padding-inline: clamp(1.5rem, 3.5vw, 4rem);
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.55), 0 0 28px rgba(0, 0, 0, 0.45);
  }

  .hero__text {
    color: var(--c-on-dark);
  }

  .hero__content .btn {
    text-shadow: none;
  }
}
