/* Bolide product family constellation — scoped so text2.css does not leak in */
.bolide-family {
    --bf-sky-0: #0c1220;
    --bf-star: #f4efe6;
    --bf-muted: #9aa8bc;
    --bf-gold: #fecc00;
    --bf-ember: #e31e24;
    --bf-panel: rgba(18, 28, 46, 0.88);
    --bf-ink: #eef2f8;

    margin: 0.75rem 0 1.25rem;
    color: var(--bf-ink);
    font-family: "IBM Plex Sans", sans-serif;
}

.bolide-family *,
.bolide-family *::before,
.bolide-family *::after {
    box-sizing: border-box;
}

.bolide-family p,
.bolide-family div,
.bolide-family span,
.bolide-family li,
.bolide-family h2,
.bolide-family button {
    color: inherit;
    font-size: inherit;
    line-height: inherit;
    text-align: inherit;
}

.bolide-family .bf-sky {
    position: relative;
    width: 100%;
    aspect-ratio: 11 / 8;
    min-height: 480px;
    border-radius: 1.25rem;
    overflow: hidden;
    border: 1px solid rgba(154, 168, 188, 0.18);
    background:
        radial-gradient(ellipse 90% 60% at 50% 42%, #243a5c 0%, transparent 55%),
        radial-gradient(ellipse 50% 40% at 18% 18%, rgba(227, 30, 36, 0.12), transparent 50%),
        radial-gradient(ellipse 40% 35% at 82% 70%, rgba(254, 204, 0, 0.08), transparent 45%),
        radial-gradient(circle at 50% 48%, rgba(40, 62, 98, 0.55) 0%, transparent 42%),
        linear-gradient(165deg, #0a101c 0%, #152238 45%, #0e1828 100%);
    box-shadow:
        inset 0 0 80px rgba(0, 0, 0, 0.35),
        0 16px 40px rgba(0, 0, 0, 0.22);
}

.bolide-family .bf-stars {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        radial-gradient(1.5px 1.5px at 8% 18%, rgba(255, 255, 255, 0.7), transparent),
        radial-gradient(1px 1px at 22% 72%, rgba(255, 255, 255, 0.55), transparent),
        radial-gradient(1.5px 1.5px at 35% 12%, rgba(255, 255, 255, 0.65), transparent),
        radial-gradient(1px 1px at 48% 88%, rgba(255, 255, 255, 0.45), transparent),
        radial-gradient(1.5px 1.5px at 61% 28%, rgba(255, 255, 255, 0.7), transparent),
        radial-gradient(1px 1px at 73% 64%, rgba(255, 255, 255, 0.5), transparent),
        radial-gradient(1.5px 1.5px at 86% 16%, rgba(255, 255, 255, 0.6), transparent),
        radial-gradient(1px 1px at 92% 78%, rgba(255, 255, 255, 0.45), transparent),
        radial-gradient(1px 1px at 14% 42%, rgba(255, 255, 255, 0.4), transparent),
        radial-gradient(1.5px 1.5px at 40% 55%, rgba(255, 255, 255, 0.35), transparent);
    opacity: 0.85;
    animation: bf-twinkle 7s ease-in-out infinite alternate;
}

@keyframes bf-twinkle {
    from { opacity: 0.55; }
    to { opacity: 0.95; }
}

.bolide-family .bf-pass {
    position: absolute;
    width: 140px;
    height: 2px;
    top: 18%;
    left: -20%;
    background: linear-gradient(90deg, transparent, var(--bf-gold), var(--bf-ember), transparent);
    border-radius: 2px;
    opacity: 0;
    filter: blur(0.3px);
    pointer-events: none;
    animation: bf-streak 9s ease-in-out infinite;
    box-shadow: 0 0 12px rgba(254, 204, 0, 0.55);
}

.bolide-family .bf-pass::after {
    content: "";
    position: absolute;
    right: 8px;
    top: 50%;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    transform: translateY(-50%);
    background: #fff6d0;
    box-shadow: 0 0 10px 3px rgba(254, 204, 0, 0.7);
}

@keyframes bf-streak {
    0%, 72%, 100% { opacity: 0; transform: translate(0, 0) rotate(18deg); }
    75% { opacity: 1; }
    88% { opacity: 0.9; transform: translate(820px, 260px) rotate(18deg); }
    92%, 100% { opacity: 0; transform: translate(900px, 290px) rotate(18deg); }
}

.bolide-family .bf-constellation {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.bolide-family .bf-trails path {
    fill: none;
    stroke: url(#bfTrailGrad);
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-dasharray: 5 8;
    opacity: 0.35;
    transition: opacity 0.35s ease, stroke-width 0.35s ease;
}

.bolide-family .bf-trails path.active {
    opacity: 1;
    stroke-width: 2.25;
    stroke-dasharray: 2 6;
    animation: bf-dash 1.1s linear infinite;
    filter: drop-shadow(0 0 4px rgba(254, 204, 0, 0.55));
}

@keyframes bf-dash {
    to { stroke-dashoffset: -32; }
}

.bolide-family .bf-hub {
    position: absolute;
    left: 50%;
    top: 48%;
    transform: translate(-50%, -50%);
    z-index: 3;
    width: clamp(118px, 18vw, 150px);
    text-align: center;
    pointer-events: none;
}

.bolide-family .bf-hub-core {
    position: relative;
    width: clamp(88px, 14vw, 112px);
    height: clamp(88px, 14vw, 112px);
    margin: 0 auto 0.55rem;
    border-radius: 50%;
    background:
        radial-gradient(circle at 35% 30%, #fff2a8 0%, var(--bf-gold) 28%, var(--bf-ember) 72%, #7a1014 100%);
    box-shadow:
        0 0 0 1px rgba(254, 204, 0, 0.35),
        0 0 28px rgba(254, 204, 0, 0.35),
        0 0 60px rgba(227, 30, 36, 0.28);
    display: grid;
    place-items: center;
    animation: bf-pulse 4.5s ease-in-out infinite;
}

.bolide-family .bf-hub-core img {
    width: 58%;
    height: 58%;
    object-fit: contain;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}

.bolide-family .bf-hub-ring {
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    border: 1px solid rgba(254, 204, 0, 0.28);
    /* Keep spinning even under prefers-reduced-motion — this is the hub signature */
    animation: bf-spin 14s linear infinite;
    will-change: transform;
}

.bolide-family .bf-hub-ring::before {
    content: "";
    position: absolute;
    top: -3px;
    left: 50%;
    width: 6px;
    height: 6px;
    margin-left: -3px;
    border-radius: 50%;
    background: var(--bf-gold);
    box-shadow: 0 0 8px var(--bf-gold);
}

@keyframes bf-pulse {
    0%, 100% {
        box-shadow:
            0 0 0 1px rgba(254, 204, 0, 0.35),
            0 0 28px rgba(254, 204, 0, 0.35),
            0 0 60px rgba(227, 30, 36, 0.28);
    }
    50% {
        box-shadow:
            0 0 0 1px rgba(254, 204, 0, 0.5),
            0 0 40px rgba(254, 204, 0, 0.5),
            0 0 80px rgba(227, 30, 36, 0.4);
    }
}

@keyframes bf-spin {
    to { transform: rotate(360deg); }
}

.bolide-family .bf-hub-label {
    font-size: clamp(0.95rem, 2vw, 1.15rem);
    font-weight: 700;
    line-height: 1.2;
    color: var(--bf-star);
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}

.bolide-family .bf-hub-label span {
    display: block;
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--bf-muted);
    font-weight: 500;
    margin-top: 0.15rem;
}

.bolide-family .bf-node {
    position: absolute;
    z-index: 4;
    width: 112px;
    margin-left: -56px;
    margin-top: -28px;
    text-align: center;
    cursor: pointer;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    padding: 0;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
}

.bolide-family .bf-node:focus-visible {
    outline: 2px solid var(--bf-gold);
    outline-offset: 6px;
    border-radius: 12px;
}

.bolide-family .bf-node-star {
    width: 52px;
    height: 52px;
    margin: 0 auto 0.4rem;
    border-radius: 50%;
    background: rgba(20, 32, 52, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.16);
    display: grid;
    place-items: center;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.bolide-family .bf-node-star img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.bolide-family .bf-node-name {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.25;
    color: #d7e0ee;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

.bolide-family .bf-node-group {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.65rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--bf-muted);
}

.bolide-family .bf-node:hover .bf-node-star,
.bolide-family .bf-node.is-active .bf-node-star {
    transform: scale(1.12);
    border-color: rgba(254, 204, 0, 0.75);
    box-shadow:
        0 0 0 3px rgba(254, 204, 0, 0.15),
        0 0 22px rgba(254, 204, 0, 0.4),
        0 8px 20px rgba(0, 0, 0, 0.4);
}

.bolide-family .bf-node.is-active .bf-node-name {
    color: var(--bf-gold);
}

.bolide-family .bf-node[data-id="amm"] { left: 14%; top: 28%; }
.bolide-family .bf-node[data-id="amb"] { left: 18%; top: 62%; }
.bolide-family .bf-node[data-id="ic"]  { left: 38%; top: 14%; }
.bolide-family .bf-node[data-id="ac"]  { left: 62%; top: 12%; }
.bolide-family .bf-node[data-id="dvs"] { left: 84%; top: 30%; }
.bolide-family .bf-node[data-id="bmc"] { left: 86%; top: 62%; }
.bolide-family .bf-node[data-id="alc"] { left: 68%; top: 82%; }
.bolide-family .bf-node[data-id="bsc"] { left: 36%; top: 84%; }

.bolide-family .bf-group-label {
    position: absolute;
    z-index: 2;
    font-size: 0.68rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(154, 168, 188, 0.55);
    pointer-events: none;
    font-weight: 500;
}

.bolide-family .bf-group-label.cat {
    left: 6%;
    top: 42%;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
}

.bolide-family .bf-group-label.dup {
    left: 48%;
    top: 4%;
}

.bolide-family .bf-group-label.vid {
    right: 5%;
    bottom: 8%;
}

.bolide-family .bf-panel {
    position: absolute;
    z-index: 6;
    left: 50%;
    bottom: 1rem;
    transform: translateX(-50%) translateY(12px);
    width: min(420px, calc(100% - 1.5rem));
    padding: 1rem 1.15rem 1.05rem;
    border-radius: 14px;
    background: var(--bf-panel);
    border: 1px solid rgba(254, 204, 0, 0.22);
    backdrop-filter: blur(12px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease, transform 0.28s ease;
    text-align: left;
}

.bolide-family .bf-panel.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.bolide-family .bf-panel-kicker {
    font-size: 0.7rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--bf-gold);
    margin-bottom: 0.25rem;
    font-weight: 600;
    line-height: 1.3;
}

.bolide-family .bf-panel h2 {
    margin: 0 0 0.35rem;
    padding: 0;
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--bf-star);
}

.bolide-family .bf-panel p {
    margin: 0 0 0.85rem;
    color: var(--bf-muted);
    font-size: 0.92rem;
    line-height: 1.45;
    text-align: left;
}

.bolide-family .bf-panel-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: center;
}

.bolide-family .bf-panel-actions a,
.bolide-family .bf-panel-actions button.bf-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.85rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    font-family: inherit;
    cursor: pointer;
    line-height: 1.2;
}

.bolide-family .bf-panel-actions .bf-primary {
    background: linear-gradient(135deg, var(--bf-gold), #f0a010);
    color: #1a1200;
}

.bolide-family .bf-panel-actions .bf-primary:hover {
    filter: brightness(1.05);
    color: #1a1200;
}

.bolide-family .bf-panel-actions .bf-ghost {
    color: #c9d6ea;
    background: transparent;
    border: 1px solid rgba(201, 214, 234, 0.28);
}

.bolide-family .bf-panel-actions .bf-ghost:hover {
    border-color: var(--bf-gold);
    color: var(--bf-gold);
}

.bolide-family .bf-hint {
    text-align: center;
    margin: 0.85rem auto 0;
    color: #5a6a7e;
    font-size: 0.92rem;
    line-height: 1.4;
}

.bolide-family .bf-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem 1.25rem;
    margin: 0.85rem 0 0;
    padding: 0;
    list-style: none;
}

.bolide-family .bf-legend li {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.82rem;
    color: #5a6a7e;
    line-height: 1.3;
}

.bolide-family .bf-legend i {
    width: 22px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--bf-ember), var(--bf-gold));
    display: inline-block;
}

.bolide-family .bf-legend .bf-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #fff2a8, var(--bf-gold) 40%, var(--bf-ember));
    box-shadow: 0 0 8px rgba(254, 204, 0, 0.5);
}

@media (prefers-reduced-motion: reduce) {
    .bolide-family .bf-stars,
    .bolide-family .bf-pass,
    .bolide-family .bf-hub-core,
    .bolide-family .bf-trails path.active {
        animation: none;
    }
}

@media (max-width: 760px) {
    .bolide-family .bf-sky {
        aspect-ratio: auto;
        min-height: 0;
        height: auto;
        padding: 1.25rem 0.75rem 7.5rem;
    }

    .bolide-family .bf-constellation,
    .bolide-family .bf-group-label {
        display: none;
    }

    .bolide-family .bf-stars {
        opacity: 0.45;
    }

    .bolide-family .bf-hub {
        position: relative;
        left: auto;
        top: auto;
        transform: none;
        margin: 0.5rem auto 1.5rem;
    }

    .bolide-family .bf-nodes {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .bolide-family .bf-node {
        position: relative;
        left: auto !important;
        top: auto !important;
        width: auto;
        margin: 0;
        padding: 0.75rem 0.5rem;
        border-radius: 12px;
        background: rgba(18, 28, 46, 0.65);
        border: 1px solid rgba(255, 255, 255, 0.08);
    }

    .bolide-family .bf-node-star {
        width: 44px;
        height: 44px;
    }

    .bolide-family .bf-panel {
        position: fixed;
        left: 0.75rem;
        right: 0.75rem;
        bottom: 0.75rem;
        width: auto;
        transform: translateY(12px);
    }

    .bolide-family .bf-panel.is-open {
        transform: translateY(0);
    }
}

@media (min-width: 761px) {
    .bolide-family .bf-nodes {
        display: contents;
    }
}
