/* ==========================================================================
   Option 1 · Stories
   Dark, photo-led documentary. Tap-through story slider, count-up proof,
   swipeable initiative cards, orange van finder.
   Loads after base.css and components.css.
   ========================================================================== */

/* === Theme (colours used by the shared components) ===================== */
.theme-stories {
  --page-bg: #121212;
  --page-fg: #D9D9D9;
  --heading: #FFFFFF;
  --muted-fg: #A8A8A8;
  --surface: #1C1C1C;
  --surface-line: #2C2C2C;
  --link: var(--orange-soft);
  --chip-on-bg: #FFFFFF;
  --chip-on-fg: #171717;
  --chip-off-bg: transparent;
  --chip-off-fg: #FFFFFF;
  --chip-line: #4A4A4A;
  --header-bg: #121212;
  --frame-radius: var(--radius-m);
}
.theme-stories .site-header { border-bottom: 1px solid #262626; }
.theme-stories .section + .section { border-top: 1px solid #222; }

.btn--ghost { background: transparent; color: #FFFFFF; box-shadow: inset 0 0 0 2px rgba(255,255,255,.85); }

/* === Hero: stories ======================================================= */
.story {
  position: relative; overflow: hidden; color: #FFFFFF;
  height: calc(100svh - var(--demo-bar) - 64px); min-height: 580px; max-height: 860px;
}
.story__slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 500ms var(--ease-out), visibility 0s linear 500ms; }
.story__slide.is-active { opacity: 1; visibility: visible; transition: opacity 500ms var(--ease-out); }
.story__media { position: absolute; inset: 0; }
.story__media .photo { filter: brightness(.62) saturate(.9); }
/* Readability: even dark wash + strong bottom gradient under the text */
.story__media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(18,18,18,.55) 0%, rgba(18,18,18,.1) 26%, rgba(18,18,18,.62) 58%, rgba(18,18,18,.96) 100%);
}
.story__content { position: absolute; left: 0; right: 0; bottom: 0; padding-bottom: 32px; z-index: 3; display: flex; flex-direction: column; gap: 14px; }
.story__kicker { color: var(--orange-soft); font-size: 20px; }
.story__title { font-size: clamp(34px, 8.6vw, 68px); max-width: 15ch; }
.story__body { color: #EDEDED; max-width: 58ch; }
.story__body--long { display: none; }
.story__ctas { display: grid; gap: 10px; padding-top: 6px; }
/* Motion: the incoming story's text rises in after the photo fades (state change) */
@media (prefers-reduced-motion: no-preference) {
  .story__slide.is-active .story__media .photo { animation: settle 1.2s var(--ease-out) both; }
  .story__slide.is-active .story__content > * { animation: rise 600ms var(--ease-out) both; }
  .story__slide.is-active .story__content > :nth-child(2) { animation-delay: 60ms; }
  .story__slide.is-active .story__content > :nth-child(3),
  .story__slide.is-active .story__content > :nth-child(4) { animation-delay: 120ms; }
  .story__slide.is-active .story__content > :nth-child(5) { animation-delay: 180ms; }
}
@keyframes settle { from { transform: scale(1.04); } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }

/* Progress bars (top, like phone stories) */
.story__tabs { position: absolute; z-index: 4; left: 0; right: 0; top: 0; display: flex; gap: 6px; padding: 12px var(--gutter) 0; }
.story__tab { flex: 1; height: 24px; padding: 10px 0; border: 0; background: transparent; cursor: pointer; }
.story__track { display: block; height: 3px; border-radius: 3px; background: rgba(255,255,255,.3); overflow: hidden; }
.story__fill { display: block; height: 100%; background: #FFFFFF; transform: scaleX(0); transform-origin: left; }
/* Tap zones: left third = back, right third = forward (above the text area) */
.story__zone { position: absolute; z-index: 2; top: 44px; height: 40%; width: 34%; border: 0; background: transparent; }
.story__zone--prev { left: 0; cursor: w-resize; }
.story__zone--next { right: 0; cursor: e-resize; }
.story__pause { position: absolute; z-index: 4; top: 40px; right: var(--gutter); min-height: 36px; padding: 0 14px; border-radius: var(--pill); border: 1px solid rgba(255,255,255,.4); background: rgba(18,18,18,.45); color: #FFFFFF; font-size: 13px; font-weight: 600; cursor: pointer; }
/* "Up next" preview card, desktop only */
.story__next { display: none; }

@media (min-width: 768px) {
  .story__body--short { display: none; }
  .story__body--long { display: block; }
  .story__ctas { display: flex; flex-wrap: wrap; }
}
@media (min-width: 1100px) {
  .story__content { padding-bottom: 56px; padding-right: 340px; }
  .story__next {
    display: block; position: absolute; z-index: 4; right: max(var(--gutter), calc((100vw - var(--container)) / 2 + var(--gutter))); bottom: 56px;
    width: 260px; padding: 0; border-radius: var(--radius-m); overflow: hidden; cursor: pointer;
    border: 1px solid rgba(255,255,255,.25); background: rgba(18,18,18,.6); color: #FFFFFF; text-align: left;
    transition: transform var(--t-ui) var(--ease-out);
  }
  .story__next:hover { transform: translateY(-3px); }
  .story__next-item { display: none; }
  .story__next-item.is-active { display: block; }
  .story__next-item .photo { height: 120px; }
  .story__next-item > span { display: flex; flex-direction: column; padding: 12px 16px 14px; font-weight: 600; }
  .story__next-item small { font-size: 13px; color: #BDBDBD; font-weight: 500; }
}

/* === Impact numbers ======================================================= */
.proof__rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: 78%; gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter) 8px;
}
.proof__rail::-webkit-scrollbar { display: none; }
.proof__item { scroll-snap-align: start; border-top: 3px solid var(--orange); padding-top: 18px; }
.theme-stories .proof__num { color: var(--orange); }
.proof__note { font-size: 14px; color: var(--muted-fg); margin-top: 20px; max-width: 70ch; }
@media (min-width: 768px) { .proof__rail { grid-auto-columns: 42%; } }
@media (min-width: 1100px) {
  .proof__rail { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 32px; overflow: visible; margin: 0; padding: 0; }
}

/* === Who we are =========================================================== */
.who__grid { display: grid; gap: 28px; }
.who__statement { font-size: clamp(26px, 5.4vw, 46px); line-height: 1.2; }
.who__statement em { font-style: normal; color: var(--orange); }
.who__text { display: flex; flex-direction: column; gap: 16px; }
.who__title { font-size: clamp(22px, 4.4vw, 30px); line-height: 1.2; }
.who__more { display: none; }
.who__more.is-open { display: flex; flex-direction: column; gap: 16px; }
.who__strong { color: #FFFFFF; font-weight: 600; }
.who__toggle { align-self: flex-start; min-height: 44px; padding: 0; border: 0; background: none; color: var(--orange-soft); font-weight: 700; cursor: pointer; }
@media (min-width: 1100px) {
  .who__grid { grid-template-columns: 1.1fr 1fr; gap: 64px; }
  .who__more { display: flex; flex-direction: column; gap: 16px; }
  .who__toggle { display: none; }
}

/* === Initiatives ============================================================ */
.inits__head { display: flex; align-items: baseline; justify-content: space-between; }
.inits__hint { font-size: 14px; color: var(--muted-fg); }
.inits__rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: 84%; gap: 14px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  margin: 0 calc(var(--gutter) * -1); padding: 4px var(--gutter) 12px;
}
.inits__rail::-webkit-scrollbar { display: none; }
.init-card { scroll-snap-align: start; display: flex; flex-direction: column; border-radius: var(--radius-l); overflow: hidden; background: #1C1C1C; border: 1px solid #2A2A2A; }
.init-card__img { aspect-ratio: 4 / 3; overflow: hidden; }
.init-card__body { display: flex; flex-direction: column; gap: 10px; padding: 20px; flex-grow: 1; }
.init-card__mr { color: var(--orange-soft); font-size: 17px; }
.init-card__text { font-size: 16px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.init-card__value { color: #FFFFFF; font-weight: 600; border-left: 3px solid var(--orange); padding-left: 12px; flex-grow: 1; }
.init-card__link { padding-top: 6px; }
@media (hover: hover) and (pointer: fine) {
  .init-card .photo { transition: transform 600ms var(--ease-out); }
  .init-card:hover .photo { transform: scale(1.03); }
}
@media (min-width: 768px) { .inits__rail { grid-auto-columns: 46%; } }
@media (min-width: 1100px) {
  .inits__hint { display: none; }
  .inits__rail { grid-auto-flow: row; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: visible; margin: 0; padding: 0; }
}

/* === Van finder (full orange block) ======================================== */
.theme-stories .van { background: var(--orange); color: var(--charcoal); --heading: var(--charcoal); --link: #FFFFFF; }
.theme-stories .van .chip { border-color: var(--charcoal); color: var(--charcoal); background: transparent; }
.theme-stories .van .chip[aria-pressed="true"] { background: var(--charcoal); color: #FFFFFF; }
.theme-stories .van__card { background: var(--charcoal); color: #E4E4E4; }
.theme-stories .van__place { color: #FFFFFF; }
.theme-stories .van__link { color: var(--orange-soft); }

/* === Testimonials ============================================================== */
.voices__rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: 84%; gap: 14px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter) 12px;
}
.voices__rail::-webkit-scrollbar { display: none; }
.voices__rail .voice { scroll-snap-align: start; }
.voices__note { font-size: 13px; color: var(--muted-fg); margin-top: 8px; }
@media (min-width: 768px) { .voices__rail { grid-auto-columns: 40%; } }
@media (min-width: 1100px) { .voices__rail { grid-auto-columns: 30%; margin: 0; padding: 0 0 12px; } }

/* === Donate ====================================================================== */
.theme-stories .give { background: #1A1A1A; }
.give__grid { display: grid; gap: 32px; }
.give__intro { display: flex; flex-direction: column; gap: 14px; }
.give__intro .h2 { margin-bottom: 0; }
.theme-stories .donate { background: #121212; border: 1px solid #2A2A2A; border-radius: var(--radius-l); padding: 20px; }
@media (min-width: 1100px) { .give__grid { grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; } }

/* === Be part of the change ======================================================== */
.change__h { font-size: clamp(36px, 8vw, 68px); }
.change__p { max-width: 46ch; margin: 10px 0 24px; }
.change__rows { border-bottom: 1px solid #2A2A2A; }
.change__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 0; border-top: 1px solid #2A2A2A; text-decoration: none; color: #FFFFFF; }
main a.change__row { color: #FFFFFF; font-weight: 400; }
.change__row > span:first-child { display: flex; flex-direction: column; gap: 4px; }
.change__title { font-size: clamp(26px, 5vw, 40px); }
.change__desc { color: #BDBDBD; font-size: 16px; }
.change__arrow { flex-shrink: 0; display: grid; place-items: center; width: 52px; height: 52px; border-radius: var(--pill); background: var(--orange); color: var(--charcoal); font-size: 22px; font-weight: 700; transition: transform var(--t-ui) var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .change__row:hover .change__arrow { transform: translateX(4px); } }
