/* Success Stories v2: same title band and story window as v1 (stories.css), with an interactive body:
   video spotlight, staggered "up close" row, quotes band, and a mixed grid with filter and search. */
/* Loaded after the sheets before it; the build links each one with a version stamp (no @import). */

.stories-v2 { --blue: #2a5bd7; --line: #e3e6ee; --ease: cubic-bezier(.16, 1, .3, 1); }
.stories-v2 h2, .stories-v2 h3, .stories-v2 p, .stories-v2 blockquote, .stories-v2 figure { margin: 0; }
.stories-v2 a { color: inherit; text-decoration: none; }
.stories-v2 img { display: block; max-width: 100%; }

.v2-eyebrow { font-size: 1.3rem; font-weight: 700; letter-spacing: .02em; color: var(--red); }
.v2-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 1rem 4rem; margin-bottom: 4rem; }
.v2-head h2 { font-size: clamp(3rem, 3.4vw, 4.4rem); line-height: 1.15; font-weight: 700; color: var(--navy); }
.v2-head p { max-width: 46rem; font-size: 1.7rem; line-height: 1.55; color: var(--ink-2); }

/* The read link: a quiet pill with the arrow chip, the same family as the card link of v1. */
.v2-more { display: inline-flex; align-items: center; gap: .8rem; height: 4rem; margin-top: 2.4rem; padding-inline: 1.8rem .6rem; border-radius: 99rem; background: var(--navy); font-size: 1.4rem; font-weight: 700; color: #fff !important; transition: background .2s; }
.v2-more span { display: grid; place-items: center; width: 2.8rem; height: 2.8rem; border-radius: 50%; background: #fff; color: var(--navy); transition: transform .3s var(--ease); }
.v2-more svg { width: 1.2rem; height: .9rem; }
.rtl .v2-more svg, .rtl .feat-go svg { transform: scaleX(-1); }
.v2-more:hover { background: var(--red); }
.v2-more:hover span { transform: translateX(.3rem); }
.rtl .v2-more:hover span { transform: translateX(-.3rem); }
.stories-v2 a:focus-visible, .stories-v2 button:focus-visible, .stories-v2 input:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }

/* Shared play button. */
.play-dot { position: absolute; top: 50%; left: 50%; display: grid; place-items: center; width: 8.8rem; height: 8.8rem; margin: -4.4rem 0 0 -4.4rem; border-radius: 50%; background: var(--red); color: #fff; box-shadow: 0 0 0 0 rgba(239, 67, 77, .45); transition: transform .4s var(--ease); animation: play-pulse 2.6s ease-out infinite; }
.play-dot svg { width: 3.2rem; height: 3.2rem; margin-inline-start: .3rem; }
.play-dot.small { top: auto; left: auto; bottom: 1.2rem; inset-inline-end: 1.2rem; width: 4.4rem; height: 4.4rem; margin: 0; animation: none; }
.play-dot.small svg { width: 1.8rem; height: 1.8rem; }
@keyframes play-pulse { 70% { box-shadow: 0 0 0 1.8rem rgba(239, 67, 77, 0); } 100% { box-shadow: 0 0 0 0 rgba(239, 67, 77, 0); } }

/* Video stories: their own film plays silently behind the photo (bg-video.js), sized to cover like the photo. */
.bgv { position: absolute; inset: 0; overflow: hidden; container-type: size; opacity: 0; transition: opacity .25s ease; pointer-events: none; }
.bgv.is-on { opacity: 1; transition-duration: 1s; }
.bgv iframe { position: absolute; top: 50%; left: 50%; width: max(100cqw, 177.78cqh); height: max(100cqh, 56.25cqw); border: 0; transform: translate(-50%, -50%) scale(1.4); }
/* Small players show YouTube's title bar bigger in proportion, so they are cropped harder. */
.s-photo .bgv iframe, .ix-thumb ~ .bgv iframe { transform: translate(-50%, -50%) scale(1.6); }
.bgv video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bgv::after { content: ""; position: absolute; inset: 0; background: rgba(27, 24, 51, .12); }
.play-dot { z-index: 1; }

/* 1. Spotlight: the video story, with its card riding over the edge of the film. */
.v2-spot { padding: 8rem 0 4rem; }
.spot-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: center; }
.spot-media { grid-column: 1 / 9; grid-row: 1; position: relative; overflow: hidden; border-radius: 2.4rem; aspect-ratio: 16 / 10; background: var(--navy); }
.spot-play { position: absolute; inset: 0; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; }
.spot-play img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; transition: transform .8s var(--ease), filter .4s; }
.spot-play:hover img { transform: scale(1.03); filter: brightness(.88); }
.spot-play:hover .play-dot { transform: scale(1.08); }
.spot-media iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.spot-card { grid-column: 8 / 13; grid-row: 1; z-index: 1; padding: 4rem 3.6rem; border-radius: 2.4rem; background: #fff; box-shadow: 0 2.4rem 6rem rgba(27, 24, 51, .14); }
.spot-card blockquote { margin: 1.6rem 0 2.4rem; font-size: 2.2rem; line-height: 1.5; font-weight: 500; color: var(--navy); text-wrap: pretty; }
.spot-card h2 { font-size: 2rem; font-weight: 700; color: var(--navy); }
.spot-role { margin-top: .4rem !important; font-size: 1.5rem; color: var(--ink-2); }
.v2-spot.is-playing .spot-card { pointer-events: auto; }

/* 2. Up close: three longer stories, staggered, photo first. */
.v2-feat { padding: 8rem 0; }
.feat-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3.2rem; align-items: start; }
.feat:nth-child(2) { margin-top: 8rem; }
.feat-link { display: block; }
.feat-photo { position: relative; overflow: hidden; margin-bottom: 2.4rem; border-radius: 2.4rem; background: var(--soft); }
.feat-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 30%; transition: transform .8s var(--ease); }
.feat-go { position: absolute; bottom: 1.6rem; inset-inline-end: 1.6rem; display: grid; place-items: center; width: 5.2rem; height: 5.2rem; border-radius: 50%; background: #fff; color: var(--navy); opacity: 0; transform: translateY(1rem) scale(.9); transition: opacity .3s, transform .4s var(--ease); }
.feat-go svg { width: 1.6rem; height: 1.2rem; }
.feat-link:hover .feat-photo img { transform: scale(1.04); }
.feat-link:hover .feat-go, .feat-link:focus-visible .feat-go { opacity: 1; transform: none; }
.feat h3 { margin: .8rem 0 .4rem; font-size: 2.6rem; line-height: 1.25; font-weight: 700; color: var(--navy); }
.feat-role { font-size: 1.5rem; line-height: 1.45; color: var(--ink-2); }
.feat-text { margin-top: 1.6rem !important; padding-top: 1.6rem; border-top: 1px solid var(--line); font-size: 1.6rem; line-height: 1.65; color: var(--navy); }

/* 3. In their words: one quote at a time, faces to switch, a ring that fills while it waits. */
.v2-voices { padding: 9rem 0; background: var(--navy); color: #fff; }
.voices-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 2rem 4rem; }
.voices-grid h2 { grid-row: 1 / 3; font-size: clamp(3rem, 3.4vw, 4.4rem); line-height: 1.15; font-weight: 700; color: #fff; }
.voices-stage { display: grid; min-height: 30rem; }
.voice { grid-area: 1 / 1; }
.voice:not([hidden]) { animation: voice-in .6s var(--ease); }
@keyframes voice-in { from { opacity: 0; transform: translateY(1.2rem); } }
.voice-mark svg { width: 4rem; height: 3rem; color: var(--red); }
.voice blockquote { margin: 2rem 0 2.8rem; font-size: clamp(2.2rem, 2.4vw, 3.2rem); line-height: 1.45; font-weight: 500; color: #fff; text-wrap: pretty; }
.voice figcaption strong { display: block; font-size: 1.8rem; font-weight: 700; }
.voice figcaption span { display: block; margin-top: .4rem; font-size: 1.5rem; color: #b9c3dc; }
.voice .v2-more { background: rgba(255, 255, 255, .12); }
.voice .v2-more:hover { background: var(--red); }
.voices-thumbs { grid-column: 2; display: flex; flex-wrap: wrap; gap: 1.2rem; margin: 2rem 0 0; padding: 2.8rem 0 0; border-top: 1px solid rgba(255, 255, 255, .16); list-style: none; }
.voices-thumbs li { margin: 0; padding: 0; }
.voices-thumbs li::before { content: none; }
.voices-thumbs button { position: relative; display: block; width: 6.4rem; height: 6.4rem; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.voices-thumbs img { width: 100%; height: 100%; padding: .5rem; border-radius: 50%; object-fit: cover; opacity: .55; filter: grayscale(1); transition: opacity .3s, filter .3s; }
.voices-thumbs button:hover img, .voices-thumbs [aria-selected="true"] img { opacity: 1; filter: none; }
.voices-thumbs .ring { position: absolute; inset: 0; transform: rotate(-90deg); }
.voices-thumbs .ring circle { fill: none; stroke: var(--red); stroke-width: 2.5; stroke-dasharray: 192; stroke-dashoffset: 192; }
.voices-thumbs [aria-selected="true"] .ring circle { stroke-dashoffset: 0; }
.v2-voices.is-auto [aria-selected="true"] .ring circle { animation: ring 8s linear forwards; }
.v2-voices.is-paused [aria-selected="true"] .ring circle { animation-play-state: paused; }
@keyframes ring { from { stroke-dashoffset: 192; } to { stroke-dashoffset: 0; } }

/* 4. Browse: a mixed grid. Most cards are photo cards; every so often a wide card carries a quote. */
.v2-browse { padding: 9rem 0 10rem; }
.v2-browse .v2-head { margin-bottom: 2.8rem; }
.browse-bar { position: sticky; z-index: 5; top: 9rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.2rem; 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); }
.browse-bar .cards-filter { margin: 0; }
.browse-search { display: flex; align-items: center; gap: 1rem; flex: 0 1 34rem; height: 4.4rem; padding-inline: 1.8rem; border-radius: 99rem; background: var(--soft); color: var(--ink-2); }
.browse-search svg { flex: none; width: 1.8rem; height: 1.8rem; }
.browse-search input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; background: none; font: inherit; font-size: 1.5rem; color: var(--navy); }
.browse-search input:focus { outline: none; }
.browse-search:focus-within { box-shadow: 0 0 0 2px var(--navy); }
.browse-count { margin: 2.4rem 0 1.6rem !important; font-size: 1.4rem; color: var(--ink-2); }
.browse-count strong { color: var(--navy); font-variant-numeric: tabular-nums; }
.browse-empty { padding: 6rem 0; font-size: 1.8rem; text-align: center; color: var(--ink-2); }

.s-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-flow: dense; gap: 3.2rem 2rem; }
.s-card[hidden] { display: none; }
.s-link { display: flex; flex-direction: column; height: 100%; }
.s-photo { position: relative; overflow: hidden; border-radius: 2rem; background: var(--soft); }
.s-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 30%; transition: transform .7s var(--ease); }
.s-link:hover .s-photo img { transform: scale(1.04); }
.s-body { padding: 1.6rem .4rem 0; }
.s-card h3 { margin: .6rem 0 .4rem; font-size: 2rem; line-height: 1.3; font-weight: 700; color: var(--navy); transition: color .2s; }
.s-link:hover h3 { color: var(--red); }
.s-role { font-size: 1.4rem; line-height: 1.45; color: var(--ink-2); }

/* Wide card: the photo on one side, their words on a soft panel on the other. */
.s-card.is-wide { grid-column: span 2; }
.is-wide .s-link { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); overflow: hidden; border-radius: 2rem; background: var(--soft); }
.is-wide .s-photo { border-radius: 0; }
.is-wide .s-photo img { height: 100%; aspect-ratio: auto; min-height: 30rem; }
.is-wide .s-body { display: flex; flex-direction: column; padding: 2.8rem 2.8rem 3rem; }
.is-wide blockquote { flex: 1; margin-bottom: 2.4rem; font-size: 1.8rem; line-height: 1.55; font-weight: 500; color: var(--navy); }
.q-mark { display: block; margin-bottom: 1.2rem; }
.q-mark svg { width: 2.8rem; height: 2.1rem; color: var(--red); }

/* Reveal on scroll, only when the script is running. */
.js-reveal .v2-reveal, .js-reveal .feat, .js-reveal .s-card { opacity: 0; transform: translateY(2.4rem); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js-reveal .is-in { opacity: 1 !important; transform: none !important; }
.feat:nth-child(2) { transition-delay: .1s; }
.feat:nth-child(3) { transition-delay: .2s; }

::view-transition-group(*) { animation-duration: .45s; animation-timing-function: cubic-bezier(.16, 1, .3, 1); }

@media (prefers-reduced-motion: reduce) {
  .js-reveal .v2-reveal, .js-reveal .feat, .js-reveal .s-card { opacity: 1; transform: none; transition: none; }
  .play-dot { animation: none; }
  .voice:not([hidden]) { animation: none; }
  .spot-play img, .feat-photo img, .s-photo img { transition: none; }
}

@media (max-width: 1099px) {
  .spot-media { grid-column: 1 / 10; }
  .spot-card { grid-column: 7 / 13; padding: 3.2rem 2.8rem; }
  .spot-card blockquote { font-size: 1.9rem; }
  .s-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .voices-grid { grid-template-columns: minmax(0, 1fr); }
  .voices-grid h2 { grid-row: auto; }
  .voices-thumbs { grid-column: 1; }
}
@media (max-width: 799px) {
  .spot-grid { display: block; }
  .spot-card { margin: -6rem 1.6rem 0; position: relative; }
  .feat-row { grid-template-columns: minmax(0, 1fr); gap: 4.8rem; }
  .feat:nth-child(2) { margin-top: 0; }
  .feat-photo img { aspect-ratio: 4 / 3; }
  .s-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .browse-bar { border-radius: 2.4rem; top: 7rem; }
  .browse-search { flex: 1 1 100%; }
}
@media (max-width: 559px) {
  .v2-spot { padding-top: 4rem; }
  .spot-card { margin: -4rem .8rem 0; padding: 2.4rem 2rem; }
  .spot-card blockquote { font-size: 1.8rem; }
  .play-dot { width: 6.4rem; height: 6.4rem; margin: -3.2rem 0 0 -3.2rem; }
  .v2-feat, .v2-voices { padding: 6rem 0; }
  .v2-browse { padding: 6rem 0 7rem; }
  .s-grid { grid-template-columns: minmax(0, 1fr); }
  .s-card.is-wide { grid-column: auto; }
  .is-wide .s-link { grid-template-columns: minmax(0, 1fr); }
  .is-wide .s-photo img { min-height: 0; aspect-ratio: 4 / 3; }
  .is-wide .s-body { padding: 2rem; }
  .voices-stage { min-height: 36rem; }
  .voices-thumbs { gap: .8rem; }
  .voices-thumbs button { width: 4.8rem; height: 4.8rem; }
}
.feat-photo .play-dot.small { top: 1.6rem; bottom: auto; inset-inline-end: 1.6rem; }

/* The option switch: ".stories-v2 a { color: inherit }" above turned the other number navy on navy. */
.stories-v2 .cards-switch a { color: #fff; }
.stories-v2 .cards-switch a[aria-current="page"] { color: var(--navy); }

/* The theme's .wrapper has overflow:hidden, which stops anything sticky inside it (the filter bar here, the pinned
   index in option 2). overflow:clip still cuts what spills sideways but leaves sticky working. */
.wrapper:has(.stories-v2) { overflow: clip; }

/* Pinned browse (wide screens, set by stories-v2.js): title, filter and count stay put; the page scroll moves only the cards. */
.v2-browse.is-pinned { padding: 0; }
.is-pinned .br-pin { position: sticky; top: var(--pin-top, 9rem); height: calc(100vh - var(--pin-top, 9rem)); overflow: hidden; }
.is-pinned .br-frame { display: flex; flex-direction: column; height: 100%; padding-top: 3.2rem; padding-bottom: 2.4rem; }
.is-pinned .v2-head { flex: none; margin-bottom: 2rem; }
.is-pinned .browse-bar { position: static; flex: none; }
.is-pinned .browse-count { flex: none; margin: 1.6rem 0 1.2rem !important; }
.is-pinned .br-scroll { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.is-pinned .s-grid { padding-bottom: 2.4rem; }
@media (max-height: 760px) { .is-pinned .br-frame { padding-top: 2rem; } .is-pinned .v2-head { margin-bottom: 1.2rem; } }

/* No fade at the edges of the cards box: photos are cut clean (user, 2026-12-02). */

/* The "Stories: 46" line is removed (user, 2026-12-02); the bar keeps the space above the cards. */
.stories-v2 .browse-bar, .stories-v2 .is-pinned .browse-bar { margin-bottom: 2.4rem; }

/* In their words: the speaker's big photo under the title, crossfading with each quote (user, 2026-12-03). */
.voices-side { grid-row: 1 / 3; }
.voices-grid .voices-side h2 { grid-row: auto; }
.voices-portraits { position: relative; margin-top: 3.2rem; overflow: hidden; border-radius: 2.4rem; aspect-ratio: 4 / 5; background: rgba(255, 255, 255, .06); }
.voices-portrait { position: absolute; inset: 0; opacity: 0; transition: opacity .7s ease; }
.voices-portrait.is-on { opacity: 1; }
.voices-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%; transform: scale(1.04); transition: transform 8s linear; }
.voices-portrait.is-on img { transform: none; }
@media (prefers-reduced-motion: reduce) { .voices-portrait, .voices-portrait img { transition: none; } }
@media (max-width: 1099px) {
  .voices-side { grid-row: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 2.4rem; }
  .voices-portraits { flex: 0 0 18rem; margin-top: 0; }
}
@media (max-width: 559px) { .voices-portraits { flex-basis: 12rem; border-radius: 1.6rem; } }
