/* ===== Fonts (self-hosted IBM Plex Sans, SIL OFL 1.1 — see fonts/OFL.txt) ===== */
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 100 700; font-display: swap;
  src: url('../fonts/IBMPlexSans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 100 700; font-display: swap;
  src: url('../fonts/IBMPlexSans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ===== Figma variables ===== */
:root {
  --neutrals-white: #ffffff;
  --neutrals-silver: #adadad;
  --neutrals-black: #000000;
  --neutrals-gun-metal: #323232;
  --brown-900: #0b0604;
  --paramount-plus: #0064ff;
  --red: #f23316;
  --teal: #26aeb4;          /* TMC Xtra teal */
  --accent: var(--red);
  --pad: clamp(24px, 10.4166vw, 150px);       /* 150px at 1440 */
  --film-pad: clamp(0px, 10.27vw, 148px);
  /* Full-bleed sections: backgrounds span the viewport, content stays on the 1440px Figma grid.
     --gutter = space outside a centred 1440px column (percentages resolve against the element's own width). */
  --gutter: max(0px, calc((100% - 1440px) / 2));
  --inset: calc(var(--gutter) + var(--pad));
  --arrow-hover: brightness(1.4739);          /* #adadad -> #ffffff for arrow SVG assets */
}
body[data-channel="xtra"] { --accent: var(--teal); }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--neutrals-black);
  color: var(--neutrals-white);
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}
img { display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; text-align: inherit; }
[hidden] { display: none !important; }

/* ===== Silver -> white interactive text ===== */
.tlink, .date-btn, .switch, .related a, .row-head .f {
  color: var(--neutrals-silver);
  transition: color .2s ease;
}
.tlink:hover, .tlink:focus-visible,
.date-btn:hover, .date-btn:focus-visible,
.switch:hover, .switch:focus-visible,
.related a:hover, .related a:focus-visible,
.row-head:hover .f, .row-head:focus-visible .f { color: var(--neutrals-white); }
.arr { transition: filter .2s ease; }
.date-btn:hover .arr, .date-btn:focus-visible .arr,
.switch:hover .arr, .switch:focus-visible .arr { filter: var(--arrow-hover); }
.arr.flip { transform: scaleX(-1); }
:focus-visible { outline: 2px solid var(--neutrals-white); outline-offset: 3px; }

/* ===== Header ===== */
.site-header {
  background: var(--brown-900);
  padding: 20px calc(var(--gutter) + 50px);
  display: flex; align-items: center;
  gap: clamp(24px, 10.4166vw, 150px);
}
.brand { display: flex; align-items: center; gap: 30px; min-width: 0; flex: 1; }
.logo img { width: 135px; height: auto; }   /* standard logo is 135x105, sunglasses logo 135x107 */
.wordmark { display: flex; align-items: center; height: 30px; }
.wordmark img { width: 331px; height: auto; max-width: none; }
.primary-nav { display: flex; align-items: center; gap: 36px; }
.tlink { font-weight: 700; font-size: 16px; letter-spacing: 2px; line-height: normal; }
.primary-nav .tlink { margin-right: -2px; }   /* Figma text boxes exclude trailing letter-spacing */
.pplus {
  width: 152px; height: 53px; border-radius: 100px;
  background: var(--paramount-plus); border: 1px solid var(--paramount-plus);
  overflow: hidden; display: flex; align-items: center; justify-content: center; flex: none;
}
.pplus img { width: 181px; height: 55px; flex: none; }
.menu-btn { display: none; width: 24px; height: 24px; flex: none; }
.menu-btn img { width: 24px; height: 24px; }
.menu { display: none; }

/* ===== Hero ===== */
.hero { position: relative; height: 650px; display: flex; align-items: center; padding: 0 calc(var(--gutter) + 82px); overflow: hidden; background: var(--brown-900); }
.hero picture { position: absolute; inset: 0; display: block; }
.hero-bg, .hero-shade { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-bg { object-fit: cover; object-position: center; }   /* edge-to-edge, never stretched */
.hero-bg[src=""] { display: none; }
.hero-shade { background: linear-gradient(to left, rgba(0,0,0,0), rgba(0,0,0,.8)); }   /* permanent part of the hero: dark left -> clear right (Figma) */
.hero-text { position: relative; letter-spacing: -1px; }
.hero-time { font-size: 32px; line-height: 1.167; }
.hero-on { height: 77px; display: flex; align-items: center; font-weight: 400; }
.hero-on img { width: 538px; height: auto; max-width: none; }
.hero-title { font-size: 48px; line-height: 1.167; }

/* ===== Date clicker ===== */
.dates { padding: 31px var(--inset); display: flex; align-items: center; gap: 20px; }
.date-btn { display: flex; align-items: center; gap: 10px; font-size: 16px; line-height: 2.66; letter-spacing: 1px; text-transform: uppercase; text-align: center; }
.date-btn .lbl .wd, .date-btn .lbl .md { display: inline; }
.date-btn .lbl .cm { display: inline; }
.dates .sep { width: 1px; height: 28px; background: var(--neutrals-silver); }
.arr { width: 24px; height: 16px; flex: none; }

/* ===== Schedule heading ===== */
.sched-head { padding: 70px var(--inset); display: flex; gap: 32px; align-items: flex-start; }
.sched-id { display: contents; }
.chan-logo { width: 175px; height: auto; flex: none; }
.sched-title { min-width: 523px; flex: none; text-transform: uppercase; white-space: nowrap; }
.sched-title small { display: block; font-size: 16px; line-height: 2.66; letter-spacing: 1px; }
.sched-title h2 { font-weight: 400; font-size: 48px; line-height: 1.2; letter-spacing: -1px; }
.switch { flex: 1 1 0; min-width: 0; align-self: stretch; display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 16px; line-height: 2.66; letter-spacing: 1px; text-transform: uppercase; text-align: center; }

/* ===== Listings ===== */
.listings { list-style: none; }
.row { position: relative; overflow: hidden; }
.row-bg { position: absolute; inset: 0; opacity: 0; transition: opacity .45s ease; pointer-events: none; }
.row-bg img { position: absolute; inset: 0; width: 100%; height: 100%; }
.row-bg img { object-fit: cover; object-position: center; }
.row.open .row-bg { opacity: 1; }
.row-head {
  position: relative; display: flex; align-items: flex-start; width: 100%;
  padding: 20px var(--inset) 32px;
}
.row-head .t { width: 100px; flex: none; font-weight: 700; font-size: 24px; line-height: 1.334; letter-spacing: -1px; text-transform: capitalize; color: var(--neutrals-white); }
.row-head .f { flex: 1; padding: 0 var(--film-pad); font-size: 24px; line-height: 1.334; letter-spacing: -1px; text-transform: capitalize; }
.row-head .rating { display: none; font-weight: 700; font-size: 32px; line-height: 1.334; letter-spacing: -1px; white-space: nowrap; }
.row-head, .row-head .t, .row-head .f { transition: font-size .35s ease, color .2s ease; }
.row.open .row-head .t { width: 150px; font-size: 32px; }
.row.open .row-head .f { padding: 0 98px; font-weight: 700; font-size: 32px; color: var(--neutrals-white); }
.row.open .row-head .rating { display: block; }

.detail { position: relative; display: grid; grid-template-rows: 0fr; transition: grid-template-rows .55s cubic-bezier(.4,0,.2,1), margin .55s cubic-bezier(.4,0,.2,1); }
.row.open .detail { grid-template-rows: 1fr; margin-top: -2px; }   /* artwork starts 2px above the 94.69px header (Figma 92.69) */
.detail-clip { min-height: 0; overflow: hidden; }
.detail-in { position: relative; height: 643.31px; }   /* updated Figma: row = 736px (92.69 + 643.31); artwork 641px tall, ends 733.69, divider just above it */
.backdrop { position: absolute; top: 0; bottom: 2.31px; left: 50%; transform: translateX(-50%); width: min(1140px, calc(100% - 2 * var(--pad))); opacity: 0; transition: opacity .7s ease .1s; }
.row.open .backdrop { opacity: 1; }    /* full opacity: the diagonal row pattern must not show through the artwork */
.backdrop picture, .backdrop img { display: block; width: 100%; height: 100%; }
.backdrop img { object-fit: cover; }
.backdrop::after {   /* soft dark gradient behind the metadata/description (top-left); the rest of the artwork stays bright */
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(to right, rgba(0,0,0,.62) 0%, rgba(0,0,0,.4) 30%, rgba(0,0,0,0) 56%),
    linear-gradient(to bottom, rgba(0,0,0,.3) 0%, rgba(0,0,0,0) 32%);
}
/* Updated Figma (591:1769): description at x=174 (inset + 24), y=109 from the row top = 16.31px below the artwork top */
.desc-wrap { position: absolute; left: calc(var(--inset) + 24px); top: 16.31px; width: min(500px, calc(100% - 2 * var(--inset) - 48px)); }
.desc { display: flex; flex-direction: column; gap: 10px; }
.desc .g { font-size: 24px; line-height: 1.235; letter-spacing: -1px; }
.desc .d { font-size: 16px; line-height: 1.5; letter-spacing: .15px; }
.row .line { height: 1px; margin-top: -1px; background: var(--neutrals-silver); margin-inline: var(--inset); transition: margin .45s ease; position: relative; }
.row.open .line { margin-inline: 0; margin-top: -3.31px; margin-bottom: 2.31px; }   /* divider at y=732.69–733.69 as in Figma */
.schedule-gap { height: 250px; }

/* ===== About ===== */
.about-hd { padding: 32px var(--inset); }
.about-hd h2 { font-weight: 400; font-size: 48px; line-height: 1.2; letter-spacing: -1px; text-transform: uppercase; width: 622px; max-width: 100%; }
.about-body { padding: 0 var(--inset); min-height: 250px; font-size: 16px; line-height: 1.5; letter-spacing: .15px; }

/* ===== Banner ===== */
.banner { background: var(--accent); height: 600px; display: flex; align-items: center; justify-content: center; padding: 180px 30px; transition: background-color .35s ease; width: 100%; }
.banner-d { width: 754.334px; height: 121.75px; max-width: 100%; }
.banner-m { display: none; }

/* ===== Footer ===== */
.site-footer { padding: 100px 0 10px; }
.foot-brand { padding: 32px var(--inset); }
.foot-brand .brand { width: 639px; flex: none; max-width: 100%; }
.legal { padding: 0 var(--inset); min-height: 490px; font-size: 16px; line-height: 1.5; letter-spacing: .15px; }
.legal p { margin-bottom: 24px; }
.legal .copy { margin-bottom: 0; }
.legal strong { font-weight: 600; }
.legal .tmdb { margin: -8px 0 22px; line-height: 0; }   /* official TMDB short logo, kept smaller than the site's own logo per TMDB branding rules */
.legal .tmdb a { display: inline-block; }
.legal .tmdb img { display: block; width: 154px; height: auto; max-width: 100%; }
@media (min-width: 1300px) { .legal { height: 490px; } }   /* Figma frame height at 1440 */
.legal .related a { text-decoration: underline; text-underline-position: from-font; }
.net-m { display: none; }
.net { padding: 25px var(--inset); display: flex; gap: 10px; }
.net-d { width: 50px; height: 40px; }
.net-d + .net-d { width: 40px; }

/* placeholder state for movies without artwork */
.backdrop.placeholder { background: linear-gradient(135deg, var(--neutrals-gun-metal), var(--neutrals-black)); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.backdrop.placeholder .ph-pattern { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .6; }
.backdrop.placeholder span { position: relative; font-size: 14px; letter-spacing: 1px; text-transform: uppercase; color: var(--neutrals-silver); }

/* ===== Tablet / small desktop (between mobile layout and Figma 1440 desktop) ===== */
@media (min-width: 821px) and (max-width: 1180px) {
  .site-header { padding: 20px 32px; gap: 24px; }
  .brand { gap: 20px; }
  .wordmark { height: 22.5px; }
  .wordmark img { width: 248px; }
  .primary-nav { gap: 24px; }
  .hero { padding: 0 48px; }
  .hero-time { font-size: 26px; }
  .hero-on { height: 62px; }
  .hero-on img { width: 430px; }
  .hero-title { font-size: 38px; }
  .sched-head { flex-wrap: wrap; row-gap: 8px; }
  .sched-title { min-width: 0; flex: 1 1 360px; white-space: normal; }
  .sched-title h2 { font-size: clamp(34px, 4.6vw, 48px); }
  .switch { flex: 1 1 100%; justify-content: flex-start; align-self: auto; }
  .about-hd h2 { font-size: clamp(36px, 4.6vw, 48px); }
}

/* ===== Mobile (Figma frame: 402px) ===== */
@media (max-width: 820px) {
  .site-header { padding: 20px 24px 12px; gap: 16px; }
  .brand { gap: 16px; }
  .logo img { width: 66px; height: auto; }
  .brand { min-width: 0; }
  .wordmark { height: 18px; flex: 1 1 auto; min-width: 0; }
  .wordmark img { width: 100%; max-width: 209px; }
  .primary-nav { display: none; }
  .menu-btn { display: block; }

  .menu { position: fixed; top: 0; left: 0; right: 0; width: 100%; height: 364px; z-index: 50; overflow: hidden; background: var(--brown-900); display: block; }
  .menu[hidden] { display: none !important; }
  .menu-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  .menu-close { position: absolute; top: 39px; right: 29px; width: 14px; height: 14px; }
  .menu-close img { width: 14px; height: 14px; }
  .menu-nav { position: absolute; left: 50%; transform: translateX(-50%); top: 71px; width: 177px; display: flex; flex-direction: column; align-items: center; gap: 39px; text-align: center; }
  .menu-nav .tlink { font-size: 24px; text-box: trim-both cap alphabetic; }
  .menu .pplus { position: absolute; left: calc(50% - 74px); top: 239px; }

  .hero { height: 300px; padding: 0; align-items: flex-end; }
  .hero-shade { background: linear-gradient(to bottom, rgba(0,0,0,0) 35%, rgba(0,0,0,.87)); }
  .hero-text { width: 100%; padding: 0 24px 32px; display: flex; flex-direction: column; gap: 6px; }
  .hero-time { font-size: 22px; }
  .hero-on { height: 41px; }
  .hero-on img { width: 283px; }
  .hero-title { font-size: 20px; letter-spacing: -.3px; }

  .dates { padding: 24px 12px; gap: 20px; overflow-x: auto; }
  .date-btn { font-size: 14px; line-height: 1.25; text-align: left; white-space: nowrap; }
  .date-btn .lbl .wd, .date-btn .lbl .md { display: block; }
  .date-btn .lbl .cm { display: none; }

  .sched-head { flex-direction: column; padding: 24px; gap: 20px; align-items: stretch; }
  .sched-id { display: flex; gap: 20px; align-items: center; }
  .chan-logo { width: 74px; }
  .sched-title { min-width: 0; width: auto; flex: 1; white-space: normal; }
  .sched-title small { font-size: 12px; line-height: 1.6; }
  .sched-title h2 { font-size: 25px; }
  .sched-title h2 .wd, .sched-title h2 .md { display: block; }
  .switch { flex: none; align-self: auto; justify-content: flex-start; height: 44px; gap: 12px; font-size: 12px; line-height: normal; text-align: left; }

  :root { --pad: 24px; --film-pad: 0px; }
  .row-head { gap: 18px; align-items: center; padding: 22px 24px; }
  .row-head .t { width: 78px; font-size: 16px; letter-spacing: -.3px; line-height: 1.33; }
  .row-head .f { padding: 0; font-size: 16px; letter-spacing: -.3px; line-height: 1.33; }
  .row-head .rating { font-size: 16px; letter-spacing: -.3px; line-height: 1.33; }
  .row.open { background: #292929; }
  .row.open .row-head { padding: 22px 24px 24px; }
  .row.open .row-head .t { width: 78px; font-size: 16px; }
  .row.open .row-head .f { padding: 0; font-size: 18px; }
  .row-bg .bg-b { display: none; }
  .row .line { margin-inline: 24px; margin-top: 0; }
  .row.open .line { display: none; margin: 0; }

  .row.open .detail { margin-top: 0; }
  .detail-in { height: auto; display: flex; flex-direction: column; }
  .backdrop { position: relative; top: auto; left: auto; bottom: auto; transform: none; height: 212px; margin: 0 24px; width: calc(100% - 48px); }
  .row.open .backdrop { opacity: 1; }
  .backdrop::after { display: none; }   /* description sits on solid dark below the image on mobile */
  .desc-wrap { position: relative; left: auto; top: auto; width: auto; margin-top: 0; border-top: 1px solid var(--neutrals-silver); padding: 20px 24px 0; }
  .desc .g { font-size: 14px; line-height: 1.24; letter-spacing: -.3px; }
  .desc .d { font-size: 14px; }
  .schedule-gap { display: none; }

  .about-hd { padding: 80px 24px 0; }
  .about-hd h2 { font-size: 30px; width: auto; }
  .about-body { padding: 24px 24px 64px; min-height: 0; }

  .banner { height: 280px; padding: 28px; }
  .banner-d { display: none; }
  .banner-m { display: block; position: relative; width: min(339px, 100%); aspect-ratio: 339 / 56; }
  .banner-m > img:first-child { width: 100%; height: 100%; }
  .banner-m .period { position: absolute; left: 98.97%; top: 85.71%; width: 2.065%; height: auto; aspect-ratio: 1; }

  .site-footer { padding: 64px 24px 48px; display: flex; flex-direction: column; gap: 28px; }
  .foot-brand, .legal, .net { padding: 0; }
  .foot-brand .brand { width: auto; }
  .legal { font-size: 14px; height: auto; min-height: 0; }
  .legal p { margin-bottom: 20px; }
  .legal .related { margin: 28px 0; line-height: 1.5; }
  .legal .copy { margin-bottom: 0; }
  .sep-d { display: none; }
  .related .ln { display: block; }
  .related .sep-d + .ln { margin-top: 12px; }
  .net-d { display: none; }
  .net { gap: 14px; align-items: center; }
  .net-m { display: block; }
  .net-m.p { width: 42px; height: 34px; }
  .net-m.s { width: 42px; height: 40px; }
}
