/* CodeFarm Technologies — site styles
   Hand-written, no framework, no external requests. */

:root {
    --ink: #0b1512;
    --body: #384a43;
    --muted: #66796f;
    --line: #dfe7e2;
    --bg: #ffffff;
    --bg-2: #f5f8f6;
    --bg-3: #eef3f0;
    --brand: #12764e;
    --brand-ink: #0d5a3b;
    --brand-soft: #e6f4ec;
    --radius: 14px;
    --radius-lg: 22px;
    --shadow: 0 1px 2px rgba(11, 21, 18, .04), 0 8px 24px rgba(11, 21, 18, .06);
    --maxw: 1140px;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
    :root {
        --ink: #f2f7f4;
        --body: #a9bcb3;
        --muted: #839990;
        --line: #21322c;
        --bg: #0a110e;
        --bg-2: #0f1814;
        --bg-3: #14201b;
        --brand: #2fb37a;
        --brand-ink: #4cc994;
        --brand-soft: #10251b;
        --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
    }
}

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

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { animation: none !important; transition: none !important; }
}

body {
    margin: 0;
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.65;
    color: var(--body);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
    color: var(--ink);
    line-height: 1.15;
    letter-spacing: -.02em;
    margin: 0 0 .5em;
    font-weight: 700;
}

h1 { font-size: clamp(2.15rem, 5.2vw, 3.5rem); letter-spacing: -.03em; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.02rem; }

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

a { color: var(--brand-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand); }

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

ul, ol { margin: 0 0 1.1em; padding-left: 1.2em; }
li { margin-bottom: .4em; }

strong { color: var(--ink); font-weight: 650; }

hr { border: 0; border-top: 1px solid var(--line); margin: 0; }

:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 3px;
    border-radius: 4px;
}

/* ---------- layout ---------- */

.wrap {
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 24px;
}

.wrap-narrow { max-width: 780px; }

section { padding: 76px 0; }

@media (max-width: 700px) { section { padding: 54px 0; } }

.alt { background: var(--bg-2); }

/* in-page jumps must clear the sticky header, or the target heading is hidden */
section[id], #main { scroll-margin-top: 84px; }

.skip {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--brand);
    color: #fff;
    padding: 10px 16px;
    z-index: 100;
    border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; color: #fff; }

/* ---------- header ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    /* opaque fallback first: without it, a browser lacking color-mix() renders
       no header background at all and the page scrolls under the nav */
    background: var(--bg);
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--line);
}

.nav {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 68px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 750;
    font-size: 1.12rem;
    letter-spacing: -.02em;
    color: var(--ink);
    text-decoration: none;
    margin-right: auto;
}

.brand img { width: 30px; height: 30px; }

@media (prefers-color-scheme: dark) {
    .brand img, .footer-brand img { filter: invert(1) brightness(1.7) grayscale(1); }
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    display: block;
    padding: 8px 13px;
    border-radius: 9px;
    color: var(--body);
    text-decoration: none;
    font-size: .96rem;
    font-weight: 550;
}

.nav-links a:hover { background: var(--bg-3); color: var(--ink); }
.nav-links a[aria-current="page"] { color: var(--ink); font-weight: 650; }

/* the nav-link colour rules above out-specify .btn — restate for buttons in the nav */
.nav-links a.btn-primary,
.nav-links a.btn-primary:hover { background: var(--brand); color: #fff; }
.nav-links a.btn-primary:hover { background: var(--brand-ink); }

@media (prefers-color-scheme: dark) {
    .nav-links a.btn-primary,
    .nav-links a.btn-primary:hover { color: #04120c; }
}

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--line);
    border-radius: 9px;
    padding: 8px 11px;
    color: var(--ink);
    font-size: .92rem;
    font-weight: 600;
    cursor: pointer;
}

@media (max-width: 880px) {
    .nav-toggle { display: block; }
    .nav-links {
        display: none;
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        padding: 10px 24px 20px;
        background: var(--bg);
        border-bottom: 1px solid var(--line);
    }
    .nav-links.open { display: flex; }
    .nav-links a { padding: 11px 12px; font-size: 1rem; }
    .nav-links .btn { text-align: center; margin-top: 8px; }
    .site-header { position: relative; }
}

/* ---------- buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: .97rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: transform .15s ease, background .15s ease, border-color .15s ease;
}

.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-ink); color: #fff; }

@media (prefers-color-scheme: dark) {
    .btn-primary { color: #04120c; }
    .btn-primary:hover { color: #04120c; }
}

.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand-ink); background: var(--bg-2); }

.btn-outline-light { border-color: rgba(255, 255, 255, .38); color: #fff; }
.btn-outline-light:hover { border-color: #fff; background: rgba(255, 255, 255, .1); color: #fff; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- app store buttons ---------- */

/* Pill store buttons, matching the treatment on divisi.africa. */

/* wraps the button pair plus its note, shrinking to the width of the buttons so
   the note centres under them rather than under the whole column */
.store-cta { display: inline-flex; flex-direction: column; align-items: center; }

.store-buttons { display: flex; flex-wrap: wrap; gap: 14px; }

.store-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-height: 56px;
    padding: 14px 26px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: transparent;
    color: var(--ink);
    font-size: 1.02rem;
    font-weight: 700;
    letter-spacing: -.01em;
    text-decoration: none;
    white-space: nowrap;
    transition: border-color .15s ease, background .15s ease, transform .15s ease;
}

.store-btn:hover { border-color: var(--brand); background: var(--bg-2); color: var(--ink); }
.store-btn:active { transform: translateY(1px); }
.store-btn svg { width: 23px; height: 23px; flex-shrink: 0; }
.store-btn .i-play { fill: var(--brand); }
.store-btn .i-apple { fill: currentColor; }

/* the spotlight is a fixed dark panel in both colour schemes */
.spotlight .store-btn { border-color: rgba(255, 255, 255, .28); color: #fff; }
.spotlight .store-btn:hover { border-color: #fff; background: rgba(255, 255, 255, .08); color: #fff; }
.spotlight .store-btn .i-play { fill: #2fb37a; }

/* the quiet link that sits under the buttons */
.store-note {
    display: inline-block;
    margin-top: 16px;
    font-size: .97rem;
    font-weight: 600;
    color: var(--muted);
    text-decoration: underline;
    text-underline-offset: 4px;
}
.store-note:hover { color: var(--ink); }
.spotlight .store-note { color: #9fbfb0; }
.spotlight .store-note:hover { color: #fff; }

/* footer: narrow column, so the pills stack */
.store-buttons--sm { flex-direction: column; align-items: stretch; gap: 10px; max-width: 200px; }
.store-buttons--sm .store-btn {
    justify-content: center;
    min-height: 42px;
    padding: 9px 15px;
    gap: 8px;
    font-size: .82rem;
}
.store-buttons--sm .store-btn svg { width: 17px; height: 17px; }

@media (max-width: 420px) {
    .store-btn { padding: 13px 20px; font-size: .95rem; }
}

.trademarks {
    font-size: .78rem;
    line-height: 1.5;
    color: var(--muted);
    max-width: 62ch;
}

/* ---------- hero ---------- */

.hero {
    padding: 92px 0 84px;
    background:
        radial-gradient(900px 420px at 88% -10%, var(--brand-soft), transparent 65%),
        linear-gradient(180deg, var(--bg), var(--bg-2));
    border-bottom: 1px solid var(--line);
}

@media (max-width: 700px) { .hero { padding: 56px 0 52px; } }

.hero p.lead { max-width: 60ch; }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px 6px 8px;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand-ink);
    border: 1px solid color-mix(in srgb, var(--brand) 22%, transparent);
    font-size: .84rem;
    font-weight: 650;
    letter-spacing: .01em;
    text-decoration: none;
    margin-bottom: 20px;
}

.eyebrow .tag {
    background: var(--brand);
    color: #fff;
    border-radius: 999px;
    padding: 2px 9px;
    font-size: .74rem;
    letter-spacing: .04em;
    text-transform: uppercase;
}

@media (prefers-color-scheme: dark) { .eyebrow .tag { color: #04120c; } }

.lead {
    font-size: 1.17rem;
    color: var(--body);
}

.kicker {
    display: block;
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--brand-ink);
    margin-bottom: 14px;
}

.section-head { max-width: 62ch; margin-bottom: 44px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- grids ---------- */

.grid { display: grid; gap: 22px; }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 940px) { .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .g3, .g4 { grid-template-columns: minmax(0, 1fr); } }

.split {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 56px;
    align-items: center;
}

@media (max-width: 900px) { .split { grid-template-columns: minmax(0, 1fr); gap: 34px; } }

/* ---------- cards ---------- */

.card {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px;
}

.alt .card { background: var(--bg); }

.card h3 { margin-bottom: .35em; }
/* a linked card heading should read as a heading, not as body copy */
.card h3 a { color: inherit; text-decoration: none; }
.card h3 a:hover { color: var(--brand-ink); text-decoration: underline; }
.card p { font-size: .97rem; }

a.card { text-decoration: none; color: var(--body); display: block; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
a.card:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); box-shadow: var(--shadow); transform: translateY(-2px); }

.card .icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: var(--brand-soft);
    color: var(--brand-ink);
    margin-bottom: 16px;
}

.card .icon svg { width: 21px; height: 21px; }

.more {
    display: inline-block;
    margin-top: 14px;
    font-weight: 600;
    font-size: .94rem;
    color: var(--brand-ink);
}

/* ---------- stats ---------- */

.stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}

@media (max-width: 700px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* stats sitting in one half of a split have no room for four across */
.split .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.stat { background: var(--bg); padding: 24px 22px; }
.stat .n { display: block; font-size: 1.85rem; font-weight: 750; color: var(--ink); letter-spacing: -.03em; line-height: 1.1; }
.stat .l { font-size: .89rem; color: var(--muted); }

/* two tiles across on a phone leaves too little room for the wider figures
   ("1:2,500" needs 101px). Reclaim the padding first, so 360 and 375 — the
   two commonest widths — keep the full-size figure. */
@media (max-width: 389px) {
    .stat { padding: 18px 13px; }
    .stat .l { overflow-wrap: break-word; }
}

/* narrower than that, padding alone is not enough and the figure must shrink */
@media (max-width: 359px) {
    .stat .n { font-size: 1.5rem; }
}

/* ---------- divisi feature block ---------- */

.spotlight {
    background: linear-gradient(155deg, #0c2b1e 0%, #0a1f16 55%, #071410 100%);
    color: #cfe3d8;
    border-radius: var(--radius-lg);
    padding: 52px;
    position: relative;
    overflow: hidden;
}

.spotlight::after {
    content: "";
    position: absolute;
    inset: auto -80px -160px auto;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(47, 179, 122, .28), transparent 68%);
    pointer-events: none;
}

@media (max-width: 700px) { .spotlight { padding: 32px 24px; } }

.spotlight h2, .spotlight h3, .spotlight strong { color: #fff; }
.spotlight .kicker { color: #6fdcaa; }
.spotlight a:not(.btn) { color: #6fdcaa; }
.spotlight ul { list-style: none; padding: 0; margin: 0; }
.spotlight li { position: relative; padding-left: 26px; margin-bottom: 12px; }
.spotlight li::before {
    content: "";
    position: absolute;
    left: 0;
    top: .55em;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #2fb37a;
}
.spotlight .stats { border-color: rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .14); }
.spotlight .stat { background: rgba(255, 255, 255, .04); }
.spotlight .stat .n { color: #fff; }
.spotlight .stat .l { color: #9fbfb0; }

/* ---------- work ---------- */

.work-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg);
    display: flex;
    flex-direction: column;
}

.work-card .shot {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--bg-3);
    border-bottom: 1px solid var(--line);
}

.work-card .shot img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }

.work-card .body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.work-card h3 { margin-bottom: .3em; }
.work-card p { font-size: .96rem; }

.pill {
    display: inline-block;
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--brand-ink);
    background: var(--brand-soft);
    border-radius: 999px;
    padding: 4px 11px;
    margin-bottom: 12px;
}

.tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: auto; padding-top: 16px; }
.tags span {
    font-size: .78rem;
    color: var(--muted);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 3px 10px;
}

/* ---------- steps / list ---------- */

.steps { counter-reset: step; display: grid; gap: 4px; }

.step {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 18px;
    padding: 22px 0;
    border-top: 1px solid var(--line);
}

.step:last-child { border-bottom: 1px solid var(--line); }

.step::before {
    counter-increment: step;
    content: "0" counter(step);
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    color: var(--brand);
    font-size: .92rem;
    padding-top: 3px;
}

.step h3 { margin-bottom: .25em; }
.step p { font-size: .97rem; margin: 0; }

.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
    cursor: pointer;
    padding: 20px 0;
    font-weight: 650;
    color: var(--ink);
    font-size: 1.03rem;
    list-style: none;
    display: flex;
    justify-content: space-between;
    gap: 18px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--brand); font-weight: 700; font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "\2013"; }
.faq details > div { padding-bottom: 22px; font-size: .99rem; max-width: 72ch; }

/* ---------- cta ---------- */

.cta {
    background: var(--ink);
    color: #c6d6ce;
    border-radius: var(--radius-lg);
    padding: 54px;
    text-align: center;
}

@media (prefers-color-scheme: dark) { .cta { background: var(--bg-3); border: 1px solid var(--line); } }

.cta h2 { color: #fff; }
@media (prefers-color-scheme: dark) { .cta h2 { color: var(--ink); } }
.cta p { max-width: 56ch; margin-left: auto; margin-right: auto; }
.cta .btn-row { justify-content: center; margin-top: 26px; }

@media (max-width: 700px) { .cta { padding: 34px 24px; } }

/* ---------- contact ---------- */

.contact-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px;
    background: var(--bg);
}

.contact-card .label {
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted);
    display: block;
    margin-bottom: 6px;
}

.contact-card .val { font-size: 1.08rem; font-weight: 600; color: var(--ink); word-break: break-word; }
.contact-card .val a { color: var(--brand-ink); text-decoration: none; }
.contact-card .val a:hover { text-decoration: underline; }

/* ---------- footer ---------- */

.site-footer {
    background: var(--bg-2);
    border-top: 1px solid var(--line);
    padding: 56px 0 28px;
    font-size: .95rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr;
    gap: 34px;
}

@media (max-width: 1050px) { .footer-grid { grid-template-columns: 1fr 1fr 1fr; } }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 750;
    font-size: 1.1rem;
    color: var(--ink);
    text-decoration: none;
    margin-bottom: 14px;
}

.footer-brand img { width: 28px; height: 28px; }

.site-footer h4 {
    font-size: .8rem;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 14px;
    font-weight: 700;
}

.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 9px; }
.site-footer a { color: var(--body); text-decoration: none; }
.site-footer a:hover { color: var(--brand-ink); text-decoration: underline; }

.footer-bottom {
    margin-top: 40px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
    color: var(--muted);
    font-size: .89rem;
}

/* ---------- utilities ---------- */

.mt-1 { margin-top: 12px; }
.mt-2 { margin-top: 24px; }
.mt-3 { margin-top: 34px; }
.center { text-align: center; }
.muted { color: var(--muted); font-size: .95rem; }
.small { font-size: .9rem; }
