/* ==========================================================================
   Our Team page redesign — v2/specs/Our Team Page Redesign — Spec.md
   Markup: v2/team.php (content: v2/team-data.php). Fonts: Oswald + Inter.

   Everything sits inside <main class="tm">. themes.css forces colours on
   h1–h6 / p / li / span / label / a with !important, so colour rules here use
   the `html[data-theme] .tm` prefix + !important to win.
   ========================================================================== */
.tm {
    --tm-navy-0: #07111F;
    --tm-navy-a: #0C2440;
    --tm-navy-b: #0A1C33;
    --tm-ink: #0B1A2C;
    --tm-cyan: #1FB6E9;
    --tm-cyan-dk: #0B79A8;
    --tm-body: #3B4B5E;
    --tm-muted: #55667A;
    --tm-light: #F3F6FA;
    --tm-border: #E1E8F0;
    --tm-pill-border: #CFD9E4;
    --tm-on-dark: #C9D6E4;
    --tm-grad: linear-gradient(90deg, #2C62E0 0%, #5A3FD8 100%);

    display: block;
    font-family: 'Inter', system-ui, sans-serif;
    color: var(--tm-ink);
    text-align: left;
}
.tm *, .tm *::before, .tm *::after { box-sizing: border-box; }
.tm img { max-width: 100%; }
.tm section { scroll-margin-top: 90px; }

.tm-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 104px 32px;
}

/* ---- Shared bits --------------------------------------------------------- */
html[data-theme] .tm .tm-eyebrow {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    font: 700 11px/1 'Inter', sans-serif;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--tm-cyan-dk) !important;
}
.tm-eyebrow::before {
    content: "";
    width: 28px;
    height: 2px;
    background: currentColor;
    flex: none;
}
html[data-theme] .tm .tm-dark .tm-eyebrow { color: var(--tm-cyan) !important; }

.tm-display {
    margin: 0;
    font-family: 'Oswald', Impact, sans-serif;
    font-weight: 700;
    line-height: 1.04;
    text-transform: uppercase;
}
html[data-theme] .tm .tm-dark .tm-display { color: #fff !important; }
html[data-theme] .tm .tm-display .tm-accent { color: var(--tm-cyan) !important; }
html[data-theme] .tm .tm-light-bg .tm-display,
html[data-theme] .tm .tm-light-bg .tm-display span { color: var(--tm-ink) !important; }
html[data-theme] .tm .tm-light-bg .tm-display .tm-accent { color: var(--tm-cyan-dk) !important; }

.tm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 26px;
    border-radius: 4px;
    font: 700 12px/1 'Inter', sans-serif;
    letter-spacing: .12em;
    text-transform: uppercase;
    text-decoration: none !important;
    cursor: pointer;
    transition: filter .2s, border-color .2s, background-color .2s;
}
html[data-theme] .tm .tm-btn-primary {
    border: 0;
    background: var(--tm-grad);
    color: #fff !important;
}
.tm-btn-primary:hover { filter: brightness(1.12); }
html[data-theme] .tm .tm-btn-outline {
    border: 1.5px solid var(--tm-cyan);
    background: transparent;
    color: #fff !important;
}
.tm-btn-outline:hover { background: rgba(31, 182, 233, .12); }
.tm-btn:focus-visible,
.tm-pill:focus-visible,
.tm-link-btn:focus-visible,
.tm-play:focus-visible,
.tm-modal-close:focus-visible {
    outline: 3px solid var(--tm-cyan);
    outline-offset: 3px;
}

/* ---- Hero ------------------------------------------------------------------ */
.tm-hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(120% 90% at 85% 10%, #17456B 0%, rgba(23, 69, 107, 0) 55%),
        linear-gradient(180deg, var(--tm-navy-a) 0%, var(--tm-navy-b) 100%);
}
.tm-hero .tm-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    align-items: center;
    gap: 56px;
    padding-top: 104px;
    padding-bottom: 112px;
}
.tm-hero .tm-display {
    margin-top: 22px;
    font-size: clamp(44px, 6.4vw, 76px);
}
html[data-theme] .tm .tm-hero-intro {
    max-width: 520px;
    margin: 28px 0 0;
    font-size: 17px;
    line-height: 1.7;
    color: var(--tm-on-dark) !important;
}
.tm-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 36px;
}
.tm-video-card {
    justify-self: end;
    width: 100%;
    max-width: 500px;
    padding: 14px;
    background: #FBF7F0;
    border-radius: 6px;
    box-shadow: 0 30px 60px -25px rgba(0, 0, 0, .6);
}
.tm-video {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 4px;
    background: radial-gradient(80% 80% at 70% 30%, #1D3A5E, #0A1626);
    display: flex;
    align-items: center;
    justify-content: center;
}
.tm-video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
.tm-video-label {
    position: absolute;
    left: 20px;
    top: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}
html[data-theme] .tm .tm-video-tag {
    align-self: flex-start;
    padding: 5px 10px;
    background: var(--tm-cyan);
    font: 700 10px/1 'Inter', sans-serif;
    letter-spacing: .14em;
    color: var(--tm-navy-0) !important;
}
html[data-theme] .tm .tm-video-brand {
    font: 600 34px/1 'Oswald', sans-serif;
    color: #fff !important;
}
.tm-play {
    position: relative;
    width: 76px;
    height: 76px;
    border: 0;
    border-radius: 999px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 0 0 10px rgba(255, 255, 255, .15);
    transition: transform .2s;
}
.tm-play:hover { transform: scale(1.06); }
.tm-video-caption {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px 4px 2px;
}
html[data-theme] .tm .tm-video-caption span:first-child {
    font: 600 13px 'Inter', sans-serif;
    color: var(--tm-ink) !important;
}
html[data-theme] .tm .tm-video-caption span:last-child {
    font: 700 11px 'Inter', sans-serif;
    letter-spacing: .1em;
    color: var(--tm-cyan-dk) !important;
}

/* ---- Leadership ------------------------------------------------------------ */
.tm-lead { background: #fff; }
.tm-lead .tm-wrap {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr); /* photo the size of a team card */
    align-items: start; /* photo lines up with the top of the text */
    gap: 64px;
}
.tm-lead-photo { position: relative; }
.tm-lead-photo::before {
    content: "";
    position: absolute;
    inset: 14px -14px -14px 14px;
    border: 2px solid var(--tm-cyan);
    border-radius: 14px;
}
.tm-lead-photo .tm-photo {
    position: relative;
    border-radius: 14px;
    aspect-ratio: 1 / 1;
    background: linear-gradient(180deg, #F1F5F9, #DFE7EF); /* Irene keeps the original light gradient */
}
.tm-lead .tm-display { margin-top: 18px; font-size: clamp(40px, 5vw, 56px); }
html[data-theme] .tm .tm-lead-role {
    margin: 8px 0 0;
    font: 600 18px 'Inter', sans-serif;
    color: var(--tm-ink) !important;
}
html[data-theme] .tm .tm-lead-text p {
    max-width: 600px;
    margin: 14px 0 0;
    font-size: 15px;
    line-height: 1.75;
    color: var(--tm-body) !important;
}
.tm-lead-text { margin-top: 26px; }
.tm-lead-text p:first-child { margin-top: 0; }
html[data-theme] .tm .tm-link-btn {
    margin-top: 18px;
    min-height: 44px;
    padding: 0;
    border: 0;
    background: none;
    font: 700 12px 'Inter', sans-serif;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--tm-cyan-dk) !important;
    cursor: pointer;
}
.tm-link-btn:hover { text-decoration: underline; }
.tm-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 40px;
    border-top: 1px solid #E2E8EF;
}
.tm-fact { padding: 22px 20px 0; }
.tm-fact:first-child { padding-left: 0; }
.tm-fact + .tm-fact { border-left: 1px solid #E2E8EF; }
html[data-theme] .tm .tm-fact-num {
    display: block;
    font: 600 40px/1.1 'Oswald', sans-serif;
    color: var(--tm-ink) !important;
}
html[data-theme] .tm .tm-fact-label {
    display: block;
    font-size: 13px;
    color: var(--tm-muted) !important;
}

/* ---- Team grid --------------------------------------------------------------- */
.tm-team { background: var(--tm-light); }
.tm-team .tm-wrap { padding-top: 96px; padding-bottom: 112px; }
.tm-team-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 28px;
}
html[data-theme] .tm .tm-team-title {
    margin: 16px 0 0;
    font: 700 clamp(34px, 4vw, 44px)/1.1 'Inter', sans-serif;
    color: var(--tm-ink) !important;
}
html[data-theme] .tm .tm-team-title span { color: var(--tm-cyan-dk) !important; }
.tm-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    max-width: 640px;
}
html[data-theme] .tm .tm-pill {
    min-height: 40px;
    padding: 0 16px;
    border: 1.5px solid var(--tm-pill-border);
    border-radius: 999px;
    background: #fff;
    font: 600 13px 'Inter', sans-serif;
    color: var(--tm-ink) !important;
    cursor: pointer;
    transition: background-color .2s, color .2s, border-color .2s;
}
.tm-pill:hover { border-color: var(--tm-cyan); }
html[data-theme] .tm .tm-pill[aria-pressed="true"] {
    border-color: var(--tm-ink);
    background: var(--tm-ink);
    color: #fff !important;
}

.tm-depts { margin-top: 56px; }
.tm-dept {
    display: grid;
    grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
    gap: 40px;
    padding: 48px 0;
    border-top: 1px solid #DBE3EC;
}
.tm-dept.is-hidden { display: none; }
.tm-dept.is-showing { animation: tm-fade .35s ease; }
@keyframes tm-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
html[data-theme] .tm .tm-dept-num {
    font: 700 13px 'Inter', sans-serif;
    letter-spacing: .1em;
    color: var(--tm-cyan-dk) !important;
}
html[data-theme] .tm .tm-dept-name {
    margin: 10px 0 0;
    font: 600 28px/1.15 'Oswald', sans-serif;
    text-transform: uppercase;
    color: var(--tm-ink) !important;
}
html[data-theme] .tm .tm-dept-blurb {
    margin: 12px 0 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--tm-muted) !important;
}
html[data-theme] .tm .tm-dept-count {
    margin: 16px 0 0;
    font: 600 12px 'Inter', sans-serif;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--tm-muted) !important;
}
.tm-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(max(196px, calc((100% - 48px) / 3)), 1fr));
    gap: 24px;
    align-content: start;
}
/* Business Development: all 4 on one line (drops to 3, 2, 1 as space runs out). */
.tm-dept[data-dept="bd"] .tm-cards {
    grid-template-columns: repeat(auto-fill, minmax(max(160px, calc((100% - 60px) / 4)), 1fr));
    gap: 20px;
}

/* ---- Card ---------------------------------------------------------------- */
.tm-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--tm-border);
    border-radius: 14px;
    background: #fff;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: transform .3s ease, box-shadow .3s ease;
}
.tm-card:hover,
.tm-card:focus-visible {
    transform: translateY(-6px);
    box-shadow: 0 22px 40px -18px rgba(7, 26, 46, .45);
}
.tm-card:focus-visible {
    outline: 3px solid var(--tm-cyan);
    outline-offset: 3px;
}
/* Photo square (also used for Irene's photo). */
.tm-photo {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #fff;
}
.tm-photo img {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    max-width: none;
    object-fit: cover;
    object-position: center top;
}
/* Placeholder until a headshot is uploaded: the person's initials. */
.tm-initials {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, #0C2440, #0A1C33);
    font: 600 56px/1 'Oswald', sans-serif;
    letter-spacing: .04em;
}
html[data-theme] .tm .tm-initials { color: var(--tm-cyan) !important; }
.tm-initials[hidden] { display: none; }
.tm-modal-photo { position: relative; }
.tm-modal-photo img[hidden] { display: none; }
.tm-photo .tm-gif,
.tm-photo .tm-quote,
.tm-photo .tm-chip {
    opacity: 0;
    transition: opacity .3s ease, transform .3s ease;
}
.tm-photo .tm-quote { transform: translateY(8px); }
.tm-hover:hover .tm-gif.is-loaded,
.tm-hover:focus-visible .tm-gif.is-loaded,
.tm-hover:hover .tm-quote,
.tm-hover:focus-visible .tm-quote,
.tm-hover:hover .tm-chip,
.tm-hover:focus-visible .tm-chip {
    opacity: 1;
    transform: none;
}
html[data-theme] .tm .tm-quote {
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 8px;
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(7, 17, 31, .8);
    font-size: 12.5px;
    font-style: italic;
    line-height: 1.45;
    text-align: center;
    color: #fff !important;
}
html[data-theme] .tm .tm-chip {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--tm-cyan);
    font: 700 10px/1.2 'Inter', sans-serif;
    letter-spacing: .1em;
    color: var(--tm-navy-0) !important;
}
.tm-card-text {
    display: block;
    flex-grow: 1;
    width: 100%;
    padding: 18px 18px 20px;
    border-top: 3px solid var(--tm-cyan);
}
html[data-theme] .tm .tm-card-name {
    display: block;
    font: 700 16px/1.3 'Inter', sans-serif;
    color: var(--tm-ink) !important;
}
html[data-theme] .tm .tm-card-role {
    display: block;
    margin-top: 5px;
    font-size: 13px;
    line-height: 1.45;
    color: var(--tm-muted) !important;
}
.tm-bio-src { display: none; }

/* ---- Careers ------------------------------------------------------------------ */
.tm-careers { background: linear-gradient(180deg, var(--tm-navy-a) 0%, var(--tm-navy-b) 100%); }
.tm-careers .tm-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
    gap: 64px;
}
.tm-careers .tm-display { margin-top: 18px; font-size: clamp(40px, 4.6vw, 52px); }
html[data-theme] .tm .tm-careers-text p {
    margin: 16px 0 0;
    font-size: 16px;
    line-height: 1.75;
    color: var(--tm-on-dark) !important;
}
.tm-careers-text { margin-top: 26px; }
.tm-careers-text p:first-child { margin-top: 0; }
.tm-careers .tm-btn { margin-top: 34px; }
.tm-values {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
.tm-value {
    padding: 28px 24px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 6px;
    background: rgba(255, 255, 255, .03);
}
.tm-value-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
html[data-theme] .tm .tm-value-top span { font-size: 11px; color: #8EA3BA !important; }
html[data-theme] .tm .tm-value h3 {
    margin: 22px 0 0;
    font: 700 18px 'Inter', sans-serif;
    color: #fff !important;
}
html[data-theme] .tm .tm-value p {
    margin: 6px 0 0;
    font-size: 13px;
    line-height: 1.55;
    color: #A9BBCD !important;
}

/* ---- Bio modal ------------------------------------------------------------------ */
.tm-modal {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(7, 17, 31, .72);
}
.tm-modal[hidden] { display: none; }
.tm-modal-box {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
    width: 100%;
    max-width: 980px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .6);
    text-align: left;
}
.tm-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: #F0F4F8;
    color: var(--tm-ink);
    cursor: pointer;
}
.tm-modal-side { padding: 32px 0 32px 32px; }
.tm-modal-photo {
    aspect-ratio: 4 / 4.6;
    overflow: hidden;
    border-radius: 14px;
    background: linear-gradient(180deg, #EEF3F8, #DDE6EF);
}
.tm-modal-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}
html[data-theme] .tm .tm-modal-quote {
    margin: 18px 0 0;
    padding: 14px 16px;
    border-radius: 10px;
    background: var(--tm-navy-a);
    font-size: 14px;
    font-style: italic;
    line-height: 1.5;
    color: #fff !important;
}
.tm-modal-quote[hidden] { display: none; }
.tm-modal-main { padding: 44px 40px 40px; }
html[data-theme] .tm .tm-modal-dept {
    margin: 0;
    font: 700 11px 'Inter', sans-serif;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--tm-cyan-dk) !important;
}
html[data-theme] .tm .tm-modal-name {
    margin: 12px 0 0;
    padding-right: 40px;
    font: 700 46px/1.05 'Oswald', sans-serif;
    text-transform: uppercase;
    color: var(--tm-ink) !important;
}
html[data-theme] .tm .tm-modal-name span { color: var(--tm-cyan-dk) !important; }
html[data-theme] .tm .tm-modal-role {
    margin: 6px 0 0;
    font: 600 17px 'Inter', sans-serif;
    color: var(--tm-ink) !important;
}
.tm-modal-bio { margin-top: 22px; }
html[data-theme] .tm .tm-modal-bio p {
    margin: 14px 0 0;
    font-size: 15px;
    line-height: 1.75;
    color: var(--tm-body) !important;
}
.tm-modal-bio p:first-child { margin-top: 0; }
body.tm-modal-open { overflow: hidden; }

/* Header: "About Us" is the current section on this page. */
html[data-theme] #home .nav-link[href="about"] { color: var(--tm-cyan, #1FB6E9) !important; }

/* ---- Responsive ------------------------------------------------------------------ */
@media (max-width: 1099px) {
    .tm-hero .tm-wrap,
    .tm-lead .tm-wrap,
    .tm-careers .tm-wrap { grid-template-columns: minmax(0, 1fr); }
    .tm-video-card { justify-self: start; }
    .tm-lead-photo { max-width: 250px; }
    .tm-dept { grid-template-columns: minmax(0, 1fr); gap: 28px; }
    .tm-dept-info { max-width: 560px; }
}
@media (max-width: 767px) {
    .tm-wrap { padding: 72px 20px; }
    .tm-hero .tm-wrap { padding-top: 72px; padding-bottom: 80px; }
    .tm-team .tm-wrap { padding-top: 72px; padding-bottom: 80px; }
    .tm-filter { justify-content: flex-start; }
    .tm-lead-photo { margin-right: 24px; }
    .tm-modal { padding: 12px; }
    .tm-modal-box { grid-template-columns: minmax(0, 1fr); max-height: calc(100vh - 24px); }
    .tm-modal-side { padding: 24px 24px 0; }
    .tm-modal-photo { max-width: 320px; }
    .tm-modal-main { padding: 24px 24px 32px; }
    html[data-theme] .tm .tm-modal-name { font-size: 36px; }
}
@media (max-width: 560px) {
    .tm-values { grid-template-columns: minmax(0, 1fr); }
    .tm-facts { grid-template-columns: minmax(0, 1fr); }
    .tm-fact { padding: 18px 0 0 !important; }
    .tm-fact + .tm-fact { border-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .tm-card,
    .tm-card:hover,
    .tm-card:focus-visible { transform: none; transition: none; }
    .tm-photo .tm-gif { display: none; }
    .tm-dept.is-showing { animation: none; }
    .tm-photo .tm-quote, .tm-photo .tm-chip { transition: none; }
}
