/* Mobile scenes use the browser's native scroll and snap behavior. The minimum
   height creates a full frame while longer editor content can still grow. */
@media (max-width:1199px), (pointer:coarse) {
  html.v4-mobile-scenes { scroll-snap-type:y mandatory; }
  .v4-body:has(.v4-home)>.v4-header { position:fixed; inset:0 0 auto; z-index:40; box-shadow:0 1px 0 #38252d0a; }
  .v4-body:has(.v4-home)>.v4-preview-note { position:relative; z-index:41; }
  .v4-body .v4-home .v4-scene {
    --v4-mobile-gutter:clamp(24px,6vw,48px);
    width:100%; max-width:none; height:auto; min-height:100svh; margin:0;
    padding:calc(var(--v4-header-height,72px) + 32px) var(--v4-mobile-gutter) calc(76px + env(safe-area-inset-bottom,0px));
    position:relative; overflow:clip; scroll-snap-align:start; scroll-snap-stop:always;
  }
  .v4-body .v4-home .v4-home-component-scene[data-v4-scene-scroll] { overflow:clip; overscroll-behavior:auto; }
  .v4-body .v4-home .v4-home-part,.v4-body .v4-home .v4-home-component-scene>.v4-module { min-width:0; grid-column:1/-1; }
  .v4-body .v4-home .v4-home-custom { display:grid; grid-template-columns:minmax(0,1fr); align-content:center; gap:32px; }
  .v4-body .v4-home .v4-home-custom-content { max-height:none; overflow:visible; padding:0; }
  .v4-home-scene-canvas .v4-scene { height:auto!important; min-height:100svh!important; }
  .v4-home-scene-canvas .v4-home-hero { height:max(620px,100svh)!important; }
  html.v4-scene-mode .v4-body .v4-home-component-scene:is(.v4-home-mission,.v4-home-impact) { display:flex; }

  /* The opening image fills the space below the header. Text, decoration and
     carousel controls each have their own vertical space. */
  .v4-body .v4-home .v4-home-hero { height:max(620px,100svh); min-height:100svh; padding:0; }
  .v4-body .v4-home-hero>.v4-slides { top:var(--v4-header-height,72px); }
  .v4-body .v4-home .v4-home-hero-copy { top:auto; bottom:clamp(134px,19svh,184px); left:8%; right:8%; text-align:right; }
  .v4-body .v4-home .v4-home-hero-copy--left { right:8%!important; text-align:left; }
  .v4-body .v4-home .v4-home-hero-copy--center { text-align:center; }
  .v4-body .v4-home .v4-home-hero-copy h1 { font-size:var(--module-title-size,clamp(30px,6vw,42px)); line-height:1.5; text-wrap:balance; }
  .v4-body .v4-home .v4-home-hero-copy>p { margin:18px 0 26px; line-height:1.8; }
  .v4-body .v4-home .v4-home-flower-yellow { width:clamp(54px,15vw,90px); bottom:78px; left:8%; }
  .v4-body .v4-home .v4-home-flower-red { width:clamp(140px,36vw,240px); bottom:-30px; left:-12%; }
  .v4-body .v4-slide[data-v4-position="left"]>.v4-home-flower-yellow { left:auto; right:8%; }
  .v4-body .v4-slide[data-v4-position="left"]>.v4-home-flower-red { left:auto; right:-12%; }
  .v4-body .v4-home .v4-slide-dots { bottom:88px; }

  /* Introduction above, impact figures below, with a deliberate reading pause. */
  .v4-body .v4-home .v4-home-mission { display:flex; flex-direction:column; justify-content:center; gap:clamp(32px,6svh,56px); }
  .v4-body .v4-home .v4-mission-copy { width:100%; max-width:580px; padding:0; margin-inline:auto; }
  .v4-body .v4-home .v4-mission-copy h2 { font-size:var(--module-title-size,clamp(26px,5vw,34px)); line-height:1.5; }
  .v4-body .v4-home .v4-mission-copy h3 { font-size:var(--module-title-size,24px); margin:24px 0 14px; }
  .v4-body .v4-home .v4-home-mission-body { font-size:var(--module-body-size,16px); line-height:1.9; }
  .v4-body .v4-home .v4-mission-copy ul { font-size:inherit; margin:0 0 22px; line-height:1.9; }
  .v4-body .v4-home .v4-mission-more { font-size:var(--module-body-size,14px); line-height:1.8; gap:14px; }
  .v4-body .v4-home .v4-mission-more b { flex-shrink:0; }
  .v4-body .v4-home .v4-home-metrics { width:100%; max-width:580px; margin:0 auto; padding-top:30px; border-top:1px solid #eee8eb; gap:24px 18px; }
  .v4-body .v4-home .v4-home-metrics h3 { font-size:var(--module-title-size,14px); min-height:0; line-height:1.6; }
  .v4-body .v4-home .v4-home-metrics strong { font-size:clamp(27px,7vw,40px); line-height:1.5; }
  .v4-body .v4-home .v4-home-metrics>div:first-child strong { font-size:clamp(38px,10vw,54px); }
  .v4-body .v4-home .v4-mission-flower { width:90px; right:-22px; top:calc(var(--v4-header-height,72px) + 16px); }

  /* A generous story image and a separate, continuously moving article strip. */
  .v4-body .v4-home .v4-home-stories { display:flex; flex-direction:column; justify-content:center; gap:28px; padding-inline:0; }
  .v4-body .v4-home .v4-story-banner { flex:none; width:100%; height:clamp(320px,47svh,500px); min-height:320px; margin:0; }
  .v4-body .v4-home .v4-story-banner>img { width:100%; object-position:62% center; }
  .v4-body .v4-home .v4-story-banner:after { background:linear-gradient(180deg,#fffffff0 0%,#ffffffb8 22%,#ffffff00 62%,#fff 100%); }
  .v4-body .v4-home .v4-story-banner>div { width:100%; max-width:680px; padding:20px var(--v4-mobile-gutter); }
  .v4-body .v4-home .v4-story-heading,.v4-body .v4-home .v4-story-banner h2 { font-size:var(--module-title-size,28px); line-height:1.6; margin:0 0 20px; }
  .v4-body .v4-home .v4-story-track { flex:none; width:100%; margin:0; padding:0 var(--v4-mobile-gutter) 12px; gap:16px; }
  .v4-body .v4-home .v4-story-card { flex:0 0 min(82vw,360px); min-height:164px; }
  .v4-body .v4-home .v4-story-card>img { width:37%; }
  .v4-body .v4-home .v4-story-card>div { padding:18px 16px; }
  .v4-body .v4-home .v4-story-card h3 { font-size:var(--module-title-size,16px); }
  .v4-body .v4-home .v4-story-summary,.v4-body .v4-home .v4-story-card p { font-size:var(--module-body-size,12px); line-height:1.7; margin-top:10px; -webkit-line-clamp:3; }

  /* The map gets a full row; the two project entrances share the next row. */
  .v4-body .v4-home .v4-home-impact { display:flex; flex-direction:column; justify-content:center; gap:28px; }
  .v4-body .v4-home .v4-home-map { width:100%; max-width:600px; margin-inline:auto; }
  .v4-body .v4-home .v4-home-map svg { display:block; width:100%; height:clamp(200px,27svh,300px); }
  .v4-body .v4-home .v4-home-map>p { font-size:var(--module-body-size,12px); line-height:1.7; margin-top:12px; }
  .v4-body .v4-home .v4-map-detail { min-height:32px; font-size:12px; padding-top:8px; line-height:1.7; }
  .v4-body .v4-home .v4-impact-side { width:100%; max-width:580px; margin-inline:auto; padding:0; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
  .v4-body .v4-home .v4-impact-side>h2 { grid-column:1/-1; margin:0; font-size:var(--module-title-size,28px); text-align:center; }
  .v4-body .v4-home .v4-impact-metrics { grid-column:1/-1; margin:0 0 4px; justify-content:center; gap:20px; }
  .v4-body .v4-home .v4-impact-metrics p { font-size:var(--module-body-size,12px); }
  .v4-body .v4-home .v4-impact-metrics strong { font-size:24px; margin-left:4px; }
  .v4-body .v4-home .v4-project-card { flex-direction:column; align-items:stretch; height:auto; margin:0; }
  .v4-body .v4-home .v4-project-card>img { width:100%; height:90px; }
  .v4-body .v4-home .v4-project-card>div { padding:14px 12px; }
  .v4-body .v4-home .v4-project-card h3 { font-size:var(--module-title-size,16px); min-height:3.2em; }
  .v4-body .v4-home .v4-project-card span { font-size:var(--module-body-size,12px); margin-top:10px; }

  /* The closing scene keeps its full contact information and navigation. */
  .v4-body .v4-home .v4-home-contact { display:flex; flex-direction:column; justify-content:space-between; gap:clamp(36px,6svh,64px); padding-inline:0; padding-bottom:0; }
  .v4-body .v4-home .v4-home-slogan { width:100%; padding:24px var(--v4-mobile-gutter); }
  .v4-body .v4-home .v4-home-slogan h2 { font-size:var(--module-title-size,clamp(28px,5vw,38px)); line-height:1.6; }
  .v4-body .v4-home .v4-home-slogan-body,.v4-body .v4-home .v4-home-slogan>p { font-size:var(--module-body-size,14px); line-height:1.8; margin-top:20px; }
  .v4-body .v4-home .v4-home-contact .v4-footer { width:100%; }
  .v4-body .v4-home .v4-footer-inner { width:100%; max-width:720px; padding:36px var(--v4-mobile-gutter) calc(84px + env(safe-area-inset-bottom,0px)); }
  .v4-body .v4-home .v4-footer-columns { margin-block:32px; gap:28px 24px; }
  .v4-body .v4-home .v4-footer-columns>div { gap:12px; }

  /* A small chapter selector makes the five scenes visible and reachable. */
  html.v4-mobile-scenes .v4-scene-nav {
    display:flex!important; top:auto; right:auto; left:50%; bottom:calc(12px + env(safe-area-inset-bottom,0px));
    transform:translateX(-50%); flex-direction:row; gap:0; max-width:calc(100% - 32px); overflow-x:auto;
    padding:3px; border:1px solid #eee8eb; border-radius:28px; background:#fffffff2; box-shadow:0 3px 16px #38252d0d;
  }
  html.v4-mobile-scenes .v4-scene-nav a { flex:0 0 42px; width:42px; height:38px; border:0; border-radius:22px; background:transparent; color:#80737a; transform:none; font-size:11px; }
  html.v4-mobile-scenes .v4-scene-nav a.is-current { background:var(--red); color:#fff; }
  html.v4-mobile-scenes .v4-scene-nav.is-on-color { background:#ffffffed; }
  .v4-body:has(.v4-home)>.v4-backtop { display:none; }
  .v4-body:has(.v4-navigation.is-open) .v4-scene-nav { visibility:hidden; }
}
@media (max-width:600px) and (max-height:740px) {
  .v4-body .v4-home .v4-scene { padding-top:calc(var(--v4-header-height,72px) + 24px); }
  .v4-body .v4-home .v4-home-hero { padding-top:0; }
  .v4-body .v4-home .v4-home-mission { gap:28px; }
  .v4-body .v4-home .v4-home-metrics { padding-top:24px; gap:18px; }
  .v4-body .v4-home .v4-story-banner { height:320px; }
}
@media (prefers-reduced-motion:no-preference) {
  html.v4-mobile-scenes { scroll-behavior:smooth; }
}
