/* About page (/אודות): a photo for every milestone, the story in five chapters (big photo or clip, short text, a
   reel and the chapter's photos), and a reel on every team portrait — the story direction Meni picked on 18.11.
   On top of hod-kit.css, hod-expert.css (the lightbox) and hod-about.css; same sky, white cards, navy type and sun.
   RTL first, phone first. Linked by lahav/tools/build_about.py. */

/* ---------- small shared pieces ---------- */
.ab .st-cap__b { display: none; }
.lightbox__cap .st-cap__t { display: block; margin-block-end: var(--space-1); color: #FFFFFF; font-size: 1.125rem; font-weight: 600; }
.lightbox__cap .st-cap__b { display: block; }

/* a reel card: the poster, the length on top, the title at the bottom; a tap opens the player */
.ab .st-reel {
  appearance: none; position: relative; display: block; inline-size: 100%; block-size: 100%; min-block-size: 220px;
  margin: 0; padding: 0; border: 0; border-radius: 14px; overflow: hidden; isolation: isolate;
  background: var(--navy-900); color: #fff; font: inherit; text-align: start; cursor: pointer; box-shadow: var(--shadow-2);
  -webkit-tap-highlight-color: transparent;
}
.ab .st-reel img { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; max-inline-size: none; object-fit: cover; object-position: 50% 30%; border-radius: 0; transition: transform .5s ease; }
.ab .st-reel::after { content: ""; position: absolute; inset-inline: 0; inset-block-end: 0; block-size: 58%; z-index: 1; pointer-events: none; background: linear-gradient(to top, rgba(9, 30, 42, .9) 0%, rgba(9, 30, 42, .45) 45%, rgba(9, 30, 42, 0) 100%); }
.ab .st-reel:focus-visible { outline: 3px solid var(--ab-sun); outline-offset: 3px; }
.ab .st-reel__cap { position: absolute; inset-inline: 10px; inset-block-end: 10px; z-index: 2; display: flex; align-items: center; gap: 8px; line-height: 1.25; text-shadow: 0 1px 2px rgba(0, 0, 0, .35); }
.ab .st-reel__cap b { display: block; font-size: .95rem; font-weight: 600; color: #fff; }
.ab .st-reel__cap small { display: block; margin-block-start: 2px; font-size: .8125rem; line-height: 1.3; color: #E3ECF2; }
.ab .st-play { position: relative; flex: none; display: grid; place-items: center; inline-size: 34px; block-size: 34px; border-radius: 50%; background: rgba(9, 30, 42, .45); border: 1.5px solid rgba(255, 255, 255, .85); transition: transform .2s ease, background-color .2s ease; }
.ab .st-play::before { content: ""; inline-size: 0; block-size: 0; margin-left: 3px; border-top: 7px solid transparent; border-bottom: 7px solid transparent; border-left: 11px solid #fff; }
.ab .st-play--big { position: absolute; inset-block-start: 50%; left: 50%; z-index: 2; inline-size: 72px; block-size: 72px; margin-block-start: -36px; margin-left: -36px; background: rgba(9, 30, 42, .4); border-width: 2px; }
.ab .st-play--big::before { margin-left: 6px; border-top-width: 13px; border-bottom-width: 13px; border-left-width: 21px; }
.ab .st-dur { position: absolute; inset-block-start: 8px; left: 8px; right: auto; z-index: 2; padding: 3px 9px; border-radius: 999px; background: rgba(9, 30, 42, .74); color: #fff; font-size: .8125rem; font-weight: 600; line-height: 1.3; font-variant-numeric: tabular-nums; }
.ab .st-dur::before { content: ""; display: inline-block; inline-size: 0; block-size: 0; margin-inline-end: 5px; vertical-align: 1px; border-top: 4px solid transparent; border-bottom: 4px solid transparent; border-left: 6px solid var(--ab-sun); }
.ab .st-tag { position: absolute; inset-block-start: 10px; inset-inline-start: 10px; z-index: 2; padding: 3px 12px; border-radius: 999px; background: var(--ab-sun); color: var(--navy-900); font-size: .875rem; font-weight: 600; line-height: 1.4; }
@media (hover: hover) {
  .ab .st-reel:hover img { transform: scale(1.045); }
  .ab .st-reel:hover .st-play { transform: scale(1.08); background: rgba(255, 255, 255, .38); }
}

/* a silent loop: its pause button (like the trackers page) */
.ab .st-loop video { cursor: pointer; }
.ab .st-loop__btn { position: absolute; inset-inline-start: 12px; inset-block-start: 12px; z-index: 3; display: inline-flex; align-items: center; gap: 6px; min-block-size: 36px; padding: 6px 12px; border: 0; border-radius: 999px; background: rgba(13, 37, 49, .78); color: #fff; font: 600 14px/1 var(--font); cursor: pointer; }
.ab .st-loop__btn::before { content: ""; inline-size: 0; block-size: 0; border-top: 6px solid transparent; border-bottom: 6px solid transparent; border-left: 10px solid #fff; }
.ab .st-loop.is-playing .st-loop__btn::before { inline-size: 10px; block-size: 12px; border: 0; border-left: 3px solid #fff; border-right: 3px solid #fff; }
.ab .st-loop__btn:focus-visible { outline: 3px solid var(--ab-sun); outline-offset: 2px; }
.ab .st-loop__pause { display: none; }
.ab .st-loop.is-playing .st-loop__pause { display: inline; }
.ab .st-loop.is-playing .st-loop__play { display: none; }

/* ---------- the timeline: a photo for every milestone ---------- */
.ab .st-tl { margin: 10px 0 10px; }
.ab .st-tl__a { display: block; overflow: hidden; border-radius: 14px; background: var(--ab-sky); box-shadow: var(--shadow-1); }
.ab .st-tl img { inline-size: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform .5s ease; }
.ab .st-tl figcaption { margin-block-start: 6px; }
.ab .ab-time .st-tl .st-cap__t { font-size: .875rem; line-height: 1.4; color: var(--text-muted); }
.ab .ab-time .st-tl .st-cap__t::before { content: ""; display: inline-block; inline-size: 7px; block-size: 7px; margin-inline-end: 6px; border-radius: 50%; background: var(--ab-sun); vertical-align: 1px; }
@media (hover: hover) { .ab .st-tl__a:hover img { transform: scale(1.05); } }
@media (min-width: 1000px) { .ab .st-tl img { aspect-ratio: 4 / 3; } }

/* ---------- the story: intro and chapter list ---------- */
.st-story { background: #fff; }
.st-story__intro { padding-block: var(--section-pad) clamp(12px, 2vw, 24px); background: linear-gradient(180deg, var(--ab-sky-2) 0%, #fff 100%); }
.st-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 10px; }
.st-chips a { display: inline-flex; align-items: center; gap: 8px; min-block-size: 40px; padding-block: 4px; padding-inline: 5px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--blue-100); box-shadow: var(--shadow-1); color: var(--navy-800); font-size: var(--fs-small); font-weight: 500; line-height: 1.3; text-decoration: none; transition: border-color var(--dur-2) var(--ease), color var(--dur-2) var(--ease); }
.st-chips a:hover { border-color: var(--blue-600); color: var(--blue-700); text-decoration: none; }
.st-chips b { display: grid; place-items: center; inline-size: 30px; block-size: 30px; border-radius: 50%; background: var(--ab-sun-soft); color: var(--ab-sun-ink); font-size: .875rem; font-weight: 600; }

/* ---------- a chapter ---------- */
.st-ch { padding-block: clamp(36px, 6vw, 88px); scroll-margin-block-start: 8px; }
.st-ch:nth-of-type(even) { background: var(--ab-sky-2); }
.st-ch__in { display: grid; gap: 16px; }
.st-ch__head { margin: 0; }
.st-ch__num { display: inline-block; margin: 0; padding: 2px 12px; border-radius: 999px; background: var(--ab-sun-soft); color: var(--ab-sun-ink); font-size: var(--fs-eyebrow); font-weight: 600; line-height: 1.6; }
.st-ch__title { margin-block: 8px 0; font-size: var(--fs-h2); line-height: var(--lh-h2); color: var(--navy-900); }
/* phone: the big photo or clip runs edge to edge */
.st-ch__media { min-inline-size: 0; margin-inline: calc(-1 * var(--gutter)); }
.st-ch__hero { position: relative; margin: 0; }
.st-ch__frame { position: relative; }
.st-ch__frame > a { display: block; overflow: hidden; background: var(--ab-sky); }
.ab .st-ch__frame img, .ab .st-ch__frame video { display: block; inline-size: 100%; block-size: auto; max-inline-size: none; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 0; background: var(--navy-900); }
.ab .st-ch__frame video { aspect-ratio: 16 / 9; }
.ab .st-ch__frame .st-reel--hero { aspect-ratio: 16 / 9; block-size: auto; min-block-size: 0; border-radius: 0; box-shadow: none; }
.ab .st-ch__frame .st-reel--hero img { aspect-ratio: auto; block-size: 100%; object-position: 50% 50%; }
.st-ch__cap { margin: 0; padding: 8px var(--gutter) 0; font-size: var(--fs-small); line-height: 1.5; color: var(--text-muted); }
.ab .st-ch__cap .st-cap__t { display: inline; font-weight: 600; color: var(--navy-900); }
.ab .st-ch__cap .st-cap__b { display: inline; }
.ab .st-ch__cap .st-cap__t + .st-cap__b::before { content: " · "; }
.st-ch__cap p { display: inline; max-inline-size: none; }
.st-ch__cap p + p { margin: 0; }
.st-ch__lead { font-size: var(--fs-lead); line-height: var(--lh-lead); color: var(--text); max-inline-size: 46ch; }
.st-ch__next { margin: 18px 0 0; }
.st-ch__next a { font-weight: 600; }
.st-ch__next a::after { content: " ↓"; }

/* the chapter's reel (or a tall photo) and four photos */
.st-mini { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: "r a" "r b" "c d"; }
.st-mini > li { min-inline-size: 0; }
.st-mini > li:nth-child(1) { grid-area: r; display: flex; }
.st-mini > li:nth-child(2) { grid-area: a; }
.st-mini > li:nth-child(3) { grid-area: b; }
.st-mini > li:nth-child(4) { grid-area: c; }
.st-mini > li:nth-child(5) { grid-area: d; }
.st-mini__r > * { flex: 1 1 auto; }
.st-th { margin: 0; }
.st-th a { display: block; overflow: hidden; border-radius: 12px; background: var(--ab-sky); }
.ab .st-th img { inline-size: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .5s ease; }
.st-th figcaption, .st-tall figcaption { margin-block-start: 6px; }
.ab .st-th .st-cap__t { font-size: .875rem; line-height: 1.35; color: var(--text-muted); }
.st-tall { position: relative; margin: 0; display: flex; flex-direction: column; min-block-size: 220px; }
.st-tall a { position: relative; flex: 1 1 auto; display: block; overflow: hidden; border-radius: 14px; background: var(--ab-sky); box-shadow: var(--shadow-2); }
.ab .st-tall img { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; max-inline-size: none; object-fit: cover; transition: transform .5s ease; }
.ab .st-tall .st-cap__t { font-size: .875rem; line-height: 1.35; color: var(--text-muted); }
@media (hover: hover) { .ab .st-th a:hover img, .ab .st-tall a:hover img { transform: scale(1.05); } }

@media (min-width: 640px) and (max-width: 999.98px) {
  .st-mini { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-areas: "r a b" "r c d"; }
}

/* wide screens: a big photo on one side, the text on the other; the side changes every chapter */
@media (min-width: 1000px) {
  .st-ch__in {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    grid-template-rows: 1fr auto auto 1fr;
    grid-template-areas: "media ." "media head" "media body" "media .";
    column-gap: clamp(40px, 5vw, 72px);
    row-gap: 14px;
  }
  .st-ch--flip .st-ch__in { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-areas: ". media" "head media" "body media" ". media"; }
  .st-ch__head { grid-area: head; }
  .st-ch__media { grid-area: media; margin-inline: 0; align-self: center; }
  .st-ch__body { grid-area: body; }
  .st-ch__frame { padding-block-end: 14px; padding-inline-end: 14px; }
  .st-ch--flip .st-ch__frame { padding-inline: 14px 0; }
  .st-ch__frame::before { /* the drawing grid behind the photo, as in the hero of this page */
    content: ""; position: absolute; inset-block: 14px 0; inset-inline: 14px 0; border-radius: 24px;
    background-color: rgba(255, 255, 255, .55);
    background-image: linear-gradient(to right, rgba(27, 106, 147, .16) 1px, transparent 1px), linear-gradient(to bottom, rgba(27, 106, 147, .16) 1px, transparent 1px);
    background-size: 20px 20px;
  }
  .st-ch--flip .st-ch__frame::before { inset-inline: 0 14px; }
  .st-ch__frame > a, .ab .st-ch__frame > video, .ab .st-ch__frame .st-reel--hero { position: relative; border-radius: 22px; overflow: hidden; box-shadow: var(--ab-shadow); }
  .ab .st-ch__frame img, .ab .st-ch__frame video { aspect-ratio: 3 / 2; border-radius: 22px; }
  .ab .st-ch__frame video, .ab .st-ch__frame .st-reel--hero { aspect-ratio: 16 / 9; }
  .ab .st-ch__frame .st-reel--hero img { border-radius: 0; }
  .st-ch__cap { padding: 10px 0 0; }
  .ab .st-loop__btn { inset-inline-start: 16px; inset-block-start: 16px; }
  .st-mini { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-areas: "r a b" "r c d"; gap: 12px; }
}

/* ---------- the team: every portrait plays a short reel ---------- */
.ab .st-person { grid-template-columns: minmax(0, 40%) minmax(0, 1fr); align-items: center; }
.ab .st-person__reel { aspect-ratio: 3 / 4; block-size: auto; min-block-size: 0; border-radius: 12px; box-shadow: none; }
.ab .st-person__reel img { aspect-ratio: auto; object-position: 50% 14%; border-radius: 0; }
.ab .st-person__reel .st-reel__cap { inset-inline: 8px; inset-block-end: 8px; gap: 6px; }
.ab .st-person__reel .st-reel__cap b { font-size: .875rem; }
.ab .st-person__reel .st-play { inline-size: 30px; block-size: 30px; }
@media (min-width: 720px) {
  .ab .st-person { grid-template-columns: 1fr; align-items: start; }
  .ab .st-person__reel { aspect-ratio: 4 / 5; }
  .ab .st-person__reel .st-reel__cap { inset-inline: 12px; inset-block-end: 12px; }
  .ab .st-person__reel .st-reel__cap b { font-size: 1rem; }
  .ab .st-person__reel .st-play { inline-size: 40px; block-size: 40px; }
}

/* ---------- reveal on scroll, and a slow settle of the big photos (only when motion is fine; see pc.js) ---------- */
.st-anim .ab .st-reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.st-anim .ab .st-reveal.is-in { opacity: 1; transform: none; }
.st-anim .ab .st-ch__frame.st-reveal img, .st-anim .ab .st-ch__frame.st-reveal video { transform: scale(1.06); transition: transform 2.4s cubic-bezier(.2, .7, .2, 1); }
.st-anim .ab .st-ch__frame.st-reveal.is-in img, .st-anim .ab .st-ch__frame.st-reveal.is-in video { transform: none; }

@media (prefers-reduced-motion: reduce) {
  .ab .st-reel img, .ab .st-tl img, .ab .st-th img, .ab .st-tall img, .ab .st-play, .st-chips a { transition: none; }
  .ab .st-reel:hover img, .ab .st-tl__a:hover img, .ab .st-th a:hover img, .ab .st-tall a:hover img, .ab .st-reel:hover .st-play { transform: none; }
}

/* ---------- the reel player (a dialog; the video loads only after the tap) ---------- */
.st-player { inline-size: 100vw; max-inline-size: 100vw; block-size: 100vh; block-size: 100dvh; max-block-size: 100dvh; margin: 0; padding: 0; border: 0; background: transparent; color: #fff; overflow: hidden; }
.st-player[open] { display: grid; place-items: center; }
.st-player::backdrop { background: rgba(8, 20, 28, .97); }
.st-player__box { display: grid; justify-items: center; gap: 12px; inline-size: 100%; padding: 64px 12px 18px; }
.st-player__v { display: block; inline-size: min(92vw, 460px, calc((100dvh - 170px) * 9 / 16)); block-size: auto; aspect-ratio: 9 / 16; max-inline-size: none; border-radius: 14px; background: #000; }
.st-player.is-wide .st-player__v { inline-size: min(94vw, 1040px, calc((100dvh - 170px) * 16 / 9)); aspect-ratio: 16 / 9; }
.st-player__cap { margin: 0; max-inline-size: none; text-align: center; line-height: 1.4; }
.st-player__cap strong { display: block; font-size: 1.125rem; font-weight: 600; }
.st-player__cap span { display: block; margin-block-start: 2px; font-size: .9375rem; color: var(--on-dark-muted); }
.st-player__close { position: fixed; inset-block-start: 12px; inset-inline-end: 12px; display: grid; place-items: center; inline-size: 44px; block-size: 44px; margin: 0; padding: 0; border: 1px solid rgba(255, 255, 255, .4); border-radius: 50%; background: rgba(255, 255, 255, .08); color: #fff; font: 400 28px/1 Arial, sans-serif; cursor: pointer; }
.st-player__close:hover { background: rgba(255, 255, 255, .18); }
.st-player__close:focus-visible { outline: 3px solid var(--sky-300); outline-offset: 2px; }
