/**
 * /blogs — journal listing (magazine layout).
 * Extends .bl-* in inner-pages.css with the same hero glow, card lift,
 * and link motion language as community.css and homepage .fp-blog__card.
 */

/* ── mast — dark radial glow + hatch (matches .cm-mast / .ip-cta) ───────── */

.bl-mast--hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 65% at 8% 0%, rgba(190, 22, 22, 0.32) 0%, transparent 58%),
    radial-gradient(ellipse 60% 55% at 92% 100%, rgba(155, 0, 0, 0.22) 0%, transparent 55%),
    #0b0d12;
}

.bl-mast--hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    122deg,
    transparent 0,
    transparent 11px,
    rgb(190 22 22 / 5%) 11px,
    rgb(190 22 22 / 8%) 12.2px
  );
  -webkit-mask-image: radial-gradient(ellipse 100% 90% at 10% 0%, #000 0%, #000 35%, transparent 85%);
  mask-image: radial-gradient(ellipse 100% 90% at 10% 0%, #000 0%, #000 35%, transparent 85%);
}

.bl-mast__rail--hero,
.bl-mast--hero .bl-cats {
  position: relative;
  z-index: 1;
}

.bl-mast--hero .ip-title {
  max-width: 22ch;
}

.bl-mast--hero .ip-lead {
  max-width: 52ch;
}

.bl-search input::placeholder {
  color: rgba(255, 255, 255, 0.42);
}

.bl-search input:focus-visible {
  outline: 2px solid rgba(255, 180, 168, 0.65);
  outline-offset: 2px;
  border-radius: 8px;
}

/* ── listing canvas — wash so the white cards read as a set ─────────────── */

.bl-page:not(.rs-page) {
  background: var(--fp-wash);
}

.bl-feature__label {
  display: inline-block;
  margin-bottom: 14px;
  font-family: var(--fp-label);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fp-red);
}

.bl-grid-wrap__rail {
  padding-top: 40px;
  padding-bottom: 72px;
}

/* ── cards — inset media, aligned type, lift on hover ──────────────────── */

.bl-grid {
  gap: 22px;
  align-items: stretch;
}

.bl-grid:has(> .bl-card:nth-child(2):last-child) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@keyframes bl-card-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.bl-card {
  position: relative;
  padding: 0;
  border-radius: 22px;
  background: #fff;
  box-shadow:
    0 1px 2px rgba(11, 13, 18, 0.04),
    0 18px 40px -32px rgba(11, 13, 18, 0.45);
  animation-name: bl-card-in;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.bl-card:hover {
  border-color: #d9dee5;
  box-shadow:
    0 1px 2px rgba(11, 13, 18, 0.05),
    0 28px 48px -28px rgba(11, 13, 18, 0.48);
  transform: translateY(-4px);
}

.bl-card__media,
.bl-feature__media {
  position: relative;
  background: #f3f0ee;
}

.bl-card__media {
  border-radius: 0;
  aspect-ratio: 16 / 10;
}

.bl-card__cat {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 1;
  padding: 5px 11px;
  border-radius: 999px;
  background: #fff;
  color: var(--fp-red);
  font-family: var(--fp-label);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
  box-shadow: 0 8px 18px rgba(11, 13, 18, 0.16);
}

.bl-card__media img,
.bl-feature__media img {
  object-position: center 22%;
}

.bl-card:hover .bl-card__media img {
  transform: scale(1.045);
}

.bl-feature__ph,
.bl-card__ph {
  position: absolute;
  inset: 0;
  width: auto;
  height: auto;
  min-height: 0;
  background:
    radial-gradient(ellipse 80% 70% at 100% 110%, rgba(155, 0, 0, 0.16), transparent 58%),
    radial-gradient(ellipse 55% 50% at 0% 0%, rgba(155, 0, 0, 0.08), transparent 52%),
    repeating-linear-gradient(
      122deg,
      transparent 0,
      transparent 11px,
      rgba(155, 0, 0, 0.045) 11px,
      rgba(155, 0, 0, 0.045) 12.2px
    ),
    #f6f3f1;
}

.bl-feature__ph::before,
.bl-card__ph::before {
  content: "";
  position: absolute;
  left: 16px;
  bottom: 16px;
  width: 28px;
  height: 3px;
  border-radius: 999px;
  background: var(--fp-red);
}

.bl-feature__ph::after,
.bl-card__ph::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 10px;
  border: 1px solid rgba(155, 0, 0, 0.14);
  pointer-events: none;
}

.bl-card__ph::before {
  left: auto;
  right: 18px;
  top: 18px;
  bottom: auto;
}

.bl-card__meta span:first-child {
  padding: 4px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--fp-red) 10%, #fff);
  color: var(--fp-red);
  font-size: 12px;
  font-weight: 700;
}

.bl-feature__ph::after {
  inset: 14px;
  border-radius: 12px;
}

.bl-card--text .bl-card__body {
  padding-top: 22px;
}

.bl-card__body {
  padding: 18px 20px 22px;
}

.bl-card__date {
  display: block;
  font-family: var(--fp-label);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--fp-hint);
}

.bl-card__title {
  margin: 8px 0 0;
  font-size: clamp(20px, 1.5vw, 24px);
  font-weight: 800;
  letter-spacing: -0.032em;
  line-height: 1.22;
  text-wrap: balance;
}

.bl-card__title a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.bl-card__body p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.55;
}

.bl-card .bl-more {
  position: relative;
  z-index: 1;
}

.bl-more {
  font-family: var(--fp-display);
  font-size: 13.5px;
  font-weight: 600;
}

.bl-more i {
  font-size: 11px;
  transition: transform 0.2s ease;
}

.bl-more:hover i {
  transform: translateX(3px);
}

.bl-feature .bl-more:hover i {
  transform: translateX(3px);
}

.bl-tags a:hover {
  color: var(--fp-red);
}

/* ── pager ───────────────────────────────────────────────────────────────── */

.bl-pager {
  padding-bottom: 24px;
}

.bl-pager a:hover {
  border-color: var(--fp-ink);
  background: #fff;
}

/* ── reduced motion ─────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .bl-card,
  .bl-card__media img,
  .bl-feature__rail--card,
  .bl-feature__media img,
  .bl-more i {
    transition: none !important;
  }

  .bl-card:hover,
  .bl-card:hover .bl-card__media img,
  .bl-feature__rail--card:hover,
  .bl-feature:not(.rs-hub):hover .bl-feature__media img,
  .bl-feature__media:hover img {
    transform: none !important;
  }

  .bl-card {
    animation: none !important;
  }
}

@media (max-width: 991px) {
  .bl-mast--hero .ip-title {
    max-width: 20ch;
  }

  .bl-grid-wrap__rail {
    padding-top: 32px;
  }
}

@media (max-width: 767px) {
  .bl-grid-wrap__rail {
    padding-top: 24px;
    padding-bottom: 48px;
  }

  .bl-mast--hero .ip-title {
    max-width: none;
  }

  .bl-card__body {
    padding: 16px 16px 18px;
  }

  .bl-card__body p {
    min-height: 0;
  }

  .bl-grid:has(> .bl-card:nth-child(2):last-child) {
    grid-template-columns: minmax(0, 1fr);
  }
}
