/* latin */
@font-face {
  font-family: 'Mulish';
  font-style: normal;
  font-weight: 400, 600, 700;
  src: url(https://fonts.gstatic.com/s/mulish/v18/1Ptvg83HX_SGhgqk3wot.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin */
@font-face {
  font-family: 'Mulish';
  font-style: italic;
  font-weight: 400, 600, 700;
  src: url(https://fonts.gstatic.com/s/mulish/v18/1Pttg83HX_SGhgqk2jovaqQ.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Mulish';
  font-style: normal;
  font-weight: 400, 600, 700;
  src: url(https://fonts.gstatic.com/s/mulish/v18/1Ptvg83HX_SGhgqk0QotcqA.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin-ext */
@font-face {
  font-family: 'Mulish';
  font-style: italic;
  font-weight: 400, 600, 700;
  src: url(https://fonts.gstatic.com/s/mulish/v18/1Pttg83HX_SGhgqk2johaqRXBA.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---- Design tokens --- */
:root {
    --c-bg: #f2e7d6;             /* Warm clay page background */
    --c-surface: #ffffff;        /* Cards / panels */
    --c-sage: #ecd9c5;           /* Clay panel tint */
    --c-sage-deep: #e0cbb0;      /* Deeper clay panel */
    
    --c-primary: #8b9e7e;        /* Keynote olive — header + buttons */
    --c-primary-dark: #77896a;   /* Olive hover / active */
    --c-primary-ink: #3c4a2e;    /* Deep olive — headings, footer, dark bands */
    
    --c-accent: #c56129;         /* Soft burnt orange */
    --c-accent-soft: #f4e0cd;    /* Orange-clay tint */
    
    --c-text: #2f2a22;           /* Primary text (warm near-black) */
    --c-muted: #5f5545;          /* Secondary text */
    --c-border: #e6d9c2;         /* Warm clay border */
    --c-border-sage: #dcc9ae;    /* Clay panel border */
    --c-focus: #7a4a12;          /* High-contrast focus ring */
    
    --c-warning: #c27803;        /* Warm Ochre Amber */
    --c-warning-bg: #fef5e7;     /* Soft amber tint */
    --c-error: #b83a24;          /* Terracotta Red */
    --c-error-bg: #fdf0ed;       /* Soft red tint */

    --radius: 14px;
    --radius-sm: 10px;
    --radius-lg: 24px;
    --shadow: 0 1px 2px rgba(33, 59, 52, .04), 0 8px 28px rgba(33, 59, 52, .07);
    --shadow-sm: 0 1px 3px rgba(33, 59, 52, .08);

    --maxw: 1140px;
    --gap: clamp(1.25rem, 3vw, 2.5rem);

    --font-body: "Mulish", "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
    --font-head: var(--font-body);
}

/* ---- Reset / base ---- */

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: calc(75px + 5.5rem);
    /*scrollbar-gutter: stable;*/
}

body {
    margin: 0;
    background: var(--c-bg);
    color: var(--c-text);
    font-family: var(--font-body);
    font-size: 1.0625rem;
    /* ~17px base for comfortable reading */
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

main {
    overflow-x: clip;
}

picture {
    line-height: 0;
}

h1, h2, h3, h4 {
    font-family: var(--font-head);
    color: var(--c-primary-ink);
    line-height: 1.18;
    font-weight: 700;
    margin: 0 0 .5em;
    letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.45rem); }

p {
    margin: 0 0 1.1rem;
    max-width: 68ch;
}

a, .link {
    color: var(--c-primary-dark);
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

a:not(.btn):hover, .link:not(.btn):hover {
    color: var(--c-primary);
}

.link {
    cursor: pointer;
}

.external-icon::after {
    content: "" !important;
    display: inline-block;
    width: 1.3em;
    aspect-ratio: 1;
    margin-left: 0.5em;
    margin-top: -0.2rem;
    vertical-align: middle;
    background-color: currentColor;
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23000' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6M15 3h6v6M10 14 21 3'/%3E%3C/svg%3E");
    mask-size: contain;
    mask-repeat: no-repeat;
}

address {
    font-style: normal;
}

fieldset {
    all: unset;
    width: 100%;
}

/* Accessible focus for everything */
:focus-visible {
    outline: 3px solid var(--c-focus);
    outline-offset: 2px;
    border-radius: 4px;
}

hr {
    border: 0;
    border-top: 1px solid var(--c-border);
    margin: 1.5rem 0;
}

/* --- Utility --- */

[hidden] {
    display: none !important;
}

.client-nojs .js-only,
.client-js .nojs-only {
    display: none !important;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        animation-duration: .001ms !important;
        transition-duration: .001ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* --- Reveal Animations --- */

.reveal:is(.fade-in-up, .fade-in-left) {
    opacity: 0;
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.fade-in-up {
    transform: translateY(30px);
}

.reveal.fade-in-left {
    transform: translateX(30px);
}

.reveal:is(.fade-in-up, .fade-in-left).active {
    opacity: 1;
    transform: translateY(0);
}

.reveal:is(.staggered-reveal-up,
           .staggered-reveal-down,
           .staggered-reveal-left,
           .staggered-reveal-right) > * {
    opacity: 0;
}

.reveal:is(.staggered-reveal-up,
           .staggered-reveal-down,
           .staggered-reveal-left,
           .staggered-reveal-right).active > * {
    opacity: 1;
    transform: translate(0);
    transition-property:  opacity, transform;
    transition-duration: 500ms;
    transition-timing-function: cubic-bezier(0.25, 1, 0.5, 1);
    transition-delay: calc(sibling-index() * 35ms);
}

.reveal.staggered-reveal-up > * {
    transform: translateY(30px);
}

.reveal.staggered-reveal-down > * {
    transform: translateY(-30px);
}

.reveal.staggered-reveal-left > * {
    transform: translateX(30px);
}

.reveal.staggered-reveal-right > * {
    transform: translateX(-30px);
}

/* Prevent content from being permanently invisible when JS is disabled */
.client-nojs .reveal,
.client-nojs .reveal > * {
    transform: none !important;
    opacity: 1 !important;
}

@media (prefers-reduced-motion: reduce) {
    .reveal, .reveal > * {
        transform: none !important;
        opacity: 1 !important;
    }
}

/* ---- Layout helpers ----------------------------------------------------- */
.container {
    width: 100%;
    max-width: var(--maxw);
    margin-inline: auto;
    padding-inline: clamp(1.1rem, 4vw, 2rem);
}

.section {
    padding-block: clamp(3rem, 7vw, 5.5rem);
}

.section--sage {
    background: var(--c-sage);
}

.section--accent {
    background: var(--c-accent-soft);
}

/* Just adds a margin */
.section-head {
    margin-bottom: clamp(1.5rem, 4vw, 2.6rem);
}

.center {
    text-align: center;
    margin-inline: auto;
}

.eyebrow {
    display: inline-block;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: .82rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--c-primary);
}

.lead {
    font-size: 1.18rem;
    color: var(--c-muted);
}

/* --- Buttons --- */

button {
    all: unset;
    box-sizing: border-box;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    padding: .85rem 1.5rem;
    border-radius: 999px;
    border: 2px solid transparent;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
    min-height: 48px;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--c-primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--c-primary-dark);
    color: #fff;
}

.btn-ghost {
    background: transparent;
    color: var(--c-primary-ink);
    border-color: var(--c-border-sage);
}

.btn-ghost:hover {
    background: var(--c-sage);
    color: var(--c-primary-ink);
}

.btn-subtle {
    font-size: 0.9rem;
    padding: 0.6rem 1rem;
    border: none;
}

.btn-on-dark {
    background: #fff;
    color: var(--c-primary-ink);
}

.btn-on-dark:hover {
    background: var(--c-sage);
    color: var(--c-primary-ink);
}

.btn-lg {
    font-size: 1.08rem;
    padding: 1rem 1.9rem;
}

/* Disabled states */
.btn:disabled,
.btn.is-disabled,
.btn[aria-disabled="true"] {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
    pointer-events: none; 
}

.btn-primary:disabled,
.btn-primary.is-disabled,
.btn-primary[aria-disabled="true"] {
    background: var(--c-primary);
    color: #fff;
}

.btn-ghost:disabled,
.btn-ghost.is-disabled,
.btn-ghost[aria-disabled="true"] {
    background: transparent;
    color: var(--c-primary-ink);
    border-color: var(--c-border-sage);
}

.btn-on-dark:disabled,
.btn-on-dark.is-disabled,
.btn-on-dark[aria-disabled="true"] {
    background: #fff;
    color: var(--c-primary-ink);
}

/* ---- Header / nav ---- */
.site-header {
    top: 0;
    z-index: 100;
    background: var(--c-primary);
    /* olive title bar */
    border-bottom: 1px solid rgba(0, 0, 0, .10);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .75rem;
    min-height: 72px;
}

.arcs {
    font-style: italic;
    font-weight: bold;
    text-transform: lowercase;
}

.btn .arcs {
    margin-left: -0.25em;
}

.brand {
    display: flex;
    align-items: center;
    gap: .65rem;
    flex: none;
    text-decoration: none;
    color: #fff;
}

.brand .mark {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    flex: none;
    background: var(--c-primary);
    color: #fff;
    display: grid;
    place-items: center;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 1.2rem;
}

.brand .brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand .logo {
    height: 40px;
    max-width: 122px;
    transition: max-width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    object-fit: cover;
    object-position: left;
}

.brand .logo > .logo-text {
    transform-origin: center;
    transition-property: transform, opacity;
    transition-duration: 0.3s;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transform: scale(1);
    opacity: 1;
}

.footer-brand .logo {
    max-height: 48px;
    max-width: 100%;
    height: auto;
    width: auto;
    display: block;
    margin-bottom: .4rem;
}

.nav-list {
    display: flex;
    width: 100%;
    gap: 0.3rem;
    list-style: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.nav-list a {
    display: inline-block;
    padding: .55rem .5rem;
    border-radius: 8px;
    color: var(--c-surface);
    text-decoration: none;
    font-weight: 600;
    font-size: .96rem;
    white-space: nowrap;
    transition: transform ease 0.2s;
}

.nav-list a:hover {
    transform: translateY(-1px);
}

.nav-list a:hover,
.nav-list a.current {
    background: rgba(255, 255, 255, .22);
    color: #fff;
}

.nav-list .nav-item-dropdown > a {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}
    
.nav-list > li {
    position: relative;
}

.nav-item .icon {
    display: none;
}

.nav-list > .nav-item:first-of-type {
    margin-left: auto;
}

.nav-list > .nav-item-dropdown:not([hidden]),
.nav-list > .nav-item:has(+ .nav-item-dropdown[hidden]) {
    margin-right: auto;
}

/* --- Navigation item dropdown --- */

/* This wrapper does the positioning, and ensures that translation doesn't modify the hover detection */
.dropdown-menu-wrapper {
    position: fixed;
    position-anchor: --dropdown-anchor;
    top: anchor(bottom);
    left: anchor(left);
    z-index: 110;
    pointer-events: none; /* Instantly blocks re-hovering while transitioning away */
}

.nav-item-dropdown:hover .dropdown-menu-wrapper {
    pointer-events: auto;
}

.nav-item-dropdown:hover .dropdown-menu {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.nav-item-dropdown:hover .dropdown-icon {
    transform: rotate(180deg);
}

/* Dropdown Menu Box */
.dropdown-menu {
    min-width: 230px;
    margin: 0;
    padding: 0.5rem 0;
    list-style: none;
    background-color: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(8px);
    transition-property: opacity, transform, visibility;
    transition-duration: 0.2s;
    transition-timing-function: ease;
}

/* Links inside the Dropdown */
.dropdown-menu a {
    display: block;
    padding: 0.6rem 1rem;
    color: var(--c-text) !important;
    font-size: 0.92rem;
    font-weight: 600;
    border-radius: 0;
    white-space: normal;
    transition: background-color 0.15s ease,
                color 0.15s ease,
                padding-left 0.2s ease-in-out;                
}

.dropdown-menu a:hover,
.dropdown-menu a:focus-visible {
    background-color: var(--c-sage);
    color: var(--c-primary-ink) !important;
    padding-left: 1.5em;
    transform: none !important; /* Prevents inherit from header link hover */
}

/* Caret Icon */
.dropdown-icon {
    width: 0.85em;
    height: 0.85em;
    transition: transform 0.2s ease;
}


.header-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.6rem;
    /*width: 100%;*/
}

.header-actions .btn {
    white-space: nowrap;
    font-size: 0.9rem;
    padding: 0.55rem 0.95rem;
    min-height: 40px;
    gap: 0.4rem;
    overflow: hidden;
}

.header-actions .btn:hover {
    color: revert-rule;
}

/* On the olive header, the phone button uses the deep-olive tone so it reads */
.btn-contact {
    background: var(--c-primary-ink);
    color: var(--c-surface);
    max-width: 130px;
}

.btn-contact:hover {
    background: #2e3925;
}

.btn-donate {
    background: var(--c-accent);
    border: none;
    color: var(--c-surface);
    max-width: 102px;
}

.btn-donate:hover {
    background: #a84e20;
}

.btn-donate .icon {
    width: 1.05em;
    height: 1.05em;
}

.btn-quick-exit {
    display: none;
    background: var(--c-accent-soft);
    color: #8a3f1d;
    border: 1px solid #e6c6b4;
    max-width: 120px;
}

.btn-quick-exit:hover {
    background: #ecd6c9;
}

/* Animate the button text when shrunk */
:is(.btn-contact, .btn-donate, .btn-quick-exit) {
    transition:
        max-width 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        /* These are copied from btn */
        background-color 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

:is(.btn-contact, .btn-donate, .btn-quick-exit) span {
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
}

/* --- Navigation toggle --- */

.nav-toggle {
    display: inline-flex;
    color: var(--c-surface);
    border-radius: 999px;
    width: 0px; /* Overridden in media query */
    height: 46px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    margin-right: -9.6px;
    z-index: 1;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-toggle:hover {
    background-color: rgba(255, 255, 255, 0.22);
}

.nav-toggle svg > line {
    transform-origin: center;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle svg > line:nth-child(3) {
    opacity: 0;
}

.nav-open {
    .nav-toggle {
        color: var(--c-primary);
    }

    .nav-toggle:hover {
        background-color: hsl(96 14% 98% / 1);
    }

    /* Rotate the top line 45 degrees clockwise and shift it down */
    .nav-toggle svg > line:nth-child(1) {
        opacity: 0;
    }
    
    .nav-toggle svg > line:nth-child(2) {
        transform: rotateZ(45deg);
    }

    .nav-toggle svg > line:nth-child(3) {
        transform: rotateZ(-45deg);
        opacity: 1;
    }

    .nav-toggle svg > line:nth-child(4) {
        opacity: 0;
    }
}

.nav-pending .nav-list {
    visibility: hidden;
}

/* --- Mobile navigation --- */

.nav-backdrop {
    display: none;
}

.nav-is-mobile {

    .header-actions {
        gap: .4rem;
    }

    /* --- Move navigation from header to sidebar --- */

    .site-header {
        position: sticky;
    }

    .nav-toggle {
        width: 46px;
    }

    .nav-list.is-sidebar-animating {
        transition: transform .25s ease;
    }

    .nav-list {
        position: fixed;
        inset: 0 0 0 auto;
        width: min(320px, 100vw);
        background: var(--c-surface);
        box-shadow: -8px 0 40px rgba(0, 0, 0, .18);
        padding: 5rem 1.4rem 2rem;
        transform: translateX(100%);
        margin: 0;
        overflow-y: auto;
        flex-direction: column;
        gap: .2rem;
    }

    .nav-list a {
        display: block;
        padding: .85rem 1rem;
        font-size: 1.05rem;
        color: var(--c-text);
        white-space: wrap;
    }

    .nav-list a:hover,
    .nav-list a.current {
        background: var(--c-sage);
        color: var(--c-primary-ink);
    }

    .nav-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(33, 59, 52, .4);
        opacity: 0;
        visibility: hidden;
        transition: .25s;
        z-index: 90;
    }
    
    &.nav-open .nav-list {
        transform: translateX(0);
    }

    &.nav-open .nav-backdrop {
        opacity: 1;
        visibility: visible;
    }
    
    .nav-list > .nav-item {
        margin-left: inherit !important;
        margin-right: inherit !important;
    }

    .nav-item a {
        transition: margin-left 0.2s ease;
    }

    .nav-item a:hover {
        margin-left: 0.5em;
        transform: none !important;
    }
    
    .nav-item .icon {
        display: unset;
        margin-right: 0.5em;
        color: var(--c-primary);
    }

    .btn.btn-quick-exit {
        display: block;
    }
}

/* ---- Header Sub-Strip (Tagline & Business Name) ---- */
.site-tagline-strip {
    background: var(--c-sage-deep);
    border-bottom: 1px solid var(--c-border-sage);
    padding: 0.5rem;
    font-size: clamp(0.8125rem, 2vw, 0.875rem);
    color: var(--c-primary-ink);
}

.site-tagline-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    column-gap: 0.5rem;
    text-align: center;
}

.site-tagline-title {
    font-weight: 700;
    letter-spacing: 0.02em;
}

.site-tagline-divider {
    color: var(--c-muted);
    opacity: 0.6;
}

.site-tagline-motto {
    font-style: italic;
    color: var(--c-muted);
}

/* ---- Full-width image banner (home) ------------------------------------- */
.home-banner {
    height: clamp(120px, 16vw, 150px);
    /* ~2x the nav height */
    background: var(--c-sage-deep);
    background-image: radial-gradient(circle at 30% 30%, #e3decb 0, transparent 55%),
        radial-gradient(circle at 78% 75%, #efdcc4 0, transparent 50%);
    display: grid;
    place-items: center;
    border-bottom: 1px solid var(--c-border);
}

.home-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-banner__note {
    font-size: .78rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--c-muted);
    opacity: .75;
}

/* --- Gradient Background --- */
/* In order to lazy load, use data-bg-src. When loaded, the --bg-src CSS variable set set along with .loaded */

.hero-bg {
    position: relative;
}

.hero-bg > * {
    position: relative;
}

.hero-bg:before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--bg-src);
    background-size: var(--bg-size, auto auto);
    background-position-x: var(--bg-focal-x, 50%);
    background-position-y: min(0%, var(--bg-focal-y, 50%)); /* Clamp to a minimum of 0% (this is overridden for browsers that do support scroll animation) */
    background-attachment: fixed;
    background-repeat: no-repeat;
    mask-image: var(--bg-mask-image, linear-gradient(to right, #000000, #505050));
    mask-mode: luminance;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

@supports (animation-timeline: scroll()) {

    .hero-bg:before {
        animation-name: hero-bg;
        animation-timeline: scroll(root);
        animation-fill-mode: both;
        animation-range-start: 0vh;
        animation-range-end: 80vh;
        animation-timing-function: linear;
    }

    .hero-bg-2:before {
        animation-timeline: view();
        animation-range-start: 0%;
        animation-range-end: 100%;
    }

    @keyframes hero-bg {
        0% {
            background-position-y: var(--bg-focal-y, 50%);
        }
        100% {
            background-position-y: calc(var(--bg-focal-y, 50%) + var(--bg-offset, 10%));
        }
    }
}

.hero-bg.loaded:before {
    opacity: 1;
}

/* Home page hero styles */
.hero-bg-1:before {
    mask-image: linear-gradient(to right, #000000, #505050);
}

.hero-bg-2:before {
    mask-image: radial-gradient(circle at 30% 30%, #222 0, #000 55%),
                radial-gradient(circle at 78% 75%, #222 0, #000 50%);
}

/* --- Attribution for gradient background --- */

.info-btn {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    font-size: 11px;
    font-style: italic;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.info-btn:hover,
.info-btn:focus {
    opacity: 1;
}

.attribution-tooltip-wrapper {
    position: absolute;
    bottom: 12px;
    right: 12px;
}

.attribution-tooltip-content {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: 28px;
    right: 0;
    white-space: nowrap;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    font-weight: 600;
    font-size: 12px;
    padding: 6px 16px;
    border-radius: 999px;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

/* Reveal tooltip on hover or keyboard focus */
.attribution-tooltip-wrapper:hover .attribution-tooltip-content,
.info-btn:focus+.attribution-tooltip-content {
    visibility: visible;
    opacity: 1;
}

.attribution-tooltip-content a {
    color: #fff;
    text-decoration: underline;
}

.attribution-tooltip-content a:hover {
    color: #bbb;
}

/* Ambient image slots (swap the .placeholder for an <img> when ready) */
.img-slot {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: linear-gradient(135deg, var(--c-sage-deep) 0%, var(--c-sage) 55%, var(--c-accent-soft) 100%);
    box-shadow: var(--shadow);
}

.img-slot img {
    max-width: 100%;
    object-fit: cover;
    display: block;
}

.img-slot .placeholder {
    text-align: center;
    padding: 1.5rem;
}

.img-slot .placeholder .ph-icon {
    font-size: 2rem;
    opacity: .55;
}

.img-slot .placeholder strong {
    display: block;
    font-family: var(--font-head);
    color: var(--c-primary-dark);
    font-size: 1.05rem;
    margin: .5rem 0 .25rem;
}

.img-slot .placeholder small {
    display: block;
    color: var(--c-muted);
    max-width: 36ch;
    margin-inline: auto;
}

.img-band {
    margin-bottom: 3rem;
    max-height: 360px;
}

/* ---- Hero ------------ */
.hero {
    position: relative;
    background: var(--c-sage);
}

.hero-inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(1.5rem, 4vw, 3.5rem);
    align-items: start;
    padding-block: clamp(2.5rem, 6vw, 4rem);
}

.hero-copy {
    max-width: 62ch;
}

.hero .lead {
    max-width: 62ch;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: .8rem;
    margin-top: 1.6rem;
}

.hero-reassure {
    margin-top: 1.5rem;
    font-size: .98rem;
    color: var(--c-muted);
    display: flex;
    align-items: center;
    gap: .5rem;
}

.img-slot.hero-art {
    background: var(--c-sage-deep);
    aspect-ratio: 4 / 5;
    background-image: radial-gradient(circle at 30% 25%, #dfe3cf 0, transparent 45%),
        radial-gradient(circle at 75% 80%, #f0dcc4 0, transparent 40%);
}

.img-slot.hero-art span {
    font-family: var(--font-head);
    color: var(--c-primary);
    font-size: 1.05rem;
    opacity: .7;
    padding: 1rem;
    text-align: center;
}

.img-slot.hero-art.hero-art-small {
    aspect-ratio: 1.5;
}

/* ---- Cards / grids --- */
.grid {
    display: grid;
    gap: var(--gap);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.card {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: clamp(1.5rem, 3vw, 2rem);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

.card--sage {
    background:var(--c-sage);
    border-color:var(--c-border-sage);
}

.card h3 {
    /*margin-top: 1rem;*/
}

.card p {
    color: var(--c-muted);
    margin-bottom: 1rem;
}

.card p:last-child {
    margin-bottom: 0;
}

.card ul:not([class]) {
    padding-left: clamp(20px, 0.86px + 5.32vw, 40px);
}

.card-link {
    margin-top: auto;
    font-weight: 700;
    text-decoration: none;
}

.card-link::after {
    content: " →";
}

.card-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    flex: none;
    background: var(--c-sage);
    color: var(--c-primary);
    display: grid;
    place-items: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* Profile cards (team & board) */

.profile {
    align-items: center;
}

@media (min-width: 960px) {
    .profile#admin {
        grid-column: 2;
    }
}

.profile .photo {
    width: 104px;
    height: 104px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 1rem;
    background: #dfdfdf;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
    outline: 4px solid #dfdfdf;
}

.profile .photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.profile .photo-cluster {
    position: relative;
    width: 180px;
    height: 160px;
    margin-bottom: 1.5rem;
}

/* Base styling for all three photos in the cluster */
.profile .photo-cluster .photo {
    position: absolute;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    overflow: hidden;
    background: #dfdfdf;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    outline: 4px solid #ffffff; /* Creates a clean separation border between overlapping photos */
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), z-index 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    margin-bottom: unset;
}

.profile .photo-cluster .photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Positioning the three circles in a cluster (triangle arrangement) */
/* Bottom left */
.profile .photo-cluster .photo-1 {
    top: 0;
    left: 45px;
    z-index: 2;
}

/* Top center */
.profile .photo-cluster .photo-2 {
    bottom: 0;
    left: 0;
    z-index: 1;
}

/* Bottom right */
.profile .photo-cluster .photo-3 {
    bottom: 0;
    right: 0;
    z-index: 1;
}

/* Hover Effects: Bring to front and scale up */
.profile .photo-cluster .photo:hover {
    transform: scale(1.25) translateY(-4px);
    z-index: 10;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    outline-color: #f0f0f0;
}

@media (max-width: 960px ) and (min-width: 360px) {
    .profile .photo-cluster {
        width: 280px;
        height: 104px;
    }
    .profile .photo-cluster .photo {
        width: 104px;
        height: 104px;
    }

    /* Left */
    .profile .photo-cluster .photo-1 {
        left: 0;
        z-index: 1;
    }
    
    /* Middle */
    .profile .photo-cluster .photo-2 {
        left: 88px;
        z-index: 2;
    }
    
    /* Right */
    .profile .photo-cluster .photo-3 {
        right: 0;
        z-index: 1;
    }
}

.profile .role {
    font-weight: 700;
    color: var(--c-primary);
    margin-bottom: .6rem;
    font-size: .95rem;
    text-align: center;
}

.subhead {
    margin: 2.4rem 0 1.2rem;
}

/* Reassurance / steps */
.steps {
    counter-reset: step;
}

.step {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.step .num {
    counter-increment: step;
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--c-primary);
    color: #fff;
    font-family: var(--font-head);
    font-weight: 600;
    display: grid;
    place-items: center;
}

.step .num::before {
    content: counter(step);
}

/* ---- Free counselling banner ------------------------------------------- */
.banner {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    align-items: center;
    justify-content: space-between;
    background: var(--c-surface);
    border: 1px solid var(--c-border-sage);
    border-left: 6px solid var(--c-primary);
    border-radius: var(--radius);
    padding: clamp(1.3rem, 3vw, 1.8rem) clamp(1.5rem, 3vw, 2rem);
    box-shadow: var(--shadow-sm);
}

.banner p {
    margin: 0;
}

.banner h3,
.banner h4 {
    margin-bottom: 0.35rem;
}

/* ---- Smaller general-use banner --- */

.banner.banner-small {
    font-size: 0.95rem;
    padding: 1.2rem;
    margin: 1.5rem 0;
    gap: 0;
}

.banner.banner-small h3 {
    font-size: 1.1rem;
}

/* Banner colors */

.banner.banner-info {
    border-left-color: var(--c-primary);
    background-color: var(--c-surface);
}

.banner.banner-warning {
    border-left-color: var(--c-warning);
    background-color: var(--c-warning-bg);
}

.banner.banner-error {
    border-left-color: var(--c-error);
    background-color: var(--c-error-bg);
}

.banner.banner-error h3 {
    color: var(--c-accent);
}

/* --- Draft banner --- */

.draft-banner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 1rem;
}

.draft-banner-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.btn-close {
    background: transparent;
    border: none;
    color: var(--c-muted);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.4rem;
    line-height: 1;
    border-radius: 4px;
}

.btn-close:hover {
    color: var(--c-text);
    background: rgba(0, 0, 0, 0.05);
}

@media (max-width: 576px) {
    .draft-banner-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .draft-banner-actions {
        width: 100%;
        justify-content: space-between;
    }
}

/* ---- Contact form ---- */

.client-nojs #contactForm fieldset {
    opacity: 0.5;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 0.65fr;
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: start;
}

.contact-card {
    color: var(--c-muted);
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: clamp(1.5rem, 3vw, 2.2rem);
    box-shadow: var(--shadow-sm);

    display: grid;
    grid-template-areas: "stack";
    align-items: start;
    overflow: hidden;
    box-sizing: content-box;
}

/* Force form and success state into the same visual space */
.contact-card > * {
    grid-area: stack;
}

.contact-card.is-submitted .contact-form,
.contact-card:not(.is-submitted) .success-card {
    opacity: 0;
    pointer-events: none;
}

.success-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    align-items: center;
}

.field {
    margin-bottom: 1.1rem;
}

.field label {
    display: block;
    font-weight: 700;
    margin-bottom: .35rem;
    color: var(--c-primary-ink);
}

.field .hint {
    color: var(--c-muted);
    font-size: .9rem;
    font-weight: 400;
}

.hint {
    color: var(--c-muted);
}

.field .error {
    color: var(--c-accent);
    font-size: .9rem;
    font-weight: 400;
    margin: 0.5rem 0 0 0.2rem;
    white-space: pre-line;
}

/* Hide errors within .field that do not have an is-invalid class */
.field:not(.is-invalid) .error,
.field:not(.is-invalid) .banner-error {
    display: none;
}

.field input:not([type="checkbox"]),
.field select {
    width: 100%;
    font: inherit;
    color: var(--c-text);
    padding: .8rem .9rem;
    border: 1.5px solid var(--c-border);
    outline-color: transparent;
    border-radius: var(--radius-sm);
    background: #fff;
    min-height: 48px;
    transition-property: border-color, outline-color, background;
    transition-duration: 0.2s;
    transition-timing-function: ease-in-out;
}

.field input:not([type="checkbox"]):focus,
.field select:focus,
.textarea-wrapper:has(textarea:focus) {
    border-color: var(--c-primary);
    outline: 3px solid rgba(29, 94, 126, .25);
    outline-offset: 0;
}

/* Disabled state for inputs inside light/white surfaces */
.field input:disabled,
.field select:disabled,
.textarea-wrapper:has(textarea:disabled) {
    background-color: #f8f6f2;        /* Very light, warm off-white */
    color: #8c8375;                   /* Softened text color */
    border-color: #e2dacd;            /* Lightened warm border */
    cursor: not-allowed;
    box-shadow: none;
    -webkit-text-fill-color: #8c8375; /* Fixes auto-darkening in iOS Safari */
}

.textarea-counter {
    color: var(--c-muted);
    padding: 2px 6px;
    font-size: 0.8rem;
    text-align: right;
    border-top: 1px solid var(--c-border);
}

.textarea-counter:empty {
    display: none;
}

.textarea-counter.exceeded {
    color: var(--c-accent);
}

.textarea-wrapper {
    display: flex;
    flex-direction: column;
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: var(--radius-sm);
    border: 1px solid var(--c-border);
    outline: 3px solid transparent;
    background: #fff;
    transition-property: border-color, outline-color, background;
    transition-duration: 0.2s;
    transition-timing-function: ease-in-out;
}

.textarea-wrapper textarea {
    position: relative;
    display: block;
    width: 100%;
    font: inherit;
    color: var(--c-text);
    padding: 0.8rem 0.9rem;
    border: none;
    outline: none;
    background: transparent;
    min-height: 150px;
    max-height: 50vh;
    field-sizing: content;
    scrollbar-gutter: stable;
    word-break: break-word;
    scrollbar-color: #ccc transparent;
    overflow-y: auto;
    resize: vertical;
}

.textarea-wrapper textarea:disabled:hover,
.textarea-wrapper textarea:disabled:focus {
    border-color: unset;
    outline-color: unset;
    background-color: unset;
    pointer-events: auto;
    cursor: not-allowed;
}

/* Custom Browser-Agnostic Checkbox */
.checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.checkbox-wrapper label {
    color: var(--c-text);
}

.checkbox-wrapper input[type="checkbox"] {
    /* Remove native OS/browser styles */
    all: unset;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    
    /* Layout & Dimensions */
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
    margin: 0;
    margin-top: 0.2rem;
    
    /* Styling matching your tokens */
    background-color: var(--c-surface);
    border: 1.5px solid var(--c-border);
    border-radius: 4px;
    cursor: pointer;
    
    /* Grid layout to center the custom SVG checkmark */
    display: grid;
    place-content: center;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Custom Checkmark (Inline SVG background) */
.checkbox-wrapper input[type="checkbox"]::before {
    content: "";
    width: 0.85rem;
    height: 0.85rem;
    transform: scale(0);
    transition: 120ms transform ease-in-out;
    background-color: #ffffff;
    
    /* SVG mask creates a crisp checkmark icon across all devices */
    -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg>') no-repeat center / contain;
    mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg>') no-repeat center / contain;
}

/* Checked State */
.checkbox-wrapper input[type="checkbox"]:checked {
    background-color: var(--c-primary);
    border-color: var(--c-primary);
}

.checkbox-wrapper input[type="checkbox"]:checked::before {
    transform: scale(1);
}

/* Hover State */
.checkbox-wrapper input[type="checkbox"]:hover:not(:disabled) {
    border-color: var(--c-primary-dark);
}

/* Focus State for Keyboard Accessibility */
.checkbox-wrapper input[type="checkbox"]:focus-visible {
    outline: 3px solid var(--c-focus);
    outline-offset: 2px;
}

/* Disabled State */
.checkbox-wrapper input[type="checkbox"]:disabled {
    background-color: #f8f6f2;
    border-color: #e2dacd;
    cursor: not-allowed;
}

.checkbox-wrapper input[type="checkbox"]:disabled:checked {
    background-color: var(--c-muted);
    border-color: var(--c-muted);
}

.checkbox-wrapper + .error {
    margin: 0;
    margin-left: 2.2rem;
}

.checkbox-wrapper input[type="checkbox"]:disabled {
    cursor: not-allowed;
    opacity: 0.4;
    filter: grayscale(100%);
}

.checkbox-wrapper input[type="checkbox"]:disabled + label {
    color: var(--c-muted);
    cursor: not-allowed;
    opacity: 0.7;
}

/* Specific styles for contact form */

.field:not(:has(input[required])) .when-required,
.field:has(input[required]) .when-optional {
    display: none;
}

.field #email {
    text-transform: lowercase;
}

.email-suggestion {
    margin-top: 0.7rem;
    word-break: break-all;
}

.phone-wrapper {
    position: relative;
}

.flag {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    opacity: 0.5;
    padding: .8rem 1rem;
}

.flag > .flag-placeholder {
    position: absolute;
    width: 28px;
    height: auto;
}

.flag .flag-placeholder,
.flag .flag-img {
    transition: opacity 0.2s ease;
}

.flag:not(.loading) > .flag-placeholder,
.flag.loading > .flag-img {
    opacity: 0;
}

/* Turnstile */

.turnstile-wrapper {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 1.2rem;
}

.turnstile-wrapper + .banner-error {
    margin: 0;
    margin-top: 1.2rem;
}

/* Submit button */
.btn#submit {
    width: 185px;
    justify-content: center;
}

/* Honeypot field hiding techniques */

.field-confirm {
    user-select: none;
    pointer-events: none;
    cursor: default;
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
}

.hp {
    user-select: none;
    pointer-events: none;
    cursor: default;
}

.hp-abs-position {
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
}

.hp-1px-height-overflow {
    height: 1px !important;
    overflow: hidden !important;
    margin: 0 !important;
}

.hp-1px-height-clipped {
    height: 1px !important;
    clip-path: inset(50%) !important;
    margin: 0 !important;
}

.hp-1x-width {
    width: 1px !important;
    float: left;
    margin: 0 !important;
}

.hp-zero-size {
    width: 0 !important;
    height: 0 !important;
    opacity: 0 !important;
    overflow: hidden !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.hp-content-visibility {
    content-visibility: hidden;
    margin: 0 !important;
}

/* The following require a layout offset to shift it out of the document flow,
with a calculated negative margin or absolute positioning. */

.hp-clip-path {
    clip-path: inset(50%);
}

/* Transparent with calculated layout shift */
.hp-opacity {
    opacity: 0 !important;
}

.hp-filter-opacity {
    filter: opacity(0) !important;
}

.hp-transform-scale {
    transform: scale(0) !important;
}

.hp-transform-translate {
    transform: translate(-9999px, -9999px) !important;
}

.hp-transform-rotate {
    transform: rotate3d(0, 1, 0, 90deg) !important;
}

.hp-transform-skew {
    transform: skewX(90deg) !important;
}

.hp-z-index {
    position: relative !important;
    z-index: -1 !important;
}

.hp-no-color, .hp-no-color * {
    color: transparent !important;
    background: transparent !important;
    background-color: transparent !important;
    border-color: transparent !important;
    outline-color: transparent !important;
    margin: 0 !important;
}

/* This only works if there's a big enough element after the field */
.hp-psuedo-element {
    clip-path: border-box;
    position: absolute;
}

/* Overlay a rectangle over the element */
.hp-psuedo-element:after {
    content: "";
    position: absolute;
    top: -4px;
    bottom: -14px;
    left: -4px;
    right: -4px;
    background-color: #ffffff;
}

/* Places the next element on top of the psuedo-element */
.hp-psuedo-element + * {
    position: relative;
}

:is(.hp-clip-path, .hp-opacity, .hp-filter-opacity,
.hp-transform-scale, .hp-transform-translate, .hp-transform-rotate, .hp-transform-skew,
.hp-z-index, .hp-no-color, .hp-psuedo-element, .hp-psuedo-element:after) * {
    pointer-events: none;
    user-select: none;
}

.contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 1.1rem;
}

.contact-list li {
    display: flex;
    gap: .8rem;
}

.contact-list .ic {
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--c-sage);
    color: var(--c-primary);
    display: grid;
    place-items: center;
    font-size: 1.1rem;
}

.contact-list a {
    font-weight: 700;
}

.contact-list .label {
    display: block;
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--c-muted);
}

.footer-contact .contact-list .ic {
    width: 20px;
    height: 30px;
    color: var(--c-primary);
    background: none;
}

.footer-contact .contact-list a {
    font-weight: normal;
}

/* ---- Crisis support (distinct light panel, set apart from the footer) ---- */
.section--crisis {
    background: var(--c-sage-deep);
    border-top: 3px solid var(--c-accent);
}

.section--crisis .eyebrow {
    color: var(--c-primary-ink);
}

.crisis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.crisis {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 1.2rem 1.3rem;
}

.crisis strong {
    color: var(--c-primary-ink);
    display: block;
    font-size: 1.08rem;
    margin-bottom: .15rem;
}

.crisis a {
    color: var(--c-accent);
    font-weight: 700;
    font-size: 1.25rem;
    text-decoration: none;
}

.crisis a:hover {
    text-decoration: underline;
}

.crisis small {
    color: var(--c-muted);
    display: block;
    margin-top: .2rem;
}

/* ---- Footer ---------- */
.site-footer {
    background: var(--c-primary-ink);
    color: #d6e3dc;
    padding-block: clamp(2.5rem, 5vw, 3.5rem) 1.5rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 2rem;
}

.site-footer h4 {
    color: #fff;
    font-family: var(--font-body);
    font-size: .85rem;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.site-footer a {
    color: #d6e3dc;
    text-decoration: none;
}

.site-footer a:hover {
    color: #fff;
    text-decoration: underline;
}

.site-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: .5rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .15);
    margin-top: 2.2rem;
    padding-top: 1.2rem;
    font-size: .88rem;
    color: #aec6bb;
    display: flex;
    flex-wrap: wrap;
    gap: .6rem 1.5rem;
    justify-content: space-between;
}

/* ---- Acknowledgement of country --- */
.acknowledgement {
    font-size: .92rem;
    color: #bcd2c7;
    max-width: 70ch;
}

/* ---- Page hero --- */
.page-hero {
    background: var(--c-sage);
    padding-block: clamp(2.5rem, 6vw, 4rem);
}

.page-hero p {
    color: var(--c-muted);
}

.page-hero h1 {
    max-width: 24ch;
}

/* --- Breadcrumbs --- */

.breadcrumb {
    font-size: 0.9rem;
    margin-bottom: 0.6rem;
    color: var(--c-muted);
}

.breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;
}

.breadcrumb li {
    display: inline-flex;
    align-items: center;
}

.breadcrumb li + li::before {
    content: "/";
    padding: 0 0.5rem;
}

.breadcrumb a {
    color: var(--c-muted);
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb li:last-child a {
    pointer-events: none;
    text-decoration: none;
}


.prose > * + * {
    margin-top: 0;
}

.prose h2 {
    margin-top: 2.2rem;
}

.prose ul {
    padding-left: 1.2rem;
}

.prose li {
    margin-bottom: .4rem;
}

/* ---- Utilities ------- */
.mt-0 {
    margin-top: 0 !important;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.tag {
    display: inline-block;
    background: var(--c-sage-deep);
    color: var(--c-primary-dark);
    font-weight: 700;
    font-size: .8rem;
    padding: .25rem .7rem;
    border-radius: 999px;
}

/* Donate */
.donate-cards {
    display: flex;
    flex-direction: column;
    row-gap: 1rem;
    max-width: 42rem;
    padding: clamp(1.5rem, 3vw, 2rem);
    margin-left: auto;
    margin-right: auto;
}

/*
.btn#donateBtn {
    will-change: transform, opacity;
    cursor: pointer !important;
}
    */

/* Bank details */
.bank-details {
    list-style: none;
    margin-bottom: 1rem;
    padding: 0;
}

.bank-details li {
    display: flex;
    gap: .8rem;
    padding: .4rem 0;
    border-bottom: 1px solid var(--c-border-sage);
}

.bank-details li:last-child {
    border-bottom: 0;
}

.bank-details .label {
    flex: 0 0 7.5rem;
    color: var(--c-muted);
    font-weight: 600;
}

/* Resource links */
.resource-links {
    list-style: none;
    margin: .6rem 0 0;
    padding: 0;
}

.resource-links > li {
    padding: .9rem 0;
    border-bottom: 1px solid var(--c-border-sage);
}

.resource-links > li:last-child {
    border-bottom: 0;
}

.resource-links > li > a {
    font-weight: 700;
}

.resource-links > li > span {
    display: block;
    color: var(--c-muted);
    font-size: .95rem;
    margin-top: .2rem;
}

/* Inline line icons (modern stroke icons, inherit currentColor) */
.icon {
    width: 1.15em;
    height: 1.15em;
    flex: none;
    vertical-align: -0.18em;
}

.card-icon .icon {
    width: 26px;
    height: 26px;
}

.contact-list .ic .icon {
    width: 20px;
    height: 20px;
}

.hero-reassure .icon {
    color: var(--c-primary);
}

.card h3 .icon {
    color: var(--c-primary);
    margin-right: .4rem;
    vertical-align: -0.15em;
}

.btn .icon {
    vertical-align: -0.16em;
}

/* Spinner */
.spinner {
    display: inline-block;
    aspect-ratio: 1;
    border: 2px solid transparent;
    border-radius: 50%;
    border-top-color: currentColor;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* --- Attributions --- */

/* Inline License Badge */
.badge {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.03em;
    color: var(--c-primary-ink);
    background-color: var(--c-sage);
    border: 1px solid var(--c-border-sage);
    border-radius: var(--radius-sm);
    padding: 0.2rem 0.45rem;
    margin-left: 0.35rem;
    vertical-align: middle;
    text-transform: uppercase;
    text-decoration: none; /* In case the badge is wrapped in an <a> */
    transition-property: background-color, border-color, transform;
    transition-duration: 0.2s;
    transition-timing-function: ease;
}

.badge:hover,
a:hover > .badge {
    background-color: var(--c-sage-deep);
    border-color: var(--c-primary);
    transform: translateY(-1px);
}

a.badge:focus-visible {
    outline: 3px solid var(--c-focus);
    outline-offset: 2px;
}

.badge + .badge {
    margin-left: 0.175rem;
}

/* --- Quote block --- */




.quote-block {
    margin: 0 auto;
    padding: 2rem;
    border: none;
}

.quote-text {
    font-family: var(--font-head);
    font-size: clamp(1.45rem, 3vw, 2rem); /* Scales smoothly across viewports */
    font-weight: 700;
    line-height: 1.3;
    color: var(--c-primary-ink);
    margin: 0 0 1.5rem 0;
    max-width: none; /* Overrides default body paragraph limit */
}

.quote-attribution {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    font-style: normal; /* Resets default browser cite styling */
}

.quote-author {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--c-text);
}

.quote-role {
    font-size: 0.9rem;
    color: var(--c-muted);
}

/* --- Knowledge hub --- */

.kb-layout {
    display: grid;
    position: relative;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 2.5rem;
    align-items: start;
    transition: grid-template-columns 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.kb-layout.toc-closed {
    grid-template-columns: minmax(0, 1fr) 0px;
}

.kb-toc-toggle {
    position: absolute;
    top: 0;
    right: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.85rem;
    background-color: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    color: var(--c-primary-ink);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: background-color 0.2s ease, border-color 0.2s ease;
    z-index: 10;
}

.kb-toc-toggle:hover {
    background-color: var(--c-sage);
    border-color: var(--c-primary);
}

/* Sticky TOC Sidebar */
.kb-sidebar {
    position: sticky;
    top: 2rem;
    width: 280px;      /* Enforce fixed explicit width */
    min-width: 280px;  /* Block grid from compressing inner text width */
    overflow-y: auto;
    overflow-x: hidden;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.35s ease,
                visibility 0.35s ease;
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
}

.kb-sidebar.is-closed {
    transform: translateX(40px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Flat Content Display Area */
.kb-content {
    min-height: 400px;
    overflow-x: visible;
}

.kb-article {
    opacity: 0;
    transform: translateX(-15px);
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.kb-article.is-active {
    opacity: 1;
    transform: translateX(0);
}

.kb-article h2 {
    margin-top: 0;
    margin-bottom: 1rem;
}

/* Interactive & Readable TOC Formatting */
.kb-sidebar-title {
    font-size: 0.95rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--c-muted);
    margin-bottom: 0.75rem;
}

.kb-toc-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.kb-toc-nav li {
    margin-bottom: 0.2rem;
}

.kb-toc-nav ul ul {
    padding-left: 1rem;
    margin-top: 0.2rem;
    margin-bottom: 0.4rem;
    border-left: 2px solid var(--c-border-sage);
}

.kb-toc-link {
    display: block;
    padding: 0.4rem 0.65rem;
    color: var(--c-text);
    background-color: transparent;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: var(--radius-sm);
    transition-property: background-color, color, margin-left;
    transition-timing-function: ease;
    transition-duration: 0.2s;
}

.kb-toc-link:not(.is-active):hover {
    background-color: var(--c-sage);
    color: var(--c-primary-ink);
    margin-left: 2px;
}

.kb-toc-link.is-active {
    background-color: var(--c-primary);
    color: #ffffff !important;
    font-weight: 700;
}

/* Mobile TOC trigger */

.kb-mobile-trigger-wrap {
    position: relative;
    display: none;
    margin-bottom: 1.5rem;
}

.kb-mobile-trigger {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1.25rem;
    border: 1.5px solid var(--c-border-sage);
    border-radius: var(--radius);
    background: var(--c-surface);
    font-weight: 700;
    color: var(--c-primary-ink);
}

.kb-mobile-trigger svg {
    transition: transform 0.2s ease;
}

.kb-mobile-trigger[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

.kb-mobile-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    z-index: 90;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 1rem;
    box-shadow: var(--shadow);
    max-height: 380px;
    overflow-y: auto;
}

/* Breakpoint adjustments */
@media (max-width: 960px) {
    .kb-layout .breadcrumb,
    .kb-layout .kb-content {
        grid-column: span 2;
    }
    .kb-sidebar,
    .kb-toc-toggle-wrapper {
        display: none !important;
    }

    .kb-mobile-trigger-wrap {
        display: block;
    }
}

/* --- Category card links --- */

a.card.link-card {
    text-decoration: none;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

a.card.link-card:hover {
    transform: translateY(-2px);
    border-color: var(--c-primary);
    box-shadow: var(--shadow);
}

.kb-card-link {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--c-primary-dark);
    margin-top: auto;
}

/* Category Sub-Topic Index Box */
.kb-child-links {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--c-sage);
    border-radius: var(--radius);
    border: 1px solid var(--c-border-sage);
}

.kb-child-links h3 {
    font-size: 1.05rem;
    margin-bottom: 1rem;
}

.kb-child-links ul {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.kb-child-links a {
    display: block;
    padding: 0.6rem 0.85rem;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
    color: var(--c-primary-ink);
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.kb-child-links a:hover {
    background: var(--c-primary);
    color: #ffffff;
    border-color: var(--c-primary);
}

/* ---- Responsive ------ */
@media (max-width: 960px) {

    .img-slot.hero-art {
        aspect-ratio: 1.5;
    }

    .hero-inner {
        grid-template-columns: 1fr;
    }

    .hero-inner .img-slot.hero-art {
        aspect-ratio: 2.5;
        order: -1;
    }

    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    /*
    For over/under donate
    .donate-grid > .card:nth-child(3) {
        grid-column: span 2;
    }
    */

    /* For side-by-side donate */
    .donate-grid {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .footer-grid .footer-links {
        grid-row: span 2;
    }

    .footer-grid .footer-contact {
        grid-column: 1;
    }
}

/* Targets standard tablets in portrait orientation. */
/* This query also holds mobile overrides */
@media (max-width: 768px) {

    .img-band {
        margin-bottom: 2rem;
    }
    
    .img-slot.hero-art,
    .img-slot.hero-art.hero-art-small {
        aspect-ratio: 16 / 9;
        order: -1;
    }

    .banner {
        flex-direction: column;
        align-items: flex-start;
    }

    .grid-3, .grid-2 {
        grid-template-columns: 1fr;
    }

    .grid-3.staggered-reveal-up > * {
        transform: translateX(30px);
    }

    /*
    For over/under donate
    .donate-grid > .card:nth-child(3) {
        grid-column: auto;
    }
    */

    .hero-bg .attribution-tooltip-wrapper {
        display: none;
    }

    .hero-bg:before {
        opacity: 0 !important;
    }

    .textarea-wrapper textarea {
        resize: none;
    }
}

@media (max-width: 620px) {
    .site-tagline-inner {
        flex-direction: column;
    }
    .site-tagline-divider {
        display: none; /* Hide dot separator on stacked mobile layout */
    }
}

/* Targets larger mobile phones or landscape phone modes. */
@media (max-width: 576px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid .footer-links {
        grid-row: auto;
    }

    .footer-grid .footer-contact {
        grid-column: auto;
    }
}

/* Targets standard mobile phones in portrait mode */
@media (max-width: 480px) {

    .btn {
        white-space: wrap;
    }

    .site-footer .container {
        padding-inline: clamp(1.5rem, 4vw, 2rem);
    }

    .bank-details li {
        flex-direction: column;
        gap: 0;
    }

    .bank-details .label {
        flex-basis: auto;
    }

    .card.profile {
        align-items: center;
    }
}

@media (max-width: 460px) {
    :is(.btn-donate, .btn-quick-exit) {
        max-width: 45.5px;
    }

    :is(.btn-donate, .btn-quick-exit) span {
        opacity: 0;
    }

    .btn-contact {
        max-width: 50px;
    }

    .btn-contact span {
        opacity: 0;
    }
}

@media (max-width: 320px) {
    .brand .logo {
        max-width: 40px;
    }

    .brand .logo > .logo-text {
        transform: scale(0);
        opacity: 0;
    }
}

@media (max-width: 295px) {
    * {
        word-break: break-word;
    }
    .btn-quick-exit {
        display: none !important;
    }
}

@media (max-width: 245px) { .btn-donate { display: none; } }
@media (max-width: 187px) { .btn-contact { display: none; } }
/*
* {
  outline: 1px solid red !important;
}
*/