
/* ========================================
   1. GLOBAL COLORS
   ======================================== */

   :root {
    --ink: #242d2b;
    --accent: #9b462e;
    --paper: #f9f6ee;
    --line: #d9d5c9;
    --muted: #62645b;
    --gold: #dfae68;
    --green: #263c36;
    --white: #fffdf7;
}

/* Change these colors to update the website's theme. */


/* ========================================
   2. GLOBAL STYLING
   ======================================== */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    font-size: 16px;
    line-height: 1.55;
    color: var(--ink);
    background: var(--paper);
}

a {
    color: var(--accent);
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
a {
    cursor: pointer;
}

img {
    display: block;
    width: 100%;
    object-fit: cover;
}


/* ========================================
   3. TYPOGRAPHY
   ======================================== */

h1,
h2,
h3,
p {
    margin: 0 0 16px;
}

h1 {
    font-size: clamp(36px, 5.2vw, 72px);
    line-height: 1.02;
    letter-spacing: -0.045em;
}

h2 {
    font-family: Georgia, serif;
    font-size: clamp(32px, 4vw, 58px);
    font-weight: 400;
    line-height: 1.08;
    letter-spacing: -0.035em;
}

h3 {
    font-size: 20px;
}

h1,
h2,
h3 {
    overflow-wrap: break-word;
}

small,
.muted {
    color: var(--muted);
}

.label {
    font-size: 12px;
    font-weight: 750;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--accent);
}

/* Georgia creates the editorial-style headings. */


/* ========================================
   4. BUTTONS
   ======================================== */

button,
.button {
    display: inline-block;
    border: 1px solid var(--line);
    background: white;
    color: var(--ink);
    border-radius: 2px;
    padding: 10px 16px;
    min-height: 44px;
    text-decoration: none;
}

button:hover,
.button:hover {
    border-color: var(--accent);
    filter: brightness(0.96);
}

.primary {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    font-weight: 650;
    border-radius: 2px;
    padding: 12px 24px;
}

:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 4px;
}

/* Primary buttons use the terracotta color. */


/* ========================================
   5. NAVIGATION BAR
   ======================================== */

.nav {
    background: var(--paper);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 14px 5%;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 10;
}

.brand {
    font-weight: 800;
    letter-spacing: -0.035em;
    font-size: 21px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
}

.mark {
    background: var(--ink);
    color: white;
    padding: 10px;
    border-radius: 0;
    font-size: 14px;
    letter-spacing: 0;
}

.navlinks {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.navlinks button {
    border: 0;
    font-size: 14px;
    padding: 8px;
}

.nav a {
    display: inline-block;
    text-decoration: none;
    padding: 10px 16px;
    color: inherit;
}

.navlinks a {
    font-size: 14px;
    padding: 8px;
}

.navlinks a:hover {
    color: var(--accent);
}

.nav a.primary {
    color: white;
}

/* Sticky keeps the navigation visible while scrolling. */


/* ========================================
   6. PAGE CONTAINERS
   ======================================== */

.wrap {
    max-width: 1440px;
    margin: auto;
    padding: 90px 5%;
}

.white {
    background: var(--white);
}

.wrap a.button {
    display: inline-block;
    text-decoration: none;
    padding: 10px 16px;
    color: inherit;
}

.wrap a.primary {
    color: white;
}

/* Controls the width and spacing of each section. */


/* ========================================
   7. HERO SECTION
   ======================================== */

.hero {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 7%;
    align-items: center;
    min-height: 75vh;
}

.hero h1 {
    font-family: Georgia, serif;
    font-size: clamp(42px, 6.4vw, 100px);
    font-weight: 400;
    letter-spacing: -0.065em;
    line-height: 0.98;
}

.hero img {
    height: clamp(360px, 65vh, 690px);
    border-radius: 0;
}

.hero p {
    font-size: 19px;
    max-width: 480px;
}

.hero > div {
    animation: arrive 0.5s ease-out both;
}

@keyframes arrive {
    from {
        opacity: 0.5;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* Creates the large text and photograph layout. */


/* ========================================
   8. PROGRAM GRID AND CARDS
   ======================================== */

.grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
}

.grid > * {
    min-width: 0;
}

.card {
    background: white;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}

.card img {
    height: 300px;
}

.pad {
    padding: 24px;
}

.card .pad {
    padding: 22px 0;
}

.card:not(article) .pad {
    padding: 22px;
}

.white article.card,
.wrap > .grid article.card {
    background: transparent;
    border: 0;
    border-radius: 0;
    overflow: visible;
}

.white article button {
    border: 0;
    border-bottom: 1px solid var(--accent);
    background: none;
    padding: 8px 0;
    color: var(--accent);
}

/* Creates three columns for the main programs. */


/* ========================================
   9. IMPACT STATISTICS
   ======================================== */

.numbers {
    background: var(--green);
    color: #fffaf0;
}

.numbers .label,
.numbers small {
    color: #e0e2d6;
}

.numbers strong {
    display: block;
    font-family: Georgia, serif;
    font-size: clamp(48px, 7vw, 100px);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.07em;
    font-variant-numeric: tabular-nums;
}

.numbers .grid > div {
    border-top: 1px solid #718078;
    padding-top: 24px;
}

/* Displays large impact numbers on a dark green background. */


/* ========================================
   10. COMMUNITY STORY SECTIONS
   ======================================== */

.story {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8%;
    align-items: center;
    min-height: 65vh;
}

.story img {
    height: 460px;
    border-radius: 0;
}

/* Displays a photograph and text next to each other. */


/* ========================================
   11. FOOTER
   ======================================== */

.foot {
    border-top: 1px solid var(--line);
    background: var(--ink);
    color: #fffaf0;
}

.foot small {
    color: #dedbd2;
}

.foot button {
    background: transparent;
    color: white;
    border-color: #777;
}

.foot a {
    display: inline-block;
    text-decoration: none;
    padding: 10px 16px;
    color: white;
}

.foot a:hover {
    color: var(--gold);
}


/* ========================================
   12. FORMS
   ======================================== */

.form {
    max-width: 650px;
    display: grid;
    gap: 16px;
}

label {
    display: grid;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
}

input,
textarea,
select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: white;
    color: var(--ink);
}

textarea {
    resize: vertical;
}

/* Shared styling for contact and submission forms. */


/* ========================================
   13. REUSABLE LAYOUTS
   ======================================== */

.row {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: space-between;
    flex-wrap: wrap;
}

.stack {
    display: grid;
    gap: 12px;
}

.notice {
    padding: 12px;
    background: #f4e5d2;
    color: #67470f;
    font-size: 14px;
}


/* ========================================
   14. ADMIN PORTAL
   ======================================== */

.shell {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: 85vh;
}

.side {
    background: var(--ink);
    color: white;
    padding: 24px 16px;
}

.side button {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: 0;
    color: white;
    margin: 4px 0;
}

.side button:hover,
.side button.on {
    background: #46524a;
}

.workspace {
    padding: 32px;
    min-width: 0;
    background: var(--paper);
}

.workspace h1,
.phone h1 {
    font-size: 34px;
    letter-spacing: -0.035em;
}

.workspace h2,
.phone h2 {
    font-family: Arial, sans-serif;
    font-size: 26px;
    font-weight: 600;
}

.workspace .card,
.phone .card {
    border-radius: 3px;
    box-shadow: none;
}

.toolbar {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.toolbar h2 {
    margin-right: auto;
}

.metric {
    padding: 16px;
}

.metric strong {
    display: block;
    font-size: 34px;
}

/* Creates the admin sidebar and main workspace. */


/* ========================================
   15. TABLES AND STATUS LABELS
   ======================================== */

.tablewrap {
    overflow: auto;
}

table {
    border-collapse: collapse;
    width: 100%;
    font-size: 14px;
    text-align: left;
}

td,
th {
    padding: 14px;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}

th {
    color: var(--muted);
    font-size: 12px;
    background: var(--paper);
}

.tag {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    background: #f6e9cf;
    color: #795314;
    font-size: 12px;
}

.tag.ok {
    background: #e1eee8;
    color: #285e45;
}

.bar {
    height: 12px;
    background: #eae5d9;
    border-radius: 3px;
    overflow: hidden;
}

.bar i {
    display: block;
    height: 100%;
    background: var(--accent);
}

/* Used for admin records, statuses and progress bars. */


/* ========================================
   16. MOBILE FIELD APPLICATION
   ======================================== */

.fieldstage {
    padding: 24px;
    background: #eae5d9;
    min-height: 90vh;
}

.phone {
    max-width: 420px;
    margin: auto;
    background: white;
    border: 1px solid var(--line);
    border-radius: 9px;
    overflow: hidden;
}

.phone .pad {
    padding: 20px;
}

.phone button {
    min-height: 48px;
}

.phone .primary {
    width: 100%;
}

.phone nav {
    display: flex;
    justify-content: space-around;
    border-top: 1px solid var(--line);
    padding: 8px;
}

.phone nav button {
    border: 0;
    flex: 1;
}

/* Creates larger controls for mobile field officers. */


/* ========================================
   17. RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 760px) {

    .nav {
        position: static;
    }

    .hero,
    .story,
    .grid,
    .shell {
        grid-template-columns: 1fr;
    }

    .hero,
    .story {
        gap: 24px;
        min-height: 0;
    }

    .wrap {
        padding: 48px 20px;
    }

    .hero img,
    .story img {
        height: 300px;
    }

    .grid {
        gap: 24px;
    }

    .card img {
        height: 240px;
    }

    .numbers strong {
        font-size: 36px;
    }

    .side {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
    }

    .side button {
        width: auto;
    }

    .workspace {
        padding: 16px;
    }

    .fieldstage {
        padding: 12px;
    }
}

/* Changes multiple columns into one column on phones. */


/* ========================================
   18. ACCESSIBILITY
   ======================================== */

@media (prefers-reduced-motion: reduce) {

    * {
        animation: none !important;
        transition: none !important;
    }
}

/* Respects users who prefer reduced animation. */
/* Improve footer spacing */

.foot .wrap {
    padding-top: 48px;
    padding-bottom: 24px;
}

.foot .stack {
    gap: 4px;
}

.foot a {
    padding: 5px 0;
    font-size: 14px;
}

.foot h3 {
    margin-bottom: 16px;
}

.foot p {
    font-size: 14px;
    max-width: 350px;
}

.foot .row a {
    font-size: 13px;
    color: var(--gold);
}