/* Oksigenia Hechauka: the public demonstration screen (demo.php), a page of its own. */
:root {
    --bg: #eef0f2;
    --ink: #1d2125;
    --muted: #5a6168;
    --bezel: #14171a;
    --line: #cfd4d9;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #16191c;
        --ink: #eef0f2;
        --muted: #a9b0b6;
        --bezel: #000;
        --line: #3a4046;
    }
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.hkd {
    display: grid;
    gap: 1.25rem;
    justify-items: center;
    margin: 0 auto;
    padding: 2rem 16px 3rem;
    max-width: 1240px;
}

.hkd-head {
    width: 100%;
    text-align: center;
}

.hkd-head h1 {
    margin: .1rem 0 .4rem;
    font-size: 1.75rem;
}

.hkd-head p {
    margin: 0;
    color: var(--muted);
}

/* The centre's name in the middle and, at its side, the way back to the site's front page. */
.hkd-top {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: .25rem 1rem;
    align-items: baseline;
}

.hkd-head .hkd-centre {
    grid-column: 2;
    font-weight: 600;
}

.hkd-back {
    grid-column: 3;
    justify-self: end;
    color: var(--ink);
    font-weight: 600;
    text-decoration: none;
}

.hkd-back:focus-visible {
    outline: 3px solid #0f6cbf;
    outline-offset: 2px;
}

@media (hover: hover) {
    .hkd-back:hover {
        text-decoration: underline;
    }
}

@media (max-width: 640px) {
    .hkd-top {
        grid-template-columns: 1fr;
    }

    .hkd-head .hkd-centre,
    .hkd-back {
        grid-column: 1;
        grid-row: 2;
        justify-self: center;
    }

    .hkd-back {
        grid-row: 1;
    }
}

.hkd-tv {
    /* The whole television in sight, the band at its foot too: as wide as the window lets it be in height. */
    width: min(100%, calc((100vh - 15rem) * 16 / 9));
    padding: 1.1%;
    border-radius: 14px;
    background: var(--bezel);
    box-shadow: 0 18px 40px rgba(0, 0, 0, .25);
}

.hkd-tv.is-vertical {
    width: min(100%, 520px, calc((100vh - 15rem) * 9 / 16));
}

.hkd-glass {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    background: #000;
}

.hkd-glass iframe {
    position: absolute;
    top: 0;
    left: 0;
    border: 0;
    transform-origin: 0 0;
}

.hkd-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    justify-content: center;
}

.hkd-button {
    padding: .5rem 1rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--ink);
    font-weight: 600;
    text-decoration: none;
}

.hkd-button:focus-visible {
    outline: 3px solid #0f6cbf;
    outline-offset: 2px;
}

@media (hover: hover) {
    .hkd-button:hover {
        background: rgba(127, 127, 127, .12);
    }
}
