/* ==========================================================================
   Modules · explore map, voices, gallery, crowdfunding, FAQ, teasers
   ========================================================================== */

/* ---------- Explore map ---------- */

.Map { position: relative; }

.Map__viewport {
  position: relative;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  cursor: grab;
  background-color: rgb(var(--paper));
  background-image:
    linear-gradient(rgb(var(--navy) / 0.13) 1px, transparent 1px),
    linear-gradient(90deg, rgb(var(--navy) / 0.13) 1px, transparent 1px),
    linear-gradient(rgb(var(--navy) / 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgb(var(--navy) / 0.06) 1px, transparent 1px);
  background-size: 110px 110px, 110px 110px, 22px 22px, 22px 22px;
  box-shadow: inset 0 10px 18px -16px rgb(0 0 0 / 0.35), inset 0 -10px 18px -16px rgb(0 0 0 / 0.35);
  -webkit-user-select: none;
  user-select: none;
}

.Map__viewport::-webkit-scrollbar { display: none; }
.Map__viewport.is-dragging { cursor: grabbing; }
.Map__viewport.is-dragging * { pointer-events: none; }

.Map__canvas {
  display: flex;
  align-items: flex-start;
  gap: clamp(28px, 5vw, 56px);
  inline-size: max-content;
  min-block-size: 430px;
  padding: 34px clamp(24px, 6vw, 80px) 40px;
}

@media (min-width: 900px) { .Map__canvas { min-block-size: 500px; padding-block: 46px 50px; } }

.Map__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-block-start: 14px;
}

.Map__arrows { display: flex; gap: 8px; }

.Map__bar {
  flex: 1 1 auto;
  max-inline-size: 220px;
  block-size: 4px;
  border-radius: 4px;
  background: rgb(var(--ink) / 0.1);
  overflow: hidden;
}

.Map__bar span { display: block; block-size: 100%; inline-size: 30%; border-radius: inherit; background: rgb(var(--ink)); transition: transform 120ms linear; }

.Spot {
  --y: 0px;
  --r: 0deg;
  position: relative;
  flex: none;
  margin-block-start: var(--y);
  transform: rotate(var(--r));
}

.Sketch {
  color: #444142;
  font-family: var(--font-sketch);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.05;
}

.Spot__note { display: grid; gap: 2px; margin-block-start: 10px; color: rgb(var(--ink-soft)); font-size: 0.875rem; line-height: 1.35; max-inline-size: 240px; }
.Spot__note--top { margin: 0 0 10px; }

.Spot__media {
  position: relative;
  display: block;
  overflow: hidden;
  inline-size: var(--w, 260px);
  aspect-ratio: var(--ratio, 16 / 10);
  border-radius: 18px;
  background: rgb(var(--ink));
  box-shadow: 0 0 0 5px #fff, var(--shadow-lg);
}

.Spot__media img { inline-size: 100%; block-size: 100%; object-fit: cover; transition: transform 900ms var(--ease); }
.Spot__media:hover img { transform: scale(1.06); }
.Spot__media::after {
  content: '';
  position: absolute;
  inset: 45% 0 0;
  background: linear-gradient(transparent, rgb(0 0 0 / 0.45));
  pointer-events: none;
}

.Spot__media .PlayBtn { position: absolute; inset: auto auto 10px 10px; z-index: 2; }

.Spot__quote {
  margin-block-start: 12px;
  max-inline-size: 250px;
  color: rgb(var(--ink));
  font-family: var(--font-h);
  font-size: 1rem;
  font-style: italic;
  line-height: 1.3;
}

.Polaroid {
  display: block;
  inline-size: var(--w, 210px);
  margin: 0;
  padding: 8px 8px 12px;
  background: #fff;
  box-shadow: var(--shadow-lg);
}

.Polaroid img { inline-size: 100%; aspect-ratio: 1; object-fit: cover; }
.Polaroid figcaption { margin-block-start: 8px; color: #444142; font-family: var(--font-sketch); font-size: 1.1rem; font-weight: 700; text-align: center; }

.Tape { position: relative; }

.Stamp svg,
.Doodle svg { aspect-ratio: 1; }

.Tape::before {
  content: '';
  position: absolute;
  inset: -12px auto auto 50%;
  inline-size: 86px;
  block-size: 26px;
  translate: -50% 0;
  rotate: -4deg;
  background: rgb(var(--yellow) / 0.55);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.08);
  z-index: 2;
}

.Pile {
  position: relative;
  inline-size: var(--w, 250px);
  aspect-ratio: 5 / 4;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.Pile__photo {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 7px;
  background: #fff;
  box-shadow: var(--shadow-md);
  transform: rotate(var(--pr, 0deg)) translate(var(--px, 0), var(--py, 0));
  transition: transform 380ms cubic-bezier(0.2, 0.9, 0.3, 1), box-shadow 200ms;
}

.Pile__photo img { inline-size: 100%; block-size: 100%; object-fit: cover; }
.Pile__photo:nth-last-child(1) { --pr: 2deg; }
.Pile__photo:nth-last-child(2) { --pr: -6deg; --px: -10px; --py: 6px; }
.Pile__photo:nth-last-child(3) { --pr: 7deg; --px: 12px; --py: 10px; }
.Pile__photo:nth-last-child(n+4) { --pr: -2deg; --py: 14px; }
.Pile__photo:last-child:not(.is-lifting):hover { transform: rotate(-1deg) translateY(-6px); box-shadow: var(--shadow-lg); }
.Pile:active .Pile__photo:last-child:not(.is-lifting) { transform: rotate(-1deg) scale(0.97); transition-duration: 90ms; }

/* Quick fling to the side, then it slides back under the pile */
.Pile .Pile__photo.is-lifting {
  transform: translate(58%, -14%) rotate(14deg);
  box-shadow: var(--shadow-lg);
  transition-duration: 170ms;
  transition-timing-function: cubic-bezier(0.3, 0, 0.6, 1);
}

.Pile__hint {
  position: absolute;
  inset: auto -10px -14px auto;
  z-index: 5;
  padding: 4px 10px;
  border-radius: 99px;
  background: rgb(var(--ink));
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  pointer-events: none;
}

.Sticky {
  inline-size: 190px;
  padding: 18px 16px 20px;
  background: rgb(var(--yellow));
  box-shadow: 0 14px 22px -14px rgb(0 0 0 / 0.5);
  color: rgb(var(--ink));
}

.Sticky b { display: block; font-family: var(--font-h); font-size: 2.3rem; font-weight: 700; line-height: 1; letter-spacing: -0.02em; }
.Sticky span { display: block; margin-block-start: 6px; font-family: var(--font-sketch); font-size: 1.15rem; line-height: 1.1; }
.Sticky--blue { background: rgb(var(--blue)); color: #fff; }

.Doodle { inline-size: 70px; color: #4a4748; align-self: center; }
.Doodle svg { inline-size: 100%; block-size: auto; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.Stamp {
  display: block;
  inline-size: 132px;
  align-self: center;
  color: rgb(var(--blue));
  text-decoration: none;
  transition: transform 500ms var(--ease);
  animation: spin 22s linear infinite;
}

.Stamp:hover { transform: scale(1.1); animation-play-state: paused; }
.Stamp svg { inline-size: 100%; block-size: auto; }

@keyframes spin { to { rotate: 360deg; } }

.EndCard {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 12px;
  inline-size: 240px;
  min-block-size: 250px;
  padding: 24px;
  border-radius: var(--radius-media);
  background: rgb(var(--navy));
  color: #fff;
  align-self: center;
}

.EndCard .Sketch { color: #fff; font-size: 1.7rem; }

/* ---------- Voices (donor / beneficiary stories) ---------- */

.Voices__grid { display: grid; gap: 16px; }

@media (min-width: 900px) { .Voices__grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: 22px; } }

.Story {
  display: grid;
  overflow: hidden;
  border-radius: var(--radius-media);
  background: rgb(var(--off));
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.05);
}

@media (min-width: 700px) and (max-width: 899px), (min-width: 1200px) {
  .Story { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
  /* Side by side, the photo fills the full height of the card */
  .Story > .Story__media { aspect-ratio: auto; min-block-size: 280px; }
}

.Story__media { position: relative; margin: 0; aspect-ratio: 16 / 10; overflow: hidden; }
.Story__media--tall { aspect-ratio: auto; min-block-size: 360px; }
.Story__media > img,
.Story__media > .Video { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; object-fit: cover; border-radius: 0; box-shadow: none; aspect-ratio: auto; }

.Story__tag {
  position: absolute;
  inset: 12px auto auto 12px;
  z-index: 3;
  padding: 5px 11px;
  border-radius: 99px;
  background: #fff;
  color: rgb(var(--ink));
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.Story__body { display: grid; align-content: center; gap: 12px; padding: clamp(18px, 3vw, 30px); }
.Story__body .Sketch { font-size: 1.5rem; }

.Quotes { display: grid; gap: 16px; }

@media (max-width: 899px) {
  .Quotes { grid-auto-flow: column; grid-auto-columns: min(84%, 340px); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); }
  .Quotes::-webkit-scrollbar { display: none; }
  .Quotes > * { scroll-snap-align: start; }
}

.Quote {
  position: relative;
  display: grid;
  align-content: space-between;
  gap: 18px;
  margin: 0;
  padding: 22px;
  border-radius: var(--radius-media);
  background: rgb(var(--q, var(--yellow)) / 0.9);
  color: rgb(var(--ink));
}

.Quote--blue { --q: var(--blue); }
.Quote--green { --q: var(--green); color: #fff; }

.Quote blockquote { margin: 0; font-family: var(--font-h); font-size: 1.15rem; font-weight: 600; line-height: 1.3; }
.Quote blockquote::before { content: '“'; display: block; font-size: 3rem; line-height: 0.6; margin-block-end: 8px; opacity: 0.55; }
.Quote figcaption { display: flex; align-items: center; gap: 10px; font-size: 0.875rem; line-height: 1.3; }
.Quote figcaption img { inline-size: 44px; block-size: 44px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 3px rgb(255 255 255 / 0.7); }
.Quote figcaption b { display: block; font-weight: 700; }

/* ---------- Large photo gallery ---------- */

.Gallery__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(86%, 720px);
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding-inline: var(--gutter);
  scroll-padding-inline: var(--gutter);
}

.Gallery__track::-webkit-scrollbar { display: none; }

@media (min-width: 1260px) {
  .Gallery__track { padding-inline: calc((100vw - var(--page)) / 2); scroll-padding-inline: calc((100vw - var(--page)) / 2); }
}

.Slide {
  position: relative;
  margin: 0;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-media);
  background: rgb(var(--off));
  scroll-snap-align: start;
}

@media (min-width: 700px) { .Slide { aspect-ratio: 3 / 2; } }

.Slide button { display: block; inline-size: 100%; block-size: 100%; cursor: zoom-in; }
.Slide img { inline-size: 100%; block-size: 100%; object-fit: cover; transition: transform 1200ms var(--ease); }
.Slide:hover img { transform: scale(1.04); }

.Slide figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 44px 18px 16px;
  background: linear-gradient(transparent, rgb(0 0 0 / 0.66));
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 500;
  pointer-events: none;
}

.Gallery__nav { display: flex; align-items: center; gap: 10px; }
.Gallery__count { min-inline-size: 48px; text-align: center; color: rgb(var(--muted)); font-size: 0.875rem; font-variant-numeric: tabular-nums; }

/* ---------- Nudge & crowdfunding ---------- */

.Nudge {
  display: grid;
  gap: 14px;
  align-items: center;
  padding: clamp(18px, 3vw, 26px);
  border-radius: var(--radius-media);
  background: rgb(var(--navy));
  color: #fff;
}

.Nudge h2 { font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.7rem); }
.Nudge p { color: rgb(255 255 255 / 0.8); font-size: 0.975rem; margin-block-start: 6px; }

@media (min-width: 760px) { .Nudge { grid-template-columns: 1fr auto; gap: 28px; } }

.Fund {
  display: grid;
  overflow: hidden;
  border-radius: var(--radius-media);
  background: rgb(var(--navy));
  color: #fff;
  box-shadow: var(--shadow-md);
}

@media (min-width: 800px) { .Fund { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); } }

.Fund__media { position: relative; min-block-size: 220px; margin: 0; }
.Fund__media img { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; object-fit: cover; }
.Fund__body { display: grid; gap: 14px; padding: clamp(20px, 3.5vw, 36px); }
.Fund__tag { color: rgb(var(--yellow)); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.Fund h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.2rem); }
.Fund p { color: rgb(255 255 255 / 0.82); }

.Meter { display: grid; gap: 8px; }
.Meter__bar { block-size: 12px; border-radius: 99px; background: rgb(255 255 255 / 0.16); overflow: hidden; }
.Meter__bar span { display: block; block-size: 100%; inline-size: 0; border-radius: inherit; background: linear-gradient(90deg, rgb(var(--yellow)), rgb(var(--gold))); transition: inline-size 1600ms var(--ease); }
.Meter__stats { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; font-size: 0.9375rem; }
.Meter__stats b { font-family: var(--font-h); font-size: 1.35rem; color: #fff; }

.Chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- FAQ ---------- */

.Faq__list { border-block-start: 1px solid rgb(var(--ink) / 0.1); }

.Faq__item { border-block-end: 1px solid rgb(var(--ink) / 0.1); }
.Faq__item[hidden] { display: none; }

.Faq__item summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 2px;
  font-family: var(--font-h);
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  font-weight: 600;
  line-height: 1.3;
  color: rgb(var(--ink));
  cursor: pointer;
  list-style: none;
}

.Faq__item summary::-webkit-details-marker { display: none; }

.Faq__icon {
  position: relative;
  flex: none;
  inline-size: 28px;
  block-size: 28px;
  border-radius: 50%;
  background: rgb(var(--blue) / 0.16);
  margin-inline-start: auto;
  transition: background-color 250ms, transform 400ms var(--ease);
}

.Faq__icon::before,
.Faq__icon::after { content: ''; position: absolute; inset: 50% auto auto 50%; inline-size: 12px; block-size: 2px; border-radius: 2px; background: rgb(var(--navy)); translate: -50% -50%; transition: rotate 400ms var(--ease); }
.Faq__icon::after { rotate: 90deg; }
.Faq__item[open] .Faq__icon { background: rgb(var(--yellow)); transform: rotate(180deg); }
.Faq__item[open] .Faq__icon::after { rotate: 0deg; }

.Faq__a { padding: 0 44px 18px 2px; color: rgb(var(--ink-soft)); font-size: 0.975rem; line-height: 1.6; }
.Faq__a > * + * { margin-block-start: 0.7em; }
.Faq__a a { color: rgb(var(--navy)); font-weight: 600; }

.Faq__more { margin-block-start: 16px; }

/* ---------- Compact teasers ---------- */

.Teasers { margin: 0; padding: 0; list-style: none; }

.Teaser {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(96px, 26vw, 150px);
  gap: 16px;
  align-items: center;
  padding-block: 16px;
  border-block-end: 1px solid rgb(var(--ink) / 0.14);
}

.Teaser:first-child { padding-block-start: 4px; }

.Teaser__kicker { margin-block-end: 4px; color: rgb(var(--ink-soft)); font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace; font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }

.Teaser__title { font-size: clamp(1.1rem, 1rem + 0.5vw, 1.35rem); line-height: 1.18; }

.Teaser__link {
  color: rgb(var(--ink));
  text-align: start;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  text-decoration-color: rgb(var(--ink) / 0.35);
  transition: text-decoration-color 200ms;
}

.Teaser__link:hover { text-decoration-color: rgb(var(--ink)); }
.Teaser__text { margin-block-start: 6px; color: rgb(var(--ink-soft)); font-size: 0.9375rem; line-height: 1.45; }

.Teaser__media {
  display: block;
  overflow: hidden;
  aspect-ratio: 1;
  border-radius: 12px 6px 12px 6px;
  background: rgb(var(--off));
}

.Teaser__media img { inline-size: 100%; block-size: 100%; object-fit: cover; transition: transform 700ms var(--ease); }
.Teaser:hover .Teaser__media img { transform: scale(1.07); }
.Teaser.is-flash { animation: flash 1400ms var(--ease); }

@keyframes flash { 0%, 100% { background: transparent; } 20% { background: rgb(var(--white) / 0.7); } }

@media (min-width: 900px) {
  .Teasers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; }
  .Teaser:first-child { padding-block-start: 16px; }
}
