/* === JM 4.2.0 mockup alignment === */

/* Overlay essay cards — text on image like the mockup */
.jm-essay-card--overlay {
  position: relative !important;
  padding: 0 !important;
  min-height: 22rem;
  overflow: hidden;
  background: var(--deep);
}
.jm-essay-card--overlay .wp-block-image,
.jm-essay-card--overlay figure {
  margin: 0 !important;
  height: 100%;
  min-height: 22rem;
}
.jm-essay-card--overlay .wp-block-image img,
.jm-essay-card--overlay img {
  width: 100% !important;
  height: 22rem !important;
  object-fit: cover !important;
  aspect-ratio: auto !important;
  display: block;
}
.jm-essay-card--overlay .jm-essay-card__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem 1.35rem 1.35rem;
  background: linear-gradient(
    to top,
    rgba(14, 22, 19, 0.92) 0%,
    rgba(14, 22, 19, 0.55) 45%,
    rgba(14, 22, 19, 0.15) 75%,
    transparent 100%
  );
  color: var(--ivory);
  z-index: 2;
  pointer-events: none;
}
.jm-essay-card--overlay .jm-essay-card__overlay a {
  pointer-events: auto;
}
.jm-essay-card--overlay .jm-kicker {
  color: var(--gold) !important;
  margin: 0 0 0.5rem !important;
}
.jm-essay-card--overlay h3,
.jm-essay-card--overlay .wp-block-heading {
  color: var(--ivory) !important;
  margin: 0 0 0.85rem !important;
  max-width: 16ch !important;
  font-size: clamp(1.25rem, 1.8vw, 1.55rem) !important;
  line-height: 1.2 !important;
}
.jm-essay-card--overlay .jm-textlink,
.jm-essay-card--overlay .jm-textlink a {
  color: color-mix(in srgb, var(--ivory) 88%, transparent) !important;
  margin: 0 !important;
}
.jm-essay-card--overlay .jm-textlink a:hover {
  color: var(--gold) !important;
}
.jm-essays--overlay {
  gap: 1.25rem !important;
}
@media (min-width: 900px) {
  .jm-essays--overlay {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 1.35rem !important;
  }
  .jm-essay-card--overlay .wp-block-image img,
  .jm-essay-card--overlay img {
    height: 26rem !important;
  }
  .jm-essay-card--overlay {
    min-height: 26rem;
  }
}

/* About — 3 columns: photo | bio | credentials */
.jm-about {
  position: relative;
  background: var(--deep);
  color: var(--ivory);
  padding: clamp(3rem, 5vw, 4.5rem) 0 !important;
}
.jm-about > .jm-index {
  color: color-mix(in srgb, var(--ivory) 55%, transparent) !important;
}
.jm-about__grid {
  display: grid !important;
  gap: 2rem !important;
  width: min(72rem, calc(100% - 2.5rem)) !important;
  margin-inline: auto !important;
  align-items: center !important;
}
@media (min-width: 1024px) {
  .jm-about__grid {
    grid-template-columns: 0.95fr 1.15fr 0.95fr !important;
    gap: 2.5rem 2.75rem !important;
    width: min(72rem, calc(100% - 4rem)) !important;
  }
}
.jm-about__grid > .wp-block-column {
  padding: 0 !important;
  margin: 0 !important;
}
.jm-about__photo .wp-block-image img,
.jm-about__photo img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: top;
  min-height: 0 !important;
  height: auto !important;
}
.jm-about__copy .jm-kicker { margin-bottom: 0.5rem !important; }
.jm-about__copy h2 {
  max-width: 14ch;
  margin: 0.35rem 0 1.1rem !important;
  line-height: 1.15;
  color: var(--ivory);
}
.jm-about__copy .jm-stone {
  color: color-mix(in srgb, var(--ivory) 78%, transparent) !important;
  margin-top: 0.9rem !important;
  line-height: 1.65;
}
.jm-about__creds {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 1.35rem !important;
  width: 100% !important;
  margin: 0 !important;
}
.jm-about__creds > .wp-block-column {
  display: grid !important;
  grid-template-columns: 2.25rem 1fr;
  gap: 0.85rem;
  align-items: start;
  padding: 0 !important;
  border: 0 !important;
}
.jm-about__creds .jm-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-color: color-mix(in srgb, var(--ivory) 28%, transparent);
  color: var(--gold);
  margin: 0;
}
.jm-about__creds .jm-cred {
  margin: 0 !important;
  font-size: 0.95rem;
  line-height: 1.45;
  color: color-mix(in srgb, var(--ivory) 88%, transparent);
}

/* Speaking — 3 columns: intro | topics | photo */
.jm-speak__grid {
  display: grid !important;
  gap: 2rem !important;
  width: min(72rem, calc(100% - 2.5rem)) !important;
  margin-inline: auto !important;
  align-items: start !important;
}
@media (min-width: 1024px) {
  .jm-speak__grid {
    grid-template-columns: 1.05fr 1fr 0.95fr !important;
    gap: 2.5rem !important;
    width: min(72rem, calc(100% - 4rem)) !important;
  }
}
.jm-speak__intro h2 {
  max-width: 12ch;
  margin-bottom: 1rem !important;
}
.jm-speak__intro .jm-muted {
  max-width: 28rem;
  margin-bottom: 1.5rem !important;
}
.jm-speak__topics .jm-kicker {
  margin-bottom: 0.85rem !important;
}
.jm-speak__topics .jm-topics {
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  list-style: none;
}
.jm-speak__topics .jm-topics li {
  margin: 0 !important;
  padding: 0.85rem 0 !important;
  border-top: 1px solid var(--line);
  padding-left: 0.9rem;
  position: relative;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
}
.jm-speak__topics .jm-topics li:last-child {
  border-bottom: 1px solid var(--line);
}
.jm-speak__topics .jm-topics li::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--gold);
  position: absolute;
  left: 0;
  top: 1.2rem;
}
.jm-speak__photo .wp-block-image img,
.jm-speak__photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

/* Guide form: stack like mockup right column */
@media (min-width: 1024px) {
  .jm-guide__grid {
    grid-template-columns: 0.9fr 1.2fr 0.95fr !important;
    align-items: center !important;
  }
}
.jm-guide__form .jm-form {
  flex-direction: column !important;
  max-width: 18rem;
}
.jm-guide__form .jm-form input,
.jm-guide__form .jm-form button {
  width: 100% !important;
}

/* Vertical section indexes — mockup style, only when margin allows */
@media (min-width: 1280px) {
  .jm-band > .jm-index,
  .jm-about > .jm-index {
    position: absolute !important;
    writing-mode: vertical-rl !important;
    transform: rotate(180deg) !important;
    left: max(0.4rem, calc((100% - 72rem) / 2 - 2.35rem)) !important;
    top: clamp(3.5rem, 5vw, 5rem) !important;
    width: auto !important;
    margin: 0 !important;
    white-space: nowrap;
    letter-spacing: 0.18em;
    font-size: 0.68rem;
  }
}
