* {
    box-sizing: border-box
}

body {
    margin: 0;
    background: #fafafa;
    font-family: Arial, sans-serif;
    color: #171717
}

button,
input {
    cursor: pointer
}

button:focus-visible,
input:focus-visible {
    outline: 3px solid #555;
    outline-offset: 4px
}

.hero {
    position: relative;
    width: 100%;
    aspect-ratio: 1703/924;
    background: url('../assets/master.webp') center/100% 100% no-repeat;
    overflow: hidden
}

.mobile-header,
.copy,
.art .left,
.art .portrait {
    display: none
}

.cover {
    position: absolute;
    left: 5.03%;
    top: 32.51%;
    width: 23.89%;
    height: 45.59%;
    object-fit: cover;
    border-radius: .3vw;
    opacity: 0
}

.cover.custom {
    opacity: 1
}

.player {
    position: absolute;
    left: 38.4%;
    top: 75.4%;
    width: 33.1%;
    height: 18.2%;
    display: flex;
    flex-direction: column;
    justify-content: space-between
}

.status {
    display: flex;
    justify-content: space-between;
    background: #fafafa;
    padding: .3em .5em;
    font-size: clamp(8px, 1vw, 18px);
    color: #555
}

.controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2%;
    height: 65%;
    background: #fafafa
}

.controls button {
    border: 0;
    border-radius: 50%;
    background: #171717;
    color: white;
    width: 11%;
    aspect-ratio: 1;
    font-size: clamp(12px, 2vw, 36px);
    padding: 0
}

.controls #play {
    width: 19%;
    background: #e60012;
    box-shadow: 0 6px 20px #e6001230
}

.controls input {
    width: 26%;
    accent-color: #e60012
}

.controls #like[aria-pressed=true] {
    background: #e60012
}

.wave {
    display: none
}

@media(max-width:760px) {
    .hero {
        aspect-ratio: auto;
        min-height: 100svh;
        display: flex;
        flex-direction: column;
        background: #fafafa;
        padding: 0 0 24px
    }

    .mobile-header {
        display: block;
        text-align: center;
        padding: 12px 0 4px
    }

    .mobile-header img {
        width: 40%;
        max-width: 210px
    }

    .mobile-header .station-heading {
        font-weight: bold;
        font-style: italic;
        color: #d60013;
        margin: 3px;
        font-size: clamp(12px, 3.6vw, 20px)
    }

    .art {
        position: relative;
        height: clamp(210px, 57vw, 430px);
        overflow: hidden
    }

    .art .left,
    .art .portrait {
        display: block;
        position: absolute;
        height: 100%;
        object-fit: contain
    }

    .art .left {
        left: 0;
        width: 57%;
        object-fit: cover;
        object-position: left center
    }

    .art .portrait {
        right: 0;
        width: 49%;
        object-fit: cover;
        object-position: center 35%
    }

    .cover {
        left: 7%;
        top: 19%;
        width: 35%;
        height: auto;
        aspect-ratio: 1
    }

    .copy {
        display: block;
        text-align: center;
        padding: 14px 8px;
        font-style: italic
    }

    .copy .period-headline {
        font-size: clamp(22px, 6.8vw, 48px);
        font-weight: 900;
        margin: 0;
        letter-spacing: -.05em
    }

    .copy strong,
    .copy b {
        color: #e60012
    }

    .copy .secondary {
        font-size: clamp(18px, 5.5vw, 38px);
        font-weight: 900;
        font-style: italic;
        margin: 5px 0
    }

    .tag {
        font-weight: bold;
        margin: 8px 0
    }

    .player {
        position: relative;
        left: auto;
        top: auto;
        width: auto;
        height: auto;
        margin: auto 6% 0;
        padding: 16px 0 10px;
        gap: 14px
    }

    .controls {
        height: auto
    }

    .controls button {
        font-size: clamp(17px, 5vw, 32px)
    }

    .status {
        font-size: 12px;
        border-top: 2px solid #ddd;
        padding-top: 10px
    }

    .hero:after {
        content: '';
        position: absolute;
        bottom: 0;
        right: 0;
        width: 42%;
        height: 22px;
        background: linear-gradient(120deg, #ff2033, #b4000c);
        clip-path: polygon(100% 0, 100% 100%, 0 100%);
        pointer-events: none
    }
}

@media(min-width:761px) {
    .hero {
        background-image: url('../assets/xfm-bg-day-4k.webp');
        --mx: 0px;
        --my: 0px
    }

    .art .cover {
        display: block;
        opacity: 1;
        left: 4.97%;
        top: 32.4%;
        width: 24%;
        height: 45.8%;
        z-index: 4;
        transform: translate(calc(var(--mx)*.45), calc(var(--my)*.45));
        box-shadow: 0 1.2vw 2vw #75001235;
        transition: transform .25s ease-out
    }

    .vinyl-wrap {
        position: absolute;
        left: 17.32%;
        top: 34.97%;
        width: 23.14%;
        aspect-ratio: 1;
        z-index: 3;
        transform: translate(calc(var(--mx)*.25), calc(var(--my)*.25));
        transition: transform .25s ease-out
    }

    .vinyl-wrap img {
        width: 100%;
        height: 100%;
        animation: spin 7s linear infinite;
        animation-play-state: paused
    }

    .playing .vinyl-wrap img {
        animation-play-state: running
    }

    .portrait-motion,
    .front-ribbon {
        position: absolute;
        pointer-events: none;
        right: 0
    }

    .portrait-motion {
        /* Scale with the 1703px master hero; preserve native image ratio. */
        width: 29.359952%;
        height: auto;
        right: 10px !important;
        top:50px;
        z-index: 1;
        transform: translate(calc(var(--mx)*.35), calc(var(--my)*.35));
        transition: transform .35s ease-out
    }

    .front-ribbon {
        /* Original ribbon is 492 x 923px at the 1703px master width. */
        width: 28.890194%;
        height: auto;
        z-index: 2;
        top:2px
    }

    .player {
        z-index: 5
    }

    .wave {
        display: flex;
        position: absolute;
        bottom: 145%;
        left: 12%;
        width: 75%;
        height: 28%;
        align-items: center;
        justify-content: space-between;
        opacity: 0;
        background: #fafafa
    }

    .playing .wave {
        opacity: 1
    }

    .wave i {
        width: 1%;
        height: var(--h);
        background: #e60012;
        border-radius: 4px;
        animation: pulse .65s ease-in-out infinite alternate;
        animation-delay: var(--d)
    }
}

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

@keyframes pulse {
    to {
        transform: scaleY(.35)
    }
}

@media(max-width:760px) {

    .vinyl-wrap,
    .portrait-motion,
    .front-ribbon {
        display: none
    }
}

@media(prefers-reduced-motion:reduce) {

    *,
    *:before,
    *:after {
        animation: none !important;
        transition: none !important;
        transform: none !important
    }
}

/* V2: square sleeve and seamless circular record */
@media(min-width:761px) {
    .art .cover {
        left: 4.55%;
        top: 32.4%;
        width: 24.85%;
        height: auto;
        aspect-ratio: 1;
        object-fit: cover;
        border-radius: 1vw
    }

    .vinyl-wrap {
        left: 17.32%;
        top: 34.97%;
        width: 23.14%;
        height: auto;
        aspect-ratio: 1
    }

    .vinyl-wrap img {
        display: block;
        object-fit: contain;
        border-radius: 50%;
        filter: drop-shadow(.3vw .6vw .65vw #58000b35)
    }
}

/* V3: live typography and a single set of player controls */
.brand {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    font-family: Arial, sans-serif;
    font-style: italic;
    font-weight: 900;
    line-height: .83;
    color: #101010
}

.brand {
    width: 200px;
}

.brand span {
    font-size: clamp(45px, 6.5vw, 120px);
    letter-spacing: -.09em
}

.brand b {
    color: #e60012
}

.brand small {
    font-size: clamp(10px, 1.3vw, 24px);
    letter-spacing: .42em;
    margin-top: .55em
}

.controls,
.status,
.wave {
    background: transparent
}

.controls input {
    min-width: 0
}

.wave i {
    animation-play-state: paused
}

.playing .wave i {
    animation-play-state: running
}

@media(min-width:761px) {
    .mobile-header {
        display: flex;
        position: absolute;
        left: 5.5%;
        top: 5.7%;
        align-items: center;
        gap: 3vw;
        z-index: 6
    }

    .mobile-header .station-heading {
        border-left: 1px solid #bbb;
        padding-left: 3vw;
        font-size: 1.85vw;
        font-weight: 700;
        letter-spacing: .03em;
        white-space: nowrap;
        color: #e60012;
        font-family: 'SF UI Display', 'FC Iconic';
    }
    .mobile-header .subtitle {
	    letter-spacing: 0em;
	    font-family: 'SF UI Display', 'FC Iconic';
	    font-size: 0.8em;
	    color:#000;
	    font-size-adjust: 0.5;
    }

    .mobile-header .station-heading:after {
        content: '';
        display: inline-block;
        width: 2.8vw;
        height: 3px;
        background: #e60012;
        vertical-align: middle;
        margin-left: 1vw
    }

    .copy {
        display: block;
        position: absolute;
        left: 42%;
        top: 22.5%;
        width: 30%;
        z-index: 4;
        font-family: Arial, sans-serif;
    }

    .copy .period-headline {
        font-size: 4vw;
        line-height: .91;
        letter-spacing: -.035em;
        margin: 0;
        font-weight: 500;
        white-space: nowrap;
        font-family: 'Oswald'
    }

    .copy .period-headline span,
    .copy .period-headline strong {
        display: block;
        font-weight: 500;
    }

    .copy strong,
    .copy b {
        color: #e60012;
        font-weight: 500;
    }

    .copy .secondary {
        font-family: 'Oswald';
        font-size: 2.6vw;
        letter-spacing: -.035em;
        font-weight: 500;
        white-space: nowrap;
        margin: 0
    }

    .copy .tag {
        font-family: 'SF UI Display', 'FC Iconic';
        font-size: 2.1vw;
        font-weight: 400;
        margin: .7vw 0;
        white-space: nowrap
    }

    .wave {
        opacity: 1;
        bottom: 123%;
        left: 12%;
        width: 75%;
        height: 32%
    }

    .player {
        top: 75%;
        height: 17%
    }

    .status {
        padding: .2em 0
    }

    .controls {
        height: 70%
    }
}

@media(max-width:760px) {
    .wave {
        display: flex;
        height: 30px;
        align-items: center;
        justify-content: space-between
    }

    .wave i {
        width: 1.2%;
        height: var(--h);
        background: #e60012;
        border-radius: 4px;
        animation: pulse .65s ease-in-out infinite alternate;
        animation-play-state: paused
    }

    .playing .wave i {
        animation-play-state: running
    }

    .brand span {
        font-size: 13vw
    }

    .brand small {
        font-size: 2.6vw
    }
}

/* Responsive logo: keep the original 200px brand / 150px logo
   proportions at the 1703px desktop reference width. */
@media (min-width: 761px) {
    .mobile-header .brand {
        width: 11.744vw;
        flex: 0 0 auto;
    }
    .mobile-header .brand img {
        width: 75% !important;
        max-width: none;
        height: auto;
    }
}
@media (max-width: 760px) {
    .mobile-header .brand {
        width: 51.282vw;
        max-width: 280px;
    }
    .mobile-header .brand img {
        width: 75% !important;
        max-width: none;
        height: auto;
    }
}

/* XFM Vinyl - Original Proportion */
@media (min-width: 761px) {
    .vinyl-wrap {
        left: 17.58110%;
        top: 36.30979%;
        width: 20.60732%;
    }
}

/* side vertical label on cover */
.cover-side-label {
    display: none;
}

@media (min-width: 761px) {
    .cover-side-label {
        display: flex;
        position: absolute;
        left: 5.35%;
        top: 32.9%;
        height: 44.8%;
        align-items: flex-end;
        justify-content: center;
        writing-mode: vertical-rl;
        transform: rotate(180deg);
        font-family: 'Oswald', Arial, sans-serif;
        font-size: 1.02vw;
        letter-spacing: 0.22em;
        color: rgba(255,255,255,0.82);
        text-shadow: 0 1px 2px rgba(0,0,0,0.22);
        z-index: 5;
        pointer-events: none;
        user-select: none;
        white-space: nowrap;
    }
}

@media (max-width: 760px) {
    .cover-side-label {
        display: none;
    }
}

/* Desktop – Single-line headline 
@media (min-width: 761px) {

    .hero .copy .period-headline {
        font-size: 4vw;
        line-height: 1.15;
        white-space: nowrap;
        letter-spacing: -.035em;
    }

    .hero .copy .period-headline span,
    .hero .copy .period-headline strong {
        display: inline;
    }

    .hero .copy .period-headline strong {
        margin-left: .12em;
    }

    .hero .copy .secondary {
        font-size: 2.6vw;
    }
} */

/* SEO semantic heading: preserve the former paragraph box. */
.mobile-header .station-heading { margin: 1em 0; }
