/* ============================================================
   Programs page
   ============================================================ */

.page-head {
  padding-block: var(--s-7) clamp(var(--s-5), 6vw, var(--s-7));
  background: var(--bg);
  position: relative;
}

.page-head h1 {
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 400;
  letter-spacing: -0.026em;
  line-height: 0.98;
  font-variation-settings: 'opsz' 144, 'SOFT' 30;
  max-width: 12ch;
  margin-top: var(--s-4);
}

.page-head h1 em {
  font-style: italic;
  font-variation-settings: 'opsz' 144, 'SOFT' 100, 'WONK' 1;
  color: var(--sage-deep);
}

.page-head-sub {
  font-size: var(--fs-lg);
  color: var(--ink-soft);
  line-height: var(--lh-snug);
  max-width: 42rem;
  margin-top: var(--s-5);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  margin-top: var(--s-6);
  padding-top: var(--s-5);
  border-top: 1px solid var(--line);
}

.filter-pill {
  padding: var(--s-2) var(--s-4);
  border-radius: var(--r-pill);
  background: transparent;
  border: 1px solid var(--line-strong);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--ink-soft);
  transition: background var(--dur-1) var(--ease), color var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease);
}
.filter-pill:hover { border-color: var(--ink); color: var(--ink); }
.filter-pill.is-active {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

/* ---------- Program rows ---------- */
.programs-list {
  display: flex;
  flex-direction: column;
  gap: clamp(var(--s-7), 9vw, var(--s-9));
  padding-block: clamp(var(--s-7), 9vw, var(--s-9));
}

.program-row {
  display: grid;
  gap: clamp(var(--s-5), 5vw, var(--s-7));
  align-items: center;
}

@media (min-width: 880px) {
  .program-row { grid-template-columns: 1.05fr 1fr; }
  .program-row.is-alt { grid-template-columns: 1fr 1.05fr; }
  .program-row.is-alt .program-media { order: -1; }
}

.program-media {
  position: relative;
  border-radius: var(--r-4);
  overflow: hidden;
  aspect-ratio: 4/5;
  box-shadow: var(--shadow-2);
  background: var(--bg-sunk);
}
.program-media img { width: 100%; height: 100%; object-fit: cover; }

@media (min-width: 880px) {
  .program-media { aspect-ratio: 3/4; }
}

.program-body {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}

.program-body h2 {
  font-size: clamp(1.75rem, 5vw, var(--fs-3xl));
  font-weight: 400;
  letter-spacing: -0.022em;
  font-variation-settings: 'opsz' 144, 'SOFT' 40;
}

.program-body p.lede {
  font-size: var(--fs-lg);
  color: var(--ink-soft);
  line-height: var(--lh-snug);
}

.program-spec {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-4);
  padding: var(--s-5);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  margin-top: var(--s-3);
}
.program-spec div { display: flex; flex-direction: column; gap: var(--s-1); }
.program-spec .spec-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--ink-mute);
}
.program-spec .spec-value {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 400;
  font-variation-settings: 'opsz' 144, 'SOFT' 30;
}

.program-outcomes {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  margin-top: var(--s-3);
}
.program-outcomes li {
  display: flex;
  gap: var(--s-3);
  align-items: flex-start;
  padding: var(--s-2) 0;
  font-size: var(--fs-base);
  color: var(--ink-soft);
  list-style: none;
}
.program-outcomes li::before {
  content: '';
  flex-shrink: 0;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--sage-wash);
  border: 1px solid var(--sage);
  margin-top: 4px;
  position: relative;
}

.program-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin-top: var(--s-4);
  align-items: center;
}
.program-price {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-left: auto;
}
.program-price .price-amount {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-weight: 400;
  letter-spacing: -0.02em;
}
.program-price .price-unit {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: var(--tracking-label);
  color: var(--ink-mute);
}

/* ============================================================
   Page-head hero — copy + face-focused portrait
   Shared by programs.astro and classes.astro page headers so the
   previously text-only bands carry a real hero image. Mirrors the
   home/about mechanic: mobile = 4/5 portrait; desktop = the image
   stretches to the copy's height (picture height == copy height)
   with the crop centred on the face.
   ============================================================ */
.page-head-grid {
  display: grid;
  gap: clamp(var(--s-5), 5vw, var(--s-7));
  align-items: stretch;
}
.page-head-media {
  position: relative;
  aspect-ratio: 4/5;
  border-radius: var(--r-4);
  overflow: hidden;
  background: var(--bg-sunk);
  box-shadow: var(--shadow-2);
  isolation: isolate;
}
.page-head-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--phm-pos, 50% 22%);
  transition: transform 1.6s var(--ease);
}
.page-head-media:hover img { transform: scale(1.03); }
/* Soft brand wash so the studio-grey backdrop sits in the palette */
.page-head-media::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(135deg, color-mix(in oklch, var(--clay-soft) 22%, transparent) 0%, transparent 52%, color-mix(in oklch, var(--sage-wash) 16%, transparent) 100%);
  mix-blend-mode: multiply;
}

@media (min-width: 880px) {
  .page-head-grid {
    grid-template-columns: 1.15fr 1fr;
    min-height: clamp(380px, 38vw, 480px);
  }
  .page-head-copy { align-self: center; }
  .page-head-media {
    aspect-ratio: auto;
    align-self: stretch;
  }
  /* Desktop crop is much wider than mobile, so it gets its own object-position
     (--phm-pos-d) to keep the face framed without a slab of empty backdrop. */
  .page-head-media img {
    position: absolute;
    inset: 0;
    object-position: var(--phm-pos-d, var(--phm-pos, 50% 30%));
  }
}
