/*
 * Leadership listing and profile.
 *
 * The biographies are ~1,200 characters each and were previously only reachable
 * inside a modal. Cards now preview them and link to a real page.
 */

.af-leader-page {
    background: #f7f9fd;
}

.af-leader-hero {
    background: linear-gradient(120deg, #eef4fc 0%, #fff 62%, #dfe7f7 100%);
    padding: 3rem 0 2.25rem;
}

.af-leader-hero-title {
    color: var(--v2-ink, #121b31);
    font-size: clamp(2.1rem, 4.4vw, 3.6rem);
    font-weight: 850;
    letter-spacing: -.05em;
    line-height: 1.05;
    margin: .35rem 0 0;
    text-transform: capitalize;
}

.af-leader-summary {
    color: #3d4759;
    font-size: 1.02rem;
    line-height: 1.7;
    margin: 0;
    max-width: 58ch;
}

/* --------------------------------------------------------- section tabs ---*/

.af-leader-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
    justify-content: center;
    list-style: none;
    margin: 1.75rem 0 0;
    padding: 0;
}

.af-leader-tabs a {
    align-items: center;
    background: #fff;
    border: 1px solid var(--v2-line, #e0e6ef);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(20, 35, 65, .05);
    color: var(--v2-ink, #121b31);
    display: inline-flex;
    font-size: .92rem;
    font-weight: 700;
    gap: .5rem;
    letter-spacing: -.01em;
    padding: .7rem 1.35rem;
    text-decoration: none;
    transition: background var(--motion-fast, 220ms) ease,
                border-color var(--motion-fast, 220ms) ease,
                box-shadow var(--motion-fast, 220ms) ease,
                transform var(--motion-fast, 220ms) ease;
}

.af-leader-tabs a:hover {
    border-color: var(--aleafiaa-blue, #2a3484);
    box-shadow: 0 6px 18px rgba(42, 52, 132, .12);
    transform: translateY(-2px);
}

.af-leader-tabs a[aria-current="page"] {
    background: var(--aleafiaa-blue, #2a3484);
    border-color: var(--aleafiaa-blue, #2a3484);
    box-shadow: 0 6px 20px rgba(42, 52, 132, .22);
    color: #fff;
}

.af-leader-tabs a i {
    font-size: .82em;
    opacity: .7;
}

.af-leader-tabs a[aria-current="page"] i {
    opacity: 1;
}

.af-leader-section { padding: 2.75rem 0 4.5rem; }

.af-leader-empty {
    color: var(--v2-muted, #5c6675);
    font-size: 1.05rem;
    font-weight: 700;
    padding: 2rem 0;
    text-align: center;
}

/* ------------------------------------------------------------------ grid ---*/

.af-leader-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* ------------------------------------------------------------------ card ---*/

.af-leader-card {
    background: #fff;
    border: 1px solid var(--v2-line, #e0e6ef);
    border-radius: 22px;
    box-shadow: 0 10px 28px rgba(20, 35, 65, .07);
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    position: relative;
    transition: box-shadow var(--motion-shadow, 320ms) var(--ease-premium, ease),
                transform var(--motion-normal, 300ms) var(--ease-premium, ease);
}

.af-leader-card:hover {
    box-shadow: 0 18px 40px rgba(20, 35, 65, .16);
    transform: translateY(-4px);
}

.af-leader-card:focus-within {
    box-shadow: 0 0 0 3px rgba(42, 52, 132, .22), 0 16px 35px rgba(20, 35, 65, .12);
}

/* A generous 4:5 portrait: these are the only photographs of people on the
   site, and the previous square thumbnails cropped most faces awkwardly. */
.af-leader-card-portrait {
    align-items: center;
    aspect-ratio: 4 / 5;
    background: radial-gradient(circle at 50% 12%, #fff 0, #eef3fb 78%);
    border: 0;
    color: inherit;
    display: flex;
    justify-content: center;
    padding: 0;
    overflow: hidden;
    width: 100%;
}

.af-leader-card-portrait img {
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transition: transform var(--motion-slow, 480ms) var(--ease-premium, ease);
    width: 100%;
}

.af-leader-card:hover .af-leader-card-portrait img { transform: scale(1.035); }

.af-leader-card-initials {
    color: var(--aleafiaa-blue, #2a3484);
    font-size: 2.4rem;
    font-weight: 850;
    letter-spacing: -.03em;
    opacity: .32;
}

.af-leader-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 1.4rem;
}

.af-leader-card-name {
    font-size: 1.16rem;
    font-weight: 850;
    letter-spacing: -.025em;
    line-height: 1.25;
    margin: 0 0 .3rem;
}

/* The role is the thing people scan for, so it carries brand colour and weight
   rather than sitting as muted secondary text. */
.af-leader-card-role {
    color: var(--aleafiaa-blue, #2a3484);
    font-size: .84rem;
    font-weight: 800;
    letter-spacing: .01em;
    margin: 0 0 .75rem;
}

/* Qualifications sit between the role and the biography: supporting credential
   detail, so quieter than the role but still above the body copy. */
.af-leader-card-qualifications {
    color: var(--v2-muted, #5c6675);
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .01em;
    margin: -.5rem 0 .7rem;
}

.af-leader-card-bio {
    color: var(--v2-muted, #5c6675);
    font-size: .86rem;
    line-height: 1.6;
    margin: 0 0 1rem;
}

.af-leader-card-cta {
    color: var(--aleafiaa-blue, #2a3484);
    font-size: .81rem;
    font-weight: 800;
    margin-top: auto;
}

.af-leader-card-cta i {
    margin-left: .3rem;
    transition: transform var(--motion-fast, 220ms) var(--ease-premium, ease);
}

.af-leader-card:hover .af-leader-card-cta i { transform: translateX(3px); }

/* ------------------------------------------------------------- statement ---*/

.af-leader-statement {
    background: #101a33;
    color: #eef3ff;
    padding: 4rem 0;
}

.af-leader-statement-inner { margin: 0 auto; max-width: 52rem; }

.af-leader-statement h2 {
    color: #fff;
    font-size: clamp(1.5rem, 3vw, 2.1rem);
    font-weight: 850;
    letter-spacing: -.03em;
    margin: 0 0 1.5rem;
}

.af-leader-statement blockquote {
    border-left: 3px solid var(--aleafiaa-green-brand, #26a37f);
    margin: 0;
    padding-left: 1.4rem;
}

/* Deliberately high contrast on the dark panel: #dfe7f7 on #101a33 clears AA
   for body text at this size. */
.af-leader-statement blockquote p {
    color: #dfe7f7;
    font-size: 1rem;
    line-height: 1.8;
    margin: 0 0 1.1rem;
}

.af-leader-statement blockquote p:last-child { margin-bottom: 0; }

.af-leader-statement-attribution {
    color: #fff;
    font-weight: 800;
    margin: 1.6rem 0 0;
    padding-left: 1.4rem;
}

.af-leader-statement-attribution span {
    color: #b9c6e4;
    font-weight: 600;
}

/* ----------------------------------------------------------- responsive ---*/

@media (max-width: 991.98px) {
    .af-leader-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 575.98px) {
    .af-leader-grid { grid-template-columns: 1fr; gap: 1.15rem; }
    .af-leader-section { padding: 2rem 0 3rem; }
    .af-leader-tabs { gap: .45rem; }
    .af-leader-tabs a { font-size: .84rem; padding: .55rem 1rem; }
    .af-leader-statement { padding: 2.75rem 0; }
}

@media (prefers-reduced-motion: reduce) {
    .af-leader-card,
    .af-leader-card-portrait img,
    .af-leader-card-cta i { transition: none !important; }
    .af-leader-card:hover,
    .af-leader-card:hover .af-leader-card-portrait img,
    .af-leader-card:hover .af-leader-card-cta i { transform: none !important; }
}

/* ------------------------------------------------------------- modal ---*/
.af-leader-card-name-btn {
    color: var(--v2-ink, #121b31);
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
}
.af-leader-card-name-btn:hover {
    color: var(--aleafiaa-blue, #2a3484);
}

.af-leader-modal .modal-content {
    background: #ffffff;
    border: 1px solid var(--v2-line, #e0e6ef);
    border-radius: 24px;
    box-shadow: 0 25px 60px rgba(15, 23, 42, 0.25);
    max-height: calc(100dvh - 2.5rem);
    overflow: hidden;
}

.af-leader-modal .modal-dialog {
    margin: 1.25rem auto;
    max-width: min(880px, calc(100% - 2rem));
}

.modal-backdrop.show {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background-color: rgba(15, 23, 42, 0.65) !important;
}

.af-leader-modal-header {
    background: #fff;
    border-bottom: 1px solid var(--v2-line, #e0e6ef);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.35rem 1.75rem 1rem;
    position: relative;
    z-index: 1;
}

.af-leader-modal-close {
    background: #eef2f7 !important;
    background-image: none !important;
    border: none;
    border-radius: 50%;
    height: 42px;
    opacity: 1;
    transition: background 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
    flex: 0 0 42px;
    padding: 0;
    width: 42px;
}

.af-leader-modal-close::before {
    color: #121b31;
    content: "×";
    display: block;
    font-size: 1.6rem;
    font-weight: 500;
    line-height: 1;
    transform: translateY(-1px);
}

.af-leader-modal-close:hover {
    opacity: 1;
    background: rgba(18, 27, 49, 0.12);
    transform: scale(1.05);
}
.af-leader-modal-close:focus-visible {
    opacity: 1;
    outline: 3px solid var(--aleafiaa-green, #67b246);
    outline-offset: 3px;
}

.af-leader-modal-body {
    max-height: calc(100dvh - 9rem);
    overscroll-behavior: contain;
    overflow-y: auto;
    padding: 1.75rem 2.25rem 2.75rem;
    -webkit-overflow-scrolling: touch;
}

.af-leader-modal-profile {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 2rem;
    align-items: start;
}

.af-leader-modal-portrait {
    aspect-ratio: 4 / 5;
    border-radius: 18px;
    overflow: hidden;
    background: radial-gradient(circle at 50% 12%, #fff 0, #eef3fb 78%);
    border: 1px solid var(--v2-line, #e0e6ef);
    box-shadow: 0 8px 24px rgba(20, 35, 65, 0.08);
}

.af-leader-modal-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.af-leader-modal-name {
    font-size: 1.65rem;
    font-weight: 850;
    color: var(--v2-ink, #121b31);
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin: 0 0 0.4rem;
}

.af-leader-modal-role {
    font-size: 1.02rem;
    font-weight: 800;
    color: var(--aleafiaa-blue, #2a3484);
    margin: 0 0 1rem;
}

.af-leader-modal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1.25rem;
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
}

.af-leader-modal-meta li {
    align-items: center;
    color: var(--v2-muted, #5c6675);
    display: inline-flex;
    font-size: .86rem;
    gap: .4rem;
}

.af-leader-modal-meta i {
    color: var(--aleafiaa-green, #4c9a2a);
}

.af-leader-modal-social {
    margin: 0 0 1.25rem;
}

.af-leader-modal-social a {
    align-items: center;
    color: var(--aleafiaa-blue, #2a3484);
    display: inline-flex;
    font-size: .88rem;
    font-weight: 700;
    gap: .4rem;
    text-decoration: none;
}

.af-leader-modal-social a:hover,
.af-leader-modal-social a:focus-visible {
    text-decoration: underline;
}

.af-leader-modal-bio {
    color: #333d4f;
    font-size: 0.98rem;
    line-height: 1.8;
    max-width: 62ch;
}

.af-leader-modal-bio p {
    margin-bottom: 1.1rem;
}

.af-leader-modal-bio p:last-child {
    margin-bottom: 0;
}

@media (max-width: 767.98px) {
    .af-leader-modal .modal-dialog {
        margin: .75rem auto;
        max-width: calc(100% - 1rem);
    }
    .af-leader-modal .modal-content {
        max-height: calc(100dvh - 1.5rem);
    }
    .af-leader-modal-header {
        padding: 1rem 1.1rem .85rem;
    }
    .af-leader-modal-profile {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    .af-leader-modal-portrait {
        justify-self: center;
        max-width: 180px;
        margin: 0 auto;
        width: min(180px, 100%);
    }
    .af-leader-modal-body {
        max-height: calc(100dvh - 8rem);
        padding: 1.25rem 1.1rem 1.75rem;
    }
}

/* Leadership directory and Managing Director message. */
.af-leader-directory {
    padding: clamp(2.5rem, 5vw, 5rem) 0;
    background: #f7f9fb;
}

.af-leader-directory-grid {
    display: grid;
    grid-auto-rows: 1fr;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}

.af-leader-directory-card {
    align-items: flex-start;
    display: flex;
    gap: 1.125rem;
    min-height: 174px;
    height: 100%;
    padding: 1.5rem;
    color: #15303e;
    text-decoration: none;
    background: #fff;
    border: 1px solid #dfe8eb;
    border-radius: 1rem;
    box-shadow: 0 14px 32px rgba(18, 58, 71, .08);
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.af-leader-directory-card:hover,
.af-leader-directory-card:focus-visible {
    color: #15303e;
    border-color: #11808d;
    box-shadow: 0 20px 42px rgba(18, 58, 71, .14);
    transform: translateY(-4px);
}

.af-leader-directory-card:focus-visible {
    outline: 3px solid #8bb9ff;
    outline-offset: 4px;
}

.af-leader-directory-icon {
    align-items: center;
    background: linear-gradient(135deg, #0d6673, #1c9ca8);
    border-radius: .85rem;
    color: #fff;
    display: grid;
    flex: 0 0 3.25rem;
    font-size: 1.3rem;
    height: 3.25rem;
    place-items: center;
    width: 3.25rem;
}

.af-leader-directory-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: .5rem;
}

.af-leader-directory-title {
    font-family: var(--v2-font-display, "DM Sans", sans-serif);
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.25;
}

.af-leader-directory-description {
    color: #49606b;
    font-size: .91rem;
    line-height: 1.5;
}

.af-leader-directory-link {
    color: #0d6673;
    font-size: .9rem;
    font-weight: 700;
    margin-top: auto;
}

.af-leader-directory-link i {
    margin-left: .35rem;
}

.af-leader-md {
    padding: clamp(3rem, 7vw, 6.5rem) 0;
    background: #fff;
}

.af-leader-md-grid {
    display: grid;
    grid-template-columns: minmax(250px, .78fr) minmax(0, 1.35fr);
    align-items: center;
    gap: clamp(2rem, 6vw, 6rem);
}

.af-leader-md-portrait {
    display: grid;
    place-items: center;
    width: 100%;
    max-width: 410px;
    margin: 0 auto;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: 1.25rem;
    box-shadow: 0 24px 54px rgba(18, 58, 71, .15);
}

.af-leader-md-portrait img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.af-leader-md-portrait-fallback {
    color: #0d6673;
    font-family: var(--v2-font-display, "DM Sans", sans-serif);
    font-size: 4rem;
    font-weight: 800;
}

.af-leader-md-copy h2 {
    margin: 0 0 1.5rem;
    color: #15303e;
    font-family: var(--v2-font-display, "DM Sans", sans-serif);
    font-size: clamp(1.85rem, 3vw, 3rem);
    font-weight: 750;
    line-height: 1.1;
}

.af-leader-md-copy blockquote {
    margin: 0;
}

.af-leader-md-copy blockquote p {
    margin: 0 0 1.1rem;
    color: #49606b;
    font-size: 1rem;
    line-height: 1.8;
}

.af-leader-md-attribution {
    margin: 1.75rem 0 0;
    color: #15303e;
    font-family: var(--v2-font-display, "DM Sans", sans-serif);
    font-size: 1.05rem;
    font-weight: 750;
    line-height: 1.55;
}

.af-leader-md-attribution span {
    color: #0d6673;
    font-family: var(--v2-font-body, "DM Sans", sans-serif);
    font-size: .9rem;
    font-weight: 700;
}

@media (max-width: 991.98px) {
    .af-leader-directory-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .af-leader-md-grid {
        grid-template-columns: minmax(220px, .72fr) minmax(0, 1.28fr);
        gap: 2rem;
    }
}

@media (max-width: 575.98px) {
    .af-leader-directory-grid,
    .af-leader-md-grid {
        grid-template-columns: 1fr;
    }

    .af-leader-directory-card {
        min-height: 142px;
        padding: 1.25rem;
    }

    .af-leader-directory-content {
        padding: 0;
    }

    .af-leader-md-portrait {
        max-width: min(100%, 340px);
    }

    .af-leader-md-copy h2 {
        margin-bottom: 1.25rem;
    }

    .af-leader-md-copy blockquote p {
        font-size: .975rem;
        line-height: 1.7;
    }
}
