/* Conseq Talk — rozcestník epizod */

:root {
    --bg: #0b0d10;
    --bg-glow: #12181d;
    --surface: #14171c;
    --surface-2: #1b1f26;
    --line: rgba(255, 255, 255, .09);
    --line-strong: rgba(255, 255, 255, .18);
    --text: #eef1f4;
    --text-dim: #c3cad2;
    --muted: #8e969f;
    --accent: #ff7a00;
    --accent-soft: rgba(255, 122, 0, .15);
    --radius: 14px;
    --shadow: 0 24px 50px -28px rgba(0, 0, 0, .95);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    background-image: radial-gradient(120% 70% at 50% -10%, var(--bg-glow) 0%, var(--bg) 60%);
    background-repeat: no-repeat;
    color: var(--text);
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

body.is-locked {
    overflow: hidden;
}

[hidden] {
    display: none !important;
}

img {
    max-width: 100%;
}

.wrap {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- záhlaví ---------- */

.masthead {
    padding: 72px 0 44px;
}

.masthead h1 {
    margin: 0;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 650;
    letter-spacing: -.02em;
}

.masthead h1 .accent {
    color: var(--accent);
}

/* ---------- mřížka epizod ---------- */

.grid {
    list-style: none;
    margin: 0;
    padding: 0 0 96px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px 26px;
}

.card {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 0;
    text-align: left;
    font: inherit;
    color: inherit;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    text-decoration: none;
    transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.card:hover,
.card:focus-visible {
    transform: translateY(-3px);
    border-color: var(--line-strong);
    box-shadow: var(--shadow);
}

.card:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #0f1216;
    overflow: hidden;
}

.thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}

.card:hover .thumb img {
    transform: scale(1.045);
}

.play {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(11, 13, 16, .6);
    border: 1px solid rgba(255, 255, 255, .45);
    backdrop-filter: blur(3px);
    opacity: 0;
    transform: scale(.85);
    transition: opacity .22s ease, transform .22s ease;
}

.card:hover .play,
.card:focus-visible .play {
    opacity: 1;
    transform: scale(1);
}

.play svg {
    width: 20px;
    height: 20px;
    margin-left: 3px;
    fill: #fff;
}

/* na dotykových zařízeních není hover — tlačítko je vidět rovnou */
@media (hover: none) {
    .play {
        opacity: .92;
        transform: scale(1);
    }
}

.length {
    position: absolute;
    right: 10px;
    bottom: 10px;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(6, 8, 10, .78);
    color: #fff;
    font-size: .72rem;
    font-variant-numeric: tabular-nums;
    letter-spacing: .02em;
}

.card-body {
    padding: 18px 20px 22px;
}

.meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .72rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
}

.meta .num {
    color: var(--accent);
    font-weight: 600;
}

.meta .dot {
    opacity: .45;
}

.card h2 {
    margin: 10px 0 3px;
    font-size: 1.2rem;
    font-weight: 620;
    letter-spacing: -.01em;
}

.card .title {
    margin: 0;
    color: var(--text-dim);
    font-size: .95rem;
    line-height: 1.4;
}

.card .teaser {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: .875rem;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---------- detail epizody ---------- */

.overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    padding: 28px 20px;
    overflow-y: auto;
    background: rgba(5, 7, 9, .8);
    backdrop-filter: blur(6px);
    animation: fade .18s ease;
}

@keyframes fade {
    from {
        opacity: 0;
    }
}

.dialog {
    width: min(1060px, 100%);
    margin: 0 auto;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 40px 80px -40px #000;
}

.dialog-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 24px;
}

.dialog-head .meta {
    margin-bottom: 8px;
}

.dialog-head h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 640;
    letter-spacing: -.015em;
}

.dialog-head .title {
    margin: 4px 0 0;
    color: var(--text-dim);
    font-size: 1rem;
}

.close {
    flex: none;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--surface-2);
    color: var(--text-dim);
    cursor: pointer;
    transition: color .18s ease, border-color .18s ease;
}

.close:hover {
    color: var(--text);
    border-color: var(--line-strong);
}

.close svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

.player {
    aspect-ratio: 16 / 9;
    background: #000;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.player iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.player-note {
    display: grid;
    place-items: center;
    position: relative;
    padding: 24px;
    text-align: center;
    background-size: cover;
    background-position: center;
}

.player-note::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(8, 10, 13, .93);
}

.player-note > div {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 16px;
    max-width: 430px;
}

.player-note p {
    margin: 0;
    color: var(--text-dim);
    font-size: .95rem;
    line-height: 1.6;
}

.dialog-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 350px);
    gap: 34px;
    padding: 26px 24px 30px;
}

.dialog-body h3 {
    margin: 0 0 12px;
    font-size: .76rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 600;
}

.perex {
    margin: 0;
    color: var(--text-dim);
    font-size: 1rem;
    line-height: 1.65;
}

.platforms {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface-2);
    color: var(--text-dim);
    font-size: .875rem;
    text-decoration: none;
    transition: color .18s ease, border-color .18s ease, background-color .18s ease;
}

.pill svg {
    width: 17px;
    height: 17px;
    fill: var(--brand, currentColor);
    flex: none;
}

.pill:hover {
    color: var(--text);
    border-color: var(--brand, var(--line-strong));
    background: #20252d;
}

.pill.yt {
    --brand: #ff3d34;
}

.pill.sp {
    --brand: #1ed760;
}

.pill.ap {
    --brand: #a05bd6;
}

.chapters {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.chapter {
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr);
    align-items: baseline;
    gap: 12px;
    width: 100%;
    padding: 8px 10px;
    border: 0;
    border-radius: 8px;
    background: none;
    color: var(--text-dim);
    font: inherit;
    font-size: .9rem;
    text-align: left;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
}

.chapter:hover {
    background: var(--surface-2);
    color: var(--text);
}

.chapter:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}

.chapter time {
    color: var(--accent);
    font-size: .82rem;
    font-variant-numeric: tabular-nums;
    letter-spacing: .02em;
}

.chapter.is-active {
    background: var(--accent-soft);
    color: var(--text);
}

@media (max-width: 900px) {
    .dialog-body {
        grid-template-columns: minmax(0, 1fr);
        gap: 30px;
    }
}

@media (max-width: 560px) {
    .wrap {
        padding: 0 16px;
    }

    .masthead {
        padding: 44px 0 30px;
    }

    .grid {
        gap: 22px;
        padding-bottom: 64px;
    }

    .overlay {
        padding: 0;
    }

    .dialog {
        border: 0;
        border-radius: 0;
        min-height: 100%;
    }

    .dialog-head h2 {
        font-size: 1.25rem;
    }

    .dialog-body {
        padding: 22px 18px 40px;
    }
}

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

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}
