:root {
  --bg: #050505;
  --bg-elev: #0c0c0c;
  --surface: #121212;
  --surface-2: #1a1a1a;
  --ink: #f4f4f4;
  --ink-soft: rgba(244, 244, 244, 0.72);
  --ink-muted: rgba(244, 244, 244, 0.42);
  --line: rgba(255, 255, 255, 0.08);
  --burgundy: #5c1520;
  --burgundy-bright: #7a1f2c;
  --burgundy-deep: #3a0e16;
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Syne', sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --max: 1120px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button,
select {
  font: inherit;
}

.page {
  position: relative;
  min-height: 100vh;
  padding-bottom: 6rem;
  background: var(--bg);
}

.shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-inline: 1.25rem;
  box-sizing: border-box;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.35rem 0 1.25rem;
  border-bottom: 1px solid var(--line);
}

.brand {
  font-family: var(--font-display);
  font-weight: 550;
  font-size: clamp(1.2rem, 2.5vw, 1.45rem);
  letter-spacing: -0.04em;
  color: var(--ink);
  line-height: 1.1;
  min-width: 0;
}

.brand:hover {
  color: #fff;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 1.35rem;
  flex: none;
}

.navlink,
.topnav-link,
.linkish {
  appearance: none;
  border: 0;
  background: none;
  color: var(--ink-muted);
  border-radius: 0;
  padding: 0;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  text-transform: none;
  cursor: pointer;
  transition: color 0.2s var(--ease);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

#favCount {
  display: inline-block;
  min-width: 1.25em;
  text-align: left;
  font-variant-numeric: tabular-nums;
}

.navlink:hover,
.topnav-link:hover,
.linkish:hover {
  color: var(--ink);
}

.navlink--accent {
  color: var(--ink-muted);
}

.navlink--accent:hover {
  color: var(--ink);
}

.linkish.is-active,
.navlink.is-active {
  color: var(--ink);
  box-shadow: none;
  background: none;
  border: 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(200px, 0.75fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
  padding: clamp(1.25rem, 3vw, 2rem) 0 clamp(2rem, 4vw, 2.75rem);
  border-bottom: 1px solid var(--line);
  margin-bottom: 2rem;
}

.hero__copy {
  min-width: 0;
  display: grid;
  gap: 1.75rem;
  align-content: start;
  padding-top: clamp(1.35rem, 3.5vw, 2.75rem);
  position: relative;
  z-index: 2;
}

.hero__eyebrow {
  margin: 0;
  color: var(--burgundy-bright);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero__title {
  margin: 0;
  display: grid;
  gap: 0;
}

.hero__line {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(3.4rem, 10vw, 6.4rem);
  line-height: 0.9;
  letter-spacing: -0.05em;
  font-weight: 550;
}

.hero__line--accent {
  color: var(--burgundy-bright);
}

.hero__aside {
  display: grid;
  gap: 1.75rem;
  align-content: start;
  justify-items: end;
  position: relative;
  z-index: 1;
  min-width: 0;
}

.hero__stack {
  position: relative;
  width: min(100%, 190px);
  aspect-ratio: 2 / 3.15;
  margin: 0.35rem 0.65rem 0;
}

.hero__poster {
  position: absolute;
  width: 84%;
  height: 84%;
  top: 8%;
  left: 8%;
  border-radius: 4px;
  overflow: hidden;
  background: #111;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.hero__poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__poster:nth-child(1) {
  transform: rotate(-6deg) translate(-10%, 3%);
  z-index: 1;
  opacity: 0.55;
  filter: saturate(0.7);
}

.hero__poster:nth-child(2) {
  transform: rotate(5deg) translate(10%, -2%);
  z-index: 2;
  opacity: 0.7;
  filter: saturate(0.85);
}

.hero__poster:nth-child(3) {
  transform: none;
  z-index: 3;
}

.hero__text {
  margin: 0;
  max-width: 20rem;
  color: var(--ink-soft);
  font-size: 0.98rem;
  line-height: 1.6;
  text-align: right;
  position: relative;
  z-index: 2;
}


.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.btn {
  appearance: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  border-radius: 999px;
  padding: 0.8rem 1.25rem;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s var(--ease);
}

.btn--primary {
  background: var(--burgundy);
  border-color: transparent;
  color: #fff;
}

.btn--primary:hover {
  background: var(--burgundy-bright);
  transform: translateY(-1px);
}

.btn--ghost:hover {
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
}

.toolbar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 1rem;
  align-items: end;
  padding: 0 0 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
  background: none;
  border-radius: 0;
}

.field {
  display: grid;
  gap: 0.55rem;
  min-width: 0;
}

.field > span,
.field > label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
  font-weight: 700;
}

.select {
  position: relative;
}

.select__btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  appearance: none;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--ink);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  text-align: left;
  cursor: pointer;
  transition: 0.2s var(--ease);
}

.select__btn:hover,
.select.is-open .select__btn {
  border-color: rgba(122, 31, 44, 0.7);
}

.select__value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  font-size: 0.95rem;
}

.select__chevron {
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid var(--burgundy-bright);
  border-bottom: 2px solid var(--burgundy-bright);
  transform: rotate(45deg);
  transition: transform 0.2s var(--ease);
  flex: none;
  margin-top: -0.2rem;
}

.select.is-open .select__chevron {
  transform: rotate(225deg);
  margin-top: 0.15rem;
}

.select__menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 0.4rem);
  z-index: 20;
  margin: 0;
  padding: 0.4rem;
  list-style: none;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  max-height: 240px;
  overflow: auto;
}

.select__menu[hidden] {
  display: none;
}

.select__option {
  width: 100%;
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  text-align: left;
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.92rem;
}

.select__option:hover,
.select__option.is-active {
  background: rgba(92, 21, 32, 0.55);
  color: #fff;
}

.count {
  color: var(--ink-muted);
  margin: 0 0 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.works {
  display: grid;
  gap: 1.25rem;
}

.work {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
  padding: 1.15rem 0;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}

.work__preview {
  display: block;
  width: 160px;
  border-radius: 4px;
  overflow: hidden;
  background: #111;
  aspect-ratio: 2 / 3;
  align-self: start;
  flex: none;
}

.work__preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (hover: hover) and (pointer: fine) {
  .work__preview img {
    transition: transform 0.5s var(--ease);
  }

  .work:hover .work__preview img {
    transform: scale(1.04);
  }
}

.work__body {
  display: grid;
  align-content: start;
  gap: 0.55rem;
  min-width: 0;
  padding: 0.15rem 0 0;
}

.work__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  color: var(--ink-muted);
  font-size: 0.84rem;
  font-weight: 600;
}

.badge {
  color: var(--burgundy-bright);
}

.work__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3vw, 2.1rem);
  letter-spacing: -0.03em;
  font-weight: 550;
  line-height: 1.08;
}

.work__subtitle {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.92rem;
  font-weight: 600;
}

.work__desc {
  margin: 0;
  color: var(--ink-soft);
  max-width: 36rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.work__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.35rem;
  margin-top: 0.4rem;
  align-items: center;
}

.work__links a {
  color: var(--ink-soft);
  font-weight: 700;
  font-size: 0.9rem;
}

.work__links a:hover {
  color: var(--burgundy-bright);
}

.like {
  appearance: none;
  border: 0;
  background: none;
  color: var(--ink-muted);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0;
}

.like.is-on,
.like:hover {
  color: var(--burgundy-bright);
}

.empty {
  color: var(--ink-muted);
  padding: 2rem 0;
}

.empty--page {
  display: grid;
  gap: 0.85rem;
  justify-items: start;
  padding: 2.5rem 0 4rem;
  max-width: 28rem;
}

.empty--page p {
  margin: 0;
}

.empty--page .btn {
  margin-top: 0.5rem;
}

.hero--simple {
  grid-template-columns: 1fr;
  max-width: 36rem;
}

.hero__text--left {
  text-align: left;
  max-width: 28rem;
  margin-top: 0.25rem;
}

.detail {
  display: grid;
  gap: 2.5rem;
  padding: 2rem 0 4rem;
  min-width: 0;
}

.detail__visual {
  width: 100%;
  display: flex;
  justify-content: center;
  min-width: 0;
}

.detail__poster {
  width: min(340px, 100%);
  max-width: 100%;
  margin: 0 auto;
  display: block;
  border-radius: 4px;
  border: 1px solid var(--line);
  box-shadow: 0 0 0 1px rgba(92, 21, 32, 0.25);
}

.detail__content {
  min-width: 0;
}

.detail__eyebrow {
  margin: 0 0 0.85rem;
  color: var(--burgundy-bright);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.detail__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 7vw, 4rem);
  letter-spacing: -0.045em;
  font-weight: 550;
  line-height: 0.98;
}

.detail__original {
  margin: 0.5rem 0 0.65rem;
  color: var(--ink-muted);
}

.detail__genres {
  margin: 0 0 1.25rem;
  color: var(--burgundy-bright);
  font-size: 0.95rem;
  font-weight: 650;
}

.scores {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.scores div {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem 1.1rem;
  min-width: 0;
  flex: 1 1 6.5rem;
}

.scores span {
  display: block;
  color: var(--ink-muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.scores strong {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 550;
  color: var(--burgundy-bright);
}

.detail__lead {
  max-width: 38rem;
  color: var(--ink-soft);
  font-size: 1.1rem;
  margin: 0;
}

.block {
  margin-top: 2rem;
  max-width: 40rem;
}

.block h2 {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 550;
  color: var(--burgundy-bright);
}

.block p {
  margin: 0;
  color: var(--ink-soft);
}

.empty a {
  color: var(--burgundy-bright);
  font-weight: 700;
}

.block--split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.25rem;
  max-width: none;
}

.cast {
  line-height: 1.75;
}

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  padding: 1rem;
}

.modal__card {
  width: min(540px, 100%);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 2.35rem 2rem 2rem;
  position: relative;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.65);
}

.modal__close {
  position: absolute;
  top: 1.1rem;
  right: 1.2rem;
  border: 0;
  background: none;
  color: var(--ink-muted);
  font-size: 1.6rem;
  cursor: pointer;
}

.modal__title {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: 2.15rem;
  font-weight: 550;
  letter-spacing: -0.03em;
}

.modal__note {
  margin: 0 0 1.5rem;
  color: var(--ink-muted);
  font-size: 0.95rem;
  line-height: 1.55;
  max-width: 34ch;
}

.modal__pool {
  margin: 0 0 1.15rem;
  color: var(--ink-muted);
  font-size: 0.9rem;
}

.segment {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  margin-bottom: 1.35rem;
  padding: 0.35rem;
  background: #000;
  border-radius: 999px;
  border: 1px solid var(--line);
}

.segment__btn {
  border: 0;
  background: transparent;
  color: var(--ink-muted);
  border-radius: 999px;
  padding: 0.7rem 0.8rem;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
}

.segment__btn.is-active {
  background: var(--burgundy);
  color: #fff;
}

.reel {
  position: relative;
  height: 248px;
  margin: 0.25rem 0 1.75rem;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #000;
  overflow: hidden;
  isolation: isolate;
}

.reel__clip {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  border-radius: inherit;
  contain: paint;
}

.reel__fade {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.92) 0%,
    transparent 28%,
    transparent 72%,
    rgba(0, 0, 0, 0.92) 100%
  );
  transition: opacity 0.2s var(--ease);
}

.reel__pointer {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 50%;
  z-index: 3;
  height: 72px;
  transform: translateY(-50%);
  border-radius: 10px;
  border: 1px solid rgba(122, 31, 44, 0.65);
  background: rgba(92, 21, 32, 0.18);
  pointer-events: none;
  transition: opacity 0.2s var(--ease);
}

.reel__pointer::before,
.reel__pointer::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 0;
  height: 0;
  transform: translateY(-50%);
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
}

.reel__pointer::before {
  left: 0;
  border-left: 9px solid var(--burgundy-bright);
}

.reel__pointer::after {
  right: 0;
  border-right: 9px solid var(--burgundy-bright);
}

.reel__track {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 88px 1.25rem;
  will-change: transform;
}

.reel.is-idle .reel__fade,
.reel.is-idle .reel__pointer {
  opacity: 0;
}

.reel.is-idle .reel__track {
  padding: 0;
  height: 100%;
}

.reel__item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 0.8rem;
  align-items: center;
  height: 72px;
  min-width: 0;
  opacity: 0.4;
  overflow: hidden;
  transition: opacity 0.25s var(--ease);
}

.reel__item.is-active {
  opacity: 1;
}

.reel__item img {
  width: 44px;
  height: 66px;
  object-fit: cover;
  border-radius: 5px;
  display: block;
  overflow: hidden;
}

.reel__item strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 550;
  letter-spacing: -0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reel__item span {
  color: var(--ink-muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.reel__empty {
  display: grid;
  place-items: center;
  height: 100%;
  min-height: 248px;
  color: var(--ink-muted);
  font-weight: 600;
  text-align: center;
  padding: 1.5rem;
}

.modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  padding-top: 0.15rem;
}

@media (min-width: 900px) {
  .detail {
    grid-template-columns: 320px 1fr;
    gap: 3rem;
    align-items: start;
  }

  .detail__visual {
    position: sticky;
    top: 1.75rem;
  }
}

@media (max-width: 900px) {
  .toolbar {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }

  .toolbar > .btn {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 1.75rem;
    align-items: start;
  }

  .hero__copy {
    padding-top: 0.35rem;
  }

  .hero__aside {
    justify-items: start;
    max-width: 24rem;
  }

  .hero__text {
    text-align: left;
  }

  .modal__card {
    padding: 1.75rem 1.25rem 1.5rem;
  }
}

@media (max-width: 720px) {
  .shell {
    padding-inline: 1rem;
  }

  .topbar {
    padding: 1rem 0 0.9rem;
    gap: 0.85rem;
    align-items: center;
  }

  .detail {
    padding: 1.25rem 0 5rem;
    gap: 1.5rem;
  }

  .detail__poster {
    width: min(280px, 100%);
  }

  .detail__title {
    font-size: clamp(2rem, 9vw, 2.8rem);
    overflow-wrap: anywhere;
  }

  .hero__actions {
    gap: 0.55rem;
  }

  .hero__actions .btn {
    flex: 1 1 auto;
  }

  .brand {
    font-size: 1.05rem;
    min-width: 0;
    flex: 1;
  }

  .topnav {
    gap: 1rem;
  }

  .navlink,
  .topnav-link,
  .linkish {
    font-size: 0.82rem;
  }

  .btn {
    padding: 0.55rem 0.8rem;
    font-size: 0.78rem;
  }

  .hero {
    padding: 1rem 0 1.5rem;
  }

  .hero__line {
    font-size: clamp(2.6rem, 12vw, 3.6rem);
  }

  .hero__stack {
    width: 140px;
  }

  .toolbar {
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem 0.65rem;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
  }

  .field {
    gap: 0.35rem;
  }

  .field > span,
  .field > label {
    font-size: 0.62rem;
    letter-spacing: 0.08em;
  }

  .select__btn {
    padding: 0.65rem 0.7rem;
    border-radius: 10px;
  }

  .select__value {
    font-size: 0.85rem;
  }

  .work {
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 0.85rem;
    padding: 1rem 0;
    align-items: start;
  }

  .work__preview {
    width: 92px;
  }

  .work__body {
    align-content: start;
    gap: 0.4rem;
    padding-top: 0;
  }

  .work__title {
    font-size: 1.2rem;
  }

  .work__desc {
    -webkit-line-clamp: 2;
  }

  .work__links {
    margin-top: 0.15rem;
    gap: 0.75rem 1rem;
  }

  .modal {
    padding: 0.65rem;
    align-items: end;
  }

  .modal__card {
    width: 100%;
    border-radius: 22px 22px 16px 16px;
    padding: 1.5rem 1.1rem 1.25rem;
  }

  .reel {
    height: 220px;
  }

  .reel__empty {
    min-height: 220px;
  }
}
