/*
Theme Name: Nafasi Enterprise
Theme URI: https://nafasicooperative.com
Author: Nafasi Multipurpose Cooperative Society Limited
Author URI: https://nafasicooperative.com
Description: A premium organisational WordPress theme for Nafasi Multipurpose Cooperative Society Limited — investing for generations. Designed for full visual editing via Elementor and ACF.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nafasi-enterprise
Tags: cooperative, organization, society, finance, premium, custom-colors, custom-logo, custom-menu, featured-images, full-width-template, threaded-comments, translation-ready
*/

/* =============================================================
   NAFASI ENTERPRISE — GLOBAL CSS CUSTOM PROPERTIES
   Branding: Crimson · Orange · Navy · Gold · White
   ============================================================= */

:root {
    /* ── Brand Colours ── */
    --nafasi-red:          #8B1A1A;
    --nafasi-red-dark:     #6B1313;
    --nafasi-red-light:    #A82020;
    --nafasi-orange:       #E8722A;
    --nafasi-orange-dark:  #C55E1F;
    --nafasi-orange-light: #F08840;
    --nafasi-gold:         #D4A843;
    --nafasi-gold-light:   #E8C060;
    --nafasi-navy:         #1A1A2E;
    --nafasi-navy-light:   #252542;
    --nafasi-white:        #FFFFFF;
    --nafasi-off-white:    #F8F5F0;
    --nafasi-light-gray:   #F0EDEA;
    --nafasi-mid-gray:     #E0DDD8;
    --nafasi-text:         #2D2D2D;
    --nafasi-text-light:   #5A5A5A;
    --nafasi-text-muted:   #8A8A8A;

    /* ── Gradients ── */
    --gradient-primary:    linear-gradient(135deg, var(--nafasi-red) 0%, var(--nafasi-orange) 100%);
    --gradient-dark:       linear-gradient(135deg, var(--nafasi-navy) 0%, var(--nafasi-navy-light) 100%);
    --gradient-hero:       linear-gradient(160deg, rgba(26,26,46,0.85) 0%, rgba(139,26,26,0.75) 100%);

    /* ── Typography ── */
    --font-heading:        'Bricolage Grotesque', 'Plus Jakarta Sans', system-ui, sans-serif;
    --font-subheading:     'Bricolage Grotesque', 'Plus Jakarta Sans', system-ui, sans-serif;
    --font-body:           'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-accent:         'Bricolage Grotesque', sans-serif;

    --fs-xs:               0.75rem;    /* 12px */
    --fs-sm:               0.875rem;   /* 14px */
    --fs-base:             1rem;       /* 16px */
    --fs-md:               1.125rem;   /* 18px */
    --fs-lg:               1.25rem;    /* 20px */
    --fs-xl:               1.5rem;     /* 24px */
    --fs-2xl:              2rem;       /* 32px */
    --fs-3xl:              2.5rem;     /* 40px */
    --fs-4xl:              3rem;       /* 48px */
    --fs-5xl:              3.75rem;    /* 60px */

    --fw-regular:          400;
    --fw-medium:           500;
    --fw-semibold:         600;
    --fw-bold:             700;
    --fw-black:            900;

    --lh-tight:            1.2;
    --lh-snug:             1.35;
    --lh-normal:           1.6;
    --lh-relaxed:          1.75;

    /* ── Spacing ── */
    --space-1:  0.25rem;
    --space-2:  0.5rem;
    --space-3:  0.75rem;
    --space-4:  1rem;
    --space-5:  1.25rem;
    --space-6:  1.5rem;
    --space-8:  2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;
    --space-32: 8rem;

    /* ── Borders ── */
    --radius-sm:   4px;
    --radius-md:   8px;
    --radius-lg:   16px;
    --radius-xl:   24px;
    --radius-full: 9999px;

    --border-light:  1px solid var(--nafasi-mid-gray);
    --border-medium: 2px solid var(--nafasi-mid-gray);
    --border-accent: 3px solid var(--nafasi-red);

    /* ── Shadows ── */
    --shadow-sm:   0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md:   0 4px 12px rgba(0,0,0,0.10), 0 2px 4px rgba(0,0,0,0.06);
    --shadow-lg:   0 10px 30px rgba(0,0,0,0.12), 0 4px 8px rgba(0,0,0,0.08);
    --shadow-xl:   0 20px 50px rgba(0,0,0,0.15), 0 8px 16px rgba(0,0,0,0.10);
    --shadow-red:  0 8px 24px rgba(139,26,26,0.25);
    --shadow-card: 0 2px 16px rgba(0,0,0,0.08);

    /* ── Transitions ── */
    --transition-fast:   150ms ease;
    --transition-base:   250ms ease;
    --transition-slow:   400ms ease;
    --transition-bounce: 400ms cubic-bezier(0.34, 1.56, 0.64, 1);

    /* ── Layout ── */
    --container-max:   1200px;
    --container-wide:  1400px;
    --container-narrow: 800px;
    --header-height:   80px;
    --topbar-height:   44px;
}

/* =============================================================
   RESETS & BASE
   ============================================================= */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    font-size: var(--fs-base);
    font-weight: var(--fw-regular);
    line-height: var(--lh-normal);
    color: var(--nafasi-text);
    background-color: var(--nafasi-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--nafasi-red);
    text-decoration: none;
    transition: color var(--transition-base);
}

a:hover,
a:focus {
    color: var(--nafasi-orange);
}

ul, ol {
    list-style: none;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

/* =============================================================
   TYPOGRAPHY
   ============================================================= */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: var(--fw-bold);
    line-height: var(--lh-tight);
    color: var(--nafasi-navy);
    margin-bottom: var(--space-4);
}

h1 { font-size: var(--fs-5xl); }
h2 { font-size: var(--fs-4xl); }
h3 { font-size: var(--fs-3xl); }
h4 { font-size: var(--fs-2xl); }
h5 { font-size: var(--fs-xl); }
h6 { font-size: var(--fs-lg); }

p {
    margin-bottom: var(--space-4);
    line-height: var(--lh-relaxed);
    color: var(--nafasi-text);
}

p:last-child {
    margin-bottom: 0;
}

strong, b {
    font-weight: var(--fw-semibold);
}

/* =============================================================
   LAYOUT UTILITIES
   ============================================================= */

.nafasi-container {
    max-width: var(--container-max);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--space-6);
    padding-right: var(--space-6);
}

.nafasi-container--wide {
    max-width: var(--container-wide);
}

.nafasi-container--narrow {
    max-width: var(--container-narrow);
}

.nafasi-section {
    padding-top: var(--space-20);
    padding-bottom: var(--space-20);
}

.nafasi-section--lg {
    padding-top: var(--space-32);
    padding-bottom: var(--space-32);
}

.nafasi-section--sm {
    padding-top: var(--space-12);
    padding-bottom: var(--space-12);
}

/* =============================================================
   BUTTONS
   ============================================================= */

.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-8);
    font-family: var(--font-body);
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-base);
    border: 2px solid transparent;
    text-decoration: none;
    white-space: nowrap;
}

.btn--primary {
    background: var(--gradient-primary);
    color: var(--nafasi-white);
    box-shadow: var(--shadow-red);
}

.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(139,26,26,0.35);
    color: var(--nafasi-white);
}

.btn--outline {
    background: transparent;
    color: var(--nafasi-white);
    border-color: var(--nafasi-white);
}

.btn--outline:hover {
    background: var(--nafasi-white);
    color: var(--nafasi-red);
}

.btn--outline-red {
    background: transparent;
    color: var(--nafasi-red);
    border-color: var(--nafasi-red);
}

.btn--outline-red:hover {
    background: var(--nafasi-red);
    color: var(--nafasi-white);
}

.btn--lg {
    padding: var(--space-4) var(--space-10);
    font-size: var(--fs-base);
}

.btn--sm {
    padding: var(--space-2) var(--space-5);
    font-size: var(--fs-xs);
}

/* =============================================================
   SECTION HEADERS
   ============================================================= */

.section-header {
    text-align: center;
    margin-bottom: var(--space-16);
}

.section-header__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    font-family: var(--font-body);
    font-size: var(--fs-xs);
    font-weight: var(--fw-bold);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--nafasi-orange);
    margin-bottom: var(--space-4);
}

.section-header__eyebrow::before,
.section-header__eyebrow::after {
    content: '';
    display: block;
    width: 30px;
    height: 2px;
    background: var(--nafasi-orange);
}

.section-header__title {
    font-size: var(--fs-4xl);
    color: var(--nafasi-navy);
    margin-bottom: var(--space-4);
}

.section-header__subtitle {
    font-size: var(--fs-md);
    color: var(--nafasi-text-light);
    max-width: 600px;
    margin: 0 auto;
    line-height: var(--lh-relaxed);
}

/* =============================================================
   PAGE BANNER (inner pages)
   ============================================================= */

.page-banner {
    position: relative;
    background: var(--gradient-dark);
    padding: var(--space-20) 0;
    overflow: hidden;
}

.page-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('../images/pattern-bg.svg') repeat;
    opacity: 0.05;
}

.page-banner__inner {
    position: relative;
    z-index: 1;
}

.page-banner__eyebrow {
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--nafasi-orange);
    margin-bottom: var(--space-3);
}

.page-banner__title {
    font-size: var(--fs-4xl);
    color: var(--nafasi-white);
    margin-bottom: var(--space-4);
}

.page-banner__breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--fs-sm);
    color: rgba(255,255,255,0.6);
}

.page-banner__breadcrumb a {
    color: rgba(255,255,255,0.8);
}

.page-banner__breadcrumb a:hover {
    color: var(--nafasi-orange);
}

.page-banner__breadcrumb span.sep {
    color: var(--nafasi-orange);
}

/* Geometric decorations on banner */
.page-banner__geo {
    position: absolute;
    right: 0;
    top: 0;
    width: 300px;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.page-banner__geo::before {
    content: '';
    position: absolute;
    right: -60px;
    top: -60px;
    width: 200px;
    height: 200px;
    background: rgba(232,114,42,0.15);
    transform: rotate(45deg);
}

.page-banner__geo::after {
    content: '';
    position: absolute;
    right: 40px;
    bottom: -40px;
    width: 140px;
    height: 140px;
    background: rgba(139,26,26,0.2);
    transform: rotate(45deg);
}

/* =============================================================
   CARDS
   ============================================================= */

.nafasi-card {
    background: var(--nafasi-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition: all var(--transition-slow);
}

.nafasi-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.nafasi-card__image {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.nafasi-card__body {
    padding: var(--space-6);
}

.nafasi-card__tag {
    display: inline-block;
    font-size: var(--fs-xs);
    font-weight: var(--fw-bold);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--nafasi-orange);
    margin-bottom: var(--space-3);
}

.nafasi-card__title {
    font-size: var(--fs-xl);
    color: var(--nafasi-navy);
    margin-bottom: var(--space-3);
    transition: color var(--transition-base);
}

.nafasi-card:hover .nafasi-card__title {
    color: var(--nafasi-red);
}

.nafasi-card__excerpt {
    font-size: var(--fs-sm);
    color: var(--nafasi-text-light);
    line-height: var(--lh-relaxed);
    margin-bottom: var(--space-5);
}

.nafasi-card__meta {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    font-size: var(--fs-xs);
    color: var(--nafasi-text-muted);
    border-top: var(--border-light);
    padding-top: var(--space-4);
    margin-top: var(--space-4);
}

/* =============================================================
   FORMS
   ============================================================= */

.nafasi-form-group {
    margin-bottom: var(--space-5);
}

.nafasi-form-group label {
    display: block;
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    color: var(--nafasi-navy);
    margin-bottom: var(--space-2);
}

.nafasi-form-group input,
.nafasi-form-group textarea,
.nafasi-form-group select {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    border: var(--border-light);
    border-radius: var(--radius-md);
    font-size: var(--fs-base);
    color: var(--nafasi-text);
    background: var(--nafasi-white);
    transition: border-color var(--transition-base), box-shadow var(--transition-base);
    outline: none;
}

.nafasi-form-group input:focus,
.nafasi-form-group textarea:focus,
.nafasi-form-group select:focus {
    border-color: var(--nafasi-red);
    box-shadow: 0 0 0 3px rgba(139,26,26,0.12);
}

/* =============================================================
   WORDPRESS CORE STYLES ALIGNMENT
   ============================================================= */

.site-main {
    min-height: 60vh;
}

.alignleft  { float: left;  margin: 0 var(--space-6) var(--space-4) 0; }
.alignright { float: right; margin: 0 0 var(--space-4) var(--space-6); }
.aligncenter { display: block; margin: var(--space-4) auto; text-align: center; }
.alignwide  { margin-left: calc(-1 * var(--space-8)); margin-right: calc(-1 * var(--space-8)); }
.alignfull  { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); width: 100vw; }

.wp-caption {
    max-width: 100%;
    font-size: var(--fs-sm);
    color: var(--nafasi-text-muted);
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* =============================================================
   SCROLL ANIMATIONS
   ============================================================= */

.nafasi-animate,
.nafasi-animate--left,
.nafasi-animate--right {
    opacity: 1;
    transform: none;
}


/* Staggered delays */
.nafasi-animate[data-delay="1"] { transition-delay: 0.1s; }
.nafasi-animate[data-delay="2"] { transition-delay: 0.2s; }
.nafasi-animate[data-delay="3"] { transition-delay: 0.3s; }
.nafasi-animate[data-delay="4"] { transition-delay: 0.4s; }
