/* === Looping research clips ===
   Shared by the home page and the research page.
   Behaviour (play on screen, pause button) is in js/demos.js. */

.demo-media {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #0B1118;
}

.demo-video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.demo-tag {
    position: absolute;
    top: 0.6rem;
    left: 0.6rem;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    background: rgba(27, 42, 74, 0.82);
    color: #fff;
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    line-height: 1.4;
    text-transform: uppercase;
    pointer-events: none;
}

.demo-toggle {
    position: absolute;
    right: 0.6rem;
    bottom: 0.6rem;
    display: grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    background: rgba(27, 42, 74, 0.82);
    color: #fff;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.demo-toggle:hover {
    background: rgba(27, 42, 74, 0.96);
    border-color: rgba(255, 255, 255, 0.75);
}

.demo-toggle:focus-visible {
    outline: 2px solid #E9B44C;
    outline-offset: 2px;
}

.demo-toggle svg {
    width: 1rem;
    height: 1rem;
    fill: currentColor;
}

/* Colour key for the two robots in the walking clips */
.key {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.key-dot {
    flex: none;
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 50%;
}

.key-blue { background: #1FA8D8; }
.key-red { background: #D2453A; }
