/* =========================================================
   THEME VARIABLES
   ========================================================= */

:root {
    --color-bg: #050505;
    --color-bg-alt: #101010;
    --color-text: #f5f5f5;
    --color-border: rgba(255, 255, 255, 0.08);
    --color-header-bg: rgba(0, 0, 0, 0.6);
    --color-primary: #ffffff;
    --color-primary-text: #000000;

    /* Schedule-specific */
    --schedule-card-max-width: 760px;
    --schedule-card-padding: 28px;
    --schedule-arrow-size: 3rem;
    --schedule-arrow-offset-top: 1.4rem;
}

body {
    transition: background-color 0.6s ease, color 0.6s ease;
}

body[data-theme="day"] {
    --color-bg: #f4f7f5;
    --color-bg-alt: #ffffff;
    --color-text: #2a3a31;
    --color-border: rgba(0, 0, 0, 0.08);
    --color-header-bg: rgba(255,255,255,0.4);
    --color-primary: #4b635a;
    --color-primary-text: #ffffff;
}

body[data-theme="night"] {
    --color-bg: #050505;
    --color-bg-alt: #101010;
    --color-text: #f5f5f5;
    --color-border: rgba(255, 255, 255, 0.08);
    --color-header-bg: rgba(0, 0, 0, 0.6);
    --color-primary: #ffffff;
    --color-primary-text: #000000;
}

body[data-theme="light"] {
    --color-bg: #f7f7f7;
    --color-bg-alt: #ffffff;
    --color-text: #111111;
    --color-border: rgba(0, 0, 0, 0.08);
    --color-header-bg: rgba(255, 255, 255, 0.9);
    --color-primary: #111111;
    --color-primary-text: #ffffff;
}

/* =========================================================
   FOUNDATION
   ========================================================= */

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* =========================================================
   HEADER
   ========================================================= */

.site-header {
    position: fixed;
    inset-inline: 0;
    top: 0;
    z-index: 40;
    backdrop-filter: blur(1.5px);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 0;
}

.site-header__logo-text {
    font-family: "Playfair Display", serif;
    font-size: 3.35rem;
    font-weight: 600;
}

.site-header__logo {
    color: var(--color-text);
    text-decoration: none;
}

.site-header__nav {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.site-header__link {
    color: var(--color-text);
    text-decoration: none;
    opacity: 0.85;
    font-size: 0.92rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.site-header__link:hover {
    opacity: 1;
}

.theme-toggle {
    border: 1px solid var(--color-border);
    background: transparent;
    color: var(--color-text);
    border-radius: 999px;
    padding: 0.35rem 0.9rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
}

/* Theme override (persistent pill) */

.theme-override {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    z-index: 9999;

    padding: 0.45rem 0.7rem;
    border-radius: 6px;
    background: rgba(0,0,0,0.45);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.25);
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    cursor: pointer;
    backdrop-filter: blur(10px);
}

body[data-theme="day"] .theme-override {
    background: rgba(255,255,255,0.8);
    color: #333;
    border-color: rgba(0,0,0,0.2);
}

/* Menu toggle */

.site-header__menu-toggle {
    display: none;
    border: none;
    background: none;
    cursor: pointer;
    padding: 0.3rem;
}

.site-header__menu-icon,
.site-header__menu-icon::before,
.site-header__menu-icon::after {
    display: block;
    width: 20px;
    height: 2px;
    background-color: var(--color-text);
    border-radius: 999px;
    position: relative;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-header__menu-icon::before,
.site-header__menu-icon::after {
    content: "";
    position: absolute;
    left: 0;
}

.site-header__menu-icon::before { top: -6px; }
.site-header__menu-icon::after { top: 6px; }

body.nav-open .site-header__menu-icon {
    transform: rotate(45deg);
}

body.nav-open .site-header__menu-icon::before {
    transform: rotate(-90deg) translateX(-6px);
}

body.nav-open .site-header__menu-icon::after {
    opacity: 0;
}

/* =========================================================
   HERO
   ========================================================= */

.hero {
    position: relative;
    padding-top: 4.5rem;
    min-height: calc(100vh - 4.5rem);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
}

.hero__media {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.hero__video-wrapper {
    position: absolute;
    inset: 0;
}

.hero__image-wrapper {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.hero__fallback-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

#youtube-player {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120vw;
    height: 67.5vw;
    min-width: 100%;
    min-height: 100%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

/* Hero overlay */

.hero__overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.35);
    transition: background 0.5s ease;
}

body[data-theme="day"] .hero__overlay {
    background: rgba(0, 0, 0, 0);
}

body[data-theme="night"] .hero__overlay {
    background: rgba(0, 0, 0, 0.8);
}

.hero__content {
    position: relative;
    z-index: 2;
}

.hero__content-inner {
    max-width: 580px;
}

.hero__eyebrow {
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.14em;
    opacity: 0.8;
    margin-bottom: 0.75rem;
}

.hero__title {
    font-family: "Playfair Display", serif;
    font-size: clamp(2.4rem, 6vw, 4.2rem);
    margin: 0 0 1rem;
}

.hero__subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    max-width: 34rem;
    margin-bottom: 1.8rem;
    opacity: 0.9;
}

/* Tap to listen */

.tap-to-listen {
    display: inline-block;
    padding: 1.25rem 2.2rem;
    margin: 2rem auto;
    background: rgba(0, 0, 0, 0.35);
    color: var(--color-text);
    font-size: 1.15rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12rem;
    border-radius: 1rem;
    transition: background 0.3s ease, color 0.3s ease;
}

body[data-theme="day"] .tap-to-listen {
    background: rgba(255, 255, 255, 0.55);
    color: #2e332d;
}

.tap-to-listen.hidden { display: none !important; }
body.unmuted .tap-to-listen { display: none !important; }

/* =========================================================
   NOW PLAYING / ONAIR
   ========================================================= */

.now-playing {
    border-radius: 0.75rem;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 1rem 1.1rem;
    margin-bottom: 1.6rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.now-playing__label {
    margin: 0 0 0.25rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    opacity: 0.8;
}

.now-playing__time {
    margin: 0 0 0.3rem;
    font-size: 0.9rem;
    opacity: 0.9;
}

.now-playing__show {
    margin: 0 0 0.25rem;
    font-weight: 600;
}

.now-playing__dj {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1.6rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
}

.button--primary {
    background: var(--color-primary);
    color: var(--color-primary-text);
}

.button--primary:hover,
.button--primary:focus-visible {
    opacity: 0.9;
}

/* Now playing widget */

.now-playing-widget {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    z-index: 99;
}

.now-playing-widget__inner {
    background: rgba(0,0,0,0.6);
    padding: 0.9rem 1.15rem;
    border-radius: 0.85rem;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.18);
    min-width: 200px;
    font-size: 0.9rem;
}

.npw-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    opacity: 0.8;
    letter-spacing: 0.1em;
}

.npw-show {
    font-size: 1rem;
    font-weight: 600;
    margin-top: 0.3rem;
}

.npw-dj,
.npw-time {
    font-size: 0.85rem;
    opacity: 0.9;
}

/* Live indicator */

.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.live-dot {
    width: 10px;
    height: 10px;
    background: #ff2a2a;
    border-radius: 50%;
    animation: livePulse 1.15s infinite ease-in-out;
    box-shadow: 0 0 0 rgba(255, 42, 42, 0.6);
}

.live-label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #ff2a2a;
}

@keyframes livePulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 42, 42, 0.5);
    }
    50% {
        transform: scale(1.35);
        box-shadow: 0 0 6px 4px rgba(255, 42, 42, 0.3);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 42, 42, 0.5);
    }
}

/* Off-air message */

.offair-hero {
    display: flex;
    justify-content: center;
    text-align: center;
    margin-top: 1rem;
    padding: 1rem 0;
}

.offair-hero .onair-center__label {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.9;
    margin-bottom: 0.4rem;
}

.offair-hero .onair-center__show {
    font-family: "Inter", sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 1.15rem;
    margin-bottom: 0.35rem;
}

.offair-hero .onair-center__description {
    opacity: 0.8;
    font-size: 1rem;
}

.offair-hero .onair-center__label,
.offair-hero .onair-center__show,
.offair-hero .onair-center__description {
    color: var(--color-text) !important;
}

.hero__eyebrow,
.hero__title,
.hero__subtitle {
    color: var(--color-text) !important;
}

/* On-air center */

.onair-center {
    text-align: center;
    padding: 2.5rem 0;
}

.onair-center__inner {
    max-width: 600px;
    margin: 0 auto;
}

.onair-center__label {
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    opacity: 0.8;
    margin-bottom: 0.6rem;
}

.onair-center__show {
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-weight: 700;
    font-size: 1.15rem;
    text-transform: uppercase;
    letter-spacing: 0.12rem;
    margin-bottom: 0.4rem;
}

.onair-center__description {
    font-size: 1rem;
    opacity: 0.85;
    max-width: 480px;
    margin: 0 auto;
}

/* =========================================================
   SCHEDULE – ONE CARD CAROUSEL
   ========================================================= */

.schedule {
    background-color: var(--color-bg);
    padding: 3rem 0 3.25rem;
}

/* Arrows + card container */

.schedule-carousel {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 2.5rem;
}

/* Card viewport */

.schedule-carousel__viewport {
    flex: 0 1 var(--schedule-card-max-width);
    max-width: 100%;
}

/* Days wrapper */

.schedule__days {
    width: 100%;
}

/* Day card */

.schedule__day {
    background-color: var(--color-bg-alt);
    border-radius: 1rem;
    border: 1px solid var(--color-border);
    padding: var(--schedule-card-padding);
    margin: 0 auto;
    display: none;
    touch-action: pan-y;
}

.schedule__day.is-active {
    display: block;
}

/* No shows message */

.schedule__empty {
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 1rem;
}

/* Day title */

.schedule__day-title {
    font-family: "Playfair Display", serif;
    font-size: 1.4rem;
    line-height: 1.3;
    margin: 0 0 1rem;
}

/* Rows/list */

.schedule__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 1.1rem;
}

.schedule__item {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 0.75rem;
    padding-top: 0.4rem;
    border-top: 1px solid rgba(255,255,255,0.08);
}

body[data-theme="light"] .schedule__item {
    border-top-color: rgba(0, 0, 0, 0.08);
}

.schedule__item:first-child {
    border-top: none;
    padding-top: 0;
}

.schedule__item--current {
    border-radius: 0.75rem;
    border: 1px solid var(--color-primary);
    padding: 0.7rem;
    margin: -0.3rem;
    background: rgba(255,255,255,0.02);
}

body[data-theme="light"] .schedule__item--current {
    background: rgba(0,0,0,0.02);
}

/* Typography inside row */

.schedule__time {
    font-size: 1rem;
    line-height: 1.4;
    text-transform: none;
    letter-spacing: 0;
    opacity: 0.9;
}

.schedule__show {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
}

.schedule__dj {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    opacity: 0.85;
}

.schedule__description {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    opacity: 0.8;
}

/* Arrows */

.schedule-carousel__arrow {
    border-radius: 999px;
    width: var(--schedule-arrow-size);
    height: var(--schedule-arrow-size);
    min-width: var(--schedule-arrow-size);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(0, 0, 0, 0.45);
    color: #ffffff;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    margin-top: var(--schedule-arrow-offset-top);
    transition:
        background 0.2s ease,
        transform 0.15s ease,
        opacity 0.2s ease,
        border-color 0.2s ease;
}

.schedule-carousel__arrow:hover,
.schedule-carousel__arrow:focus-visible {
    background: rgba(0, 0, 0, 0.7);
    transform: translateY(-1px);
    outline: none;
}

.schedule-carousel__arrow[disabled] {
    opacity: 0.35;
    cursor: default;
    transform: none;
}

body[data-theme="day"] .schedule-carousel__arrow {
    background: rgba(255, 255, 255, 0.85);
    color: #222;
    border-color: rgba(0, 0, 0, 0.2);
}

body[data-theme="day"] .schedule-carousel__arrow:hover,
body[data-theme="day"] .schedule-carousel__arrow:focus-visible {
    background: #ffffff;
}

/* =========================================================
   FOOTER
   ========================================================= */

.site-footer {
    border-top: 1px solid var(--color-border);
    padding: 1.6rem 0;
    background-color: var(--color-bg);
}

.site-footer__inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.6rem;
}

.site-footer__text {
    margin: 0;
    font-size: 0.85rem;
    opacity: 0.75;
}

.site-footer a {
    color: inherit;
    text-decoration: underline;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 900px) {
    .schedule-carousel {
        gap: 1.25rem;
    }

    .schedule-carousel__viewport {
        flex-basis: 100%;
        max-width: 100%;
    }

    .schedule-carousel__arrow {
        width: 2.5rem;
        height: 2.5rem;
        min-width: 2.5rem;
        font-size: 1.2rem;
        margin-top: 1.2rem;
    }

    .schedule__item {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero {
        text-align: center;
    }

    .hero__content-inner {
        max-width: 100%;
    }

    .now-playing-widget {
        bottom: 0.75rem;
        right: 0.75rem;
    }
}

@media (max-width: 480px) {
    .hero__title {
        font-size: 2.2rem;
    }

    .button {
        width: 100%;
        justify-content: center;
    }
}

/* =========================================================
   SCHEDULE — AUTO-HIDE EMPTY OR INVALID ROWS
   ========================================================= */

/* normalize spacing so we can match text reliably */
.schedule__time {
    white-space: nowrap;
}

/* Hide rows where time contains only a dash, stray dash, “–”, or blank */
.schedule__item:has(.schedule__time:matches(^[\\s–-]*$)) {
    display: none !important;
}

/* Hide rows where time is like “14:00 –” (missing end time) */
.schedule__item:has(.schedule__time:matches(^\\s*\\d{2}:\\d{2}\\s*[–-]\\s*$)) {
    display: none !important;
}

/* Hide rows where time is like “– 16:00” (missing start time) */
.schedule__item:has(.schedule__time:matches(^\\s*[–-]\\s*\\d{2}:\\d{2}\\s*$)) {
    display: none !important;
}

/* Hide rows where ALL details are empty (title, DJ name, description) */
.schedule__item:has(
    .schedule__show:matches(^\\s*$)
):has(
    .schedule__dj-name:matches(^\\s*$)
):has(
    .schedule__description:matches(^\\s*$)
) {
    display: none !important;
}
