/* Client Stories page (/testimonials/) — builds on advisercrm.css */

/* Hero */
.stories-hero { position: relative; overflow: hidden; padding: clamp(72px, 10vw, 128px) 0 clamp(56px, 7vw, 88px); background: radial-gradient(circle at 12% 0%, var(--acr-blue-soft) 0, rgba(233,248,253,0) 42%), radial-gradient(circle at 92% 30%, #eef4fb 0, rgba(238,244,251,0) 40%), #fff; text-align: center; }
.stories-hero .acr-container { max-width: 900px; }
.stories-hero .acr-display { margin-bottom: 22px; }
.stories-hero .acr-lead { max-width: 680px; margin: 0 auto; }
.stories-hero .acr-actions { justify-content: center; margin-top: 34px; }
.stories-hero__trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 28px; margin: 40px 0 0; padding: 0; list-style: none; color: var(--acr-ink); font-size: .95rem; font-weight: 600; }
.stories-hero__trust li { display: inline-flex; align-items: center; gap: 9px; }
.stories-hero__trust li::before { content: ""; width: 20px; height: 20px; border-radius: 50%; background: var(--acr-primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12 4 4 8-8'/%3E%3C/svg%3E") center/12px no-repeat; }

/* Section heading */
.stories-heading { max-width: 700px; margin: 0 auto clamp(40px, 5vw, 56px); text-align: center; }
.stories-heading .acr-title { margin-bottom: 16px; }
.stories-heading p:not(.acr-eyebrow) { color: var(--acr-muted); font-size: 1.08rem; margin: 0; }

/* Video grid */
.story-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 320px)); justify-content: center; gap: clamp(20px, 3vw, 36px); }
.story-card { display: flex; flex-direction: column; gap: 18px; margin: 0; }
.story-video { position: relative; width: 100%; aspect-ratio: 9 / 16; overflow: hidden; border-radius: var(--acr-radius); background: linear-gradient(160deg, var(--acr-navy-soft) 0%, var(--acr-navy) 55%, #002a47 100%); box-shadow: var(--acr-shadow-lg); color: #fff; transition: transform .35s ease, box-shadow .35s ease; }
.story-video__button { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; border-radius: inherit; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.story-video__button:focus-visible { outline: 3px solid var(--acr-primary); outline-offset: -3px; }
.story-video__button:disabled { cursor: default; }
.story-video:hover, .story-video:focus-within { transform: translateY(-6px); box-shadow: 0 36px 90px rgba(0, 55, 92, .24); }
.story-video::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 80% 8%, rgba(0,171,230,.35) 0, rgba(0,171,230,0) 45%), radial-gradient(circle at 10% 100%, rgba(0,171,230,.22) 0, rgba(0,171,230,0) 50%); pointer-events: none; }
.story-video__poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.story-video__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,31,52,0) 45%, rgba(0,31,52,.78) 100%); pointer-events: none; }
.story-video__play { position: absolute; top: 50%; left: 50%; display: grid; place-items: center; width: 78px; height: 78px; border-radius: 50%; background: rgba(255,255,255,.96); box-shadow: 0 16px 40px rgba(0,0,0,.28), 0 0 0 10px rgba(255,255,255,.14); transform: translate(-50%, -50%); transition: transform .3s ease, background .3s ease; }
.story-video__play svg { width: 28px; height: 28px; margin-left: 4px; fill: var(--acr-primary); }
.story-video:hover .story-video__play { transform: translate(-50%, -50%) scale(1.08); }
.story-video__meta { position: absolute; left: 20px; right: 20px; bottom: 20px; display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: left; }
.story-video__label { font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #fff; }
.story-video__duration { padding: 5px 10px; border-radius: 999px; background: rgba(0,0,0,.45); font-size: .8rem; font-weight: 700; backdrop-filter: blur(6px); }
.story-video__soon { position: absolute; top: 20px; left: 20px; padding: 6px 12px; border: 1px solid rgba(255,255,255,.28); border-radius: 999px; background: rgba(255,255,255,.1); font-size: .75rem; font-weight: 700; letter-spacing: .04em; backdrop-filter: blur(6px); }
.story-video--placeholder:hover { transform: none; box-shadow: var(--acr-shadow-lg); }
.story-video--placeholder .story-video__play { background: rgba(255,255,255,.14); box-shadow: 0 0 0 10px rgba(255,255,255,.06); }
.story-video--placeholder .story-video__play svg { fill: #fff; opacity: .85; }
.story-video.is-playing { cursor: default; transform: none; background: #000; }
.story-video.is-playing::before { display: none; }
.story-video video, .story-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; background: #000; }

.story-card__person { display: flex; align-items: center; gap: 14px; padding: 0 4px; }
.story-card__avatar { display: grid; place-items: center; flex: 0 0 auto; width: 46px; height: 46px; border-radius: 50%; background: var(--acr-blue-soft); color: var(--acr-navy); font-weight: 800; font-size: .95rem; overflow: hidden; }
.story-card__avatar img { width: 100%; height: 100%; object-fit: cover; }
.story-card__person strong { display: block; color: var(--acr-navy); font-size: 1.02rem; line-height: 1.3; }
.story-card__person span { display: block; color: var(--acr-muted); font-size: .9rem; line-height: 1.4; }
.story-card__quote { margin: 0; padding: 0 4px; color: var(--acr-ink); font-size: 1rem; line-height: 1.6; }

/* Written feedback */
.feedback-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 3vw, 32px); max-width: 1080px; margin: 0 auto; }
.feedback-card { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 28px; margin: 0; padding: clamp(30px, 4vw, 44px); border: 1px solid var(--acr-line); border-radius: var(--acr-radius-lg); background: #fff; box-shadow: var(--acr-shadow-sm); }
.feedback-card::before { content: "\201C"; position: absolute; top: 18px; right: 30px; color: var(--acr-blue-soft); font-family: Georgia, serif; font-size: 7rem; line-height: 1; pointer-events: none; }
.feedback-card blockquote { position: relative; margin: 0; color: var(--acr-ink); font-size: 1.08rem; line-height: 1.7; }
.feedback-card figcaption { display: flex; align-items: center; gap: 14px; padding-top: 22px; border-top: 1px solid var(--acr-line); }
.feedback-card figcaption strong { display: block; color: var(--acr-navy); }
.feedback-card figcaption span { display: block; color: var(--acr-muted); font-size: .92rem; }

/* Share your story */
.share-story { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 32px; max-width: 1080px; margin: 0 auto; padding: clamp(34px, 5vw, 56px); border-radius: var(--acr-radius-lg); background: linear-gradient(135deg, var(--acr-navy) 0%, var(--acr-navy-soft) 100%); box-shadow: var(--acr-shadow-lg); color: #fff; }
.share-story .acr-eyebrow { color: #9bdff5; }
.share-story h2 { margin: 0 0 12px; color: #fff; font-size: clamp(1.6rem, 3vw, 2.3rem); }
.share-story p:not(.acr-eyebrow) { margin: 0; color: #c7d9e3; max-width: 560px; }

/* Responsive */
@media (max-width: 960px) {
  .feedback-grid { grid-template-columns: 1fr; }
  .share-story { grid-template-columns: 1fr; text-align: left; }
}
@media (max-width: 820px) {
  /* Swipeable row on tablets and phones, like a shorts feed */
  .story-grid { display: flex; justify-content: flex-start; gap: 18px; margin: 0 -20px; padding: 8px 20px 28px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .story-grid::-webkit-scrollbar { display: none; }
  .story-card { flex: 0 0 min(74vw, 300px); scroll-snap-align: center; }
  .stories-swipe-hint { display: block; }
}
.stories-swipe-hint { display: none; margin: 0 0 6px; color: var(--acr-muted); font-size: .88rem; text-align: center; }
@media (prefers-reduced-motion: reduce) {
  .story-video, .story-video__play { transition: none; }
}
.story-card__person .story-card__avatar, .feedback-card figcaption .story-card__avatar { display: grid; }

/* End screen shown when a self-hosted video finishes */
.story-end { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 28px; background: linear-gradient(160deg, rgba(22,75,137,.94) 0%, rgba(0,55,92,.97) 60%, rgba(0,42,71,.98) 100%); color: #fff; text-align: center; animation: storyEndIn .4s ease both; }
.story-end__eyebrow { margin: 0; color: #9bdff5; font-size: .75rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.story-end__title { margin: 0 0 8px; color: #fff; font-size: 1.5rem; font-weight: 800; line-height: 1.2; }
.story-end .acr-button { width: 100%; justify-content: center; }
.story-end__link { color: #fff; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.story-end__link:hover, .story-end__link:visited { color: #fff; }
.story-end__replay { margin-top: 10px; padding: 8px 14px; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; background: transparent; color: #fff; font: inherit; font-size: .88rem; font-weight: 700; cursor: pointer; }
.story-end__replay:hover { background: rgba(255,255,255,.12); }
@keyframes storyEndIn { from { opacity: 0; } to { opacity: 1; } }


/* Phone-style frame around the 9:16 story videos (homepage and Client Stories page) */
.story-video { border: 10px solid #0e1a24; border-radius: 40px; box-shadow: 0 0 0 2px #3a4b58, 0 30px 70px rgba(0, 55, 92, .22); }
.story-video:hover, .story-video:focus-within { box-shadow: 0 0 0 2px #3a4b58, 0 38px 90px rgba(0, 55, 92, .28); }
.story-video--placeholder:hover { box-shadow: 0 0 0 2px #3a4b58, 0 30px 70px rgba(0, 55, 92, .22); }
.story-video::after { content: ""; position: absolute; top: 7px; left: 50%; z-index: 3; width: 24%; max-width: 76px; height: 16px; border-radius: 999px; background: #0e1a24; transform: translateX(-50%); pointer-events: none; }
.story-video__button, .story-video video, .story-video iframe { border-radius: 30px; }
.story-video__soon { top: 38px; }

/* ===== Homepage "Who else is using it?" — split layout with fanned phones on a stage ===== */
.home-stories { padding-top: clamp(32px, 4vw, 56px); overflow: hidden; }
.home-stories__layout { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.home-stories__copy .acr-title { margin-bottom: 16px; font-size: clamp(1.9rem, 3.2vw, 2.7rem); }
.home-stories__lead { margin: 0 0 26px; color: var(--acr-muted); font-size: 1.06rem; }
.home-stories__trusted { margin: 0 0 30px; padding: 18px 0; border-block: 1px solid var(--acr-line); display: flex; flex-wrap: wrap; gap: 8px 10px; }
.home-stories__trusted span { flex-basis: 100%; margin-bottom: 4px; color: var(--acr-navy-soft); font-size: .74rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.home-stories__trusted strong { padding: 6px 12px; border-radius: 999px; background: var(--acr-blue-soft); color: var(--acr-navy); font-size: .86rem; font-weight: 700; }
.home-stories__quote { margin: 0 0 22px; padding-left: 18px; border-left: 3px solid var(--acr-primary); }
.home-stories__quote blockquote { margin: 0 0 8px; color: var(--acr-navy); font-size: 1.08rem; line-height: 1.55; }
.home-stories__quote figcaption { color: var(--acr-muted); font-size: .9rem; }
.home-stories__quote figcaption strong { color: var(--acr-navy); }
.home-stories__more { margin: 0; }

/* The "stage": a soft brand panel the phones stand on */
.home-stories__stage { position: relative; padding: 10px 0 30px; }
.home-stories__stage::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 64%; border-radius: 36px; background: radial-gradient(circle at 80% 0%, rgba(0,171,230,.22) 0, rgba(0,171,230,0) 55%), linear-gradient(150deg, #e9f8fd 0%, #d3ecf8 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,.8); }
.home-stories__stage::after { content: ""; position: absolute; left: 8%; right: 8%; bottom: 22px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, rgba(0,171,230,0), rgba(0,171,230,.35), rgba(0,171,230,0)); }
.home-stories .story-card__quote { display: none; }

@media (min-width: 981px) {
  .home-stories .story-grid { position: relative; z-index: 1; display: flex; justify-content: center; align-items: flex-end; gap: 0; padding: 0 0 40px; }
  .home-stories .story-card { flex: 0 0 auto; width: 210px; gap: 14px; }
  .home-stories .story-card:nth-child(2) { z-index: 2; width: 245px; margin-inline: -34px; }
  .home-stories .story-card:nth-child(1) { rotate: -7deg; translate: 0 26px; }
  .home-stories .story-card:nth-child(3) { rotate: 7deg; translate: 0 26px; }
  .home-stories .story-card:nth-child(1) .story-card__person, .home-stories .story-card:nth-child(3) .story-card__person { opacity: .85; }
  .home-stories .story-card__person { justify-content: center; text-align: left; padding: 8px 10px; border-radius: 14px; background: rgba(255,255,255,.88); box-shadow: 0 8px 20px rgba(0,55,92,.08); }
  .home-stories .story-card__person span { font-size: .8rem; }
  .home-stories .story-card__person strong { font-size: .92rem; }
  .home-stories .story-card__avatar { width: 36px; height: 36px; }
  .home-stories .story-video { border-width: 8px; border-radius: 34px; }
  .home-stories .story-video__button, .home-stories .story-video video, .home-stories .story-video iframe { border-radius: 26px; }
  .home-stories .story-card:hover { z-index: 3; }
}
@media (max-width: 980px) {
  .home-stories__layout { grid-template-columns: 1fr; }
  .home-stories__copy { max-width: 640px; }
  .home-stories__stage::before { height: 55%; }
  .home-stories .story-grid { position: relative; z-index: 1; }
}
@media (min-width: 821px) and (max-width: 980px) {
  .home-stories .story-grid { grid-template-columns: repeat(3, minmax(0, 220px)); }
}
/* Fan refinements: names are on each video's title card, so hide captions in the fan; tighten the gap above */
#why { padding-bottom: clamp(40px, 5vw, 64px); }
@media (min-width: 981px) {
  .home-stories .story-card figcaption { display: none; }
  .home-stories .story-grid { padding-bottom: 28px; }
  .home-stories .story-card:nth-child(1), .home-stories .story-card:nth-child(3) { width: 215px; translate: 0 22px; }
  .home-stories .story-video__label { font-size: .64rem; letter-spacing: .1em; }
  .home-stories .story-card:nth-child(1) .story-video__label, .home-stories .story-card:nth-child(3) .story-video__label { display: none; }
  .home-stories .story-video__meta { left: 14px; right: 14px; bottom: 14px; }
  .home-stories__stage { padding-bottom: 18px; }
  .home-stories__stage::before { height: 58%; }
}
.home-stories { padding-top: clamp(24px, 3vw, 40px); }
@media (min-width: 981px) { .home-stories .story-card:nth-child(3) .story-video__meta { justify-content: flex-end; } }
@media (max-width: 980px) {
  .home-stories__layout { grid-template-columns: minmax(0, 1fr); }
  .home-stories__copy, .home-stories__stage { min-width: 0; }
}
@media (min-width: 821px) and (max-width: 980px) { .home-stories .story-video__label { display: none; } .home-stories .story-video__meta { justify-content: flex-end; } }

/* v2: stacked "deck" instead of a fan — side phones sit slightly behind; hover/focus lifts a phone and brings it to the front */
@media (min-width: 981px) {
  .home-stories .story-card { transition: translate .35s cubic-bezier(.2,.8,.2,1), scale .35s cubic-bezier(.2,.8,.2,1), filter .35s ease, z-index 0s .1s; cursor: pointer; }
  .home-stories .story-card:nth-child(1), .home-stories .story-card:nth-child(3) { rotate: 0deg; scale: .88; translate: 0 18px; filter: brightness(.94) saturate(.92); z-index: 1; }
  .home-stories .story-card:nth-child(1) { margin-right: -46px; }
  .home-stories .story-card:nth-child(3) { margin-left: -46px; }
  .home-stories .story-card:nth-child(2) { z-index: 2; margin-inline: 0; }
  /* Lift on hover / keyboard focus — every phone, front or back */
  .home-stories .story-card:hover, .home-stories .story-card:focus-within, .home-stories .story-card:has(.is-playing) { z-index: 5; scale: 1.04; translate: 0 -16px; filter: none; transition-delay: 0s; }
  .home-stories .story-card:hover .story-video, .home-stories .story-card:focus-within .story-video { transform: none; box-shadow: 0 0 0 2px #3a4b58, 0 44px 90px rgba(0,55,92,.32); }
  .home-stories .story-card:hover .story-video__play { transform: translate(-50%, -50%) scale(1.12); }
  /* When one phone is lifted, the front phone steps back a little */
  .home-stories .story-grid:has(.story-card:not(:nth-child(2)):hover) .story-card:nth-child(2) { scale: .94; filter: brightness(.96); }
  /* Side phones show their play label once brought forward */
  .home-stories .story-card:nth-child(1):hover .story-video__label, .home-stories .story-card:nth-child(3):hover .story-video__label { display: inline; }
}
@media (prefers-reduced-motion: reduce) { .home-stories .story-card { transition: none; } }

/* Homepage stories: same light-blue background and faint grid as the mobile app section */
.home-stories { position: relative; overflow: hidden; background: radial-gradient(circle at 12% 18%, rgba(0,171,230,.12), transparent 30%), radial-gradient(circle at 88% 78%, rgba(34,53,90,.10), transparent 32%), linear-gradient(180deg, #f7fafc 0%, #eef4f7 100%); padding-top: clamp(48px, 6vw, 80px); }
.home-stories::before { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(rgba(0,55,92,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(0,55,92,.035) 1px, transparent 1px); background-size: 38px 38px; mask-image: linear-gradient(to bottom, transparent, #000 16%, #000 84%, transparent); -webkit-mask-image: linear-gradient(to bottom, transparent, #000 16%, #000 84%, transparent); }
.home-stories > .acr-container { position: relative; z-index: 1; }
.home-stories__trusted strong { background: #fff; box-shadow: 0 2px 8px rgba(0,55,92,.06); }
/* Flat, even light-blue background for the whole stories section (with the same faint grid) */
.home-stories { background: #eef4f8; }

/* Smaller play button with a "Click to Play Me!" label underneath */
.story-video__play { width: 56px; height: 56px; box-shadow: 0 12px 30px rgba(0,0,0,.28), 0 0 0 7px rgba(255,255,255,.16); }
.story-video__play svg { width: 20px; height: 20px; margin-left: 3px; }
.story-video__play::after { content: "Click to Play Me!"; position: absolute; top: calc(100% + 12px); left: 50%; transform: translateX(-50%); padding: 6px 12px; border-radius: 999px; background: rgba(0, 31, 52, .72); color: #fff; font-size: .78rem; font-weight: 800; letter-spacing: .02em; white-space: nowrap; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); pointer-events: none; }
@media (hover: none) { .story-video__play::after { content: "Tap to Play Me!"; } }
.story-video--placeholder .story-video__play::after { content: none; }
.story-video:hover .story-video__play::after, .story-video:focus-within .story-video__play::after { background: var(--acr-primary); }
.feedback-grid--single { grid-template-columns: minmax(0, 1fr); max-width: 760px; }
