/* ==========================================================================
   Volunteer Sri Lanka: homepage redesign
   Scoped to the homepage (loaded only by client/views/index.blade.php).
   Everything is namespaced `.vsl-` so no other page is affected.
   ========================================================================== */


/* Tokens, header, menu and footer live in site.css (loaded by the layout). */
body.page-index { background: #fff; }

/* ---------- Shared building blocks -------------------------------------- */
.vsl { font-family: var(--vsl-font); color: var(--vsl-ink); font-size: 1rem; line-height: 1.6; }
.vsl *, .vsl *::before, .vsl *::after { box-sizing: border-box; }
.vsl img { max-width: 100%; height: auto; display: block; }
:where(.vsl) :where(h1, h2, h3, h4, p, ul, ol, figure, blockquote) { margin: 0; padding: 0; }
:where(.vsl) :where(ul, ol) { list-style: none; }
:where(.vsl) a { text-decoration: none; }

.vsl :is(h1, h2, h3, h4) { font-family: var(--vsl-font); }
.vsl-wrap { width: 100%; max-width: var(--vsl-max); margin-inline: auto; padding-inline: var(--vsl-gutter); }
.vsl-section { padding-block: clamp(56px, 9vw, 112px); }


.vsl-title {
  font-weight: 700; letter-spacing: -0.03em; line-height: 1.08;
  font-size: clamp(2.1rem, 6.2vw, 3.6rem);
  text-wrap: balance;
}
.vsl-lead { color: var(--vsl-muted); font-size: clamp(1rem, 2.2vw, 1.2rem); max-width: 56ch; margin-top: 18px; text-wrap: pretty; }


/* ---------- 1. Hero ------------------------------------------------------ */
.vsl-hero { background: var(--vsl-navy); color: #fff; padding-top: var(--vsl-header-h); }
.vsl-hero__grid { display: grid; }
.vsl-hero__copy { padding: clamp(36px, 7vw, 72px) var(--vsl-gutter) clamp(36px, 6vw, 64px); }
.vsl-hero h1 {
  font-weight: 700; text-transform: uppercase; letter-spacing: -0.01em;
  font-size: clamp(2.6rem, 11vw, 5.6rem); line-height: 1.02;
  margin-top: 22px;
}
.vsl-hero h1 span { display: block; }

.vsl-hero__lead { margin-top: 26px; font-weight: 400; font-size: clamp(1.05rem, 2.6vw, 1.3rem); line-height: 1.5; color: rgba(255, 255, 255, 0.9); max-width: 36ch; }
.vsl-hero__cta { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 14px; }
.vsl-hero__media { position: relative; background: #1a2150; }
.vsl-hero__media img { width: 100%; height: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.vsl-hero__strip {
  padding: 22px var(--vsl-gutter) 26px;
  font-size: 0.95rem; letter-spacing: 0.06em; text-transform: uppercase;
  display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline;
}
.vsl-hero__strip b { font-weight: 500; }
.vsl-hero__strip i { font-style: normal; color: var(--vsl-red-bright); }
.vsl-hero__strip small { flex-basis: 100%; font-size: 0.95rem; letter-spacing: 0; text-transform: none; color: rgba(255, 255, 255, 0.82); margin-top: 4px; }

@media (min-width: 960px) {
  .vsl-hero { padding-top: var(--vsl-header-h); }
  .vsl-hero h1 { font-size: clamp(3rem, 5.2vw, 4.9rem); }
  .vsl-hero h1 span { white-space: nowrap; }
  .vsl-hero__grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: clamp(460px, calc(100vh - var(--vsl-header-h) - 110px), 720px); }
  .vsl-hero__copy { padding-left: max(var(--vsl-gutter), calc((100vw - var(--vsl-max)) / 2 + var(--vsl-gutter))); display: flex; flex-direction: column; justify-content: center; }
  .vsl-hero__media img { aspect-ratio: auto; position: absolute; inset: 0; }
  .vsl-hero__strip { padding-left: max(var(--vsl-gutter), calc((100vw - var(--vsl-max)) / 2 + var(--vsl-gutter))); border-top: 1px solid rgba(255, 255, 255, 0.14); }
}

/* Authored moment: the hero settles in once, on load. */
@media (prefers-reduced-motion: no-preference) {
  .vsl-hero__copy > *, .vsl-hero__media { animation: vsl-rise 0.9s var(--vsl-ease) both; }
  .vsl-hero__copy > *:nth-child(2) { animation-delay: 0.08s; }
  .vsl-hero__copy > *:nth-child(3) { animation-delay: 0.16s; }
  .vsl-hero__copy > *:nth-child(4) { animation-delay: 0.24s; }
  .vsl-hero__media { animation-delay: 0.2s; animation-name: vsl-fade; }
}
@keyframes vsl-rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes vsl-fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- 2. Programs -------------------------------------------------- */
.vsl-programs__head { max-width: 760px; }
.vsl-programs__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(12px, 2.4vw, 24px); margin-top: clamp(32px, 5vw, 48px); }
.vsl-prog {
  position: relative; display: flex; flex-direction: column; justify-content: space-between;
  min-height: 230px; padding: clamp(18px, 3vw, 30px);
  border-radius: 28px; overflow: hidden;
  transition: transform 1.4s var(--vsl-ease), box-shadow 1.4s var(--vsl-ease);
}
.vsl-prog { color: var(--vsl-ink); }
.vsl-prog:nth-child(1) { background: #cfdcff; }   /* Education: periwinkle */
.vsl-prog:nth-child(2) { background: #ffd0d6; }   /* Health: blush */
.vsl-prog:nth-child(3) { background: #c4ecd6; }   /* Conservation: mint */
.vsl-prog:nth-child(4) { background: #ffe7a3; }   /* Community: butter */
.vsl-prog:hover, .vsl-prog:focus-within { transform: translateY(-6px); box-shadow: 0 22px 36px -22px rgba(11, 16, 48, 0.45); }
.vsl-prog::before { content: attr(data-n); position: absolute; right: -6px; bottom: -22px; font-size: clamp(6rem, 14vw, 9rem); font-weight: 800; line-height: 1; letter-spacing: -0.06em; opacity: 0.09; color: var(--vsl-navy); pointer-events: none; }
.vsl-prog__tag { font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; }
.vsl-prog h3 { font-weight: 700; letter-spacing: 0.01em; text-transform: uppercase; font-size: clamp(1.02rem, 2.6vw, 1.6rem); overflow-wrap: anywhere; margin-top: 22px; }
.vsl-prog p { color: rgba(11, 16, 48, 0.78); font-size: 0.95rem; margin-top: 8px; max-width: 24ch; }
.vsl-prog__go { margin-top: 28px; font-size: 0.78rem; font-weight: 500; letter-spacing: 0.05em; white-space: nowrap; text-transform: uppercase; color: inherit; display: inline-flex; gap: 8px; }
.vsl-prog__go::after { content: ''; position: absolute; inset: 0; border-radius: inherit; } /* whole card is the link */
.vsl-prog__go span { transition: transform 0.25s var(--vsl-ease); }
.vsl-prog:hover .vsl-prog__go span { transform: translateX(5px); }
.vsl-prog__go:focus-visible { outline-offset: 6px; }

@media (min-width: 1024px) {
  .vsl-programs__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .vsl-prog h3 { font-size: clamp(0.95rem, 1.5vw, 1.35rem); overflow-wrap: normal; }
  .vsl-prog { min-height: 300px; }
}
@media (max-width: 339px) { .vsl-programs__grid { grid-template-columns: 1fr; } }

/* Current placements: real projects from the CMS */
.vsl-placements { margin-top: clamp(48px, 7vw, 80px); }
.vsl-placements__bar { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.vsl-placements h3 { font-weight: 700; font-size: clamp(1.4rem, 3.4vw, 2rem); letter-spacing: -0.01em; }
.vsl-link { background: linear-gradient(var(--vsl-red), var(--vsl-red)) left bottom / 100% 1.5px no-repeat; transition: background-size 0.35s var(--vsl-ease), color 0.2s; font-size: 0.85rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--vsl-ink); padding-bottom: 3px; }
.vsl-link:hover { color: var(--vsl-red); background-size: 40% 1.5px; }
.vsl-place-grid { padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(10px, 2vw, 18px); margin-top: 24px; }
.vsl-place-grid > li { display: flex; }
.vsl-place { position: relative; display: block; width: 100%; aspect-ratio: 1; border-radius: 22px; overflow: hidden; background: var(--vsl-navy); color: #fff; isolation: isolate; }
.vsl-place img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.8s var(--vsl-ease); z-index: -2; }
.vsl-place::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(6, 10, 34, 0.92) 0%, rgba(6, 10, 34, 0.35) 48%, rgba(6, 10, 34, 0) 75%); }
.vsl-place:hover img, .vsl-place:focus-visible img { transform: scale(1.07); }
.vsl-place__title { position: absolute; left: 12px; right: 48px; bottom: 16px; font-size: clamp(0.78rem, 2.2vw, 1.05rem); font-weight: 600; line-height: 1.22; display: -webkit-box; -webkit-line-clamp: 4; line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.vsl-place__go { position: absolute; right: 12px; bottom: 12px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--vsl-ink); font-size: 1rem; transition: transform 0.3s var(--vsl-ease), background 0.2s, color 0.2s; }
.vsl-place:hover .vsl-place__go { transform: rotate(45deg); background: var(--vsl-red); color: #fff; }
@media (min-width: 760px) {
  .vsl-place-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .vsl-place-grid > li:first-child { grid-column: span 2; grid-row: span 2; }
  .vsl-place-grid > li:first-child .vsl-place, .vsl-place-grid > li:last-child .vsl-place { aspect-ratio: auto; height: 100%; }
  .vsl-place-grid > li:last-child { grid-column: span 2; }
  .vsl-place-grid > li:first-child .vsl-place__title { font-size: 1.5rem; left: 24px; bottom: 24px; right: 70px; }
}

/* How it works */
.vsl-how { margin-top: clamp(56px, 8vw, 96px); }
.vsl-steps { padding: 0; margin-top: 28px; border-top: 1px solid var(--vsl-line); counter-reset: step; }
.vsl-step { display: grid; grid-template-columns: 52px 1fr; padding: 18px 0; border-bottom: 1px solid var(--vsl-line); }
.vsl-step__n { color: var(--vsl-red); font-size: 0.9rem; letter-spacing: 0.06em; padding-top: 3px; }
.vsl-step h3 { font-weight: 600; font-size: 1.25rem; letter-spacing: 0.01em; }
.vsl-step h3 a { color: inherit; }
.vsl-step h3 a:hover { color: var(--vsl-red); }
.vsl-step p { color: var(--vsl-muted); font-size: 0.95rem; margin-top: 4px; }
@media (min-width: 860px) {
  .vsl-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; border-top: 0; }
  .vsl-step { grid-template-columns: 1fr; border-bottom: 0; border-top: 2px solid var(--vsl-ink); padding: 20px 0 0; gap: 14px; }
}

/* Why volunteer with us: colour-blocked bento */
.vsl-why__grid { padding: 0; display: grid; grid-template-columns: 1fr; gap: clamp(10px, 2vw, 18px); margin-top: 36px; }
.vsl-why__item { display: flex; flex-direction: column; justify-content: flex-end; min-height: 190px; padding: clamp(22px, 3vw, 32px); border-radius: 28px; color: var(--vsl-ink); transition: transform 1.4s var(--vsl-ease), box-shadow 1.4s var(--vsl-ease); }
.vsl-why__item:hover { transform: translateY(-5px); box-shadow: 0 22px 36px -24px rgba(11, 16, 48, 0.5); }
.vsl-why__item h3 { font-weight: 700; font-size: clamp(1.25rem, 2.6vw, 1.6rem); letter-spacing: -0.02em; line-height: 1.15; }
.vsl-why__item p { margin-top: 8px; font-size: 0.98rem; max-width: 34ch; }
.vsl-why__item--wide p { max-width: none; } /* wide tiles use their width instead of wrapping early */
/* Text starts from the top of every tile, so titles line up across a row however they wrap */
.vsl-why__item { justify-content: flex-start; padding-top: clamp(30px, 4vw, 56px); }
.vsl-why__item:nth-child(1) { background: #dcd3ff; }
.vsl-why__item:nth-child(2) { background: #ffd0d6; }
.vsl-why__item:nth-child(3) { background: #c9e6f7; }
.vsl-why__item:nth-child(4) { background: #c9efdd; }
.vsl-why__item:nth-child(5) { background: #ffe9a8; }
.vsl-why__item:nth-child(6) { background: #ffd6bd; }
@media (min-width: 640px) { .vsl-why__grid { grid-template-columns: repeat(2, 1fr); } .vsl-why__item--wide { grid-column: span 2; } }
@media (min-width: 1000px) {
  .vsl-why__grid { grid-template-columns: repeat(4, 1fr); }
  .vsl-why__item--wide { grid-column: span 2; }
  .vsl-why__item { min-height: 230px; }
}

/* ---------- 3. Local support + stories ----------------------------------- */
.vsl-local { background: var(--vsl-mist); }
.vsl-local__grid { display: grid; gap: clamp(28px, 5vw, 64px); align-items: center; }
.vsl-local__photo { border-radius: 28px; overflow: hidden; background: var(--vsl-dusk); aspect-ratio: 4 / 3; }
.vsl-local__photo img { width: 100%; height: 100%; object-fit: cover; }
.vsl-local__copy .vsl-lead { margin-bottom: 30px; }
@media (min-width: 900px) { .vsl-local__grid { grid-template-columns: 1fr 1fr; } .vsl-local__photo { order: 2; } }

.vsl-stories__grid { display: grid; gap: 16px; margin-top: 34px; }
.vsl-story { background: var(--vsl-navy-2); color: #fff; border-radius: 28px; padding: clamp(24px, 4vw, 36px); display: flex; flex-direction: column; justify-content: space-between; gap: 26px; }
.vsl-story blockquote { margin: 0; font-size: clamp(1.02rem, 2.2vw, 1.18rem); line-height: 1.5; text-wrap: pretty; }
.vsl-story figcaption { font-size: 0.85rem; letter-spacing: 0.04em; color: rgba(255, 255, 255, 0.78); }
.vsl-story figcaption b { display: block; font-weight: 500; color: #fff; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 4px; }
.vsl-stories__more { margin-top: 28px; }
@media (min-width: 900px) { .vsl-stories__grid { grid-template-columns: repeat(3, 1fr); } }

/* Gallery strip (reuses the existing media modal) */
.vsl-gallery__grid { padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(10px, 2vw, 18px); margin-top: 28px; }
.vsl-shot { position: relative; padding: 0; border: 0; background: var(--vsl-mist); border-radius: 22px; overflow: hidden; aspect-ratio: 1; cursor: zoom-in; }
.vsl-shot:first-child { grid-column: span 2; aspect-ratio: 16 / 10; }
.vsl-shot img, .vsl-shot video { width: 100%; height: 100%; object-fit: cover; transition: transform 1.8s var(--vsl-ease); }
.vsl-shot:hover img, .vsl-shot:hover video { transform: scale(1.06); }
@media (min-width: 760px) {
  .vsl-gallery__grid { grid-template-columns: repeat(4, 1fr); }
  .vsl-shot, .vsl-shot:first-child { aspect-ratio: auto; min-height: 220px; }
  .vsl-shot:first-child { grid-column: span 2; grid-row: span 2; }
}

/* ---------- 4. Fees + final CTA ------------------------------------------ */
.vsl-fees__head { max-width: 720px; }
.vsl-fees__card { margin-top: 40px; background: var(--vsl-mist); border-radius: 28px; padding: clamp(24px, 5vw, 48px); display: grid; gap: 32px; }
.vsl-fees__card h3 { font-weight: 700; font-size: clamp(1.6rem, 4vw, 2.2rem); letter-spacing: -0.01em; }
.vsl-fees__card p { color: var(--vsl-muted); margin-top: 10px; max-width: 46ch; }
.vsl-fees__incl { padding: 0; margin-top: 20px; display: grid; gap: 8px; font-size: 0.98rem; }
.vsl-fees__incl li { padding-left: 26px; position: relative; }
.vsl-fees__incl li::before { content: ''; position: absolute; left: 2px; top: 0.45em; width: 11px; height: 6px; border-left: 2px solid var(--vsl-red); border-bottom: 2px solid var(--vsl-red); transform: rotate(-45deg); }
.vsl-fees__table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.vsl-fees__table caption { caption-side: top; text-align: left; font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--vsl-red); padding-bottom: 10px; }
.vsl-fees__table th, .vsl-fees__table td { padding: 12px 0; border-top: 1px solid var(--vsl-line); text-align: left; font-weight: 400; }
.vsl-fees__table td { text-align: right; font-weight: 500; }
.vsl-fees__card .vsl-btn { justify-self: start; }
@media (min-width: 900px) { .vsl-fees__card { grid-template-columns: 1.1fr 1fr; align-items: start; } .vsl-fees__card .vsl-btn { grid-column: 1 / -1; } }

.vsl-fees { padding-bottom: clamp(40px, 6vw, 72px); }
.vsl-cta { background: var(--vsl-navy); color: #fff; padding-block: clamp(64px, 10vw, 120px); }
.vsl-cta .vsl-title { color: #fff; }
.vsl-cta .vsl-lead { color: rgba(255, 255, 255, 0.88); }
.vsl-cta .vsl-btn { margin-top: 34px; }

@media (prefers-reduced-motion: reduce) {
  .vsl *, .vsl *::before, .vsl *::after { transition-duration: 0.01ms !important; animation: none !important; }
}

/* ---------- Scroll reveal: a gentle zoom-in as cards and photos arrive ----- */
.vsl-js .vsl-reveal { opacity: 0; scale: 0.94; transition: opacity 2.2s cubic-bezier(0.22, 1, 0.36, 1) var(--d, 0ms), scale 3.6s cubic-bezier(0.22, 1, 0.36, 1) var(--d, 0ms), transform 1.4s var(--vsl-ease), box-shadow 1.4s var(--vsl-ease); }
.vsl-js .vsl-reveal.is-in { opacity: 1; scale: 1; }
.vsl-js .vsl-reveal img { scale: 1.08; transition: scale 4.5s cubic-bezier(0.22, 1, 0.36, 1) var(--d, 0ms), transform 1.8s var(--vsl-ease); }
.vsl-js .vsl-reveal.is-in img { scale: 1; }
.vsl-story { transition: transform 1.4s var(--vsl-ease), box-shadow 1.4s var(--vsl-ease), opacity 2.2s cubic-bezier(0.22, 1, 0.36, 1), scale 3.6s cubic-bezier(0.22, 1, 0.36, 1); }
.vsl-story:hover { transform: translateY(-4px) scale(1.015); box-shadow: 0 24px 40px -24px rgba(6, 10, 34, 0.7); }
.vsl-local__photo img { transition: transform 2.4s var(--vsl-ease); }
.vsl-local__photo:hover img { transform: scale(1.04); }
@media (prefers-reduced-motion: reduce) { .vsl-js .vsl-reveal, .vsl-js .vsl-reveal img { opacity: 1 !important; scale: 1 !important; } }


/* ---------- Card links keep their own colours on hover/focus --------------- */
.vsl a.vsl-why__item, .vsl a.vsl-why__item:hover, .vsl a.vsl-why__item:focus-visible { color: var(--vsl-ink); }
.vsl-why__item h3, .vsl-why__item p { color: inherit; }
.vsl a.vsl-place, .vsl a.vsl-place:hover { color: #fff; }
.vsl .vsl-btn--light, .vsl .vsl-btn--light:hover { color: var(--vsl-ink); }
.vsl .vsl-btn--navy, .vsl .vsl-btn--navy:hover, .vsl .vsl-btn--red, .vsl .vsl-btn--red:hover, .vsl .vsl-btn--ghost, .vsl .vsl-btn--ghost:hover { color: #fff; }
.vsl .vsl-prog__go, .vsl .vsl-prog__go:hover { color: var(--vsl-ink); }
.vsl .vsl-step h3 a { color: var(--vsl-ink); }
.vsl .vsl-step h3 a:hover { color: var(--vsl-red); }


/* Hero fits the first screen: no leftover section padding under the strip */
.vsl-hero { padding-bottom: 0 !important; margin: 0 !important; }


/* ---------- Numbers strip ---------------------------------------------------- */
.vsl-proof { background: var(--vsl-mist); padding-block: clamp(28px, 5vw, 48px); }
.vsl-proof__grid { margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 16px; text-align: left; }
.vsl-proof__grid > div { display: flex; flex-direction: column-reverse; gap: 6px; }
.vsl-proof__grid dd { margin: 0; font-size: clamp(1.9rem, 5.5vw, 2.9rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1; color: var(--vsl-ink); font-variant-numeric: tabular-nums; display: inline-block; }
.vsl-proof__grid dt { font-size: 0.82rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--vsl-muted); }
@media (min-width: 760px) { .vsl-proof__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } .vsl-proof__grid > div + div { padding-left: 24px; border-left: 1px solid var(--vsl-line); } }

/* ---------- Your host + location --------------------------------------------- */
.vsl-host__grid { display: grid; gap: clamp(28px, 5vw, 64px); align-items: center; }
.vsl-host__photo { border-radius: 28px; overflow: hidden; background: var(--vsl-mist); aspect-ratio: 4 / 3; }
.vsl-host__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }
.vsl-host__actions { margin-top: 28px; }
.vsl-host__place { margin-top: 34px; padding: 22px 24px; border-radius: 22px; background: var(--vsl-sand); max-width: 440px; }
.vsl-host__label { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--vsl-red); margin-bottom: 6px; }
.vsl-host__address { font-weight: 600; color: var(--vsl-ink); margin-bottom: 12px; line-height: 1.45; }
@media (min-width: 900px) { .vsl-host__grid { grid-template-columns: 0.95fr 1.05fr; } }
