/* ============================================================
   THE REGULARS: Brainy's family on the marketing site
   ============================================================
   Markup is generated by scripts/gen_marketing_cast.py (cameo cards on
   mode / venue pages, the /regulars/ roster, the home-page door).
   Every colour is a theme token, so all 36 themes (light ones included)
   read correctly. Rules are scoped under their container on purpose: the
   kit pages style bare <p>, and a scoped rule outranks them without
   !important. The characters animate themselves (CSS inside each SVG);
   reduced motion swaps in the still through <picture>.
   ============================================================ */

/* ---------- cameo: one regular, one line, before a page's closing CTA ---------- */
.bf-cast-cameo {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    max-width: 44rem;
    margin: 1rem auto 0;
    padding: 0 1rem;
}
.bf-cast-cameo .bf-cast-cameo-art { flex: none; }
.bf-cast-cameo .bf-cast-cameo-art img {
    display: block;
    width: auto;
    height: clamp(104px, 16vw, 150px);
}
.bf-cast-cameo .bf-cast-cameo-words {
    display: grid;
    gap: 0.6rem;
    min-width: 0;
    padding-bottom: 0.75rem;
}
.bf-cast-cameo .bf-cast-bubble {
    position: relative;
    margin: 0;
    padding: 0.8rem 1.15rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1.5px solid rgba(var(--glass-overlay-color), 0.16);
    border-radius: 20px 20px 20px 4px;
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.35;
    width: fit-content;
    max-width: 100%;
}
/* the tail points back at whoever is talking */
.bf-cast-cameo .bf-cast-bubble::before {
    content: "";
    position: absolute;
    left: -9px;
    bottom: 10px;
    width: 14px;
    height: 14px;
    background: var(--bg-secondary);
    border-left: 1.5px solid rgba(var(--glass-overlay-color), 0.16);
    border-bottom: 1.5px solid rgba(var(--glass-overlay-color), 0.16);
    transform: rotate(45deg);
}
.bf-cast-cameo .bf-cast-who {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-secondary);
}
.bf-cast-cameo .bf-cast-who strong { color: var(--text-primary); font-weight: 600; }
.bf-cast-cameo .bf-cast-who span { margin-right: 0.35rem; }
.bf-cast-cameo .bf-cast-who span::before { content: "\00b7\00a0"; }
.bf-cast-cameo .bf-cast-who a,
.bf-cast-member .bf-cast-find a {
    color: var(--color-accent-light);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    white-space: nowrap;
}
.bf-cast-cameo .bf-cast-who a span { margin: 0; }
.bf-cast-cameo .bf-cast-who a span::before { content: none; }

@media (max-width: 480px) {
    .bf-cast-cameo { gap: 0.6rem; }
    .bf-cast-cameo .bf-cast-bubble { font-size: 1.02rem; }
}

/* ---------- /regulars/: the lineup and the roster ---------- */
.bf-cast-lineup {
    margin: 0 0 2.5rem;
    padding: clamp(1rem, 3vw, 2.25rem);
    background: var(--bg-secondary);
    border-radius: 24px;
    overflow: hidden;
}
.bf-cast-lineup img { display: block; width: 100%; height: auto; }

.bf-cast-roster { display: grid; gap: 1.25rem; }
.bf-cast-member {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: clamp(1rem, 3vw, 2.25rem);
    align-items: center;
    padding: clamp(1.1rem, 3vw, 2rem);
    background: var(--bg-secondary);
    border: 1.5px solid transparent;
    border-radius: 22px;
    scroll-margin-top: 7rem;
}
.bf-cast-member:nth-child(even) { grid-template-columns: minmax(0, 1fr) 240px; }
.bf-cast-member:nth-child(even) .bf-cast-member-art { order: 2; }
.bf-cast-member:target { border-color: var(--color-accent-light); }
.bf-cast-member .bf-cast-member-art img { display: block; width: 100%; height: 230px; object-fit: contain; }
.bf-cast-member .bf-cast-member-words { display: grid; gap: 0.8rem; min-width: 0; }
.bf-cast-member .bf-cast-member-words h2 {
    margin: 0;
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    line-height: 1.1;
    color: var(--text-primary);
}
.bf-cast-member .bf-cast-member-words > p {
    margin: 0;
    max-width: 62ch;
    color: var(--text-secondary);
    line-height: 1.65;
}
.bf-cast-member .bf-cast-role {
    font-family: 'Courier Prime', 'Courier New', monospace;
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--color-accent-light);
}
.bf-cast-member .bf-cast-tag {
    display: inline-block;
    margin-left: 0.5rem;
    padding: 0.1rem 0.55rem;
    border-radius: 999px;
    background: rgba(var(--accent-rgb), 0.16);
    color: var(--text-primary);
    letter-spacing: 0.08em;
    font-size: 0.68rem;
}
.bf-cast-member .bf-cast-says {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.bf-cast-member .bf-cast-says li {
    background: var(--bg-primary);
    color: var(--text-primary);
    border-radius: 16px 16px 16px 4px;
    padding: 0.4rem 0.85rem;
    font-size: 0.92rem;
    font-style: italic;
}
.bf-cast-member .bf-cast-find { font-size: 0.92rem; color: var(--text-muted); }
.bf-cast-member .bf-cast-find a { margin-right: 0.65rem; }

@media (max-width: 760px) {
    .bf-cast-member,
    .bf-cast-member:nth-child(even) { grid-template-columns: minmax(0, 1fr); }
    .bf-cast-member:nth-child(even) .bf-cast-member-art { order: 0; }
    .bf-cast-member .bf-cast-member-art img { height: 190px; }
}

/* ---------- home page: the regulars door ---------- */
.bf-cast-door .bf-cast-door-art {
    margin: 1.5rem auto;
    max-width: 1000px;
}
.bf-cast-door .bf-cast-door-art img { display: block; width: 100%; height: auto; }
