
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<!-- Final viewport to prevent zoom & ensure fit on iOS/Android -->
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, viewport-fit=cover" />
<title>@DEAD_KRISH ADS</title>
<meta name="theme-color" content="#0b0f14" />
<meta name="description" content="Colour Trading • Live SureShots" />
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<link rel="preconnect" href="https://connect.facebook.net" crossorigin>

<style>
  /* --- Reset & mobile fixes --- */
  *,*::before,*::after{box-sizing:border-box}
  html,body{height:100%;min-height:100%;margin:0;padding:0;overflow-x:hidden;background:linear-gradient(120deg,#020317,#041027);-webkit-text-size-adjust:100%;}
  body{color:#fff;font-family:Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial;display:flex;align-items:center;justify-content:center;padding:18px;}

  .scene{width:100%;max-width:460px;display:flex;align-items:center;justify-content:center;position:relative;min-height:100vh;padding:18px 12px;box-sizing:border-box;overscroll-behavior-y:contain;}
  .card{width:100%;max-width:440px;border-radius:22px;padding:18px;text-align:center;background:linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.02));border:1px solid rgba(255,255,255,0.03);box-shadow:0 20px 60px rgba(0,0,0,0.7);position:relative;overflow:hidden;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);}

  .card:before{content:"";position:absolute;inset:-2px;border-radius:24px;background:linear-gradient(90deg, rgba(255,59,122,0.9), rgba(255,184,74,0.9));filter:blur(16px);opacity:0.28;z-index:-2;pointer-events:none;animation:borderShift 8s linear infinite;}
  @keyframes borderShift{0%{transform:rotate(0)}50%{transform:rotate(180deg)}100%{transform:rotate(360deg)}}

  /* logo */
  .logo-wrap{width:110px;height:110px;margin:0 auto 8px;position:relative;display:flex;align-items:center;justify-content:center;}
  .logo{width:100%;height:100%;object-fit:contain;border-radius:50%;display:block;filter:drop-shadow(0 8px 28px rgba(255,40,110,0.22));background:radial-gradient(circle at 30% 30%, rgba(255,255,255,0.02), rgba(0,0,0,0.06));padding:10px;}
  .logo-mask{position:absolute;inset:0;border-radius:50%;background:radial-gradient(circle at 30% 30%, rgba(255,59,122,0.32), rgba(255,184,74,0.14));mix-blend-mode:screen;filter:blur(8px);pointer-events:none;animation:maskPulse 3.6s ease-in-out infinite;}
  @keyframes maskPulse{0%{opacity:0.95;transform:scale(1)}50%{opacity:0.6;transform:scale(1.03)}100%{opacity:0.95;transform:scale(1)}}
  .avatar-halo{position:absolute;inset:-18px;border-radius:50%;background:radial-gradient(circle at 30% 30%, rgba(255,59,122,0.18), rgba(255,184,74,0.06));filter:blur(18px);z-index:-1;animation:halo 4s ease-in-out infinite;}
  @keyframes halo{0%{opacity:0.9}50%{opacity:0.45}100%{opacity:0.9}}

  h1{margin:6px 0 4px;font-size:30px;line-height:1.02;color:#ff3b7a;font-weight:900;letter-spacing:1px;text-shadow:0 6px 24px rgba(255,60,110,0.14);}
  .sub{color:#c6bdc6;font-size:13.5px;margin-bottom:10px;}

  .divider{height:4px;width:64px;margin:10px auto;border-radius:10px;background:linear-gradient(90deg,#ff3b7a,#ffb84a);box-shadow:0 8px 28px rgba(255,60,110,0.08);}

  .cta-wrap{margin-top:8px;margin-bottom:6px;display:flex;flex-direction:column;align-items:center;gap:10px;width:100%;}
  /* Make join very clickable: full-width on mobile, large touch target */
  .btn-join{display:inline-flex;align-items:center;justify-content:center;gap:10px;width:100%;max-width:420px;padding:0 18px;height:64px;border-radius:14px;background:linear-gradient(90deg,#ff3b7a,#ffb84a);color:#fff;font-weight:900;font-size:17px;border:none;cursor:pointer;box-shadow:0 28px 70px rgba(255,60,110,0.18);transition:transform .12s ease,box-shadow .12s ease;-webkit-tap-highlight-color:transparent;touch-action:manipulation;}
  .btn-join:active{transform:translateY(2px) scale(.998)}
  .btn-join:before{content:"";position:absolute;left:-40%;top:-12%;width:180%;height:120%;transform:skewX(-20deg);background:linear-gradient(90deg,rgba(255,255,255,0.18),rgba(255,255,255,0.02),rgba(255,255,255,0.12));opacity:0;pointer-events:none;transition:opacity .45s}
  .btn-join.sweep:before{opacity:0.85;animation:sweep 1s linear}
  @keyframes sweep{0%{transform:translateX(-140%) skewX(-20deg)}100%{transform:translateX(140%) skewX(-20deg)}}

  .pills{display:flex;gap:10px;flex-wrap:wrap;justify-content:center;margin:10px 0 6px;}
  .pill{display:inline-flex;align-items:center;gap:10px;padding:10px 14px;border-radius:14px;background:rgba(255,255,255,0.03);border:1px solid rgba(255,255,255,0.03);color:#c6bdc6;font-weight:800;font-size:13px;box-shadow:inset 0 -6px 18px rgba(255,255,255,0.01);}

  .testi{margin-top:6px;font-weight:800;color:#ffdfe8;min-height:26px;text-align:center;padding:0 8px;}
  .count{margin-top:6px;color:#ffdfe8;font-weight:800;font-size:13px;}
  .copyright{font-size:12px;color:#b8aeb8;margin-top:12px;opacity:0.95;}

  .footer-fixed{position:fixed;left:12px;right:12px;bottom:12px;display:flex;gap:10px;justify-content:space-between;align-items:center;max-width:480px;margin:auto;z-index:9999;}
  .agency-btn{flex:1;background:rgba(255,255,255,0.03);border-radius:12px;padding:10px 12px;text-align:center;color:#ffd6a8;text-decoration:none;font-weight:800;border:1px solid rgba(255,255,255,0.04);}
  .sticky-join{flex:1;margin-left:8px;background:linear-gradient(90deg,#ff3b7a,#ffb84a);border-radius:12px;padding:10px 12px;text-align:center;color:#fff;font-weight:900;box-shadow:0 16px 44px rgba(255,60,110,0.16);touch-action:manipulation;}

  /* ensure no horizontal scroll on small screens */
  img{max-width:100%;height:auto;display:block}
  .card, .scene { -webkit-overflow-scrolling:touch; }

  @media (max-width:420px){
    .card{padding:14px;border-radius:16px;}
    h1{font-size:24px;}
    .logo-wrap{width:88px;height:88px;}
    .btn-join{height:56px;font-size:16px;}
    .footer-fixed{left:8px;right:8px;bottom:8px;}
  }
</style>

 <!-- Facebook Pixel Code -->
  <script>
    !function(f,b,e,v,n,t,s){
      if(f.fbq)return;
      n=f.fbq=function(){ n.callMethod ? n.callMethod.apply(n,arguments) : n.queue.push(arguments) };
      if(!f._fbq)f._fbq=n;
      n.push=n;
      n.loaded=!0;
      n.version='2.0';
      n.queue=[];
      t=b.createElement(e);t.async=!0;
      t.src=v;
      s=b.getElementsByTagName(e)[0];
      s.parentNode.insertBefore(t,s)
    }(window,document,'script','https://connect.facebook.net/en_US/fbevents.js');
    
    fbq('init', '1200289565250657');
    fbq('track', 'PageView');
  </script>

</head>
<body>
  <div class="scene">
    <main class="card" role="main" aria-labelledby="title">
      <div class="logo-wrap" aria-hidden="false">
        <img id="brandLogo" class="logo" src="logo.png" alt="BIGBULL LEGACY logo" />
        <div class="logo-mask" aria-hidden="true"></div>
        <div class="avatar-halo" aria-hidden="true"></div>
      </div>

      <h1 id="title">D247 AVIATOR</h1>
      <div class="sub">AVIATOR • Live Signal</div>
      <div class="divider" aria-hidden="true"></div>

      <div class="cta-wrap" role="region" aria-label="Primary call to action">
        <button id="joinBtn" class="btn-join" aria-label="Join Telegram Now">Join Telegram Now</button>

        <div class="pills" aria-hidden="true">
          <div class="pill">Verified Sureshots</div>
          <div class="pill">Daily Updates</div>
          <div class="pill">Trusted Channel</div>
        </div>

        <div class="testi" id="testimonial">"Small stake, big win. Accurate calls." — Anjali</div>
        <div class="count">Redirecting in <strong id="seconds">15</strong>s — or tap Join</div>
      </div>

      <div class="copyright">© DEAD KRISH ADS AGENCY</div>
    </main>
  </div>

  <div class="footer-fixed" aria-hidden="false">
    <a class="agency-btn" href="https://t.me/+23mZtUCo9c80OWNl" target="_blank" rel="noopener noreferrer">ADS SETUP</a>
    <button id="stickyJoin" class="sticky-join" aria-label="Join Telegram Now (sticky)">Join Now</button>
  </div>

<script>
(function(){
  'use strict';
  const TELEGRAM = "https://t.me/+a34_Qud1O0NkMDI1";
  const REDIRECT_SECONDS = 15;
  const PIXEL_EVENT = "Lead";

  let seconds = REDIRECT_SECONDS;
  let leadFired = false;
  let countdownTimer = null;

  const secEl = document.getElementById('seconds');
  const joinBtn = document.getElementById('joinBtn');
  const stickyJoin = document.getElementById('stickyJoin');
  const testiEl = document.getElementById('testimonial');
  const brandLogo = document.getElementById('brandLogo');

  // Prevent double-tap zoom
  (function(){
    let lastTouch = 0;
    document.addEventListener('touchend', function(e){
      const now = Date.now();
      if(now - lastTouch <= 300){
        e.preventDefault();
      }
      lastTouch = now;
    }, { passive: false });

    document.addEventListener('gesturestart', function(e){
      e.preventDefault();
    }, { passive: false });
  })();

  // Testimonial rotation
  const msgs = [
    `"Small stake, big win. Accurate calls." — Anjali`,
    `"I earned 3x in 20 mins." — Raghav`,
    `"These calls never miss." — Mohit`
  ];
  let ti = 0;
  const rotateTestimonial = () => {
    ti = (ti + 1) % msgs.length;
    if(!testiEl) return;
    testiEl.style.transition = 'opacity .22s';
    testiEl.style.opacity = 0;
    setTimeout(()=>{
      testiEl.textContent = msgs[ti];
      testiEl.style.opacity = 1;
    }, 220);
  };
  const testimonialInterval = setInterval(rotateTestimonial, 2800);

  // CTA sweep effect
  function doSweep(el){
    if(!el) return;
    el.classList.remove('sweep');
    void el.offsetWidth;
    el.classList.add('sweep');
  }
  setTimeout(()=> doSweep(joinBtn), 700);
  const sweepInterval = setInterval(()=> doSweep(joinBtn), 3200);

  // Safe fire lead
  function fireLead(source){
    if(leadFired) return;
    leadFired = true;
    try{
      if(typeof fbq === 'function'){
        fbq('track', PIXEL_EVENT, {source: source});
      } else if(window.fbq && typeof window.fbq === 'function'){
        window.fbq('track', PIXEL_EVENT, {source: source});
      } else {
        // fallback: send a beacon to logging endpoint (if desired)
        // navigator.sendBeacon('/lead-log', JSON.stringify({source:source, t:Date.now()}));
        console.warn('fbq not available to send Lead event.');
      }
    }catch(err){ console.warn('fireLead error', err); }
  }

  function triggerLeadAndRedirect(source){
    fireLead(source || 'auto-redirect');
    if(countdownTimer) clearInterval(countdownTimer);
    setTimeout(()=> { window.location.href = TELEGRAM; }, 350);
  }

  // click handlers
  [joinBtn, stickyJoin].forEach(btn=>{
    if(!btn) return;
    btn.addEventListener('click', (e)=>{
      e.preventDefault();
      triggerLeadAndRedirect('join-click');
    });
    btn.addEventListener('keyup', (e)=> { if(e.key === 'Enter') btn.click(); });
  });

  // logo micro interaction
  if(brandLogo){
    brandLogo.addEventListener('touchstart', ()=> brandLogo.style.transform = 'scale(1.02)');
    brandLogo.addEventListener('touchend', ()=> brandLogo.style.transform = '');
    brandLogo.addEventListener('mouseenter', ()=> brandLogo.style.transform = 'scale(1.04)');
    brandLogo.addEventListener('mouseleave', ()=> brandLogo.style.transform = '');
  }

  // Countdown start
  function startCountdown(){
    if(!secEl) return;
    secEl.textContent = seconds;
    countdownTimer = setInterval(()=>{
      seconds--;
      if(seconds <= 0){
        clearInterval(countdownTimer);
        triggerLeadAndRedirect('auto-redirect');
      } else {
        secEl.textContent = seconds;
      }
    }, 1000);
  }

  if(document.readyState === 'complete' || document.readyState === 'interactive'){
    startCountdown();
  } else {
    document.addEventListener('DOMContentLoaded', startCountdown, {once:true});
  }

  // Cleanup
  function cleanup(){
    clearInterval(testimonialInterval);
    clearInterval(sweepInterval);
    if(countdownTimer) clearInterval(countdownTimer);
  }
  window.addEventListener('pagehide', cleanup);
  window.addEventListener('beforeunload', cleanup);

  // Respect reduced motion
  if(window.matchMedia && window.matchMedia('(prefers-reduced-motion: reduce)').matches){
    document.querySelectorAll('.logo-mask, .avatar-halo, .card:before').forEach(el=> { if(el) el.style.animation = 'none'; });
    clearInterval(testimonialInterval);
    clearInterval(sweepInterval);
  }
})();
</script>

</body>
</html>
