
:root {
    --bg: #05080c;
    --bg-2: #090d12;
    --panel: #0c1218;
    --line: rgba(255,255,255,.075);
    --text: #f5f7f9;
    --muted: #8f9aa5;
    --accent: #ef3340;
    --shell: 1480px;
    --radius-lg: 22px;
    --radius-md: 15px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background:
        radial-gradient(circle at 80% -5%, rgba(28,45,67,.18), transparent 28%),
        var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img { display: block; width: 100%; }

.site-shell {
    width: min(calc(100% - 48px), var(--shell));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    border-bottom: 1px solid var(--line);
    background: rgba(5,8,12,.88);
    backdrop-filter: blur(18px);
}

.header-inner {
    min-height: 72px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 28px;
}

.brand {
    width: fit-content;
    text-decoration: none;
    font-weight: 950;
    letter-spacing: -.045em;
    font-size: 19px;
}

.brand-main { color: #f7f9fb; }
.brand-dot, .brand-online { color: var(--accent); }
.brand-online { font-size: .72em; letter-spacing: .02em; }

.main-nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.main-nav a,
.footer-links a,
.browse-link {
    color: #aab4bd;
    text-decoration: none;
    font-size: 12px;
    font-weight: 800;
}

.main-nav a:hover,
.footer-links a:hover,
.browse-link:hover,
.text-link:hover {
    color: #fff;
}

.header-actions {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 18px;
}

.search-trigger {
    min-width: 106px;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255,255,255,.025);
    color: #dfe5ea;
    cursor: pointer;
}

.search-glyph {
    width: 14px;
    height: 14px;
    border: 2px solid currentColor;
    border-radius: 50%;
    position: relative;
}

.search-glyph:after {
    content: "";
    position: absolute;
    width: 6px;
    height: 2px;
    right: -5px;
    bottom: -2px;
    border-radius: 2px;
    background: currentColor;
    transform: rotate(45deg);
}

.search-label {
    font-size: 12px;
    font-weight: 800;
}

.hero-section {
    padding: 22px 0 18px;
}

.hero-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 14px;
}

.hero-main {
    min-height: 560px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background:
        var(--hero-image) center / cover no-repeat,
        #10161e;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(3,6,9,.94) 0%, rgba(3,6,9,.72) 31%, rgba(3,6,9,.24) 61%, rgba(3,6,9,.02) 100%),
        linear-gradient(0deg, rgba(3,6,9,.55), transparent 45%);
}

.hero-content {
    position: absolute;
    z-index: 2;
    left: clamp(30px, 4vw, 62px);
    bottom: clamp(34px, 5vw, 58px);
    max-width: 560px;
}

.eyebrow,
.section-kicker {
    display: block;
    margin-bottom: 10px;
    color: var(--accent);
    font-size: 10px;
    font-weight: 950;
    letter-spacing: .19em;
    text-transform: uppercase;
}

.title-lockup {
    margin-bottom: 18px;
    line-height: .84;
    letter-spacing: -.06em;
}

.title-line-1,
.title-line-2 {
    display: block;
    font-weight: 280;
    font-size: clamp(50px, 6.1vw, 92px);
}

.title-line-2 {
    color: var(--accent);
    margin-left: .65em;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px 14px;
    color: #c4ccd3;
    font-size: 12px;
    font-weight: 750;
}

.hero-meta .rating { color: #ffd068; }

.hero-copy {
    max-width: 500px;
    margin: 16px 0 0;
    color: #a7b1ba;
    font-size: 14px;
    line-height: 1.65;
}

.hero-actions {
    display: flex;
    gap: 10px;
    margin-top: 22px;
}

.btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 21px;
    border-radius: 999px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 900;
    transition: transform .18s ease, filter .18s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 10px 28px rgba(239,51,64,.22);
}

.btn-primary:hover { filter: brightness(1.08); }

.btn-secondary {
    border: 1px solid rgba(255,255,255,.13);
    background: rgba(10,15,21,.58);
    color: #f1f4f6;
}

.hero-index {
    position: absolute;
    right: 22px;
    bottom: 18px;
    color: rgba(255,255,255,.52);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .12em;
}

.hero-side {
    display: grid;
    grid-template-rows: 1fr 1fr;
    gap: 14px;
}

.side-feature {
    min-height: 0;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #10161e;
    text-decoration: none;
}

.side-feature img {
    height: 100%;
    object-fit: cover;
    transition: transform .32s ease;
}

.side-feature:hover img { transform: scale(1.035); }

.side-feature-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(3,6,9,.91), rgba(3,6,9,.02) 72%);
}

.side-feature-copy {
    position: absolute;
    left: 18px;
    right: 48px;
    bottom: 17px;
}

.side-feature-copy strong,
.side-feature-copy span {
    display: block;
}

.side-feature-copy strong {
    font-size: 18px;
    letter-spacing: -.025em;
}

.side-feature-copy span {
    margin-top: 4px;
    color: #9da7b0;
    font-size: 11px;
}

.side-feature-arrow {
    position: absolute;
    right: 16px;
    bottom: 18px;
    color: #fff;
    font-size: 17px;
}

.first-content {
    padding-top: 42px;
}

.section-block {
    padding: 46px 0 8px;
}

.compact-top {
    padding-top: 40px;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 18px;
}

.section-heading h2 {
    margin: 0;
    color: #f6f8fa;
    font-size: clamp(25px, 2.6vw, 34px);
    line-height: 1.08;
    letter-spacing: -.035em;
}

.text-link {
    margin-bottom: 3px;
    color: #87939e;
    text-decoration: none;
    font-size: 11px;
    font-weight: 850;
}

.tonight-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 15px;
}

.tonight-card {
    min-height: 270px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--panel);
    text-decoration: none;
}

.tonight-card img,
.week-card img,
.format-card img {
    height: 100%;
    object-fit: cover;
    transition: transform .34s ease;
}

.tonight-card:hover img,
.week-card:hover img,
.format-card:hover img {
    transform: scale(1.025);
}

.card-fade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(0deg, rgba(3,6,9,.94), rgba(3,6,9,.06) 68%),
        linear-gradient(90deg, rgba(3,6,9,.2), transparent 50%);
}

.pick-number {
    position: absolute;
    left: 18px;
    top: 16px;
    color: rgba(255,255,255,.48);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .17em;
}

.tonight-copy,
.week-copy {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 17px;
}

.tonight-copy strong,
.tonight-copy span,
.week-copy strong,
.week-copy span {
    display: block;
}

.tonight-copy strong,
.week-copy strong {
    font-size: 18px;
    letter-spacing: -.025em;
}

.tonight-copy span,
.week-copy span {
    margin-top: 4px;
    color: #9ca6b0;
    font-size: 11px;
}

.week-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0,1fr));
    gap: 14px;
}

.week-card {
    min-height: 185px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--panel);
    text-decoration: none;
}

.week-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(3,6,9,.93), rgba(3,6,9,.03) 72%);
}

.corner-arrow {
    position: absolute;
    right: 14px;
    top: 13px;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.11);
    border-radius: 50%;
    background: rgba(5,8,12,.42);
    color: #fff;
    font-size: 13px;
}

.format-section {
    padding-top: 44px;
    padding-bottom: 52px;
}

.format-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.format-card {
    min-height: 300px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--panel);
    text-decoration: none;
}

.format-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(3,6,9,.91), rgba(3,6,9,.24) 76%);
}

.format-copy {
    position: absolute;
    left: 28px;
    bottom: 28px;
}

.format-copy span,
.format-copy strong,
.format-copy small {
    display: block;
}

.format-copy span {
    color: var(--accent);
    font-size: 10px;
    font-weight: 950;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.format-copy strong {
    margin-top: 5px;
    font-size: clamp(34px, 4.5vw, 54px);
    line-height: .98;
    letter-spacing: -.05em;
}

.format-copy small {
    margin-top: 9px;
    color: #a5afb8;
    font-size: 12px;
}

.format-arrow {
    position: absolute;
    right: 26px;
    bottom: 26px;
    color: #fff;
    font-size: 27px;
    transition: transform .18s ease;
}

.format-card:hover .format-arrow {
    transform: translateX(4px);
}

.site-footer {
    border-top: 1px solid var(--line);
    background: #04070a;
}

.footer-inner {
    min-height: 96px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.footer-links {
    display: flex;
    gap: 22px;
}

.footer-brand { font-size: 15px; }

.search-panel {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 30px;
    background: rgba(3,5,8,.95);
    backdrop-filter: blur(24px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, visibility .2s ease;
}

.search-panel.is-open {
    opacity: 1;
    visibility: visible;
}

.search-panel-inner {
    width: min(720px, 100%);
}

.search-panel input {
    width: 100%;
    margin-top: 7px;
    padding: 22px 0 18px;
    border: 0;
    border-bottom: 1px solid rgba(255,255,255,.18);
    outline: 0;
    background: transparent;
    color: #fff;
    font-size: clamp(28px, 5vw, 52px);
    font-weight: 700;
    letter-spacing: -.04em;
}

.search-panel input::placeholder { color: #555f69; }

.search-panel p {
    color: #737e89;
    font-size: 12px;
    line-height: 1.6;
}

.search-close {
    position: absolute;
    right: 34px;
    top: 24px;
    width: 48px;
    height: 48px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: transparent;
    color: #fff;
    font-size: 30px;
    cursor: pointer;
}

@media (max-width: 980px) {
    .hero-layout {
        grid-template-columns: 1fr;
    }

    .hero-side {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: none;
    }

    .side-feature {
        min-height: 240px;
    }

    .week-grid {
        grid-template-columns: repeat(2, minmax(0,1fr));
    }
}

@media (max-width: 760px) {
    .site-shell {
        width: min(calc(100% - 28px), var(--shell));
    }

    .header-inner {
        min-height: 66px;
        grid-template-columns: 1fr auto;
    }

    .main-nav,
    .browse-link {
        display: none;
    }

    .search-label {
        display: none;
    }

    .search-trigger {
        min-width: 42px;
        width: 42px;
        padding: 0;
    }

    .hero-section {
        padding-top: 14px;
    }

    .hero-main {
        min-height: 560px;
    }

    .hero-shade {
        background:
            linear-gradient(0deg, rgba(3,6,9,.95), rgba(3,6,9,.22) 72%),
            linear-gradient(90deg, rgba(3,6,9,.58), transparent);
    }

    .hero-content {
        left: 22px;
        right: 22px;
        bottom: 28px;
    }

    .title-line-1,
    .title-line-2 {
        font-size: clamp(48px, 16vw, 78px);
    }

    .title-line-2 {
        margin-left: .35em;
    }

    .hero-copy {
        font-size: 13px;
    }

    .hero-index {
        display: none;
    }

    .hero-side {
        grid-template-columns: 1fr;
    }

    .side-feature {
        min-height: 220px;
    }

    .first-content,
    .section-block {
        padding-top: 40px;
    }

    .section-heading {
        align-items: flex-start;
    }

    .text-link {
        display: none;
    }

    .tonight-grid,
    .week-grid,
    .format-grid {
        grid-template-columns: 1fr;
    }

    .tonight-card {
        min-height: 280px;
    }

    .week-card {
        min-height: 205px;
    }

    .format-card {
        min-height: 285px;
    }

    .footer-inner {
        padding: 26px 0;
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-links {
        flex-wrap: wrap;
        gap: 15px 20px;
    }
}


/* ==============================
   V3: TMDb hero artwork support
   ============================== */

.hero-logo-wrap {
    width: min(460px, 76%);
    min-height: 92px;
    display: flex;
    align-items: flex-end;
    margin: 2px 0 20px;
}

.hero-logo {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 150px;
    object-fit: contain;
    object-position: left bottom;
    filter: drop-shadow(0 10px 22px rgba(0,0,0,.35));
}

.title-lockup-fallback {
    max-width: 540px;
    margin-bottom: 20px;
    line-height: .95;
}

.title-lockup-fallback span {
    display: block;
    color: #f7f9fb;
    font-size: clamp(48px, 6vw, 88px);
    font-weight: 350;
    letter-spacing: -.055em;
    text-transform: uppercase;
}

.hero-main {
    background-position: center center;
}

@media (max-width: 760px) {
    .hero-logo-wrap {
        width: min(380px, 84%);
        min-height: 68px;
        margin-bottom: 17px;
    }

    .hero-logo {
        max-height: 110px;
    }

    .title-lockup-fallback span {
        font-size: clamp(44px, 14vw, 72px);
    }
}


/* =========================================================
   V3.1 HERO POLISH
   Visual changes only. TMDb/data logic is unchanged.
   ========================================================= */

/* Give the brand a little more presence without enlarging the whole header. */
.site-header .brand {
    font-size: 22px;
}

/* A slightly wider side rail makes the supporting artwork feel cinematic. */
.hero-layout {
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 16px;
}

/* Keep the whole top composition a little tighter vertically. */
.hero-main {
    min-height: 520px;
}

/* Let more of the actual TMDb backdrop survive the left readability treatment. */
.hero-shade {
    background:
        linear-gradient(
            90deg,
            rgba(3,6,9,.93) 0%,
            rgba(3,6,9,.72) 27%,
            rgba(3,6,9,.30) 53%,
            rgba(3,6,9,.06) 76%,
            rgba(3,6,9,.00) 100%
        ),
        linear-gradient(
            0deg,
            rgba(3,6,9,.48) 0%,
            rgba(3,6,9,.08) 48%,
            transparent 72%
        );
}

/* Slightly lower, calmer content placement. */
.hero-content {
    bottom: 42px;
    max-width: 570px;
}

/* Official TMDb logo: a touch larger, while respecting extreme logo shapes. */
.hero-logo-wrap {
    width: min(500px, 80%);
    min-height: 86px;
    margin: 0 0 22px;
}

.hero-logo {
    max-height: 138px;
}

/* A little more separation between metadata / overview / actions. */
.hero-meta {
    gap: 10px 16px;
}

.hero-copy {
    margin-top: 18px;
    max-width: 540px;
    line-height: 1.72;
}

.hero-actions {
    margin-top: 24px;
}

/* Supporting cards: emphasize landscape composition and keep text quiet. */
.hero-side {
    gap: 16px;
}

.side-feature {
    border-radius: 20px;
}

.side-feature img {
    object-position: center center;
}

.side-feature-overlay {
    background:
        linear-gradient(
            0deg,
            rgba(3,6,9,.94) 0%,
            rgba(3,6,9,.52) 28%,
            rgba(3,6,9,.05) 72%
        );
}

.side-feature-copy {
    left: 20px;
    right: 54px;
    bottom: 18px;
}

.side-feature-copy strong {
    font-size: 20px;
    line-height: 1.1;
}

.side-feature-copy span {
    margin-top: 6px;
}

.side-feature-arrow {
    right: 18px;
    bottom: 19px;
}

/* At medium widths, keep the current responsive behavior. */
@media (max-width: 1120px) {
    .hero-layout {
        grid-template-columns: minmax(0, 1fr) 330px;
    }
}

@media (max-width: 980px) {
    .hero-layout {
        grid-template-columns: 1fr;
    }

    .hero-main {
        min-height: 540px;
    }

    .hero-side {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: none;
    }

    .side-feature {
        min-height: 230px;
    }
}

@media (max-width: 760px) {
    .site-header .brand {
        font-size: 19px;
    }

    .hero-main {
        min-height: 560px;
    }

    .hero-content {
        bottom: 28px;
    }

    .hero-logo-wrap {
        width: min(390px, 86%);
        min-height: 64px;
        margin-bottom: 18px;
    }

    .hero-logo {
        max-height: 108px;
    }

    .hero-side {
        grid-template-columns: 1fr;
    }

    .side-feature {
        min-height: 215px;
    }
}
