/* =====================================================================
   Partners page — network wall.
   Grouped sections (Partners & Alliances / Member Organizations /
   Support & Initiatives) with photo cards: a white brand logo bottom-left
   on the image, then a one-line descriptor and Website | LinkedIn links.
   Same editorial DA as Portfolio / Focus.
   ===================================================================== */

/* Page top: heading left, lead right */
.pa-top .page-head { align-items: flex-start; }
.pa-top .page-head__lead { max-width: 52ch; }

/* ---------------------------------------------------------------------
   Alternating rows: text (one third) beside a photo (two thirds), the
   sides swapping row to row, bands alternating black then white.
   --------------------------------------------------------------------- */
.pa-alt__row {
  display: grid;
  /* the text column has to hold 20px copy, so it cannot be a third of the row */
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  /* the name sits level with the top of the photo */
  align-items: start;
}
/* Flipped rows put the photo first and the text second */
.pa-alt--flip .pa-alt__row { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
.pa-alt--flip .pa-alt__media { order: -1; }

.pa-alt__media {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--color-surface, #f3f3ef);
}
.pa-alt__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Same scale as .ab-title on Overview, our design reference */
.pa-alt__name {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.25rem, 1.3rem + 3vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -0.006em;
  color: var(--color-ink);
}
/* Same scale as .ab-lead: 20px light, the site's reading size */
.pa-alt__desc {
  margin: clamp(1.5rem, 3vw, 2.25rem) 0 0;
  font-size: var(--fs-lg);
  font-weight: 300;
  line-height: 1.6;
  color: var(--color-text-secondary);
}

/* Foot holds the two stacked links, with generous air above */
.pa-alt__foot { margin-top: clamp(2.25rem, 4.5vw, 3.25rem); }
.pa-alt__links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
}
.pa-alt__links a {
  position: relative;
  display: inline-block;
  padding-bottom: 3px;
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--color-ink);
  text-decoration: none;
}
.pa-alt__links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.9s cubic-bezier(0.19, 1, 0.22, 1);
}
.pa-alt__links a:hover::after,
.pa-alt__links a:focus-visible::after { transform: scaleX(1); transform-origin: left; }
.pa-alt__sep { display: none; }

/* Dark band: invert the type and the logo */
.pa-alt--dark { background: var(--color-footer); color: #fff; }
.pa-alt--dark .pa-alt__name,
.pa-alt--dark .pa-alt__desc,
.pa-alt--dark .pa-alt__links a { color: #fff; }
.pa-alt--dark .pa-alt__logo { filter: brightness(0) invert(1); }
.pa-alt--dark .pa-alt__sep { color: rgba(255, 255, 255, 0.4); }

@media (prefers-reduced-motion: reduce) {
  .pa-alt__links a::after { transition: none; }
}
@media (max-width: 760px) {
  .pa-alt__row,
  .pa-alt--flip .pa-alt__row { grid-template-columns: 1fr; gap: clamp(1.5rem, 5vw, 2.25rem); }
  .pa-alt--flip .pa-alt__media { order: 0; }
}

/* Section heading (shared) */
.pa-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.25rem, 1.3rem + 3vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -0.006em;
  color: var(--color-ink);
}

/* Grid of org cards — three across, aerated */
.pa-grid {
  margin-top: clamp(2.75rem, 6vw, 4.5rem);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(3.5rem, 6.5vw, 5.5rem) clamp(1.75rem, 3.5vw, 3rem);
}

/* Group sitting straight under the page-head: the head's bottom padding is the
   whole gap, so drop the section's top padding and the grid's leading margin. */
.pa-group--flush { padding-top: 0; }
.pa-group--flush .pa-grid { margin-top: 0; }

.pa-card { display: flex; flex-direction: column; }

/* Media: photo with a white brand logo bottom-left, subtle bottom scrim */
.pa-card__media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--color-surface, #f3f3ef);
}
.pa-card__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Legibility gradient under the logo */
.pa-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8, 10, 10, 0.62) 0%, rgba(8, 10, 10, 0) 46%);
  pointer-events: none;
}
.pa-card__logo {
  position: absolute;
  left: clamp(16px, 2vw, 22px);
  bottom: clamp(14px, 1.8vw, 20px);
  z-index: 1;
  height: clamp(24px, 3vw, 32px);
  width: auto;
  max-width: 62%;
  object-fit: contain;
  object-position: left bottom;
  /* render any logo pure white */
  filter: brightness(0) invert(1);
}
/* Some logos read better in their own colour */
.pa-card__logo--color { filter: none; }

/* Placeholder media (asset still to come): grey box with the name in white */
.pa-card__media--placeholder {
  display: flex;
  align-items: flex-end;
  background: #26302f;
}
.pa-card__media--placeholder::after { display: none; }
.pa-card__name {
  padding: clamp(14px, 1.8vw, 20px) clamp(16px, 2vw, 22px);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.05rem, 0.95rem + 0.4vw, 1.25rem);
  line-height: 1.15;
  color: #fff;
}

.pa-card__lead {
  margin: clamp(0.95rem, 1.9vw, 1.3rem) 0 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.1rem, 0.95rem + 0.5vw, 1.3rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--color-ink);
}
.pa-card__desc {
  margin: clamp(0.5rem, 1vw, 0.7rem) 0 0;
  font-size: var(--fs-sm);
  font-weight: 300;
  line-height: 1.6;
  color: var(--color-text-secondary);
}

/* Website | LinkedIn — house text links with the underline-draw on hover */
.pa-card__links {
  display: flex;
  align-items: baseline;
  gap: 0.85rem;
  margin-top: clamp(0.85rem, 1.7vw, 1.15rem);
}
.pa-card__links a {
  position: relative;
  display: inline-block;
  padding-bottom: 3px;
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--color-ink);
  text-decoration: none;
}
.pa-card__links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.9s cubic-bezier(0.19, 1, 0.22, 1);
}
.pa-card__links a:hover::after,
.pa-card__links a:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}
.pa-card__sep {
  color: var(--color-border-strong);
  font-size: var(--fs-sm);
  line-height: 1;
  user-select: none;
}

/* Dark band (Member Organizations) */
.pa-group--dark { background: var(--color-footer); color: #fff; }
.pa-group--dark .pa-title { color: #fff; }
.pa-group--dark .pa-card__lead { color: #fff; }
.pa-group--dark .pa-card__desc { color: #ffffff; }
.pa-group--dark .pa-card__links a { color: #fff; }
.pa-group--dark .pa-card__sep { color: #ffffff; }

@media (prefers-reduced-motion: reduce) {
  .pa-card__links a::after { transition: none; }
}

/* Responsive */
@media (max-width: 900px) {
  .pa-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .pa-grid { grid-template-columns: 1fr; }
}

/* =====================================================================
   Support & Initiatives — one large centered page title (Awards style),
   then one block per initiative: a landscape image, then a row with the
   prose on the left and the initiative's name, year and link on the right.
   ===================================================================== */

/* Title section: its own bottom padding would stack with the first
   initiative's top padding, so drop it and let the item provide the gap. */
.si-top { padding-bottom: 0; }

/* General page title, large and centered */
.si-hero-title {
  margin: 0 auto clamp(1.25rem, 2.5vw, 2rem);
  max-width: 22ch;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.6rem, 1.2rem + 4.6vw, 4.75rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
  color: var(--color-ink);
}
.si-hero-lead {
  margin: 0 auto;
  max-width: 46ch;
  text-align: center;
  font-size: var(--fs-lg);
  font-weight: 300;
  line-height: 1.6;
  color: var(--color-text-secondary);
}

.si-item + .si-item { padding-top: 0; }

.si-item__media {
  aspect-ratio: 16 / 7;
  overflow: hidden;
  background: var(--color-surface, #f3f3ef);
}
.si-item__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Row under the image: prose left, the initiative's identity right */
.si-item__row {
  margin-top: clamp(2.25rem, 4.5vw, 3.5rem);
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
.si-item__copy { max-width: 54ch; }
.si-item__desc {
  margin: 0;
  max-width: 54ch;
  font-size: var(--fs-lg);
  font-weight: 300;
  line-height: 1.65;
  color: var(--color-text-secondary);
}
.si-item__desc + .si-item__desc { margin-top: 1.1em; }
/* Right column: initiative name, then the link */
.si-item__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.si-item__name {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.35rem, 1rem + 1vw, 1.75rem);
  line-height: 1.15;
  letter-spacing: -0.008em;
  color: var(--color-ink);
}
.si-item__link { margin-top: clamp(1.5rem, 3vw, 2rem); }

/* Flipped item: identity on the left, prose on the right */
.si-item--flip .si-item__row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); }
.si-item--flip .si-item__meta { order: -1; }

@media (max-width: 760px) {
  .si-item__row,
  .si-item--flip .si-item__row { grid-template-columns: 1fr; gap: clamp(1.5rem, 5vw, 2.25rem); }
  .si-item--flip .si-item__meta { order: 0; }
}
