/* Success Stories, option 3: "Now showing" video screen + "Faces of success" wall. Uses the shared parts of options 1 and 2. */

/* 1. Now showing: one wide screen; each video story plays full size behind the person's own words. */
.v4-show { padding: 7rem 0 4rem; }
.sh-screen { position: relative; overflow: hidden; border-radius: 2.8rem; aspect-ratio: 16 / 7; min-height: 46rem; background: var(--navy); isolation: isolate; }
.sh-slide { position: absolute; inset: 0; display: block; opacity: 0; transition: opacity .9s ease; }
.sh-slide[hidden] { display: block; visibility: hidden; }
.sh-slide.is-on { opacity: 1; visibility: visible; }
.sh-photo, .sh-clip { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sh-photo { object-position: 50% 25%; transform: scale(1.04); transition: transform 9s linear; }
.sh-slide.is-on .sh-photo { transform: none; }
.sh-clip { opacity: 0; transition: opacity .8s ease; }
.sh-clip.is-playing { opacity: 1; }
/* Shade from the reading side, so the words sit on calm dark and the film shows on the other side. */
.sh-shade { position: absolute; inset: 0; background: linear-gradient(to left, rgba(27, 24, 51, .88) 0%, rgba(27, 24, 51, .62) 38%, rgba(27, 24, 51, .08) 72%), linear-gradient(rgba(27, 24, 51, 0) 60%, rgba(27, 24, 51, .35)); }
body:not(.rtl) .sh-shade { background: linear-gradient(to right, rgba(27, 24, 51, .88) 0%, rgba(27, 24, 51, .62) 38%, rgba(27, 24, 51, .08) 72%), linear-gradient(rgba(27, 24, 51, 0) 60%, rgba(27, 24, 51, .35)); }
.sh-text { position: absolute; z-index: 1; inset-block: 0; inset-inline-start: 0; display: flex; flex-direction: column; justify-content: center; width: min(54rem, 52%); padding: 5.6rem; color: #fff; }
.sh-slide.is-on .sh-text > * { animation: sh-up .9s var(--ease) both; }
.sh-slide.is-on .sh-text > :nth-child(2) { animation-delay: .08s; }
.sh-slide.is-on .sh-text > :nth-child(3) { animation-delay: .16s; }
.sh-slide.is-on .sh-text > :nth-child(4) { animation-delay: .2s; }
.sh-slide.is-on .sh-text > :nth-child(5) { animation-delay: .26s; }
@keyframes sh-up { from { opacity: 0; transform: translateY(1.6rem); } }
.sh-text .pills { margin-bottom: 2.4rem; }
.sh-text .pills li { background: rgba(255, 255, 255, .14); color: #fff; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.sh-text blockquote { margin: 0 0 2.6rem; font-size: clamp(2.2rem, 2.2vw, 3rem); line-height: 1.45; font-weight: 500; color: #fff; text-wrap: pretty; }
.sh-name { font-size: 1.9rem; font-weight: 700; }
.sh-role { margin-top: .4rem !important; font-size: 1.5rem; color: #c9d2e8; }
.sh-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.8rem; }
.sh-btn { display: inline-flex; align-items: center; gap: .9rem; height: 4.4rem; padding-inline: 1.6rem 1.8rem; border-radius: 99rem; background: rgba(255, 255, 255, .14); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); font-size: 1.4rem; font-weight: 700; color: #fff !important; transition: background .2s, color .2s; }
.sh-btn > span { display: grid; place-items: center; width: 2.8rem; height: 2.8rem; border-radius: 50%; background: var(--red); color: #fff; }
.sh-btn svg { width: 1.2rem; height: 1.2rem; }
.sh-btn.is-main { padding-inline: 1.8rem .6rem; background: #fff; color: var(--navy) !important; }
.sh-btn.is-main > span { background: var(--navy); }
.sh-btn.is-main svg { width: 1.2rem; height: .9rem; }
.rtl .sh-btn.is-main svg { transform: scaleX(-1); }
.sh-btn:hover { background: var(--red); color: #fff !important; }
.sh-btn.is-main:hover > span { background: var(--red); }

/* The names under the screen: each fills while its story plays. */
.sh-tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1.6rem; margin: 2rem 0 0; padding: 0; list-style: none; }
.sh-tabs li { margin: 0; padding: 0; }
.sh-tabs li::before { content: none; }
.sh-tabs button { display: block; width: 100%; padding: 0 0 .4rem; border: 0; background: none; font: inherit; text-align: start; color: var(--ink-2); cursor: pointer; }
.sh-bar { display: block; height: 3px; overflow: hidden; border-radius: 2px; background: var(--line); }
.sh-bar span { display: block; width: 100%; height: 100%; background: var(--red); transform: scaleX(0); transform-origin: right; }
body:not(.rtl) .sh-bar span { transform-origin: left; }
.sh-tab-name { display: block; margin-top: 1rem; overflow: hidden; font-size: 1.5rem; font-weight: 500; white-space: nowrap; text-overflow: ellipsis; transition: color .2s; }
.sh-tabs button:hover .sh-tab-name, .sh-tabs [aria-selected="true"] .sh-tab-name { color: var(--navy); font-weight: 700; }
.sh-tabs [aria-selected="true"] .sh-bar span { transform: scaleX(1); }
.v4-show.is-auto [aria-selected="true"] .sh-bar span { animation: sh-fill var(--sh-time, 9s) linear both; }
.v4-show.is-paused [aria-selected="true"] .sh-bar span { animation-play-state: paused; }
@keyframes sh-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* 2. Faces of success: one wall, three tile sizes. */
.v4-wall { padding: 6rem 0 10rem; }
.wall-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 1rem 1rem 2.4rem; 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); }
.rtl .wall-bar { padding: 1rem 1rem 1rem 2.4rem; }
.wall-bar .cards-filter { margin: 0; }
.wall-count { font-size: 1.5rem; color: var(--ink-2); }
.wall-count strong { color: var(--navy); font-variant-numeric: tabular-nums; }

.wall { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: 17rem; grid-auto-flow: dense; gap: 1.2rem; margin: 0; padding: 0; list-style: none; }
.tile { position: relative; margin: 0; padding: 0; min-width: 0; transition: opacity .5s ease, filter .5s ease, transform .5s var(--ease); }
.tile::before { content: none; }
.tile.is-big { grid-column: span 2; grid-row: span 2; }
.tile.is-quote { grid-column: span 2; }
.t-link { position: relative; display: block; height: 100%; overflow: hidden; border-radius: 1.8rem; background: var(--soft); }
.t-photo { position: absolute; inset: 0; display: block; }
.t-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 28%; transition: transform .8s var(--ease); }
.t-link:hover .t-photo img { transform: scale(1.05); }
.t-photo .play-dot.small { top: 1.2rem; bottom: auto; inset-inline-end: 1.2rem; z-index: 2; }

/* Caption: hidden on small tiles until hover or focus; always on for the big video tiles. */
.t-cap { position: absolute; z-index: 1; inset: auto 0 0; display: flex; flex-direction: column; gap: .2rem; padding: 4.8rem 1.6rem 1.4rem; background: linear-gradient(rgba(27, 24, 51, 0), rgba(27, 24, 51, .86)); color: #fff; opacity: 0; transform: translateY(.8rem); transition: opacity .3s, transform .4s var(--ease); }
.t-link:hover .t-cap, .t-link:focus-visible .t-cap, .tile.is-big .t-cap { opacity: 1; transform: none; }
.t-kind { font-size: 1.15rem; font-weight: 700; color: #ffb3b7; }
.t-name { font-size: 1.6rem; line-height: 1.3; font-weight: 700; }
.t-role { overflow: hidden; font-size: 1.25rem; line-height: 1.4; color: #d5dcef; white-space: nowrap; text-overflow: ellipsis; }
.tile.is-big .t-cap { padding: 8rem 2.4rem 2.2rem; }
.tile.is-big .t-name { font-size: 2.4rem; }
.tile.is-big .t-role { font-size: 1.4rem; }

/* Quote tile: photo on one half, their words on the other. */
.tile.is-quote .t-photo { inset-inline-end: 50%; }
.t-quote { position: absolute; inset-block: 0; inset-inline-end: 0; width: 50%; display: flex; flex-direction: column; padding: 1.8rem 1.8rem 1.6rem; background: var(--navy); color: #fff; }
.t-quote .q-mark svg { width: 2.2rem; height: 1.6rem; }
.t-quote blockquote { margin: 1rem 0 0; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; font-size: 1.35rem; line-height: 1.5; font-weight: 500; color: #fff; }
.tile.is-quote .t-cap { inset-inline-end: 50%; }

/* Filter: the chosen group comes forward, the rest step back, and the wall keeps its shape. */
/* !important: the shared reveal rule (.js-reveal .is-in) also sets opacity with !important. */
.wall.is-filtered .tile:not(.is-match) { opacity: .16 !important; filter: grayscale(1); transform: scale(.97) !important; }
.wall.is-filtered .tile:not(.is-match) .t-link { pointer-events: none; }
.wall.is-filtered .tile.is-match .t-cap { opacity: 1; transform: none; }

/* Reveal on scroll. */
.js-reveal .tile { opacity: 0; transform: translateY(2rem); }
.js-reveal .tile.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .sh-slide, .sh-photo, .sh-clip, .tile, .t-photo img, .t-cap { transition: none; }
  .sh-slide.is-on .sh-text > * { animation: none; }
  .js-reveal .tile { opacity: 1; transform: none; }
}
@media (max-width: 1099px) {
  .wall { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .sh-text { width: 60%; padding: 4rem; }
}
@media (max-width: 799px) {
  .sh-screen { aspect-ratio: auto; min-height: 0; height: 62rem; }
  .sh-shade, body:not(.rtl) .sh-shade { background: linear-gradient(rgba(27, 24, 51, .05) 20%, rgba(27, 24, 51, .7) 52%, rgba(27, 24, 51, .94)); }
  .sh-text { inset: auto 0 0; width: auto; justify-content: flex-end; padding: 2.8rem 2.4rem; }
  .sh-text blockquote { font-size: 2rem; margin-bottom: 1.8rem; }
  .sh-text .pills { margin-bottom: 1.4rem; }
  .sh-actions { margin-top: 2rem; }
  .sh-tabs { display: flex; gap: 1.2rem; overflow-x: auto; scrollbar-width: none; }
  .sh-tabs li { flex: 0 0 13rem; }
  .wall { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 16rem; }
  .wall-bar { border-radius: 2.4rem; top: 7rem; padding: 1rem; }
  .wall-bar .cards-filter { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
  .wall-bar .cards-filter button { white-space: nowrap; }
  .wall-count { display: none; }
  .t-cap { opacity: 1; transform: none; padding: 3.6rem 1.2rem 1.1rem; }
  .t-name { font-size: 1.4rem; }
  .t-role { display: none; }
  .tile.is-quote { grid-row: span 2; }
  .tile.is-quote .t-photo { inset: 0 0 50% 0; }
  .t-quote { inset: 50% 0 0 0; width: auto; padding: 1.4rem; }
  .tile.is-quote .t-cap { inset: auto 0 50% 0; }
  .t-quote blockquote { -webkit-line-clamp: 4; font-size: 1.3rem; }
}
@media (max-width: 559px) {
  .v4-show { padding-top: 4rem; }
  .sh-screen { height: 56rem; border-radius: 2rem; }
  .tile.is-big .t-name { font-size: 1.9rem; }
  .tile.is-big .t-cap { padding: 5rem 1.6rem 1.4rem; }
}

/* Option 4: the screen meets the navy band directly, so it keeps the same space below as above. */
.stories-v5 .v4-show { padding-bottom: 7rem; }

/* Columns choice, 4 / 5 / 6 (user, 2026-12-03). Rows follow the column width, so every tile keeps its shape. */
.v4-wall .container { container-type: inline-size; }
.wall { --cols: 6; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); grid-auto-rows: calc((100cqw - (var(--cols) - 1) * 1.2rem) / var(--cols) * .92); }
.wall-tools { display: flex; align-items: center; gap: 2rem; }
.wall-cols { display: flex; align-items: center; gap: .4rem; padding: .4rem; border-radius: 99rem; background: var(--soft); }
.wall-cols > span { padding-inline: 1rem .4rem; font-size: 1.3rem; color: var(--ink-2); }
.wall-cols button { display: inline-flex; align-items: center; gap: .6rem; height: 3.6rem; padding: 0 1.2rem; border: 0; border-radius: 99rem; background: none; font: inherit; font-size: 1.4rem; font-weight: 500; color: var(--navy); cursor: pointer; font-variant-numeric: tabular-nums; transition: background .2s, color .2s; }
.wall-cols button svg { height: 1.2rem; width: auto; fill: currentColor; opacity: .55; }
.wall-cols button:hover { background: #e3e6ee; }
.wall-cols button[aria-pressed="true"] { background: var(--navy); color: #fff; }
.wall-cols button[aria-pressed="true"] svg { opacity: 1; }
.wall-cols button:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
/* Narrower screens set their own columns, so the choice is only offered where all three fit. */
@media (max-width: 1099px) {
  .wall-cols { display: none; }
  .wall { --cols: 4 !important; }
}
@media (max-width: 799px) { .wall { --cols: 2 !important; grid-auto-rows: 16rem; } }
