/* Success Stories, option 2: video strip + story index with a sticky stage. Shares the parts of option 1 (stories-v2.css). */
/* Loaded after the sheets before it; the build links each one with a version stamp (no @import). */

.v3-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 2rem 4rem; margin-bottom: 3.6rem; }
.v3-head h2 { font-size: clamp(3rem, 3.4vw, 4.4rem); line-height: 1.15; font-weight: 700; color: var(--navy); }
.v3-head p { margin-top: 1rem !important; max-width: 52rem; font-size: 1.7rem; line-height: 1.55; color: var(--ink-2); }

/* 1. Watch their stories: wide film cards in a strip that scrolls and snaps; each film moves silently until played. */
.v3-watch { padding: 8rem 0 6rem; overflow: hidden; }
.w-nav { display: flex; gap: .8rem; }
.w-nav button { display: grid; place-items: center; width: 4.8rem; height: 4.8rem; padding: 0; border: 0; border-radius: 50%; background: var(--soft); color: var(--navy); cursor: pointer; transition: background .2s, color .2s, opacity .2s; }
.w-nav button:hover { background: var(--navy); color: #fff; }
.w-nav button:disabled { opacity: .35; cursor: default; background: var(--soft); color: var(--navy); }
.w-nav svg { width: 1rem; height: 1.6rem; }
.w-prev svg, .rtl .w-next svg { transform: scaleX(-1); }
.rtl .w-prev svg { transform: none; }
.w-strip { display: grid; grid-auto-flow: column; grid-auto-columns: min(64rem, 78vw); gap: 2rem; margin: 0; padding: 0 max(1.5rem, calc((100vw - 117rem) / 2 + 1.5rem)) 1rem; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: max(1.5rem, calc((100vw - 117rem) / 2 + 1.5rem)); scrollbar-width: none; list-style: none; cursor: grab; }
.w-strip::-webkit-scrollbar { display: none; }
.w-strip.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.w-strip.is-dragging * { pointer-events: none; }
.w-card { scroll-snap-align: start; margin: 0; padding: 0; }
.w-card::before { content: none; }
.w-play { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; overflow: hidden; border: 0; border-radius: 2.4rem; background: var(--navy); cursor: pointer; }
.w-play img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.w-play:hover img { transform: scale(1.03); }
.w-play:hover .play-dot { transform: scale(1.08); }
.w-card .play-dot { animation: none; width: 7.2rem; height: 7.2rem; margin: -3.6rem 0 0 -3.6rem; }
.w-frame { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 2.4rem; background: #000; }
.w-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.w-cap { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 0 2rem; padding: 2rem .4rem 0; }
.w-cap .v2-eyebrow { grid-column: 1; }
.w-cap h3 { grid-column: 1; margin: .4rem 0 .2rem; font-size: 2.2rem; line-height: 1.3; font-weight: 700; color: var(--navy); }
.w-role { grid-column: 1; font-size: 1.4rem; color: var(--ink-2); }
.w-read { grid-column: 2; grid-row: 1 / 4; display: inline-flex; align-items: center; gap: .8rem; height: 4rem; padding-inline: 1.6rem .6rem; border-radius: 99rem; background: var(--soft); font-size: 1.4rem; font-weight: 700; color: var(--navy) !important; white-space: nowrap; transition: background .2s, color .2s; }
.w-read span { display: grid; place-items: center; width: 2.8rem; height: 2.8rem; border-radius: 50%; background: #fff; }
.w-read svg { width: 1.2rem; height: .9rem; }
.rtl .w-read svg { transform: scaleX(-1); }
.w-read:hover { background: var(--navy); color: #fff !important; }
.w-read:hover span { color: var(--navy); }

/* 2. Index: names on one side, the stage on the other. */
.v3-index { padding: 6rem 0 10rem; }
.ix-bar { position: sticky; z-index: 5; top: 9rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.2rem; margin-bottom: 2.4rem; padding: 1rem; border-radius: 99rem; background: rgba(255, 255, 255, .92); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 0 0 1px var(--line); }
.ix-bar .cards-filter { margin: 0; }
.ix-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 5.6rem; align-items: start; }
.ix-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.ix-row { margin: 0; padding: 0; border-bottom: 1px solid var(--line); }
.ix-row::before { content: none; }
.ix-row[hidden] { display: none; }
.ix-btn { position: relative; display: flex; align-items: center; gap: 1.8rem; width: 100%; padding: 1.6rem 1.2rem; border: 0; background: none; font: inherit; text-align: start; color: var(--navy); cursor: pointer; transition: background .25s; }
.ix-btn::before { content: ""; position: absolute; inset-block: 1.2rem; inset-inline-start: 0; width: 3px; border-radius: 2px; background: var(--red); transform: scaleY(0); transition: transform .35s var(--ease); }
.ix-thumb { flex: none; width: 5.6rem; height: 5.6rem; border-radius: 50%; object-fit: cover; object-position: 50% 25%; filter: grayscale(1); opacity: .7; transition: filter .3s, opacity .3s; }
.ix-text { flex: 1; min-width: 0; display: grid; gap: .2rem; }
.ix-kind { font-size: 1.2rem; font-weight: 700; color: var(--red); }
.ix-name { font-size: 2.2rem; line-height: 1.3; font-weight: 700; transition: transform .35s var(--ease); }
.ix-role { overflow: hidden; font-size: 1.4rem; line-height: 1.45; color: var(--ink-2); white-space: nowrap; text-overflow: ellipsis; }
.ix-vid { flex: none; display: grid; place-items: center; width: 3.2rem; height: 3.2rem; border-radius: 50%; background: rgba(239, 67, 77, .1); color: var(--red); }
.ix-vid svg { width: 1.4rem; height: 1.4rem; margin-inline-start: .2rem; }
.ix-arrow { flex: none; display: grid; place-items: center; width: 3.6rem; height: 3.6rem; border-radius: 50%; background: var(--navy); color: #fff; opacity: 0; transform: translateX(-.6rem); transition: opacity .25s, transform .35s var(--ease); }
.rtl .ix-arrow { transform: translateX(.6rem); }
.ix-arrow svg { width: 1.2rem; height: .9rem; }
.rtl .ix-arrow svg { transform: scaleX(-1); }
.ix-row.is-active .ix-btn { background: var(--soft); }
.ix-row.is-active .ix-btn::before { transform: none; }
.ix-row.is-active .ix-thumb { filter: none; opacity: 1; }
.ix-row.is-active .ix-name { transform: translateX(.6rem); }
.rtl .ix-row.is-active .ix-name { transform: translateX(-.6rem); }
.ix-row.is-active .ix-arrow { opacity: 1; transform: none; }
.ix-preview { display: none; }

.ix-stage { position: sticky; top: 18rem; }
.stage-photo { position: relative; overflow: hidden; border-radius: 2.4rem; aspect-ratio: 4 / 4.2; background: var(--soft); }
.stage-photo > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%; transition: opacity .5s ease; }
.stage-photo > img.is-leaving { opacity: 0; }
.stage-photo > img.is-entering { opacity: 0; }
.stage-play { position: absolute; z-index: 2; inset: 0; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; }
.stage-play[hidden] { display: none; }
.stage-play .play-dot { animation: none; }
.stage-play:hover .play-dot { transform: scale(1.08); }
.stage-photo iframe.stage-film { position: absolute; z-index: 3; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.stage-body { padding: 2.4rem .4rem 0; animation: voice-in .5s var(--ease); }
.stage-body .pills { margin-bottom: 1.6rem; }
.stage-body .pills li { background: var(--soft); }
.stage-body blockquote { margin: 0 0 1.8rem; font-size: 1.9rem; line-height: 1.55; font-weight: 500; color: var(--navy); text-wrap: pretty; }
.stage-body h3 { font-size: 2rem; font-weight: 700; color: var(--navy); }
.stage-role { margin-top: .4rem !important; font-size: 1.5rem; color: var(--ink-2); }
.stage-body .v2-more { margin-top: 2rem; }

@media (prefers-reduced-motion: reduce) {
  .stage-body { animation: none; }
  .ix-name, .ix-arrow, .ix-btn::before, .stage-photo > img { transition: none; }
}
@media (max-width: 1099px) {
  .ix-grid { gap: 3.2rem; }
  .ix-name { font-size: 2rem; }
}
/* Phones and tablets: no stage; the active row opens in place. */
@media (max-width: 899px) {
  .ix-grid { display: block; }
  .ix-stage { display: none; }
  .ix-bar { border-radius: 2.4rem; top: 7rem; }
  .ix-bar .browse-search { flex: 1 1 100%; }
  .ix-bar .cards-filter { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .ix-bar .cards-filter button { white-space: nowrap; }
  .ix-row.is-active .ix-name { transform: none; }
  .ix-arrow { display: none; }
  .ix-row.is-open .ix-preview { display: block; padding: 0 1.2rem 2.4rem; background: var(--soft); animation: voice-in .45s var(--ease); }
  .ix-preview img { width: 100%; aspect-ratio: 4 / 3; border-radius: 1.6rem; object-fit: cover; object-position: 50% 25%; }
  .ix-preview blockquote { margin: 1.6rem 0 0; font-size: 1.7rem; line-height: 1.55; font-weight: 500; color: var(--navy); }
  .ix-preview .v2-more { margin-top: 1.6rem; }
  .ix-row:not(.is-open) .ix-btn { background: none; }
  .ix-row:not(.is-open) .ix-btn::before { transform: scaleY(0); }
  .ix-row:not(.is-open) .ix-thumb { filter: none; opacity: 1; }
}
@media (max-width: 559px) {
  .v3-watch { padding: 4.8rem 0 4rem; }
  .w-nav { display: none; }
  .w-strip { grid-auto-columns: 86vw; gap: 1.2rem; }
  .w-cap { grid-template-columns: minmax(0, 1fr); }
  .w-read { grid-column: 1; grid-row: auto; justify-self: start; margin-top: 1.4rem; }
  .ix-btn { gap: 1.2rem; padding: 1.4rem .4rem; }
  .ix-thumb { width: 4.8rem; height: 4.8rem; }
  .ix-name { font-size: 1.8rem; }
}

/* Pinned index (wide screens, set by stories-v3.js): once "All stories" reaches the top, the section stays put —
   title, filter and the photo do not move — and the page scroll moves only the list of names. When the last name is
   reached, the page carries on. The section is made as tall as the list needs, so wheel, trackpad, keys and the
   scrollbar all work as normal page scrolling. */
.v3-index.is-pinned { padding: 0; }
.is-pinned .ix-pin { position: sticky; top: var(--pin-top, 9rem); height: calc(100vh - var(--pin-top, 9rem)); overflow: hidden; }
.is-pinned .ix-frame { display: flex; flex-direction: column; height: 100%; padding-top: 3.2rem; padding-bottom: 3.2rem; }
.is-pinned .v3-head { flex: none; margin-bottom: 2rem; }
.is-pinned .ix-bar { position: static; flex: none; margin-bottom: 2rem; }
.is-pinned .ix-grid { flex: 1; min-height: 0; align-items: stretch; }
.is-pinned .ix-scroll { position: relative; height: 100%; overflow: hidden; }
/* Soft fades at the top and foot of the names, so the list reads as moving through a window. */
.is-pinned .ix-stage { position: static; display: flex; flex-direction: column; min-height: 0; }
.is-pinned .stage-photo { flex: 1; min-height: 16rem; aspect-ratio: auto; }
.is-pinned .stage-body { flex: none; padding-top: 1.8rem; }
.is-pinned .stage-body blockquote { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 1.2rem; font-size: 1.7rem; }
.is-pinned .stage-body .pills { margin-bottom: 1.2rem; }
.is-pinned .stage-body .v2-more { margin-top: 1.4rem; }
@media (max-height: 760px) {
  .is-pinned .v3-head p { display: none; }
  .is-pinned .ix-frame { padding-top: 2rem; padding-bottom: 2rem; }
}

/* Soft edges where the ix box cuts the content: a mask on the box itself (it stays put while the content
   moves), not overlays inside it, which scrolled along and showed as a white band across the photos. */
.is-pinned .ix-scroll.has-above { -webkit-mask-image: linear-gradient(transparent, #000 3.2rem); mask-image: linear-gradient(transparent, #000 3.2rem); }
.is-pinned .ix-scroll.has-below { -webkit-mask-image: linear-gradient(#000 calc(100% - 3.2rem), transparent); mask-image: linear-gradient(#000 calc(100% - 3.2rem), transparent); }
.is-pinned .ix-scroll.has-above.has-below { -webkit-mask-image: linear-gradient(transparent, #000 3.2rem, #000 calc(100% - 3.2rem), transparent); mask-image: linear-gradient(transparent, #000 3.2rem, #000 calc(100% - 3.2rem), transparent); }
