/* ==========================================================================
   FASS Transformation Committee
   Design language adapted from the SU Centre for the Advancement of Social
   Impact and Transformation (casit.sun.ac.za) — Avada/Fusion token set.
   ========================================================================== */

:root {
    /* CASIT palette */
    --white: #ffffff;
    --band-light: #f8f8f8;
    --band-grey: #efefef;
    --rule: #e0dede;
    --gold: #b79962;
    --muted: #747474;
    --maroon: #61223b;
    --maroon-deep: #53172f;
    --maroon-hover: #8b2942;
    --crimson: #a60a3d;
    --sand: #ddd6ca;
    --mint: #82ccae;
    --ink: #1c1c1c;
    --ink-soft: #333333;

    /* Flags for unverified content */
    --flag: #8a5a00;
    --flag-bg: #fdf7ea;
    --flag-rule: #e6d3ab;

    --font: 'Raleway', Arial, Helvetica, sans-serif;
    --container: 1200px;
    --narrow: 900px;
}

/* Reset & base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
}

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

a {
    color: var(--crimson);
    text-decoration: none;
    transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

a:hover {
    color: var(--gold);
}

ul {
    list-style: none;
}

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

/* Typography — CASIT scale */
h1,
h2,
h3,
h4 {
    font-family: var(--font);
    font-weight: 600;
}

h1 {
    font-size: 38px;
    line-height: 1.41;
}

h2 {
    font-size: 40px;
    line-height: 1.17;
    color: var(--maroon);
}

h3 {
    font-size: 20px;
    line-height: 1.33;
    color: var(--gold);
}

h4 {
    font-size: 18px;
    color: var(--crimson);
}

p {
    margin-bottom: 1.1rem;
}

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

/* Utilities */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 2rem;
}

.band {
    padding: 5.5rem 0;
}

.band-light {
    background: var(--band-light);
}

.band-tight {
    padding: 3.5rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 2.75rem;
}

.lede {
    font-size: 22px;
    line-height: 1.55;
    font-weight: 400;
    color: var(--maroon);
    max-width: 940px;
    margin: 0 auto 1.75rem;
    text-align: center;
}

.lede-left {
    text-align: left;
    margin-left: 0;
}

.eyebrow {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 1rem;
}

.sub-head {
    color: var(--gold);
    margin: 3rem 0 1.25rem;
}

.label-head {
    color: var(--crimson);
    font-weight: 700;
    margin-bottom: 0.75rem;
}

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

.prose-center {
    margin-left: auto;
    margin-right: auto;
}

.prose ul {
    list-style: disc;
    padding-left: 1.5rem;
    margin-bottom: 1.25rem;
}

.prose ul li {
    margin-bottom: 0.4rem;
}

.text-link {
    border-bottom: 1px solid rgba(166, 10, 61, 0.35);
    font-weight: 600;
}

.text-link:hover {
    border-bottom-color: var(--gold);
}

/* Buttons — CASIT style: flat, uppercase, letterspaced */
.btn {
    display: inline-block;
    background: var(--crimson);
    color: var(--white);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 0.85rem 1.75rem;
    border: 1px solid var(--crimson);
    border-radius: 2px;
    line-height: 1.4;
}

.btn:hover {
    background: var(--maroon);
    border-color: var(--maroon);
    color: var(--white);
}

.btn-gold {
    background: var(--gold);
    border-color: var(--gold);
}

.btn-gold:hover {
    background: var(--maroon);
    border-color: var(--maroon);
}

.btn-ghost {
    background: transparent;
    color: var(--maroon);
    border-color: var(--maroon);
}

.btn-ghost:hover {
    background: var(--maroon);
    color: var(--white);
}

/* Accessibility */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--maroon);
    color: var(--white);
    padding: 0.85rem 1.5rem;
    z-index: 999;
    font-weight: 700;
}

.skip-link:focus {
    left: 0;
}

a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 2px;
}

/* ==========================================================================
   Header chrome
   ========================================================================== */

.brand-bar {
    background: var(--maroon);
    color: var(--white);
    padding: 1.5rem 0;
}

.brand-bar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.wordmark {
    color: var(--white);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    line-height: 1.3;
}

.wordmark span {
    display: block;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 2px;
    color: var(--sand);
    margin-top: 0.35rem;
}

.brand-links {
    display: flex;
    gap: 1.75rem;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.brand-links a {
    color: var(--sand);
}

.brand-links a:hover {
    color: var(--white);
}

/* Primary nav — white bar under the maroon */
.site-nav-bar {
    background: var(--white);
    border-bottom: 1px solid var(--rule);
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-nav {
    display: flex;
    gap: 2.5rem;
    flex-wrap: wrap;
}

.site-nav a {
    display: block;
    padding: 1.15rem 0;
    font-size: 18px;
    font-weight: 500;
    color: var(--ink-soft);
    border-bottom: 3px solid transparent;
}

.site-nav a:hover {
    color: var(--maroon-hover);
}

.site-nav a.active {
    color: var(--maroon-hover);
    border-bottom-color: var(--gold);
    font-weight: 600;
}

/* ==========================================================================
   Page openings
   ========================================================================== */

.masthead {
    position: relative;
    min-height: 420px;
    display: flex;
    align-items: center;
    background-color: var(--maroon-deep);
    background-image: url('../assets/images/hero.jpg');
    background-size: cover;
    background-position: center;
}

.masthead::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(83, 23, 47, 0.93) 0%, rgba(83, 23, 47, 0.6) 100%);
}

.masthead .container {
    position: relative;
    z-index: 2;
    width: 100%;
    padding-top: 4rem;
    padding-bottom: 4rem;
}

.masthead h1 {
    color: var(--white);
    font-size: 3.1rem;
    font-weight: 600;
    line-height: 1.15;
    margin-bottom: 1rem;
}

.masthead-tagline {
    color: var(--white);
    font-size: 1.35rem;
    font-weight: 300;
    max-width: 640px;
    opacity: 0.95;
}

/* Interior page title band — flat maroon, no image */
.page-title-band {
    background: var(--maroon);
    color: var(--white);
    padding: 4rem 0 3.5rem;
}

.page-title-band h1 {
    color: var(--white);
    font-weight: 600;
    margin-bottom: 0.9rem;
}

.page-title-band .lede {
    color: var(--white);
    text-align: left;
    margin-left: 0;
    opacity: 0.95;
    max-width: 780px;
    margin-bottom: 0;
}

/* Opening statement band */
.statement p {
    font-size: 22px;
    line-height: 1.6;
    color: var(--maroon);
    max-width: 900px;
    margin: 0 auto 1.25rem;
}

/* ==========================================================================
   Emergency banner
   ========================================================================== */

.emergency {
    background: var(--maroon-deep);
    color: var(--white);
    padding: 1.1rem 0;
    border-bottom: 3px solid var(--gold);
    font-size: 0.95rem;
}

.emergency .container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1.5rem;
}

.emergency-label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gold);
}

.emergency-items {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 1rem;
}

.emergency a {
    color: var(--white);
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.emergency a:hover {
    color: var(--gold);
    border-bottom-color: var(--gold);
}

.emergency .sep {
    opacity: 0.35;
}

/* ==========================================================================
   Jump nav
   ========================================================================== */

.jump-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    padding: 2.5rem 0 0;
}

.jump-nav a {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    border: 1px solid var(--rule);
    background: var(--white);
    color: var(--ink-soft);
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 2px;
}

.jump-nav a:hover {
    border-color: var(--maroon);
    color: var(--maroon);
}

/* ==========================================================================
   Flat panels (CASIT uses no shadows or rounded cards)
   ========================================================================== */

.panel-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.75rem;
}

.panel-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.panel {
    background: var(--white);
    border: 1px solid var(--rule);
    border-top: 3px solid var(--gold);
    padding: 2.25rem;
    display: flex;
    flex-direction: column;
}

.panel h3 {
    color: var(--maroon);
    margin-bottom: 0.85rem;
}

.panel p {
    color: var(--ink-soft);
    flex-grow: 1;
    margin-bottom: 1.5rem;
}

.panel .btn {
    align-self: flex-start;
}

/* Signpost panels */
.signpost-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.75rem;
    margin-top: 2.5rem;
}

.signpost {
    background: var(--white);
    border: 1px solid var(--rule);
    border-left: 4px solid var(--maroon);
    padding: 2rem;
}

.signpost.is-gold {
    border-left-color: var(--gold);
}

.signpost h4 {
    margin-bottom: 0.6rem;
}

.signpost p {
    color: var(--ink-soft);
    margin-bottom: 1.25rem;
}

/* ==========================================================================
   Tables — CASIT's principal data pattern
   ========================================================================== */

.data-table-wrap {
    overflow-x: auto;
    margin: 2rem 0;
}

table.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border: 1px solid var(--rule);
    font-size: 0.98rem;
}

table.data-table th,
table.data-table td {
    border: 1px solid var(--rule);
    padding: 1rem 1.15rem;
    text-align: left;
    vertical-align: top;
}

table.data-table thead th {
    font-weight: 700;
    color: var(--ink);
    background: var(--band-light);
}

table.data-table tbody th {
    font-weight: 700;
    color: var(--maroon);
    width: 26%;
}

table.data-table .note {
    display: block;
    font-size: 0.85rem;
    color: var(--muted);
    margin-top: 0.4rem;
    line-height: 1.55;
}

/* ==========================================================================
   Numbered process
   ========================================================================== */

.steps {
    margin-left: auto;
    margin-right: auto;
    list-style: none;
    counter-reset: step;
    max-width: var(--narrow);
    margin-top: 1.75rem;
}

.steps li {
    counter-increment: step;
    position: relative;
    padding-left: 3rem;
    padding-bottom: 1.85rem;
    border-left: 1px solid var(--rule);
    margin-left: 1.25rem;
}

.steps li:last-child {
    border-left-color: transparent;
    padding-bottom: 0;
}

.steps li::before {
    content: counter(step);
    position: absolute;
    left: -1.25rem;
    top: 0;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: var(--maroon);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
}

.steps h4 {
    color: var(--maroon);
    font-size: 1.05rem;
    margin-bottom: 0.3rem;
    padding-top: 0.28rem;
}

.steps p {
    color: var(--ink-soft);
}

/* Numbered action items */
.action-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.75rem;
    margin-top: 2.5rem;
}

.action {
    display: flex;
    gap: 1.25rem;
    background: var(--white);
    border: 1px solid var(--rule);
    padding: 2rem;
}

.action-num {
    flex: 0 0 auto;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: var(--gold);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.action h4 {
    color: var(--maroon);
    margin-bottom: 0.35rem;
}

.action p {
    color: var(--ink-soft);
}

/* ==========================================================================
   Notes, callouts, placeholders
   ========================================================================== */

.note-box {
    margin-left: auto;
    margin-right: auto;
    background: var(--flag-bg);
    border: 1px solid var(--flag-rule);
    border-left: 4px solid var(--gold);
    padding: 2rem;
    margin: 2.5rem 0;
    max-width: var(--narrow);
}

.note-box h4 {
    color: var(--flag);
    margin-bottom: 0.75rem;
}

.note-box p {
    color: #4a4133;
}

.caveat {
    margin-left: auto;
    margin-right: auto;
    background: var(--band-light);
    border-left: 4px solid var(--maroon);
    padding: 1.5rem 1.75rem;
    margin: 2rem 0;
    max-width: var(--narrow);
    color: var(--ink-soft);
}

.source-note {
    margin-left: auto;
    margin-right: auto;
    font-size: 0.85rem;
    color: var(--muted);
    max-width: var(--narrow);
    margin-top: 1.25rem;
}

.pending {
    border: 1px dashed var(--flag-rule);
    background: var(--flag-bg);
    padding: 2.25rem;
    text-align: center;
}

.pending p {
    color: #6b5a3c;
    max-width: 700px;
    margin: 0.9rem auto 0;
}

.pending-chip,
.pending-inline {
    display: inline-block;
    background: var(--gold);
    color: var(--white);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 0.32rem 0.8rem;
    border-radius: 2px;
}

.pending-inline {
    background: transparent;
    color: var(--flag);
    border: 1px dashed var(--flag);
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.85rem;
    padding: 0.1rem 0.5rem;
}

.updated-stamp {
    padding: 2.5rem 0 4rem;
    font-size: 0.88rem;
    color: var(--muted);
    text-align: center;
}

/* ==========================================================================
   Footer — maroon, gold rule under heading (CASIT pattern)
   ========================================================================== */

.site-footer {
    background: var(--maroon);
    color: #fffbf9;
    padding: 4.5rem 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2.5rem;
    padding-bottom: 3.5rem;
}

.footer-col h2 {
    font-size: 15px;
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gold);
    padding-bottom: 0.75rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid rgba(183, 153, 98, 0.55);
}

.footer-col p {
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 0.6rem;
    color: #fffbf9;
}

.footer-col a {
    color: #fffbf9;
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}

.footer-col a:hover {
    color: var(--gold);
    border-bottom-color: var(--gold);
}

.footer-base {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 1.75rem 0;
    text-align: center;
    font-size: 0.82rem;
    color: rgba(255, 251, 249, 0.75);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .panel-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .site-nav {
        gap: 1.5rem;
    }

    .site-nav a {
        font-size: 16px;
    }
}

@media (max-width: 820px) {

    .panel-grid,
    .panel-grid-3,
    .signpost-grid,
    .action-grid {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 30px;
    }

    h2 {
        font-size: 30px;
    }

    .masthead h1 {
        font-size: 2.1rem;
    }

    .masthead-tagline,
    .lede,
    .statement p,
    .page-title-band .lede {
        font-size: 1.1rem;
    }

    .band {
        padding: 3.5rem 0;
    }

    .container {
        padding: 0 1.25rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .brand-bar .container {
        justify-content: flex-start;
    }

    .brand-links {
        gap: 1rem;
        font-size: 0.7rem;
    }

    .emergency .container {
        flex-direction: column;
        align-items: flex-start;
    }

    .emergency-items {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }

    .emergency .sep {
        display: none;
    }

    .site-nav {
        overflow-x: auto;
        flex-wrap: nowrap;
        gap: 1.5rem;
        -webkit-overflow-scrolling: touch;
    }

    .site-nav a {
        white-space: nowrap;
    }

    .steps li {
        padding-left: 2.75rem;
    }

    table.data-table tbody th {
        width: auto;
    }
}

@media print {

    .site-nav-bar,
    .jump-nav,
    .brand-links {
        display: none;
    }

    body {
        color: #000;
    }
}

/* Members table */
.members-table tbody th {
    width: 22%;
}

.members-table td {
    font-size: 0.94rem;
}

.role-tag {
    display: inline-block;
    margin-left: 0.5rem;
    padding: 0.15rem 0.55rem;
    border: 1px solid var(--gold);
    border-radius: 2px;
    background: rgba(183, 153, 98, 0.12);
    color: var(--gold);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    vertical-align: middle;
    white-space: nowrap;
}

@media (max-width: 820px) {
    .members-table {
        min-width: 640px;
    }

    .role-tag {
        display: block;
        margin: 0.4rem 0 0;
        width: fit-content;
    }
}
