/* RR Movies V2 — page layout: navigation, hero, rows, cards, banners, spotlight, explore, footer. */

/* ---------- logo ---------- */
.brand { display: inline-flex; align-items: center; gap: 8px; flex: none; }
.logo-mark {
  position: relative; overflow: hidden;
  display: inline-grid; place-items: center;
  height: 34px; padding: 0 7px 0 8px; border-radius: 7px;
  background: linear-gradient(160deg, #ff4152, var(--red) 45%, #9d0a19);
  box-shadow: 0 6px 22px -6px var(--red-glow), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  font-family: var(--font-display); font-size: 27px; line-height: 1; letter-spacing: 0.02em; color: #fff;
  padding-top: 3px;
}
.logo-mark::after {
  content: ''; position: absolute; inset: -20% auto -20% 0; width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: translateX(-160%) skewX(-18deg);
  animation: logoGlint 7s var(--ease-in-out) 2.4s infinite;
}
.logo-word {
  font-family: var(--font-display); font-size: 27px; line-height: 1; letter-spacing: 0.16em; padding-top: 3px;
  background: linear-gradient(180deg, #fff 40%, #c9c3bf);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- navigation ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--nav-h);
  border-bottom: 1px solid transparent;
  transition: transform 0.55s var(--ease-out), background-color 0.4s, border-color 0.4s, backdrop-filter 0.4s;
}
.nav::before {
  content: ''; position: absolute; inset: 0 0 -40px; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(5, 5, 6, 0.85), rgba(5, 5, 6, 0.4) 55%, transparent);
  transition: opacity 0.4s;
}
.nav.is-solid { background: rgba(7, 7, 9, 0.8); backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3); border-color: var(--line); }
.nav.is-solid::before { opacity: 0; }
.nav.is-hidden { transform: translateY(-105%); }
.nav-inner { height: 100%; display: flex; align-items: center; gap: clamp(16px, 2.4vw, 40px); padding: 0 var(--gutter); }
.nav-links { position: relative; display: flex; align-items: center; gap: 2px; }
.nav-links a { position: relative; padding: 10px 12px; font-size: 14px; font-weight: 700; color: var(--text-2); border-radius: 8px; transition: color 0.25s; }
.nav-links a:hover, .nav-links a[aria-current='page'] { color: #fff; }
.nav-indicator {
  position: absolute; left: 0; bottom: 0; width: 1px; height: 2px;
  background: var(--red); box-shadow: 0 0 14px 1px var(--red-glow); border-radius: 2px;
  transform-origin: left center;
  transform: translateX(var(--x, 0px)) scaleX(var(--w, 0));
  transition: transform 0.55s var(--ease-out), opacity 0.3s;
}
.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.avatar {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line-strong); background: rgba(12, 12, 15, 0.55); color: var(--text);
  font-weight: 800; font-size: 15px; transition: transform 0.3s var(--ease-out), border-color 0.2s;
}
.avatar:hover { transform: scale(1.06); border-color: rgba(255, 255, 255, 0.35); }
.avatar .i { width: 20px; height: 20px; }
.avatar.is-user { background: linear-gradient(140deg, #ff4152, var(--red-deep)); border-color: rgba(255, 90, 100, 0.6); color: #fff; }
.menu-btn { display: none; }

.mobile-menu {
  position: fixed; inset: 0; z-index: 70;
  display: grid; grid-template-columns: 1fr min(86vw, 380px);
}
.mobile-menu .scrim { background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(4px); animation: fadeIn 0.3s both; }
.mobile-menu .panel {
  position: relative; overflow: auto;
  display: flex; flex-direction: column; gap: 6px;
  padding: 22px 26px 30px;
  background: linear-gradient(170deg, #16070a, #08080a 45%);
  border-left: 1px solid var(--line-strong);
  animation: slideInRight 0.5s var(--ease-out) both;
}
.mobile-menu .panel::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 2px; background: linear-gradient(180deg, transparent, var(--red), transparent); }
.mobile-menu .panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.mobile-menu nav a {
  display: block; padding: 8px 0;
  font-family: var(--font-display); font-size: 40px; line-height: 1.05; letter-spacing: 0.03em; color: var(--text-2);
  opacity: 0; transform: translateX(30px);
  animation: menuItem 0.6s var(--ease-out) forwards; animation-delay: calc(var(--i) * 55ms + 120ms);
}
.mobile-menu nav a:hover, .mobile-menu nav a[aria-current='page'] { color: #fff; }
.mobile-menu nav a[aria-current='page']::after { content: ''; display: inline-block; width: 10px; height: 10px; margin-left: 12px; border-radius: 50%; background: var(--red); box-shadow: 0 0 12px var(--red-glow); vertical-align: middle; }
.mobile-menu .panel-foot { margin-top: auto; padding-top: 26px; display: grid; gap: 10px; }

/* ---------- hero ---------- */
.hero {
  --sy: 0; --mx: 0; --my: 0;
  position: relative; isolation: isolate; overflow: hidden;
  height: 100vh; height: 100svh; min-height: 640px; max-height: 1080px;
  background: #050506;
}
.hero-stage { position: absolute; inset: 0; z-index: -3; }
.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.4s var(--ease-in-out); }
.hero-slide.is-active { opacity: 1; }
.hero-kb { position: absolute; inset: 0; transform-origin: 68% 45%; }
.hero-slide.is-active .hero-kb { animation: kenburns 16s var(--ease-out) both; }
.hero-layer { position: absolute; inset: -7% -5%; will-change: transform; }
.hero-layer img { width: 100%; height: 100%; object-fit: cover; object-position: 66% 50%; }
.hero-layer.layer-sky { transform: translate3d(calc(var(--mx) * -8px), calc(var(--sy) * 160px + var(--my) * -5px), 0); }
.hero-layer.layer-mid { transform: translate3d(calc(var(--mx) * -18px), calc(var(--sy) * 100px + var(--my) * -10px), 0); }
.hero-layer.layer-front { transform: translate3d(calc(var(--mx) * -34px), calc(var(--sy) * 34px + var(--my) * -16px), 0) scale(1.02); }
.hero-shade {
  position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(5, 5, 6, 0.94) 0%, rgba(5, 5, 6, 0.72) 28%, rgba(5, 5, 6, 0.18) 58%, rgba(5, 5, 6, 0) 74%),
    linear-gradient(0deg, var(--bg) 0%, rgba(5, 5, 6, 0.7) 16%, rgba(5, 5, 6, 0) 42%),
    linear-gradient(180deg, rgba(5, 5, 6, 0.75) 0%, rgba(5, 5, 6, 0) 24%);
}
.hero::after {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: var(--bg); opacity: calc(var(--sy) * 0.85);
}
.hero-content {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 0 var(--gutter) clamp(120px, 17vh, 190px);
  max-width: min(760px, 100%);
  transform: translate3d(0, calc(var(--sy) * -90px), 0);
  opacity: calc(1 - var(--sy) * 1.7);
}
.hero-content.wide { max-width: min(900px, 100%); }
.hero-eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 18px; }
.hero-eyebrow .rank { font-size: 13px; font-weight: 800; color: var(--text-2); letter-spacing: 0.04em; }
.hero-eyebrow .rank b { color: #fff; }
.hero-title {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(64px, 9.4vw, 158px); line-height: 0.86; letter-spacing: 0.012em;
  text-shadow: 0 12px 60px rgba(0, 0, 0, 0.55);
  margin-left: -0.04em;
}
.hero-title.font-cinzel { font-family: var(--font-serif); font-weight: 700; font-size: clamp(46px, 6.4vw, 104px); line-height: 1; letter-spacing: 0.02em; }
.hero-title.font-manrope { font-family: var(--font-ui); font-weight: 800; font-size: clamp(50px, 6.8vw, 112px); line-height: 0.95; letter-spacing: -0.035em; }
.hero-title .w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0.04em 0.02em 0.02em; margin: -0.04em -0.02em -0.02em; }
.hero-title .w > span { display: inline-block; }
.hero-alt { margin-top: 10px; font-family: var(--font-deva); font-size: clamp(18px, 1.8vw, 24px); color: var(--text-2); letter-spacing: 0.02em; }
.hero-content .meta-row { margin-top: 22px; }
.hero-tagline { margin-top: 18px; font-size: clamp(17px, 1.5vw, 21px); font-weight: 700; color: #fff; }
.hero-desc {
  margin-top: 10px; max-width: 600px; color: var(--text-2); font-size: clamp(15px, 1.15vw, 17px);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-actions .btn { min-height: 54px; padding: 0 26px; font-size: 16px; }
.hero-actions .btn.primary { padding: 0 30px; }

.hero-rail {
  position: absolute; right: var(--gutter); bottom: clamp(36px, 6vh, 64px); z-index: 2;
  display: flex; align-items: flex-end; gap: 12px;
}
.hero-thumb {
  position: relative; width: clamp(118px, 9.5vw, 168px); text-align: left;
  opacity: 0.55; transition: opacity 0.4s, transform 0.5s var(--ease-out);
}
.hero-thumb:hover, .hero-thumb.is-active { opacity: 1; }
.hero-thumb.is-active { transform: translateY(-6px); }
.hero-thumb .frame { display: block; aspect-ratio: 16 / 9; border-radius: 9px; overflow: hidden; border: 1px solid var(--line-strong); box-shadow: 0 10px 30px -10px #000; }
.hero-thumb.is-active .frame { border-color: rgba(255, 90, 100, 0.8); box-shadow: 0 10px 30px -8px var(--red-glow); }
.hero-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease-out); }
.hero-thumb:hover img { transform: scale(1.08); }
.hero-thumb .label { display: block; margin-top: 8px; font-size: 12px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-thumb .bar { display: block; height: 2px; margin-top: 7px; border-radius: 2px; background: rgba(255, 255, 255, 0.16); overflow: hidden; }
.hero-thumb .bar i { display: block; height: 100%; width: 100%; background: var(--red); transform-origin: left; transform: scaleX(0); }
.hero-thumb.is-active .bar i { animation: heroProgress var(--dur, 9000ms) linear forwards; }
.hero.is-paused .hero-thumb.is-active .bar i { animation-play-state: paused; }
.hero-pause { align-self: center; margin-bottom: 26px; }

.hero-counter { display: none; }

/* red light streaks */
.streaks { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.streaks i {
  position: absolute; left: -60vw; top: var(--t, 30%);
  width: 55vw; height: 2px; border-radius: 2px; opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 45, 64, 0.85) 40%, rgba(255, 225, 228, 0.95) 70%, transparent);
  box-shadow: 0 0 22px 3px rgba(229, 24, 43, 0.45);
  transform: rotate(var(--r, -7deg));
  animation: streak var(--d, 9s) var(--ease-in-out) var(--delay, 0s) infinite;
}
.hero-flash {
  position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 40, 60, 0.28) 45%, rgba(255, 235, 235, 0.35) 50%, rgba(255, 40, 60, 0.28) 55%, transparent 70%);
  transform: translateX(-100%);
}
.hero-flash.run { animation: flash 1.1s var(--ease-cine); }
.hero.is-empty { display: grid; place-items: center; text-align: center; }

/* ---------- scenes & rows ---------- */
main { position: relative; z-index: 1; }
/* minmax(0, 1fr): carousels may be wider than the screen; the grid track must not grow with them */
.rows { position: relative; margin-top: clamp(-80px, -6vh, -40px); display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(18px, 3vw, 36px); padding-bottom: 40px; }
.scene { position: relative; }
.scene-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 0 var(--gutter); }
.scene-head .eyebrow { margin-bottom: 10px; font-size: 11px; }
.scene-title { font-size: clamp(26px, 2.6vw, 38px); font-weight: 800; letter-spacing: -0.02em; display: flex; align-items: center; gap: 12px; }
.scene-title .count { font-size: 13px; font-weight: 800; color: var(--muted); letter-spacing: 0; padding: 3px 9px; border: 1px solid var(--line-strong); border-radius: 999px; }
.scene-line { display: block; height: 1px; margin: 14px var(--gutter) 0; background: linear-gradient(90deg, var(--red), rgba(229, 24, 43, 0.25) 30%, rgba(255, 255, 255, 0.06) 60%, transparent); transform-origin: left; }

.rail-wrap { position: relative; }
.rail {
  --card-w: clamp(138px, 14.2vw, 214px);
  --gap: clamp(10px, 1.1vw, 18px);
  display: grid; grid-auto-flow: column; grid-auto-columns: var(--card-w); gap: var(--gap);
  overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain;
  padding: 22px var(--gutter) 30px;
  scroll-padding-inline: var(--gutter);
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }
.rail.wide { --card-w: clamp(250px, 25vw, 380px); }
.rail.ranked { --card-w: clamp(214px, 20vw, 300px); }
.rail-btn {
  position: absolute; top: 22px; bottom: 30px; z-index: 5;
  width: calc(var(--gutter) - 4px); min-width: 44px;
  display: grid; place-items: center;
  color: #fff; opacity: 0; transition: opacity 0.3s, background-color 0.3s;
}
.rail-btn .i { width: 34px; height: 34px; stroke-width: 2.4; transition: transform 0.3s var(--ease-out); filter: drop-shadow(0 2px 8px #000); }
.rail-btn.prev { left: 0; background: linear-gradient(90deg, rgba(5, 5, 6, 0.92), rgba(5, 5, 6, 0)); }
.rail-btn.next { right: 0; background: linear-gradient(270deg, rgba(5, 5, 6, 0.92), rgba(5, 5, 6, 0)); }
.rail-wrap:hover .rail-btn:not([disabled]), .rail-btn:focus-visible { opacity: 1; }
.rail-btn:hover .i { transform: scale(1.2); }
.rail-btn[disabled] { pointer-events: none; }

/* ---------- cards ---------- */
.card { position: relative; border-radius: var(--radius-sm); --lift: 0; }
.card-link { display: block; border-radius: var(--radius-sm); }
.poster {
  position: relative; overflow: hidden; isolation: isolate;
  aspect-ratio: 2 / 3; border-radius: var(--radius-sm);
  background: #0e0e12;
  box-shadow: 0 14px 34px -18px rgba(0, 0, 0, 0.9);
  container-type: inline-size;
  transition: transform 0.6s var(--ease-out), box-shadow 0.6s var(--ease-out);
}
.poster::before {
  /* hairline frame */
  content: ''; position: absolute; inset: 0; z-index: 3; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  transition: box-shadow 0.4s;
}
.poster::after {
  /* light sheen sweep */
  content: ''; position: absolute; top: -10%; bottom: -10%; left: 0; width: 55%; z-index: 3; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.22) 50%, transparent);
  transform: translateX(-180%) skewX(-14deg);
}
.poster > img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease-out), filter 0.6s; }
.poster-copy {
  position: absolute; inset: auto 0 0 0; z-index: 2;
  padding: 0 8% 15%;
  display: grid; justify-items: center; gap: 0.25em; text-align: center;
  transition: opacity 0.35s, transform 0.5s var(--ease-out);
}
.poster-mark { position: absolute; z-index: 2; top: 6cqw; left: 0; right: 0; text-align: center; font-size: max(7px, 4.2cqw); font-weight: 800; letter-spacing: 0.32em; text-transform: uppercase; color: #fff; opacity: 0.85; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8); pointer-events: none; }
.poster.has-image .poster-mark { display: none; }
.poster-mark b { color: var(--red-hi); font-weight: 800; }
.poster-title {
  font-family: var(--font-display); font-size: 17cqw; line-height: 0.88; letter-spacing: 0.02em; color: #fff;
  text-shadow: 0 4px 22px rgba(0, 0, 0, 0.75), 0 0 1px rgba(0, 0, 0, 0.6);
  text-wrap: balance; overflow-wrap: anywhere;
}
.font-cinzel .poster-title { font-family: var(--font-serif); font-weight: 700; font-size: 11cqw; line-height: 1.02; letter-spacing: 0.04em; }
.font-manrope .poster-title { font-family: var(--font-ui); font-weight: 800; font-size: 12cqw; line-height: 0.98; letter-spacing: -0.03em; }
.poster-copy.long .poster-title { font-size: 13.5cqw; }
.font-cinzel.long .poster-title { font-size: 9cqw; }
.font-manrope.long .poster-title { font-size: 10cqw; }
.poster-alt { font-family: var(--font-deva); font-size: max(8px, 6cqw); color: rgba(255, 255, 255, 0.82); letter-spacing: 0.02em; }
.poster-line { width: 18cqw; height: 1px; background: linear-gradient(90deg, transparent, var(--accent, var(--red)), transparent); margin-top: 0.3em; }
.poster.has-image .poster-copy { display: none; }
/* "New" badges sit as a ribbon on the bottom edge so they never collide with the poster's own branding */
.poster-tag {
  position: absolute; z-index: 4; left: 50%; bottom: 0; transform: translateX(-50%);
  padding: 3px 9px 2px; border-radius: 5px 5px 0 0; white-space: nowrap;
  background: var(--red); color: #fff; font-size: 9.5px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
  box-shadow: 0 -4px 14px -4px var(--red-glow);
}
.poster-tag.dark { left: auto; bottom: auto; top: 8px; right: 50px; transform: none; border-radius: 5px; background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(4px); box-shadow: none; }
.progress { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.2); overflow: hidden; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--red), var(--red-hi)); border-radius: inherit; box-shadow: 0 0 10px var(--red-glow); }
.poster .progress { position: absolute; z-index: 4; left: 8%; right: 8%; bottom: 6%; }

.card-pop {
  position: absolute; z-index: 4; left: 0; right: 0; bottom: 0;
  padding: 44px 12px 12px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  background: linear-gradient(180deg, transparent, rgba(5, 5, 6, 0.86) 34%, rgba(5, 5, 6, 0.97));
  opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity 0.35s var(--ease-out), transform 0.5s var(--ease-out);
}
.card-actions { display: flex; gap: 6px; margin-bottom: 9px; }
.card-actions .icon-btn { width: 32px; height: 32px; }
.card-actions .icon-btn .i { width: 15px; height: 15px; }
.card-actions .push { margin-left: auto; }
.card-name { font-size: 13px; font-weight: 800; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-meta { margin-top: 4px; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; font-size: 11px; color: var(--text-2); font-weight: 700; }
.card-meta .rating .i { width: 11px; height: 11px; }
.card-genres { margin-top: 5px; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@media (hover: hover) and (pointer: fine) {
  /* the whole card lifts, so the poster and its info panel move together */
  .card { transition: transform 0.6s var(--ease-out), z-index 0s 0.35s; }
  .card:hover, .card:focus-within { z-index: 6; transform: translateY(-6px) scale(1.06); transition: transform 0.6s var(--ease-out), z-index 0s 0s; }
  .card:hover .poster, .card:focus-within .poster {
    box-shadow: 0 26px 50px -18px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(255, 70, 85, 0.5), 0 16px 46px -14px var(--red-glow);
  }
  .card:hover .poster > img, .card:focus-within .poster > img { transform: scale(1.08); filter: brightness(1.08) saturate(1.1); }
  .card:hover .poster::after, .card:focus-within .poster::after { transform: translateX(320%) skewX(-14deg); transition: transform 1.1s var(--ease-out); }
  .card:not(.wide):hover .poster-copy, .card:not(.wide):focus-within .poster-copy { opacity: 0; transform: translateY(-10px); }
  .card:hover .card-pop, .card:focus-within .card-pop { opacity: 1; transform: none; pointer-events: auto; }
}

/* wide (continue watching) */
.card.wide .poster { aspect-ratio: 16 / 9; }
.card.wide .poster-copy { padding: 0 6% 13%; justify-items: start; text-align: left; }
.card.wide .poster-title { font-size: 9.5cqw; }
.card.wide .font-cinzel .poster-title, .card.wide.font-cinzel .poster-title { font-size: 6.4cqw; }
.card.wide .poster-mark { left: 6%; right: auto; top: 5cqw; text-align: left; font-size: max(7px, 2.4cqw); }
.wide-info { padding: 10px 2px 0; }
.wide-info strong { display: block; font-size: 14px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wide-info small { display: flex; justify-content: space-between; gap: 10px; margin-top: 3px; color: var(--muted); font-size: 12px; font-weight: 700; }
.card.wide .play-ring {
  position: absolute; z-index: 4; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px 0 0 -27px;
  display: grid; place-items: center; border-radius: 50%;
  background: rgba(0, 0, 0, 0.45); border: 1px solid rgba(255, 255, 255, 0.5); backdrop-filter: blur(6px);
  opacity: 0; transform: scale(0.7); transition: opacity 0.3s, transform 0.5s var(--ease-out), background-color 0.3s;
}
.card.wide .play-ring .i { width: 22px; height: 22px; margin-left: 3px; }
.card.wide:hover .play-ring, .card.wide:focus-within .play-ring { opacity: 1; transform: scale(1); background: var(--red); border-color: var(--red-hi); }
.card.wide .remove { position: absolute; z-index: 5; top: 8px; right: 8px; opacity: 0; transition: opacity 0.25s; }
.card.wide:hover .remove, .card.wide:focus-within .remove { opacity: 1; }
@media (hover: none) { .card.wide .remove { opacity: 1; } .card.wide .play-ring { opacity: 1; transform: none; } }

/* ranked (Top 10) */
.card.ranked { display: grid; grid-template-columns: 36% 64%; align-items: end; }
.card.ranked .rank-num {
  font-family: var(--font-display); font-size: clamp(120px, 13vw, 210px); line-height: 0.74;
  color: var(--bg); -webkit-text-stroke: 2px rgba(255, 255, 255, 0.32);
  text-align: right; margin-right: -14%; letter-spacing: -0.04em;
  transition: -webkit-text-stroke-color 0.4s, color 0.4s, text-shadow 0.4s;
  user-select: none; pointer-events: none;
}
.card.ranked .card-link { position: relative; z-index: 1; }
.card.ranked .card-pop { left: 36%; }
.card.ranked:hover .rank-num, .card.ranked:focus-within .rank-num { -webkit-text-stroke-color: var(--red-hi); text-shadow: 0 0 40px var(--red-glow); }
.card.ranked.top3 .rank-num { -webkit-text-stroke-color: rgba(255, 70, 85, 0.75); }

/* ---------- feature banner ---------- */
.banner {
  --py: 0;
  position: relative; isolation: isolate; overflow: hidden;
  margin: 18px var(--gutter);
  min-height: clamp(360px, 40vw, 560px);
  display: flex; align-items: flex-end;
  border-radius: var(--radius-lg); border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
}
.banner-media { position: absolute; inset: -14% 0; z-index: -2; will-change: transform; transform: translate3d(0, calc(var(--py) * 60px), 0) scale(1.04); }
.banner-media img { width: 100%; height: 100%; object-fit: cover; object-position: 66% 50%; transition: transform 1.6s var(--ease-out); }
.banner:hover .banner-media img { transform: scale(1.04); }
.banner::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(5, 5, 6, 0.95) 0%, rgba(5, 5, 6, 0.7) 32%, rgba(5, 5, 6, 0) 70%), linear-gradient(0deg, rgba(5, 5, 6, 0.85), transparent 45%);
}
.banner::after {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), inset 0 -80px 120px -60px rgba(229, 24, 43, 0.35);
}
.banner-copy { padding: clamp(26px, 4.4vw, 64px); max-width: 640px; }
.banner-copy .eyebrow { margin-bottom: 16px; }
.banner-title { font-family: var(--font-display); font-weight: 400; font-size: clamp(54px, 6.6vw, 110px); line-height: 0.88; letter-spacing: 0.01em; }
.banner-title.font-cinzel { font-family: var(--font-serif); font-weight: 700; font-size: clamp(38px, 4.4vw, 74px); line-height: 1.02; }
.banner-title.font-manrope { font-family: var(--font-ui); font-weight: 800; font-size: clamp(40px, 4.8vw, 80px); letter-spacing: -0.035em; line-height: 0.95; }
.banner-copy .meta-row { margin-top: 16px; }
.banner-copy p.desc { margin-top: 12px; color: var(--text-2); max-width: 520px; }
.banner-copy .hero-actions { margin-top: 22px; }

/* ---------- spotlight (pinned scroll scene) ---------- */
.spotlight { --p: 0; position: relative; height: 230vh; margin: 30px 0; }
.spot-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; isolation: isolate; }
.spot-media { position: absolute; inset: 0; z-index: -3; will-change: transform; transform: scale(calc(1.32 - 0.32 * min(1, var(--p) / 0.62))); transform-origin: 60% 55%; }
.spot-media .hero-layer { inset: -6% -3%; }
.spot-media .layer-sky { transform: translate3d(0, calc(var(--p) * 40px), 0); }
.spot-media .layer-mid { transform: translate3d(0, calc(var(--p) * -10px), 0); }
.spot-media .layer-front { transform: translate3d(0, calc(var(--p) * -70px), 0) scale(1.03); }
.spot-sticky::before {
  content: ''; position: absolute; inset: 0; z-index: -2;
  background: linear-gradient(90deg, rgba(5, 5, 6, 0.9), rgba(5, 5, 6, 0.35) 45%, transparent 70%), linear-gradient(0deg, rgba(5, 5, 6, 0.8), transparent 40%);
  opacity: calc(0.35 + min(1, var(--p) * 1.6) * 0.65);
}
.spot-bars i {
  position: absolute; left: 0; right: 0; height: 50%; z-index: -1; background: #000;
  transform: scaleY(calc(1 - 0.86 * min(1, var(--p) / 0.42)));
}
.spot-bars i:first-child { top: 0; transform-origin: top; box-shadow: 0 1px 0 rgba(229, 24, 43, calc(0.8 - var(--p))); }
.spot-bars i:last-child { bottom: 0; transform-origin: bottom; box-shadow: 0 -1px 0 rgba(229, 24, 43, calc(0.8 - var(--p))); }
.spot-streak {
  position: absolute; left: 0; top: 50%; width: 100%; height: 2px; z-index: -1;
  background: linear-gradient(90deg, transparent, var(--red-hi) 30%, #fff 50%, var(--red-hi) 70%, transparent);
  box-shadow: 0 0 30px 4px var(--red-glow);
  transform: scaleX(calc(min(1, var(--p) / 0.3)));
  opacity: calc(1 - max(0, (var(--p) - 0.28) * 5));
}
.spot-copy {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: clamp(60px, 12vh, 130px);
  max-width: 720px;
}
.spot-copy > * {
  opacity: clamp(0, calc((var(--p) - 0.42 - var(--k, 0) * 0.05) * 6), 1);
  transform: translate3d(0, calc(clamp(0, calc(1 - (var(--p) - 0.42 - var(--k, 0) * 0.05) * 6), 1) * 40px), 0);
}
.spot-title { font-family: var(--font-display); font-weight: 400; font-size: clamp(64px, 9vw, 150px); line-height: 0.86; margin-top: 16px; }
.spot-title.font-cinzel { font-family: var(--font-serif); font-weight: 700; font-size: clamp(44px, 6vw, 100px); line-height: 1; }
.spot-title.font-manrope { font-family: var(--font-ui); font-weight: 800; font-size: clamp(46px, 6.2vw, 104px); letter-spacing: -0.035em; line-height: 0.95; }
.spot-copy .tag { margin-top: 18px; font-size: clamp(18px, 1.6vw, 22px); font-weight: 700; }
.spot-copy .desc { margin-top: 10px; color: var(--text-2); max-width: 560px; }
.spot-copy .hero-actions { margin-top: 26px; }
.spot-label {
  position: absolute; top: calc(var(--nav-h) + 18px); right: var(--gutter);
  font-size: 11px; font-weight: 800; letter-spacing: 0.3em; text-transform: uppercase; color: var(--text-2);
  opacity: calc(min(1, var(--p) * 3));
}

/* ---------- explore ---------- */
.explore { padding: clamp(40px, 6vw, 80px) 0 60px; }
.explore .scene-head { align-items: center; }
.explore-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  margin: 24px var(--gutter) 0; padding: 14px;
  border-radius: var(--radius); border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015));
}
.explore-bar .search-field { flex: 1 1 260px; }
.explore-bar .select { width: auto; min-width: 160px; flex: 0 1 auto; font-size: 14px; font-weight: 700; }
.explore-bar .input { font-size: 15px; }
.explore-genres { margin: 16px var(--gutter) 0; }

/* ---------- browse by network ---------- */
.rail.nets { --card-w: max(132px, calc((100% - 7 * var(--gap)) / 8)); padding-top: 18px; padding-bottom: 26px; }
.net {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-rows: minmax(0, 1fr) auto; justify-items: center; align-items: center; gap: 6px;
  height: clamp(118px, 10.4vw, 152px); padding: 14px 12px;
  border-radius: 14px; border: 1px solid rgba(255, 255, 255, 0.07);
  background: linear-gradient(180deg, #16161b 0%, #0d0d10 100%);
  box-shadow: 0 14px 30px -24px rgba(0, 0, 0, 0.9);
  transition: transform 0.5s var(--ease-out), border-color 0.35s, box-shadow 0.5s var(--ease-out);
}
/* colour glow that follows the mouse (--gx/--gy set in home.js) */
.net::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(150px 110px at var(--gx, 50%) var(--gy, 38%), var(--acc-soft), transparent 72%);
  opacity: 0; transition: opacity 0.4s;
}
/* light sweep across the tile on hover */
.net::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.09) 48%, transparent 66%);
  transform: translateX(-130%);
}
/* every logo is fitted into the same box, so wide and compact marks look equally big */
.net-logo { display: grid; place-items: center; width: min(100%, 176px); height: clamp(40px, 3.7vw, 56px); opacity: 0.9; filter: saturate(0.85); transition: transform 0.6s var(--ease-out), filter 0.4s, opacity 0.4s; }
.net-svg { display: block; width: 100%; height: auto; overflow: visible; }
.net-logo .net-svg { height: 100%; }
.net-name { display: inline-flex; align-items: center; gap: 3px; font-size: 12.5px; font-weight: 700; color: var(--muted); white-space: nowrap; transition: color 0.3s; }
.net-name .i { width: 13px; height: 13px; transition: transform 0.35s var(--ease-out), color 0.3s; }
.net:hover, .net:focus-visible { transform: translateY(-6px); border-color: var(--acc-line); box-shadow: 0 26px 46px -24px var(--acc-shadow); }
.net:hover::before, .net:focus-visible::before { opacity: 1; }
.net:hover::after { transform: translateX(130%); transition: transform 1.1s var(--ease-out); }
.net:hover .net-logo, .net:focus-visible .net-logo { transform: scale(1.07); opacity: 1; filter: none; }
.net:hover .net-name, .net:focus-visible .net-name { color: #fff; }
.net:hover .net-name .i, .net:focus-visible .net-name .i { transform: translateX(3px); color: var(--acc); }
.net:active { transform: translateY(-2px) scale(0.98); }

/* Explore: header shown while one network is selected */
.ex-network {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px 26px;
  margin: 18px var(--gutter) 0; padding: 18px 22px;
  border-radius: var(--radius-lg); border: 1px solid var(--acc-line);
  background: radial-gradient(440px 170px at 10% 50%, var(--acc-soft), transparent 72%), linear-gradient(180deg, #141418, #0c0c0f);
  animation: riseIn 0.6s var(--ease-out) both;
}
.ex-network-logo { flex: none; width: 190px; }
.ex-network-copy { flex: 1 1 220px; min-width: 0; display: grid; gap: 4px; }
.ex-network-copy .eyebrow { margin: 0; font-size: 11px; }
.ex-network-copy strong { font-size: clamp(22px, 2.4vw, 30px); font-weight: 800; letter-spacing: -0.02em; }
.ex-network-copy span { font-size: 14px; color: var(--text-2); }
.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(clamp(138px, 13vw, 196px), 1fr));
  gap: clamp(18px, 2vw, 28px) clamp(12px, 1.3vw, 20px);
  margin: 30px var(--gutter) 0;
}
.empty {
  grid-column: 1 / -1; display: grid; justify-items: center; gap: 10px; text-align: center;
  padding: 50px 20px; border: 1px dashed var(--line-strong); border-radius: var(--radius); color: var(--text-2);
}
.empty .i { width: 40px; height: 40px; color: var(--red-hi); }
.empty strong { font-size: 18px; color: #fff; }

/* ---------- footer ---------- */
.footer { position: relative; overflow: hidden; margin-top: 30px; padding: 70px var(--gutter) 40px; border-top: 1px solid var(--line); background: radial-gradient(ellipse 60% 120% at 50% 120%, rgba(229, 24, 43, 0.16), transparent 70%); }
.footer::before {
  content: 'RR MOVIES'; position: absolute; left: 50%; bottom: -0.16em; transform: translateX(-50%);
  font-family: var(--font-display); font-size: clamp(90px, 19vw, 320px); line-height: 1; letter-spacing: 0.06em; white-space: nowrap;
  color: rgba(255, 255, 255, 0.015); -webkit-text-stroke: 1px rgba(255, 255, 255, 0.07); pointer-events: none;
}
.footer-grid { position: relative; display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 40px; }
.footer p { color: var(--muted); font-size: 14px; margin-top: 14px; max-width: 360px; }
.footer h3 { font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-2); margin-bottom: 14px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer ul a { color: var(--muted); font-size: 14px; font-weight: 600; }
.footer ul a:hover { color: #fff; }
.footer-legal { position: relative; margin-top: 50px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 12px; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .nav-links a { padding: 10px 9px; font-size: 13px; }
  .hero-rail { display: none; }
  .hero-counter { display: flex; position: absolute; right: var(--gutter); bottom: clamp(40px, 7vh, 70px); z-index: 2; gap: 8px; }
  .hero-counter button { width: 28px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.25); transition: background-color 0.3s, width 0.4s var(--ease-out); }
  .hero-counter button[aria-current='true'] { background: var(--red); width: 46px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 960px) {
  :root { --nav-h: 66px; }
  .nav-links { display: none; }
  .menu-btn { display: inline-grid; }
  .nav-actions .admin-link { display: none; }
}
@media (max-width: 700px) {
  .logo-mark, .logo-word { font-size: 24px; height: auto; }
  .logo-mark { height: 30px; }
  .nav-actions { gap: 8px; }
  .nav-actions .icon-btn, .avatar { width: 40px; height: 40px; }
  .hero { min-height: 600px; max-height: none; height: 92svh; }
  .hero-layer img { object-position: 64% 50%; }
  .hero-shade {
    background:
      linear-gradient(0deg, var(--bg) 0%, rgba(5, 5, 6, 0.88) 30%, rgba(5, 5, 6, 0.2) 62%, rgba(5, 5, 6, 0) 75%),
      linear-gradient(180deg, rgba(5, 5, 6, 0.7) 0%, rgba(5, 5, 6, 0) 22%);
  }
  .hero-content { padding-bottom: 86px; }
  .hero-title { font-size: clamp(56px, 17vw, 92px); }
  .hero-title.font-cinzel { font-size: clamp(36px, 10vw, 56px); }
  .hero-title.font-manrope { font-size: clamp(40px, 11.5vw, 64px); }
  .hero-content .meta-row { margin-top: 14px; font-size: 13px; gap: 6px 10px; }
  .hero-tagline { margin-top: 12px; }
  .hero-desc { -webkit-line-clamp: 2; }
  .hero-actions { gap: 10px; margin-top: 20px; flex-wrap: nowrap; }
  .hero-actions .btn { flex: 1 1 auto; min-height: 50px; padding: 0 12px; font-size: 15px; }
  .hero-actions .icon-btn { flex: none; width: 50px; height: 50px; }
  .hero-counter { left: var(--gutter); right: auto; bottom: 30px; }
  .rows { margin-top: 10px; }
  .rail { --card-w: 36vw; padding-top: 14px; padding-bottom: 18px; }
  .rail.wide { --card-w: 74vw; }
  .rail.ranked { --card-w: 56vw; }
  .rail.nets { --card-w: 40vw; }
  .net { height: 112px; }
  .ex-network { padding: 16px; }
  .ex-network-logo { width: 150px; }
  .rail-btn { display: none; }
  .banner { min-height: 520px; align-items: flex-end; }
  .banner::before { background: linear-gradient(0deg, rgba(5, 5, 6, 0.97) 10%, rgba(5, 5, 6, 0.55) 55%, rgba(5, 5, 6, 0.1)); }
  .banner-media img { object-position: 62% 50%; }
  .spotlight { height: 190vh; }
  .spot-sticky::before { background: linear-gradient(0deg, rgba(5, 5, 6, 0.95) 10%, rgba(5, 5, 6, 0.3) 60%, transparent); }
  .explore-bar { padding: 12px; }
  .explore-bar .select { flex: 1 1 140px; min-width: 0; }
  .explore-bar .seg { width: 100%; justify-content: space-between; }
  .explore-bar .seg button { flex: 1; padding: 0 8px; }
  .explore-genres { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: 0; padding-right: var(--gutter); }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}
