/* Top section of the home page (lib/home.js): the newest article as a large feature, with the next
   four in an "Also in this issue" panel inside it. Black and white like the theme, Lora headlines,
   Poppins labels. */
.cxd-lead { --cxd-ink: #0a0a0a; margin: 0 0 10px; }
.cxd-lead a { text-decoration: none; }
.cxd-lead-feat {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  min-height: clamp(640px, 52vw, 860px);
  border-radius: 10px;
  overflow: hidden;
  background: var(--cxd-ink);
  color: #fff;
  isolation: isolate;
}
.cxd-lead-bg { position: absolute; inset: 0; z-index: -1; }
.cxd-lead-bg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; display: block; opacity: 0; transition: opacity .45s ease, transform .8s cubic-bezier(.2,.6,.2,1); }
.cxd-lead-bg img.is-on { opacity: 1; }
/* pointing at an "Also in this issue" article shows it in the feature (site/assets/home.js) */
.cxd-lead-main.is-fade > * { animation: cxd-lead-in .4s ease both; }
.cxd-lead-main.is-fade > :nth-child(2) { animation-delay: .04s; }
.cxd-lead-main.is-fade > :nth-child(3) { animation-delay: .08s; }
@keyframes cxd-lead-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.cxd-lead-tag[hidden] { display: none; }
.cxd-lead-feat:hover .cxd-lead-bg img { transform: scale(1.03); }
.cxd-lead-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.82) 0%, rgba(0,0,0,.35) 45%, rgba(0,0,0,.05) 75%), linear-gradient(to top, rgba(0,0,0,.55), transparent 45%); }

.cxd-lead-main { align-self: end; padding: 50px 40px 50px 50px; max-width: 900px; }
.cxd-lead-tag {
  position: relative; z-index: 2;
  display: inline-block; padding: 4px 12px; border-radius: 4px;
  background: var(--cxd-ink); color: #fff !important;
  font-family: Poppins, sans-serif; font-size: 13px; font-weight: 500; line-height: 1.4;
}
.cxd-lead-tag-w { background: #fff; color: var(--cxd-ink) !important; }
a.cxd-lead-tag:hover { background: #e6e6e6; }
.cxd-lead .cxd-lead-h {
  margin: 18px 0 22px; padding: 0;
  font-family: Lora, serif; font-weight: 400; font-size: clamp(30px, 3.1vw, 52px); line-height: 1.18; letter-spacing: 0;
  color: #fff;
}
.cxd-lead-h a { color: #fff !important; }
/* the whole feature opens the article (the link covers it); the category label and the panel stay their own links */
.cxd-lead-h a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.cxd-lead-h a:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
.cxd-lead-meta { display: flex; align-items: center; gap: 12px; font-family: Poppins, sans-serif; font-size: 15px; line-height: 1.3; }
/* the theme sizes images by their attributes elsewhere, so these sizes are forced */
.cxd-lead .cxd-lead-meta img { width: 40px !important; height: 40px !important; max-width: none; margin: 0; border-radius: 50%; flex: none; }
.cxd-lead-meta small { display: block; font-size: 13px; opacity: .8; margin-top: 2px; }

/* "Also in this issue": a dark glass panel on the right of the feature */
.cxd-lead-issue {
  position: relative; z-index: 2;
  margin: 28px 28px 28px 0; padding: 26px 26px 8px;
  display: flex; flex-direction: column;
  background: rgba(10,10,10,.72);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
}
.cxd-lead .cxd-lead-label {
  margin: 0 0 4px; padding: 0;
  font-family: Poppins, sans-serif; font-size: 12px; font-weight: 600; letter-spacing: .16em; line-height: 1.4; text-transform: uppercase;
  color: #fff;
}
.cxd-lead-row {
  display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 16px; align-items: center;
  padding: 18px 0; border-top: 1px solid rgba(255,255,255,.18);
  color: #fff !important;
}
.cxd-lead-label + .cxd-lead-row { border-top: 0; }
.cxd-lead .cxd-lead-row img { width: 104px !important; height: auto !important; max-width: none; margin: 0; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; display: block; transition: opacity .2s; }
.cxd-lead-row { position: relative; transition: opacity .25s; }
.cxd-lead-issue.has-active .cxd-lead-row:not(.is-active) { opacity: .55; }
.cxd-lead-row.is-active::before { content: ""; position: absolute; left: -26px; top: 18px; bottom: 18px; width: 3px; background: #fff; }
.cxd-lead-row-text { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.cxd-lead-row .cxd-lead-tag { font-size: 11px; padding: 1px 8px; }
.cxd-lead-row-title { font-family: Lora, serif; font-size: 17px; line-height: 1.35; }
.cxd-lead-row:hover .cxd-lead-row-title { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.cxd-lead-row:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.cxd-lead-date { font-family: Poppins, sans-serif; font-size: 12px; color: rgba(255,255,255,.65); }

/* tablet and phone: the photo on top, the panel below it on black */
@media (max-width: 999px) {
  .cxd-lead-feat { grid-template-columns: 1fr; min-height: 0; }
  .cxd-lead-bg { bottom: auto; height: clamp(420px, 70vw, 560px); }
  .cxd-lead-bg::after { background: linear-gradient(to top, rgba(10,10,10,1) 0%, rgba(0,0,0,.55) 40%, rgba(0,0,0,.05) 80%); }
  .cxd-lead-main { min-height: clamp(420px, 70vw, 560px); display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; padding: 28px 24px 24px; }
  .cxd-lead-row.is-active::before { left: -18px; }
  .cxd-lead-issue { margin: 0 16px 16px; padding: 20px 18px 4px; background: rgba(255,255,255,.06); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (max-width: 599px) {
  .cxd-lead-row { grid-template-columns: 88px minmax(0, 1fr); gap: 14px; }
  .cxd-lead .cxd-lead-row img { width: 88px !important; }
  .cxd-lead-row-title { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .cxd-lead-bg img { transition: none; }
  .cxd-lead-main.is-fade > * { animation: none; }
  .cxd-lead-feat:hover .cxd-lead-bg img { transform: none; }
}

/* the Entrepreneurship grid's large middle card: Salient sizes its headline for desktop, so on
   phones it is set smaller and allowed to wrap inside the card */
@media (max-width: 690px) {
  [data-cxd-category] .nectar-post-grid-item .post-heading,
  [data-cxd-category] .nectar-post-grid-item .post-heading * { font-size: 24px !important; line-height: 1.3 !important; white-space: normal !important; overflow-wrap: anywhere; }
}
/* its middle card has the text on the photo: a dark fade keeps it readable on light photos */
[data-cxd-category] .layout-vert_staggered_middle .nectar-post-grid-item:nth-child(3n+2) .nectar-post-grid-item-bg::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(0,0,0,.75) 0%, rgba(0,0,0,.45) 45%, rgba(0,0,0,.1) 75%);
}
