.area-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  aspect-ratio: 4 / 5;
  padding: var(--space-xl);
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
  transition: opacity var(--transition-base);
  isolation: isolate;
}

/* Darkening overlay between photo and copy — keeps white title/subtitle
   readable regardless of how light/busy the underlying photo is. */
.area-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.25) 0%, rgba(0, 0, 0, 0.6) 100%);
  z-index: 1;
  pointer-events: none;
}

@media (min-width: 768px) {
  .area-card {
    aspect-ratio: 1 / 1;
    padding: var(--space-2xl);
  }
}

.area-card:hover {
  opacity: 0.95;
}

.area-card__inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.area-card__head {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.area-card__title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 900;
  line-height: 1.05;
}

@media (min-width: 1024px) {
  .area-card__title {
    font-size: 36px;
  }
}

.area-card__subtitle {
  font-family: var(--font-ui);
  font-size: var(--font-size-lg);
  font-weight: 300;
  max-width: 80%;
}

.area-card__foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.area-card__icon {
  font-size: 28px;
  transition: transform var(--transition-base);
}

.area-card:hover .area-card__icon {
  transform: translateX(8px);
}

/* Layering: photo (z 0) → dark overlay (z 1, ::after) → copy (z 2). */
.area-card__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  transition: transform var(--transition-base);
  pointer-events: none;
  user-select: none;
}

.area-card:hover .area-card__bg {
  transform: scale(1.04);
}

/* Color variants now act as a fallback paint while the photo loads —
   text colour is uniform light across all cards because every card sits
   on top of the dark overlay above the photo. */
.area-card {
  color: var(--color-off-white);
}
.area-card__subtitle {
  color: var(--off-white-80);
}

.area-card--coral    { background-color: var(--color-coral); }
.area-card--banana   { background-color: var(--color-banana); }
.area-card--brand    { background-color: var(--color-brand-red); }
.area-card--pink     { background-color: var(--color-baby-pink); }
.area-card--bordeaux { background-color: var(--color-bordeaux); }
.area-card--midnight { background-color: var(--color-midnight); }
