/* =========================================================================
   TV Relacionamento — v2 (tema dark, streaming)
   ========================================================================= */
:root {
    --bg: #0b0b0f;
    --bg-2: #101014;
    --surface: #16161d;
    --surface-2: #1e1e27;
    --border: #26262f;
    --text: #f5f5f7;
    --muted: #9a9aa5;
    --accent: #eb7f31;
    --accent-2: #ff9a3c;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 12px 40px rgba(0, 0, 0, .55);
    --topbar-h: 68px;
    --maxw: 1440px;
    font-synthesis: none;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, h4 { font-family: 'Montserrat', sans-serif; margin: 0; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb { background: #2c2c37; border-radius: 20px; }
::-webkit-scrollbar-thumb:hover { background: #3a3a47; }

/* ---------- Topbar ------------------------------------------------------- */
.topbar {
    position: fixed;
    inset: 0 0 auto 0;
    height: var(--topbar-h);
    z-index: 100;
    display: flex;
    align-items: center;
    background: linear-gradient(180deg, rgba(0, 0, 0, .85), rgba(0, 0, 0, 0));
    transition: background .3s ease, border-color .3s ease;
    border-bottom: 1px solid transparent;
}
.topbar.is-scrolled {
    background: rgba(11, 11, 15, .92);
    backdrop-filter: blur(12px);
    border-bottom-color: var(--border);
}
.topbar__inner {
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 clamp(16px, 4vw, 48px);
    display: flex;
    align-items: center;
    gap: 28px;
}
.topbar__brand img { height: 38px; width: auto; object-fit: contain; }
.topbar__nav { display: flex; gap: 22px; margin-right: auto; }
.topbar__link {
    color: var(--muted);
    font-size: 15px;
    font-weight: 500;
    padding: 6px 2px;
    position: relative;
    transition: color .2s;
}
.topbar__link:hover { color: var(--text); }
.topbar__link.is-active { color: var(--text); }
.topbar__link.is-active::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: -6px;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
}
.topbar__search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 8px 14px;
    color: var(--muted);
    transition: border-color .2s, background .2s;
}
.topbar__search:focus-within { border-color: var(--accent); background: rgba(0,0,0,.4); }
.topbar__search input {
    background: none; border: none; outline: none;
    color: var(--text); font-size: 14px; width: 180px;
}
.topbar__search input::placeholder { color: var(--muted); }

/* ---------- Botões ------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform .15s, background .2s, border-color .2s;
}
.btn:active { transform: scale(.97); }
.btn--primary { background: var(--accent); color: #1a1205; }
.btn--primary:hover { background: var(--accent-2); }
.btn--ghost { background: rgba(255,255,255,.12); color: var(--text); border-color: rgba(255,255,255,.18); }
.btn--ghost:hover { background: rgba(255,255,255,.22); }

/* ---------- Hero --------------------------------------------------------- */
.site { display: block; min-height: 60vh; }

.hero {
    position: relative;
    min-height: 78vh;
    display: flex;
    align-items: flex-end;
    background-image: var(--hero-bg);
    background-size: cover;
    background-position: center 20%;
}
.hero__backdrop {
    position: absolute; inset: 0;
    background:
        linear-gradient(90deg, rgba(11,11,15,.95) 0%, rgba(11,11,15,.65) 40%, rgba(11,11,15,.2) 70%, rgba(11,11,15,0) 100%),
        linear-gradient(0deg, var(--bg) 2%, rgba(11,11,15,0) 45%);
}
.hero__content {
    position: relative;
    max-width: var(--maxw);
    width: 100%;
    margin: 0 auto;
    padding: 0 clamp(16px, 4vw, 48px) clamp(48px, 8vh, 96px);
}
.hero__eyebrow {
    display: inline-block;
    color: var(--accent-2);
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    font-size: 13px;
    margin-bottom: 14px;
}
.hero__title {
    font-size: clamp(30px, 5vw, 60px);
    line-height: 1.05;
    font-weight: 800;
    max-width: 18ch;
    margin-bottom: 16px;
}
.hero__desc {
    color: #d6d6de;
    font-size: clamp(15px, 1.4vw, 18px);
    line-height: 1.6;
    max-width: 55ch;
    margin-bottom: 26px;
}
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Rails -------------------------------------------------------- */
.rails { padding: 30px 0 60px; }
.rail { margin: 0 0 42px; }
.rail__head {
    display: flex; align-items: baseline; justify-content: space-between;
    max-width: var(--maxw); margin: 0 auto;
    padding: 0 clamp(16px, 4vw, 48px) 14px;
}
.rail__title { font-size: clamp(18px, 2vw, 23px); font-weight: 700; }
.rail__more { color: var(--muted); font-size: 14px; font-weight: 600; transition: color .2s; }
.rail__more:hover { color: var(--accent-2); }

.rail__viewport { position: relative; }
.rail__track {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
    padding: 6px clamp(16px, 4vw, 48px) 20px;
    scrollbar-width: none;
}
.rail__track::-webkit-scrollbar { display: none; }
.rail__arrow {
    position: absolute; top: 0; bottom: 26px;
    width: clamp(28px, 4vw, 48px);
    z-index: 5;
    border: none;
    background: linear-gradient(90deg, rgba(11,11,15,.9), rgba(11,11,15,0));
    color: #fff; font-size: 30px; cursor: pointer;
    opacity: 0; transition: opacity .2s;
    display: none;
}
.rail__arrow--right { right: 0; background: linear-gradient(270deg, rgba(11,11,15,.9), rgba(11,11,15,0)); }
.rail__arrow--left { left: 0; }
.rail__viewport:hover .rail__arrow { opacity: 1; }
@media (min-width: 900px) { .rail__arrow { display: block; } }

/* ---------- Cards -------------------------------------------------------- */
.card { flex: 0 0 auto; scroll-snap-align: start; display: block; transition: transform .2s; }
.card:hover { transform: translateY(-4px); }

.card--video { width: clamp(230px, 24vw, 300px); }
.card__thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius);
    background: var(--surface) center/cover no-repeat;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}
.card__thumb::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(0deg, rgba(0,0,0,.35), transparent 55%);
    opacity: 0; transition: opacity .2s;
}
.card--video:hover .card__thumb::after { opacity: 1; }
.card__play {
    position: absolute; inset: 0; margin: auto;
    width: 54px; height: 54px; border-radius: 50%;
    display: grid; place-items: center;
    background: rgba(235,127,49,.92); color: #1a1205;
    transform: scale(.6); opacity: 0; transition: .2s;
}
.card--video:hover .card__play { transform: scale(1); opacity: 1; }
.card__badge {
    position: absolute; left: 10px; bottom: 10px;
    background: rgba(0,0,0,.65); color: #fff;
    font-size: 11px; font-weight: 600; padding: 4px 9px; border-radius: 6px;
    opacity: 0; transition: .2s;
}
.card--video:hover .card__badge { opacity: 1; }
.card__meta { padding: 10px 2px 0; }
.card__eyebrow { display: block; color: var(--accent-2); font-size: 12px; font-weight: 600; margin-bottom: 3px; }
.card__title { font-size: 14px; font-weight: 600; line-height: 1.35; color: #e7e7ee; }

.card--programa { width: clamp(150px, 15vw, 190px); }
.card__poster {
    position: relative;
    aspect-ratio: 2 / 3;
    border-radius: var(--radius);
    background: var(--surface) center/cover no-repeat;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    overflow: hidden;
}
.card--programa:hover .card__poster { border-color: var(--accent); }
.card__count {
    position: absolute; left: 8px; bottom: 8px;
    background: rgba(0,0,0,.7); color: #fff;
    font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 6px;
}

/* ---------- Grids -------------------------------------------------------- */
.section-title {
    max-width: var(--maxw); margin: 24px auto 16px;
    padding: 0 clamp(16px, 4vw, 48px);
    font-size: 22px; font-weight: 700;
}
.grid {
    max-width: var(--maxw); margin: 0 auto;
    padding: 0 clamp(16px, 4vw, 48px) 40px;
    display: grid; gap: 20px;
}
.grid--video { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.grid--programa { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.grid--host { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.grid .card { width: 100%; }
.grid .card--programa, .grid .card--video { width: 100%; }

/* ---------- Página do programa ------------------------------------------ */
.show-hero {
    position: relative;
    padding-top: var(--topbar-h);
    background-image: var(--hero-bg);
    background-size: cover; background-position: center;
}
.show-hero__content {
    position: relative;
    max-width: var(--maxw); margin: 0 auto;
    padding: clamp(40px, 8vh, 90px) clamp(16px, 4vw, 48px) 50px;
    display: flex; gap: 36px; align-items: flex-end;
}
.show-hero__poster img {
    width: 220px; aspect-ratio: 2/3; object-fit: cover;
    border-radius: var(--radius); box-shadow: var(--shadow);
    border: 1px solid var(--border);
}
.show-hero__info { max-width: 620px; }
.show-hero__facts { display: flex; gap: 10px; color: var(--muted); font-weight: 600; margin: 12px 0 16px; }

/* ---------- Player ------------------------------------------------------- */
.watch {
    max-width: var(--maxw); margin: 0 auto;
    padding: calc(var(--topbar-h) + 28px) clamp(16px, 4vw, 48px) 60px;
    display: grid; gap: 32px;
    grid-template-columns: minmax(0, 1fr) 360px;
}
.player {
    aspect-ratio: 16 / 9; width: 100%;
    background: #000; border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow); border: 1px solid var(--border);
}
.player iframe { width: 100%; height: 100%; border: 0; }
.watch__show { color: var(--accent-2); font-weight: 600; font-size: 14px; }
.watch__title { font-size: clamp(20px, 2.4vw, 30px); font-weight: 700; margin: 8px 0 14px; }
.watch__desc { color: #c9c9d3; line-height: 1.7; }
.watch__side-title { font-size: 18px; margin-bottom: 16px; }
.playlist { display: flex; flex-direction: column; gap: 12px; }
.playlist__item {
    display: flex; gap: 12px; padding: 8px; border-radius: var(--radius-sm);
    transition: background .2s;
}
.playlist__item:hover { background: var(--surface); }
.playlist__thumb {
    position: relative; flex: 0 0 130px; aspect-ratio: 16/9;
    border-radius: 8px; background: var(--surface-2) center/cover no-repeat;
}
.playlist__play {
    position: absolute; inset: 0; display: grid; place-items: center;
    color: #fff; opacity: 0; transition: .2s; background: rgba(0,0,0,.4); border-radius: 8px;
}
.playlist__item:hover .playlist__play { opacity: 1; }
.playlist__meta h3 { font-size: 14px; font-weight: 600; line-height: 1.35; margin-bottom: 4px; }
.playlist__meta span { color: var(--muted); font-size: 12px; }

/* ---------- Páginas simples --------------------------------------------- */
.page-head {
    max-width: var(--maxw); margin: 0 auto;
    padding: calc(var(--topbar-h) + 40px) clamp(16px, 4vw, 48px) 10px;
}
.page-head__title { font-size: clamp(26px, 3.5vw, 40px); font-weight: 800; }
.page-head__sub { color: var(--muted); margin-top: 8px; }
.empty { color: var(--muted); padding: 20px 0; }

.host-card { text-align: center; }
.host-card__avatar {
    width: 130px; height: 130px; margin: 0 auto 12px;
    border-radius: 50%; background: var(--surface) center/cover no-repeat;
    border: 2px solid var(--border);
}
.host-card:hover .host-card__avatar { border-color: var(--accent); }
.host-card__name { font-size: 16px; font-weight: 600; }
.host-card__desc { color: var(--muted); font-size: 13px; margin-top: 6px; }

.notfound {
    min-height: 70vh; display: grid; place-content: center; text-align: center; gap: 14px;
    padding-top: var(--topbar-h);
}
.notfound h1 { font-size: 90px; color: var(--accent); }
.notfound p { color: var(--muted); }

/* ---------- Footer ------------------------------------------------------- */
.site-footer { background: var(--bg-2); border-top: 1px solid var(--border); margin-top: 40px; }
.site-footer__inner {
    max-width: var(--maxw); margin: 0 auto;
    padding: 50px clamp(16px, 4vw, 48px);
    display: flex; gap: 60px; flex-wrap: wrap; justify-content: space-between;
}
.site-footer__brand img { height: 40px; margin-bottom: 16px; }
.site-footer__brand p { color: var(--muted); max-width: 40ch; line-height: 1.6; }
.site-footer__cols { display: flex; gap: 60px; }
.site-footer__cols h4 { font-size: 14px; margin-bottom: 14px; }
.site-footer__cols a { display: block; color: var(--muted); font-size: 14px; padding: 5px 0; transition: color .2s; }
.site-footer__cols a:hover { color: var(--text); }
.site-footer__bar {
    border-top: 1px solid var(--border); color: var(--muted); font-size: 13px;
    text-align: center; padding: 20px;
}

/* ---------- Responsivo --------------------------------------------------- */
@media (max-width: 960px) {
    .watch { grid-template-columns: 1fr; }
    .show-hero__content { flex-direction: column; align-items: flex-start; gap: 20px; }
    .show-hero__poster img { width: 150px; }
    .topbar__search input { width: 120px; }
}
@media (max-width: 680px) {
    .topbar__nav { display: none; }
    .hero { min-height: 68vh; }
}
