/* ==========================================================================
   Kingdom Life SACCO Society - Clean Member Portal Styles
   ========================================================================== */

:root {
    --navy-dark: #071527;
    --navy-header: #0b1a30;
    --navy-accent: #132a4a;
    --gold: #fdb022;
    --gold-hover: #e59a0e;
    --green: #147d64;
    --ink: #0f172a;
    --muted: #475467;
    --muted-light: #64748b;
    --line: #e2e8f0;
    --paper: #ffffff;
    --surface: #f8fafc;
    
    --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-main);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ==========================================================================
   Header & Brand Navigation
   ========================================================================== */
.site-header {
    position: fixed;
    z-index: 100;
    top: 0;
    right: 0;
    left: 0;
    height: 80px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    transition: background-color 200ms ease, border-color 200ms ease, box-shadow 200ms ease, height 200ms ease;
}

.site-header.is-scrolled {
    height: 72px;
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--ink);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.header-container {
    width: min(1200px, 92vw);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: inherit;
    text-decoration: none;
}

/* Round logo crop to remove white square corners over hero image */
.brand-logo {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    background: #ffffff;
    padding: 2px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: transform 150ms ease;
}

.site-header.is-scrolled .brand-logo {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.site-brand:hover .brand-logo {
    transform: scale(1.05);
}

.brand-name {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.site-header nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

.site-header nav a {
    font-size: 0.9375rem;
    font-weight: 600;
    color: inherit;
    transition: opacity 150ms ease;
}

.site-header nav a:hover {
    opacity: 0.85;
}

.site-header .nav-action {
    padding: 10px 20px;
    border: 1.5px solid currentColor;
    border-radius: 8px;
    transition: all 150ms ease;
}

.site-header .nav-action:hover {
    background: rgba(255, 255, 255, 0.15);
}

.site-header.is-scrolled .nav-action {
    border-color: var(--navy-header);
    background: var(--navy-header);
    color: #ffffff;
}

.site-header.is-scrolled .nav-action:hover {
    background: var(--navy-accent);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    position: relative;
    min-height: 86vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    color: #ffffff;
    background: var(--navy-dark);
}

.hero-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 35%;
    opacity: 0.45;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, 
        rgba(7, 21, 39, 0.65) 0%, 
        rgba(7, 21, 39, 0.85) 70%, 
        rgba(7, 21, 39, 0.95) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(720px, 90vw);
    margin-left: max(4vw, calc((100vw - 1200px) / 2));
    padding: 140px 0 80px;
}

.hero h1 {
    font-size: clamp(2.4rem, 4.5vw, 3.6rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: #ffffff;
    margin-bottom: 20px;
}

.hero p {
    font-size: clamp(1.1rem, 2vw, 1.25rem);
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.6;
    margin-bottom: 32px;
    max-width: 620px;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.button {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    padding: 12px 26px;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid transparent;
    transition: all 150ms ease;
    cursor: pointer;
}

.button-primary {
    background: var(--gold);
    color: #1a1200;
    box-shadow: 0 2px 8px rgba(253, 176, 34, 0.25);
}

.button-primary:hover {
    background: var(--gold-hover);
    transform: translateY(-1px);
}

.button-secondary {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    backdrop-filter: blur(4px);
}

.button-secondary:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.6);
}

.button-light {
    background: #ffffff;
    color: var(--navy-header);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.button-light:hover {
    background: #f1f5f9;
}

.button-outline-light {
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    color: #ffffff;
}

.button-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #ffffff;
}

/* ==========================================================================
   Services Section
   ========================================================================== */
.services {
    width: min(1200px, 92vw);
    margin: 0 auto;
    padding: 96px 0;
}

.section-heading {
    margin-bottom: 56px;
    max-width: 680px;
}

.section-heading h2 {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    font-weight: 800;
    color: var(--ink);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.section-heading p {
    font-size: 1.1rem;
    color: var(--muted);
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.service-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 36px 30px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -4px rgba(15, 23, 42, 0.08);
    border-color: #cbd5e1;
    background: #ffffff;
}

.service-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.service-number {
    font-size: 0.875rem;
    font-weight: 800;
    color: var(--green);
    letter-spacing: 0.05em;
}

.service-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--ink);
}

.service-card p {
    font-size: 0.95rem;
    color: var(--muted);
    line-height: 1.6;
}

/* ==========================================================================
   Access Band Section
   ========================================================================== */
.access-band {
    background: var(--navy-header);
    color: #ffffff;
    padding: 80px 0;
}

.access-band .access-content {
    max-width: 640px;
}

.access-band {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(1200px, 92vw);
    margin: 0 auto;
    border-radius: 16px;
    padding: 56px 64px;
    box-shadow: 0 20px 40px -10px rgba(11, 26, 48, 0.3);
}

.access-band h2 {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 10px;
}

.access-band p {
    font-size: 1.05rem;
    color: #cbd5e1;
}

.access-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    background: #050d18;
    color: #94a3b8;
    padding-top: 64px;
    padding-bottom: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-container {
    width: min(1200px, 92vw);
    margin: 0 auto;
}

.footer-main {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-brand-info {
    max-width: 400px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #ffffff;
    margin-bottom: 16px;
}

.footer-brand .brand-name {
    font-size: 1.1rem;
    font-weight: 700;
}

.footer-brand-info p {
    font-size: 0.9375rem;
    color: #94a3b8;
    line-height: 1.6;
}

.footer-nav {
    display: flex;
    gap: 64px;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-col h4 {
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #ffffff;
    margin-bottom: 4px;
}

.footer-col a {
    font-size: 0.9375rem;
    color: #94a3b8;
    transition: color 150ms ease;
}

.footer-col a:hover {
    color: #ffffff;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding-top: 28px;
    font-size: 0.875rem;
    color: #64748b;
}

.footer-legal {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.footer-credit {
    white-space: nowrap;
}

.footer-credit a {
    color: #94a3b8;
    font-weight: 600;
    transition: color 150ms ease;
}

.footer-credit a:hover,
.footer-credit a:focus-visible {
    color: #ffffff;
}

.staff-link {
    color: #94a3b8;
    font-weight: 600;

}

.staff-link:hover {
    color: #ffffff;
}

/* ==========================================================================
   Responsive Queries
   ========================================================================== */
@media (max-width: 900px) {
    .service-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .access-band {
        flex-direction: column;
        align-items: flex-start;
        gap: 28px;
        padding: 40px 32px;
    }

    .footer-main {
        flex-direction: column;
        gap: 36px;
    }

    .footer-nav {
        gap: 40px;
    }
}

@media (max-width: 640px) {
    .site-header,
    .site-header.is-scrolled {
        height: auto;
        min-height: 72px;
        padding: 8px 0;
    }

    .header-container {
        width: calc(100% - 24px);
        gap: 8px;
    }

    .site-brand {
        min-width: 0;
        flex: 1 1 auto;
        gap: 8px;
    }

    .brand-logo {
        width: 38px;
        height: 38px;
        flex: 0 0 38px;
    }

    .brand-name {
        min-width: 0;
        max-width: 120px;
        font-size: 0.78rem;
        line-height: 1.18;
    }

    .site-header nav {
        flex: 0 0 auto;
        gap: 8px;
    }

    .site-header nav a {
        font-size: 0.76rem;
        line-height: 1.2;
        white-space: nowrap;
    }

    .site-header .nav-action {
        padding: 8px 10px;
    }

    .site-header nav a:first-child {
        display: none;
    }

    .hero-content {
        padding: 120px 0 60px;
    }

    .hero-actions,
    .access-actions {
        width: 100%;
        flex-direction: column;
    }

    .hero-actions .button,
    .access-actions .button {
        width: 100%;
    }

    .footer-nav {
        flex-direction: column;
        gap: 28px;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .footer-legal {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .footer-credit {
        white-space: normal;
    }
}

@media (max-width: 380px) {
    .brand-name {
        max-width: 96px;
        font-size: 0.72rem;
    }

    .site-header nav {
        gap: 6px;
    }

    .site-header nav a {
        font-size: 0.7rem;
    }

    .site-header .nav-action {
        padding-right: 8px;
        padding-left: 8px;
    }
}
