/* Crestline Credit Union — v1 visual design
   Self-contained: no external fonts or assets. */

:root {
    --navy: #1b3a5c;
    --navy-dark: #12283f;
    --navy-soft: #24486d;
    --green: #2e7d5b;
    --green-dark: #22614a;
    --green-light: #e9f3ee;
    --sky: #dcecf5;
    --cream: #faf7f2;
    --gold: #c9a227;
    --gray: #f4f6f8;
    --text: #22303c;
    --muted: #64748b;
    --border: #dde4ea;
    --shadow: 0 2px 8px rgba(18, 40, 63, 0.08), 0 8px 24px rgba(18, 40, 63, 0.06);
    --radius: 10px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text);
    background: #fff;
    line-height: 1.65;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; color: var(--navy); line-height: 1.25; }
h1 { font-size: 2.1rem; margin-bottom: 14px; letter-spacing: -0.01em; }
h2 { font-size: 1.45rem; margin: 30px 0 12px; }
h3 { font-size: 1.12rem; margin-bottom: 8px; }
p { margin-bottom: 12px; }
a { color: var(--green); }
.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.page { padding: 44px 24px 64px; }
.page.narrow { max-width: 680px; }

.icon { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.3em; }

/* ---------- Header ---------- */
.site-header {
    background: var(--navy);
    padding: 0;
    position: sticky; top: 0; z-index: 50;
    box-shadow: 0 1px 0 rgba(255,255,255,0.08) inset, 0 2px 12px rgba(18,40,63,0.35);
}
.topbar {
    background: var(--navy-dark);
    color: #9fb6c9; text-align: center;
    font-size: 0.8rem; padding: 5px 16px;
    font-family: Helvetica, Arial, sans-serif;
}
.header-inner {
    max-width: 1080px; margin: 0 auto; padding: 12px 24px;
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.brand-mark { width: 44px; height: 44px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { color: #fff; font-family: Georgia, serif; font-size: 1.18rem; font-weight: bold; letter-spacing: 0.01em; }
.brand-sub { color: #9fb6c9; font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; font-family: Helvetica, Arial, sans-serif; }

.main-nav { display: flex; align-items: center; gap: 22px; }
.main-nav > a { color: #dbe6f0; text-decoration: none; font-size: 0.95rem; padding: 6px 0; border-bottom: 2px solid transparent; }
.main-nav > a:hover { color: #fff; border-bottom-color: var(--gold); }
.main-nav > a.btn { padding: 10px 22px; border-bottom: none; }
.nav-cta { margin-left: 6px; }

.nav-toggle {
    display: none; background: none; border: 1px solid #46658a; border-radius: 6px;
    color: #dbe6f0; padding: 8px 10px; cursor: pointer; font-size: 1.05rem; line-height: 1;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-block; padding: 11px 24px; border-radius: 8px;
    font-size: 0.95rem; font-weight: 600; text-decoration: none; border: none;
    cursor: pointer; transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
    font-family: inherit;
}
.btn-primary {
    background: linear-gradient(180deg, var(--green), var(--green-dark));
    color: #fff; box-shadow: 0 2px 6px rgba(34, 97, 74, 0.35);
}
.btn-primary:hover { background: var(--green-dark); transform: translateY(-1px); box-shadow: 0 4px 10px rgba(34, 97, 74, 0.4); }
.btn-secondary { background: transparent; color: var(--navy); border: 1.5px solid var(--navy); }
.btn-secondary:hover { background: var(--navy); color: #fff; }
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { background: #b18d1f; }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    background: var(--navy) url("/static/hero.webp") center 62% / cover no-repeat;
    overflow: hidden;
}
.hero::before {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(100deg,
        rgba(18, 40, 63, 0.92) 0%,
        rgba(18, 40, 63, 0.72) 45%,
        rgba(18, 40, 63, 0.28) 100%);
}
.hero-inner {
    position: relative; z-index: 1;
    max-width: 1080px; margin: 0 auto;
    padding: 96px 24px 104px;
}
.hero h1 { font-size: 2.5rem; color: #fff; margin-bottom: 16px; text-shadow: 0 1px 8px rgba(0,0,0,0.35); }
.hero p { max-width: 470px; color: #dce7f0; font-size: 1.06rem; }
.hero-actions { margin-top: 24px; display: flex; gap: 12px; flex-wrap: wrap; }
.btn-outline { background: rgba(255,255,255,0.08); color: #fff; border: 1.5px solid rgba(255,255,255,0.65); backdrop-filter: blur(2px); }
.btn-outline:hover { background: rgba(255,255,255,0.2); }

.notice-bar {
    background: #fdf6e3; border-bottom: 1px solid #eee3c2;
    padding: 9px 24px; text-align: center; font-size: 0.88rem; color: #6b5d2e;
    font-family: Helvetica, Arial, sans-serif;
}
.notice-bar a { color: #6b5d2e; font-weight: 600; }

/* ---------- Sections / cards ---------- */
.section { padding: 46px 0; }
.section.alt { background: var(--gray); }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 34px; }
.section-head p { color: var(--muted); }

.feature-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 22px; }
.card {
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
    padding: 26px 24px; box-shadow: var(--shadow);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 6px 16px rgba(18,40,63,0.12), 0 14px 34px rgba(18,40,63,0.08); }
.card-icon {
    width: 46px; height: 46px; border-radius: 12px; background: var(--green-light);
    color: var(--green); display: flex; align-items: center; justify-content: center;
    margin-bottom: 14px;
}
.card-icon .icon { width: 24px; height: 24px; }
.rate { font-size: 2rem; font-weight: bold; color: var(--green); font-family: Georgia, serif; }
.rate span { font-size: 0.85rem; color: var(--muted); font-weight: normal; }

.value-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 26px; }
.value { text-align: center; padding: 0 10px; }
.value .card-icon { margin: 0 auto 12px; }

/* ---------- Tables ---------- */
table { width: 100%; border-collapse: collapse; margin: 14px 0 26px; font-size: 0.94rem; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); }
th { background: var(--navy); color: #fff; font-weight: 600; font-size: 0.85rem; letter-spacing: 0.03em; text-transform: uppercase; }
tbody tr:nth-child(even) { background: var(--gray); }
tbody tr:hover { background: var(--green-light); }
td strong { color: var(--green); }
.chip {
    display: inline-block; background: var(--gold); color: #fff; font-size: 0.68rem;
    font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
    border-radius: 999px; padding: 2px 10px; margin-left: 8px; vertical-align: 1px;
}

/* ---------- Forms ---------- */
.login-form { display: flex; flex-direction: column; gap: 8px; max-width: 380px; }
.login-form label { font-size: 0.88rem; color: var(--muted); font-weight: 600; }
.login-form input {
    padding: 11px 14px; border: 1.5px solid var(--border); border-radius: 8px;
    font-size: 1rem; font-family: inherit; transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.login-form input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(46,125,91,0.15); }
.login-form .btn { margin-top: 12px; align-self: flex-start; }

.alert {
    background: #fdf0ef; border: 1px solid #e4b6b2; color: #8c3a33;
    padding: 12px 16px; border-radius: 8px; margin: 16px 0; font-size: 0.93rem;
}

/* ---------- Login split layout ---------- */
.login-wrap {
    display: grid; grid-template-columns: 1fr 1.1fr; min-height: 480px;
    border-radius: 14px; overflow: hidden; box-shadow: var(--shadow);
    border: 1px solid var(--border); max-width: 920px; margin: 0 auto;
}
.login-aside {
    background: linear-gradient(160deg, var(--navy), var(--navy-soft));
    color: #fff; padding: 42px 36px; display: flex; flex-direction: column; justify-content: space-between;
}
.login-aside h2 { color: #fff; margin-top: 18px; }
.login-aside p { color: #b9c8d6; font-size: 0.95rem; }
.login-aside .icon { width: 34px; height: 34px; color: var(--gold); }
.login-main { padding: 42px 38px; background: #fff; }

/* ---------- Branch cards ---------- */
.branch-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; }
.branch-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.branch-card h3 { display: flex; align-items: center; gap: 9px; }
.branch-card .icon { color: var(--green); width: 20px; height: 20px; }
.branch-card p { font-size: 0.95rem; color: #44546a; margin-bottom: 6px; }

/* ---------- Result panel ---------- */
.result-panel { border-left: 4px solid var(--green); }

/* ---------- Cookie bar ---------- */
.cookie-bar {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 90;
    background: var(--navy-dark); color: #cfdce8;
    display: none; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap;
    padding: 12px 20px; font-size: 0.88rem; font-family: Helvetica, Arial, sans-serif;
    box-shadow: 0 -4px 16px rgba(0,0,0,0.25);
}
.cookie-bar button {
    background: var(--green); color: #fff; border: none; border-radius: 6px;
    padding: 8px 18px; cursor: pointer; font-size: 0.88rem; font-weight: 600;
}
.cookie-bar button:hover { background: var(--green-dark); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-dark); color: #b9c8d6; margin-top: 70px; padding: 44px 0 26px; font-size: 0.9rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; margin-bottom: 30px; }
.footer-grid h4 { color: #fff; font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 12px; font-family: Helvetica, Arial, sans-serif; }
.footer-grid a { color: #b9c8d6; text-decoration: none; display: block; margin-bottom: 7px; }
.footer-grid a:hover { color: #fff; }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.footer-brand .brand-mark { width: 38px; height: 38px; }
.footer-badges { display: flex; gap: 14px; align-items: center; margin-top: 16px; }
.badge {
    display: inline-flex; align-items: center; gap: 7px;
    border: 1px solid #3d5a7a; border-radius: 6px; padding: 6px 11px;
    font-size: 0.72rem; color: #cfdce8; font-family: Helvetica, Arial, sans-serif;
}
.badge .icon { width: 17px; height: 17px; }
.footer-legal { border-top: 1px solid #2c4665; padding-top: 18px; font-size: 0.8rem; color: #8fa5b8; }
.footer-legal p { margin-bottom: 6px; }

.disclaimer { font-size: 0.83rem; color: var(--muted); font-style: italic; }
.fineprint { font-size: 0.82rem; color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
    .hero::before { background: rgba(18, 40, 63, 0.8); }
    .hero-inner { padding: 64px 24px 72px; }
    .hero h1 { font-size: 2rem; }
    .login-wrap { grid-template-columns: 1fr; }
    .login-aside { display: none; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .nav-toggle { display: inline-block; }
    .main-nav {
        display: none; position: absolute; top: 100%; left: 0; right: 0;
        background: var(--navy-dark); flex-direction: column; align-items: stretch;
        padding: 16px 24px 22px; gap: 4px; box-shadow: 0 12px 20px rgba(0,0,0,0.3);
    }
    .main-nav.open { display: flex; }
    .main-nav > a { padding: 11px 6px; border-bottom: none; }
    .main-nav > a:hover { background: rgba(255,255,255,0.06); border-radius: 6px; }
    .nav-cta { margin: 10px 6px 0; }
}

@media (max-width: 520px) {
    h1 { font-size: 1.7rem; }
    .hero h1 { font-size: 1.9rem; }
    .footer-grid { grid-template-columns: 1fr; }
    th, td { padding: 9px 10px; }
}