/* Public landing page: in-page jumps, and the social-proof strip. The numbers only render once they carry weight. Thin numbers are worse than none, so every block has a threshold and the section stays hidden below it. The static trust row is always there. */ document.addEventListener( 'DOMContentLoaded', function(){ qsa( 'a[href^="#"]' ).forEach( function( link ){ link.addEventListener( 'click', function( event ){ const target = qs( link.getAttribute( 'href' ) ); if ( !target ) return; event.preventDefault(); target.scrollIntoView( { behavior: 'smooth', block: 'start' } ); } ); } ); loadProof(); } ); function loadProof(){ api( '/stats', 'GET', null, { silent: true, noBounce: true } ) .then( function( stats ){ const tiles = []; if ( ( stats.travellers || 0 ) >= 25 ){ tiles.push( { value: stats.travellers, label: 'verified travellers' } ); } if ( ( stats.trips_upcoming || 0 ) >= 10 ){ tiles.push( { value: stats.trips_upcoming, label: 'upcoming trips' } ); } if ( ( stats.cities_30d || 0 ) >= 5 ){ tiles.push( { value: stats.cities_30d, label: 'cities the next 30 days' } ); } if ( ( stats.connections || 0 ) >= 10 ){ tiles.push( { value: stats.connections, label: 'connections made' } ); } const strip = qs( '#stat-strip' ); if ( tiles.length >= 2 ){ strip.innerHTML = tiles.map( function( tile ){ return '