/* ============================================================
   Alumni: dark video row (hover to play, pop + blur siblings)
   A self-contained module for the programme pages. A horizontal
   row of portrait alumni video cards on a dark, cinematic band.
   Hovering a card plays its clip, scales it up ~20% and lifts it,
   while the other cards blur and dim so the eye stays on one.
   All motion is applied by CSS off an .is-hovering/.is-active
   class pair that alumni-row.js toggles; JS also drives playback.
   Namespaced .alr-* to avoid clashing with the global modules.
   Reuses the shared tokens (--accent/--ease); when no video is
   supplied a poster placeholder ("clip coming soon") is shown.
   ============================================================ */

.alr-section {
  position: relative;
  /* full-bleed dark band regardless of the surrounding page rhythm */
  background: radial-gradient(120% 90% at 50% -10%, #1a1c24 0%, #101116 46%, #0b0c10 100%);
  color: #fff;
  padding: clamp(64px, calc(8 * var(--fv, 1vw)), 120px) 0 clamp(72px, calc(9 * var(--fv, 1vw)), 132px);
  overflow: hidden;
}
/* faint oversized watermark glyphs, echoing the reference's backdrop */
.alr-section::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.028) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(80% 60% at 50% 40%, #000 30%, transparent 78%);
  -webkit-mask-image: radial-gradient(80% 60% at 50% 40%, #000 30%, transparent 78%);
  pointer-events: none;
}

.alr-head {
  position: relative;
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 0 var(--pad);
  text-align: center;
}
.alr-eyebrow {
  display: inline-block;
  font-size: 12.5px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase;
  color: rgba(255, 255, 255, .58);
}
.alr-h2 {
  font-size: clamp(30px, calc(4 * var(--fv, 1vw)), 52px);
  font-weight: 600; line-height: 1.03; letter-spacing: -.02em;
  margin: 12px 0 0;
}
.alr-h2 em {
  font-family: 'Bricolage Grotesque', Georgia, serif;
  font-style: italic; font-weight: 500;
  background: linear-gradient(90deg, #5e120e, var(--accent) 55%, #c4151c);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.alr-lead {
  font-size: clamp(14.5px, calc(1.3 * var(--fv, 1vw)), 17px); line-height: 1.55;
  color: rgba(255, 255, 255, .62);
  max-width: 60ch; margin: 14px auto 0;
}

/* ---- the row ---- */
/* Capped at the site container like every other section, so a big
   screen shows the same row a laptop does, just with more margin. */
.alr-viewport {
  position: relative;
  max-width: var(--container-wide, 1440px);
  margin: clamp(34px, calc(4 * var(--fv, 1vw)), 56px) auto 0;
}
.alr-row {
  display: flex;
  gap: clamp(16px, calc(1.8 * var(--fv, 1vw)), 28px);
  /* generous vertical padding so a hovered card's 1.2x pop is never
     clipped by the scroll container's box; horizontal scroll when the
     cards overflow (narrower screens / more cards than fit). */
  padding: 46px clamp(16px, calc(5 * var(--fv, 1vw)), 90px);
  overflow-x: auto;
  overflow-y: visible;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  /* "safe" centres the row when it fits but falls back to start-aligned
     when the cards overflow, so the first card stays reachable while
     scrolling (matters most on the homepage's longer mixed row). */
  justify-content: safe center;
  /* soft ends, so a card cut by the edge reads as "more this way"; the
     fade stays inside the row's side padding, clear of a resting card */
  --alr-fade: clamp(14px, calc(4 * var(--fv, 1vw)), 56px);
  mask-image: linear-gradient(90deg, transparent, #000 var(--alr-fade), #000 calc(100% - var(--alr-fade)), transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 var(--alr-fade), #000 calc(100% - var(--alr-fade)), transparent);
}
.alr-row::-webkit-scrollbar { display: none; }
/* while alumni-row.js drifts the row, snapping would yank every frame back
   to a card; it comes back the moment the viewer takes over */
.alr-row.alr-drifting { scroll-snap-type: none; }

/* Previous / next, added by alumni-row.js and shown only while the
   cards overflow; with no scrollbar a mouse could not reach the rest. */
.alr-nav { display: flex; justify-content: center; gap: 10px; margin-top: -14px; }
.alr-nav[hidden] { display: none; }
.alr-nav button {
  width: 44px; height: 44px; padding: 0;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #fff; border: 1px solid var(--line, rgba(19, 24, 41, .14));
  color: var(--ink, #131829); cursor: pointer;
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform .2s var(--ease);
}
.alr-nav button svg { width: 17px; height: 17px; }
.alr-nav button:first-child svg { transform: rotate(180deg); }
.alr-nav button:hover:not(:disabled) { background: var(--accent); border-color: var(--accent); color: #fff; }
.alr-nav button:active:not(:disabled) { transform: scale(.93); }
.alr-nav button:disabled { opacity: .35; cursor: default; }
.alr-nav button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- card ---- */
.alr-card {
  flex: 0 0 auto;
  width: clamp(230px, calc(20 * var(--fv, 1vw)), 300px);
  aspect-ratio: 4 / 5;
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: #16171d;
  border: 1px solid rgba(255, 255, 255, .08);
  scroll-snap-align: center;
  cursor: pointer;
  transform-origin: center center;
  will-change: transform, filter;
  transition:
    transform .5s var(--ease),
    filter .5s var(--ease),
    opacity .5s var(--ease),
    box-shadow .5s var(--ease);
}

.alr-media { position: absolute; inset: 0; }
.alr-media video,
.alr-media img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
/* poster placeholder shown until a real clip is dropped in */
.alr-ph {
  position: absolute; inset: 0;
  background: radial-gradient(130% 110% at 50% 0%, #2a2d38 0%, #17181f 60%, #0e0f14 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; text-align: center; color: rgba(255, 255, 255, .5);
}
.alr-ph-play {
  width: 60px; height: 60px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .22);
  color: #fff; transition: transform .4s var(--ease), background-color .4s var(--ease);
}
.alr-ph-play svg { width: 22px; height: 22px; margin-left: 3px; }
.alr-ph span { font-size: 12px; letter-spacing: .04em; }

/* ---- per-tile sound toggle ----
   The reels autoplay muted (browsers block unmuted autoplay), so each
   tile carries its own toggle to get the audio back. Hidden until
   alumni-row.js adds .alr-sound-ready to the card, so a no-JS viewer
   never sees a button that cannot do anything. */
.alr-sound { display: none; }
.alr-sound-ready .alr-sound {
  /* bottom-right, where a video player keeps its volume control; the
     name badge stops short of it (see .alr-sound-ready .alr-badge) */
  position: absolute; right: 12px; bottom: 12px; z-index: 3;
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .26);
  background: rgba(6, 7, 10, .58);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  color: #fff; cursor: pointer;
  transition: background-color .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease);
}
.alr-sound-ready .alr-sound:hover { background: rgba(6, 7, 10, .82); transform: scale(1.06); }
.alr-sound-ready .alr-sound:focus-visible {
  outline: 2px solid #fff; outline-offset: 2px;
}
.alr-sound-ready .alr-badge { right: 60px; }
/* Lucide volume-x / volume-2 (outline, 2px stroke, like the other site icons) */
.alr-sound-i { width: 18px; height: 18px; display: block; flex: none; }
/* muted is the resting state: show the crossed-out speaker */
.alr-sound-live { display: none; }
.alr-sound[aria-pressed="true"] {
  background: var(--accent);
  border-color: transparent;
}
/* keep the red "sound on" state while hovered, or it reads as muted */
.alr-sound-ready .alr-sound[aria-pressed="true"]:hover { background: var(--accent); }
.alr-sound[aria-pressed="true"] .alr-sound-muted { display: none; }
.alr-sound[aria-pressed="true"] .alr-sound-live { display: block; }

/* gradient scrim so the name badge stays legible over any footage */
.alr-card::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(6, 7, 10, .82) 0%, rgba(6, 7, 10, .12) 42%, transparent 66%);
  pointer-events: none;
  z-index: 1;
}

/* name / role badge (bottom-left, like the reference pills) */
.alr-badge {
  position: absolute; left: 14px; right: 14px; bottom: 14px; z-index: 2;
}
.alr-badge b {
  display: block;
  font-size: clamp(15px, calc(1.1 * var(--fv, 1vw)), 17px); font-weight: 700; letter-spacing: -.01em; color: #fff;
}
.alr-badge span {
  display: block; margin-top: 2px;
  font-size: 12.5px; line-height: 1.35; color: rgba(255, 255, 255, .72);
}
.alr-batch {
  display: inline-block; margin-top: 8px;
  padding: 4px 9px; border-radius: 999px;
  background: rgba(175, 37, 28, .9); color: #fff;
  font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
}

/* ---- hover choreography (classes toggled by alumni-row.js) ---- */
.alr-active {
  transform: scale(1.2) translateY(-6px);
  z-index: 5;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .8);
  border-color: rgba(255, 255, 255, .16);
}
.alr-active .alr-ph-play { transform: scale(1.08); background: var(--accent); border-color: transparent; }
/* every other card while one is active: recede, blur, dim */
.alr-row.is-hovering .alr-card:not(.alr-active) {
  transform: scale(.95);
  filter: blur(3px) brightness(.62) saturate(.85);
  opacity: .72;
}

/* ---- reduced motion / anim-off: static row, no pop/blur, no autoplay ---- */
@media (prefers-reduced-motion: reduce) {
  .alr-card { transition: none; }
  .alr-active { transform: none; box-shadow: none; }
  .alr-row.is-hovering .alr-card:not(.alr-active) { transform: none; filter: none; opacity: 1; }
}

/* ---- responsive ---- */
@media (max-width: 860px) {
  .alr-row { padding: 40px clamp(16px, calc(6 * var(--fv, 1vw)), 40px); }
  .alr-card { width: clamp(200px, calc(62 * var(--fv, 1vw)), 260px); }
  /* on touch the pop would jump under the finger, keep the active lift
     modest and don't blur neighbours as aggressively */
  .alr-active { transform: scale(1.06) translateY(-4px); }
  .alr-row.is-hovering .alr-card:not(.alr-active) { filter: blur(2px) brightness(.7); opacity: .8; transform: none; }
  /* a finger needs more than 38px to land on */
  .alr-sound-ready .alr-sound { width: 44px; height: 44px; right: 10px; bottom: 10px; }
  .alr-sound-ready .alr-badge { right: 62px; }
}

/* ============================================================
   Alumni frames: continuous marquee of alumni cards
   The frames are pre-composed artwork (portrait + name + role +
   employer logo baked in), so the card is just the image in a
   rounded, lifted plate. Two identical tracks slide as one and
   the animation shifts by exactly -50%, so the loop is seamless.
   ============================================================ */
.alr-sub {
  position: relative;
  max-width: var(--container-wide);
  margin: clamp(48px, calc(6 * var(--fv, 1vw)), 84px) auto 0;
  padding: 0 var(--pad);
  text-align: center;
}
.alr-sub h3 {
  font-size: clamp(22px, calc(2.4 * var(--fv, 1vw)), 32px);
  font-weight: 600; line-height: 1.1; letter-spacing: -.02em;
  margin: 0;
}
.alr-sub p {
  font-size: clamp(14px, calc(1.2 * var(--fv, 1vw)), 16px); line-height: 1.55;
  color: rgba(255, 255, 255, .58);
  margin: 10px auto 0; max-width: 60ch;
}

.alr-marquee {
  position: relative;
  margin-top: clamp(26px, calc(3 * var(--fv, 1vw)), 40px);
  overflow: hidden;
  /* fade the two ends so cards enter and leave instead of being cut */
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.alr-track {
  --alr-gap: clamp(14px, calc(1.4 * var(--fv, 1vw)), 20px);
  display: flex;
  width: max-content;
  gap: var(--alr-gap);
  /* the flex gap falls between cards but not after the last one, so a
     plain -50% shift would land one half-gap short and drift each loop.
     The trailing padding supplies that missing gap. */
  padding-right: var(--alr-gap);
  animation: alr-slide 90s linear infinite;
}
.alr-marquee:hover .alr-track { animation-play-state: paused; }
@keyframes alr-slide {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50%, 0, 0); }
}
.alr-frame {
  flex: 0 0 auto;
  width: clamp(224px, calc(20 * var(--fv, 1vw)), 292px);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: 0 24px 50px -28px rgba(0, 0, 0, .85);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.alr-frame img {
  display: block;
  width: 100%; height: auto;
}
.alr-marquee:hover .alr-frame { opacity: .82; }
.alr-marquee .alr-frame:hover {
  opacity: 1;
  transform: translateY(-6px) scale(1.03);
  box-shadow: 0 34px 60px -26px rgba(0, 0, 0, .9);
}

@media (prefers-reduced-motion: reduce) {
  /* no auto-slide, the row becomes a plain horizontal scroller */
  .alr-track { animation: none; }
  .alr-marquee { overflow-x: auto; }
  .alr-frame { transition: none; }
}
@media (max-width: 860px) {
  .alr-frame { width: clamp(172px, calc(48 * var(--fv, 1vw)), 220px); }
  .alr-track { animation-duration: 70s; }
}

/* ============================================================
   Founders: a class photograph of alumni who started ventures.
   Two ranks of cut-out portraits on one floor; the back rank sits
   half a step over, a size smaller and a shade darker, the way a
   team photo is shot. The bottom of the picture dissolves into the
   band. Pointing at a face lights it and names it in the caption;
   the others step back. The full list lives on /about-e-cell.
   ============================================================ */
.alr-fnd { position: relative; margin-top: clamp(64px, calc(8 * var(--fv, 1vw)), 116px); }
.alr-fnd-stage {
  position: relative;
  max-width: var(--container-wide);
  margin: clamp(30px, calc(3.6 * var(--fv, 1vw)), 52px) auto 0;
  padding: 0 var(--pad);
  overflow-x: auto;
  scrollbar-width: none;
}
.alr-fnd-stage::-webkit-scrollbar { display: none; }
.alr-fnd-photo {
  --fw: clamp(84px, calc(10.8 * var(--fv, 1vw)), 168px);
  position: relative;
  height: calc(var(--fw) * 1.42);
  min-width: calc(var(--fw) * 8.2);
  mask-image: linear-gradient(to top, transparent 0, #000 28%);
  -webkit-mask-image: linear-gradient(to top, transparent 0, #000 28%);
}
.alr-fnd-rank {
  position: absolute; left: 0; right: 0;
  display: flex; justify-content: center;
}
.alr-fnd-rank.is-back  { top: 0; z-index: 1; transform: translateX(calc(var(--fw) * .31)); }
.alr-fnd-rank.is-front { bottom: 0; z-index: 2; }
.alr-fnd-p {
  position: relative;
  flex: 0 0 auto;
  display: block;
  width: var(--fw);
  margin: 0 calc(var(--fw) * -.14);
  border-radius: 10px;
  outline: none;
}
.is-back .alr-fnd-p { width: calc(var(--fw) * .86); margin: 0 calc(var(--fw) * -.12); }
.alr-fnd-p img {
  display: block; width: 100%; height: auto;
  pointer-events: none;
  filter: brightness(.95);
  transform-origin: 50% 100%;
  transition: filter .45s var(--ease), transform .55s var(--ease);
}
.is-back .alr-fnd-p img {
  filter: brightness(.62);
  /* the back rank's bodies fade out between the front rank's shoulders */
  mask-image: linear-gradient(to top, transparent 0, #000 42%);
  -webkit-mask-image: linear-gradient(to top, transparent 0, #000 42%);
}
.alr-fnd-photo:hover .alr-fnd-p img,
.alr-fnd-photo:focus-within .alr-fnd-p img { filter: brightness(.38); }
.alr-fnd-photo .alr-fnd-p:hover img,
.alr-fnd-photo .alr-fnd-p:focus-visible img { filter: brightness(1.08); transform: translateY(-6px) scale(1.03); }
.alr-fnd-p:hover, .alr-fnd-p:focus-visible { z-index: 3; }

.alr-fnd-cap {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline;
  gap: 4px 16px;
  min-height: 1.6em;
  margin: 18px auto 0; padding: 0 var(--pad);
  font-size: 14.5px; line-height: 1.4;
  color: rgba(255, 255, 255, .58);
}
.alr-fnd-cap b { color: #fff; font-weight: 600; font-size: 16px; }
.alr-fnd-cta { text-align: center; margin: 22px 0 0; }

/* the class assembles once, as the picture scrolls into view */
.alr-fnd.is-armed .alr-fnd-p { opacity: 0; transform: translateY(28px); }
.alr-fnd.is-armed.is-in .alr-fnd-p {
  opacity: 1; transform: none;
  transition: opacity .7s var(--ease) calc(var(--i) * 30ms), transform .9s var(--ease) calc(var(--i) * 30ms);
}
@media (max-width: 760px) {
  .alr-fnd-photo { --fw: 74px; }
}
@media (prefers-reduced-motion: reduce) {
  .alr-fnd-p img { transition: none; }
  .alr-fnd.is-armed .alr-fnd-p { opacity: 1; transform: none; }
}
