.chapter-profile-page {
    --org-line: #08723d;
    --org-line-soft: rgba(8, 114, 61, 0.18);
    --org-junction: var(--accent);
    background: var(--paper);
}

/* HERO */

.chapter-profile-hero {
    position: relative;
    overflow: hidden;
    color: var(--paper);
    background:
        radial-gradient(
            circle at 88% 18%,
            rgba(215, 181, 109, 0.18),
            transparent 29%
        ),
        linear-gradient(
            120deg,
            var(--green-deep),
            var(--green)
        );
    border-bottom: 2px solid var(--ink);
}

.chapter-profile-hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.55fr);
    gap: 72px;
    align-items: end;
    min-height: 540px;
    padding-top: 76px;
    padding-bottom: 76px;
}

.chapter-profile-back {
    display: inline-flex;
    gap: 9px;
    width: fit-content;
    margin-bottom: 40px;
    color: var(--accent);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.chapter-profile-hero h1 {
    max-width: 900px;
    margin: 18px 0 25px;
    color: var(--paper);
    font-size: clamp(54px, 7.4vw, 104px);
    font-weight: 800;
    line-height: 0.87;
    letter-spacing: -0.06em;
    text-transform: uppercase;
}

.chapter-profile-hero__content > p {
    max-width: 730px;
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-family: var(--font-serif);
    font-size: 19px;
    line-height: 1.7;
}

.chapter-profile-identity {
    overflow: hidden;
    color: var(--ink);
    background: var(--paper);
    border: 2px solid var(--ink);
    box-shadow: 14px 14px 0 var(--accent);
}

.chapter-profile-identity__mark {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 145px;
    background:
        linear-gradient(
            135deg,
            rgba(0, 96, 48, 0.08),
            rgba(215, 181, 109, 0.16)
        );
    border-bottom: 2px solid var(--ink);
}

.chapter-profile-identity__mark img {
    width: 102px;
    height: 102px;
    object-fit: contain;
}

.chapter-profile-identity > div:not(.chapter-profile-identity__mark) {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 17px 20px;
    border-bottom: 1px solid var(--grey);
}

.chapter-profile-identity > div:last-child {
    border-bottom: 0;
}

.chapter-profile-identity span {
    color: var(--green);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.chapter-profile-identity strong {
    max-width: 180px;
    text-align: right;
    font-size: 13px;
    line-height: 1.4;
}

/* HEADINGS */

.chapter-profile-section-heading {
    display: flex;
    justify-content: space-between;
    gap: 48px;
    align-items: end;
    margin-bottom: 42px;
}

.chapter-profile-section-heading h2 {
    margin: 14px 0 0;
    font-size: clamp(40px, 5.4vw, 72px);
    line-height: 0.91;
    letter-spacing: -0.05em;
    text-transform: uppercase;
}

.chapter-profile-section-heading > p {
    max-width: 490px;
    margin: 0;
    color: rgba(11, 15, 13, 0.7);
    font-family: var(--font-serif);
    font-size: 17px;
    line-height: 1.68;
}

/* INFO */

.chapter-profile-information {
    padding: 78px 0;
    background: var(--paper);
    border-bottom: 2px solid var(--ink);
}

.chapter-profile-information__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 2px solid var(--ink);
    border-left: 2px solid var(--ink);
}

.chapter-information-panel {
    display: grid;
    grid-template-columns: 45px minmax(0, 1fr);
    gap: 19px;
    min-height: 235px;
    padding: 28px;
    background: var(--paper);
    border-right: 2px solid var(--ink);
    border-bottom: 2px solid var(--ink);
}

.chapter-information-panel--special {
    color: var(--paper);
    background: var(--green-deep);
}

.chapter-information-panel__number {
    color: var(--accent);
    font-size: 25px;
    font-weight: 800;
    line-height: 1;
}

.chapter-information-panel__label {
    display: block;
    color: var(--green);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.chapter-information-panel--special .chapter-information-panel__label {
    color: var(--accent);
}

.chapter-information-panel h3 {
    margin: 27px 0 13px;
    font-size: clamp(20px, 2vw, 27px);
    line-height: 1.08;
}

.chapter-information-panel p {
    margin: 0;
    color: rgba(11, 15, 13, 0.66);
    font-family: var(--font-serif);
    font-size: 14px;
    line-height: 1.65;
}

.chapter-information-panel--special p {
    color: rgba(255, 255, 255, 0.72);
}

/* LEADERSHIP */

.chapter-leadership {
    padding: 96px 0 112px;
    background:
        linear-gradient(
            rgba(0, 96, 48, 0.025) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(0, 96, 48, 0.025) 1px,
            transparent 1px
        ),
        var(--soft);
    background-size: 34px 34px;
    border-bottom: 2px solid var(--ink);
}

/* ORGANOGRAM */

.org-tree {
    position: relative;
    max-width: 1180px;
    margin: 0 auto;
}

.org-tree-row {
    position: relative;
    display: flex;
    justify-content: center;
    gap: 34px;
    flex-wrap: wrap;
    padding-top: 78px;
}

.org-tree-row--first {
    padding-top: 0;
}

.org-tree-row:not(.org-tree-row--first)::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: 3px;
    height: 42px;
    background: var(--org-line);
    transform: translateX(-50%);
}

.org-tree-row:not(.org-tree-row--first)::after {
    content: "";
    position: absolute;
    top: 42px;
    left: 12%;
    right: 12%;
    height: 3px;
    background: var(--org-line);
}

.org-tree-row--single::after {
    display: none;
}

.org-node {
    position: relative;
    z-index: 2;
    width: min(260px, 100%);
}

.org-tree-row:not(.org-tree-row--first) .org-node::before {
    content: "";
    position: absolute;
    top: -36px;
    left: 50%;
    width: 3px;
    height: 36px;
    background: var(--org-line);
    transform: translateX(-50%);
}

.org-tree-row--single .org-node::before {
    top: -36px;
    height: 36px;
}

/* CARDS */

.org-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--paper);
    border: 2px solid var(--ink);
    box-shadow: 9px 9px 0 var(--org-line-soft);
    transition:
        transform 0.22s ease,
        box-shadow 0.22s ease;
}

.org-card:hover {
    transform: translateY(-5px);
    box-shadow: 13px 13px 0 rgba(0, 96, 48, 0.2);
}

.org-tree-row--top .org-card {
    border-color: var(--green-deep);
    box-shadow: 11px 11px 0 var(--accent);
}

.org-card__portrait {
    position: relative;
    flex: 0 0 auto;
    aspect-ratio: 4 / 4.75;
    overflow: hidden;
    background: var(--green-deep);
    border-bottom: 2px solid var(--ink);
}

.org-card__portrait img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.org-card__content {
    position: relative;
    flex: 0 0 auto;
    margin: 0;
    padding: 18px 18px 20px;
    background: var(--paper);
    text-align: center;
}

.org-card__role {
    display: block;
    margin: 0 0 8px;
    color: var(--green);
    font-size: 9px;
    font-weight: 800;
    line-height: 1.35;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.org-card h3 {
    margin: 0;
    font-size: 20px;
    line-height: 1.2;
}

.org-card__title-only {
    margin: 0;
    color: var(--ink);
    font-size: 20px;
    line-height: 1.2;
}


/* EMPTY PUBLIC STATE */

.chapter-leadership-public-empty {
    padding: 56px 28px;
    text-align: center;
    background: var(--paper);
    border: 1px solid var(--grey);
}

.chapter-leadership-public-empty h3 {
    margin: 0;
    font-size: 26px;
    text-transform: uppercase;
}

.chapter-leadership-public-empty p {
    max-width: 520px;
    margin: 12px auto 0;
    color: var(--muted);
    font-family: var(--font-serif);
    font-size: 16px;
}

/* CONTACT */

.chapter-profile-contact {
    padding: 82px 0;
    color: var(--paper);
    background:
        radial-gradient(
            circle at 88% 20%,
            rgba(215, 181, 109, 0.14),
            transparent 27%
        ),
        var(--green-deep);
    border-bottom: 2px solid var(--ink);
}

.chapter-profile-contact__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(330px, 0.62fr);
    gap: 70px;
    align-items: center;
}

.chapter-profile-contact h2 {
    max-width: 750px;
    margin: 14px 0 20px;
    font-size: clamp(39px, 5.5vw, 70px);
    line-height: 0.92;
    letter-spacing: -0.05em;
    text-transform: uppercase;
}

.chapter-profile-contact__grid > div > p {
    max-width: 690px;
    margin: 0;
    color: rgba(255, 255, 255, 0.76);
    font-family: var(--font-serif);
    font-size: 17px;
    line-height: 1.7;
}

.chapter-profile-contact__card {
    margin: 0;
    padding: 27px;
    color: var(--ink);
    background: var(--paper);
    border: 2px solid var(--ink);
    box-shadow: 11px 11px 0 var(--accent);
    font-style: normal;
}

.chapter-profile-contact__card > div {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 14px 0;
    border-bottom: 1px solid var(--grey);
}

.chapter-profile-contact__card > div:first-child {
    padding-top: 0;
}

.chapter-profile-contact__card span {
    color: var(--green);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.chapter-profile-contact__card a,
.chapter-profile-contact__card strong {
    overflow-wrap: anywhere;
    font-size: 14px;
    font-weight: 700;
}

.chapter-profile-contact__card .btn {
    width: 100%;
    margin-top: 22px;
}

/* RELATED */

.chapter-profile-related {
    padding: 80px 0;
    background: var(--paper);
}

.chapter-profile-related__heading {
    margin-bottom: 34px;
}

.chapter-profile-related__heading h2 {
    margin: 13px 0 0;
    font-size: clamp(38px, 5vw, 63px);
    line-height: 0.94;
    text-transform: uppercase;
}

.chapter-profile-related__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 2px solid var(--ink);
    border-left: 2px solid var(--ink);
}

.chapter-profile-related__card {
    position: relative;
    display: flex;
    min-height: 175px;
    flex-direction: column;
    padding: 23px;
    border-right: 2px solid var(--ink);
    border-bottom: 2px solid var(--ink);
}

.chapter-profile-related__card:hover {
    color: var(--paper);
    background: var(--green);
}

.chapter-profile-related__card > span {
    color: var(--green);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.chapter-profile-related__card:hover > span {
    color: var(--accent);
}

.chapter-profile-related__card strong {
    margin-top: 22px;
    padding-right: 35px;
    font-size: 18px;
    line-height: 1.15;
}

.chapter-profile-related__card small {
    margin-top: 7px;
    color: var(--muted);
    font-family: var(--font-serif);
    font-size: 13px;
}

.chapter-profile-related__card:hover small {
    color: rgba(255, 255, 255, 0.74);
}

.chapter-profile-related__card b {
    position: absolute;
    right: 20px;
    bottom: 18px;
    color: var(--accent);
    font-size: 21px;
}

/* RESPONSIVE */

@media (max-width: 1100px) {
    .chapter-profile-hero__grid,
    .chapter-profile-contact__grid {
        grid-template-columns: 1fr;
    }

    .chapter-profile-identity {
        max-width: 650px;
    }

    .chapter-profile-information__grid {
        grid-template-columns: 1fr;
    }

    .chapter-profile-related__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .chapter-profile-section-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 20px;
    }

    .org-tree-row {
        flex-direction: column;
        align-items: center;
        gap: 38px;
        padding-top: 58px;
    }

    .org-tree-row:not(.org-tree-row--first)::after {
        display: none;
    }

    .org-node {
        width: min(310px, 100%);
    }

    .org-tree-row:not(.org-tree-row--first) .org-node::before {
        display: none;
    }
}

@media (max-width: 620px) {
    .chapter-profile-hero__grid {
        gap: 46px;
        min-height: auto;
        padding-top: 55px;
        padding-bottom: 58px;
    }

    .chapter-profile-hero h1 {
        font-size: clamp(46px, 15vw, 72px);
    }

    .chapter-profile-information,
    .chapter-leadership,
    .chapter-profile-contact,
    .chapter-profile-related {
        padding-top: 62px;
        padding-bottom: 62px;
    }

    .chapter-profile-related__grid {
        grid-template-columns: 1fr;
    }
}
