/* ==========================================================================
   Dahu Theme - Homepage Activities Section
   ========================================================================== */

.acts-section {
  --parallax-offset: 0px;
  position: relative;
  padding-block: clamp(4.5rem, 8vw, 7rem);
  overflow: hidden;
  background: #fff;
}

.acts-section__inner {
  position: relative;
  z-index: 1;
}

.acts-section__header {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(18rem, 0.55fr);
  gap: 1rem;
  align-items: end;
  margin-bottom: 2rem;
}

.acts-section__eyebrow {
  grid-column: 1 / -1;
}

.acts-section__title {
  max-width: 16ch;
  color: var(--color-text);
  font-family: var(--font-heading);
  font-size: var(--type-home-title);
  line-height: var(--leading-display);
  text-wrap: balance;
}

.acts-section__intro {
  max-width: 33rem;
  justify-self: end;
  margin: 0;
  color: var(--color-text-light);
  font-size: var(--type-body-lg);
  line-height: var(--leading-body);
}

.acts-section__grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}

.act-card {
  position: relative;
  display: block;
  min-height: 248px;
  overflow: hidden;
  border-radius: 6px;
  background: var(--color-primary);
  box-shadow: none;
  color: var(--color-white);
  text-decoration: none;
  isolation: isolate;
}

.act-card--wide {
  grid-column: span 3;
}

.act-card--small {
  grid-column: span 2;
}

.act-card__img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.95) contrast(1.02);
  transform: scale(1);
  transition: transform 0.55s ease, filter 0.35s ease;
}

.act-card::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(33, 28, 24, 0.78) 0%, rgba(33, 28, 24, 0.28) 42%, rgba(33, 28, 24, 0.12) 100%);
  transition: background 0.28s ease;
  pointer-events: none;
}

.act-card:hover .act-card__img,
.act-card:focus-visible .act-card__img {
  filter: saturate(1.04) contrast(1.05);
  transform: scale(1.045);
}

.act-card:hover::after,
.act-card:focus-visible::after {
  background:
    linear-gradient(180deg, rgba(33, 28, 24, 0.86) 0%, rgba(33, 28, 24, 0.58) 58%, rgba(33, 28, 24, 0.42) 100%);
}

.act-card__body {
  position: relative;
  z-index: 2;
  display: grid;
  align-content: start;
  gap: 0.55rem;
  min-height: 100%;
  padding: clamp(1.2rem, 2.2vw, 1.5rem);
}

.act-card__badge {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  padding: 0.38rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.act-card__title {
  max-width: 14ch;
  margin: 0;
  color: var(--color-white);
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 2.2vw, 1.9rem);
  font-weight: 760;
  line-height: 1.08;
  letter-spacing: 0;
  text-wrap: balance;
}

.act-card__desc,
.act-card__cta {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.act-card__desc {
  display: -webkit-box;
  max-width: 30rem;
  margin: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.95rem;
  line-height: 1.48;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.act-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  width: max-content;
  color: var(--color-white);
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.act-card:hover .act-card__desc,
.act-card:hover .act-card__cta,
.act-card:focus-visible .act-card__desc,
.act-card:focus-visible .act-card__cta {
  opacity: 1;
  transform: translateY(0);
}

.act-card:focus-visible {
  outline: 3px solid var(--color-secondary);
  outline-offset: 4px;
}

.acts-section__cta {
  display: flex;
  justify-content: center;
  margin-top: clamp(2rem, 4vw, 3rem);
}

@media (hover: none) {
  .act-card::after {
    background:
      linear-gradient(180deg, rgba(33, 28, 24, 0.84) 0%, rgba(33, 28, 24, 0.52) 62%, rgba(33, 28, 24, 0.38) 100%);
  }

  .act-card__desc,
  .act-card__cta {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 991px) {
  .acts-section__header {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .acts-section__eyebrow {
    grid-column: auto;
  }

  .acts-section__intro {
    justify-self: start;
  }

  .act-card--wide,
  .act-card--small {
    grid-column: span 3;
  }
}

@media (max-width: 640px) {
  .acts-section {
    padding-block: clamp(3.75rem, 12vw, 5rem);
  }

  .acts-section__grid {
    grid-template-columns: 1fr;
  }

  .act-card--wide,
  .act-card--small {
    grid-column: auto;
  }

  .act-card {
    min-height: 15.5rem;
  }

  .act-card::after {
    background:
      linear-gradient(180deg, rgba(33, 28, 24, 0.84) 0%, rgba(33, 28, 24, 0.52) 62%, rgba(33, 28, 24, 0.38) 100%);
  }

  .act-card__desc,
  .act-card__cta {
    opacity: 1;
    transform: none;
  }

  .act-card__title {
    font-size: 1.45rem;
  }

  .act-card__desc {
    -webkit-line-clamp: 2;
  }
}
