/* ==========================================================================
   RSN.Radio – Startseite
   Gleiche Gestaltung wie der Player: dunkle Flächen, Senderfarben aus
   stations.css (--accent je Karte), Anzeige-Schrift für Namen.
   ========================================================================== */

:root {
    --page-accent: #1f9a3e; /* RSN-Grün */

    --bg: #13171a;
    --surface: #1b1f24;
    --line: #2b3037;
    --text: #f2f3f5;
    --muted: #a3a8b4;

    --font-display: "DIN Condensed", "DINCondensed-Bold", "Bahnschrift Condensed", "Bahnschrift",
                    "Roboto Condensed", "Arial Narrow", sans-serif-condensed, sans-serif;
    --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@supports (color: color-mix(in oklab, red, blue)) {
    :root {
        --bg: color-mix(in oklab, var(--page-accent) 7%, #0f1115);
    }
}

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

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.5;
}

a {
    color: inherit;
}

/* ----- Kopfzeile ---------------------------------------------------------- */

.site-header {
    width: 100%;
    max-width: 1160px;
    margin: 0 auto;
    padding: 22px 24px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 30px;
    line-height: 1;
    letter-spacing: .01em;
    text-decoration: none;
    padding-top: 4px; /* DIN Condensed sitzt optisch etwas hoch */
}

.app-link {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0 18px;
    border: 1px solid var(--line);
    border-radius: 21px;
    color: var(--text);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: border-color .2s ease, background-color .2s ease;
}

.app-link:hover {
    border-color: var(--page-accent);
    background-color: var(--surface);
}

/* ----- Einleitung --------------------------------------------------------- */

.home {
    flex: 1;
    width: 100%;
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 24px;
}

.intro {
    padding: 56px 0 34px;
}

.intro h1 {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(40px, 6.4vw, 72px);
    line-height: .98;
    letter-spacing: -.005em;
}

.intro p {
    margin: 18px 0 0;
    color: var(--muted);
    font-size: 17px;
}

/* ----- Senderkarten ------------------------------------------------------- */

.station-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 14px;
}

.station-card {
    --accent: var(--page-accent);   /* wird von stations.css je Sender überschrieben */
    --on-accent: #ffffff;
    --card-bg: var(--surface);
    --card-line: var(--line);

    height: 100%;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 15px 20px 15px 20px;
    border: 1px solid var(--card-line);
    border-radius: 20px;
    background-color: var(--card-bg);
    text-decoration: none;
    transition: background-color .25s ease, border-color .25s ease;
}

@supports (color: color-mix(in oklab, red, blue)) {
    .station-card {
        --card-bg: color-mix(in oklab, var(--accent) 9%, #1b1e24);
        --card-line: color-mix(in oklab, var(--accent) 22%, #2c3038);
    }

    .station-card:hover {
        --card-bg: color-mix(in oklab, var(--accent) 17%, #1b1e24);
        --card-line: color-mix(in oklab, var(--accent) 60%, #2c3038);
    }
}

.card-logo {
    flex: 0 0 auto;
    width: 72px;
    height: 72px;
    border-radius: 16px;
    object-fit: cover;
    background-color: rgba(255, 255, 255, .04);
    box-shadow: 0 12px 26px -14px var(--accent);
}

.card-name {
    flex: 1;
    min-width: 0;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 25px;
    line-height: 1.05;
    padding-top: 3px;
    overflow-wrap: anywhere;
}

/* Runder Play-Knopf in Senderfarbe: zeigt, dass die Karte direkt abspielt */
.card-play {
    position: relative;
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--accent);
    opacity: .85;
    transition: opacity .2s ease, transform .2s ease;
}

.card-play::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 53%;
    border-style: solid;
    border-width: 7px 0 7px 11px;
    border-color: transparent transparent transparent var(--on-accent);
    transform: translate(-50%, -50%);
}

.station-card:hover .card-play {
    opacity: 1;
    transform: scale(1.08);
}

.noscript {
    color: var(--muted);
}

/* ----- App-Bereich -------------------------------------------------------- */

.app-promo {
    --accent: var(--page-accent);
    margin: 48px 0 0;
    padding: 40px 44px 0;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 32px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background-color: var(--surface);
    overflow: hidden;
}

@supports (color: color-mix(in oklab, red, blue)) {
    .app-promo {
        background-color: color-mix(in oklab, var(--page-accent) 16%, #1a1d22);
        border-color: color-mix(in oklab, var(--page-accent) 35%, #2c3038);
    }
}

.app-copy {
    align-self: center;
    padding-bottom: 40px;
}

.app-promo h2 {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(32px, 4vw, 46px);
    line-height: 1;
}

.app-promo p {
    margin: 14px 0 0;
    max-width: 40ch;
    color: var(--muted);
}

.store-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

.store-button {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    min-width: 168px;
    min-height: 56px;
    padding: 8px 20px;
    border-radius: 14px;
    background-color: var(--text);
    color: #12151a;
    text-decoration: none;
    line-height: 1.15;
    transition: transform .15s ease, background-color .2s ease;
}

.store-button:hover {
    background-color: #ffffff;
    transform: translateY(-2px);
}

.store-small {
    font-size: 12px;
}

.store-name {
    font-size: 20px;
    font-weight: 700;
    white-space: nowrap;
}

/* Kleines Handy mit Player-Ansicht, nur Dekoration */
.app-phone {
    width: 210px;
    height: 300px;
    padding: 12px 12px 0;
    border: 1px solid rgba(255, 255, 255, .14);
    border-bottom: 0;
    border-radius: 34px 34px 0 0;
    background-color: #0d0f12;
    box-shadow: 0 -20px 60px -30px var(--page-accent);
}

.phone-screen {
    height: 100%;
    padding: 22px 18px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    border-radius: 24px 24px 0 0;
    background-color: #1b1f24;
}

.phone-cover {
    width: 118px;
    height: 118px;
    border-radius: 16px;
    object-fit: cover;
    box-shadow: 0 14px 30px -14px var(--page-accent);
}

.phone-station {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 16px;
    white-space: nowrap;
    line-height: 1;
    padding-top: 2px;
}

.phone-controls {
    display: flex;
    align-items: center;
    gap: 22px;
}

.phone-play {
    position: relative;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background-color: var(--page-accent);
}

.phone-play::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 54%;
    border-style: solid;
    border-width: 7px 0 7px 11px;
    border-color: transparent transparent transparent #ffffff;
    transform: translate(-50%, -50%);
}

.phone-arrow {
    width: 9px;
    height: 9px;
    border-left: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    transform: rotate(45deg);
}

.phone-arrow.is-next {
    transform: rotate(-135deg);
}

.phone-progress {
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--page-accent) 62%, var(--line) 62%);
}

/* ----- Fußzeile ----------------------------------------------------------- */

.site-footer {
    width: 100%;
    max-width: 1160px;
    margin: 48px auto 0;
    padding: 24px 24px 32px;
    border-top: 1px solid var(--line);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 14px;
}

.site-footer p {
    margin: 0;
}

.footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-links a {
    color: var(--muted);
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--text);
    text-decoration: underline;
}

/* ----- Tastaturfokus ------------------------------------------------------ */

.brand:focus-visible,
.app-link:focus-visible,
.station-card:focus-visible,
.store-button:focus-visible,
.footer-links a:focus-visible {
    outline: 2px solid var(--text);
    outline-offset: 3px;
}

/* ----- Handy -------------------------------------------------------------- */

@media (max-width: 600px) {
    .site-header {
        padding: 16px 16px 0;
    }

    .brand {
        font-size: 26px;
    }

    .home {
        padding: 0 16px;
    }

    .intro {
        padding: 36px 0 24px;
    }

    .intro p {
        font-size: 16px;
    }

    .station-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .station-card {
        padding: 10px 14px 10px 10px;
        gap: 14px;
        border-radius: 18px;
    }

    .card-logo {
        width: 60px;
        height: 60px;
        border-radius: 14px;
    }

    .card-name {
        font-size: 22px;
    }

    .card-play {
        width: 36px;
        height: 36px;
    }

    .app-promo {
        margin-top: 32px;
        padding: 28px 22px 0;
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 8px;
        border-radius: 22px;
        text-align: center;
    }

    .app-copy {
        padding-bottom: 12px;
    }

    .app-promo p {
        margin-left: auto;
        margin-right: auto;
    }

    .store-links {
        justify-content: center;
    }

    .store-button {
        flex: 1 1 140px;
        min-width: 0;
    }

    .store-name {
        font-size: 18px;
    }

    .app-phone {
        width: 190px;
        height: 250px;
    }

    .phone-screen {
        padding-top: 18px;
        gap: 12px;
    }

    .phone-cover {
        width: 92px;
        height: 92px;
    }

    .site-footer {
        margin-top: 32px;
        padding: 20px 16px 28px;
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition: none !important;
    }
}