@font-face {
    font-family: "Courier New";
    src: local("CourierNewPSMT"), url("/fonts/CutiveMono-Regular.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
    font-display: block;
}

@font-face {
    font-family: "Courier New";
    src: local("CourierNewPS-BoldMT"), url("/fonts/CutiveMono-Regular.ttf") format("truetype");
    font-weight: bold;
    font-style: normal;
    font-display: block;
}

@font-face {
    font-family: "Courier New";
    src: local("CourierNewPS-ItalicMT"), url("/fonts/CutiveMono-Regular.ttf") format("truetype");
    font-weight: normal;
    font-style: italic;
    font-display: block;
}

@font-face {
    font-family: "Courier New";
    src: local("CourierNewPS-BoldItalicMT"), url("/fonts/CutiveMono-Regular.ttf") format("truetype");
    font-weight: bold;
    font-style: italic;
    font-display: block;
}


.radio-title {
    position: absolute;
    top: 58px;
    left: 50%;
    transform: translateX(-50%);
    width: 72%;
    max-width: 1100px;
    color: #383834;
    font-family: "Blue Screen", monospace;
    font-size: 24px;
    font-weight: normal;
    letter-spacing: 0;
    line-height: 1;
    text-align: center;
    z-index: 5;
}

.radio-title > span { display: inline; }

.radio-back {
    position: absolute;
    left: 0;
    top: -4px;
    color: #383834;
    text-decoration: none;
    font-family: "Blue Screen", monospace;
    font-size: 28px;
    line-height: 1;
    white-space: nowrap;
}

.radio-back:hover { color: #33332d; }

.radio-description {
    position: absolute !important;
    top: 92px !important;
    left: 50% !important;
    transform: translate(-50%, 25px) !important;
    width: 72% !important;
    max-width: 1100px !important;
    color: #080908;
    font-family: "Blue Screen", monospace;
    font-size: 16px;
    line-height: 1.6;
    letter-spacing: 0.4px;
    text-align: center;
    z-index: 5;
}

.radio-description p { margin: 0; }


.radio-window {
    position: absolute;
    top: 182px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    display: flex;
    justify-content: center;
    z-index: 5;
}

.radio-set {
    --needle: 0.5;
    --knob: 0deg;
    position: relative;
    width: min(94vw, 400px);
    container-type: inline-size;
}

.radio-body {
    position: relative;
    width: 100%;
    aspect-ratio: 1405 / 802;
    font-family: "Blue Screen", monospace;
}

.banner .radio-photo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    z-index: 3;
    opacity: 1;
    filter: brightness(0.84) contrast(1.05) saturate(0.8) drop-shadow(0 1.2cqw 1.4cqw rgba(0, 0, 0, 0.45));
}

.radio-lcd {
    position: absolute;
    left: 49.82%;
    top: 14.21%;
    width: 43.35%;
    height: 22.2%;
    display: flex;
    align-items: center;
    padding: 0 3%;
    background: #2a2f2a;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.75);
    overflow: hidden;
    z-index: 1;
}

.radio-lcd::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background:
        radial-gradient(ellipse at 36% 28%, #cdf4c4 0%, #9fdb9c 42%, #62a56c 100%),
        radial-gradient(ellipse at 50% 50%, transparent 55%, rgba(10, 50, 20, 0.35) 100%);
    opacity: 0;
    pointer-events: none;
}

.radio-lcd::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background:
        linear-gradient(118deg, rgba(255, 255, 255, 0.14) 0, rgba(255, 255, 255, 0.03) 30%, transparent 46%),
        radial-gradient(ellipse at 82% 80%, rgba(0, 30, 10, 0.16) 0, transparent 40%),
        repeating-linear-gradient(180deg, rgba(0, 20, 6, 0.09) 0, rgba(0, 20, 6, 0.09) 1px, transparent 1px, transparent 3px);
    pointer-events: none;
}

.is-on .radio-lcd {
    background: #7fd493;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.45), inset 0 0 2.4cqw rgba(30, 140, 70, 0.6);
}

.is-on .radio-lcd::before {
    opacity: 1;
}

.radio-track {
    width: 100%;
    height: 1.5em;
    margin: 0;
    position: relative;
    z-index: 1;
    color: #04160a;
    font-family: "Blue Screen", monospace;
    font-size: clamp(11px, 3cqw, 16px);
    letter-spacing: 1px;
    line-height: 1.5em;
    overflow: hidden;
    white-space: nowrap;
    text-align: center;
}

.radio-track-text {
    display: inline-block;
    will-change: transform;
}

.radio-track-text.is-scrolling {
    padding-left: 100%;
    animation: radio-marquee 20s linear infinite;
}

.radio-track-glow {
    display: inline-block;
    animation: radio-track-glow 5.5s ease-in-out infinite;
}

@keyframes radio-marquee {
    from { transform: translateX(0); }
    to { transform: translateX(var(--travel, -100%)); }
}

.radio-track-glow {
    transition: opacity 1.5s ease-in-out;
}

.radio-track-glow.is-hidden {
    opacity: 0;
}

.radio-track-probe {
    position: absolute;
    visibility: hidden;
    white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
    .radio-track-text.is-scrolling {
        padding-left: 0;
        animation: none;
    }
}

.radio-zero {
    font-family: "Courier New", Courier, monospace;
    line-height: 1;
}

@keyframes radio-track-glow {
    0%, 100% {
        text-shadow: 0 0 2px rgba(220, 255, 226, 0.25), 0 0 5px rgba(220, 255, 226, 0.12);
    }

    50% {
        text-shadow: 0 0 3px rgba(225, 255, 230, 0.9), 0 0 8px rgba(190, 255, 205, 0.7), 0 0 14px rgba(120, 240, 150, 0.45);
    }
}

.radio-spill {
    position: absolute;
    left: 42%;
    top: 2%;
    width: 58%;
    height: 56%;
    background: radial-gradient(ellipse at 50% 50%, rgba(110, 225, 135, 0.3) 0%, rgba(110, 225, 135, 0.1) 45%, transparent 72%);
    mix-blend-mode: screen;
    opacity: 0;
    pointer-events: none;
    z-index: 4;
}

.is-on .radio-spill {
    opacity: 1;
}

.radio-dial {
    position: absolute;
    left: 50.04%;
    top: 43.02%;
    width: 43.06%;
    height: 8.35%;
    background: #0d0e0d;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.75);
    overflow: hidden;
    z-index: 1;
}

.radio-scale {
    position: absolute;
    top: 10%;
    right: 4%;
    left: 4%;
    height: 42%;
    background:
        repeating-linear-gradient(90deg, #5d5f5c 0, #5d5f5c 1px, transparent 1px, transparent 20%) 0 0 / 100% 100% no-repeat,
        repeating-linear-gradient(90deg, #4a4c49 0, #4a4c49 1px, transparent 1px, transparent 4%) 0 100% / 100% 55% no-repeat;
}

.radio-numbers {
    position: absolute;
    right: 1.2%;
    bottom: 8%;
    left: 1.2%;
    display: flex;
    justify-content: space-between;
    color: #62645f;
    font-family: "Courier New", Courier, monospace;
    font-size: clamp(5px, 1.9cqw, 10px);
    line-height: 1;
}

@container (max-width: 440px) {
    .radio-numbers { display: none; }
    .radio-scale { height: 62%; top: 14%; }
}

.radio-needle {
    position: absolute;
    top: 6%;
    bottom: 6%;
    left: calc(4% + 92% * var(--needle));
    width: max(2px, 0.4cqw);
    margin-left: -1px;
    background: #7a7c78;
}

.is-on .radio-dial {
    background: linear-gradient(180deg, #2a2b28 0%, #171815 100%);
}

.is-on .radio-numbers {
    color: #c4c6c1;
}

.is-on .radio-scale {
    filter: brightness(1.9);
}

.is-on .radio-needle {
    background: #f0f0ec;
    box-shadow: 0 0 5px rgba(240, 240, 236, 0.85);
}

.radio-onair {
    position: absolute;
    left: 86.8%;
    top: 59.5%;
    display: flex;
    align-items: center;
    gap: 1.2cqw;
    transform: translate(-50%, -50%);
    color: #d4d6d1;
    font-size: clamp(7px, 2.1cqw, 11px);
    letter-spacing: 1px;
    line-height: 1;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.7);
    white-space: nowrap;
    pointer-events: none;
    z-index: 5;
}

.radio-light {
    width: max(5px, 1.5cqw);
    height: max(5px, 1.5cqw);
    background: #3fbf5f;
    opacity: 1;
    box-shadow: 0 0 4px rgba(63, 191, 95, 0.8), 0 0 9px rgba(63, 191, 95, 0.5);
}

.is-on .radio-light {
    animation: radio-light-pulse 2.4s ease-in-out infinite;
}

@keyframes radio-light-pulse {
    0%, 100% {
        box-shadow: 0 0 4px rgba(63, 191, 95, 0.8), 0 0 9px rgba(63, 191, 95, 0.5);
    }

    50% {
        box-shadow: 0 0 6px #3fbf5f, 0 0 14px rgba(63, 191, 95, 0.9), 0 0 26px rgba(63, 191, 95, 0.6);
    }
}

.radio-toggle {
    position: absolute;
    left: 86.8%;
    top: calc(71.95% - 4.4cqw);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.4cqw;
    width: 14cqw;
    margin: 0;
    padding: 0;
    transform: translateX(-50%);
    background: transparent;
    border: 0;
    border-radius: 0;
    color: #c6c8c4;
    font-family: "Blue Screen", monospace;
    font-size: clamp(8px, 2.4cqw, 12px);
    letter-spacing: 0;
    line-height: 1;
    text-align: center;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    z-index: 5;
}

.radio-toggle:focus,
.radio-toggle:focus-visible {
    outline: none;
}

.radio-toggle-cap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 8.8cqw;
    height: 8.8cqw;
    min-width: 30px;
    min-height: 30px;
    border-radius: 50%;
}

.radio-toggle:active .radio-toggle-cap,
.radio-toggle.is-tuned .radio-toggle-cap {
    background: rgba(0, 0, 0, 0.22);
    box-shadow: inset 0 0.7cqw 1.3cqw rgba(0, 0, 0, 0.65);
}

.radio-toggle-label {
    position: relative;
    display: inline-block;
    color: #b9bbb6;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.7);
    white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
    .is-on .radio-light { animation: none; }
}

.radio-info {
    width: 100%;
    margin-top: 16px;
    color: #d8d8d8;
    font-family: "Blue Screen", monospace;
    text-align: center;
}

.radio-section { padding: 0; }

.radio-section p {
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.radio-label {
    margin-bottom: 8px !important;
    font-size: 11px;
    letter-spacing: 1.5px;
    line-height: 16px;
    opacity: 0.6;
}

.radio-recent-item {
    height: 20px;
    font-size: 13px;
    letter-spacing: 0.8px;
    line-height: 20px;
    opacity: 0.9;
}

.radio-recent-item:nth-of-type(3) { opacity: 0.7; }
.radio-recent-item:nth-of-type(4) { opacity: 0.5; }
.radio-recent-item.is-hidden { opacity: 0 !important; }

@media screen and (max-width: 600px) {
    .radio-description {
        top: 90px !important;
        transform: translateX(-50%) !important;
        width: 88% !important;
        font-size: 14px;
        line-height: 1.6;
    }

    .radio-title { top: 58px; width: 88%; font-size: 20px; }
    .radio-back { top: -3px; font-size: 24px; }
}

@media screen and (max-width: 380px) {
    .radio-description {
        top: 86px !important;
        width: 90% !important;
        font-size: 13px;
    }

    .radio-title { top: 54px; width: 90%; font-size: 18px; }
    .radio-back { font-size: 22px; }
    .radio-window { top: 176px; }
}

@media screen and (min-width: 601px) {
    .radio-window { top: 158px; }
    .radio-set { width: clamp(420px, min(50vw, calc((100vh - 290px) * 1.752)), 1100px); }
}


/* a picture for the track on air; below "recently played" on phones and tablets */
.radio-art {
    position: relative;
    width: min(70%, 260px);
    aspect-ratio: 3 / 2;
    margin: 14px auto 0;
    overflow: hidden;
    opacity: 0;
    transition: opacity 1.2s ease;
    pointer-events: none;
}

.radio-art.is-shown { opacity: 1; }

.radio-art-layer {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: 50% 50%;
    opacity: 0;
    transition: opacity 1.8s ease-in-out;
    filter: brightness(0.9) saturate(0.88) contrast(1.02);
    will-change: opacity;
}

.radio-art-layer.is-on { opacity: 1; }

/* on a wide screen it sits to the right of the radio */
/* on a wide screen it sits beside the radio, centred on the radio itself */
@media screen and (min-width: 1000px) {
    .radio-art {
        position: absolute;
        top: calc((100% - 84px) / 2);
        transform: translateY(-50%);
        left: calc(100% + 48px);
        width: clamp(180px, calc((100vw - 100%) / 2 - 96px), 300px);
        height: auto;
        margin: 0;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.55);
    }
}
