/* Inner pages · modern layouts, 1:1 & 4:5 media */

/* Page hero with stock photo */
.jw-hero--page {
  flex-direction: column;
  justify-content: flex-end;
  min-height: 52vh;
  padding: 0;
  overflow: hidden;
}

.jw-hero--page .jw-hero__photo {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.jw-hero--page .jw-hero__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.jw-hero--page .jw-hero__veil {
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(42, 41, 32, 0.45) 0%, rgba(42, 41, 32, 0.78) 100%);
}

.jw-hero--page .jw-hero__content {
  position: relative;
  z-index: 2;
  width: min(100% - (var(--jw-pad) * 2), var(--jw-max));
  margin: 0 auto;
  padding: 7.5rem 0 2.5rem;
  max-width: 40rem;
  text-align: left;
}

@media (max-width: 640px) {
  .jw-hero--page {
    min-height: 44vh;
  }

  .jw-hero--page .jw-hero__content {
    padding: 6.25rem 0 2rem;
  }

  .jw-hero--page .jw-h1 {
    font-size: clamp(1.85rem, 8vw, 2.4rem);
  }

  .jw-hero--page .jw-lead {
    font-size: 1rem;
  }
}

/* Shared media ratios */
.jw-media {
  margin: 0;
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: var(--jw-olive-deep);
}

.jw-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.8s var(--jw-ease);
}

.jw-media:hover img {
  transform: scale(1.04);
}

.jw-media--11 {
  aspect-ratio: 1 / 1;
}

.jw-media--45 {
  aspect-ratio: 4 / 5;
}

.jw-media__caption {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  background: rgba(227, 218, 208, 0.92);
  color: var(--jw-olive-ink);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Page split */
.jw-page-split {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

@media (min-width: 900px) {
  .jw-page-split {
    grid-template-columns: 1fr 0.95fr;
  }

  .jw-page-split--tight {
    grid-template-columns: 1.05fr 0.95fr;
  }
}

.jw-page-split__copy .jw-lead {
  max-width: 38rem;
}

/* Story timeline */
.jw-timeline {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 900px) {
  .jw-timeline {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.35rem;
    align-items: stretch;
  }
}

.jw-timeline__item {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(91, 90, 65, 0.08);
  border-radius: 22px;
  overflow: hidden;
  height: 100%;
  will-change: opacity, transform;
}

.jw-timeline__item .jw-media {
  border-radius: 0;
}

.jw-timeline__body {
  padding: 1.35rem 1.4rem 1.6rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.3rem;
}

.jw-timeline__num {
  display: inline-flex;
  width: 2.1rem;
  height: 2.1rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--jw-olive);
  color: var(--jw-ivory);
  font-size: 0.75rem;
  font-weight: 500;
  margin-bottom: 0.65rem;
}

/* Engine grid (story model) */
.jw-engine-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
  align-items: stretch;
}

@media (min-width: 700px) {
  .jw-engine-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1020px) {
  .jw-engine-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.jw-engine-card {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(91, 90, 65, 0.08);
  border-radius: 20px;
  overflow: hidden;
  height: 100%;
}

.jw-engine-card .jw-media {
  border-radius: 0;
}

.jw-engine-card__num,
.jw-program-card__num,
.jw-why-card__num {
  display: inline-flex;
  margin: 1.15rem 1.25rem 0.35rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--jw-khaki);
}

.jw-engine-card .jw-h3,
.jw-program-card .jw-h3,
.jw-why-card .jw-h3 {
  margin: 0 1.25rem 0.4rem;
}

.jw-engine-card .jw-text,
.jw-program-card .jw-text,
.jw-why-card .jw-text {
  margin: 0 1.25rem 1.35rem;
  flex: 1;
}

/* Brands page alternating rows */
.jw-brand-row {
  display: grid;
  gap: clamp(1.75rem, 4vw, 3.5rem);
  align-items: center;
  padding: clamp(2rem, 4vw, 3.25rem) 0;
  border-top: 1px solid var(--jw-line);
}

.jw-brand-row:first-of-type {
  border-top: 0;
  padding-top: 0;
}

@media (min-width: 900px) {
  .jw-brand-row {
    grid-template-columns: 0.9fr 1.1fr;
  }

  .jw-brand-row--flip .jw-media {
    order: 2;
  }
}

.jw-brand-row .jw-media--45 {
  max-width: 420px;
  width: 100%;
}

.jw-brand-row__copy .jw-lead {
  margin-bottom: 1.25rem;
}

/* Programs */
.jw-program-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
  align-items: stretch;
}

@media (min-width: 700px) {
  .jw-program-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1020px) {
  .jw-program-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.jw-program-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(91, 90, 65, 0.08);
  border-radius: 20px;
  overflow: hidden;
}

.jw-program-card .jw-media {
  border-radius: 0;
}

.jw-program-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* Partner mosaic */
.jw-mosaic {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.jw-why-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
  align-items: stretch;
}

@media (min-width: 800px) {
  .jw-why-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.jw-why-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(91, 90, 65, 0.08);
  border-radius: 20px;
  overflow: hidden;
  will-change: opacity, transform;
}

.jw-why-card .jw-media {
  border-radius: 0;
}

/* Contact modern */
.jw-contact-modern {
  display: grid;
  gap: 2.5rem;
  align-items: start;
}

@media (min-width: 920px) {
  .jw-contact-modern {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 3rem;
  }
}

.jw-contact-modern__aside {
  display: grid;
  gap: 1rem;
}

.jw-contact-panel {
  padding: 1.35rem 1.4rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(91, 90, 65, 0.1);
}

.jw-contact-panel a {
  color: var(--jw-olive);
  font-weight: 500;
}

/* Homepage founder media consistency */
.jw-feature-split__media .jw-media--45,
.jw-ph--feature.jw-media--45 {
  aspect-ratio: 4 / 5;
}

/* Prevent transform misalignment on equal grids */
.jw-program-card,
.jw-engine-card,
.jw-timeline__item,
.jw-why-card {
  transform: none;
}
