/* ==========================================================
   HEIMATwerk – Startseiten-Projekte
   Editorial / filigrane Portfolio-Darstellung
   ========================================================== */

.home-projects-section {
  max-width: 1240px;
  margin: 58px auto 78px;
  padding: 0 24px;
}

.home-projects-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 36px;
  margin-bottom: 30px;
  padding-bottom: 17px;
  border-bottom: 1px solid rgba(255,255,255,0.11);
}

.home-projects-heading > div {
  max-width: 680px;
}

.home-projects-eyebrow {
  display: block;
  margin-bottom: 7px;
  color: #ba7e0a;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.home-projects-heading h2 {
  margin: 0;
  color: #d6d3ce;
  font-size: clamp(1.34rem, 2.15vw, 1.85rem);
  font-weight: 400;
  line-height: 1.16;
  letter-spacing: -0.015em;
}

.home-projects-heading h2 span {
  color: #ba7e0a;
  font-weight: 500;
}

.home-projects-heading p {
  max-width: 560px;
  margin: 8px 0 0;
  color: #827e78;
  font-size: 0.78rem;
  line-height: 1.55;
}

.home-projects-all-link {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  padding: 0 0 4px;
  color: #8e8a83;
  border-bottom: 1px solid rgba(186,126,10,0.55);
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.025em;
  transition:
    color 0.2s ease,
    border-color 0.2s ease;
}

.home-projects-all-link span {
  color: #ba7e0a;
  font-size: 0.86rem;
}

.home-projects-all-link:hover {
  color: #d8d5d0;
  border-color: #ba7e0a;
}

.home-projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 2.4vw, 32px);
}

.home-project-card {
  min-width: 0;
}

.home-project-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.home-project-image {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #101010;
  border-radius: 3px;
  box-shadow: 0 5px 18px rgba(0,0,0,0.2);
}

.home-project-image::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(
      180deg,
      rgba(0,0,0,0.08) 0%,
      transparent 46%,
      rgba(0,0,0,0.22) 100%
    );
  transition: background 0.35s ease;
}

.home-project-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transform: scale(1.001);
  transition:
    transform 0.5s cubic-bezier(.2,.7,.2,1),
    filter 0.35s ease;
}

.home-project-number {
  position: absolute;
  z-index: 2;
  top: 11px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 29px;
  height: 22px;
  padding: 0 7px;
  color: rgba(255,255,255,0.86);
  background: rgba(8,8,8,0.58);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  font-size: 0.61rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.home-project-image-arrow {
  position: absolute;
  z-index: 2;
  right: 11px;
  bottom: 10px;
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  color: #111;
  background: rgba(210,207,201,0.92);
  border-radius: 50%;
  font-size: 0.8rem;
  opacity: 0;
  transform: translateY(5px);
  transition:
    opacity 0.25s ease,
    transform 0.25s ease,
    background 0.25s ease;
}

.home-project-copy {
  padding: 13px 1px 0;
}

.home-project-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 18px;
  margin-bottom: 5px;
}

.home-project-category,
.home-project-meta {
  overflow: hidden;
  color: #817d76;
  font-size: 0.63rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-project-category {
  color: #a36e09;
}

.home-project-meta {
  max-width: 45%;
  text-align: right;
}

.home-project-copy h3 {
  margin: 0;
  color: #c9c6c0;
  font-size: clamp(0.86rem, 1.05vw, 0.98rem);
  font-weight: 400;
  line-height: 1.38;
  letter-spacing: -0.005em;
  transition: color 0.2s ease;
}

.home-project-more {
  display: inline-block;
  margin-top: 7px;
  color: #64615d;
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  opacity: 0.72;
  transition:
    color 0.2s ease,
    opacity 0.2s ease;
}

.home-project-card:hover .home-project-image img {
  transform: scale(1.028);
}

.home-project-card:hover .home-project-image::after {
  background:
    linear-gradient(
      180deg,
      rgba(0,0,0,0.04) 0%,
      transparent 46%,
      rgba(0,0,0,0.12) 100%
    );
}

.home-project-card:hover .home-project-image-arrow {
  opacity: 1;
  transform: translateY(0);
  background: #ba7e0a;
}

.home-project-card:hover .home-project-copy h3 {
  color: #efede8;
}

.home-project-card:hover .home-project-more {
  color: #ba7e0a;
  opacity: 1;
}

/* Dezente Lade-Platzhalter statt auffälligem Ladehinweis */
.home-project-skeleton {
  min-height: 285px;
  position: relative;
  overflow: hidden;
}

.home-project-skeleton::before {
  content: "";
  display: block;
  aspect-ratio: 16 / 10;
  background: #111;
  border-radius: 3px;
}

.home-project-skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(255,255,255,0.025),
      transparent
    );
  animation: homeProjectLoading 1.25s infinite;
}

@keyframes homeProjectLoading {
  to {
    transform: translateX(100%);
  }
}

.home-projects-status {
  grid-column: 1 / -1;
  padding: 22px 0;
  color: #77736d;
  border-top: 1px solid rgba(255,255,255,0.08);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-size: 0.78rem;
  text-align: center;
}

.home-projects-status.error {
  color: #a98b8b;
}

.home-projects-retry {
  display: inline-block;
  margin-left: 8px;
  color: #ba7e0a;
}

@media (max-width: 900px) {
  .home-projects-section {
    margin-top: 48px;
    padding: 0 20px;
  }

  .home-projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-project-card:nth-child(3),
  .home-project-skeleton:nth-child(3) {
    grid-column: 1 / -1;
    width: calc(50% - 9px);
    justify-self: center;
  }
}

@media (max-width: 640px) {
  .home-projects-section {
    margin: 40px auto 58px;
    padding: 0 15px;
  }

  .home-projects-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 13px;
    margin-bottom: 22px;
    padding-bottom: 14px;
  }

  .home-projects-heading h2 {
    font-size: 1.34rem;
  }

  .home-projects-heading p {
    font-size: 0.75rem;
  }

  .home-projects-grid {
    grid-template-columns: 1fr;
    gap: 27px;
  }

  .home-project-card:nth-child(3),
  .home-project-skeleton:nth-child(3) {
    grid-column: auto;
    width: 100%;
  }

  .home-project-image {
    aspect-ratio: 16 / 10;
  }

  .home-project-image-arrow {
    opacity: 0.9;
    transform: none;
    width: 29px;
    height: 29px;
  }

  .home-project-copy h3 {
    font-size: 0.93rem;
  }

  .home-project-more {
    margin-top: 6px;
    font-size: 0.65rem;
  }

  .home-project-skeleton {
    min-height: 250px;
  }
}
