/**
 * cg/team-member-card — frontend + editor styles.
 *
 * Matches Figma "Leadership Card" (node 4169:7631): a portrait headshot panel
 * over the theme-400 placeholder colour, then the name (serif, 24px) and title
 * (mono, 16px) stacked beneath with a 24px gap.
 *
 * Colours follow the page colour theme — the name/title inherit the surrounding
 * text colour (theme-100 on the dark team sections the design uses) and the
 * image panel falls back to theme-400 while the headshot loads / if missing.
 */

.cg-team-member-card {
    display: flex;
    flex-direction: column;
    gap: 1.5rem; /* 24px — Figma vertical gap */
}

/* When the card links to the member's single page, strip link chrome and let
   the name/title keep the themed colour; the whole card is the click target. */
a.cg-team-member-card {
    text-decoration: none;
    color: inherit;
}

a.cg-team-member-card:hover .cg-team-member-card__name {
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

a.cg-team-member-card:hover .cg-team-member-card__image {
    transform: scale(1.03);
}

a.cg-team-member-card:focus-visible {
    outline: 2px solid var(--color-theme-accent);
    outline-offset: 4px;
}

.cg-team-member-card__media {
    position: relative;
    width: 100%;
    aspect-ratio: 445.333 / 545; /* Figma portrait ratio */
    overflow: hidden;
    background-color: var(--color-theme-400);
}

.cg-team-member-card__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center; /* keep heads in frame across varied crops */
    transition: transform 0.4s ease;
}

.cg-team-member-card__name {
    margin: 0;
    font-family: var(--wp--preset--font-family--serif, Georgia, serif);
    font-size: 1.5rem; /* 24px */
    font-weight: 400;  /* Martina Regular */
    line-height: 1.5;
    letter-spacing: 0;
    color: inherit;
}

.cg-team-member-card__title {
    margin: 0;
    font-family: var(--wp--preset--font-family--sans, sans-serif);
    font-size: 1rem; /* 16px */
    font-weight: 400;
    line-height: 1.35;
    letter-spacing: 0;
    color: inherit;
}

/* Editor-only placeholder shown until a member is chosen. */
.cg-team-member-card--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 445.333 / 545;
    padding: 1.5rem;
    text-align: center;
    border: 1px dashed currentColor;
    opacity: 0.6;
    font-style: italic;
    background-color: transparent;
}
