@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&display=swap');

:root {
    --ke-black: #000000;
    --ke-red: #BE1919;
    --ke-green: #087C42;
    --ke-white: #FFFFFF;
    --ke-cream: #F7F6F2;
    --ink: #1A1A1A;
    --muted: #6b6b6b;
    --border: #e4e2dc;
    --radius: 10px;
    --shadow: 0 2px 10px rgba(0,0,0,0.06);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    background: var(--ke-cream);
    color: var(--ink);
    line-height: 1.55;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-content {
    flex: 1 0 auto;
}

h1, h2, h3, h4 {
    font-weight: 800;
    letter-spacing: -0.01em;
    margin: 0 0 .5em;
}

a { color: var(--ke-green); text-decoration: none; }
a:hover { text-decoration: underline; }

.flag-bar {
    height: 6px;
    width: 100%;
    background: repeating-linear-gradient(
        to right,
        var(--ke-black) 0, var(--ke-black) 33.33%,
        var(--ke-red) 33.33%, var(--ke-red) 66.66%,
        var(--ke-green) 66.66%, var(--ke-green) 100%
    );
}

/* ---------- Header ---------- */
.site-header {
    background: var(--ke-white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
}
.nav-wrap {
    width: 80%;
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--ink);
}
.brand-mark {
    width: 32px; height: 32px;
    flex-shrink: 0;
    display: block;
}
.brand small { display: block; font-weight: 500; font-size: .62rem; color: var(--muted); letter-spacing: .06em; }

.nav-links { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.nav-links a { color: var(--ink); font-weight: 600; font-size: .92rem; }
.nav-links a:hover { color: var(--ke-green); text-decoration: none; }
.nav-links a.btn-primary { color: var(--ke-white); }
.nav-links a.btn-primary:hover { color: var(--ke-white); }

/* Hamburger button, hidden on desktop and shown only on small screens */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    padding: 0;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    flex-shrink: 0;
}
.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 0 auto;
    background: var(--ink);
    transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.btn {
    display: inline-block;
    font-family: inherit;
    font-weight: 700;
    font-size: .9rem;
    padding: 10px 20px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    text-align: center;
}
.btn-primary { background: var(--ke-green); color: var(--ke-white); }
.btn-primary:hover { background: #066834; text-decoration: none; }
.btn-outline { background: transparent; color: var(--ke-black); border: 2px solid var(--ke-black); }
.btn-outline:hover { background: var(--ke-black); color: var(--ke-white); text-decoration: none; }
.btn-red { background: var(--ke-red); color: var(--ke-white); }
.btn-red:hover { background: #9c1414; text-decoration: none; }
.btn-block { display: block; width: 100%; }
.btn-sm { padding: 6px 14px; font-size: .8rem; }
.project-card { container-type: inline-size; }
.reaction-row { flex-wrap: nowrap; justify-content: space-between; gap: 2%; align-items: center; width: 100%; }
.reaction-row form { display: contents; }
.reaction {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font-size: clamp(.55rem, 2.6cqw, .68rem);
    font-family: inherit;
    color: var(--ke-black);
    cursor: pointer;
    white-space: nowrap;
    line-height: 1;
    flex: 0 1 auto;
    min-width: 0;
}
.reaction:hover { opacity: .7; text-decoration: none; }
.reaction.is-active { color: var(--ke-green); font-weight: 700; }
.reaction.is-active.is-negative { color: var(--ke-red); }
.reaction .emoji { font-size: clamp(.65rem, 3cqw, .85rem); line-height: 1; }

/* ---------- Layout ---------- */
.container { width: 80%; max-width: 1600px; margin: 0 auto; padding: 40px 20px; }
.container-narrow { width: 80%; max-width: 700px; margin: 0 auto; padding: 40px 20px; }
.container-wide { width: 90%; max-width: 980px; margin: 0 auto; padding: 40px 20px; }

.hero {
    background: var(--ke-black);
    color: var(--ke-white);
    padding: 70px 20px;
    position: relative;
}
.hero-inner { width: 80%; max-width: 1600px; margin: 0 auto; }
.hero-flex { display: flex; align-items: center; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.hero-text { flex: 1 1 480px; }
.hero-photo-wrap { flex: 0 0 auto; text-align: center; }
.hero-photo {
    width: 320px;
    height: 320px;
    object-fit: cover;
    border-radius: var(--radius);
    border: 4px solid var(--ke-green);
    box-shadow: var(--shadow);
}
.hero-photo-caption {
    margin-top: 10px;
    font-size: .8rem;
    color: #cfcfcf;
    text-transform: uppercase;
    letter-spacing: .08em;
}
.eyebrow {
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: .75rem;
    font-weight: 700;
    color: var(--ke-white);
    background: var(--ke-red);
    display: inline-block;
    padding: 5px 12px;
    border-radius: 999px;
    margin-bottom: 16px;
}
.hero h1 { font-size: 2.4rem; max-width: 700px; }
.hero p { max-width: 600px; color: #d9d9d9; font-size: 1.05rem; }
.hero-actions { display: flex; gap: 14px; margin-top: 26px; flex-wrap: wrap; }

/* ---------- Cards ---------- */
.card {
    background: var(--ke-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
}
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) {
    .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
    .grid-3 { grid-template-columns: minmax(0, 1fr); }
}

.section-title { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.section-title .tag {
    width: 8px; height: 28px; background: var(--ke-red); border-radius: 4px;
}

/* Position pill */
.pill {
    display: inline-block;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(8,124,66,0.1);
    color: var(--ke-green);
}

/* Aspirant / project cards */
.aspirant-card { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.aspirant-photo {
    display: block;
    width: 100%; max-width: 100%; aspect-ratio: 4/3; max-height: 260px;
    object-fit: cover; border-radius: 8px;
    background: #ddd;
}
.vote-count {
    font-weight: 800; font-size: 1.4rem; color: var(--ke-black);
}
.vote-bar-track { background: #eee; border-radius: 999px; height: 8px; overflow: hidden; }
.vote-bar-fill { height: 100%; background: var(--ke-green); }

.project-card { border-top: 4px solid var(--ke-red); }

/* ---------- Forms ---------- */
form .field { margin-bottom: 16px; }

/* Two-column form layout (used to keep tall forms like registration
   shorter). Falls back to a single column on small screens. */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 20px;
}
.form-grid .field-full { grid-column: 1 / -1; }
@media (max-width: 640px) {
    .form-grid { grid-template-columns: 1fr; }
}

select:disabled { background: #f2f1ec; color: var(--muted); cursor: not-allowed; }
label { display: block; font-weight: 600; font-size: .85rem; margin-bottom: 6px; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], select, textarea {
    width: 100%;
    font-family: inherit;
    padding: 11px 13px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: .95rem;
    background: var(--ke-white);
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--ke-green);
    box-shadow: 0 0 0 3px rgba(8,124,66,0.15);
}
textarea { min-height: 110px; resize: vertical; }

.otp-inputs { display:flex; gap:10px; }
.otp-inputs input { text-align:center; font-size:1.4rem; letter-spacing: .3em; font-weight:700; }

.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 18px; font-size: .9rem; font-weight: 600; }
.alert-success { background: rgba(8,124,66,.1); color: var(--ke-green); border: 1px solid rgba(8,124,66,.3); }
.alert-error { background: rgba(190,25,25,.08); color: var(--ke-red); border: 1px solid rgba(190,25,25,.3); }
.alert-info { background: #f1f1f1; color: #333; border: 1px solid #ddd; }

.paywall {
    text-align: center;
    padding: 40px 24px;
}
.paywall .amount { font-size: 3rem; font-weight: 800; color: var(--ke-black); }

/* ---------- Footer ---------- */
.site-footer {
    background: var(--ke-black);
    color: #ccc;
    padding: 34px 20px 20px;
    margin-top: 60px;
    font-size: .85rem;
    flex-shrink: 0;
}
.footer-inner { width: 80%; max-width: 1600px; margin: 0 auto; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
.site-footer a { color: #fff; }

.muted { color: var(--muted); font-size: .88rem; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 10px; } .mt-2 { margin-top: 20px; } .mt-3 { margin-top: 30px; }
.mb-0 { margin-bottom: 0; }
.text-center { text-align: center; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-1 { gap: 10px; }

table.data-table { width: 100%; border-collapse: collapse; }
table.data-table th, table.data-table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); font-size: .9rem; }
table.data-table th { text-transform: uppercase; font-size: .72rem; letter-spacing: .05em; color: var(--muted); }

@media (max-width: 768px) {
    .nav-toggle { display: flex; }
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        background: var(--ke-white);
        border-bottom: 1px solid var(--border);
        padding: 12px 20px 18px;
        box-shadow: var(--shadow);
    }
    .nav-links.open { display: flex; }
    .nav-links a { padding: 10px 4px; border-bottom: 1px solid var(--border); }
    .nav-links a:last-child { border-bottom: none; }
    .nav-links a.btn { text-align: center; margin-top: 6px; }
    .nav-wrap { position: relative; }
}

@media (max-width: 640px) {
    .hero h1 { font-size: 1.8rem; }
    .hero-photo { width: 220px; height: 220px; }
}
