/**
 * @file
 * HABD shared cards and image fallbacks. Library beauty/habd.cards, theme
 * group, weight 43. A dependency of beauty/habd.bands (homepage) and
 * beauty/habd.profile (profile templates), so it loads before either.
 *
 * Markup: templates/includes/habd/card.html.twig and fallback.html.twig.
 * Band- and profile-specific card variants stay in their own stylesheets.
 */

/* Fallbacks (templates/includes/habd/fallback.html.twig). */
.habd.habd .habd-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: inherit;
}
.habd.habd .habd-fallback--brand {
  background: linear-gradient(160deg, #1B4C34 0%, #0B2318 62%, #061410 100%);
}
.habd.habd .habd-fallback__mark {
  width: 52px;
  height: auto;
  opacity: 0.9;
}
.habd.habd .habd-fallback--slot {
  padding: 16px;
  background: repeating-linear-gradient(135deg, #F1EADA 0 14px, #EDE5D0 14px 28px);
  border: 1px dashed #C9B98F;
  border-radius: inherit;
}
.habd.habd .habd-fallback__label {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.4;
  letter-spacing: 0;
  text-transform: none;
  color: #6B6555;
  text-align: center;
}

/* ==========================================================================
   Data cards (templates/includes/habd/card.html.twig): events and articles.
   White cards on any ground.
   ========================================================================== */
.habd.habd .habd-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: 1px solid #EBE3CF;
  border-radius: var(--habd-radius-l);
  background: #FFFFFF;
  box-shadow: 0 14px 32px rgba(31, 29, 26, 0.12);
  color: var(--habd-ink-meta);
  transition: box-shadow 180ms ease, transform 180ms ease, border-color 180ms ease;
  --habd-focus: var(--habd-gold-ink);
}
.habd.habd a.habd-card:hover,
.habd.habd a.habd-card:focus-visible {
  transform: translateY(-3px);
  border-color: var(--habd-gold-deep);
  box-shadow: 0 20px 40px rgba(31, 29, 26, 0.16);
  color: var(--habd-ink-meta);
}
.habd.habd .habd-card__media {
  position: relative;
  display: block;
  flex: none;
  height: 200px;
  overflow: hidden;
  background: var(--habd-forest);
}
.habd.habd .habd-card__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 8px;
  padding: 20px 22px 24px;
}
.habd.habd .habd-card__kicker {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.2em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--habd-gold-ink);
}
.habd.habd .habd-card__title {
  font-size: 26px;
  line-height: 1.1;
  color: var(--habd-forest);
}
.habd.habd .habd-card__meta {
  font-size: 15px;
  line-height: 1.45;
  color: var(--habd-ink-meta);
}
.habd.habd .habd-card__text {
  display: -webkit-box;
  overflow: hidden;
  font-size: 16px;
  line-height: 1.5;
  color: var(--habd-ink-meta);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}
.habd.habd .habd-card__cta {
  margin-top: auto;
  padding-top: 6px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--habd-gold-ink);
  text-decoration: underline;
  text-decoration-color: rgba(122, 97, 30, 0.4);
  text-underline-offset: 5px;
}
.habd.habd a.habd-card:hover .habd-card__cta {
  text-decoration-color: currentColor;
}
/* Images and fallbacks that fill the card's fixed media box. */
.habd.habd .habd-card__media > :is(img, picture, .habd-fallback) {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}
.habd.habd .habd-card__media > picture > img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}

/* A ring outside a card lands on the band behind it: gold on dark bands. */
.habd.habd[data-tone="dark"] .habd-card {
  --habd-focus: var(--habd-gold);
}

@media (prefers-reduced-motion: reduce) {
  .habd.habd a.habd-card:hover,
  .habd.habd a.habd-card:focus-visible {
    transform: none;
  }
}
